02-27-2009 05:12 AM
We need to do an inspection with 5 cameras and one of the requirements is to store the last 100 error images cyclically for each of the cameras. Is this possible using NI Smart Cameras, i.e. by saving the images through an FTP server with a generated name (sequentially numbered or with a time stamp in the name)? Some background process running on the PC could keep the number at 100 images
Best regards,
Peter
02-27-2009 07:41 AM
My approach would be to convert the image to a JPEG string on the camera side, using whatever compression level is acceptable. Send the string using FTP to a server program on the PC that saves it in an image file with a two digit sequential number. The number should increment and rollover at 100 to keep two digits. This will automatically overwrite the oldest image. You could save the last number on exit to keep the numbering good. The only problem with this method is that you can wear out your drive if you are writing a large number of images in the same place over and over again. Perhaps it would take so long that it would be insignificant. The disk access time could also be an issue if you are inspecting rapidly (several times a second).
An alternative method would be to store the JPEG strings in an array. Each time you get a new image, rotate the array by one element and store the image in the first element. Your array will always have the most recent 100 images in the correct order. Save the array when you exit the program, either as a single file (much faster) or as individual images (very slow). Provide an option to save the individual images if they are needed.
Bruce
06-04-2010 03:43 PM
Hi, I've been searching how to achieve save images via FTP with a Smart Camera (NI 1742). I found this article:
Streaming Images from a Compact Vision System or Smart Camera
and I can to save an AVI file with the images acquired. I use the VI recommended on the article:
and the second part:
As I'm a beginner in LabView, I'd like you help me to change this VI to save one by one the images acquired with names like 00001.jpg, 00002.jpg doing this automatically. I think I need to delete the AVI VI's but honestly I don't know how to proceed for save individual images.
Thank you very much for any help.
Bebin