SlideShare uma empresa Scribd logo
1 de 19
OpenCv & Android
Working with images

Badrinath Kulkarni
GDG Bangalore
What is OpenCv ?
Open Source Computer Vision Library
OpenCV is an open source computer vision and machine learning software
library.
Windows, Linux/Mac, Android, IOS
Current version 2.4.6
Using in Android
Installation 1/3
Download OpenCv from SourceForge. Currently it’s OpenCV-2.4.6-android-sdk.zip
Installation 2/3
Import OpenCV library and samples to
the Eclipse.

• Library
• Samples

Android NDK must be
installed & configured.
OpenCv Manager
• Published on
Google Play
• Compact apk-size
• Hardware specific
optimizations
• Automatic updates
Sudoku App
Pre - processing
Java

Imgproc.medianBlur(src, dst, 3);

input.jpg

median_3x3.jpg
Registration
Registration is the determination of a geometrical transformation that aligns
points in one view of an object with corresponding points in another view of that
Object.

input.jpg

registered_image.jpg | size : 640X640
Step 1/4 : Detect horizontal lines
Java

Imgproc.Sobel(src, dst, ddepth, dx, dy, ksize, scale, delta);

medin_3x3.jpg

sobel_horizontal.jpg

sobel_horizontal_binarized.jpg
Step 2/4 : Detect vertical lines
Java

Imgproc.Sobel(src, dst, ddepth, dx, dy, ksize, scale, delta);

medin_3x3.jpg

sobel_vertical.jpg

sobel_vertical_binarized.jpg
Step 3/4 : Detect corner points

Imgporc.HoughLinesP();

Detect periphery lines

Imgporc.HoughLinesP();

Java

Imgproc.HoughLinesP(image, lines, rho, theta, threshold,
minLineLength, maxLineGap);
Step 4/4 : Homography
Java

Mat transformM = Calib3d.findHomography(srcPts, dstPts);

src points : intersection points
dst points : (1,1) (1,640) (640,1) (640,640)

median_3x3.jpg
registered_image.jpg | size : 640X640
Java

Imgproc.warpPerspective(src, dst, transformM, dsize);
Thresholding
Java

Imgproc.adaptiveThreshold(src, dst, maxValue, adaptiveMethod, thresholdType, blockSize, delta);

registered_image.jpg

threshold_image.jpg
Number detection 1/2
Remove unwanted lines.

threshold_image.jpg

data_image.jpg
Number detection 2/2

NCC ~ 1

Java

Imgproc.findContours(image, contours, hierarchy, mode, method);
Imgproc.boundingRect(contourPoints);
Imgproc.resize(src, dst, dsize);
Final output
The extracted matrix can be given to any Sudoku solver engine and the solved output can be
shown to the user.
5

6
5

6
2

7

3
1

1
6

8

4

5
7

3

6

2
6

1

4

9

8

9
9

9X9 matrix with data from the image
Thank You!

badrinath@gtugs.org

http://ibadrinath.in
@ibadrinath

Mais conteúdo relacionado

Mais procurados

Native development kit (ndk) introduction
Native development kit (ndk)  introductionNative development kit (ndk)  introduction
Native development kit (ndk) introductionRakesh Jha
 
NDK Programming in Android
NDK Programming in AndroidNDK Programming in Android
NDK Programming in AndroidArvind Devaraj
 
Android NDK and the x86 Platform
Android NDK and the x86 PlatformAndroid NDK and the x86 Platform
Android NDK and the x86 PlatformSebastian Mauer
 
Oscon 2014 def core review
Oscon 2014 def core reviewOscon 2014 def core review
Oscon 2014 def core reviewrhirschfeld
 
Pulumi iac on gcp
Pulumi iac on gcpPulumi iac on gcp
Pulumi iac on gcpVishwas N
 
"OpenCV for Embedded: Lessons Learned," a Presentation from itseez
"OpenCV for Embedded: Lessons Learned," a Presentation from itseez"OpenCV for Embedded: Lessons Learned," a Presentation from itseez
"OpenCV for Embedded: Lessons Learned," a Presentation from itseezEdge AI and Vision Alliance
 

Mais procurados (7)

Native development kit (ndk) introduction
Native development kit (ndk)  introductionNative development kit (ndk)  introduction
Native development kit (ndk) introduction
 
NDK Programming in Android
NDK Programming in AndroidNDK Programming in Android
NDK Programming in Android
 
Android NDK and the x86 Platform
Android NDK and the x86 PlatformAndroid NDK and the x86 Platform
Android NDK and the x86 Platform
 
Oscon 2014 def core review
Oscon 2014 def core reviewOscon 2014 def core review
Oscon 2014 def core review
 
Android ndk: Entering the native world
Android ndk: Entering the native worldAndroid ndk: Entering the native world
Android ndk: Entering the native world
 
Pulumi iac on gcp
Pulumi iac on gcpPulumi iac on gcp
Pulumi iac on gcp
 
"OpenCV for Embedded: Lessons Learned," a Presentation from itseez
"OpenCV for Embedded: Lessons Learned," a Presentation from itseez"OpenCV for Embedded: Lessons Learned," a Presentation from itseez
"OpenCV for Embedded: Lessons Learned," a Presentation from itseez
 

Destaque

CMS-Garden 2013 - How we brought Joomla! to the CeBIT
CMS-Garden 2013 - How we brought Joomla! to the CeBITCMS-Garden 2013 - How we brought Joomla! to the CeBIT
CMS-Garden 2013 - How we brought Joomla! to the CeBITDavid Jardin
 
Επιστολή Αντιπεριφεριεάρχη Χίου σχετικά με τις ραδιοτηλεοπτικές συχνότητες κα...
Επιστολή Αντιπεριφεριεάρχη Χίου σχετικά με τις ραδιοτηλεοπτικές συχνότητες κα...Επιστολή Αντιπεριφεριεάρχη Χίου σχετικά με τις ραδιοτηλεοπτικές συχνότητες κα...
Επιστολή Αντιπεριφεριεάρχη Χίου σχετικά με τις ραδιοτηλεοπτικές συχνότητες κα...Notis Mitarachi
 
SEMrush'in Around - SEMrush Presentation
SEMrush'in Around - SEMrush PresentationSEMrush'in Around - SEMrush Presentation
SEMrush'in Around - SEMrush PresentationGreenlane
 
Angle citra math 3_e
Angle citra math 3_eAngle citra math 3_e
Angle citra math 3_eNur Fadzri
 
Raju Resume
Raju ResumeRaju Resume
Raju ResumeRaju KR
 
Music video Techniques
Music video TechniquesMusic video Techniques
Music video TechniquesNatalia Linda
 
Films based on real life and books
Films based on real life and booksFilms based on real life and books
Films based on real life and booksBrad Morris
 
Gradle 3.0: Unleash the Daemon!
Gradle 3.0: Unleash the Daemon!Gradle 3.0: Unleash the Daemon!
Gradle 3.0: Unleash the Daemon!Eric Wendelin
 
Generos musicales
Generos musicalesGeneros musicales
Generos musicalesdaniel4125
 
OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012Wingston
 
Rpp matematika sma xii bab 1 (matriks)
Rpp matematika sma xii bab 1 (matriks)Rpp matematika sma xii bab 1 (matriks)
Rpp matematika sma xii bab 1 (matriks)eli priyatna laidan
 
Image Processing with OpenCV
Image Processing with OpenCVImage Processing with OpenCV
Image Processing with OpenCVdebayanin
 
Object detection
Object detectionObject detection
Object detectionSomesh Vyas
 
Rpp matematika kelas 6 semester 2
Rpp matematika kelas 6 semester 2Rpp matematika kelas 6 semester 2
Rpp matematika kelas 6 semester 2Rachmah Safitri
 
FGM presentation University of Bedfordshire slide handouts
FGM presentation University of Bedfordshire slide handoutsFGM presentation University of Bedfordshire slide handouts
FGM presentation University of Bedfordshire slide handoutsNanci Hogan
 

Destaque (17)

Khulood Tohmaz
Khulood TohmazKhulood Tohmaz
Khulood Tohmaz
 
CMS-Garden 2013 - How we brought Joomla! to the CeBIT
CMS-Garden 2013 - How we brought Joomla! to the CeBITCMS-Garden 2013 - How we brought Joomla! to the CeBIT
CMS-Garden 2013 - How we brought Joomla! to the CeBIT
 
Επιστολή Αντιπεριφεριεάρχη Χίου σχετικά με τις ραδιοτηλεοπτικές συχνότητες κα...
Επιστολή Αντιπεριφεριεάρχη Χίου σχετικά με τις ραδιοτηλεοπτικές συχνότητες κα...Επιστολή Αντιπεριφεριεάρχη Χίου σχετικά με τις ραδιοτηλεοπτικές συχνότητες κα...
Επιστολή Αντιπεριφεριεάρχη Χίου σχετικά με τις ραδιοτηλεοπτικές συχνότητες κα...
 
SEMrush'in Around - SEMrush Presentation
SEMrush'in Around - SEMrush PresentationSEMrush'in Around - SEMrush Presentation
SEMrush'in Around - SEMrush Presentation
 
Angle citra math 3_e
Angle citra math 3_eAngle citra math 3_e
Angle citra math 3_e
 
Raju Resume
Raju ResumeRaju Resume
Raju Resume
 
Music video Techniques
Music video TechniquesMusic video Techniques
Music video Techniques
 
Films based on real life and books
Films based on real life and booksFilms based on real life and books
Films based on real life and books
 
Gradle 3.0: Unleash the Daemon!
Gradle 3.0: Unleash the Daemon!Gradle 3.0: Unleash the Daemon!
Gradle 3.0: Unleash the Daemon!
 
Generos musicales
Generos musicalesGeneros musicales
Generos musicales
 
Rpp 9 pk
Rpp 9 pkRpp 9 pk
Rpp 9 pk
 
OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012
 
Rpp matematika sma xii bab 1 (matriks)
Rpp matematika sma xii bab 1 (matriks)Rpp matematika sma xii bab 1 (matriks)
Rpp matematika sma xii bab 1 (matriks)
 
Image Processing with OpenCV
Image Processing with OpenCVImage Processing with OpenCV
Image Processing with OpenCV
 
Object detection
Object detectionObject detection
Object detection
 
Rpp matematika kelas 6 semester 2
Rpp matematika kelas 6 semester 2Rpp matematika kelas 6 semester 2
Rpp matematika kelas 6 semester 2
 
FGM presentation University of Bedfordshire slide handouts
FGM presentation University of Bedfordshire slide handoutsFGM presentation University of Bedfordshire slide handouts
FGM presentation University of Bedfordshire slide handouts
 

Semelhante a [Devfest]open cv & android

OpenCV (Open source computer vision)
OpenCV (Open source computer vision)OpenCV (Open source computer vision)
OpenCV (Open source computer vision)Chetan Allapur
 
Android ndk - Introduction
Android ndk  - IntroductionAndroid ndk  - Introduction
Android ndk - IntroductionRakesh Jha
 
Ii 1300-java essentials for android
Ii 1300-java essentials for androidIi 1300-java essentials for android
Ii 1300-java essentials for androidAdrian Mikeliunas
 
Java in a world of containers
Java in a world of containersJava in a world of containers
Java in a world of containersDocker, Inc.
 
Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Arun Gupta
 
Introduction to the Android NDK
Introduction to the Android NDKIntroduction to the Android NDK
Introduction to the Android NDKBeMyApp
 
Image Detection and Count Using Open Computer Vision (Opencv)
Image Detection and Count Using Open Computer Vision (Opencv)Image Detection and Count Using Open Computer Vision (Opencv)
Image Detection and Count Using Open Computer Vision (Opencv)IJERA Editor
 
“OpenCV: Past, Present and Future,” a Presentation from OpenCV.org
“OpenCV: Past, Present and Future,” a Presentation from OpenCV.org“OpenCV: Past, Present and Future,” a Presentation from OpenCV.org
“OpenCV: Past, Present and Future,” a Presentation from OpenCV.orgEdge AI and Vision Alliance
 
Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015Microsoft
 
_OOP with JAVA Solution Manual (1).pdf
_OOP with JAVA Solution Manual (1).pdf_OOP with JAVA Solution Manual (1).pdf
_OOP with JAVA Solution Manual (1).pdfvanithagp1
 
Writing Android Libraries
Writing Android LibrariesWriting Android Libraries
Writing Android Librariesemanuelez
 

Semelhante a [Devfest]open cv & android (20)

Open cv with android
Open cv with androidOpen cv with android
Open cv with android
 
OpenCV+Android.pptx
OpenCV+Android.pptxOpenCV+Android.pptx
OpenCV+Android.pptx
 
OpenCV (Open source computer vision)
OpenCV (Open source computer vision)OpenCV (Open source computer vision)
OpenCV (Open source computer vision)
 
Android ndk
Android ndkAndroid ndk
Android ndk
 
Android NDK
Android NDKAndroid NDK
Android NDK
 
Getting Native with NDK
Getting Native with NDKGetting Native with NDK
Getting Native with NDK
 
Android ndk - Introduction
Android ndk  - IntroductionAndroid ndk  - Introduction
Android ndk - Introduction
 
Ii 1300-java essentials for android
Ii 1300-java essentials for androidIi 1300-java essentials for android
Ii 1300-java essentials for android
 
Open cv
Open cvOpen cv
Open cv
 
VeenaChilukala
VeenaChilukalaVeenaChilukala
VeenaChilukala
 
Java in a world of containers
Java in a world of containersJava in a world of containers
Java in a world of containers
 
Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018
 
Introduction to the Android NDK
Introduction to the Android NDKIntroduction to the Android NDK
Introduction to the Android NDK
 
Corba 2
Corba 2Corba 2
Corba 2
 
Image Detection and Count Using Open Computer Vision (Opencv)
Image Detection and Count Using Open Computer Vision (Opencv)Image Detection and Count Using Open Computer Vision (Opencv)
Image Detection and Count Using Open Computer Vision (Opencv)
 
Improve Android System Component Performance
Improve Android System Component PerformanceImprove Android System Component Performance
Improve Android System Component Performance
 
“OpenCV: Past, Present and Future,” a Presentation from OpenCV.org
“OpenCV: Past, Present and Future,” a Presentation from OpenCV.org“OpenCV: Past, Present and Future,” a Presentation from OpenCV.org
“OpenCV: Past, Present and Future,” a Presentation from OpenCV.org
 
Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015
 
_OOP with JAVA Solution Manual (1).pdf
_OOP with JAVA Solution Manual (1).pdf_OOP with JAVA Solution Manual (1).pdf
_OOP with JAVA Solution Manual (1).pdf
 
Writing Android Libraries
Writing Android LibrariesWriting Android Libraries
Writing Android Libraries
 

Último

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

[Devfest]open cv & android

  • 1. OpenCv & Android Working with images Badrinath Kulkarni GDG Bangalore
  • 2. What is OpenCv ? Open Source Computer Vision Library OpenCV is an open source computer vision and machine learning software library. Windows, Linux/Mac, Android, IOS Current version 2.4.6
  • 3.
  • 5. Installation 1/3 Download OpenCv from SourceForge. Currently it’s OpenCV-2.4.6-android-sdk.zip
  • 6. Installation 2/3 Import OpenCV library and samples to the Eclipse. • Library • Samples Android NDK must be installed & configured.
  • 7. OpenCv Manager • Published on Google Play • Compact apk-size • Hardware specific optimizations • Automatic updates
  • 9. Pre - processing Java Imgproc.medianBlur(src, dst, 3); input.jpg median_3x3.jpg
  • 10. Registration Registration is the determination of a geometrical transformation that aligns points in one view of an object with corresponding points in another view of that Object. input.jpg registered_image.jpg | size : 640X640
  • 11. Step 1/4 : Detect horizontal lines Java Imgproc.Sobel(src, dst, ddepth, dx, dy, ksize, scale, delta); medin_3x3.jpg sobel_horizontal.jpg sobel_horizontal_binarized.jpg
  • 12. Step 2/4 : Detect vertical lines Java Imgproc.Sobel(src, dst, ddepth, dx, dy, ksize, scale, delta); medin_3x3.jpg sobel_vertical.jpg sobel_vertical_binarized.jpg
  • 13. Step 3/4 : Detect corner points Imgporc.HoughLinesP(); Detect periphery lines Imgporc.HoughLinesP(); Java Imgproc.HoughLinesP(image, lines, rho, theta, threshold, minLineLength, maxLineGap);
  • 14. Step 4/4 : Homography Java Mat transformM = Calib3d.findHomography(srcPts, dstPts); src points : intersection points dst points : (1,1) (1,640) (640,1) (640,640) median_3x3.jpg registered_image.jpg | size : 640X640 Java Imgproc.warpPerspective(src, dst, transformM, dsize);
  • 15. Thresholding Java Imgproc.adaptiveThreshold(src, dst, maxValue, adaptiveMethod, thresholdType, blockSize, delta); registered_image.jpg threshold_image.jpg
  • 16. Number detection 1/2 Remove unwanted lines. threshold_image.jpg data_image.jpg
  • 17. Number detection 2/2 NCC ~ 1 Java Imgproc.findContours(image, contours, hierarchy, mode, method); Imgproc.boundingRect(contourPoints); Imgproc.resize(src, dst, dsize);
  • 18. Final output The extracted matrix can be given to any Sudoku solver engine and the solved output can be shown to the user. 5 6 5 6 2 7 3 1 1 6 8 4 5 7 3 6 2 6 1 4 9 8 9 9 9X9 matrix with data from the image