![]() |
|
#1
|
|||
|
|||
VFW Video Formatting - Desperate Help!Hi Guys,
I'm currently working on a edge detection project. I am able to create an MFC program that does this in 320 by 240 resolution but my supervisor wants me to do it in 640 by 480 for better accuracy. To initialise the camera to 640 by 480 resolution, I did this: videoformat.bmiHeader.biSize=sizeof(BITMAPINFOHEAD ER); videoformat.bmiHeader.biWidth=640; videoformat.bmiHeader.biHeight=480; videoformat.bmiHeader.biPlanes=1; videoformat.bmiHeader.biBitCount=24; videoformat.bmiHeader.biCompression=BI_RGB; videoformat.bmiHeader.biSizeImage=0; videoformat.bmiHeader.biXPelsPerMeter=0; videoformat.bmiHeader.biYPelsPerMeter=0; videoformat.bmiHeader.biClrUsed=0; videoformat.bmiHeader.biClrImportant=0; if (!capSetVideoFormat(m_hWndVideo,&videoformat,sizeo f(BITMAPINFO))) return 0; This works perfectly at home with my logitech quickcam camera (although really slow) but when I use this code at the labs with a SONY DC-10P camera and WinFast 2000XP driver, a message pops up saying "Unsupported Video Format", even after I change biWidth and biHeight to 320 and 240. Is there anyway around this? Most of my edge detection code is 640 by 480, so all I need to do is to initialise the camera to that. I've tried playing around with the code pasted above but still the same message pops up when i try to run the compiled mfc. I don't know what is so unsupported about it since the SONY camera has resolutions that reach 750 by 550 (something like that). Pleaaaase help me. Thanks very much! surgio |
|
#2
|
|||
|
|||
i think i know now!i think its because at home, my logitech driver captures the images in NTSC (640x480) and at uni labs the video driver captures in PAL (640x576). So when i tried to set the uni video format to 640x480 it stuffs up.
i've tried the inverse at home and it gave the same error message so hopefully my theory holds tmr, when i try it at uni. |
Recent GIDBlog
Writing a book by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| video editing question | Kris | Computer Software Forum - Windows | 8 | 13-Apr-2005 19:22 |
| Video Card | pcxgamer | Graphics Forum | 11 | 15-Dec-2004 18:47 |
| Php And Table Formatting | pellsweb2 | MySQL / PHP Forum | 2 | 10-Feb-2004 03:59 |
| Apache multiple localhosting - desperate! | jnorris | Apache Web Server Forum | 8 | 24-Nov-2003 00:55 |
| Video Editing Help | pcxgamer | Computer Software Forum - Windows | 5 | 30-Apr-2003 07:23 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The