Run Queue of Operations in Parallel

3 visualizaciones (últimos 30 días)
Royi Avital
Royi Avital el 25 de Mzo. de 2015
Editada: Royi Avital el 26 de Mzo. de 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.

Respuestas (1)

Alka Nair
Alka Nair el 26 de Mzo. de 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 comentario
Royi Avital
Royi Avital el 26 de Mzo. de 2015
Editada: Royi Avital el 26 de Mzo. de 2015
I don't want to use this approach as I can't replicate the approach in C.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by