I have scanned copies of currency notes from which I need to extract only the rectangular notes. Although the scanned copies have a very blank background, the note itself can be rotated or aligned correctly. I'm using matlab.
Example input:
Example output:
I have tried using thresholding and canny/sobel edge detection to no avail. I also tried the solution given here but it detects the entire image for cropping and it would not work for rotated images.
PS: My primary objective is to determine the denomination of the currency. There are a couple of methods I thought I could use:
- Color based, since all currency notes have varying primary colors. The advantage of this method is that it's independent of the rotation or scale of the input image.
- Detect the small black triangle on the lower left corner of the note. This shape is unique for each denomination.
- Calculating the difference between 2 images. Since this is a small project, all input images will be of the same dpi and resolution and hence, once aligned, the difference between the input and the true images can give a rough estimate.
Which method do you think is the most viable?