SlideShare a Scribd company logo
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

More Related Content

What's hot

Native development kit (ndk) introduction
Native development kit (ndk)  introductionNative development kit (ndk)  introduction
Native development kit (ndk) introduction
Rakesh Jha
 
NDK Programming in Android
NDK Programming in AndroidNDK Programming in Android
NDK Programming in Android
Arvind Devaraj
 
Android NDK and the x86 Platform
Android NDK and the x86 PlatformAndroid NDK and the x86 Platform
Android NDK and the x86 Platform
Sebastian Mauer
 
Oscon 2014 def core review
Oscon 2014 def core reviewOscon 2014 def core review
Oscon 2014 def core review
rhirschfeld
 
Android ndk: Entering the native world
Android ndk: Entering the native worldAndroid ndk: Entering the native world
Android ndk: Entering the native world
Eduardo Carrara de Araujo
 
Pulumi iac on gcp
Pulumi iac on gcpPulumi iac on gcp
Pulumi iac on gcp
Vishwas 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 itseez
Edge AI and Vision Alliance
 

What's hot (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
 

Viewers also liked

Khulood Tohmaz
Khulood TohmazKhulood Tohmaz
Khulood 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
David Jardin
 
Επιστολή Αντιπεριφεριεάρχη Χίου σχετικά με τις ραδιοτηλεοπτικές συχνότητες κα...
Επιστολή Αντιπεριφεριεάρχη Χίου σχετικά με τις ραδιοτηλεοπτικές συχνότητες κα...Επιστολή Αντιπεριφεριεάρχη Χίου σχετικά με τις ραδιοτηλεοπτικές συχνότητες κα...
Επιστολή Αντιπεριφεριεάρχη Χίου σχετικά με τις ραδιοτηλεοπτικές συχνότητες κα...
Notis Mitarachi
 
SEMrush'in Around - SEMrush Presentation
SEMrush'in Around - SEMrush PresentationSEMrush'in Around - SEMrush Presentation
SEMrush'in Around - SEMrush Presentation
Greenlane
 
Angle citra math 3_e
Angle citra math 3_eAngle citra math 3_e
Angle citra math 3_e
Nur Fadzri
 
Raju Resume
Raju ResumeRaju Resume
Raju Resume
Raju KR
 
Music video Techniques
Music video TechniquesMusic video Techniques
Music video Techniques
Natalia 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 books
Brad 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 musicales
daniel4125
 
Rpp 9 pk
Rpp 9 pkRpp 9 pk
Rpp 9 pk
Nur Fadzri
 
OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012OpenCV @ Droidcon 2012
OpenCV @ Droidcon 2012
Wingston
 
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 OpenCV
debayanin
 
Object detection
Object detectionObject detection
Object detection
Somesh Vyas
 
Rpp matematika kelas 6 semester 2
Rpp matematika kelas 6 semester 2Rpp matematika kelas 6 semester 2
Rpp matematika kelas 6 semester 2
Rachmah 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 handouts
Nanci Hogan
 

Viewers also liked (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
 

Similar to [Devfest]open cv & android

Open cv with android
Open cv with androidOpen cv with android
Open cv with android
Saurabh Sharma
 
OpenCV+Android.pptx
OpenCV+Android.pptxOpenCV+Android.pptx
OpenCV+Android.pptx
Vishwas459764
 
OpenCV (Open source computer vision)
OpenCV (Open source computer vision)OpenCV (Open source computer vision)
OpenCV (Open source computer vision)
Chetan Allapur
 
Android ndk
Android ndkAndroid ndk
Android NDK
Android NDKAndroid NDK
Getting Native with NDK
Getting Native with NDKGetting Native with NDK
Getting Native with NDK
ナム-Nam Nguyễn
 
Android ndk - Introduction
Android ndk  - IntroductionAndroid ndk  - Introduction
Android ndk - Introduction
Rakesh Jha
 
Ii 1300-java essentials for android
Ii 1300-java essentials for androidIi 1300-java essentials for android
Ii 1300-java essentials for android
Adrian Mikeliunas
 
Open cv
Open cvOpen cv
Open cv
nanocdac
 
VeenaChilukala
VeenaChilukalaVeenaChilukala
VeenaChilukala
Veena Chilukala
 
Java in a world of containers
Java in a world of containersJava in a world of containers
Java in a world of containers
Docker, 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 2018
Arun Gupta
 
Introduction to the Android NDK
Introduction to the Android NDKIntroduction to the Android NDK
Introduction to the Android NDK
BeMyApp
 
Corba 2
Corba 2Corba 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)
IJERA Editor
 
"OpenCV for High-performance, Low-power Vision Applications on Snapdragon," a...
"OpenCV for High-performance, Low-power Vision Applications on Snapdragon," a..."OpenCV for High-performance, Low-power Vision Applications on Snapdragon," a...
"OpenCV for High-performance, Low-power Vision Applications on Snapdragon," a...
Edge AI and Vision Alliance
 
Improve Android System Component Performance
Improve Android System Component PerformanceImprove Android System Component Performance
Improve Android System Component Performance
National Cheng Kung University
 
“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
Edge AI and Vision Alliance
 
Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015
Microsoft
 
_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
vanithagp1
 

Similar to [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)
 
"OpenCV for High-performance, Low-power Vision Applications on Snapdragon," a...
"OpenCV for High-performance, Low-power Vision Applications on Snapdragon," a..."OpenCV for High-performance, Low-power Vision Applications on Snapdragon," a...
"OpenCV for High-performance, Low-power Vision Applications on Snapdragon," a...
 
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
 

Recently uploaded

AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
maazsz111
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 

Recently uploaded (20)

AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
SAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloudSAP S/4 HANA sourcing and procurement to Public cloud
SAP S/4 HANA sourcing and procurement to Public cloud
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 

[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