LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

triangular ROI

Solved!
Go to solution

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.

0 Kudos
Message 1 of 8
(3,442 Views)

As far as I know => NO

But can I ask why you need this?

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 2 of 8
(3,431 Views)

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.

0 Kudos
Message 3 of 8
(3,427 Views)

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

0 Kudos
Message 4 of 8
(3,419 Views)

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.

0 Kudos
Message 5 of 8
(3,410 Views)

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?

 

 

0 Kudos
Message 6 of 8
(3,398 Views)
Solution
Accepted by topic author pakopon

With IMAQ Vision something like that:

TriangleROI-1.png

 

Result:

TriangleROI-2.jpg

 

Hope it helps a little bit.

 

Andrey.

0 Kudos
Message 7 of 8
(3,395 Views)

Wow. Thanks a lot Andrey_Dmitriev. This is what I was trying to do. 

 

Thanks averyone for the answers.

0 Kudos
Message 8 of 8
(3,382 Views)