diff --git a/ext/opencv/cvmat.cpp b/ext/opencv/cvmat.cpp
index 0cb4280..0f58400 100644
--- a/ext/opencv/cvmat.cpp
+++ b/ext/opencv/cvmat.cpp
@@ -3766,20 +3766,26 @@ rb_warp_affine(int argc, VALUE *argv, VALUE self)
return dest;
}
-
/*
- * call-seq:
- * CvMat.find_homograpy(src_points, dst_points[,method = :all][,ransac_reproj_threshold = 0][,get_status = nil]) -> cvmat
- *
- * Finds the perspective transformation between two planes.
- * src_points: Coordinates of the points in the original plane, 2xN, Nx2, 3xN or Nx3 1-channel array (the latter two are for representation in homogeneous coordinates), where N is the number of points. 1xN or Nx1 2- or 3-channel array can also be passed.
- * dst_points: Point coordinates in the destination plane, 2xN, Nx2, 3xN or Nx3 1-channel, or 1xN or Nx1 2- or 3-channel array.
- * method: The method used to computed homography matrix; one of the following symbols:
- * :all - a regular method using all the points
- * :ransac - RANSAC-based robust method
- * :lmeds - Least-Median robust method
- * ransac_reproj_threshold: The maximum allowed reprojection error to treat a point pair as an inlier (used in the RANSAC method only). If src_points and dst_points are measured in pixels, it usually makes sense to set this parameter somewhere in the range 1 to 10.
- * get_status If true, the optional output mask set by a robust method (:ransac or :lmeds) is returned additionally.
+ * Finds a perspective transformation between two planes.
+ *
+ * @overload find_homograpy(src_points, dst_points ,method = :all, ransac_reproj_threshold = 0, get_mask = nil)
+ * @param src_points [CvMat] Coordinates of the points in the original plane.
+ * @param dst_points [CvMat] Coordinates of the points in the target plane.
+ * @param method [Symbol] Method used to computed a homography matrix. The following methods are possible:
+ * * :all - a regular method using all the points
+ * * :ransac - RANSAC-based robust method
+ * * :lmeds - Least-Median robust method
+ * @param ransac_reproj_threshold [Number] Maximum allowed reprojection error to treat a point pair as
+ * an inlier (used in the RANSAC method only).
+ * @param get_mask [Boolean] If true, the optional output mask set by
+ * a robust method (:ransac or :lmeds) is returned additionally.
+ * @return [CvMat, Array] The perspective transformation H between the source and the destination
+ * planes in CvMat.
+ * If method is :ransac or :lmeds and get_mask is true, the output mask
+ * is also returned in the form of an array [H, output_mask].
+ * @scope class
+ * @opencv_func cvFindHomography
*/
VALUE
rb_find_homograpy(int argc, VALUE *argv, VALUE self)
@@ -3817,19 +3823,16 @@ rb_find_homograpy(int argc, VALUE *argv, VALUE self)
}
/*
- * call-seq:
- * CvMat.rotation_matrix2D(center,angle,scale) -> cvmat
+ * Calculates an affine matrix of 2D rotation.
*
- * Create new affine matrix of 2D rotation (2x3 32bit floating-point matrix).
- * center is center of rotation (x, y).
- * angle is rotation angle in degrees.
- * Positive values mean counter-clockwise rotation
- * (the coordinate origin is assumed at top-left corner).
- * scale is isotropic scale factor.
- *
- * [ a b | (1 - a) * center.x - b * center.y ]
- * [-b a | (b * center.x + (1 + a) * center.y ]
- * where a = scale * cos(angle), b = scale * sin(angle)
+ * @overload rotation_matrix2D(center, angle, scale)
+ * @param center [CvPoint2D32f] Center of the rotation in the source image.
+ * @param angle [Number] Rotation angle in degrees. Positive values mean counter-clockwise rotation
+ * (the coordinate origin is assumed to be the top-left corner).
+ * @param scale [Number] Isotropic scale factor.
+ * @return [CvMat] The output affine transformation, 2x3 floating-point matrix.
+ * @scope class
+ * @opencv_func cv2DRotationMatrix
*/
VALUE
rb_rotation_matrix2D(VALUE self, VALUE center, VALUE angle, VALUE scale)
@@ -3845,10 +3848,15 @@ rb_rotation_matrix2D(VALUE self, VALUE center, VALUE angle, VALUE scale)
}
/*
- * call-seq:
- * warp_perspective(map_matrix[,flags = CV_INTER_LINEAR | CV_WARP_FILL_OUTLIERS][,fillval=0])) -> cvmat
+ * Applies a perspective transformation to an image.
*
- * Applies perspective transformation to the image.
+ * @overload warp_perspective(map_matrix, flags = CV_INTER_LINEAR | CV_WARP_FILL_OUTLIERS, fillval = 0)
+ * @param map_matrix [CvMat] 3x3 transformation matrix.
+ * @param flags [Integer] Combination of interpolation methods (CV_INTER_LINEAR or CV_INTER_NEAREST)
+ * and the optional flag CV_WARP_INVERSE_MAP, that sets map_matrix as the inverse transformation.
+ * @param fillval [Number, CvScalar] Value used in case of a constant border.
+ * @return [CvMat] Output image.
+ * @opencv_func cvWarpPerspective
*/
VALUE
rb_warp_perspective(int argc, VALUE *argv, VALUE self)
@@ -3871,14 +3879,19 @@ rb_warp_perspective(int argc, VALUE *argv, VALUE self)
}
/*
- * call-seq:
- * remap(mapx,mapy[,flags = CV_INTER_LINEAR | CV_WARP_FILL_OUTLIERS][,fillval=0]) -> cvmat
+ * Applies a generic geometrical transformation to an image.
*
- * Applies generic geometrical transformation to the image.
- * Transforms source image using the specified map:
- * dst(x,y)<-src(mapx(x,y),mapy(x,y))
- * Similar to other geometrical transformations, some interpolation method (specified by user) is used to
- * extract pixels with non-integer coordinates.
+ * @overload remap(mapx, mapy, flags = CV_INTER_LINEAR | CV_WARP_FILL_OUTLIERS, fillval = 0)
+ * @param mapx [CvMat] The first map of either (x,y) points or just x values having the type
+ * CV_16SC2, CV_32FC1, or CV_32FC2.
+ * @param mapy [CvMat] The second map of y values having the type CV_16UC1, CV_32FC1, or none
+ * (empty map if mapx is (x,y) points), respectively.
+ * @param flags [Integer] Combination of interpolation methods (CV_INTER_LINEAR or CV_INTER_NEAREST)
+ * and the optional flag CV_WARP_INVERSE_MAP, that sets map_matrix as the inverse transformation.
+ * @param fillval [Number, CvScalar] Value used in case of a constant border.
+ * @return [CvMat] Output image.
+ * @return [CvMat] Destination image.
+ * @opencv_func cvRemap
*/
VALUE
rb_remap(int argc, VALUE *argv, VALUE self)
@@ -3901,10 +3914,18 @@ rb_remap(int argc, VALUE *argv, VALUE self)
}
/*
- * call-seq:
- * log_polar(size, center, magnitude[ ,flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS])
+ * Remaps an image to log-polar space.
*
- * Remaps image to log-polar space.
+ * @overload log_polar(size, center, magnitude, flags = CV_INTER_LINEAR | CV_WARP_FILL_OUTLIERS)
+ * @param size [CvSize] Size of the destination image.
+ * @param center [CvPoint2D32f] The transformation center; where the output precision is maximal.
+ * @param magnitude [Number] Magnitude scale parameter.
+ * @param flags [Integer] A combination of interpolation methods and the following optional flags:
+ * * CV_WARP_FILL_OUTLIERS - fills all of the destination image pixels. If some of them
+ * correspond to outliers in the source image, they are set to zero.
+ * * CV_WARP_INVERSE_MAP - performs inverse transformation.
+ * @return [CvMat] Destination image.
+ * @opencv_func cvLogPolar
*/
VALUE
rb_log_polar(int argc, VALUE *argv, VALUE self)