LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

lv 8.2 grab image

Dear Reut,

From your earlier posts I assume that you are using an external trigger that you supply from another source. Are you asking which number to supply to the "Line Number" input of the IMAQ Configure Trigger3 VI? This will correspond to which physical line on your framegrabber you attach the trigger signal to. You will also want to make sure to configure the other inputs to this VI correctly, such as "action", "type", and "Frame timeout (ms)". Detailed descriptions of these inputs can be found in the detailed help for the IMAQ Configure Trigger3 VI.

Without further details on which VIs you are using from the IMAQ driver, which framegrabber you are using, and what the requirements will be for you triggered acquisition, I cannot comment any further on how to set up the triggered acquisition. If you need more help, please post back with further information, and I'll be glad to help!

Best Regards,

~Nate



0 Kudos
Message 21 of 54
(1,863 Views)
Hi Nat
thanks for your help,
well i had some techniques prblems lately, but i solve it and now i can start work again.
so i used with your code of natgrab and save and i made few changes that it will suit to my needs,  i can see the image but i got an error window that i am using with incompatible type, i download avi to my computer so i am not understanding what is the reason for this error
if you any idea, maybe i missed something in the code
+what kind of details do u need?
my NI card is pci-1424i am working with NI assitant 8.2.3 (i able to see the picture in measurments and automation>interface and devices but cannot control with the external trigger)
Lab view 8.0
camera- megaplus camera model ES-4.0
external trigger- tektronix tds 224 (i set the acqusition parameter that i  need)


P.S. i thought to use with mage acqusition in Matlab,(InstalledAdaptors: {'coreco'  'ni'  'winvideo'}
        MATLABVersion: '7.5 (R2007b)'
          ToolboxName: 'Image Acquisition Toolbox'
       ToolboxVersion: '3.0 (R2007b)'
)
but i got the message :There are no devices installed for the specified ADAPTORNAME. See IMAQHWINFO.
so i have no clue why i matlab didnt recognize the device, while measurments and automation did.
if someone has any clue in this area i will be happy to get help

thanks a lot
Reut
0 Kudos
Message 22 of 54
(1,835 Views)
Dear Reut,

Thank you for the additional information about your hardware, it is very helpful. Can you tell me at which VI in your code the error occurs? What exactly is the error number and message that you are seeing? If you can attach the most recent version of your VI, I'll see if I can replicate the behavior here on my computer.

How do you have your external trigger signal set up? Are you connecting a BNC cable from your Tektronix to the trigger input on the back of the camera or are you using the digital connector?  Have you set the trigger source and polarity in you camera attributes? From the ES 4.0/E manual, Page 3-5

"There is two trigger inputs: the SMA connector on the rear panel of the camera (labeled TRIGGER), and the EXPOSE input carried by the digital interface connector. The camera will only respond to the selected source."

The MegaPlus Model ES 4.0/E Camera User’s Manual
http://www.roper.co.jp/redlake/Manuals/ES4-0e_manual.pdf

Unfortunately, I do not have the expertise to help you troubleshoot using a 3rd party driver or software to acquire from your camera. Hopefully I'll be able to provide some useful suggestions to you once I look at your VI.

Please post back with your code and check your trigger setup, hopefully we'll be able to get things working!

Best Regards,

~Nate
0 Kudos
Message 23 of 54
(1,813 Views)
Hi Nate
wow , you help me so much . thanks for being there
well i installed labview 8.2 as well(so i have now the acsess for both 8.0 & 8.2).
i will try to fix my first code that inculding my external trigger. so actually i would like to add the grab and save to avi to this code (or secquences and save..) if you can to help me with that it will be wonderfull.
the most recent version of your VI: is the NI 8.2.3 lab view either 8.0 or 8.2.1.1
i
have your external trigger signal set up by a BNC cable from your Tektronix to the trigger input on the back of the camera (its recognize the trigger when i am using the attached file)
any way when i am using the lab view 8.0 *(Reut grab and save.vi) and  try to sequences and save to avi file the error is:
Error -1074396077 occurred at IMAQ AVI Write Frame
  Incompatible image type.
and when i am grabbing and saving to avi the error is:
Error -1074396077 occurred at IMAQ AVI Write Frame
  Incompatible image type.

when i am using with the vi code that you sent to me the error is:
Error -1074396077 occurred at IMAQ AVI Write Frame
  Incompatible image type.

so the same error repeat, and i can not understand why is it ncompatible image type. (i download avi to my computer, what should i download more?)

when i am using the lab view 8.2 (HL grab.vi) i able to use with my trigger but again just for snap a shot, and i am intersting on grabbing/secquences.
what do u think? if u need more info lmk
 Nate, thank youSmiley Happy
Reut

Download All
0 Kudos
Message 24 of 54
(1,802 Views)
Dear Reut,

Thanks for the additional information about the errors! If you look at the detailed help for IMAQ AVI Write Frame, you will see that the input image must be either an 8-bit or RBG image. You can make sure that one of these images types is being passed to the IMAQ AVI Write Frame VI by using the IMAQ GetImageInfo VI to determine what type of image that your camera returns, and use the IMAQ Cast Image VI to convert the image to the right type.

You could alternatively use a property node to return the ImageType.

I think once you cast the image to the right type before sending it to the AVI Write Frame, you won't get this error anymore.

Best Regards,

~Nate
0 Kudos
Message 25 of 54
(1,789 Views)
Dear Nate
recording to the error that i got,i will try to use with the application of  ' IMAQ Write PNG File '  because it says that it able to save a signed 16-bit image in a PNG file (and my camera image type is 0f 16 bit) ,should i connect the wire to ' IMAQ Create' ( can it be in the same concept of grabe and save to avi just with the changes of png?) 
in general do you think that this is right choice to solve my problem?
thanks
Reut
0 Kudos
Message 26 of 54
(1,765 Views)
Hi Reut,

You can save the images you acquire to disk in the PNG file format, but unless you include a method to programatically change the name of the file you pass to IMAQ Write File 2 each iteration of the loop, you will just keep saving your images to the same location, and end up with one image instead of a sequence of images. In any event, you will have a folder full of individual images.

You will not be able to save 16-bit images to frames of an AVI file without first converting them to 8-bit images, and you will lose information in your images in the process.

So you will have to change some things if you decide to save to PNG files instead of to one AVI file, but it ultimately depends on what you need to do with the images. Do you need an AVI file or can you use a folder of PNG files? What kind of processing are you planning on doing to the images? This will ultimately determine which method you should use to save the image data.

Saving to PNG files instead of an AVI file is not really any harder, just implemented differently. Please let me know more about what the requirements are for your application, and how you are going to be using the images after you save them. With that information we'll be able to figure out the best way to save your data.

Best Regards,

~Nate

0 Kudos
Message 27 of 54
(1,744 Views)
Hi there,
the image process will be done by CCDPIV (cross correlation digital particle image velocimetry) so i would prafer to have folder of serial of images.
as i checked the other option for saving data, i understand that PNG able to save 16 bit which is the best for me. now i just need to rewrite the code that it will fit to the PNG set up and to include my external trigger (is it available now? or should i use with delay box and synchronize the system by chossing the computer as my master?)
if you need more information lmk, for the mean time i will try to write the code
thanks a lot
ReutSmiley Wink
0 Kudos
Message 28 of 54
(1,734 Views)
p.s. i am intersting to store 16 bit intensity images wither sequentially or in one file
0 Kudos
Message 29 of 54
(1,731 Views)
the attached files are the code that i am trying to write:
1: snap and save to file- i succeed to pluged the external trigger and snap one photo and save it.
2: grab images and save to file- i tried to grab the images and save it to folder , i used with the write to file and choose to png file but i got an error : Error -1074395991 occurred at IMAQ WriteFile
  NI Vision does not support the file type you specified.
so i tried to do that directly with write png file
3:grab images and save to file png reut- its worked but the code doesnt create folder with the saved images , i need to save each image every time , so if you can please have a look whats wrong with my loop
thanks
Reut
0 Kudos
Message 30 of 54
(1,724 Views)