tau_neutrino's Profile
Reputation: -3
Dishonored
- Group:
- New Members
- Active Posts:
- 3 (0 per day)
- Joined:
- 24-June 11
- Profile Views:
- 253
- Last Active:
Apr 28 2012 11:32 PM- Currently:
- Offline
Previous Fields
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: Win32 WebCam Program
Posted 26 Apr 2012
tau_neutrino, on 24 April 2012 - 10:44 AM, said:MOD EDIT: We do NOT support keylogging or spy applications or other malicious activity, even if it *IS* open source.
WOW! Why is that? It is really open source with new FreeBSD license. This can help other people write their code! I wrote it just for fun and learning some winapi of video capture. You see there are people who need this. -
In Topic: Win32 WebCam Program
Posted 24 Apr 2012
aldavis3, on 24 April 2012 - 07:45 AM, said:I would like to capture a pixel array from the webcam, modify the image, and display the modified image in a second window. The first window would show the original image, the second window would show the modified image.
How do I create the pixel data array? I would like for it to be in RGB format (1 byte for Red, 1 byte for Green, and 1 byte for blue per pixel).
Once I have created the array and modified it, how do I get the image to display in the second window?
Hi,
You should install callback function with capSetCallbackOnFrame(camhwnd, FrameCallbackProc);
Then your callback function is called when GRAB_FRAME message is sent to your capture window. If you want get pixels of each frame, you should install callback with capSetCallbackOnVideoStream(camhwnd, FrameCallbackProc);
Then your callback function is called and frame bytes are sent via parameter:
// Frame data is stored in lpVHdr
static LRESULT CALLBACK FrameCallbackProc(HWND hWnd, LPVIDEOHDR lpVHdr)
{
// If no data provided by driver (dropped frame) - nothing to do
if (lpVHdr->dwBytesUsed == 0) return FALSE;
...
You can alter lpVHdr->lpData. It's just array of bytes. The dimensions you get from capGetVideoFormatSize() macro.
If you want, I have project which incorporates keylogging, video capture with motion detection. It's open source and I host it on google code. It is here: *** REMOVED LINK ***
I've tried to make code readable and there are comments regarding implementation.
If you have any question, ask here.
-- Greg
MOD EDIT: We do NOT support keylogging or spy applications or other malicious activity, even if it *IS* open source. -
In Topic: Win32 WebCam Program
Posted 24 Jun 2011
snoopy11, thank you for the article!
Why don't you use WM_CAP_FILE_SAVEDIB? It will save a file in a single call, won't it?
My problem with this code is that using clipboard is very annoying. Is there any other way to get the frames grabbed? Thanks!
My Information
- Member Title:
- New D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
Contact Information
- E-mail:
- Private
Friends
tau_neutrino hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
tau_neutrino has no profile comments yet. Why not say hello?