opencv/modules/photo/misc/java/test/PhotoTest.java

23 lines
633 B
Java
Raw Normal View History

2012-10-17 15:12:04 +08:00
package org.opencv.test.photo;
import org.opencv.core.Core;
import org.opencv.core.CvType;
import org.opencv.core.Point;
import org.opencv.photo.Photo;
import org.opencv.test.OpenCVTestCase;
import org.opencv.imgproc.Imgproc;
2012-10-17 15:12:04 +08:00
public class PhotoTest extends OpenCVTestCase {
public void testInpaint() {
Point p = new Point(matSize / 2, matSize / 2);
2018-08-26 02:50:50 +08:00
Imgproc.circle(gray255, p, 2, colorBlack, Imgproc.FILLED);
Imgproc.circle(gray0, p, 2, colorWhite, Imgproc.FILLED);
2012-10-17 15:12:04 +08:00
Photo.inpaint(gray255, gray0, dst, 3, Photo.INPAINT_TELEA);
assertMatEqual(getMat(CvType.CV_8U, 255), dst);
}
}