Ask Your Question

Find edges of a photo after scan

asked 2012-07-31 02:16:29 -0500

Erwin gravatar image

updated 2018-01-07 17:31:44 -0500


I am a complete newbee in CV. OpenCV looks great but I am just trying to find my way around. I have a rather simple problem. Want to scan (paper) photos with an Android app. I want to place the photos on an even background. Make a snap an then first detect the borders. Afterwards do some perspective correction. What methods should I use for the edge/border detection. Thanks


edit retag flag offensive close merge delete


The solution to your question is similar to this one:

Rui Marques gravatar imageRui Marques ( 2012-08-01 05:39:28 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2012-07-31 09:02:38 -0500

imran gravatar image

A possible solution would be to find the edges using the example in the samples folder "OpenCV/samples/cpp/edge.cpp". Then find squares in the image using the example "OpenCV/samples/cpp/squares.cpp". Or you could find lines in the image using the example "OpenCV/samples/cpp/houghlines.cpp".

edit flag offensive delete link more

answered 2012-07-31 02:24:28 -0500

Adi gravatar image

With uniform illumination and large contrast between the paper intensity (e.g. white) and the background (e.g. dark), you can threshold the image and then find the contours.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2012-07-31 02:16:29 -0500

Seen: 993 times

Last updated: Jul 31 '12