OpenCV Android Development in Practice cover

OpenCV Android Development in Practice

No rating yet
Word count
79K words
Chapters
13
Series
Intelligent Systems and Technology Series
ISBN
9787111601401

Tags

Summary

This is a hands-on technical book on computer vision applications for the Android platform. The author, Jia Zhigang, has long worked in graphics and image application development, and the book centers on putting OpenCV into practice on Android, divided into two parts and ten chapters. Part One, "A Systematic Study of OpenCV Image Processing" (Chapters 1–7), begins with the framework and environment: it introduces OpenCV's history, module structure, and Android SDK, demonstrates setting up the development environment, building a demo app, and taking photos and selecting images; it then explains creating, saving, and converting between Mat and Bitmap objects, reading and writing Mat pixels, computing channels and mean/variance, arithmetic operations and brightness/contrast adjustment, and weighted blending; it then moves to image operations, covering blurring, statistical ranking filters, edge-preserving filters, custom filters, morphological operations, and thresholding; next come basic feature detection topics such as gradient computation, the Laplacian operator, Canny edge detection, Hough line and circle detection, contour discovery and analysis, image histograms, and template matching; Chapter 6 covers Harris and Shi-Tomasi corner detection, SURF and SIFT feature detection, detectors and descriptors in Feature2D, finding known objects with feature matching, and cascade classifier face detection; Chapter 7 introduces camera use, including JavaCameraView, landscape and portrait display, preview frame processing, and face detection in preview frames. Part Two, "OpenCV4Android in Practice" (Chapters 8–10), closes with three complete case studies: OCR recognition (combining Tesseract to recognize ID numbers, with training data and image preprocessing to improve accuracy), face beautification (integral images, local mean-variance filtering, mask generation, Gaussian weight blending, and edge enhancement), and real-time eye tracking and rendering (face detection and tracking, eye candidate regions, eye detection, black pupil localization, and rendering optimization). The book emphasizes algorithm flow design, combined API use, performance and memory control, and NDK development techniques, and is suited to developers with some Android background who want to actually build vision capabilities into their apps while learning.

Editor's review

市面上把 OpenCV 讲清楚的书不少,把 Android 讲清楚的书更多,但按「Android 工程怎么真的跑起 OpenCV」来组织的不多。这本 223 页的实战书价值就在这里:它不铺陈数学推导,而是从 SDK 下载、环境搭建、构建演示 App 一路讲到你亲手做出可演示的功能模块。 结构上可谓「先打地基,再盖房子」。前七章把 Mat 与 Bitmap 的转换、像素操作、滤波、形态学、边缘检测、特征检测与匹配、相机预览帧处理逐层铺开——这些恰恰是新手最容易卡住、老手最常翻回去查的部分;后三章直接给出 OCR 识别、人脸美颜、人眼实时跟踪三个完整案例,且都不是玩具级 demo:证件号码识别涉及区域定位、模板匹配与 Tesseract 训练数据;美颜涉及积分图、局部均方差滤波、遮罩与高斯权重融合;眼睛跟踪则落到黑眼球定位与渲染优化。 作者贾志刚具备多年 Java 图形图像开发与讲学经验,行文偏工程口吻,Code 与思路同时给,并反复提醒性能与内存问题、何时该走 NDK、多次 JNI 调用的代价——这类经验很难从 API 文档里读到。书末还留有可延伸的视频课程线索,方便读完继续进阶。适合有一定 Android 基础、想在应用里落地视觉功能的工程师。

Who it's for

A good fit for

  • 已有 Android 开发基础,想为 App 增加图像识别、人脸处理功能的工程师
  • 正在做毕业设计或技术项目,需要完整视觉案例流程与代码思路的学生
  • 习惯「边写代码边学」、希望少读公式多动手的 OpenCV 入门者
  • 想了解如何把 C++ 视觉算法通过 NDK 接入 Android 的开发者

Not a good fit for

  • 完全没有 Java 和 Android 基础、需要先补语言与四大组件的零基础读者
  • 期望系统学习计算机视觉数学原理与算法推导的研究型读者
  • 寻找最新版 OpenCV 4.x/Kotlin/Compose 现代移动端开发实践的人

Reading tips

  1. 先照第 1 章的步骤把 OpenCV Android SDK 环境跑通并成功构建演示 App,再开始后续章节。
  2. 阅读时对照代码实践:Mat 与 Bitmap 的转换、像素操作等章节建议亲手写一遍,避免只读不练。
  3. 进入第 8~10 章前先确定一个自己的小目标(如证件识别或美颜),带着需求读案例,效果更好。
  4. 注意书中版本年代较早(2018 年),SIFT、SURF 等在新版 OpenCV 中位置有变化,请对照所用版本的 API 文档调试。

About the publisher

China Machine Press China · Founded in 1950

In addition to science and technology and professional publishing, the books in our catalog from China Machine Press also reflect a sustained focus on psychology, computing, management, finance and economics, and social sciences. In psychology, the catalog includes works by C. G. Jung and introductions to analytical psychology, as well as applied topics such as stress and health, and addiction and healing. In computing, it features Structure and Interpretation of Computer Programs (JavaScript Edition). Management and finance titles include Administrative Behavior (4th Edition), The Price of Inequality (Collector's Edition), and This Time Is Different: Eight Centuries of Financial Folly (Commemorative Edition). In the philosophy and history of science, there is The Worldview: The Third Edition. Relevant authors include C. G. Jung, William McGuire, Sonu Shamdasani, and Gabor Maté. Public information is limited; the above summarizes the publisher's profile based solely on the books in our catalog.

Contents

  1. Preface
  2. Part One A Systematic Study of OpenCV Image Processing
  3. Chapter 1 The OpenCV Android Development Framework (1.1 What Is OpenCV 1.2 Setting Up the Development Environment 1.3 Building the Demo App 1.4 Taking Photos and Selecting Images 1.5 Summary)
  4. Chapter 2 Mat and Bitmap Objects (2.1 Mat Objects 2.2 Bitmap Objects in Android 2.3 Drawing and Filling Basic Shapes 2.4 Using and Converting Mat and Bitmap 2.5 Summary)
  5. Chapter 3 Mat Pixel Operations (3.1 Reading and Writing Pixels 3.2 Image Channels and Mean/Variance Calculation 3.3 Arithmetic Operations and Adjusting Image Brightness and Contrast 3.4 Weight-Based Image Blending 3.5 Other Pixel Operations on Mat 3.6 Summary)
  6. Chapter 4 Image Operations (4.1 Blurring 4.2 Statistical Ranking Filters 4.3 Edge-Preserving Filters 4.4 Custom Filters 4.5 Morphological Operations 4.6 Thresholding and Thresholds 4.7 Summary)
  7. Chapter 5 Basic Feature Detection (5.1 Gradient Computation 5.2 The Laplacian Operator 5.3 Canny Edge Detection 5.4 Hough Line Detection 5.5 Hough Circle Detection 5.6 Contour Discovery and Drawing 5.7 Contour Analysis 5.8 Image Histograms 5.9 Template Matching 5.10 Summary)
  8. Chapter 6 Feature Detection and Matching (6.1 Harris Corner Detection 6.2 Shi-Tomasi Corner Detection 6.3 SURF Feature Detection 6.4 SIFT Feature Detection 6.5 Detectors and Descriptors in Feature2D 6.6 Finding Known Objects with Feature Matching 6.7 Cascade Classifiers and Face Detection 6.8 Summary)
  9. Chapter 7 Using the Camera (7.1 Using JavaCameraView 7.2 Landscape and Portrait Display 7.3 Processing Camera Preview Frames 7.4 Implementing Face Detection in Preview Frames 7.5 Summary)
  10. Part Two OpenCV4Android in Practice
  11. Chapter 8 OCR Recognition (8.1 What Is OCR 8.2 The Open-Source OCR Framework Tesseract 8.3 Recognizing ID Card Numbers 8.4 Improving OCR Accuracy 8.5 Summary)
  12. Chapter 9 Face Beautification (9.1 Integral Image Calculation 9.2 Local Mean-Variance Filtering 9.3 Mask Layer Generation 9.4 Gaussian Weight Blending 9.5 Edge Enhancement 9.6 Implementing Beautification 9.7 Summary)
  13. Chapter 10 Real-Time Eye Tracking and Rendering (10.1 Interface Display and Camera Preview 10.2 Face Detection and Tracking 10.3 Finding Eye Candidate Regions 10.4 Eye Detection 10.5 Black Pupil Localization 10.6 Rendering and Optimization 10.7 Summary)

FAQ

这本书需要什么前置基础?
需要基本的 Java 语法和 Android 开发经验(能建工程、会 Activity 与界面布局),以及基础 C/C++ 读代码能力,因为案例中会涉及 NDK 层的实现。
书里的代码是 Java 还是 C++?
以 Java 层调用 OpenCV 的 Java API 为主线,同时在性能敏感的环节(如美颜、预览帧处理)引入 NDK 方式编写 C++ 代码,两者结合。
书中的实案例有哪些?
共三个:结合 Tesseract 的 OCR 证件号码识别、基于积分图与滤波的人脸美颜、以及人眼实时跟踪与渲染,均包含算法流程设计与编码实现步骤。
2018 年的书,现在学还适用吗?
图像处理的核心概念(Mat、滤波、边缘检测、特征匹配)并不过时,仍具参考价值;但 SDK 配置、Gradle 与部分 API 已更新,需对照当前 OpenCV 与 Android 文档调整。
这本书适合当作 OpenCV 入门书吗?
适合以 Android 应用为目标的学习者作为入门+实战用书;若想系统学视觉理论,建议搭配一本偏原理的教材,本书更侧重工程实践与 API 使用。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

About the author

Jia Zhigang Author · China

Jia Zhigang is a Chinese writer, journalist and sports commentator. A graduate of Dalian University of Technology, he has worked as a reporter for the Shenzhen Press Group and as vice chairman of the Guangdong Network Writers Association. He is known for popular history writing, most notably the multi-volume series Speaking of the Spring and Autumn Period, which traces the rise and fall of the feudal states and the fates of their figures, with volumes devoted to the Confucius family, the character of sages, the rise and fall of Wu and Yue, the rivalry of Jin and Chu, the feuds of Qin and Jin, the rise of Qi and Chu, and the great disorder of the age. His works are often classified as history reading, and also touch on Eastern philosophy and law. He has appeared as a speaker on CCTV's Lecture Room and now lives in the United States as a Chinese writer. Public information is limited, and his birth and death years are unknown; twelve of his works are held in this collection.

More by the same author

Top rated in the same category