can any one provide me the code for dividing the image 306x204 into blocks of size i,e windows of size 17x17
Mostrar comentarios más antiguos
i want to know the code for dividing the image into blocks or windows of size 17x17
1 comentario
Romil Shah
el 21 de Jun. de 2015
Editada: Romil Shah
el 21 de Jun. de 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
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 21 de Jun. de 2015
0 votos
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.
Categorías
Más información sobre Neighborhood and Block Processing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!