07-07-2016 02:35 AM
Hello to everyone:
First of all thanks a lot for reading this post and being able to help.
I have an application where I have to process 4 images from a GigE camera in 0.5 seg.
What I do is: in one while I have a flat sequence where the steps are:
- Take first image
- 3 frame flat sequence to process the image.
In the next iteration while, take second image and proccess it... and until 4 image processed.
The problem is that the time is too short because I have to process 4 images in 0.5 seg.
So I have to reestructure my code.
Any idea how to do that?
Maybe put some wait until ms in the while loop.
Or maybe use a producer/consumer where the producer will be the while where I take just the 4 images and the consumer another while will process the images. And use a queue with the 4 images to send them from producer to consumer.
Because maybe is better to take first the 4 images and then process them so that no image is not lost on the way.
Any ideas?
Thanks a lot!
07-07-2016 03:08 AM
07-07-2016 04:52 AM
The process is simple, just meas 5 ROIs.
But then I have to communicate with a PLC so maybe I need to do one produce, one producer/consumer (it will consume the images and it will be produce data for PLC) and one consumer (to process data to send to PLC)...
07-07-2016 10:00 AM
Do your processes in parallel. While you are taking the second picture, start processing the first picture. Break the process into steps that take about the same time, preferably the same time it takes to take a picture.
Bruce
07-14-2016 08:58 AM
Code sharing will be very informative to solve the issue than explaning through Verbal conversation