IMage elaboration and saving using Multithreading

Alexis

I've written a software in C++ for processing the video stream coming from a camera, using openCV libraries. I would like to save the video frame while processing it, in order to have the possibility to run the code many times offline using the exact same video as input. I was thinking to use multi-threading using the Producer/Consumer Pattern.

My idea would be to have one producer (frame grabber) and two consumer (one for processing the image and the second one for saving the frames on file (as video)).

I don't have experience with multi-threading programming, so I've searched for some tutorials on internet. All the tutorials I've found were about one producer and one consumer, but what I need is slightly different: my need would be a producer that sends the same image to both consumers and after both consumers finish their work, go ahead with the next frame. The point is that the producer would have one queue where it stores the frames, while the consumers both would need to read the same element once from the same queue.

Do you have any suggestion? Do you think that the pattern I've chosen fits my need?

Thanks.

Jared Dykstra

Producer-consumer works. In your case, the producer could "produce" twice, first placing it in the processing queue, then placing a 2nd copy in the saving queue.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Using gif image and saving

From Dev

Saving image with UIImageJPEGRepresentation and using as UIImage

From Dev

Saving Each PDF Page to an Image Using Imagick

From Dev

Saving image from url using Picasso?

From Dev

Saving image element using splinter python

From Dev

Saving image to server directory using SpringBoot with Android

From Dev

Using SDWebImage and saving image to public gallery

From Dev

Saving image path to database using Laravel

From Dev

Saving and Using a User Input Image in Xcode with Swift

From Dev

Saving image from url to HDD using Javascript

From Dev

Is loading and saving an image using QImage loss-less?

From Dev

Saving image/files into Parse Cloud using Parse Code

From Dev

Saving an image with shell_exec() - using imagejpeg & jpegoptim, with stdin / stdinout

From Dev

Saving Morris charts to image using HTML2CANVAS

From Dev

Image Saving I/O Using Python Efficiency & Speed

From Dev

Upload an uploaded image using PyImgur without saving to a temporary file

From Dev

Saving image in SQL Server 2005 using ASP Classic

From Dev

Saving an image using FileStream sometimes results in corrupt files

From Dev

Saving Morris charts to image using HTML2CANVAS

From Dev

Saving an ASP image with base64 src using C#

From Dev

OSX - Loading an image and saving it as a smaller png file using Swift

From Dev

Saving Image to disk using .net core on Ubuntu (GCloud Compute Engine)

From Dev

Saving and Displaying Image from database using MySQL workbench

From Dev

How to send image file without saving in database using django framework

From Dev

while compressing the image using bitmap (image)saving to the gallery but image failed to load -Android

From Dev

Image loading in multithreading manner

From Dev

Tensorflow multithreading image loading

From Dev

Saving image to localstorage - canvas

From Java

Saving bitmap as a image in Kotlin

Related Related

  1. 1

    Using gif image and saving

  2. 2

    Saving image with UIImageJPEGRepresentation and using as UIImage

  3. 3

    Saving Each PDF Page to an Image Using Imagick

  4. 4

    Saving image from url using Picasso?

  5. 5

    Saving image element using splinter python

  6. 6

    Saving image to server directory using SpringBoot with Android

  7. 7

    Using SDWebImage and saving image to public gallery

  8. 8

    Saving image path to database using Laravel

  9. 9

    Saving and Using a User Input Image in Xcode with Swift

  10. 10

    Saving image from url to HDD using Javascript

  11. 11

    Is loading and saving an image using QImage loss-less?

  12. 12

    Saving image/files into Parse Cloud using Parse Code

  13. 13

    Saving an image with shell_exec() - using imagejpeg & jpegoptim, with stdin / stdinout

  14. 14

    Saving Morris charts to image using HTML2CANVAS

  15. 15

    Image Saving I/O Using Python Efficiency & Speed

  16. 16

    Upload an uploaded image using PyImgur without saving to a temporary file

  17. 17

    Saving image in SQL Server 2005 using ASP Classic

  18. 18

    Saving an image using FileStream sometimes results in corrupt files

  19. 19

    Saving Morris charts to image using HTML2CANVAS

  20. 20

    Saving an ASP image with base64 src using C#

  21. 21

    OSX - Loading an image and saving it as a smaller png file using Swift

  22. 22

    Saving Image to disk using .net core on Ubuntu (GCloud Compute Engine)

  23. 23

    Saving and Displaying Image from database using MySQL workbench

  24. 24

    How to send image file without saving in database using django framework

  25. 25

    while compressing the image using bitmap (image)saving to the gallery but image failed to load -Android

  26. 26

    Image loading in multithreading manner

  27. 27

    Tensorflow multithreading image loading

  28. 28

    Saving image to localstorage - canvas

  29. 29

    Saving bitmap as a image in Kotlin

HotTag

Archive