资源简介
1、Mastering OpenCV with Practical Computer Vision Projects 这本书的随书代码。
2、代码目录为:
Chapter1_AndroidCartoonifier
Chapter2_iPhoneAR
Chapter3_MarkerlessAR
Chapter4_StructureFromMotion
Chapter5_NumberPlateRecognition
Chapter6_NonRigidFaceTracking
Chapter7_HeadPoseEstimation
Chapter8_FaceRecognition
Chapter9_FluidInteractionUsingKinect
代码片段和文件信息
/*****************************************************************************
* Cartoonifier for Android.
******************************************************************************
* by Shervin Emami 5th Dec 2012 (shervin.emami@gmail.com)
* http://www.shervinemami.info/
******************************************************************************
* Ch1 of the book “Mastering OpenCV with Practical Computer Vision Projects“
* Copyright Packt Publishing 2012.
* http://www.packtpub.com/cool-projects-with-opencv/book
*****************************************************************************/
#include
#include
#include
#include
#include “cartoon.h“
#include “ImageUtils.h“ // Handy functions for debugging OpenCV images by Shervin Emami.
using namespace std;
using namespace cv;
extern “C“ {
// Just show the plain camera image without modifying it.
JNIEXPORT void JNICALL Java_com_Cartoonifier_CartoonifierView_ShowPreview(JNIEnv* env jobject
jint width jint height jbyteArray yuv jintArray bgra)
{
// Get native access to the given Java arrays.
jbyte* _yuv = env->GetByteArrayElements(yuv 0);
jint* _bgra = env->GetIntArrayElements(bgra 0);
// Prepare a cv::Mat that points to the YUV420sp data.
Mat myuv(height + height/2 width CV_8UC1 (uchar *)_yuv);
// Prepare a cv::Mat that points to the BGRA output data.
Mat mbgra(height width CV_8UC4 (uchar *)_bgra);
// Convert the color format from the camera‘s
// NV21 “YUV420sp“ format to an Android BGRA color image.
cvtColor(myuv mbgra CV_YUV420sp2BGRA);
// OpenCV can now access/modify the BGRA image if we want ...
// Release the native lock we placed on the Java arrays.
env->ReleaseIntArrayElements(bgra _bgra 0);
env->ReleaseByteArrayElements(yuv _yuv 0);
}
DECLARE_TIMING(CartoonifyImage);
// Modify the camera image using the Cartoonifier filter.
JNIEXPORT void JNICALL Java_com_Cartoonifier_CartoonifierView_CartoonifyImage(JNIEnv* env jobject
jint width jint height jbyteArray yuv jintArray bgra
jboolean sketchMode jboolean alienMode jboolean evilMode jboolean debugMode)
{
START_TIMING(CartoonifyImage);
// Get native access to the given Java arrays.
jbyte* _yuv = env->GetByteArrayElements(yuv 0);
jint* _bgra = env->GetIntArrayElements(bgra 0);
// Input color format (from camera):
// “myuv“ is the color image in the camera‘s native NV21 YUV 420 “semi-planar“ format which means
// the first part of the array is the grayscale pixel array followed by a quarter-sized pixel
// array that is the U & V color channels interleaved. So if we just want to access a grayscale
// image we can get it directly from the 1st part of a YUV420sp semi-planar image without any
// conversions. But if we want a color image (eg: BGRA color format that i
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 444 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Android\.classpath
文件 5500 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Android\.cproject
文件 2972 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Android\.project
文件 617 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Android\.settings\org.eclipse.jdt.core.prefs
文件 1349 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Android\AndroidManifest.xm
文件 1538 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Android\jni\Android.mk
文件 84 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Android\jni\Application.mk
文件 5308 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Android\jni\jni_part.cpp
文件 361 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Android\project.properties
文件 5760 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Android\res\drawable\icon.png
文件 118 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Android\res\values\strings.xm
文件 4003 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Android\src\com\Cartoonifier\CartoonifierApp.java
文件 10271 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Android\src\com\Cartoonifier\CartoonifierView.java
文件 9315 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Android\src\com\Cartoonifier\CartoonifierViewba
文件 13555 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Desktop\cartoon.cpp
文件 1634 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Desktop\cartoon.h
文件 290 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Desktop\CMakeLists.txt
文件 21322 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Desktop\ImageUtils.h
文件 87458 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Desktop\ImageUtils_0.7.cpp
文件 6763 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\Cartoonifier_Desktop\main_desktop.cpp
文件 2952 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\README.txt
文件 445637 2013-03-06 22:42 code-master\Chapter1_AndroidCartoonifier\screenshot.png
文件 773 2013-03-06 22:42 code-master\Chapter2_iPhoneAR\Example_Markerba
文件 2612 2013-03-06 22:42 code-master\Chapter2_iPhoneAR\Example_Markerba
文件 947 2013-03-06 22:42 code-master\Chapter2_iPhoneAR\Example_Markerba
文件 1917 2013-03-06 22:42 code-master\Chapter2_iPhoneAR\Example_Markerba
文件 1385 2013-03-06 22:42 code-master\Chapter2_iPhoneAR\Example_Markerba
文件 2195 2013-03-06 22:42 code-master\Chapter2_iPhoneAR\Example_Markerba
文件 400 2013-03-06 22:42 code-master\Chapter2_iPhoneAR\Example_Markerba
文件 1558 2013-03-06 22:42 code-master\Chapter2_iPhoneAR\Example_Markerba
............此处省略346个文件信息
相关资源
- opencv_java342.dylib.zip
- opencv操作银行卡图片识别数字
- opencv-340.jar
- 基于opencv+java的银行卡图片处理
- android平台的车牌识别
- opencv_java411.zip
- 在android手机上使用opencv库识别静态人
- opencv图像处理(灰化,滤色,合成)
- openCv+java+spring boot
- window opencv_java320.dll
- 深入OpenCV Android应用开发中文高清完整
- android OpenCV研究之动态人脸识别
- javaOpenCV简单实现类似“全能扫描王”
- opencv-2.4.13.zip
- 《OpenCV Android开发实战》_贾志刚.pdf
- javacv-platform-1.5.1.zip
- opencv-4.2.0-vc14_vc15.7z
- opencv-4.1.2-android-sdk20191212.zip
- java_opencv人脸识别.zip
- opencv用到的jar包
- opencvextra_nonfree_install.zip
- OpenCV-Android-4.0.1
- OpenCV Android PDF+源码
- opencv.exe 安装包
- android端使用openCV实现车牌检测
- opencv-341.jar
- 4.3读取摄像头并显示
- java openCV 人脸识别 找茬
- opencv java api 手册
- opencv 2.4.9 2.4.10等版本
评论
共有 条评论