Find corners of a page after applying hough transformation
3 views (last 30 days)
Show older comments
Hi,
My classmate and I are currently working on a course project and we need some guidance. We decided to recreate "CamScanner" app using Matlab.
We can select corners manually and we were successfully able to apply the perspective transformation to straighten the image and Bradley's adaptive threshold to get the desired black and white image. Yet, we are trying to improve our project more by selecting the corners automatically. We were able to detect the edges using box filter (Sobel) for vertical, horizontal and even diagonal and enhance the results even more. (see the right picture below) Then we compute the Hough transform using the edges we got from the previous step. the found Hough lines can be observed in the left image as colored red. Now what's left for us is to detect the corners, which is by finding 4 lines out of the 16 lines found from hough transform. (Using directly four would result in the detection of the image's whole boundary, 16 was ideal for almost all our test data).
Any suggestions on how to detect corners in a simple way after the steps we made? We tried both detectHarrisFeatures and detectMinEigenFeatures to detect corners and we didn't get any satisfactory results. We are open to any suggestion, Thanks!
Our testing data: 1. On the right; results after applying horizontal/vertical/diagonal edge detection 2. On the left; the 16 hough lines


0 Comments
Answers (1)
Image Analyst
on 4 Jan 2017
There is a corner() function.
And if you have the equation of two lines, it's trivial to find the coordinates of the crossing.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!