matlab - Extract Rectangular Image from Scanned Image -


I have copied the copies of currency notes that I need to remove only rectangular notes. Although one of the copied copies There is a very empty background, the note can be rotated or properly aligned. I am using matlab.

Example input:

Enter image details here

Example output:

Enter image details here

I have not availed any benefits by using Thresholding and Koni / Sobel Age Detection. I also tried the given solution but found out the whole image for the crop and it will not work for rotated images.

PS: My primary objective is to set up a seal of currency I think there are some methods I could use:

  1. Color based, since all currency notes are the primary color Change. The advantage of this method is that it is independent of the rotation or scale of the input image.
  2. Find the small black triangle on the lower left corner of the note. This shape is unique to each sect.
  3. Calculating the difference between 2 images Since it is a small project, so all input images will be of same DPI and resolution and hence will be aligned once, the difference between input and true images is some Can give the guess.

Which of the methods do you find most viable?

It looks like you have been seen ahead of you comment) which is good!

You have an image that has cropped up and is in sections. I will show you as little or more as you can to solve the problem. First, you have to make sure that you The image is without holes. So fill them up!

  Iinv = I == 0; % You want 1 in money, zero in 0; Ifill = imfill (Iinv, 8, 'hole'); After that, you want to get only the limit of the image:  
  Iedge = edge (ifill);  

And finally you want to get to the corners of that square:

  C = Iedge;  

Now that you have 4 corners, you should know the angle of this rotating "square". Once you get it:

  errat = imortat (encoded, angle);  

Once here you can end up with money to revolutionize it again! (Aha Money always as a purpose!)

Hope it helps!


Comments