android


Image classification with opencv


We're currently working on an android ocr app using opencv.pre-processing ,segmentation ,Feature extraction steps are done. Classification is the remaining step and we're stuck ..We're using a DB table which is filled with each letter features ..Firstly we had only 1 feature per letter and we used euclidean distance ,but results wasn't accurate and more features needed to be obtained and so we did.The problem now is we have 7 features per letter and absolutely no idea of how to classify i/p based on them..some have recommended using knn ,but we can't figure out how and the opencv documentation in that part ain't clear ..so if anybody can help it wud be great.
Thanks in advance
Briefly and without discussing the details. Vector space comes in handy here. You need to build a feature vector
<feature1, feature2, feature3.. featureN> for each of the instances in your training set.
From each of these images you extract features that you think or you read in the research articles are important for image classification. For example you can do centroid, Gaussian blur, histograms, etc.
Once you have these values linear algebra comes into play with some classification algorithm: knn, svm, naive bayes etc that you run on your training set, that is you build your model.
If the model is ready you run it on your test set.
Use cross validation for more comprehensive results.
For more details check the course notes:
http://www.inf.ed.ac.uk/teaching/courses/iaml/slides/knn-2x2.pdf
or
http://www.inf.ed.ac.uk/teaching/courses/inf2b/lectureSchedule.html
would like to add that OpenCV may not have the sort of classifiers you might prefer.
There are several libraries out there, though you may have to see which works best when on a mobile platform. Could you give some details on the features you are using?
The simplest KNN (k-nearest neighbors) measure would be to find the Euclidean distance in n dimensions (for an n-dimensional feature vector) between the input sample's features and each of the vectors in your DB table. Also explore Mahalanobis distance (used to measure distance between a point and a dataset/class) if you have multiple classes and the input image is to be classified as one such 'type' or 'class' of image.
As #matcheek mentioned, more sophistication can be possible using machine learning techniques such as SVM, Neural Nets, etc. However first you might consider a simpler thing like kNN, considering its a mobile platform which may limit the computational complexity.

Related Links

Available Youtube APIs for video streaming
Navigation drawer is not closing even after closeDrawers()
My program keeps crashing when I make one calculation in one Activity and then tring to pass the result to another Activity
Failed to get the required ADT version number from the
Error while downloading source code of android
Retrofit 2 - How to show progress bar On Receiving JSON Response
How to add an additional custom row to a listview?
Can not copy RTSP streamed video in android using FFMPEG
How to open Other app from ReactNative?
Android Joda DateTime one hour off
How to pass BuildConfig values to dependency module?
How to call asp.net Web API from android device
Android asynchronous Task finishes before Firebasequery completed
Suppress unfortunately app stopped
Firebase SDK Not openning launcher activity when app is background
Cursor in android studio for Mac is rectangle area

Categories

HOME
asp.net-web-api
google-app-engine
cygwin
search
kentico
cobalt
c++11
codenvy
phpmyadmin
object
mjml
depth
jelastic
square
regular-language
pearson-correlation
mapbox
jquery-ui
computer-science
google-form
package-managers
azure-powershell
aws-sdk
google-data-studio
pyramid
replication
pagespeed
r-mice
data.stackexchange.com
tiki-wiki
moses
nstimer
fractions
linked-data
carrierwave
sqsh
testcomplete
ntp
turfjs
glib
lubridate
video-capture
xajax
alphabetical
openproject
sql-server-ce
graphhopper
connection-pool
android-softkeyboard
oracle-service-bus
placeholder
optimizely
video-conferencing
semantic-logging
oracleclient
git-flow
cpu-cache
swingworker
rxtx
polyline
redistributable
actor-platform
lrs
google-cloud-console
adafruit
nikeplus-api
lean
kango-framework
hadoop-partitioning
httpruntime.cache
opl
ember-cli-rails
sql-server-data-tools
nodelist
cosine-similarity
entry-point
tweenlite
create.js
kissfft
malformedurlexception
file-not-found
websphere-esb
mbunit
kogrid
scringo
merb
robotlegs
curb
xcode3.2
urlrewriter
android-holo-everywhere
django-paypal
application-verifier
purepdf
tui
asynchronous-wcf-call
perl5.12
fault-tolerance
unmanagedresources
information-management
mathematical-typesetting

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App