Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to measure on depth image

I am trying to measure the area of an object that has been captured by a ToF camera. 
Depth.PNG

The object is the round "sausage" like object. I am wondering how I should measure on the depth image?
I also have an RGB image and originally I considered to detect the object there, and then detect the coordinates for the ROI, and then go and read the values on the depth image. 
However due to poor lighting conditions that is a little difficult. 
I added the VI that loads and displays this image and the file for this image (the Depth_info vi is a sub vi).
Does anyone have a lead that could nodge me in the right direction?
Thanks. 

Download All
0 Kudos
Message 1 of 5
(5,522 Views)

Hello,

 

the simplest way would be to detect the object on the texture image and extract the corresponding depth values (if your texture and depth images are aligned/calibrated). But you've got the problem with lighting conditions. Can you improve this to illuminate the object more? Can the countours of the object be extracted on the illuminated texture image?

 

On the other hand, you could perform some sort of segmentation on the depth image to separate the measured object from the background and then calculate the area. Can you attach the X,Y,Z information of your scene?

 

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 2 of 5
(5,504 Views)

Yeah, that's what I thought. 
I doubt illumination can be better, at least for the moment being. I have been fiddling around and managed to sort of locate the object:

Binary.PNG

the XYZ info is contained in the .txt file. Open the "Load info.vi", set the file path to the .txt file and run it. 

 

BTW, I already sorted away some of the points out of interest. I set it to ignore points further away than 1400 mm:
Depth_sorted.PNG

0 Kudos
Message 3 of 5
(5,501 Views)

Hello,

 

getting error on the Vision Acquisition Assistant. I see no 3D data displayed.

 

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

Oh, just set a filepath to a random image, then it should work. 
The 3D data should be displayed in the 3D picture indicator. 

0 Kudos
Message 5 of 5
(5,454 Views)