Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

ROI search

   Hi guys:

 

    i am looking for any way to detect whether a doit ,a line or a object is inside or outside the a ROI  , any idea?

 

 

thanks

 

0 Kudos
Message 1 of 11
(4,693 Views)
What is the back ground? What are getting if you apply a simple threshold. Are you saying thresholding is not seperating the object from the back ground?
0 Kudos
Message 2 of 11
(4,693 Views)
My question is i have already known the position of several dots , and also the position of a rectangle, how can i classify these dots by judge whether they are inside or outside the rectangle?
0 Kudos
Message 3 of 11
(4,689 Views)
That is pretty straight forward isnt it? Can you post a image?
0 Kudos
Message 4 of 11
(4,677 Views)

Hi,

 

I would suggest using pattern matching, geometric matching, or shape detection.  These VI's will tell you if the dot/line is in the ROI that you have selected.  Do you have the Vision Assistant to try this out?

 

Cheers, 

 

Marti C
Applications Engineer
National Instruments
NI Medical
0 Kudos
Message 5 of 11
(4,657 Views)

                     Thanks for all of your reply.

                     I know exactlly what you mean , my background is :

1 Split up a 1280*1024 image into 1280 piecese of 32*32 pixel size regions

2 Find bright or dark objects in each 32*32 region using different threshold value which depands on the average luminance of the region

3 Classfiy all the objects by judging whether they are inside ,outside or included partially of  a specified center ROI in the whole image

                    so , now the question is, after step 2, we aleady have the information of these objects, but how should i classfiy them? or just in one word , how can i  know whether ROI A has intersection with ROI B?

Message Edited by adobefree on 08-25-2009 09:07 PM
0 Kudos
Message 6 of 11
(4,652 Views)

If you can recombine your regions and create a single binary image of your particles, it is pretty easy.  Use ROItoMask to convert your ROI into a mask, then AND the two images together.  Only the particles within the ROI will be remaining.  You can make this a little fancier by numbering the particles (using label) before the AND operation.  This way you could identify each particle after the operation.

 

If you can't recombine the regions, all you have is a bunch of coordinates that you need to know are either inside or outside the ROI.  The mask may still be the easiest way to go, since you could use it as a lookup table.  Get the mask pixel value at X,Y and see if it is inside (255) or outside (0).

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 7 of 11
(4,647 Views)
That sounds good, but i am not familiar with mask functions, could you please do me a faver to draw a example vi ?  thanks a lot
Message Edited by adobefree@gmail.com on 08-26-2009 08:48 AM
0 Kudos
Message 8 of 11
(4,632 Views)

Hi,

 

I would suggest using the Vision Assistant, which was made to be user friendly.  Try playing with the Image Mask and see how far you can get.  There are also a plethora of vision examples available in LabVIEW under Help>Find Examples>Toolkits and Modules>Vision.  

 

Try these out, then post again if you have more questions. 

 

Cheers, 

 

Marti C
Applications Engineer
National Instruments
NI Medical
Message 9 of 11
(4,612 Views)
Yes as martin has suggested, Play around vision assistant and genereate a vi from vision assistant directly and you can always optimize it later.
Message 10 of 11
(4,606 Views)