LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCV vs Labview Images Greyscale (U16) - Difference in values

Solved!
Go to solution
Solution
Accepted by kirkland77

ok, this is happening already when the images are loaded 

notice, the whole "stitching" is happening trough the "tunnel mode: concatenate" - this has no effect at all.

 

alexderjuengere_1-1629227075262.png

 

 

 

I have no idea why this is happening, but there must be some kind of image-processing in the imaq sub.vis involved.

 

alexderjuengere_2-1629227901353.png

 

 

I guess its some process step either in imaq read or imaq imagetoarray - both subvis are wrapping dll calls ... so, I can't dig deeper

 

 

 

 

 

 

Message 11 of 16
(1,273 Views)

So, IMAQ is incorrect for rescaling these values, as when we read images, we shouldn't have the pixel values changes automatically. I have tried to determine if there is some arbitrary threshold that IMAQ uses to decided to scale, however, I was not able to narrow anything down. Based of the histogram it appears to use a factor of 130,000 to scale the values down but that could be subjective to this image. So, should I use Python instead of IMAQ when trying to join images in LabView, due to its unpredictable behavior?

0 Kudos
Message 12 of 16
(1,267 Views)

I can picture ( 😉 ) two use-cases:

the imaq images "looks" better, but the  python-opencv imaqs is more "acurate"

 

 

 

 

0 Kudos
Message 13 of 16
(1,263 Views)

My thoughts as well. Cheers @alexderjuengere 😀

0 Kudos
Message 14 of 16
(1,259 Views)

I had to look at this again ... there is obviously some histogram matching - with reference to the first image - going on in imaq.

https://en.wikipedia.org/wiki/Histogram_matching

 

I tried a quick attempt to reproduce the histogram matching, but I probably just use imaq, if I ever need this.

this might be an actual use case for those tensorflow neural nets ... nevermind.

 

alexderjuengere_0-1629295913371.png

 

 

alexderjuengere_1-1629295946773.png

 

 

 

 

Message 15 of 16
(1,232 Views)

maybe I need this again

0 Kudos
Message 16 of 16
(1,202 Views)