python - QueryFrame very slow on Windows -


i have build simple webcam recorder on linux works quite well. ~25fps video , audio.

i porting recorder on windows (win7) , while works, unusable. queryframe function takes more 350ms, i.e 2.5fps.

the code in python problem seems lib call.

i tested on same machine same webcam (a logitech e2500). on windows, installed opencv v2.2. cannot check right version might bit higher on ubuntu.

any idea problem ?

edit : i've installed opencv2.4 , have same slow speed.

if problem on queryframe suspect following might happening: windows' driver camera retrieves frames in format not natively supported opencv, opencv forced convert frames format understands. operation consumes cpu , notice performance loss if size of frames big.

for testing purposes, can:

1) set smaller size frames , see if improves performance:

cvsetcaptureproperty( capture, cv_cap_prop_frame_width, 320); cvsetcaptureproperty( capture, cv_cap_prop_frame_height, 240); 

2) use camera , see if problem goes away.

once you've determined what's going on, try find update driver , hope solves issue, or stop using windows. =)


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -