Merge pull request #14406 from thangktran:thangktran/java-wrapper-for-find4QuadCornerSubpix

pull/14368/head
Alexander Alekhin 6 years ago
commit cd879bedb4
  1. 2
      modules/calib3d/include/opencv2/calib3d.hpp
  2. 9
      modules/calib3d/misc/java/test/Calib3dTest.java

@ -849,7 +849,7 @@ CV_EXPORTS_W bool findChessboardCorners( InputArray image, Size patternSize, Out
int flags = CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE );
//! finds subpixel-accurate positions of the chessboard corners
CV_EXPORTS bool find4QuadCornerSubpix( InputArray img, InputOutputArray corners, Size region_size );
CV_EXPORTS_W bool find4QuadCornerSubpix( InputArray img, InputOutputArray corners, Size region_size );
/** @brief Renders the detected chessboard corners.

@ -188,6 +188,15 @@ public class Calib3dTest extends OpenCVTestCase {
assertTrue(!corners.empty());
}
public void testFind4QuadCornerSubpix() {
Size patternSize = new Size(9, 6);
MatOfPoint2f corners = new MatOfPoint2f();
Size region_size = new Size(5, 5);
Calib3d.findChessboardCorners(grayChess, patternSize, corners);
Calib3d.find4QuadCornerSubpix(grayChess, corners, region_size);
assertTrue(!corners.empty());
}
public void testFindCirclesGridMatSizeMat() {
int size = 300;
Mat img = new Mat(size, size, CvType.CV_8U);

Loading…
Cancel
Save