Multiprocessing in image processing

asked 2018-01-04 23:37:45 -0600

Ezkargon gravatar image

Hello guys, i am currently working on image processing using the multiprocessing library in python, i have been thnking of 2 possible route:

1.) what I want to do is I have a video and we know the video is a stream of frames. I have core i5 what I want to do each core will process one frame of these frames example (what will happen in one second) core 1 processing frame 1 core 2 processing frame 2 core 3 processing frame 3 core 4 processing frame4.

2.) Divide the tasks to each cores, for example core 1 is for reading and capturing frames AND core 2 is for masking AND core 3 is for HSVthresholding AND core 4 is for detecting the object.

Now my question is, which of the two is better? and can you teach and guide me how to implement it? Gladly appreciate your help :)

edit retag flag offensive close merge delete

Comments

1

imho, you should go the opposite way: build your cv2.so locally, with all optimisations possible (like tbb) , and NOT do your own attempt at multithreading on top of it.

berak gravatar imageberak ( 2018-01-05 04:19:04 -0600 )edit

I agree with @berak, you will never obtain robust results doing it yourself. Do not reinvent the wheel :D

StevenPuttemans gravatar imageStevenPuttemans ( 2018-01-08 04:01:28 -0600 )edit