11-23-2009 08:02 PM
Here are some specifications of the image acquisition and processing system:
- - DALSA line-scan camera P2-23-80k40 (9.3 kHz, 8k pixels)- - NI PCIe-1430 frame grabber board- LabVIEW 8.6- LabVIEW Real-Time Operating System 8.6.1 - Real-Time Desktop/Target PC (2.66GHz CPU (Core 2), 2GB RAM, 160GB HDD)- Host PC (2.66GHz CPU (Core 2), 3.2GB RAM, 300GB HDD)- Communication is through a 100 Mbps LAN
Any comments on this would be most appreciated.Thanks,Mostafa
11-23-2009 08:25 PM
I would start by removing or commenting out the analysis portion of the code and seeing what the frame rate is. If the frame rate goes way up, the bottleneck is the analysis. If the frame rate stays about the same, it is the acquisition.
I get the impression that you are acquiring a single line at a time. You might get a better acquisition rate if you acquire multiple lines per frame. You could use an internal loop to analyze each line of a multi-line frame.
Let us know which one is the bottleneck, and we can go from there.
Bruce
11-23-2009 10:28 PM
11-23-2009 11:40 PM
Congratulations! You have determined that the analysis is what is slowing you down. Next step... Look at the CPU usage while the program with analysis is running. If one CPU is barely being used, your program would probably benefit from some multiprocessor tricks. One trick is to get your analysis and your acquisition to run in parallel. You will have to use multiple buffers to prevent your images from being overwritten, but it could be worth the effort.
FYI, you should set the line rate to a fixed value that you know you can read with getting behind, then use "Buffer Number" instead of "Next Buffer" during acquisition. "Next Buffer" always waits for the next buffer to be completely acquired, which can slow down your acquisition rate and skips buffers. "Buffer Number" makes sure you read and analyze every buffer acquired.
You might want to study your analysis and see if you can get the results you need using faster tools. For example, Simple Edge is much faster than standard edge detection and works well if you have high contrast images.
Bruce
11-24-2009 06:55 PM