The web application we are going to develop draws Fedora hats on top of the detected heads in a given image. In order to do this, the user uploads the image through a simple form, and then it is converted to an OpenCV matrix in memory. After conversion, a cascade classifier looking for faces is run over the matrix. A simple scale and a translation are applied to estimate the hat's position and scale. A transparent fedora image is then drawn on the specified position for each of the detected faces. The result is then returned through HTTP by giving the mixed reality picture to the user. Notice that all the processing happens on the server side, so the client is only left to upload and download the image, which is very useful for clients that rely on batteries, such as smartphones.
OpenCV 3.0 Computer Vision with Java
By :
OpenCV 3.0 Computer Vision with Java
By:
Overview of this book
Table of Contents (15 chapters)
OpenCV 3.0 Computer Vision with Java
Credits
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Setting Up OpenCV for Java
Handling Matrices, Files, Cameras, and GUIs
Image Filters and Morphological Operators
Image Transforms
Object Detection Using Ada Boost and Haar Cascades
Detecting Foreground and Background Regions and Depth with a Kinect Device
OpenCV on the Server Side
Index
Customer Reviews