LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Image to 3D

Solved!
Go to solution

A Person.

 

You have been a great help. I reworked the code and now it is a "billion" times faster. Here it is. 

 

Thanks so much!

 

Now, my next goal, is to read an image (jpeg or bmp) and get the pixel data using LabVIEW instead of using ImageJ. Then using this code get the image to 3D

 

 

Cheers

 

 

Download All
0 Kudos
Message 11 of 15
(1,268 Views)

Glad I can help out!

 

If you want to read in pixel data using LabVIEW, you should be able to use the  Graphics Formats VIs but I would recommend the NI-IMAQ driver which is part of Vision Acquisition Software.  If you install Vision Acquisition Software, make sure you deselect NI-IMAQdx from the products to install as it requires a license and won't be beneficial to you in your appliation.

 

Once you get it installed, you will only need three functions, IMAQ Create, IMAQ ReadFile, and IMAQ ImageToArray.  This will output a 2D array of your pixel intensity values that you can plot in your 3D graph.

 

Let me know if you have any further questions.

Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 12 of 15
(1,251 Views)

Hello,

 

I do have another question. I don't understand how to adjust the properties of the ActiveX 3D graph/display function block.

 

I'd like to manually set the z-axis scale, thereby the colour spectrum vi will according adjust, so that if there is a maximum pixel value then the graph will display red.  

 

At the moment, the graph is set to auto scale there for the maximum value of the data set will make the maximum of the graph.

 

Any thoughts?

 

Cheers

 

K

0 Kudos
Message 13 of 15
(1,235 Views)

Hello,

 

After some mucking around and researching what exactly a property node/invoke node was, I was able to define the Z-Axis caption, minimum and maximum values for the 3D surface plot in the code. 

 

I've also been able to refine the code a bit more and to have labview do most of the work. 

 

Now the only problem I have is the colour spectrum. 

 

Basically, I want to manually adjust the colour spectrum scale so that I set the limits and not LabVIEW. I found the menu by right clicking on the graph>CW3DGraph>Properties. Then, clicked on the "Plot" tab, and next to the drop down scroll box there is a button that says Edit.

 

I think I found the correct properity node, but have no idea how to manually edit it. I've tried tp attach an array of the values I want, but I only end up with black and red. 

 

Any thoughts?

 

Cheers

 

K

0 Kudos
Message 14 of 15
(1,204 Views)

Kamilan wrote:

Hello,

 

After some mucking around and researching what exactly a property node/invoke node was, I was able to define the Z-Axis caption, minimum and maximum values for the 3D surface plot in the code. 

 

I've also been able to refine the code a bit more and to have labview do most of the work. 

 

Now the only problem I have is the colour spectrum. 

 

Basically, I want to manually adjust the colour spectrum scale so that I set the limits and not LabVIEW. I found the menu by right clicking on the graph>CW3DGraph>Properties. Then, clicked on the "Plot" tab, and next to the drop down scroll box there is a button that says Edit.

 

I think I found the correct properity node, but have no idea how to manually edit it. I've tried tp attach an array of the values I want, but I only end up with black and red. 

 

Any thoughts?

 

Cheers

 

K


 

 

See this thread starting at reply #7. This is a preview.

 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 15 of 15
(1,185 Views)