LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save image as it show on display without changing the scale

Hello there!

I am using Labview 2013 to take and save images for my measurements. However, the colorscale of the saved image is not the same as shown on display, see below. Is there a way to save the image as shown without rescaling the scale?

 

Thanks for your kind help in advance!Picture1.png

0 Kudos
Message 1 of 33
(4,285 Views)

How are you saving the image?

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 33
(4,252 Views)

Hi there! I use the 'IMAQ write file 2' VI to save the image in PNG format.

Cheers,

Raul 

0 Kudos
Message 3 of 33
(4,247 Views)

Well, I don't know IMAQ, but if you use three things, you get around it.

You need a REFERENCE to the graph.

You need an INVOKE NODE on that ref, set to GET IMAGE.

And you need an IMAGE TO PNG FILE.

 

Pic.PNG

 

You'll have to supply a file path, but this will get it done.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 33
(4,242 Views)

Hi Steve,

Thanks for your advice. but I can't get the invoke note to work, it says the selected method is invalid. There is no other method available to get the image. Do you have any idea what could be possibly wrong? Thanks.Picture2.png

0 Kudos
Message 5 of 33
(4,227 Views)

Data Flow is what is wrong. 

You need to make sure that the delete image is run AFTER the save image. 

0 Kudos
Message 6 of 33
(4,221 Views)

Thanks. I tried not run the IMQ dispose VI, but still the method is invalid.

0 Kudos
Message 7 of 33
(4,213 Views)

dkfire is exactly right.  That might be what's wrong with your original plan, as well.

Take a look at this:

Screen Shot 2017-04-25 at 9.04.31 AM.png

 

And ask yourself this question:

Which happens first: the image getting to the INVOKE NODE, or the image getting to the DELETE function?

 

If you answer that with anything except "I Don't Know", then you're wrong.

 

The INVOKE node has a duplicate image reference coming OUT of it - use that to insure that INVOKE happens BEFORE the DELETE.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 8 of 33
(4,211 Views)

To use the INVOKE node, you have to have a CONTROL REFERENCE to the actual graph.  I don't know IMAQ, but it's possible it's not allowable on an IMAQ reference.  Try using a reference to the actual display indicator.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 9 of 33
(4,209 Views)

Or simply remove that invoke node.

You don't need it, as you allready have a reference to a image in IMAQ.

You just need to make sure that you call the dispose vi AFTER the save image vi.

0 Kudos
Message 10 of 33
(4,198 Views)