|
Simple Computer Visionary
| 4 Years ago...
I remember a few years ago when I was working on the game project I had, I
used to determine each and every coordination of my game characters, with
rectangle around their hot areas, and also "t" was a factor that determined when s
my game character is in the screen and when it's not. (What good is the
coordination of a character anyway when it's out of the screen?!)
 |
 |
Simple Area Hotspot
Whole
character is translated into one logical object, it's simple not
flexible enough.
|
Multiple Area Hotspot
Each
reacting part of character is one separate object. in this case, you
can program head, body and foots separately reacting different. For
example, in head, one shot kills, in body three shots, and in foots
ten shots!
|
Then I decided to produce a code to extract the exact difference between two
different scenes, for example, this would be useful in automatic security
sensors, or in military operation, when you're looking for an enemy soldier in a
woods over a chopper,
 |
 |
 |
Scene 1, t1, object is visible
All of
data is stored in a matrix exactly as pixel data of the scene.
|
Scene 2, t2, object is not visible
Now
every element is compared with the new scene, according to a
difference level (d) |
Scene 1 to scene 2 difference Mask
Now all
of the elements of the new matrix is shown ad a new image, "d" time
each pixel color.. |
Well it's good, but not good enough. what if a camera shakes a little? What
if the " Light Exposure" of camera is different for each scene? Then we'll get a
matrix full of black pixels. Solution one, is to compare the "d2" times pixels
around of current comparing pixel which is not bad but causes too much process
load on CPU or microcontroller device.
A cure for an itch: Open CV
Intel's Open Source Computer Visionary library, is a bunch of C++ procedures
which is particularly designed to utilize simple image processing routines on
your project. First of all, I hate that it's only in two languages, C++ and
Python (I know why C++ but why the hell Python??) It also contains some codes in
NET Framework but still in Visual C++ .net that is a bit easier to work with
other languages same as lovely Visual Basic .net
 |
 |
 |
Simple shapes with Alpha channel Mask
The idea
of ordinary scanning doesn't work well, 'cause there's more than one
particular object. "Flood" algorithm which detects the angles by
flooding the area is okay, but OpenCV suggests a better idea... |
OpenCV Sample:
These
shape are hell! Some tough condition in simple image processing:
complex objects. |
Non-bordered images:
Edge-detection is useless in this condition. The each area is
flooded to another. It's even had to figure out what exactly the
object was, with human eyes. This is why we have to refer the
neural database. |
If you're a C++ guy, done lose a second and download it from Intel's website
and have fun. The documentation for this Beta version sucks a little, but the
good point is there would NOT be a lot of OpenCV developers in the future because
of that!
To Be continued...
|