Run Queue of Operations in Parallel

4 views (last 30 days)
Royi Avital
Royi Avital on 25 Mar 2015
Edited: Royi Avital on 26 Mar 2015
Hello,
I have an Image - `mA` which I divided into Blocks: `mA1`,`mA2`, `mA3`, `mA4`.
Now I have a function - `BlurImage` I want to operate on each:
mB1 = BlurImage(mA1);
mB2 = BlurImage(mA1);
mB3 = BlurImage(mA1);
mB4 = BlurImage(mA1);
Is there a way to run those 4 operations in parallel in MATLAB?
I want to process sub sections of the image in parallel and I want to make it as efficient as possible (And better yet, using the same strategy I later can use in C with OpenMP).
Thank You.

Answers (1)

Alka Nair
Alka Nair on 26 Mar 2015
Hi Royi Avital, The BLOCKPROC function from the Image Processing Toolbox processes the images by applying the function to each distinct block of the image. Please refer to the documentation link at: http://www.mathworks.com/help/images/ref/blockproc.html to understand how to use the function. There is an option 'UseParallel' for this command, which when set to 'true',blockproc will attempt to run in parallel mode if you have Parallel Computing Toolbox.
Kindly accept this answer if this helps, so that other community users can make use of this reply.
  1 Comment
Royi Avital
Royi Avital on 26 Mar 2015
Edited: Royi Avital on 26 Mar 2015
I don't want to use this approach as I can't replicate the approach in C.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!