Dot graph meaning of stitching detail output

Source: Internet
Author: User

If you take advantage of the stitching detail provided inside the OPENCV.

Input parameters:

Stitching_detail--save_graph A.dot 1.png 2.png

Where the contents of the A.dot file are as follows:

Graph matches_graph{

"1.png"--"2.png" [label= "nm=26, ni=19, c=1.20253"];

}

What is the Dot:https://zh.wikipedia.org/wiki/dot language

How to configure stitching detail is mentioned in the author's essay. You can view it yourself

So what does the result of this output mean? There is a question above stackoverflow:

Http://stackoverflow.com/questions/26364594/image-stitching-details-with-opencv

The following text is translated.

Image Stitching details with OpenCV

OpenCV Image Stitching details

I am trying to get deep into stitching. I am using CV::d etail.

I'm trying to understand stitching in more depth. I'm using CV::d etail

I am trying to follow this example:

Https://github.com/Itseez/opencv/blob/master/samples/cpp/stitching_detailed.cpp

I ran the following example

I roughly understand the stitching pipeline.

I basically understand the splicing pipe

There is a function matchesgraphasstring () which return a graph. I am wondering how does it even compute this graph. Further, what's the dfination of confidence interval in this case.

There's a matchesgraphasstring () function that can return a picture. I want to know how it got this figure. Further, how to define the confidence level between pictures.

The output is in DOT format and a sample graph looks like

This figure probably grew like this.

Graph matches_graph{"15.jpg"--"13.jpg" [label= "nm=75, Ni=50, c=1.63934"]; " 15.jpg "--" 12.jpg "[label=" nm=47, ni=28, c=1.26697 "];" 15.jpg "--" 14.jpg "[label=" nm=149, ni=117, c=2.22011 "];" 11.jpg "--" 13.jpg "[label=" nm=71, ni=52, c=1.77474 "];" 11.jpg "--" 9.jpg "[label=" nm=46, ni=37, c=1.69725 "];" 11.jpg "--" 10.jpg "[label=" nm=87, ni=73, c=2.14076 "];" 9.jpg "--" 8.jpg "[label=" nm=122, ni=99, c=2.21973 "];}

What does labels, Nm, and Ni mean here? The official document seems to be lacking these details.

What do the nm and Ni mean? Official documents seem to lack detail.


This is a very interesting question indeed. As @hatboyzero pointed out, the meaning of the variables is reasonably straightforward:

This is a very interesting question. As Hatboyzero points out, the meaning of these variables has a direct source.

    • Nm is the number of matches (in the overlapping region, so obvious outliers has been removed already).
    • Ni is the number of inliers after finding a homography with Ransac.
    • C is the confidence and the images is a match.

Where NM is the number of matches (in overlapping areas, the apparent periphery has been removed);Ni is the number of inner circumference in one satisfying Ransac single-matrix. the C Two picture is a confidence level when matching.

Background to matching

Match background

building a panorama is do by finding  interest points  in all images and computing < Em>descriptors  for them. These descriptors, like SIFT, SURF and ORB, were developed so, the same parts of a image could be detected. They is just a medium-dimensional vector (or dimensions is typical). By computing the L2 or some other distance between and descriptors, matches can be found. How many matches in a pair of images be found is described by the term  Nm .

building a panorama can be accomplished by finding points of interest inside all the pictures and calculating the sub for them. These include Sift surf orb It was developed to detect the same part of a picture. They are vectors of a medium dimension (with 64 dimension or 128 l2 "I guess the norm? "or other distances, matches can be found. The number of matches found in a pair of images will be described as nm . " trem terminology"

Notice that and far, the matching have only been done through appearance of image regions around interest points. Very Typically, many of these matches are plain wrong. This can is because the descriptor looks the same (Think:repetitive object like window sills on a multi-window building, Or leaves on a tree) or because the descriptor is just a bit too uninformative. "Uninformative no information "

Note that so far, this match is only described by the points of interest that appear in the image area. Usually, these matches are wrong. This is because they look very similar (think about it: repetitive objects such as curtains on multiple windows, or leaves on trees) or because these are not good information.

The common solution is to add geometric constraints: The image pair were taken from the same position with the SAM E camera, therefore points that is close in one image must is close in the other image, too. More specifically, all the points must has undergone the same transformation. In the Panorama case where the camera is rotated around the nodal point of the camera-lens system this transformation mus t have been a 2D homography. "Geometric geometry,specifically specific nodal nodes "

The common solution is to add a geometric constraint: This image is identical to the same position from the same camera, so these points converge in one picture in the other. More specifically, all of these points have to undergo the same transformation. In the Panorama case the camera rotates around the node of the camera lens system, which must be a 2d single-matrix.

Ransac  is the gold standard algorithm to find the best transformation and all the matches that is consistent with this tranformation. The number of these consistent matches is called  Ni . RANSAC works by randomly selecting in the 4 matches (see Paper sect 3.1) and fitting a homography to these four MATC Hes. Then, count how many matches from all possible matches would agree with the this homography. Repeat, see paper, and at the end take the model, had the most inliers. Then re-compute the model with all inliers. The name of the algorithm comes from RANdom SAmple Consensus:ransac.

Ransac is a gold standard algorithm used to find the best conversions and all matches are consistent in the conversion. These consistent matches are referred to as Ni. Ransac works by randomly selecting 4 pairs of Ni(see paper 3.1 section) for these four pairs match a single-should matrix. Then from all possible matches to match the single-matrix and count them. Repeat The number of times (see paper) and finally take the model with the most inner circumference. Then use all the inner circumference to calculate the model again. The algorithm's name comes from the same random sampling: Also known as RANSAC. (RANdom SAmple Consensus)

Confidence-term

Terminology--confidence level

The question for me is, about this mysterious confidence. I quickly found where it was calculated.

This question is a magical confidence for me. I quickly found out how he calculated it:

From Stitching/sources/matches.cpp:

From this place.

These coeffs is from paper M. Brown and D. Lowe. "Automatic panoramic Image stitching//using invariant Features"

Matches_info.confidence = matches_info.num_inliers/(8 + 0.3 * matches_info.matches.size ());

Set zero confidence to remove matches between too close images, as they don ' t provide//additional information anyway. The threshold was set experimentally.

Matches_info.confidence = matches_info.confidence > 3. ? 0.: matches_info.confidence;

Coeffs ( non-0 coefficients, polynomial coefficients )

These coefficients are derived from the m.brown and d.lowe automatic panorama stitching using invariant features

The confidence level of the matching information = The number of inner circumference of the matching information /( matching size of 8+0.3* matching information );

Set the confidence level to 0 for two mismatched images to remove the match, since they do not provide additional information, this threshold is set by experience.

Confidence level of matching information = confidence of matching information >3.? 0.: match the confidence level of the information ;

The mentioned paper have in section 3.2 (' Probabilistic Model for Image Match verification ') some more details Means.

The article mentioned in the 3.2 section (for picture matching authentication possible model) more details.

Reading This section A few things stood out.

Some things have to be said:

    1. There is a lot of variables (mostly probabilities) in their model. These values is defined in the paper without any justification. Below is the key sentence:

Though in practice we had chosen values for P0, p1, p (m = 0), p (m = 1) and pmin, they could in principle is learnt from t He data.

So, this is just a theoretical exercise as the the parameters has been plucked out of thin air. Notice the could in principle is learnt.

There are many variables in this model (mostly probability theory), and these values are defined in the paper without any certification. Here are the key sentences:

By experimenting we choose p0,p1,p (M =0), p (m=1) , and pmin, and they may conform to certain rules from the data point of view.

2.

The paper have in equation the confidence calculation. If read correctly, it means that matches_info.confidence indicates a proper match between both images iff it value is Abov E 1.

This article has a confidence level calculation in its 13th reference. If you understand that there is no error, it means that the confidence level of the matching information indicates that the value will be greater than 1 if there is a suitable match between the two images .

3.

I don ' t see any justification in the removal of a match (setting confidence to 0) while the confidence is above 3. It just means that there is very little outliers. I think the programmers thought that a high number of matches that turn off to being outlier means that the images overlap a Great deal, but this isn ' t provided by algorithms behind this. (Simply, the matchings is based on appearance of features.)

I don't see any justification to remove a match when its confidence level is greater than 3 . It simply means that two pictures have very few outside points. I think programmers think a lot of peripheral "here should be inliers, I guess." "The match means that the picture has a lot of overlap, but there is no algorithm available. (very simple, matching is based on features that have already occurred.) )

Dot graph meaning of stitching detail output

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.