added drawMatches function to features2d and documentation on this

This commit is contained in:
Maria Dimashova
2010-06-11 17:15:43 +00:00
parent 217842b0b9
commit 17a8050fe2
3 changed files with 146 additions and 1 deletions

View File

@@ -1957,4 +1957,72 @@ protected:
};
\end{lstlisting}
\cvCppFunc{drawMatches}
This function draws matches of keypints from two images on output image.
Match is a line connecting two keypoints (circles).
\cvdefCpp{
void drawMatches( const Mat\& img1, const Mat\& img2,
const vector<KeyPoint>\& keypoints1, const vector<KeyPoint>\& keypoints2,
const vector<int>\& matches, const vector<char>\& mask, Mat\& outImg,
const Scalar\& matchColor = Scalar::all(-1),
const Scalar\& singlePointColor = Scalar::all(-1),
int flags = DrawMatchesFlags::DEFAULT );
}
\begin{description}
\cvarg{img1}{First sourse image.}
\end{description}
\begin{description}
\cvarg{img1}{Second sourse image.}
\end{description}
\begin{description}
\cvarg{keypoints1}{Keypoints from first sourse image.}
\end{description}
\begin{description}
\cvarg{keypoints2}{Keypoints from second sourse image.}
\end{description}
\begin{description}
\cvarg{matches}{Matches from first image to second one, i.e. keypoints1[i] has corresponding point keypoints2[matches[i]]}
\end{description}
\begin{description}
\cvarg{mask}{Mask determining which matches will be drawn. If mask is empty all matches will be drawn. }
\end{description}
\begin{description}
\cvarg{outImg}{Output image. Its content depends on \texttt{flags} value what is drawn in output image. See below possible \texttt{flags} bit values. }
\end{description}
\begin{description}
\cvarg{matchColor}{Color of matches (lines and connected keypoints). If \texttt{matchColor}==Scalar::all(-1) color will be generated randomly.}
\end{description}
\begin{description}
\cvarg{singlePointColor}{Color of single keypoints (circles), i.e. keypoints not having the matches. If \texttt{singlePointColor}==Scalar::all(-1) color will be generated randomly.}
\end{description}
\begin{description}
\cvarg{flags}{Each bit of \texttt{flags} sets some feature of drawing. Possible \texttt{flags} bit values is defined by DrawMatchesFlags, see below. }
\end{description}
\begin{lstlisting}
struct DrawMatchesFlags
{
enum{ DEFAULT = 0, // Output image matrix will be created (Mat::create),
// i.e. existing memory of output image will be reused.
// Two source image, matches and single keypoints will be drawn.
DRAW_OVER_OUTIMG = 1, // Output image matrix will not be created (Mat::create).
// Matches will be drawn on existing content
// of output image.
NOT_DRAW_SINGLE_POINTS = 2 // Single keypoints will not be drawn.
};
};
\end{lstlisting}
\fi