Main | May 2007 »

April 27, 2007

New object & location locator from webcam frames

 

The basic idea which I will follow is to have have the webcam take snapshot of frames every defined T period, and use a class to analyze these two frames.

This class will be used to find and figure out the location of a new object that exist in frame1 , but which did not exits on frame0. The location is based on either if the object is found on the left, right, middle section of the image.

This will enable me to send commands to the servo to have the webcam which it is carrying ontop of it to turn towards the newly identified moving object.

Slices logic of a image on x axis

 

Here are some examples using this class on a test app:

 

Red Ball Left  Red Ball Middle

April 19, 2007

Servo Fun, Project Phase #1

 

So I was thinking of my first project idea, and decided to divide my projects into phases.
This way as I outline and develope the phases, it will be easier for me to manage, and document
them as well and use these components in diffrent projects down the road.

After thoughtfull consideration, I planned to make a moving web-cam, which will detect motion and turn in that direction. The hardware part of this project is fairly simple, although software part will be the challenge, hence I plan to use my own custom motion detection algorithm based on common algorithms out there.

The ingridients I plan are these:

1- VISTA Ultimate
2- Visual Studio Express 2005, C#
3- A cheap USB webcam
4- Phidget Intergace kit 8/8/8
5- Phidget 4 servo controller
6- 1 HiTec 422 Analog Servo

The basic plan is to assemble the webcam on top of the servo, and write a simple
C# form, which will take snapshots from the webcam every second, and compare pixel
colour changes with the previous snapshot, and if it sees a change of pixels defined by
a threshold change the position of the servo in that direction.

The challenge is, as the camera moves towards that direction, the next snapshot will show
that object move to the opposite direction, hence the view angle has changed, and will cause
the camera move towards that direction. So i need to come up with a algorithm to lock the
snapshot and motion detection logic while the camera/servo is moving.

Also, if I take a blurry snapshot while the camera is moving the pixels will have to much noise, hence we now how webcam is not so great with moving objects.

So for the first part of this experiment, I need to start working on the webcam C# interaction, there is many examples out there, so it should be easy...I'll keep you guys posted.

 


April 17, 2007

First hand on with phidgets

 

So, after getting my 8/8/8 interface kit, which has:

    -8 analog inputs
    -8 digital inputs
    -8 digital outputs
    -2 port USB hub

I had also got a analog force sensor, so my first experiement was to use the C# API
to get some readings from the force sensor.

My setup was this:

    - VISTA Ultimate
    - Microsoft Visual Studio 2005 Express

My main problem was that the API documentation has a section for each analog sensor
except for the force sensor, but luckly every analog phidget device has a interface by default for
get { } , set { } methods, that way I was able to get some raw readings from the sensor.

But, I am not sure how that raw reading would correspond in weight terms. The force sensor
has a default no force 0, and high 1000 int value that can be read, but I am not sure how
to translate that int value to grams.

One experiment I did was to setup the force sensor so that it could balance perfectly with a object on top of it. When I put the object on it, the first reading was 490, but it started to increase gradually, I would say every 5 seconds +10 value, it went up to 580 where it slowed down. So something tells me getting a full stable reading with this sensor might be a little fishy. But I plan
to do some more tests on that...


 

 

Getting my first phidget

Inteface Kit 8/8/8
 

 

I have been interested in computer-human interaction for along time, and I finally found some time and energy from my busy schedule to start to do some very simple, and basic experiments.

If you look at the very high level, the interaction is actually a basic input,output device. The experience from this such device is understood by the human as "computer-human interaction" while it actually has no diffrence (if you do not look at the complexity) then a mouse, or a printer.

So what I wish to do is experience how far this interaction can be taken by someone who has no experience at all.

For, this after hours of researching, I found that the phidgets are really good source/starting point, and the other day ordered my very first Interface kit, and a basic force sensor.

I'll keep the details for a later time on how I plan to interact with this setup...


Hosting by Yahoo!