필터 지우기
필터 지우기

Run Queue of Operations in Parallel

조회 수: 3 (최근 30일)
Royi Avital
Royi Avital 2015년 3월 25일
편집: Royi Avital 2015년 3월 26일
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.

답변 (1개)

Alka Nair
Alka Nair 2015년 3월 26일
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
Royi Avital
Royi Avital 2015년 3월 26일
편집: Royi Avital 2015년 3월 26일
I don't want to use this approach as I can't replicate the approach in C.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by