Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

problem while using color pattern matching

Currently we are doing projects on real time object tracking where we found one doubt that irrespective of the object size whether this color pattern match works or not . My questions are as follows:

1. Whether it is applicable for objects moving far . Because as it moves far, the size of the object decreases such that the color pattern matching is not working what will be solution since we must use color image

2. What is the difference in using scale and  rotate invarient in color pattern matching

3. How we can effectively decrease the ROI depending upon the object position as per below attached screen shots .

we have removed boundary box values of X and Y coordinates at the four corner but we can't track as the object moves far away or we can't decrease the ROI as the object moves far.

4. whether it is possible to see the value of particular pixel  in LABVIEW vision development module as we seen only the coordinate position . whether it is applicable to see particular pixel value. Guide us

 

please, see the below screen shots and provide the solution how effectively decrease or increase  the ROI depending on objects position using color pattern match

0 Kudos
Message 1 of 6
(4,980 Views)

Fixturing, Illumination, and Resolution are the principal elements of a reliable vision system.

 

Since you mention motion (no fixturing), and that the traget is moving away (lowering resolution, variable illumination), you cannot simply rely on basic tools of the vision toolkit to solve your problem.

 

1. Is it possible to get a higher resolution camera?  This could improve performance, allowing for detection farther away.

2. Implement some kind of intensity correction.  Pre-process all images before performing you tracking, so that you always get steady intensity values at the begining of the inspection.

3. Consider other methods of coarse object location, so you can optimize the location and size of your search window.

4. Try looking at the image data in the greyscale space.  You can extract six or seven different channels from a color image.  Some of those channels may contain useful information.

Machine Vision, Robotics, Embedded Systems, Surveillance

www.movimed.com - Custom Imaging Solutions
0 Kudos
Message 2 of 6
(4,965 Views)

sir, we have high resolution camera but on using color pattern matching it matches upto some limit afterwards it doesn't . So we have to predict and fix the location and then we have to draw the ROI over it as the object moves away as shown in screen shot . So, i request you to kindly guide as to effectively decrease the ROI as the objects moves away because at this time the template we are giving does not match. what will be solution...

0 Kudos
Message 3 of 6
(4,955 Views)

what is meant by coarse object location please explain

 

0 Kudos
Message 4 of 6
(4,953 Views)

Hello,

 

I have not been using the color pattern matching a lot (especially not in real-time). But since the pattern matching considers only small scale changes, you could try updating the color template every n-th iteration (depending on your setup and requirements). The major problem is the template size, since the color pattern matching tends to take quite a lot of time in learning the template. You would of course need to come up with some idea on how to change the subimage size, where the new template will be learned.

 

This is the part of coarse (rough) object detection as was suggested by MoviJOHN. For example, if your object is distinctly red, you can extract the green channel from your rgb image and use threshold to roughly find the object and apply the new ROI - template.

 

So:

 

1. learn the template,

2. use pattern matching with bounding rectangle (ROI) for the next couple of frames (you would need to experiment here where the detection fails -> how fast can you move the object away so that the detection fails),

 

3. Before the detection fails -> rough object detection with some padded bounding rectangle (new ROI),

4. Re-learn te template of new ROI and go back to 2.

 

Again, the biggest issue is the template learning time - if you have a high resolution camera and the template is large, this won't satisfy your real-time application.

 

You should set up the appropriate illumination first. The resolution is also important, since your object is moved back and forth (but the resolution will have a direct impact on the template learning time).

 

 

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 5 of 6
(4,948 Views)

By coarse, I mean that you are trying to perform a rough detection of the general area where the object is that you want to ultimately detect.

 

One approach is to eliminate everything that can absolutely NOT be the object.  You can do this using color, size, location on the image, etc.  Furthermore, you can mask off those areas of the image, or you can extract the remining image information into a smaller image.  This last bit can improve performance.

Machine Vision, Robotics, Embedded Systems, Surveillance

www.movimed.com - Custom Imaging Solutions
0 Kudos
Message 6 of 6
(4,930 Views)