SlideShare a Scribd company logo
1 of 14
©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);

More Related Content

More from Industrial Technology Research Institute (ITRI)(工業技術研究院, 工研院)

More from 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
 

Recently uploaded

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

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);