LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I am able to extarct data point from 3D surface.

Hello
I develop a 3D laser surface scanning device for surface defect or surface roughness detection. But I have a problem to extract data point from 3d surface. I am getting a 3D surface after completing the scanning by the device now I want to measure surface roughness from the 3D surface for that I have to get data point or co-ordinate from the surface along a line. Can any one help me how can I am able to get data point from 3D surface. Here I attach a 3D data file.
Thanks
Kamal
0 Kudos
Message 1 of 8
(3,423 Views)
It seems odd, but I don't see a "Data" property anywhere under in the object hierarchy for a 3D graph. Maybe someone else knows if you can easily extract the underlying data from the graph object. One painstaking way to do it is by using a cursor on the graph; see attached example for getting an interactive surface profile with this approach.

I have to ask, though: is your data really only available as bits embedded in this particular 3D graph control? Whoever created the control must have done it from LabVIEW by feeding a data array into one of the Plot methods for the 3D graph object. The data must exist external to the control, maybe in a binary file.

That data should be easy to read into a LabVIEW 2D array by reading the source file with LabVIEW's file I/O primitives, and then you could easily get surface profiles along two axes by using the Index Array primitive. Getting profiles along arbitrary axes would require more work in LabVIEW, but is natively supported with the IMAQ Vision add-on.

--John
Message 2 of 8
(3,413 Views)
Hi Call... and Johnner,

You reply inspired a similar approach where I set the index of the cursor and get the point value.

I am guessing that this is a 120 X 120 array.

The attached zip has a jpg of the code as well as a LV 7.1 example.

Note:
This runs alot faster if you minimize the screen while it is running.

I agree that this a less than ideal way of sharing data.


Thank you for the idea and fun!

Ben

PS: After writing this I looked at your example Johnner. It is funny that you also choose to do a surface with countour lines.
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 8
(3,395 Views)
Hi Ben
Thanks for your suggestion. I try according to your suggestion but it shows error in second invoke node. I send a bmp file of the block diagram. I am using LV7.
Your idea is correct it is 120*120 array but I have to use different size of array.

Hello Jon
I am unable to open your vi because I am using lv7.
Thanks for suggestion
Kamal
0 Kudos
Message 4 of 8
(3,369 Views)
Hi Ben
Thanks for your suggestion. I try according to your suggestion but it shows error in second invoke node. I send a bmp file of the block diagram. I am using LV7.
Your idea is correct it is 120*120 array but I have to use different size of array.

Hello Jon
I am unable to open your vi because I am using lv7.
Thanks for suggestion
Kamal
0 Kudos
Message 5 of 8
(3,369 Views)
Hi Call...,

When you post images could you please post them as "jpg"?

Bmp's just take up to much bandwidth!

I am guessing that is because you have not added a cursor to the graph.

Here is the code as LV 7.0.

It is entertaining to watch but is a very slow approach unless the screen is minimized durring the run.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 8
(3,365 Views)
Hello Ben
Thanks for quick reply. My code is same as your code. Your code is running but in array it’s showing zero value. I think value has to change according to curser movement.
Please help me.
Thanks
Kamal
0 Kudos
Message 7 of 8
(3,363 Views)
Just let the code run.

It only populates the outputs after all of the data values have been read.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 8
(3,356 Views)