V=zeros(x,y,num_images,'uint16')for k=1:num_imagesfor i= 1:xfor j= 1:y if B(i,j,k)==0 V(i,j,k)= A(i,j,k)/3 else V(i,j,k)= A(i,j,k)/3+(2^15) endendendend
MATLAB: I have the following code (recognizing individuals pixels of a matrix). For a high number of images, this is very time consuming. Therefore, ¿Could the loop be avoided ? Thanks!
digital image processingMATLAB
Best Answer