LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Image not diplsaying

Hi,

 

Thanks for all the help so far. I am trying to display an image from a camera but at the moment all I am getting is a fuzzy grey image. I've used the GetValueByPointer xnode to take the image from the buffer into an array and then used IMAQ ArrayToImage.

The image type is currently set as Grayscale U16 as this is the type of the array coming out of the loops, and I think that this may be wrong, but I'm not sure what I need to do to change it or even if this is the issue.

 

I am using LabVIEW 13.

 

Any help will be greatly appreaciated,

 

Cortina

0 Kudos
Message 1 of 10
(2,665 Views)

Please attach the VI (or VIs) that you are using so we can really see and understand what you are doing.  What kind of Camera are you using?  Can you "see" the Camera in MAX?  Can MAX "Snap" an Image for you?

 

If the answer to the last two questions is "Yes", then it is only a matter of fixing the software (and we need to have your code available to do it "for free").  I would definitely suggest using IMAQ code to get your images, not an XNode and array manipulations.

 

LabVIEW 2013 is a bit old, and if my memory is correct, represents the time NI switched how it handle Image Acquisition and processing (for example, going from AVI functions to AVI2).  Nevertheless, you should have no trouble getting images with LabVIEW 2013 (I've done it, but am now using more recent versions of LabVIEW).

 

Bob Schor

0 Kudos
Message 2 of 10
(2,621 Views)

Hi Bob,

 

Thanks for replying. I don't know if I am allowed to post the whole VI but I will try and explain more clearly what I'm doing.

I am using and atik camera and the AtikCameras.dll to get the images, this saves the image into a buffer. The issue I had before was getting the image out of the buffer to somewhere I could use it. I found this and tried using moveblock but couldn't seem to get it to work, but the GetValueByPointer xnode got me something out. I know that the image I am getting out as if I change the exposure then the image does change.

I need to display the image so I can get the user to select a ROI. (The code after I have got all working- it's just the image display that is not quite right.)

 

I am very new to LabVIEW and if there is a better way to extract the image I would gladly hear it.

 

Thanks for your help so far,

 

Cortina

0 Kudos
Message 3 of 10
(2,603 Views)

I don't know if it's any help but I found this old tutorial that may be helpful. I have not messed with IMAQ much. The turtorial seems like a good general approach which you may have already taken in other parts of the code than what you posted.

 

http://www.pages.drexel.edu/~rs429/dasl/basicIMAQ/

 

I guess my initial question is are you sure your buffer is the correct data type for the camera and where are resolution and other image settings be set?

0 Kudos
Message 4 of 10
(2,589 Views)

Hi, 

Thanks for the tutorial, I had a look but I don't seem to have access to the IMAQ USB VIs. I have attached the guide for the dll I am using.

 

The VI for saving the image into a buffer is part of the sdk for the atik camera so I'm fairly confident that that data type is correct. Resolution can be set with the ArtemisProperties.

 

Cortina

0 Kudos
Message 5 of 10
(2,543 Views)

"The VIs are part of the vendor supplied driver and so I'm sure there are no problems".

 

I wish I was still so optimistic about third-party LabVIEW drivers...


GCentral
0 Kudos
Message 6 of 10
(2,529 Views)

Have you tried asking the camera manufacturer for vi's to control the camera in LabVIEW

www.atik-cameras.com/question/support-labview/

0 Kudos
Message 7 of 10
(2,526 Views)

Hi Ken,

 

Thanks for your suggestion however, I can control the camera and am getting something out of it, but the image being displayed is not correct. The only VI I have access to saves these images into a buffer. I think that the reason is because when taking retrieving the image from the buffer I am using the wrong data type. However I do not know enough about labview to work out how to solve this (or indeed if this is the problem)

 

Cortina

0 Kudos
Message 8 of 10
(2,515 Views)

Hi Cortina,

 

It would help if you could extract the piece of code that is saving the images to the buffer. What you should also find out what the pixel depth of the camera is (e.g. U8, U16).

 

That being said, your code is probably using the GetValueByPointer.xnode wrong. The article you linked on Dereferencing Arrays mentions that 2D arrays are different from 1D arrays.

Your codeYour codeExample in articleExample in article

 

I think it would be easiest to use to use the MoveBlock call like this. Note that in the case of U8 pixels you will need to set the necessary representations.

 

snip.png

0 Kudos
Message 9 of 10
(2,497 Views)

Atik says that they have VIs that will allow their Cameras to be used with LabVIEW.  In 2014, they apparently realized that this was important, so you'd think that five years later, they'd have developed something that would allow their hardware to be used with NI software.

 

If you want to do Image Processing from cameras with LabVIEW, you should really look into the Vision Development Toolkit and the Vision Acquisition Software (the IMAQ and IMAQdx drivers and processing VIs).  If you want us to help you get the data out of your Atik camera, and you have the VIs that Atik says they provide, gather those VIs into a folder, along with any documentation, compress the folder, and attach it so we can see if we have any useful suggestions on how better to use it.

 

Without a little help and information from you, there's not much we can do for you.

 

Bob Schor

Message 10 of 10
(2,479 Views)