Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Construct ROI with the cursor movement

Hello, I need to construct a ROI in the following way. Firstly, click the PC mouse at a certain spot (A) on the template. Secondly, drag the cursor from (A) to my preferred spot (a spot I chose based on what I see on the template view). At this second step, when I release the mouse there must be a rectangular ROI shown up on the view, with a cross (X) at its corner automatically superimposed onto the desired spot (where the mouse is released). Then, finally, at the pattern recognition step, the matching ROI with the cross (X) at the respective corner will be shown up on the result image as well. Please find the illustration attached. The color of the ROI and the cross (X) are not important.

 

Also, is there any way I can customized the color of the ROI edges so that each edge has a different color?

 

Any/all help would be much appreciated. Thanks.

 

0 Kudos
Message 1 of 7
(3,498 Views)

I think for the 1st question, I need to capture the cursor movement (i.e. need to know the end point of the movement) in order to superimose a cross there? 

 

Any help please?

0 Kudos
Message 2 of 7
(3,483 Views)

Hi LePhoung

 

Did you checked it out ROI Proerty node it may helps you,

Capture.PNGwith use of this get the roi information from  the image and do whatever you want to do. 

---
Silver_Shaper | CLD
0 Kudos
Message 3 of 7
(3,478 Views)

Hi ₰αÇ,

 

I used what you suggested already. It can only help to chose different shape of the ROI, but neither be able to get the (x,y) coordinate of the ROI corners (for rectangular ROI) nor chose different colors for each ROI edge.

0 Kudos
Message 4 of 7
(3,473 Views)

Hi LePhoung

Are you still having the problem?

---
Silver_Shaper | CLD
0 Kudos
Message 5 of 7
(3,460 Views)

Yes, I think I can get the coordinates of the 4 conners of the rectangular ROI and of the matched green box. But I don't know how to match the corresponding corner, which should be marked by the cross, in the sesulting image with that in the template image (especially when the resulting image is rotated comparing to the template).

0 Kudos
Message 6 of 7
(3,454 Views)

Hi

 

See this example might help you.

---
Silver_Shaper | CLD
0 Kudos
Message 7 of 7
(3,447 Views)