Java Image Processing Recipes: With Opencv and Jvm

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Quickly obtain solutions to common Java image processing problems, learn best practices, and understand everything OpenCV has to offer for image processing. You will work with a JVM image wrapper to make it very easy to run image transformation through pipelines and obtain instant visual feedback. This book makes heavy use of the Gorilla environment where code can be executed directly in the browser, and image transformation results can also be visualized directly in the browser. Java Image Processing Recipes includes recipes on more advanced image manipulation techniques, such as image smoothing, cartooning, sketching, and mastering masks to apply changes only to parts of the image. You'll see how OpenCV features provide instant solutions to problems such as edges detection and shape finding. Finally, the book contains practical recipes dealing with webcams and various video streams, giving you ready-made code with which to do real-time video analysis. What You Will Learn Create your personal real-time image manipulation environment Manipulate image characteristics with OpenCV Work with the Origami image wrapper Apply manipulations to webcams and video streams Who This Book Is For Developers that want to manipulate images and use other advanced imaging techniques, through code running in the JVM.

Author(s): Nicolas Modrzyk
Publisher: Apress
Year: 2018

Language: English
Pages: 341

Table of Contents
About the Author
About the Technical Reviewer
Acknowledgments
Introduction
Chapter 1: OpenCV on€the€JavaVM
1-1 Getting Started with€Leiningen
Problem
Solution
How it works
Installing Leiningen
Creating a€New OpenCV-Ready Java Project with€Leiningen
1-2 Writing Your First OpenCV Java Program
Problem
Solution
How it works
1-3 Automatically Compiling and€Running Code
Problem
Solution
How it works
1-4 Using a€Better Text Editor
Problem
Solution
How it works
1-5 Learning the€Basics of€ the€OpenCV Mat Object
Problem
Solution
How it works
1-6 Loading Images from€a€File
Problem
Solution
How it works
1-7 Saving Images into a€File
Problem
Solution
How it works
1-8 Cropping a€Picture with€Submat
Problem
Solution
How it works
1-9 Creating a€Mat from€Submats
Problem
Solution
How it works
Mat of€Colored Submats
Mat of€Picture Submats
1-10 Highlighting Objects in€a€Picture
Problem
Solution
How it works
1-11 Using a€Canny Result as€a€Mask
Problem
Solutions
How it works
1-12 Detecting Edges with€Contours
Problem
Solution
How it works
1-13 Working with€Video Streams
Problem
Solution
How it works
Taking Still Pictures
Working in€Real Time
1-14 Writing OpenCV Code in€Scala
Problem
Solution
How it works
Basic Setup
Blurred
Canny Effect
1-15 Writing OpenCV Code in€Kotlin
Problems
Solutions
How it works
Basic Setup
Color Mapping
User Interface
Kotlin Setup
UI for€Dummies
UI with€Reactive Buttons
Blurring Application
Chapter 2: OpenCV with€Origami
2-1 Starting to€Code with€Origami
Problem
Solution
How it works
Project Setup with€a€Leiningen Template
Everything Is OK
Webcam Check
The Auto Plug-in Strikes Back
At the€REPL
REPL from Atom
Gorilla Notebook
2-2 Working with€Mats
Problem
Solution
How it works
Creating a€Mat
Creating a€Colored Mat
Using a€Submat
Setting One Pixel Color
Piping Process and€Some Generative Art
2-3 Loading, Showing, Saving Mats
Problem
Solution
How it works
Loading
Saving
Showing
Loading from€URL
2-4 Working with€Colors, ColorMaps, and€ColorSpaces
Problem
Solution
How it works
Simple Colors
Color Maps
Color Space
2-5 Rotating and€Transforming Mats
Problem
Solution
How it works
Flipping
Rotation
Warp
2-6 Filtering Mats
Problem
Solution
How it works
Manual Filter
Multiply
Luminosity
Highlight
Filter 2d
Threshold
2-7 Applying Simple Masking Techniques
Problem
Solution
How it works
2-8 Blurring Images
Problem
Solution
How it works
Simple Blur and€Median Blur
Gaussian Blur
Bilateral Filter
Median Blur
Chapter 3: Imaging Techniques
3-1 Playing with€Colors
Problem
Solution
How it works
Applying Threshold on€a€Colored Mat
Channels by Hand
Transform
Artful Transformations
3-2 Creating Cartoons
Problem
Solution
How it works
Bilateral Cartoon
Grayed with€Update Channel
3-3 Creating Pencil Sketches
Problem
Solution
How it works
Background
Foreground and€Result
Summary
3-4 Creating a€Canvas Effect
Problem
Solution
How it works
Apply the€Canvas
3-5 Highlighting Lines and€Circles
Problem
Solution
How it works
Find Lines of€a€Tennis Court with€Hough-Lines
Hough-Lines-P
Finding Pockets on€a€Pool Table
Finding Circles
Using Draw Segment
3-6 Finding and€Drawing Contours and€Bounding Boxes
Problem
Solution
How it works
Sony Headphones
Up in€the€Sky
3-7 More on€Contours: Playing with€Shapes
Problem
Solution
How it works
Highlight Contours
Hand-Drawn Shapes
3-8 Moving Shapes
Problem
Solution
How it works
3-9 Looking at Trees
Problem
Solution
How it works
3-10 Detecting Blur
Problem
Solution
How it works
3-11 Making Photomosaics
Problem
Solution
How it works
Chapter 4: Real-Time Video
4-1 Getting Started with€Video Streaming
Problem
Solution
How it works
Do-It-Yourself Video Stream
One-Function Webcam
Transformation Function
Two Frames, or More, from€the€Same Input Source
4-2 Combining Multiple Video Streams
Problem
Solution
How it works
4-3 Warping Video
Problem
Solution
How it works
4-4 Using Face Recognition
Problem
Solution
How it works
4-5 Diffing with€a€Base Image
Problem
Solution
How it works
4-6 Finding Movement
Problem
Solution
How it works
Finding Movement in€Black and€White
Find and€Draw Contours
4-7 Separating the€Foreground from€the€Background Using Grabcut
Problem
Solution
How it works
On a€Still Image
On a€Video Stream
4-8 Finding an€Orange in€Real Time
Problem
Solution
How it works
Using Hough-Circles
Using Find-Contours
4-9 Finding an€Image Within€the€Video Stream
Problem
Solution
How it works
Still Image
Video Stream
Index