Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm currently working on machine vision project. The issue is saving all of the images fast enough so that the queue of images doesn't build up in RAM and drain the user's memory.


What I have tried:

This method helps the CPU issue, but because its not fast enough. The queue of images builds up and overloads the ram so I don't know what else I can do to solve both issues.
Posted
Updated 15-May-19 22:35pm
v4
Comments
Richard MacCutchan 7-May-19 4:37am    
Where are the images coming from?
Member 14185863 7-May-19 5:04am    
The images are loaded from live stream vision software.
Richard MacCutchan 7-May-19 5:05am    
Then you need to find a way to stop it from overloading the system.
RickZeeland 7-May-19 6:59am    
On what hardware does your software run, is it powerful enough ?
Can you lower the camera framerate ?
[no name] 7-May-19 11:06am    
Maybe you should go with "video". Maybe you should try a lower resolution. Maybe you should use a lower frame rate (FPS). How can a DVR run 6 cameras at 1920x1080 for 24/7 and you ... can't?

1 solution

You could try saving the images as a different file type.

Suggested file types (in ImageToSave.fileExtension) are:
"ima" - Halcons own format. Nothing except Halcon will be able to read them.
"png 0" - Uncompressed png file.
"bmp" - Uncompressed bitmap file.

If you try and compress them then the CPU will likely not be able to keep up.

Some (typical) hardware limitations:

On a typical HDD with no other applications using the disk then you should just about be able to keep up with a single camera connected to a gigabit network port. 2 cameras will be too fast for a single hard drive.

On an SSD the throughput is typically 10x faster, but there are slower (and faster) SSDs. You will likely fill up an SSD very quickly.

If you can capture all of the images then you could compress them later.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900