can any one provide me the code for dividing the image 306x204 into blocks of size i,e windows of size 17x17
Ältere Kommentare anzeigen
i want to know the code for dividing the image into blocks or windows of size 17x17
1 Kommentar
Romil Shah
am 21 Jun. 2015
Bearbeitet: Romil Shah
am 21 Jun. 2015
im = rand(306,204);
for k=1:12*18
for i=1:306/18
for j=1:204/12
newim(i,j,k)=im(i*18,j*12);
end
end
end
Akzeptierte Antwort
Weitere Antworten (1)
Image Analyst
am 21 Jun. 2015
0 Stimmen
See the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_split_an_image_into_non-overlapping_blocks.3F
If you want to do something with the blocks, then use blockproc(). See attached demos.
Kategorien
Mehr zu Neighborhood and Block Processing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!