|
Hello there,
I am working in a ludic and personal project that requires image processing and I am researching ways to do that. A have a Nvidia Geforce 4 Ti4400 vivo running in a Dual Atlhon MP 1.9. The example program CFrameGrabber compiles and work very well (although I have to link MFC statically to work with the release version - to avoid freezing in seraching for buffers message...).
however, I am find that the capture is too slow, comparing with others soft's (like winproducer, f.e), that also uses wdm to capture images. Does anybody has a clue of why it's happening?
best regards,
Paulo Gonçalves
|
|
|
|
|
I'm the other one that use CFrameGrabber. I found that my framerate is around 8 fps... very low .... I don't know that what part cause this problem... I use Windows XP and FlyView Video capture card
|
|
|
|
|
Hi,
i am working on to extend the CAviCap that later will enble the compression to H263 and then may be able to transfer on the net and will soon upload here with my other articles (apart from my 3)
now there is only one problem. THE DEOM DOES NOT SHOW ANYTHING ..well that is not a big problem but i wonder why didnt u handle the 12 BIT data in your class and how come i do not even get the preview..let me know what possible could be wrong with my settings.
i am working on windows 2000 professional system with 3COM web cam and this is the first time i am working out of direct show on video so little problem
i will appriciate all sort of help and this article is really wonderfull..i really liked it.
live life to the fullest
|
|
|
|
|
The reason you can not see anything with a nonstandard format
is because the document class does not know how to handle these
formats.
A quick fix. I write one of the image out in the 'bmp' format.
Of course this bmp format is not quite correct and you can not open
it by double clicking it. However, I can read it into matlab and
view the grabbed image there. Matlab code follows the C code.
Good Luck!
Natarajan
================================== see below for changes/notes======
Go to line 273 in FrameGrabberTestView.cpp and modify as shown
(The machine I have does not have rcsdiff, so not much I can do
other than show old code as //old. Sorry)
if(!pDoc->m_ImageBitmap.GetSafeHandle()) //old
{ //old
static int did_dump;
LPBITMAPINFO lpBi = m_FrameGrabber.GetDIB(); //old
if (!did_dump) {
did_dump++;
BITMAPFILEHEADER bmfh;
bmfh.bfType=0x4D42;
bmfh.bfSize=sizeof(BITMAPFILEHEADER)+sizeof(BITMAPINFOHEADER)+lpBi->bmiHeader.biSizeImage;
bmfh.bfOffBits = sizeof(BITMAPFILEHEADER)+sizeof(BITMAPINFOHEADER);
bmfh.bfReserved1=bmfh.bfReserved2=0;
FILE *fp = fopen("dib.bmp", "wb");
if (fp) {
fwrite(&bmfh, sizeof(bmfh),1, fp);
fwrite(&(lpBi->bmiHeader), sizeof(BITMAPINFOHEADER),1, fp);
fwrite(lpBi->bmiColors, lpBi->bmiHeader.biSizeImage,1, fp);
fclose(fp);
}
}
pDoc->m_ImageBitmap.CreateFromDib(lpBi); //old
InvalidateRect(NULL); //old
} //old
==== End of C code changes ===
The matlab code is a simple script:
fid = fopen('dib.bmp', 'r');
[A, count]=fread(fid, Inf, 'char');
fclose(fid)
off = A(11);
nc = A(19)+A(20)*256
nr = A(23)+A(24)*256;
im=A(off+1:off+nr*nc);
im2=reshape(im, [nc, nr]);
imagesc(im2');
colormap(gray);
|
|
|
|
|
Hi,
i am working on to extend the CAviCap that later will enble the compression to H263 and then may be able to transfer on the net and will soon upload here with my other articles (apart from my 3)
now there is only one problem. THE DEOM DOES NOT SHOW ANYTHING ..well that is not a big problem but i wonder why didnt u handle the 12 BIT data in your class and how come i do not even get the preview..let me know what possible could be wrong with my settings.
i am working on windows 2000 professional system with 3COM web cam and this is the first time i am working out of direct show on video so little problem
i will appriciate all sort of help and this article is really wonderfull..i really liked it.
|
|
|
|
|
Hi,
I'm an undergraduate and doing a Project for my final year. I have a problem with capturing frames from a video clip which play under media player. I need to do some image processing to these frames.I'm going to do this using Visual C++. I'm thankful if anybody can explain me or give a link which has sample code to do this.(capturing frames from a video clip in realtime to BMP format. )
Best Regards,
Shamal
Shamal De Silva.
Mobile: (94) 072890277
|
|
|
|
|
Is there a version for Visual Baisc 6.0 or early???
|
|
|
|
|
Hi,
One of my students is doing a VB clone of it in order to control a mouse with the camera. Write me (arivero@posta.unizar.es) by the summer of 2003.
Alejandro Rivero
|
|
|
|
|
in the program, the capDlgVideoFormat macro displays a dialog box in which the user can select the video format. The Video Format dialog box might be used to select image dimensions, bit depth, and hardware compression options.
..
..
capDlgVideoFormat(ghWndCap); //ghWndCap is Handle to a capture window
..
The default pixel is 320 x 240. Instead of letting the user to select image pixel thru the dialog box , i wish to fix it to 640 x 480. how to i do that ?
|
|
|
|
|
My Capture driver supports differents video formats sources like
PAL-B,PAL-M...,NTSC...,SECAM...etc.
When I connect with a capture driver in my application, It selcts previous default source format as a default setting.
But I want to set PAL-B as a default. i.e When I connect with a capture driver
in my application, It should select PAL-B format as a default.
What shold I do to get this thing ?
Thanks in advance
Hitesh
|
|
|
|
|
hi
when i save then captured image as .avi files the file size mater's much
when i captured for 1 minute it took around 190 mb of disk space?
can any one say how to reduce the size of the file.
thanks
sowmy
|
|
|
|
|
Actually that's expected with uncompressed video data. Say for a very small window size, QCIF (176x144), RGB (3 bytes/pixel) at 15fps, we are talking about 1.2MB of data per sec. I guess your capture window size is larger than this...
To reduce the file size, you have to run the captured data through a video codec.
Harold
|
|
|
|
|
how can we use video codec? i am capturing video data using amcap sample module in direct show.i also want to reduce size of file.please reply me on patelvibha@rediffmail.com
hvibh
|
|
|
|
|
Hi, There:
I encounter a problem with a simple AVICap app, and hope to find some help here:
I created an AVICap window, and its preview window. I enable stream callback, and set "captureParms.fYield = TRUE;". I then, in the callback, display the captured frame to a different window (via DirectDraw).
Once I start " capCaptureSequenceNoFile()", it works fine: both windows display preview and captured video respectively. However, as soon as I click mouse in one of the window, the capture stops. It's almost like that, capture window yields to the window message, and then just gives up!
Could anyone advice why, and how to fix it?
Thanks,
Harold
Harold
|
|
|
|
|
hi
see the CAPTUREPARMS data structure and u have the member
fAbortLeftMouse and fAbortRightMouse u declare these two members to false
when u are capturing, hope this will be a solution.
regards,
sowmy.
|
|
|
|
|
Tried and succeeded! That appears to solve the issue...
Thanks a lot!!
Harold
|
|
|
|
|
error C2039: 'ReadHuge' : is not a member of 'CFile'
error C2039: 'WriteHuge' : is not a member of 'CFile'
|
|
|
|
|
I have the same problem than you, im trying to implement video capture using .net the only solution i have founded is from Laurent Kempe
http://perso.wanadoo.fr/laurent.kempe/technical/csharp/webcam.htm
it works fine with usb webcams but wireless usb cam dosent work at all (i dont know why, maybe cause the receiver isnt a camera)
if anyone have a video solution with .net pls let me know at cserrano@smartmatic.com
|
|
|
|
|
xces wrote:
error C2039: 'ReadHuge' : is not a member of 'CFile'
error C2039: 'WriteHuge' : is not a member of 'CFile'
Replace ReadHuge with Read
Replace WriteHuge with Write
ReadHuge and WriteHuge have been left in MFC only for backward compatibility for several versions. The normal Read and Write are the correct way to do things.
John
|
|
|
|
|
Does anyone knows how to capture video from 2 drivers simultaneously?
Thanks.
|
|
|
|
|
Probably impossible for the identical USB cams
|
|
|
|
|
use directX its is possible
gud luck
|
|
|
|
|
yes it could depends on the USB bandwidth
|
|
|
|
|
I nedd how to manage video from c#, I nedd to do a videochat for a project of the college
|
|
|
|
|
Hi,
I'd just downloaded, installed and compiled the demo app.
My Logitech QuickCam is available in the Capture Source window.
But it does not show any data .
Any idea what could be wrong here.
The webcam works, as I can use it with the QuickCam software.
Pat
|
|
|
|