Syntax for using 'blockproc' command to divide a .jpg image into blocks
Mostrar comentarios más antiguos
I have a problem where I need to subdivide the image into smaller blocks. While this is quite easy for gray image by using mat2cell command (input image being 2D array or matrix), same is not true (at least for me now) for color image (being 3D array). I find that 'blockproc' is the proper way to use 'mat2cell' for each layer of the color image. But somehow I am not very comfortable with the explanation of the syntax for using 'blockproc'. It will be very help full if the proper syntax is given to me.
Respuestas (2)
Walter Roberson
el 18 de Abr. de 2013
B = 8; %e.g., 8 x 8
ImageBlocks = mat2cell( YourRGBImage, B * ones(1, size(YourRGBImage,1)/B), B * ones(1, size(YourRGBImage,2)/B), size(YourRGBImage,3) );
Note: this will also work for grayscale images.
Bidyut Chakraborty
el 19 de Abr. de 2013
Editada: Bidyut Chakraborty
el 19 de Abr. de 2013
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!