Ask Your Question

Alexey Spizhevoy's profile - activity

2012-10-04 02:41:59 -0500 answered a question Stitching module's strange behavior (Part II)

Hi,

The stitching module does assume internally that an input image is a photo. This fact is used when camera parameters (such as focal length, aspect ratio, etc) are estimated. But if you give a panorama image instead the camera parameters estimation step won't fail immediately. It can even return something close to actual parameters, but there's no any guarantee on that.

If you want to stitch images one by one, as you described, then you can build your own image mosaicing pipeline. The stitcher class is a pipeline built on top of a lot auxiliary classes, all of them are avilable in the cv::detail namespace.

Regarding the mosaicing confidence threshold. As I said too low values may lead to incorrect behaviour. If changing this parameter doesn't help, you can try to decrease Stitcher::panoConfidenceThresh.

2012-10-02 05:48:01 -0500 answered a question Stitching module's strange behavior (Part I)

Hi,

Internally, in the stitching module it's assumed that an input image is a photo from camera (it's used for camera parameters estimation). The assumption is false for _pano1.jpg as it's not a photo, but a few transformed images stitched.

Too low match confidence means that all (or almost) matches will be classified as good ones. But when all matches are good the method decides that the images are too similar and doesn't stitch them. It's reasonable, for instance, when a camera is fixed and there is a small moving object. In such case almost all matches are good, but it's better not to stitch two images, and take only one as output.

2012-09-28 05:43:33 -0500 answered a question Stitching module, finding features and match_conf

Hi,

I updated the log message in the OpenCV repository. You can adjust the match confidence threshold using the following code (here the default value 0.3 is set):

stitcher.setFeaturesMatcher(new detail::BestOf2NearestMatcher(false, 0.3f/*=match_conf*/));
2012-09-24 12:19:42 -0500 commented answer ROI Errors and the Stitcher module

Possibly this is a bug. Create a new issue here: http://code.opencv.org/projects/opencv/issues, attach your code, both images, and assign the issue to me -- I'll take a look.

2012-09-22 02:42:26 -0500 commented answer ROI Errors and the Stitcher module

The 'rois' vector contains only one element, while there must be two elements. You added two ROIs for the first image only. It should look like this: rois.resize(2); rois[0] = "the 1st image ROIs vector"; rois[1] = "the 2nd image ROIs vector";

2012-09-21 01:58:27 -0500 answered a question ROI Errors and the Stitcher module

Hi,

You're trying to stitch two images, but there is only one roi in the rois vector. Make sure that the vectors rois and images have the same size.

Alexey

2012-09-18 11:03:15 -0500 commented answer Stitcher module errors

You're trying to process 4-channel images, when only 3-channel images are supported. That's what you're doing wrong. See above a possible solution.

2012-09-17 11:01:49 -0500 commented answer Stitcher module errors

One possible way to convert 4-channel image into 3-channel one is to use the function cvtColor. It's mainly used to convert images between color spaces, but it also supports CV_RGBA2RGB flag.

2012-09-17 03:46:43 -0500 answered a question OpenCV Stitching module for iOS

Hi,

You can find the stitching module documentation here. There are two samples in OpenCV dedicated to the stitching module: opencv/samples/cpp/stitching.cpp and opencv/samples/cpp/stitching_detailed.cpp.

Alexey

2012-09-17 03:42:11 -0500 answered a question Stitcher module errors

Hi,

You should use the method stitch instead. The method composePanorama composes images under assumption that motions between the images were estimated earlier using the method estimateTransform. See the stitching module docs.

Alexey

2012-07-18 03:56:43 -0500 received badge  Editor (source)
2012-07-18 02:36:20 -0500 received badge  Teacher (source)
2012-07-18 02:05:10 -0500 answered a question Using OpenCV's stitching module, strange error when compositing images

Jason, you better report a bug at code.opencv.org. When reporting, please, attach some code that reproduces the error. And attach images as well, but try to find as small dataset as possible where the error occures. We'll work on fixing this bug.