crop greyscale image using matlab
Show older comments
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.
Accepted Answer
More Answers (1)
Image Analyst
on 15 Jul 2017
0 votes
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.
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!