fragant1996
fragant1996

Reputation: 371

Find Black Squares in Image ( matlab )

i have hundreds of paper-forms and i want to automatically read this forms. The first step would be to calibrate the scanned paper. ( find the coordinates of the 4 squares )

But i don't know how to do it in matlab :(

here is the picture : http://i.imgur.com/wR463.png

Upvotes: 1

Views: 1293

Answers (2)

fragant1996
fragant1996

Reputation: 371

Thanks Havard,

this solution helped me. This is what i did :

I = imread('inv-small.png');
BW = edge(I,'canny',0.3);
imshow(BW);
C = corner(BW,4);
imshow(I);
hold on
plot(C(:,1), C(:,2), 'r*');
hold off

results in : enter image description here

Upvotes: 1

Håvard Geithus
Håvard Geithus

Reputation: 5614

Here is a solution using OpenCV. For detecting the paper sheet itself, see this.

Upvotes: 2

Related Questions