Ask Your Question
0

Speed up queryFrame/imencode

asked 2014-07-15 04:16:12 -0600

Hey guys,

i am writing a programm that takes a picture, encodes it to jpg and sends it over network. This should work as fast as possible. I examined my program and found out that queryFrame needs around 80ms (hd picture with 1280x720) and imencode around 50ms. Is there any way to speed up this functions ? I read about the Cuda possibility but i dont have a Nvidia graphic card.

i tried png as encoding alternative but that takes even longer than jpg

edit retag flag offensive close merge delete

Comments

JPEG is the only way of encoding fast but it gets you quite a big loss in quality. As to speeding up, did you built openCV with TBB capability?

StevenPuttemans gravatar imageStevenPuttemans ( 2014-07-15 04:24:30 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-07-15 05:42:27 -0600

pthbrk gravatar image

Capture frames in one thread and put them into a queue. From a second thread, pull from queue, encode and dispatch.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-07-15 04:16:12 -0600

Seen: 1,952 times

Last updated: Jul 15 '14