# Finding slices of a template and randomly generated spots of static image

**URL:** <https://forum.opencv.org/t/finding-slices-of-a-template-and-randomly-generated-spots-of-static-image/1156>\
**Category:** Android/Java\
**Tags:** imgproc, game-automation\
**Created:** [January 27, 2021, 3:40pm UTC](https://forum.opencv.org/t/finding-slices-of-a-template-and-randomly-generated-spots-of-static-image/1156 "2021-01-27T15:40:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Coy\_Allen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/coy_allen/32/763_2.png) [@Coy\_Allen](https://forum.opencv.org/u/Coy_Allen)\
**Post date:** [January 27, 2021, 3:40pm UTC](https://forum.opencv.org/t/finding-slices-of-a-template-and-randomly-generated-spots-of-static-image/1156/1 "2021-01-27T15:40:24Z")

</div>

I need to find how full a textured progress bar is 25%, 50%, 75%, etc. i have the completely full bar’s image as a template and with some effort I can get the empty bar (I would get it on the fly by cropping the image in the game’s asset folder).

(the bars are the health and water meters)

 ![saved0](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/1X/926dae35c5ff71324c6c8c8df0296d4023945f37.png)

I would also like to check for the “seeds” and “pollen” state but the seed and pollen texture is not found in the game’s asset folder and i want to avoid cropped screenshots if possible. the seeds can have nothing, NA, 0 with no seed, or a number with a randomly generated seed behind it. the pollen can be nothing, NA, or the pollen animated texture.

answers to either question is apreciated!
