Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I make sequencial Numbering for Multiple ROI's in One Image?

Hi All,

I am trying to give sequencial Numbering for Multiple ROI's in one matrix image. I created one VI, but it is giving ramdom numbers. Could please anbody check my VI and please tell me what's the wrong I am doing.

Thanks,

Sashi
Download All
0 Kudos
Message 1 of 6
(4,243 Views)
Hello Sashi,

I am sorry I didn't understand your question. Please give me more information (details) about your problem.
Thanks
TN
0 Kudos
Message 2 of 6
(4,240 Views)
Hello TN

Sorry for that. If I execute given VI, On image ROIs should have sequenctial Names. It should start from topLeft with Name "R0", Next one should be "R1".

Thanks,

Sashi
0 Kudos
Message 3 of 6
(4,239 Views)
Dear Sashi,

did you get a solution to you problem? I have got a similar one and would be happy if I could have a look at your VI.

Best regards

Jörn
0 Kudos
Message 4 of 6
(4,161 Views)
What it looks like is happening is that the regions of interest are being found, but not necessarily in the order you are expecting. In this case, you would need to sort the global rectangle array by coordinates before passing it into your x and y parameters.
0 Kudos
Message 5 of 6
(4,142 Views)
I have added a simple sorting routine to the example from Sashi. The sorting routine might need to be adapted for different arrangements of the ROI.

In general one needs to find a unique ordinal number for each ROI. After that, the array of ROIs can be sorted by this ordinal number. Finding a unique ordinal number can become quite tricky.

Jörn
0 Kudos
Message 6 of 6
(4,116 Views)