From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3d graph write mpeg

Solved!
Go to solution

Hi is there a general way to convert a 3d graph into a mpeg video?

i already have a vi that can convert a polar plot image into a video i was just wondering if it was possible for 3d plots?

 

so in other words:

can you convert directly or

can you convert a 3d plot into an colour map image??

 

Help!!

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

I am sorry to be the bearer of bad news John, but I do not think there is any easy way to do this. I can see how is was fairly easy to do with the polar plots, as they return picture data types. However, the 3D control is an activeX embedded object, which makes life a little more difficult.

 

I do have a suggestion for you, although it is far from ideal. You could use a property node (implicitly linked with the front panel 3Dgraph)  to save a series of jpgs to disk. (see attachment). Once you have the image set, you could convert these to an avi. There is plenty of software available to do this - much of it seems to be freeware, just have a hunt around. If you had to compress the movie, you could convert the avi to mpeg.  

 

This method would be easy enough to implement.... however, I must issue a word of warning, exporting images of front panel objects (or of the front panel itself) is processor heavy. You will have to implement plenty of execution timing to get away with using this method. 

 

Hope this is of some use to you,

Best wishes,

Message Edited by RER on 10-20-2008 06:11 AM
Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/
0 Kudos
Message 2 of 8
(3,552 Views)

Hi Rich, good idea on the jpeg extraction, i have a feeling that i might be able to get labview to do the conversion from jpeg to mpeg - i recall i have done it before, and as you said it is indeed processor heavy.

I'll give it a go and keep the thread upto date.

John P.

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

If you manage to implement the conversion routine in LabVIEW, please post your code. I (and, undoubtedly, many others) would be very interested in seeing it!

Thanks alot!

Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/
0 Kudos
Message 4 of 8
(3,527 Views)

Hi, where did you get the icon for 'get image'

is it a property node from the 3d [right click/property node/etc...]??

because i can't find it, also i'm running lv8.2 - is that why i can't find it?

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

I have just implimented the same code it in 8.2, so the option is indeed there. "Get Image" is actually an operation (as opposed to than a property), so you need to create an invoke node rather than a property node.


Hope that was helpful.

Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/
0 Kudos
Message 6 of 8
(3,511 Views)
Solution
Accepted by topic author John Pierson

right i *think* i have it working.

 

firstly do as the example shows above and draw the 'get iamge' from the property node as Rich R said.

Then you take this image and send it via the 'draw flattened pixmap' vi

then send this through 'picture to pixmap' vi

draw out the shown properties for use in array sizing, send the image data to a 'decimate 1d array' and it'll give you 3 outputs

tehn send it through 'Index and bundle cluster array' vi, then IMAQ colurvaluetointeger, 

reshape the array as shown, 

create a new imageto write to and apply '

the next part shown on the diagramn can be skipped [i'm entering data values for each possition - not required'

 then convert using: IMAQ write frame, and ensure binning the original image as it will rapidly reduce processor speed when they pile up

 

The other part is setting up the IMAQ Avi create and the setting for codecs from your own set can get using 'get codec list vi'

 

YES! i do realise this is way over the top for a description but it works, and i'll convert the code for a more simple example when i iron out the little problems [file size being the main, working on which codec works the best atm]

 

If you would like the vi quick, reply here and i'll make it a priority, otherwise i'll get around to it adventually. i would give a video example now but they are just to big to load onto the forums. I'll try and convert them for youtube if people would like a visual example.

 

Chears for help Rich R

John P.

Message 7 of 8
(3,490 Views)

Right i DO have it working, and i have a simple example modified from the internal help file for a plot of the sine wave, if anyone needs help or modifications to what is here then don't hesitate to ask on the thread!

 

See attached example!

Message 8 of 8
(3,466 Views)