Gamosa Neki?
Please note you can assign the rows number at the begining of the array. I way to store the all indexing (rows,colm) of non white pixels.
im_test=imread('PAIKOK.png');
[idx1,idx2]=find(im_test==1);
Here idx1 and idx2 store the all color pixel location of the indexed image. Afterwards you can retrive the image by having same size and assign the same color on those idx1 and idx2 position.
Here I have use the for loop just try to display as per your requiremnets. Same the individual column locations in cell array and retrive when it required.
Is this?
im_test=imread('PAIKOK.png');
[rows colm]=size(im_test);
for i=1:rows
[i,idx2]=find(im_test(i,:)==1);
disp(idx2);
end
Partial results:
Hope it gives you sufficient hints!
Best Answer