Find the edges of image and crop it in MATLAB

前端 未结 3 1317
孤街浪徒
孤街浪徒 2021-01-16 12:52

I have a RGB image. I have scanned the image. So the image occupies a small portion of an A4 size sheet.

I want to find the border of the image and crop it. I could

3条回答
  •  -上瘾入骨i
    2021-01-16 12:59

    You can try to detect the corners of your image using e.g. the Harris-Detector (corner in Matlab). Set the maximum number of corners to detect to 4. Then use the positions of the corners in imcrop. If you would post an image I could give you more specific hints. Your image being RGB shouldn't be a problem, just convert it to grayscale.

提交回复
热议问题