Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering OpenCV Android Application Programming
  • Table Of Contents Toc
Mastering OpenCV Android Application Programming

Mastering OpenCV Android Application Programming

By : Kapur, Nisarg Thakkar
4.5 (4)
close
close
Mastering OpenCV Android Application Programming

Mastering OpenCV Android Application Programming

4.5 (4)
By: Kapur, Nisarg Thakkar

Overview of this book

If you are a Java and Android developer looking to enhance your skills by learning the latest features of OpenCV Android application programming, then this book is for you.
Table of Contents (11 chapters)
close
close
6
6. Working with Image Alignment and Stitching
10
Index

The algorithm


In this section, let's look at the steps we will take to achieve our results. Our first task is to detect the paper from the background. For this, we will apply the k-means algorithm with two cluster centers. With the two cluster centers, we can detect which one of them represents the page and which one corresponds to the background, and create a binary image.

Now, we will use the cluster representing the paper and try to remove some noise and fill in some gaps with morphological opening and closing using a rectangular kernel.

Next, we will try to find the outer boundary of the page and use it to detect the corners. For this, we will detect the contours in the binary image and then identify the contour with the largest area.

Once we have the largest contour, we will detect the lines using a probabilistic Hough transformation. Then, we will join the lines and detect the corners.

Once we have the corners, we will detect which corner corresponds to which other corner, and then apply...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering OpenCV Android Application Programming
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon