12-01-2020 02:10 AM
When the program is debugging the USB camera, the saved image drops frames. What is the reason? Looking forward to your answer, thank you!The attachment is the program.
Solved! Go to Solution.
12-02-2020 05:45 PM
I'm not sure what you mean by "... the program debugging the USB camera ...". Is there a condition where frames are not dropped? What "debugging" do you do that causes the dropped frames? Do you mean "Highlight Execution"?
I notice that your images are quite large. Are they color? I also notice that there is an AVI Write function in the acquisition loop, making the loop run at the slower of the processes "Grab" and AVI Write. What if you don't write the AVI? If that seems to be OK, try using a Producer/Consumer design, where you have one loop with Grab, another loop with AVI Write, connected by a Stream Channel Wire or a Queue.
Bob Schor
12-08-2020 07:54 PM
My camera is a grayscale camera. When I tested, the FrameCount of the camera was the number of pictures in the camera buffer area obtained in real time. The FrameCount count value was not equal to the number of pictures written by the AVIwrite function writing method. May I ask what is the reason? Thanks for answering.
12-08-2020 07:56 PM
My camera is a grayscale camera. When I tested, the FrameCount of the camera was the number of pictures in the camera buffer area obtained in real time. The FrameCount count value was not equal to the number of pictures written by the AVIwrite function writing method. May I ask what is the reason? Thanks for answering.
12-14-2020 08:05 PM
I modified the program to this way and there are still more than 20 frames lost. What is the reason? There will be pictures 2 to 3 seconds after the external trigger of the camera. Program in the annex.
12-15-2020 03:39 PM
You are taking frames of size 2560 x 2048 at a frame rate of 60 FPS. When you configured Grab, you didn't specify a Buffer size, so the Driver will allocate only 5 buffers. This means that you have to move 25 M Bytes in less than 0.1 sec and keep the throughput up as you open and get the AVI engine started.
I'm not sure if this would help, but I suggest you try allocating 30-60 buffers. If 30 works, try cutting it down (halve it each time) and find what works. If you still are having a problem, you might consider simply hooking the camera up to your PC, opening it in MAX, and see what "actual frame rates" it can process.
I just noticed you compute the camera's Frame Rate -- what does it show?
Bob Schor
12-16-2020 12:31 AM
How to allocate the buffer area for the camera?
12-16-2020 03:38 PM
Open LabVIEW. Open your VI. Type ^H (which turns on LabVIEW's Context Help). Find the IMAQdx Configure Grab function and hover your mouse over it. Read the Detailed Help. Answer your own question.
When working with some of the more advanced and esoteric functions in LabVIEW (such as LabVIEW Vision), spending a little more time with the Help function can teach you a lot! Sometimes (but not always!) the Examples are also useful.
Bob Schor