09-05-2011 08:38 AM
Hello, i need a help for my problem.
I'm using the Labview to do the image processing from images taken with a NI câmera. The image processing is working, but i need to save some sequencial images (with a certain time between the acquisitions) in the computer to comparate them after all the acquisitions.
The VI that i´m doing is on the real-time module and the VI is in the Project Explorer >> Câmera.
Thank you
And sorry for my english =]
09-05-2011 08:43 AM
Hello,
Correct me if I misunderstood, your image processing application is running on an NI SmartCam and you don't know how to save images to the host computer, is that it?
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
09-05-2011 08:55 AM
Exactly =]
09-05-2011 09:08 AM
Right, I see 2 options (there might be more) :
- if you have an FTP server that you can run on your host PC (for instance FileZilla Server) then you can use the ftp functions in LabVIEW to save the images in your application that runs on the SmartCam, this may slow down your process a bit though. This would be an easy way if you don't mind slowing down your application a little bit.
- if you don't want to slow down your camera too much (or can't use a FTP server on you host computer) then you will have to create another application that will run on the host PC and receive the images from the SmartCam to save them on the host computer, to do that the easiest mechanism is probably shared variables but you can also use other mechanisms (TCP, data socket, VI Server).
In any case, note that depending on how you implement the image transfer on the SmartCam side you will slow down your application by a very different factor. Let me clarify :
- if you do everything "in line" : Acquire image >> process image >> save image via FTP / transfer image to PC your application will slow down a lot
- if you do the save / transfer in parallel, you will slow down your application a lot less, but of course that's more tricky to code up.
Hope this helps you a bit.
PS: check the example (Help >> Find Examples) I'm sure there are examples in LabVIEW to help you learn how to transfer data between RT target and host PC.
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
09-06-2011 02:56 PM
Hi
I tried to do what you said about creating a shared variable to transfer the image from the camera to the host, but i cant find how to create a image variable. I tried to create the variable with the type Variant but i didnt work.
I'm sending a image from my project until now.
Could you help me?
Thank you
09-06-2011 03:12 PM
Also, I looked for the example you said, but, when I ran it, this error appeared:
Error -1074395313 occurred at an unidentified locationPossible reason(s):IMAQ Vision: (Hex 0xBFF6074F) Writing files is not supported on this device.
Do you have any idea of what this means?
Thanks
09-08-2011 11:12 AM - edited 09-08-2011 11:16 AM
Good afternoon,
Here are some guidelines that can be made below. Any questions please contact us.
The ability to write images to non-volatile memory on the CompactRIO is disabled to increase the lifespan of the memory. As a result, the recommended way to log images is to transfer them to a host PC through FTP.
If a networked host PC is not available and you must log images to the CompactRIO you can use the Write to String and Write to Text File VIs as shown below.
Depending one the file format desired, the convert EOL on the Write to String VI option may need to be added or removed.
http://digital.ni.com/public.nsf/allkb/4384D228C02AE46986256E71007F5DF9
Sincerely,