Eugene Leitl wrote: > Seriously, what is roughly the overhead of the Python glue > if I have a scripted sequence of 1) grabbing a frame from /dev/video > 2) doing some processing on it 3) displaying it. > > Assuming 1, 2, 3 is written in C (I guess displaying a canvass will > involve some Python), is the overhead relevant? why not try it? import time def test(): func = abs # some trivial C function t0 = time.time() for i in range(1000000): func(0) # call C code to grab a frame func(0) # call C code to process it func(0) # call C code to display it print "overhead:", (time.time() - t0) / 1000, "ms per frame" test() on a 700 MHz box, this prints: overhead: 0.00413600003719 ms per frame Cheers /F <!-- (the eff-bot guide to) the standard python library: http://www.pythonware.com/people/fredrik/librarybook.htm -->
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4