mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-18 00:01:17 +08:00

- Add basic functionality test for HoughPoint2Line in XimgprocTest.java - Add gen_dict.json to expose RO_STRICT and RO_IGNORE_BORDERS constants in Java wrapper - Implement minimal test to verify method call and output validity
22 lines
668 B
Java
22 lines
668 B
Java
package org.opencv.test.ximgproc;
|
|
|
|
import org.opencv.core.Core;
|
|
import org.opencv.core.CvType;
|
|
import org.opencv.core.Mat;
|
|
import org.opencv.core.Point;
|
|
import org.opencv.test.OpenCVTestCase;
|
|
import org.opencv.ximgproc.Ximgproc;
|
|
|
|
public class XimgprocTest extends OpenCVTestCase {
|
|
|
|
public void testHoughPoint2Line() {
|
|
Mat src = new Mat(80, 80, CvType.CV_8UC1, new org.opencv.core.Scalar(0));
|
|
Point houghPoint = new Point(40, 40);
|
|
|
|
int[] result = Ximgproc.HoughPoint2Line(houghPoint, src, Ximgproc.ARO_315_135, Ximgproc.HDO_DESKEW, Ximgproc.RO_IGNORE_BORDERS);
|
|
|
|
assertNotNull(result);
|
|
assertEquals(4, result.length);
|
|
}
|
|
}
|