Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Image setting for 1394

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

 

Download All
0 Kudos
Message 1 of 6
(3,832 Views)

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

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 2 of 6
(3,812 Views)

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

0 Kudos
Message 3 of 6
(3,793 Views)

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

0 Kudos
Message 4 of 6
(3,779 Views)

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.

0 Kudos
Message 5 of 6
(3,767 Views)

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.

0 Kudos
Message 6 of 6
(3,753 Views)