05-14-2013 09:18 AM
Hello everybody.
I wonder if it's possible to create a ROI with a triangular shape, because I only see rectangular and linear ROI conversions. I need to do it programmatically, not manually.
Thanks in advance.
Solved! Go to Solution.
05-14-2013 09:38 AM
As far as I know => NO
But can I ask why you need this?
05-14-2013 09:57 AM
I'm testing a Localization implementation using a Kinect device, as you kno this device can recognize depth data in 3,5 meter distance with a 60º FOV. To simulate this, I was thinking about to create a triangle of ROI in a map and detect borders with "extract contours.vi" like Kinect do with walls in a real world. By this way I can compare real measures of distances with my Kinect with simulate distances in a 2D map using pixels like poses and contour points in the edges of the map like obstacles position.
Greetings.
05-14-2013 10:54 AM
Currently, in NI vision, the image data type supports rectangular ROI, and as a result the image data is stored in 2D. You can however use 'Freeform' or Non rectangular ROI's. Follow the link, it shows how to do it programatically
http://digital.ni.com/public.nsf/allkb/82C6023BCC87F5CA86256F38006D2C98#Q4
05-14-2013 12:10 PM
Thanks for the quick response.
So, If I did understand well, I can create a triangular mask of non-zeros that will be the ROI. All the ther pixels will be 0. Is that right?
In the page you linked me there are two .vi attached. One asks me to manually select the ROI. The other one seems to create a mask, but I have to figure out how to create a mask automatically given a point in an image.
Greetings.
05-15-2013 02:13 AM
Yes, what you mention is how it works as far as I am aware.
In the first example, the user/you have to select the ROI in a new pop-up window while in the second example, you can do ROI in it's own window.
I think the second example is a starting pointing. It all points to the ROI descriptor I think, maybe have a look at that?
05-15-2013 03:51 AM - edited 05-15-2013 03:51 AM
With IMAQ Vision something like that:
Result:
Hope it helps a little bit.
Andrey.
05-15-2013 09:24 AM