How to Find Image in a particular Rectangle Region (where region will be dynamic)?

I am using the Find Image activity, it is working perfectly for the full screen but I want to find an image in the particular rectangle region (With dynamic coordinates).

I tried with set clipping region but it is not working. (I only passed the region in the input property and used it just before the Find Image activity)

I am using computer vision in my project as the bot will work on a virtual machine.

So basically I want to find whether the checkbox is checked or not.

If I got the answer then I can try multiple ways to achieve the same.

Condition:

  1. Working on a virtual machine.
  2. Rectangle region is dynamic.

Any help would be appreciated!!! Thanks!!

The CV Check activity works on checkboxes and has an Action option which is Toggle / Check / Uncheck.

Is this something that you can use?

Thanks for the reply Stefan,

CV Check activity does not return whether the checkbox is checked or not. I want to read the checkbox status.

I resolved this issue with find all images on the screen with help of the Find Image Matches activity and checking If a particular image exists in the defined outer Region (I define a fixed rectangle region & checked if the image is inside the Outer region).

Inside Invoke Code Activity:- (Inside the for each activity)

’ Where itemArg is the image element which is found by the Find Image Matches activity
Dim x As Integer = itemArg.ClippingRegion.Rectangle.Value.X
Dim y As Integer = itemArg.ClippingRegion.Rectangle.Value.Y
Dim w As Integer = itemArg.ClippingRegion.Rectangle.Value.Width
Dim h As Integer = itemArg.ClippingRegion.Rectangle.Value.Height

’ This region I have defined to check if the image inside the region
Dim fnX As Integer = finishedNotesOuterRegionArg.X
Dim fnY As Integer = finishedNotesOuterRegionArg.Y
Dim fnW As Integer = finishedNotesOuterRegionArg.Width
Dim fnH As Integer = finishedNotesOuterRegionArg.Height

’ Check if image found inside defined region
If ( (x > fnX) And (y > fnY) And ((x+w) < (fnX+fnW)) And ( (y+h) < (fnY+fnH) ) ) Then
fnStatusArg = True ’ Image found inside the defined region
Else
fnStatusArg = False ’ Image is outside from the defined region
End If

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.