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.
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".
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.
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.