How do divide a image into blocks and find the maximum value of each Block?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
S .p.aramesh S
el 21 de Oct. de 2015
Respondida: Image Analyst
el 21 de Oct. de 2015
Actually i am doing ODBTC encoding for a color image.I do the RGB decomposition already.now i have to do divide a image into blocks and find the maximum value of each Block.Plz help me
0 comentarios
Respuesta aceptada
Walter Roberson
el 21 de Oct. de 2015
blockproc()
2 comentarios
Stefan Raab
el 21 de Oct. de 2015
The line
max(block_struct.data);
will return a vector of maximum values if the input is a matrix. If you want only the largest element, you have to use
max(block_struct.data(:));
Then the matrix is converted to a vector before the max value is extracted.
Más respuestas (1)
Image Analyst
el 21 de Oct. de 2015
Walter and Stefan are correct. There is also some more complete code in the FAQ. I've also attached my two demos on blockproc(), for what it's worth. You can just modify it to take the max, like Stefan said.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!