Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Delete a ROI selected by user

Solved!
Go to solution

Hi,
i have an application with multiple ROIs generated automatically from an electric CAD file. The user must inspect the result of the automated ROIs creation and eventually add or delete one or more ROI. Adding a ROI was not a problem, it is enough to old the ctrl key. More difficult is delete a single ROI selected by user. By now i had trying to use the get last event , of the imaq control, extracting the coordinates and comparing it with the global rectangle of the ROIs, if i find a ROI wich the global rectangle coordinates are equal to the coordinates get from the get last event invoke node i delete the ROI. Problem is that sometimes, doing this, i delete more than one ROI, and sometimes i can't delete the selected roi.


I think this is a trivial problem of the imaq control structure, i searched in the forum, so i ask if someone have found a procedure to do this.


Thank you, Francesco.

0 Kudos
Message 1 of 4
(4,489 Views)
Solution
Accepted by FM82

Hello,

 

if you draw your ROI's on the image directly, why don't you also clear them in the same way? Right click the relevant ROI contour and select "Delete ROI contour". This will delete only the selected ROI.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Message 2 of 4
(4,479 Views)

Thank you very much. I feel a little stupid right now...    Smiley Embarassed

 

Francesco

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

Don't. We've all been there once or twice 🙂

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 4 of 4
(4,471 Views)