Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Webcams and python


  • From: bj_666 at gmx.net (Marc 'BlackJack' Rintsch)
  • Subject: Webcams and python
  • Date: Sun, 18 Mar 2007 09:24:48 +0100

In <1174182674.500068.252550 at p15g2000hsd.googlegroups.com>, Synt4x wrote:

> from VideoCapture import Device
> cam = Device()
> 
> while 1:
>     img = cam.getImage()
> 
> Now, by doing this, my processor fires up to 100% load, which
> obviously makes my pc useless.
> 
> Is there any way or algorithm to lower the cpu load?

Just throw a small `time.sleep()` into the loop.

Ciao,
	Marc 'BlackJack' Rintsch