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
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.