comparing pixels in 3x3 block
显示 更早的评论
Having a matrix as shown below

i wanted to take 3x3 pixel

and compare the 3 pixels (highlighted in yellow colour) with the pixel (highlighted in green colour),
and if 2 or more pixel (highlighted in yellow) has value greater than the pixel (highlighted in green) and i wanted to assign 1 to it else 0
So in this case i will get 0-1-1-0 and then convert the binary 0110 to its corresponding decimal value = 6
Then the next 3x3 pixel
1 个评论
Walter Roberson
2020-1-2
Why 0110? Left edge of the left block, then top edge of the right block, then middle row of the right block, then middle column of the left block??
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Image Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!