Max Buffer Size
I am missing a lot of frames due to my buffer size. I am setting the buffer size to its max value and yet this is still not high enough.
How can I increase my buffer size? Are the frames being buffered within the camera? Can I buffer on my computer? Why is the max value inconsistent? It seems to fluctuate between 120 and 170.
Any help would be appreciate.
Best,
-
SpinView has my max buffer size as 555.
0 -
I think I see the issue. It is that I am slowing the acquisition loop too much with video_recorder.append(image_result).
0 -
Hi Rhys,
max buffer size depends on two things; the size of the image data, and the amount of RAM currently available. Size of image data is determined by resolution and pixel format. For example, using a 3MP camera, with an 8bit pixel format, the calculation would be (3,000,000 pixels) * (1byte/pixel) = 3MB (per image). If your PC has 1 gigabyte of RAM available, we take 85% of that (850MB), then divide it by image size (3MB), to get ~283 buffers available.
0 -
Hi Rhys,
In this case I suggest to take a look at our source code example AcquisitionMultipleCamerasWriteToFile. That should allow you to record without missing frames.
Best regards,Manuel
0 -
Hey guys,
I appreciate the feedback. I was able to figure it out for the most part. Y'all were both very helpful. By looking at SavetoVideo.py, I was able get to fix it so that I wouldn't lose any frames. However, when I used video_recorder.append outside of my acquisition loop, I cannot add my BayerRG8 frames. It requires me to convert them to something else first. When I was running video_recorder.Append() inside my acquisition loop, I didn't have this problem, so I assume that somewhere in video_recorder.Append() it goes ahead and automatically converts BayerRG8 to something else as a part of its process when in the acquisition loop. Do y'all know what image format it converts it too, and what processor it was using?
As for the buffer handling, there is something I am missing. Maybe it has something to do with MacOS permissions. Of my 32GB RAM, I have about 10GB currently available. With me running a 1.3MP camera, I ought to be at about 6500 buffer size. On SpinView, I am seeing about 3000, and my max buffer size in my scripts are only reading 200 tops.
On a side note, I am using MacOS, and to find the source code examples that I need, such as SavetoVideo and AcquisitionMultipleCamerasWriteToFile, I had to download the Linux packages. It would be helpful if those were already in the MacOS downloads. It took me some to find them. However, other than that, I've had a good experience with your software, so thank y'all for that.
Best,
Rhys
0
Please sign in to leave a comment.
Comments
5 comments