IMAGE SEPARATION INTO BLOCKS
Ältere Kommentare anzeigen
HI , i have an 256*256 image .. i want to separate it into blocks of 4*4 of that original image .. for that i tried with this code .
[img_x,img_y]=size(img); block_size=4; slide_len=1; n=1; for ix=block_size/2:slide_len:img_x-block_size/2 for jy=block_size/2:slide_len:img_y-block_size/2 current_block=img((ix-block_size/2+1):(ix+block_size/2),(jy-block_size/2+1):(jy+block_size/2));
end
end
but i could not get the full blocks also when i cheked with original image pixel values differs .. can i use this codes or any in built command can be used .. thanks to all in advance for reading this patiently
2 Kommentare
Muthuraj V
am 16 Dez. 2011
Hi you can use this command
c=mat2cell(a,[x y...],[x y...])
where in that x y .. should match with the no. of rows and columns,,,
chek for help in matlab, u wil get more detail
Regards,
Muthu.
krithika P
am 16 Dez. 2011
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Simulink Supported Hardware 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!