Friday, October 17, 2014

Development of Android Applications with openCV

Windows 7 SP1
Android 4.4.4
Eclipse Kepler R2
OpenCV 2.4.10
Android SDK



Code:




  • https://github.com/som4r/som4r/tree/master/robot
Status:
  • 20141016  Using "OpenCV Tutorial 3 - Camera Control" sample application for android. Added Http code to this application. Connection with TTS SOM4R WebService was made successfully.
  • 20141017  Classes of Tutorial3 project has been copied to FaceDetect project, among with others config files (some files were merged with facedetect original ones), and it's working. :)
  • 20141018  The application is capable to call the TTS webservice. App is capturing face image (gray-scale) and saving on device.
  • 20141019  The application is using AsyncTask to fetch http data. Implemented a basic web.py server to recieve images (c:/development/python/wsrest_face_upload.py).
  • 20141021  The application is with multipart upload code. Need to do tests with WS face uploader.
  • 20141022  The application is sending image file to server, but the image is arriving distorced. There is a problem in app (Java Multipart Sender) or it is in (Python) WS face uploader app? does not matter anyway, lets try this using base64 string inside RDF XML object.
  • 20141023  The application is sending image file to server, and face upload webservice is saving file correctly.
  • 20141025  The application has two modes; face identification (default) or face registration. Need to do a modification on resource-xml object according to selected mode.
  • 20141102 The application is sending image and name to ws_registration (./gallery folder), when in registration mode, and to ws_recognition (./upload folder), when in recognition mode. Update of PCA matriz is automatic, just need to put new image in the ./gallery folder.
  • 20141109 The application sends image for both servers (registration and recognition) and user can sends feedback.
  • 20141116 The application has the delete function, calling wsrest_face_deletion.
  • 20141123 The application can consider feedback (interface tag "ignore_feedback"). WS Recognition can call database function "getFeedbackAnalysis", using feedback data stored in "tbl_face_user_feedback" (populated by trigger "after_insert_tbl_stm"). This function adds only 4ms of time to the process.
  • 20141129 WS Registration and WS Recognition are saving looking for 3 images, grayscale, inverted and  canny80x80). It´s working.
  • 20141209 The application is working with minimal errors ocurrence. Version is Beta!

ToDo:

  • Solicitar token e ou IP do servidor ao iniciar o aplicativo. Usuários com permissões de: reconhecer, reconhecer+feedback, cadastrar+reconhecer+feedback, deletar e admin. Cria Documentação e publicá-la na web.
Installing:
  • Download and install Eclipse Kepler R2
  • Download OpenCV for Android
Testing:

  • On most devices running Android 3.2 or older, you can find the option under Settings > Applications > Development.
  • On Android 4.0 and newer, it's in Settings > Developer options.
  • Note: On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.
References:

Sunday, October 5, 2014

Installing OpenCV 2.4 in Ubuntu 14.04.1

Ubuntu 14.04.1
OpenCV 2.4
Python 2.7.6


Status:
  • 20141005  OpenCV Python samples is working.
  • 20141006  Installing MySql, Apache, PHP and PhpMyAdmin. (Apache=ok, PhpMyAdmin=no)
  • 20141007  Try to fix apache (or php, or phpmyadmin) problem (don't start phpmyadmin configuration popup at instalation time)
  • 20141008  Installing MySql managers (MySQL Workbench, Emma) and restoring "robot" database (manual creation of a new database and import sql file exported by the hp_centauro notebook.
  • 20141009  robot_wsr_face_recognition app is working without any modification :)
Install:
  • sudo apt-get update
  • sudo apt-get install libcv2.4 libcv-dev libhighgui2.4 libhighgui-dev opencv-doc opencv-data libopencv-dev
  • Installing Python Libraries:
  • sudo apt-get install python-opencv  python-dev python-webpy
  • Download OpenCV Library and Extract to "home" folder.
  • Copy OpenCV "data" folder into "samples" folder (otherwise python samples don't work)
Testing OpenCV Python samples:
  • cd ~/opencv-2.4.9/samples/python
  • copiar pasta "OpenCV"/data para "OpenCV"/samples
  • python ./facedetect.py 0
  • python ./motempl.py (contorno e movimento)
  • python ./laplace.py (contorno)
 Installing PyFaces:
  • sudo apt-get install tix python-imaging-tk
  • Download pyfaces
  • Unzip to ~/pyfaces
  • cd ~/pyfaces
  • python pyfacescontroller.py (not working)
Installing som4r repository:
  • sudo apt-get install subversion
Installing Apache, MySql and PhP: