Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

how to measure the dimension and geometry of different objects by using kinect xbox 360

Solved!
Go to solution

Hi,

 

I was trying to create a code to identify dimensions and geometry of the different objects. I am using Kinethisea Toolkit and NI vision but was unsuccessful in creating the code.

 

Does anybody has the code for it or any suggestions how to proceed towards it ?

 

Regards,

Kashish Dhal

0 Kudos
Message 1 of 8
(4,450 Views)

Hi Kashish,

What do you have so far? Have you been able to acquire images from the camera yet? I would start there. Once you have them, they could be stored into image files that can be used to build your vision algorithm using Vision Assistant. You might want to play with some of the functions on the Machine Vision palette.

 

VA MV.PNG

 

Once you have a good approximation of your algorithm, you could generate LabVIEW code from Vision Assistant and integrate it with the code of the acquisition.

 

Regards,

And G

0 Kudos
Message 2 of 8
(4,392 Views)

I am attaching the code that I am using so far for my project.

 

I will be learning the vision assistant as suggested by you. However, if you can give more suggestion regarding the edge detection and measurement specific to my code, I will appreciate that.

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

Hi Kashish,

What specific edges and measurements you want to take? Maybe you can attach some of the images you already have acquired indicating what you would like to extract from them.

 

Regards,

And G

0 Kudos
Message 4 of 8
(4,367 Views)
Dear And G, Thank you for your quick reply. I am working on a project to identify the geometries and dimensions of different objects which come in the way of the robot. As is evident from the code I uploaded, I am using NI Vission Assistant as suggested by you. I captured two different images from Kinect Camera of which one was a ruler and other was a circle. Ruler image was used to calibrate and measure the dimension of the circle in the second picture. I am already able to calculate the dimensions of the objects from the image if that image and calibration image are captured at the same distance from the camera. However, as we know that Kinect Camera has both depth and color sensors. So, I want to use the depth sensor first to calculate the distance of the object from the camera and then using that information to calibrate our camera around that focal length in the real world dimensions (mm or cm). But, first, we need to identify the geometry of the object before, calibrating our camera. After the identification of geometry and distance between the object and the camera, we can go for calibration and then the calculation of the dimension of objects. I will appreciate if you can give suggestions in this regard. Also, please tell me that we need 2 cameras for this project or is it possible to do by using one Kinect camera? Regards, Kashish Dhal
0 Kudos
Message 5 of 8
(4,359 Views)

And these edges may be the edges of bottle, cup or a spherical ball.

0 Kudos
Message 6 of 8
(4,358 Views)
Solution
Accepted by topic author Kashish

Hi Kashish,

What I meant before was taking advantage of the Vision Assistant to quickly develop your algorithm and not necessarily integrating the Express VI itself into your code. The Vision Assistant can be launched by itself without LabVIEW. This application is installed at: C:\Program Files (x86)\National Instruments\Vision Assistant. You can load image files previously saved to quickly tweak the main parts of your algorithm. Once every piece of the algorithm is completed and tested you can convert it to LabVIEW code by going to Tools >> Create LabVIEW VI.

 

It wasn’t clear to me what the challenge for you is at this moment. Is it identifying the geometry of the object? Are the number of geometries to identify somehow limited? Could you use Pattern or Geometric matching?

 

pattern anfd geometric.PNG

0 Kudos
Message 7 of 8
(4,336 Views)

Hi,

 

Now, I used something else. There is a software named Skanect, which by using Kinect can generate .stl file. And .stl file can be imported to Labview to identify the geometry. 

 

But I am still working to measure the dimension as these dimensions can be measured in SolidWorks but I am trying to figure out how to measure them in LabVIEW.

 

I am adding an image where I tried to scan myself and generated CAD file and further imported in LAbVIEW. However, still trying to measure its dimensions.

 

Regards,

Kashish Dhal

0 Kudos
Message 8 of 8
(4,289 Views)