OpenCV: Bad Input roi Me Too, with detailed information

uiautomation
studio

#1

OpenCV: Bad Input roi
Source: Click Image 'mstsc.exe sqsterm01’
Exception Type: ImageOperationException

This occurs in a pick branch actions operation.
The trigger had the same image grab and in the actions
there is a messagebox with the text “picked branch 1”.
I get to the message box and click OK
the next operation is the Click Image and it fails on the error above.


#2

more information, somewhat surprising:
In Image Exists
if I use “Grab from screen” it finds the correct image,
if I use “indicate scope on screen” it picks the incorrect path
in Click Image
if I use “Grab from Screen” i get the error I described in the main post
if I use “indicate scope on screen” it works fine

wth (what the heck)

Upon further testing this doesn’t work either. I am using the expenseIT app icon as the test on a remote server. I have done three branches, the first is 640x480 not highlighted, the 2nd is same highlighted and the 3rd is full screen highlighted. I grab the image for #1 and #2 from the screen and the image shows clearly as not highlighted and highlighted and smaller than #3. I have the image not highlighted in MSTSC and it picks the branch with the highlighted one. When I do fullscreen (#3) it picks the branch with the small non highlighted image. At least so far, then none of them succeed at clickiimage

just to add to the lunacy scope is actually a clipping area defined by x/y coordinates and so if I moved the icon it wouldn’t work. I haven’t but that’s not a very reliable way so I would hate to rely on it. Ultimately anything but trying to find an image makes more sense. I would like to know why this particular one is acting so strangely though


#3

I may have found the problem. Hopefully this is true and helps others. I noticed that there is still a clipping region after I selected “indicate scope on screen” first then changed it to “grab from screen”. I deleted the clipping region from both the text field and the expanded 4 individual text fields and then did grab from screen again and it appeared to work.
another work around would be to delete the image exists and do it again ONLY using grab from screen and same with click image.
One more thing to note. It appears you can only delete the clipping region information IF you do the grab from screen first. This seems like a bug to me. If you change from “scope” to “grab” it should automatically delete the clipping region criteria.


#4

Hi! It seems we have the same problem and I would like to know better how does your solution worked out with your project. I think we have the exact same problem because I’m using a click image activity and suddenly, the workflow throws me this exception and I have no idea of what is that. It should be mentioned that the same activity worked well until it throws that exception with any significant change in the sequence that involves it. I tried to delete the activity and then recreate it but I’m still getting that exception.

It would be very helpful if you could contact me and tell me exactly what you did to solve it.

Regards.