10-19-2018 01:32 PM
@Shredderofmass2 wrote:
The question is explicit and explained here more than once in great detail. You don't have an answer or even an idea. And yet you post again with a non answer.
Uhhhh, they are two different people.
10-19-2018 01:36 PM
The image looks right in paint. I tried saving as a 24 bit BMP and a couple other formats. Paint scaled it down to an 8 bit image which appeared to be scaled well.
1) Save Data from a 12 bit camera. Saved with Labview vision 2015 as a U16 image.
2) Open with Labview. Perfect o to 4095 values.
3) Open with paint. Looks good. Save as a 24 bit BMP. Paint scales it down to an 8 bit. But its paint so I didn't expect much.
4) Open it in Matlab. Matlab scales it to full dynamic range of 16 bits. I cannot trust any scaling because slight nuances in the image matter, scaling and camera gain are critical parts of the experiment.
I am hoping that there is a way to either change the Labview saving such that it works well with matlab or find the secret code in Matlab to get it right.
I guess I will download GIMP to see what that does.
Thanks
10-19-2018 01:37 PM
@RavensFan wrote:
@Shredderofmass2 wrote:
The question is explicit and explained here more than once in great detail. You don't have an answer or even an idea. And yet you post again with a non answer.
Uhhhh, they are two different people.
And from 9+ years ago...
10-19-2018 01:38 PM
Yeah,
I caught that. One had a suggestion the other did not.
Thanks
10-19-2018 01:44 PM
@Shredderofmass2 wrote:
The image looks right in paint. I tried saving as a 24 bit BMP and a couple other formats. Paint scaled it down to an 8 bit image which appeared to be scaled well.
1) Save Data from a 12 bit camera. Saved with Labview vision 2015 as a U16 image.
2) Open with Labview. Perfect o to 4095 values.
3) Open with paint. Looks good. Save as a 24 bit BMP. Paint scales it down to an 8 bit. But its paint so I didn't expect much.
4) Open it in Matlab. Matlab scales it to full dynamic range of 16 bits. I cannot trust any scaling because slight nuances in the image matter, scaling and camera gain are critical parts of the experiment.
I am hoping that there is a way to either change the Labview saving such that it works well with matlab or find the secret code in Matlab to get it right.
I guess I will download GIMP to see what that does.
Thanks
So if everything you are looking at is showing that LabVIEW is working fine and Matlab has the problem, why do you expect that something should change in LabVIEW to fix the Matlab problem?
10-19-2018 04:23 PM
This original discussion is 9 years and a lot of things have probably changed, both in LabVIEW and Matlab. There is a CAR listed above somewhere. Contact NI to see what the status is. We cannot help you with that.
10-19-2018 05:10 PM
@RavensFan wrote:
@Shredderofmass2 wrote:
The image looks right in paint. I tried saving as a 24 bit BMP and a couple other formats. Paint scaled it down to an 8 bit image which appeared to be scaled well.
1) Save Data from a 12 bit camera. Saved with Labview vision 2015 as a U16 image.
2) Open with Labview. Perfect o to 4095 values.
So if everything you are looking at is showing that LabVIEW is working fine and Matlab has the problem, why do you expect that something should change in LabVIEW to fix the Matlab problem?
Agreed, I don't see an issue here with LV. LV saves it perfectly. There isn't much else that LV can do to help you. When you read it with MATLAB then it "adjusts" the image. You need to find out how to read raw image without scaling in MATLAB and folks here can't help you with that. This doesn't sound like exactly a bug in LV which is doing what you expect and what you want.
Other 3rd party utilities can't help if MATLAB is going to rescale the image and give you not the raw data that you want.
10-20-2018 01:22 AM
I found the best workaround is to save as jp2 instead of png in LabVIEW. It is also lossless, supports 16bit data and it avoids the different interpretations of the png spec between NI and others like Mathworks.
10-22-2018 07:05 AM - edited 10-22-2018 07:08 AM
I found the best workaround is to save as jp2 instead of png in LabVIEW. It is also lossless, supports 16bit data and it avoids the different interpretations of the png spec between NI and others like Mathworks.
That sounds promising. I am going to fire up matlab and give that a try.
The lossless compression is important, these data sets get huge. Even shaving 25% from the total volume is a big advantage.
10-22-2018 09:14 AM