3_26_02

I found some good stuff on the internet confirming my belief that I can do optical recognition of lines with a mask.

Like I said earlier, the 3d representation of the person will be processessed and interpreted in any way I can imagine, but first I'm starting with masks.

Other ways to gather info of where the person is in space:
1) Other computer vision processing techniques.
2) Extra cameras doing clairification work.
3) Previous knowledge of where the person is.

First I need a basic computer vision processing technique, and I think using a mask would be a great starting point.
-------------------------------------------------
To do:
#1: Undestand the basic format of an image such that it can be broken down and processed.

#2: Develop and apply masks to several images.

#3: Understand 3d coding and translate my image into it.

-------------------------------------------------
Log:

I started out the day making an image of an outstretched arm with a fist.



I want to take this image and try and break it down so the computer understand where my arm is. But first I need to tear apart the spriteanimate project that comes with Directx8.1. So I'll do that now.
------------------------------------------------------------
To do
#1: Undestand the basic format of an image such that it can be broken down and processed.

Stuff I need to learn:
a) Load image.
b) Blit(display) image.
c) Image properties so I can break

Trying to read Microsoft's documentation. I do a search for directdraw in the documentation and nothing comes up that I'm interested in. Nothing comes up for bmp either... I don't think Microsoft documented anything for directdraw... Well lucky they gave out examples, I'll just continue disecting the example.

Ok, so I try and debug, by breaking on a statement, but I guess DirectX doesn't like that so I need to reboot.

I used the spriteanimate project
Took me a bit, but I was able to find load image is:
CreateSurfaceFromBitmap
So I completed (a) :)

Also I found how to blit the image to screen.
Cdisplay->Blt(int Xposition, int yposition, CSurface *, A rectangle thing)
So I completed (b) :)

Now I'm stuck trying to find out bitmap information is stored in memory... This should be fun.

I don't even know why I try to use the documentation that comes with directX. I do a search for CDisplay and CSurface... Two items that seem to be critically important, yet they're not documented.

Luckily Microsoft's online documentation RULES! msdn.microsoft.com

Using GetPixel now...
Trying to interpret how it works...
Found a large amount of data at Msdn

Color values of pixels are stored in RGB colorref structures.
To access a color from one of these structures, you use:
For red: int X=GetRValue(colorref)
For green: int X=GetGValue(colorref)
For blue: int X=GetBValue(colorref)

To create an RGB you do:
0-255 intensity
colorref=RGB(red,green,blue)

To get a pixel from a bitmap:
colorref=GetPixel(bitmap,x,y)

to set a pixel:
SetPixel(bitmap,x,y,colorref)

--------------------------------------------------------------
Now I just need to figure out how to access the bitmaps in that direct draw program. Once I can do that... The computer vision is on!
Of course, like anything else, this is a hassle... I can't find any way of interpreting directdraw data as a bitmap. Also, there is this function DrawBitmap that has no documentation... Doing a yahoo search for it.



Found the answer at gipsysoft.com/code/drawbitmap.shtml Apparently, I'm supposed to be using LoadBitmap, something not documented well by Microsoft... But hey seriously, who wants to be using graphics with their code anyway... freaking Microsoft. They've obfuscated Winsock for like a decade... you'd think by now they'd be kind and let people use graphics easy... No, they show example code for saving a bitmap down in binary.

Ok, playing with my new found bitmap.

Ok this is getting even stupider.
Bitmaps are stored in HBITMAP format.
BUT GetPixel requires HDC format...
This makes about 0 sense
How am I supposed to get a pixel from a freaking bitmap?

Ok, thats it for today, tomorrow I'll access the bitmap, and it will all be over... I took a break, went to wallmart, bought a keyboard and mouse for my 2nd puter. I went to wendy's counted change, and got some food. The funny event was when my cell phone rang for the first time in like 3 months... Hello? Oh no, I'm broke, I can't pay my bill, yeah just shut the phone off.
Gonna play a few games of warcraft 3 beta and then go to bed. 1