How do divide a image into blocks and find the maximum value of each Block?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
Walter Roberson
2015년 10월 21일
blockproc()
댓글 수: 2
Stefan Raab
2015년 10월 21일
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.
추가 답변 (1개)
Image Analyst
2015년 10월 21일
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
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!