10-26-2009 06:31 AM
Greetings,
I'm a student and currently working on a project at school where I need to do some things with labview and vision. Now I've a mask (see attachment) and I use the block MaskToROI (ROI = region of interest).
I use this because we have a minature boat and the camara is fixed on the boat, and we are not really interessted in that, only in what happens beside and in front of the boat.
Unfortunaly wenn we use the block edge detection, it gives us a error and tells us that the ROI descriptor which we retrieve from the MaskToRIO block is not correct.
So anyone can explain me or tell me why this is wrong? Because I'm not getting any cleverer by labview itself.
10-26-2009 10:08 AM
There are several different edge detection routines, but they all use either a rectangle or line ROI. A general ROI generated by MaskToROI will not work, because it can't figure out what direction to look for the edge.
If you want a rectangle, you could use the bounding rectangle of your MaskToROI result. That might be a little big, though. I think you probably want a line but I don't see an easy way to get a line from your mask. My best thought is to use blob analysis and get the equation for the line of the longest length. That gets kind of complicated, though.
Bruce
10-27-2009 03:55 AM - edited 10-27-2009 04:00 AM
Ok thanks for your reply I assume then the best method is to make the "boat-shape" mask to a rectangle and then split the mask in 3 ROI's because I need to detect a line at the left/right/front side.
But then how do I run 3 vi's parralel from each other?
10-27-2009 05:30 AM
Oke I made it the ROI's a little different. (See attachment)
I create 3 ROI's
One at the left side, need to detect a vertical line
One at the right side, need to detect a vertical line
One at the top side, need to detect a horizontale line
I create the ROI's by using the block "Rectangle To ROI", now this block needs 5 parameters...
- Top
- Left
- Bottom
- Right
- Rotation
Now I set these parameters too (i've a 640x480 image) for left side (top: 0, bottom: 480, left: 0, right: 213) right side (top: 0, bottom: 480, left: 427, right: 213)... Now the problem occures at setting the options for the detecting the horizontale lines... because I need to rotate the ROI 90 degrees... first I thought just set the parameters (top: 0, bottom: 217, left: 0, right: 640 and rotation 90) and that he will then detect the edges in horizontale direction...
Unfortuanly the whole rectangle I defined then turns arround... and when I try to set the parameters I can't get the right rectangle... For example when I set the right parameter it (the "vector") moves to the right... but it also gets more "height"...
Maybe it is a little abstract but just try it then in the vi...
I hope someone can help 🙂