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 OpenCV Computer Vision with Java
  • Table Of Contents Toc
OpenCV Computer Vision with Java

OpenCV Computer Vision with Java

By : Baggio
3.4 (5)
close
close
OpenCV Computer Vision with Java

OpenCV Computer Vision with Java

3.4 (5)
By: Baggio

Overview of this book

If you are a Java developer, student, researcher, or hobbyist wanting to create computer vision applications in Java then this book is for you. If you are an experienced C/C++ developer who is used to working with OpenCV, you will also find this book very useful for migrating your applications to Java. All you need is basic knowledge of Java, with no prior understanding of computer vision required, as this book will give you clear explanations and examples of the basics.
Table of Contents (9 chapters)
close
close
8
Index

Image processing


In this section, we are going to describe how to process the received image in order to draw an image file on top of it. Now, a cascade classifier is run just as in the previous chapter. It is important to pay attention to the XML cascade file location. Throughout the code, we have used a helper function called getResourcePath, and we have used the convention of storing all the resources in the src/main/resources/ folder. This way, the helper function works in a manner similar to that of the following code:

private String getResourcePath(String path) {
  String absoluteFileName = getClass().getResource(path).getPath();
  absoluteFileName = absoluteFileName.replaceFirst("/", "");
  return absoluteFileName;
}

Using this function, one can load a cascade through the following call:

private void loadCascade() {
  String cascadePath = getResourcePath("/cascades/lbpcascade_frontalface.xml");
  faceDetector = new CascadeClassifier(cascadePath);
}

After the cascade has been correctly...

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.
OpenCV Computer Vision with Java
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