Ask Your Question
3

Decreasing the Stitching time

asked 2012-10-15 04:21:39 -0600

zenberg gravatar image

updated 2012-10-15 10:59:09 -0600

Kirill Kornyakov gravatar image

Hello, I am using the Stitiching module and ROI to stitch two photos (968x1296 each).
On the iPhone 4 it takes more than 30 seconds (about 14 seconds to find features and 18 seconds to compose images + other calculations).

Can you please tell me if there is any way to speed up this process?

edit retag flag offensive close merge delete

Comments

Which features are you using? Did you try Orb or other features?

Kirill Kornyakov gravatar imageKirill Kornyakov ( 2012-10-15 11:00:40 -0600 )edit

Yes, I tried Orb, it works fast, but sometimes it finds it difficult to detect enough features. I came to a conclusion that by changing registrationResol I get much better results with the default feature detector.

zenberg gravatar imagezenberg ( 2012-10-16 11:25:04 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2012-10-15 06:31:56 -0600

sammy gravatar image

The first thing to check is whether you compile with full optimizations: set optimization level to -O2/-O3

If that doesn't help you enough, you should play with the stitcher parameters:

double registrationResol()
void setRegistrationResol(double resol_mpx)

double seamEstimationResol()
void setSeamEstimationResol(double resol_mpx)

double compositingResol()
void setCompositingResol(double resol_mpx)

They control the quality and the speed of your stitching process.

Third, you should try it on a Tegra3 device - that's an Android, btw ;)

Finally, if you still do not like the result, why not try to optimize it yourself more? Here is a starting point into image processing optimizations. But beware that you may cut your fingers. http://answers.opencv.org/question/755/object-detection-slow/#760

edit flag offensive delete link more

Comments

Hello Sammy. Thank you very much for your answer, it's very useful.

setRegistrationResol helped me to significantly(x2.5) speed up the process of feature detection. I changed the default value to 0.1 and if the search of features is unsuccessful, then I'm automatically changing it to the highest value of 1.0.

zenberg gravatar imagezenberg ( 2012-10-16 11:29:27 -0600 )edit

I have one more issue with "setCompositingResol" though.

I tried to change its value and when the value is "0.1" the stitching process is blazingly fast, but if I try to stitch the stitched photo that I get with this value with a regular photo, then "finding features" shows me an error no matter what's the value of "registrationResol". If I increase "compositingResol", then features can be found, but it requires much more time than it does with the default "compositingResol" value, so unfortunately I failed to decrease the stitching time here.

Maybe you have some ideas why this happens?

zenberg gravatar imagezenberg ( 2012-10-16 11:38:37 -0600 )edit

it's quite clear that when it's very fast it's because it does nothing - so no stitching result. If you want the stitching, you need to set a higher threshold. And do not expect it to work instantly.

sammy gravatar imagesammy ( 2012-10-16 12:24:11 -0600 )edit

Question Tools

Stats

Asked: 2012-10-15 04:21:39 -0600

Seen: 2,485 times

Last updated: Oct 15 '12