08-13-2014 03:27 AM
Hi, I am building a system where cameras are used to solve sample location in a turntable. The main feature is to detect this rectangle shaped sample holder, and track it's corners when it's being rotated. I am using vision assistant, and within it, shape detection function to do this. The issue is that I can't figure out how to make the detection better. In the pictures below, you can see that the shape detection seem to work quite well when the object is straight, but when it's turned, the detection algorithm doesn't do very good job.
08-13-2014 04:46 AM
Hi,
I notice you are using the Detect Shapes VI (via vision assistant). I would try using the Pattern Match VIs instead.
(there is an example in the vision section of the example finder called 'Pattern Matching (All).vi that would be worth looking at).
08-13-2014 08:03 AM
Thanks for your input. Pattern matching does indeed seem much more stabile form of detection. However, I still need to know the pixel coordinates for the rectangle corners, so I thought shape detection would still be sensible to use. I was able to tie the shape detection ROI to the coordinates from pattern matching, and while editing the vision assistant, you can see that the shape detection does detect the rectangle quite well. But when running the VI, it's as if the program doesn't detect rectangles, and number of matches just stays at zero. Any idea what is going on?
08-13-2014 08:28 AM
Personally I would move away from the vision assistant and write your code straight into LabVIEW, I have always had more success this way.
You should be able to find your corners with the ROI descriptor data that comes out of the pattern match vi
http://zone.ni.com/reference/en-XX/help/370281U-01/imaqvision/imaq_match_pattern_4/