SlideShare uma empresa Scribd logo
1 de 14
Baixar para ler offline
©SIProp Project, 2006-2008 1
Supporting OpenCV 3.0 for
Noritsuna Imamura
noritsuna@siprop.org
"Mastering OpenCV Android
Application Programming"
©SIProp Project, 2006-2008 2
What’s this?
"Mastering OpenCV Android Application
Programming" is one of programming book.
Published Site:
https://www.packtpub.com/application-
development/mastering-opencv-android-application-
programming
I explain:
How to Rewrite the sample
source codes to OpenCV 3.0
Additions of New Features on
OpenCV 3.0
©SIProp Project, 2006-2008 3
All Chapters
Transition Guide for OpenCV 3.0
http://docs.opencv.org/master/db/dfa/tutorial_transi
tion_guide.html
OpenCV Version for Loarder
OLD:
OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSIO
N_2_4_10, this, mLoaderCallback);
NEW:
OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSIO
N_3_0_0, this, mLoaderCallback)
©SIProp Project, 2006-2008 4
Chapter 1
Add THRESH_TRIANGLE to threshold options.
THRESH_TRIANGLE:
Use Triangle algorithm to choose the optimal threshold value
©SIProp Project, 2006-2008 5
Chapter 2
"Core" class to "Imgproc" class
Old:
Core.circle(corners, new Point(i, j), 5, new
Scalar(r.nextInt(255)), 2);
Core.line(houghLines, pt1, pt2, new Scalar(255, 0, 0), 1);
Core.circle(houghCircles,center,r, new Scalar(255,0,0),1);
Core.rectangle(people, facesArray[i].tl(), facesArray[i].br(),
new Scalar(100), 3);
New:
Imgproc.circle(corners, new Point(i, j), 5, new
Scalar(r.nextInt(255)), 2);
Imgproc.line(houghLines, pt1, pt2, new Scalar(255, 0, 0), 1);
Imgproc.circle(houghCircles,center,r, new Scalar(255,0,0),1);
Imgproc.rectangle(people, facesArray[i].tl(), facesArray[i].br(),
new Scalar(100), 3);
©SIProp Project, 2006-2008 6
Chapter 3
Add "AKAZE(Accelerated KAZE)" algorithm in
FeatureDetector & DescriptorExtractor.
"AKAZE" algorithm
http://docs.opencv.org/3.0-
beta/modules/features2d/doc/feature_detection_and_descri
ption.html#akaze
©SIProp Project, 2006-2008 7
Chapter 4
"Core" class to "Imgproc" class
Old:
Core.rectangle(mRgba, facesArray[i].tl(), facesArray[i].br(),
new Scalar(100), 3);
New:
Imgproc.rectangle(mRgba, facesArray[i].tl(), facesArray[i].br(),
new Scalar(100), 3);
Removed "NativeCameraView" class in OpenCV
3.0
OpenCV 3.0 has "JavaCameraView" only.
©SIProp Project, 2006-2008 8
Chapter 5
"Core" class to "Imgproc" class
Old:
Core.line(mGray, prevList.get(i), nextList.get(i), color);
Core.circle(mGray, p, 5, new Scalar(255));
New:
Imgproc.line(mGray, prevList.get(i), nextList.get(i), color);
Imgproc.circle(mGray, p, 5, new Scalar(255));
©SIProp Project, 2006-2008 9
Chapter 6
Change Include file dir
Old:
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <opencv2/stitching/stitcher.hpp>
New:
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include <opencv2/stitching.hpp>
Supporting ARM 64bits in Application.mk
Old:
APP_ABI := armeabi-v7a
New:
APP_ABI := armeabi-v7a arm64-v8a
©SIProp Project, 2006-2008 10
Chapter 7 1/5
"Core" class to "Imgproc" class
Old:
Core.rectangle(temp, new Point(temp.cols()/2 - 200,
temp.rows() / 2 - 200), new Point(temp.cols() / 2 + 200,
temp.rows() / 2 + 200), new Scalar(255,255,255),1);
New:
Imgproc.rectangle(temp, new Point(temp.cols()/2 - 200,
temp.rows() / 2 - 200), new Point(temp.cols() / 2 + 200,
temp.rows() / 2 + 200), new Scalar(255,255,255),1);
"ML" Package is modified.
Old Name Rule:
org.opencv.ml.CvXXX
org.opencv.ml.CvXXXPrames
©SIProp Project, 2006-2008 11
Chapter 7 2/5
Main class & Parameter class are separated.
New Name Rule:
org.opencv.ml.XXX
Main class & Parameter class are combined.
Ex.
CvKNearest -> KNearest
CvSVM -> SVM
©SIProp Project, 2006-2008 12
Chapter 7 3/5
Constructor is removed, change to create()
static method.
Old:
new KNearest();
new CvSVM();
New:
KNearest.create();
SVM.create();
©SIProp Project, 2006-2008 13
Chapter 7 4/5
arguments of "train()" method is changed.
Old:
knn.train(training_images, training_labels, new Mat(), false, 10,
false);
svm.train(training_images, training_labels);
New:
knn.train(training_images, Ml.ROW_SAMPLE, training_labels);
svm.train(training_images, Ml.ROW_SAMPLE, training_labels);
60k data is too big for SVM. Please modify the
small data.
Ex.
total_images = temp.getInt(); -> total_images = 100;
©SIProp Project, 2006-2008 14
Chapter 7 5/5
"KNearest.find_nearest()" method is changed
the new name.
Old:
knn.find_nearest(test, 10, results, new Mat(), new Mat());
New:
knn.findNearest(test, 10, results);

Mais conteúdo relacionado

Mais de Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院)

Mais de Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院) (20)

What is the world where you can make your own semiconductors?
What is the world where you can make your own semiconductors?What is the world where you can make your own semiconductors?
What is the world where you can make your own semiconductors?
 
半導体製造(TinyTapeout)に挑戦しよう!
半導体製造(TinyTapeout)に挑戦しよう!半導体製造(TinyTapeout)に挑戦しよう!
半導体製造(TinyTapeout)に挑戦しよう!
 
Introduction of ISHI-KAI with OpenMPW
Introduction of ISHI-KAI with OpenMPWIntroduction of ISHI-KAI with OpenMPW
Introduction of ISHI-KAI with OpenMPW
 
Kernel/VMレイヤーを自分色に染める!By ISHI会
Kernel/VMレイヤーを自分色に染める!By ISHI会Kernel/VMレイヤーを自分色に染める!By ISHI会
Kernel/VMレイヤーを自分色に染める!By ISHI会
 
Principle Representation of The 8 Qubits Quantum Computer by RaspberryPi
Principle Representation of The 8 Qubits Quantum Computer by RaspberryPiPrinciple Representation of The 8 Qubits Quantum Computer by RaspberryPi
Principle Representation of The 8 Qubits Quantum Computer by RaspberryPi
 
Microwaveguquantum
MicrowaveguquantumMicrowaveguquantum
Microwaveguquantum
 
The easiest way of setup QuTiP on Windows
The easiest way of setup QuTiP on WindowsThe easiest way of setup QuTiP on Windows
The easiest way of setup QuTiP on Windows
 
GNU Radio Study for Super beginner
GNU Radio Study for Super beginnerGNU Radio Study for Super beginner
GNU Radio Study for Super beginner
 
The Self-Contained SDR Satellite Grand Station with Raspberry Pi 3
The Self-Contained SDR Satellite Grand Station with Raspberry Pi 3The Self-Contained SDR Satellite Grand Station with Raspberry Pi 3
The Self-Contained SDR Satellite Grand Station with Raspberry Pi 3
 
Self‐Contained SDR Grand Station with Raspberry Pi 3
Self‐Contained SDR Grand Station with Raspberry Pi 3Self‐Contained SDR Grand Station with Raspberry Pi 3
Self‐Contained SDR Grand Station with Raspberry Pi 3
 
衛星追尾用パラボラアンテナ建設記
衛星追尾用パラボラアンテナ建設記衛星追尾用パラボラアンテナ建設記
衛星追尾用パラボラアンテナ建設記
 
Zedroid - Android (5.0 and later) on Zedboard
Zedroid - Android (5.0 and later) on ZedboardZedroid - Android (5.0 and later) on Zedboard
Zedroid - Android (5.0 and later) on Zedboard
 
How to Build & Use OpenCL on OpenCV & Android NDK
How to Build & Use OpenCL on OpenCV & Android NDKHow to Build & Use OpenCL on OpenCV & Android NDK
How to Build & Use OpenCL on OpenCV & Android NDK
 
3D Printed Google Cardboard for workshop
3D Printed Google Cardboard for workshop3D Printed Google Cardboard for workshop
3D Printed Google Cardboard for workshop
 
計算機(物理)
計算機(物理)計算機(物理)
計算機(物理)
 
Resume
ResumeResume
Resume
 
How to Make a Scanning Drone in Chinese
How to Make a Scanning Drone in ChineseHow to Make a Scanning Drone in Chinese
How to Make a Scanning Drone in Chinese
 
How to Use OpenMP on Native Activity
How to Use OpenMP on Native ActivityHow to Use OpenMP on Native Activity
How to Use OpenMP on Native Activity
 
How to Use OpenGL/ES on Native Activity
How to Use OpenGL/ES on Native ActivityHow to Use OpenGL/ES on Native Activity
How to Use OpenGL/ES on Native Activity
 
How to Make Hand Detector on Native Activity with OpenCV
How to Make Hand Detector on Native Activity with OpenCVHow to Make Hand Detector on Native Activity with OpenCV
How to Make Hand Detector on Native Activity with OpenCV
 

Último

Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?IES VE
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 

Último (20)

Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 

Supporting OpenCV 3.0 for "Mastering OpenCV Android Application Programming"

  • 1. ©SIProp Project, 2006-2008 1 Supporting OpenCV 3.0 for Noritsuna Imamura noritsuna@siprop.org "Mastering OpenCV Android Application Programming"
  • 2. ©SIProp Project, 2006-2008 2 What’s this? "Mastering OpenCV Android Application Programming" is one of programming book. Published Site: https://www.packtpub.com/application- development/mastering-opencv-android-application- programming I explain: How to Rewrite the sample source codes to OpenCV 3.0 Additions of New Features on OpenCV 3.0
  • 3. ©SIProp Project, 2006-2008 3 All Chapters Transition Guide for OpenCV 3.0 http://docs.opencv.org/master/db/dfa/tutorial_transi tion_guide.html OpenCV Version for Loarder OLD: OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSIO N_2_4_10, this, mLoaderCallback); NEW: OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSIO N_3_0_0, this, mLoaderCallback)
  • 4. ©SIProp Project, 2006-2008 4 Chapter 1 Add THRESH_TRIANGLE to threshold options. THRESH_TRIANGLE: Use Triangle algorithm to choose the optimal threshold value
  • 5. ©SIProp Project, 2006-2008 5 Chapter 2 "Core" class to "Imgproc" class Old: Core.circle(corners, new Point(i, j), 5, new Scalar(r.nextInt(255)), 2); Core.line(houghLines, pt1, pt2, new Scalar(255, 0, 0), 1); Core.circle(houghCircles,center,r, new Scalar(255,0,0),1); Core.rectangle(people, facesArray[i].tl(), facesArray[i].br(), new Scalar(100), 3); New: Imgproc.circle(corners, new Point(i, j), 5, new Scalar(r.nextInt(255)), 2); Imgproc.line(houghLines, pt1, pt2, new Scalar(255, 0, 0), 1); Imgproc.circle(houghCircles,center,r, new Scalar(255,0,0),1); Imgproc.rectangle(people, facesArray[i].tl(), facesArray[i].br(), new Scalar(100), 3);
  • 6. ©SIProp Project, 2006-2008 6 Chapter 3 Add "AKAZE(Accelerated KAZE)" algorithm in FeatureDetector & DescriptorExtractor. "AKAZE" algorithm http://docs.opencv.org/3.0- beta/modules/features2d/doc/feature_detection_and_descri ption.html#akaze
  • 7. ©SIProp Project, 2006-2008 7 Chapter 4 "Core" class to "Imgproc" class Old: Core.rectangle(mRgba, facesArray[i].tl(), facesArray[i].br(), new Scalar(100), 3); New: Imgproc.rectangle(mRgba, facesArray[i].tl(), facesArray[i].br(), new Scalar(100), 3); Removed "NativeCameraView" class in OpenCV 3.0 OpenCV 3.0 has "JavaCameraView" only.
  • 8. ©SIProp Project, 2006-2008 8 Chapter 5 "Core" class to "Imgproc" class Old: Core.line(mGray, prevList.get(i), nextList.get(i), color); Core.circle(mGray, p, 5, new Scalar(255)); New: Imgproc.line(mGray, prevList.get(i), nextList.get(i), color); Imgproc.circle(mGray, p, 5, new Scalar(255));
  • 9. ©SIProp Project, 2006-2008 9 Chapter 6 Change Include file dir Old: #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include <opencv2/stitching/stitcher.hpp> New: #include "opencv2/imgproc.hpp" #include "opencv2/highgui.hpp" #include <opencv2/stitching.hpp> Supporting ARM 64bits in Application.mk Old: APP_ABI := armeabi-v7a New: APP_ABI := armeabi-v7a arm64-v8a
  • 10. ©SIProp Project, 2006-2008 10 Chapter 7 1/5 "Core" class to "Imgproc" class Old: Core.rectangle(temp, new Point(temp.cols()/2 - 200, temp.rows() / 2 - 200), new Point(temp.cols() / 2 + 200, temp.rows() / 2 + 200), new Scalar(255,255,255),1); New: Imgproc.rectangle(temp, new Point(temp.cols()/2 - 200, temp.rows() / 2 - 200), new Point(temp.cols() / 2 + 200, temp.rows() / 2 + 200), new Scalar(255,255,255),1); "ML" Package is modified. Old Name Rule: org.opencv.ml.CvXXX org.opencv.ml.CvXXXPrames
  • 11. ©SIProp Project, 2006-2008 11 Chapter 7 2/5 Main class & Parameter class are separated. New Name Rule: org.opencv.ml.XXX Main class & Parameter class are combined. Ex. CvKNearest -> KNearest CvSVM -> SVM
  • 12. ©SIProp Project, 2006-2008 12 Chapter 7 3/5 Constructor is removed, change to create() static method. Old: new KNearest(); new CvSVM(); New: KNearest.create(); SVM.create();
  • 13. ©SIProp Project, 2006-2008 13 Chapter 7 4/5 arguments of "train()" method is changed. Old: knn.train(training_images, training_labels, new Mat(), false, 10, false); svm.train(training_images, training_labels); New: knn.train(training_images, Ml.ROW_SAMPLE, training_labels); svm.train(training_images, Ml.ROW_SAMPLE, training_labels); 60k data is too big for SVM. Please modify the small data. Ex. total_images = temp.getInt(); -> total_images = 100;
  • 14. ©SIProp Project, 2006-2008 14 Chapter 7 5/5 "KNearest.find_nearest()" method is changed the new name. Old: knn.find_nearest(test, 10, results, new Mat(), new Mat()); New: knn.findNearest(test, 10, results);