how opencv program execute fast

asked 2014-10-30 22:40:00 -0600

I write code for dark channel prior to convert color image into dark channel. my code take 7 min to execute and give output image. how i can make my code run faster.

edit retag flag offensive close merge delete

Comments

Try recompile everything in "release mode", or with optimization flags such as "O2" or "O3".

rwong gravatar imagerwong ( 2014-10-31 00:25:23 -0600 )edit

Besides that, what is your code? Your processor/environment? Because right now, no one can tell if your code contains a loop like this one:

for(uint i=0;i<2147483647;i++){

    int for_nothing = 2+2/2*2;
    for_nothing= sqrt(for_nothing);
}

running on an old 386, which could slow your execution ;) I am pretty sure this is note the case; but how can we know?

Doombot gravatar imageDoombot ( 2014-10-31 13:05:58 -0600 )edit

I don't mean to be rude Jitendra with my last comment ;) Simply, help us help you by providing more info :)

Doombot gravatar imageDoombot ( 2014-10-31 13:11:08 -0600 )edit