Ask Your Question
0

opencv slow on ubuntu

asked 2012-08-03 07:40:06 -0500

hhnavid gravatar image

hi, i have written an application to detect roads. the input to my program comes from an IP camera. i use opencv 2.4.0, eclipse IDE and ubuntu 11.10. the program works but the frame rate is really slow (i get one frame every 4 seconds). i have tested the same code on windows using opencv 2.1.0 and visual c 2008. the code on windows works perfectly fine (almost real-time). but as i said the same code on ubuntu has terrible performance. the road detection is based on Hough transform. one last point i have to mention is that if i comment all the processing done on the input, the frame rate will become real-time on ubuntu but if i do the processing needed to detect roads the frame-rate will drop very low.

edit retag flag offensive close merge delete

Comments

3

Most probably you compiled with debug flags or linked to the debug libraries. Check your compile/link settings

sammy gravatar imagesammy ( 2012-08-04 06:55:52 -0500 )edit

May be the processing speed of the PC may differ.

jamesnzt gravatar imagejamesnzt ( 2014-09-04 06:37:32 -0500 )edit

Speed doesnot depend on OS, it depends only on processor

GANESH PRASAATH L gravatar imageGANESH PRASAATH L ( 2016-02-24 02:56:29 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-03-09 11:52:56 -0500

thierrypin gravatar image

Did you build it from source or installed it with apt-get?

If you built it, I would say you used bad cmake flags. Apt-get should give you a solid installation, but building it can yield more optimized binaries.

Make sure the build type is release, OpenMP is on and verify what optimization flags your CPU supports, like ENABLE_AVX.

The easiest way to know the flags is to run cmake-gui on the source code. If you don't have it, a simple

sudo apt-get install cmake-qt-gui

should do the job.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2012-08-03 07:40:06 -0500

Seen: 818 times

Last updated: Mar 09 '16