ppwwyyxx / OpenPano

Automatic Panorama Stitching From Scratch
MIT License
1.86k stars 553 forks source link

Fuzzy image output with camera moverment #37

Closed Aozhi closed 6 years ago

Aozhi commented 7 years ago

Excuse me. I have a question of the robustness of the algorithm. If I keep the camera center fixed, there's no ghost in the output image. But if I move the camera, then ghost will probabaly appear. Do you have solution on this problem?

ppwwyyxx commented 7 years ago

With random camera movement, the stitching problem is not a mathematically well-defined problem at all. There is no elegant way to do this.

Aozhi commented 7 years ago

Thank you for the explanation.

Aozhi commented 7 years ago

Do you have suggested parameters in config.cfg if I stitch photos using a smart phone? Also, you mention OpenMP in your code to speed up the running. Can I have it compiled just like compiling the Eigen or libjpeg?

ppwwyyxx commented 7 years ago

No suggestions. It depends on how the stitching goes. OpenMP is a feature of the compiler. If you use gcc or a sufficiently new clang it will be there.

Aozhi commented 7 years ago

Hi. Have you ever tried with other feature detectors? I saw there's a brief detector in your code. Have you tested its performance?

ppwwyyxx commented 7 years ago

That's for fun only . It's never really used and not very useful.

Aozhi commented 7 years ago

Thank you for your patient reply. This is a very good program of panorama stitching from scratch. Have you ever programmed the same thing with OpenCV? How do you think of the performance of stitching API of OpenCV?

ppwwyyxx commented 7 years ago

I think the stitching quality of OpenCV isn't very good. And it's slower.

Aozhi commented 7 years ago

Thx. I also think OpenCV is slow.

I find one more problem that: if I would like to stitch the images even though the overlap situation is bad, how should I change the code? Since I found a sentence that: Found a tree size 11!=12 when the overlap is not good.

ppwwyyxx commented 7 years ago

You'll need more features or more matches. A number of configs can have this effect, but it's hard to say which to use without looking at the data.

Aozhi commented 7 years ago

Hello, thank you so much for the explations. I noticed that you mention RootSIFT in your blog. Is this change already included in your code?

ppwwyyxx commented 7 years ago

yes

Aozhi commented 7 years ago

struct Edge { int v1, v2; float weight; Edge(int a, int b, float v):v1(a), v2(b), weight(v) {} bool operator < (const Edge& r) const { return weight < r.weight; } };

Excuse me, I notice that you define a graph and use it in the file camera_estimate.cc. What are the nodes and edges representing? What is the purpose of the traverse here? Thank you.

ppwwyyxx commented 7 years ago

Node is each image. Edge is a matching pair. weight is how confident the matching is. traverse gives an order to do bundle adjustment one image by one image.

Aozhi commented 7 years ago

Thank you again.

Aozhi commented 7 years ago

One more question. In some cases the program will give the error "the tree size is != (a number)", "image n and image m are no connected well". In which case this error will occur?

ppwwyyxx commented 7 years ago

When not all images are not in the same connected components in the graph, which means certain pairs of images are not matched very well. And there could be a lot of reasons for that..