Adds keypoints to the training set (descriptors are supposed to be calculated here).
\cvCppFunc{GenericDescriptorMatcher::add}
Keypoints can be passed using \cvCppCross{KeyPointCollection} (with with corresponding images) or as a vector of \cvCppCross{KeyPoint} from a single image.
Adds images and keypoints from them to the train collection (descriptors are supposed to be calculated here).
If train collection is not empty new image and keypoints from them will be added to
\cvarg{keypoints1}{Keypoints from first source image.}
\cvarg{keypoints1}{Keypoints from first source image.}
\end{description}
\cvarg{img2}{Second source image.}
\begin{description}
\cvarg{img1}{Second source image.}
\end{description}
\begin{description}
\cvarg{keypoints2}{Keypoints from second source image.}
\cvarg{keypoints2}{Keypoints from second source image.}
\end{description}
\cvarg{matches}{Matches from first image to second one, i.e. \texttt{keypoints1[i]}
has corresponding point \texttt{keypoints2[matches[i]]}. }
\begin{description}
\cvarg{outImg}{Output image. Its content depends on \texttt{flags} value
\cvarg{matches}{Matches from first image to second one, i.e. keypoints1[i] has corresponding point keypoints2[matches[i]]}
what is drawn in output image. See below possible \texttt{flags} bit values. }
\end{description}
\cvarg{matchColor}{Color of matches (lines and connected keypoints).
If \texttt{matchColor==Scalar::all(-1)} color will be generated randomly.}
\begin{description}
\cvarg{singlePointColor}{Color of single keypoints (circles), i.e. keypoints not having the matches.
\cvarg{outImg}{Output image. Its content depends on \texttt{flags} value what is drawn in output image. See below possible \texttt{flags} bit values. }
If \texttt{singlePointColor==Scalar::all(-1)} color will be generated randomly.}
\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{matchesMask}{Mask determining which matches will be drawn. If mask is empty all matches will be drawn. }
\cvarg{matchesMask}{Mask determining which matches will be drawn. If mask is empty all matches will be drawn. }
\end{description}
\cvarg{flags}{Each bit of \texttt{flags} sets some feature of drawing.
Possible \texttt{flags} bit values is defined by \texttt{DrawMatchesFlags}, see below. }
\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}
\end{description}
\begin{lstlisting}
\begin{lstlisting}
struct DrawMatchesFlags
struct DrawMatchesFlags
{
{
enum{ DEFAULT = 0, // Output image matrix will be created (Mat::create),
enum{ DEFAULT = 0, // Output image matrix will be created (Mat::create),
// i.e. existing memory of output image may be reused.
// i.e. existing memory of output image may be reused.
// Two source image, matches and single keypoints will be drawn.
// Two source image, matches and single keypoints
DRAW_OVER_OUTIMG = 1, // Output image matrix will not be created (Mat::create).
// will be drawn.
// Matches will be drawn on existing content
// For each keypoint only the center point will be
// of output image.
// drawn (without the circle around keypoint with
NOT_DRAW_SINGLE_POINTS = 2 // Single keypoints will not be drawn.
// keypoint size and orientation).
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.
DRAW_RICH_KEYPOINTS = 4 // For each keypoint the circle around
// keypoint with keypoint size and orientation will