crop greyscale image using matlab
显示 更早的评论
hello. I have a greyscale image (512x512x3) which is attached below. i want to crop it. it has 512 x 512 pixels however the data i am interested in is the middle of the image (non-white area). I tried the imcrop command but it only allowed me to crop in rectangular areas. How can i crop such that all pixels with intensity of 255 are cropped from the image? I think doing so will crop the image such along the border of the non-white area of the image. I have verified using impixelinfo that the intensities of the region of interest are all less that 255.
采纳的回答
更多回答(1 个)
Image Analyst
2017-7-15
0 个投票
Images have to be rectangular, so even if you crop it down, there still be white in some of the image. What do you want to do with it? You can leave it as white, or change it to black or any other gray level.
类别
在 帮助中心 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
