Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

improve time proccesing images

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!

0 Kudos
Message 1 of 5
(3,655 Views)
Hi,
You are on right track thinking about Producer/Consumer for the problem.
-Go ahead and start implementing Producer/Consumer architecture with queues.
-If it's still taking more time, then you need to mention what are the processes you are doing on it.
Thanks
uday
0 Kudos
Message 2 of 5
(3,651 Views)

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)...

0 Kudos
Message 3 of 5
(3,642 Views)

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

Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 5
(3,628 Views)

Code sharing will be very informative to solve the issue than explaning through Verbal conversation

Spoiler
 

 

Smiley Happy

 

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 5 of 5
(3,565 Views)