Optimize time image processing

1 view (last 30 days)
Eduardo alejandro
Eduardo alejandro on 5 Oct 2015
Good day, I have some programs distributed processing cluster that you want to optimize for the processing time of an image x faster and more efficiently, and also that the more worker is agregen better the result of processing and the less increase processing time, could help to optimize this code:
clc;
clear;
sombrero = [0 0 0 -1 -1 -1 0 0 0;...
0 -2 -3 -3 -3 -3 -3 -2 0;...
0 -3 -2 -1 -1 -1 -2 -3 0;...
-1 -3 -1 9 9 9 -1 -3 -1;...
-1 -3 -1 9 19 9 -1 -3 -1;...
-1 -3 -1 9 9 9 -1 -3 -1;...
0 -3 -2 -1 -1 -1 -2 -3 0;...
0 -2 -3 -3 -3 -3 -3 -2 0;...
0 0 0 -1 -1 -1 0 0 0];
ruta='/home/alejandro/Documentos/MatLab/ProgramacionDistribuida/Imagen_p_Distribucion/1.jpg';
im=imread(ruta);
imA=rgb2gray(im);
p1=parpool('JobScheduler',6);
addAttachedFiles(p1,{'Funcion_duplicate_pixel.m','funcion_Aplicacion_mascaras.m'});
tic
spmd
d1=codistributor1d(2);
c = codistributed(imA, d1);
som=funcion_Aplicacion_mascaras(Funcion_duplicate_pixel(getLocalPart(c),sombrero),sombrero);
end
sali2=[som{1} som{2} som{3} som{4}];
imshow(sali2);
end
delete(gcp);
well I have two functions applies duplicating one pixel to apply Macara Mexican hat, eye and can help Thank you very much for your attention

Answers (0)

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!