[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: octave vectorization
From: |
drragos_drag |
Subject: |
Re: octave vectorization |
Date: |
Sun, 24 Mar 2013 08:38:44 -0700 (PDT) |
[i,j]=find(mask);
rgb=imread(input_img_path);
for k=1:numel(j)
rgb(i(k),j(k),1:3)=mean(x=[rgb(i(k)-1,j(k),1:3),rgb(i(k)-1,j(k)-1,1:3),rgb(i(k)-1,j(k)+1,1:3),rgb(i(k),j
(k)-1,1:3),rgb(i(k),j(k)+1,1:3),rgb(i(k)+1,j(k)-1,1:3)
,rgb(i(k)+1,j(k),1:3),rgb(i(k)+1,j(k)+1,1:3)]);
endfor
i have a mask with "wrong" pixels of a photo and i want to repair this
photo, replacing the value of "wrong" pixels with avrage of points around.
there are not 2 "wrong" pixels joined, one next to another.
i want to to this without "for" for better speed
--
View this message in context:
http://octave.1599824.n4.nabble.com/octave-vectorization-tp4651161p4651167.html
Sent from the Octave - General mailing list archive at Nabble.com.
Re: octave vectorization, grg, 2013/03/27