11-12-2009 05:35 PM
Hi
I have attached the code, in which i am having a problem.
I am controlling a 1394 cam and a motor. the cam is Guppy_F146B (http://www.adept.net.au/cameras/avt/pdf/Guppy_F146BC.pdf) datasheet
My question is it the part of the code where i am calculating SNR i am looking at the min and max in the image,
and it shows negative numbers even when the cam is set for mono unsigned 8-bit.(MAX setting pic attached) but the image ia acutally 16 bit when i checked in Matlab (unsigned)
And where i am writing the image with [Image Write File 2] in the code it works only when i set it to PNG.
The IMAQ image to array flx gives output only on the Image pixels (I16) terminals.
I dont know my SNR is write or wrong because of the negative max and mean. SNR= 20log10{[max(image) - min(image)]/std(image]}.
Thanks
AKSHAY CHAVAN
11-13-2009 01:05 PM
Hey Akshay,
There are a couple of things that I would like to point out here. First, you have some wasted logic in your program. For example, you have a For Loop with a constant 1 wired to it. This would be the same as not having the For loop in the first place (it is creating a array that then sets the number of loops for the second For loop). It may fit into your program in terms of expandability, but it is still wasted logic.
Second, is there a reason why you choose to use the IMAQ for 1394 driver instead of the IMAQdx driver? Third, and more relevant point. I am not sure why your images are considered I16 when everything you have done suggests that the image should be a U8 (settings in MAX and the buffer you are creating). However, I would be interested in finding out the image file type the Image Display indicator suggests. Also, if you us the IMAQ property node (Image type property) to query the Image type throughout your program. Lastly, could you use the IMAQ Cast Image.vi to force your image type from an I16 to a U8 prior to using the IMAQ Image to Array.vi
11-16-2009 11:46 AM
hi
now there is another problem. MAX does not shows the cam with any of the drivers except for the AVT driver, on which the cam wont work through the code.
I had this discussion with other NI application engg on which driver to use, but i am still confused, tell me which one to use and i shall use any one that has good compatiblity, and please let me know why.
Thanks about the cast image.vi i shall use it, i just did not knew about it.
regarding the for loop i am gonna take more images according to the output fromthe snr calculation.
Thanks
AKSHAY CHAVAN
11-17-2009 01:24 PM
Hi
I am using IMAQdx driver now. and even cast image.vi
but still am getting output at the I16 terminal of the Image to array.vi , and the max and the min values are negative.
AKSHAY CHAVAN
11-17-2009 06:14 PM
Hi Akshay,
Try specifying a U8 Image Type in the IMAQ create. I'll take a closer look at the code but this is the first thing that jumped out at me.
KristenH.
11-18-2009 11:37 AM
Akshay,
I read through your post and reviewed your code again and clarified in my mind what you were asking. Take a look at this KnowledgeBase about 16-bit images. I think this might clear some things up regarding the negative max and min values. Post back if you have more questions
Kristen H.