Tuesday, April 7, 2015

Computer Vision

We would like to be able to use computer vision to do the following:

  1. Obstacle avoidance - recognize seaweed or other things and not hit them
  2. Autonomously link together with another boat out in the ocean
  3. See when a fish was making the fishing pole bend
  4. Have the boat come right up to a dock so it was easy to retrieve
  5. See where the coast is or where waves are breaking over a reef 
  6. See a which way a bit of yarn was blowing to know wind direction
  7. See if there are whitecaps so can turn into them to not to tip over 
  8. read main battery voltage from sensor LED lights(OCR)

These are enough reasons to figure out how to use computer vision software and we will probably come up with more over time.  The phone has a 2 cameras, so there is no extra cost.  The one aiming backward can look at a fishing pole.  The one forward can see where the boat should go.

The phone also has a light, so computer vision could work even at night.


OpenCV software for Computer Vision

openCV - Open Source Computer Vision - Seems to be the most popular and runs on Android, Windows, and Ubuntu.   Documentation online.   We have started playing with this.  We can compile sample vision apps with Android Studio and load onto our phone.  Modifying them to do what we want does not seem too hard.

     Using a $50 robot arm and OpenCV
       An example of using OpenCV and phone for a robot.
 
 Some videos for learning about CV in general and openCV 
  1. Tutorial: Real-Time Object Tracking Using OpenCV 
  2. Finger drawing - with OpenCV
  3. Brush drawing - with OpenCV
  4. OpenCV Tutorial: Multiple Object Tracking in Real Time (1/3)
  5. Lecture 01 Introduction to Computer Vision
  6. Real Time Object Recognition using SURF and OpenCV EEL6562
    Some books on CV
    Tesseract OCR - open source
    1. Open source and sponsored/hosted at Google.
    2. Sample Java/Android code
    3. More complete example for Android
    4. Also OCR apps on play store - may be able to just call one but...

    Thoughts on Boat Linkup



    With GPS one boat can get near the other boat but for the last 50 feet of the approach we probably want to use the camera.  

    We are planning to use powerful magnets on a flexible thing so that docking has a little margin for error.    But this is only like an inch in each direction.

    If we get near the waves will make for some up and down motion, so this should match up given a bit of time.


    The boats both have compasses.  They could talk to each other with bluetooth, wifi, SMS, or G3 Internet.   So one can point into the wind and tell the other what GPS coordinates it is at and what heading and speed (slow or stop) it will be at.  

    Could have just the CV in Java and the rest of the code still in App Inventor.  There is no need to pass images back and forth so communication is not a problem.

    No comments:

    Post a Comment