Using Win32 API SDK

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

celia53

Thread Starter
Joined
Jul 28, 2002
Messages
48
I am developing a real time application by which I can get in a stream of live images from a camera onto my PC and process them. The camera is analog, a video frame grabber captures the frames. A windows API comes with the frame grabber. It allows graphical display of the 640X480 pixel images and I can save the images each time as a bmp file and feed them to my image processing code.
To achieve a real time application I need to, instead of saving as bmp files each time, directly grab data from the frame grabber and feed them live to the processing code. The frame grabber comes with a SDK as well. It is programmed in WIN 32. The files are in C and can be compiled from Visual C++ 6.0
Now my problem is that I have no clue how to access the data values before they are graphically displayed. So my questions are:
1) Does Win32 allow such an access?
2) Win32 is event driven and is lot different from C, say. Is there some good reference for me to get a quick understanding of win32?
3) Can I do away with the graphical display? i.e. withour the .rc files? is this the console application that win32 has?

Thanks for listening. I checked the forum for similar questions but seems this is a new field to explore. So thanks to all those who can help with their insights or suggestions!
 

celia53

Thread Starter
Joined
Jul 28, 2002
Messages
48
I have made some progress since last time and thought it best to get back to the forum for help.

I have checked the relevant code in the imaging API's SDK I am using and it's something like this:

SetDIBitsToDevice( hdc, 0, 0, MYBoard.ScaledSize.x, MYBoard.ScaledSize.y, 0, 0, 0,MYBoard.ScaledSize.y, MYBoard.pBuffer,(LPBITMAPINFO)MYBoard.pBitmapInfoHeader, DIB_RGB_COLORS);

pbuffer is defined as void * pointer for the struct MyBoard.

I think MyBoard.pbuffer points to the pixel values for an entire frame i.e. 640*480 pixels. Now it will be valuable if I look into the following:
1) How do I create a 640*480 matrix from here?
I have a code which needs this 640*480 matrix as input for image processing. So do I need to do an _asm coding for this? I am using a Visual C++ compiler on a Windows NT machine.
2) Is it possible to read the memory location in C? i.e can I print out the values pointed by MyBoard.pbuffer? Maybe in a message box in Win32 programming?
I wrote this line immediately after where SetDIBitsToDevice (I mentioned above) is called
MessageBox(hwnd, MyBoard.pBuffer, "values", MB_OK);
But I get ASCII junk letters on compiling.

Do you have any clues here?
Thanks in advance for your suggestions and help!
-Celia
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top