accessing data from frame buffer without saving to file?
hi sorry for posting previously
Hi im a newbie to any form of windows programming. Im trying to capture an image from a webcam (which i can do!) and then do image processing on it without having to save the dib to file and re-read the info. THe set pixels dont work either :(
i know the image is sent to a frame buffer before it is saved. is there anyway of accessing the pixel information without saving the file.
this is my code so far...sorry its a mess
capDriverConnect (hWndC, 0);
//connect to drivercapPreviewRate( hWndC, 34);
// set preview rate to 34 miliseconds (max fram rate`=30fps)= 33.3s per framecapPreview( hWndC, TRUE );
// start preview videocapCaptureSequenceNoFile(hWndC);
//capture without saving to filecapGrabFrameNoStop(hWndC);
//capture single frame to internal frame buffer//capFileSaveDIB(hWndC,//copy image from frame buffer to device-independent bitmap (DIB)// "c:\\test.dib"); //name of the destination DIB filehdc = GetDC(hWndC);
hMemDC = CreateCompatibleDC(hdc);
GetPixel(hdc, 0, 0);//get rgb value at 0 0
for(x=0; x<15;x++){
for(y=0; y<15;y++){
SetPixel(hdc, x, y, RGB(255, 0, 0));
//get rgb value}
}
BitBlt(hdc, 400, 0, 600, 600, hMemDC, 0, 0, SRCCOPY);
DeleteDC(hMemDC);
ReleaseDC(hWnd,hdc);
UpdateWindow(hWndC);UpdateWindow(hWnd);
ShowWindow(hWndC, nCmdShow);
ShowWindow(hWnd, nCmdShow);

