补充提交
This commit is contained in:
@@ -0,0 +1,132 @@
|
||||
//
|
||||
// This file is auto-generated. Please don't modify it!
|
||||
//
|
||||
package org.opencv.imgproc;
|
||||
|
||||
import org.opencv.core.Algorithm;
|
||||
import org.opencv.core.Mat;
|
||||
import org.opencv.core.Size;
|
||||
|
||||
// C++: class CLAHE
|
||||
//javadoc: CLAHE
|
||||
|
||||
public class CLAHE extends Algorithm {
|
||||
|
||||
protected CLAHE(long addr) { super(addr); }
|
||||
|
||||
// internal usage only
|
||||
public static CLAHE __fromPtr__(long addr) { return new CLAHE(addr); }
|
||||
|
||||
//
|
||||
// C++: Size getTilesGridSize()
|
||||
//
|
||||
|
||||
//javadoc: CLAHE::getTilesGridSize()
|
||||
public Size getTilesGridSize()
|
||||
{
|
||||
|
||||
Size retVal = new Size(getTilesGridSize_0(nativeObj));
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: double getClipLimit()
|
||||
//
|
||||
|
||||
//javadoc: CLAHE::getClipLimit()
|
||||
public double getClipLimit()
|
||||
{
|
||||
|
||||
double retVal = getClipLimit_0(nativeObj);
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: void apply(Mat src, Mat& dst)
|
||||
//
|
||||
|
||||
//javadoc: CLAHE::apply(src, dst)
|
||||
public void apply(Mat src, Mat dst)
|
||||
{
|
||||
|
||||
apply_0(nativeObj, src.nativeObj, dst.nativeObj);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: void collectGarbage()
|
||||
//
|
||||
|
||||
//javadoc: CLAHE::collectGarbage()
|
||||
public void collectGarbage()
|
||||
{
|
||||
|
||||
collectGarbage_0(nativeObj);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: void setClipLimit(double clipLimit)
|
||||
//
|
||||
|
||||
//javadoc: CLAHE::setClipLimit(clipLimit)
|
||||
public void setClipLimit(double clipLimit)
|
||||
{
|
||||
|
||||
setClipLimit_0(nativeObj, clipLimit);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: void setTilesGridSize(Size tileGridSize)
|
||||
//
|
||||
|
||||
//javadoc: CLAHE::setTilesGridSize(tileGridSize)
|
||||
public void setTilesGridSize(Size tileGridSize)
|
||||
{
|
||||
|
||||
setTilesGridSize_0(nativeObj, tileGridSize.width, tileGridSize.height);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
delete(nativeObj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// C++: Size getTilesGridSize()
|
||||
private static native double[] getTilesGridSize_0(long nativeObj);
|
||||
|
||||
// C++: double getClipLimit()
|
||||
private static native double getClipLimit_0(long nativeObj);
|
||||
|
||||
// C++: void apply(Mat src, Mat& dst)
|
||||
private static native void apply_0(long nativeObj, long src_nativeObj, long dst_nativeObj);
|
||||
|
||||
// C++: void collectGarbage()
|
||||
private static native void collectGarbage_0(long nativeObj);
|
||||
|
||||
// C++: void setClipLimit(double clipLimit)
|
||||
private static native void setClipLimit_0(long nativeObj, double clipLimit);
|
||||
|
||||
// C++: void setTilesGridSize(Size tileGridSize)
|
||||
private static native void setTilesGridSize_0(long nativeObj, double tileGridSize_width, double tileGridSize_height);
|
||||
|
||||
// native support for java finalize()
|
||||
private static native void delete(long nativeObj);
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
+101
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// This file is auto-generated. Please don't modify it!
|
||||
//
|
||||
package org.opencv.imgproc;
|
||||
|
||||
import org.opencv.core.Algorithm;
|
||||
import org.opencv.core.Mat;
|
||||
import org.opencv.core.Size;
|
||||
|
||||
// C++: class LineSegmentDetector
|
||||
//javadoc: LineSegmentDetector
|
||||
|
||||
public class LineSegmentDetector extends Algorithm {
|
||||
|
||||
protected LineSegmentDetector(long addr) { super(addr); }
|
||||
|
||||
// internal usage only
|
||||
public static LineSegmentDetector __fromPtr__(long addr) { return new LineSegmentDetector(addr); }
|
||||
|
||||
//
|
||||
// C++: int compareSegments(Size size, Mat lines1, Mat lines2, Mat& _image = Mat())
|
||||
//
|
||||
|
||||
//javadoc: LineSegmentDetector::compareSegments(size, lines1, lines2, _image)
|
||||
public int compareSegments(Size size, Mat lines1, Mat lines2, Mat _image)
|
||||
{
|
||||
|
||||
int retVal = compareSegments_0(nativeObj, size.width, size.height, lines1.nativeObj, lines2.nativeObj, _image.nativeObj);
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
//javadoc: LineSegmentDetector::compareSegments(size, lines1, lines2)
|
||||
public int compareSegments(Size size, Mat lines1, Mat lines2)
|
||||
{
|
||||
|
||||
int retVal = compareSegments_1(nativeObj, size.width, size.height, lines1.nativeObj, lines2.nativeObj);
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: void detect(Mat _image, Mat& _lines, Mat& width = Mat(), Mat& prec = Mat(), Mat& nfa = Mat())
|
||||
//
|
||||
|
||||
//javadoc: LineSegmentDetector::detect(_image, _lines, width, prec, nfa)
|
||||
public void detect(Mat _image, Mat _lines, Mat width, Mat prec, Mat nfa)
|
||||
{
|
||||
|
||||
detect_0(nativeObj, _image.nativeObj, _lines.nativeObj, width.nativeObj, prec.nativeObj, nfa.nativeObj);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//javadoc: LineSegmentDetector::detect(_image, _lines)
|
||||
public void detect(Mat _image, Mat _lines)
|
||||
{
|
||||
|
||||
detect_1(nativeObj, _image.nativeObj, _lines.nativeObj);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: void drawSegments(Mat& _image, Mat lines)
|
||||
//
|
||||
|
||||
//javadoc: LineSegmentDetector::drawSegments(_image, lines)
|
||||
public void drawSegments(Mat _image, Mat lines)
|
||||
{
|
||||
|
||||
drawSegments_0(nativeObj, _image.nativeObj, lines.nativeObj);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
delete(nativeObj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// C++: int compareSegments(Size size, Mat lines1, Mat lines2, Mat& _image = Mat())
|
||||
private static native int compareSegments_0(long nativeObj, double size_width, double size_height, long lines1_nativeObj, long lines2_nativeObj, long _image_nativeObj);
|
||||
private static native int compareSegments_1(long nativeObj, double size_width, double size_height, long lines1_nativeObj, long lines2_nativeObj);
|
||||
|
||||
// C++: void detect(Mat _image, Mat& _lines, Mat& width = Mat(), Mat& prec = Mat(), Mat& nfa = Mat())
|
||||
private static native void detect_0(long nativeObj, long _image_nativeObj, long _lines_nativeObj, long width_nativeObj, long prec_nativeObj, long nfa_nativeObj);
|
||||
private static native void detect_1(long nativeObj, long _image_nativeObj, long _lines_nativeObj);
|
||||
|
||||
// C++: void drawSegments(Mat& _image, Mat lines)
|
||||
private static native void drawSegments_0(long nativeObj, long _image_nativeObj, long lines_nativeObj);
|
||||
|
||||
// native support for java finalize()
|
||||
private static native void delete(long nativeObj);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,244 @@
|
||||
package org.opencv.imgproc;
|
||||
|
||||
import java.lang.Math;
|
||||
|
||||
//javadoc:Moments
|
||||
public class Moments {
|
||||
|
||||
public double m00;
|
||||
public double m10;
|
||||
public double m01;
|
||||
public double m20;
|
||||
public double m11;
|
||||
public double m02;
|
||||
public double m30;
|
||||
public double m21;
|
||||
public double m12;
|
||||
public double m03;
|
||||
|
||||
public double mu20;
|
||||
public double mu11;
|
||||
public double mu02;
|
||||
public double mu30;
|
||||
public double mu21;
|
||||
public double mu12;
|
||||
public double mu03;
|
||||
|
||||
public double nu20;
|
||||
public double nu11;
|
||||
public double nu02;
|
||||
public double nu30;
|
||||
public double nu21;
|
||||
public double nu12;
|
||||
public double nu03;
|
||||
|
||||
public Moments(
|
||||
double m00,
|
||||
double m10,
|
||||
double m01,
|
||||
double m20,
|
||||
double m11,
|
||||
double m02,
|
||||
double m30,
|
||||
double m21,
|
||||
double m12,
|
||||
double m03)
|
||||
{
|
||||
this.m00 = m00;
|
||||
this.m10 = m10;
|
||||
this.m01 = m01;
|
||||
this.m20 = m20;
|
||||
this.m11 = m11;
|
||||
this.m02 = m02;
|
||||
this.m30 = m30;
|
||||
this.m21 = m21;
|
||||
this.m12 = m12;
|
||||
this.m03 = m03;
|
||||
this.completeState();
|
||||
}
|
||||
|
||||
public Moments() {
|
||||
this(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
public Moments(double[] vals) {
|
||||
set(vals);
|
||||
}
|
||||
|
||||
public void set(double[] vals) {
|
||||
if (vals != null) {
|
||||
m00 = vals.length > 0 ? vals[0] : 0;
|
||||
m10 = vals.length > 1 ? vals[1] : 0;
|
||||
m01 = vals.length > 2 ? vals[2] : 0;
|
||||
m20 = vals.length > 3 ? vals[3] : 0;
|
||||
m11 = vals.length > 4 ? vals[4] : 0;
|
||||
m02 = vals.length > 5 ? vals[5] : 0;
|
||||
m30 = vals.length > 6 ? vals[6] : 0;
|
||||
m21 = vals.length > 7 ? vals[7] : 0;
|
||||
m12 = vals.length > 8 ? vals[8] : 0;
|
||||
m03 = vals.length > 9 ? vals[9] : 0;
|
||||
this.completeState();
|
||||
} else {
|
||||
m00 = 0;
|
||||
m10 = 0;
|
||||
m01 = 0;
|
||||
m20 = 0;
|
||||
m11 = 0;
|
||||
m02 = 0;
|
||||
m30 = 0;
|
||||
m21 = 0;
|
||||
m12 = 0;
|
||||
m03 = 0;
|
||||
mu20 = 0;
|
||||
mu11 = 0;
|
||||
mu02 = 0;
|
||||
mu30 = 0;
|
||||
mu21 = 0;
|
||||
mu12 = 0;
|
||||
mu03 = 0;
|
||||
nu20 = 0;
|
||||
nu11 = 0;
|
||||
nu02 = 0;
|
||||
nu30 = 0;
|
||||
nu21 = 0;
|
||||
nu12 = 0;
|
||||
nu03 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Moments [ " +
|
||||
"\n" +
|
||||
"m00=" + m00 + ", " +
|
||||
"\n" +
|
||||
"m10=" + m10 + ", " +
|
||||
"m01=" + m01 + ", " +
|
||||
"\n" +
|
||||
"m20=" + m20 + ", " +
|
||||
"m11=" + m11 + ", " +
|
||||
"m02=" + m02 + ", " +
|
||||
"\n" +
|
||||
"m30=" + m30 + ", " +
|
||||
"m21=" + m21 + ", " +
|
||||
"m12=" + m12 + ", " +
|
||||
"m03=" + m03 + ", " +
|
||||
"\n" +
|
||||
"mu20=" + mu20 + ", " +
|
||||
"mu11=" + mu11 + ", " +
|
||||
"mu02=" + mu02 + ", " +
|
||||
"\n" +
|
||||
"mu30=" + mu30 + ", " +
|
||||
"mu21=" + mu21 + ", " +
|
||||
"mu12=" + mu12 + ", " +
|
||||
"mu03=" + mu03 + ", " +
|
||||
"\n" +
|
||||
"nu20=" + nu20 + ", " +
|
||||
"nu11=" + nu11 + ", " +
|
||||
"nu02=" + nu02 + ", " +
|
||||
"\n" +
|
||||
"nu30=" + nu30 + ", " +
|
||||
"nu21=" + nu21 + ", " +
|
||||
"nu12=" + nu12 + ", " +
|
||||
"nu03=" + nu03 + ", " +
|
||||
"\n]";
|
||||
}
|
||||
|
||||
protected void completeState()
|
||||
{
|
||||
double cx = 0, cy = 0;
|
||||
double mu20, mu11, mu02;
|
||||
double inv_m00 = 0.0;
|
||||
|
||||
if( Math.abs(this.m00) > 0.00000001 )
|
||||
{
|
||||
inv_m00 = 1. / this.m00;
|
||||
cx = this.m10 * inv_m00;
|
||||
cy = this.m01 * inv_m00;
|
||||
}
|
||||
|
||||
// mu20 = m20 - m10*cx
|
||||
mu20 = this.m20 - this.m10 * cx;
|
||||
// mu11 = m11 - m10*cy
|
||||
mu11 = this.m11 - this.m10 * cy;
|
||||
// mu02 = m02 - m01*cy
|
||||
mu02 = this.m02 - this.m01 * cy;
|
||||
|
||||
this.mu20 = mu20;
|
||||
this.mu11 = mu11;
|
||||
this.mu02 = mu02;
|
||||
|
||||
// mu30 = m30 - cx*(3*mu20 + cx*m10)
|
||||
this.mu30 = this.m30 - cx * (3 * mu20 + cx * this.m10);
|
||||
mu11 += mu11;
|
||||
// mu21 = m21 - cx*(2*mu11 + cx*m01) - cy*mu20
|
||||
this.mu21 = this.m21 - cx * (mu11 + cx * this.m01) - cy * mu20;
|
||||
// mu12 = m12 - cy*(2*mu11 + cy*m10) - cx*mu02
|
||||
this.mu12 = this.m12 - cy * (mu11 + cy * this.m10) - cx * mu02;
|
||||
// mu03 = m03 - cy*(3*mu02 + cy*m01)
|
||||
this.mu03 = this.m03 - cy * (3 * mu02 + cy * this.m01);
|
||||
|
||||
|
||||
double inv_sqrt_m00 = Math.sqrt(Math.abs(inv_m00));
|
||||
double s2 = inv_m00*inv_m00, s3 = s2*inv_sqrt_m00;
|
||||
|
||||
this.nu20 = this.mu20*s2;
|
||||
this.nu11 = this.mu11*s2;
|
||||
this.nu02 = this.mu02*s2;
|
||||
this.nu30 = this.mu30*s3;
|
||||
this.nu21 = this.mu21*s3;
|
||||
this.nu12 = this.mu12*s3;
|
||||
this.nu03 = this.mu03*s3;
|
||||
|
||||
}
|
||||
|
||||
public double get_m00() { return this.m00; }
|
||||
public double get_m10() { return this.m10; }
|
||||
public double get_m01() { return this.m01; }
|
||||
public double get_m20() { return this.m20; }
|
||||
public double get_m11() { return this.m11; }
|
||||
public double get_m02() { return this.m02; }
|
||||
public double get_m30() { return this.m30; }
|
||||
public double get_m21() { return this.m21; }
|
||||
public double get_m12() { return this.m12; }
|
||||
public double get_m03() { return this.m03; }
|
||||
public double get_mu20() { return this.mu20; }
|
||||
public double get_mu11() { return this.mu11; }
|
||||
public double get_mu02() { return this.mu02; }
|
||||
public double get_mu30() { return this.mu30; }
|
||||
public double get_mu21() { return this.mu21; }
|
||||
public double get_mu12() { return this.mu12; }
|
||||
public double get_mu03() { return this.mu03; }
|
||||
public double get_nu20() { return this.nu20; }
|
||||
public double get_nu11() { return this.nu11; }
|
||||
public double get_nu02() { return this.nu02; }
|
||||
public double get_nu30() { return this.nu30; }
|
||||
public double get_nu21() { return this.nu21; }
|
||||
public double get_nu12() { return this.nu12; }
|
||||
public double get_nu03() { return this.nu03; }
|
||||
|
||||
public void set_m00(double m00) { this.m00 = m00; }
|
||||
public void set_m10(double m10) { this.m10 = m10; }
|
||||
public void set_m01(double m01) { this.m01 = m01; }
|
||||
public void set_m20(double m20) { this.m20 = m20; }
|
||||
public void set_m11(double m11) { this.m11 = m11; }
|
||||
public void set_m02(double m02) { this.m02 = m02; }
|
||||
public void set_m30(double m30) { this.m30 = m30; }
|
||||
public void set_m21(double m21) { this.m21 = m21; }
|
||||
public void set_m12(double m12) { this.m12 = m12; }
|
||||
public void set_m03(double m03) { this.m03 = m03; }
|
||||
public void set_mu20(double mu20) { this.mu20 = mu20; }
|
||||
public void set_mu11(double mu11) { this.mu11 = mu11; }
|
||||
public void set_mu02(double mu02) { this.mu02 = mu02; }
|
||||
public void set_mu30(double mu30) { this.mu30 = mu30; }
|
||||
public void set_mu21(double mu21) { this.mu21 = mu21; }
|
||||
public void set_mu12(double mu12) { this.mu12 = mu12; }
|
||||
public void set_mu03(double mu03) { this.mu03 = mu03; }
|
||||
public void set_nu20(double nu20) { this.nu20 = nu20; }
|
||||
public void set_nu11(double nu11) { this.nu11 = nu11; }
|
||||
public void set_nu02(double nu02) { this.nu02 = nu02; }
|
||||
public void set_nu30(double nu30) { this.nu30 = nu30; }
|
||||
public void set_nu21(double nu21) { this.nu21 = nu21; }
|
||||
public void set_nu12(double nu12) { this.nu12 = nu12; }
|
||||
public void set_nu03(double nu03) { this.nu03 = nu03; }
|
||||
}
|
||||
@@ -0,0 +1,407 @@
|
||||
//
|
||||
// This file is auto-generated. Please don't modify it!
|
||||
//
|
||||
package org.opencv.imgproc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.opencv.core.Mat;
|
||||
import org.opencv.core.MatOfFloat4;
|
||||
import org.opencv.core.MatOfFloat6;
|
||||
import org.opencv.core.MatOfInt;
|
||||
import org.opencv.core.MatOfPoint2f;
|
||||
import org.opencv.core.Point;
|
||||
import org.opencv.core.Rect;
|
||||
import org.opencv.utils.Converters;
|
||||
|
||||
// C++: class Subdiv2D
|
||||
//javadoc: Subdiv2D
|
||||
|
||||
public class Subdiv2D {
|
||||
|
||||
protected final long nativeObj;
|
||||
protected Subdiv2D(long addr) { nativeObj = addr; }
|
||||
|
||||
public long getNativeObjAddr() { return nativeObj; }
|
||||
|
||||
// internal usage only
|
||||
public static Subdiv2D __fromPtr__(long addr) { return new Subdiv2D(addr); }
|
||||
|
||||
public static final int
|
||||
PTLOC_ERROR = -2,
|
||||
PTLOC_OUTSIDE_RECT = -1,
|
||||
PTLOC_INSIDE = 0,
|
||||
PTLOC_VERTEX = 1,
|
||||
PTLOC_ON_EDGE = 2,
|
||||
NEXT_AROUND_ORG = 0x00,
|
||||
NEXT_AROUND_DST = 0x22,
|
||||
PREV_AROUND_ORG = 0x11,
|
||||
PREV_AROUND_DST = 0x33,
|
||||
NEXT_AROUND_LEFT = 0x13,
|
||||
NEXT_AROUND_RIGHT = 0x31,
|
||||
PREV_AROUND_LEFT = 0x20,
|
||||
PREV_AROUND_RIGHT = 0x02;
|
||||
|
||||
|
||||
//
|
||||
// C++: Subdiv2D(Rect rect)
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::Subdiv2D(rect)
|
||||
public Subdiv2D(Rect rect)
|
||||
{
|
||||
|
||||
nativeObj = Subdiv2D_0(rect.x, rect.y, rect.width, rect.height);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: Subdiv2D()
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::Subdiv2D()
|
||||
public Subdiv2D()
|
||||
{
|
||||
|
||||
nativeObj = Subdiv2D_1();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: Point2f getVertex(int vertex, int* firstEdge = 0)
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::getVertex(vertex, firstEdge)
|
||||
public Point getVertex(int vertex, int[] firstEdge)
|
||||
{
|
||||
double[] firstEdge_out = new double[1];
|
||||
Point retVal = new Point(getVertex_0(nativeObj, vertex, firstEdge_out));
|
||||
if(firstEdge!=null) firstEdge[0] = (int)firstEdge_out[0];
|
||||
return retVal;
|
||||
}
|
||||
|
||||
//javadoc: Subdiv2D::getVertex(vertex)
|
||||
public Point getVertex(int vertex)
|
||||
{
|
||||
|
||||
Point retVal = new Point(getVertex_1(nativeObj, vertex));
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: int edgeDst(int edge, Point2f* dstpt = 0)
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::edgeDst(edge, dstpt)
|
||||
public int edgeDst(int edge, Point dstpt)
|
||||
{
|
||||
double[] dstpt_out = new double[2];
|
||||
int retVal = edgeDst_0(nativeObj, edge, dstpt_out);
|
||||
if(dstpt!=null){ dstpt.x = dstpt_out[0]; dstpt.y = dstpt_out[1]; }
|
||||
return retVal;
|
||||
}
|
||||
|
||||
//javadoc: Subdiv2D::edgeDst(edge)
|
||||
public int edgeDst(int edge)
|
||||
{
|
||||
|
||||
int retVal = edgeDst_1(nativeObj, edge);
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: int edgeOrg(int edge, Point2f* orgpt = 0)
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::edgeOrg(edge, orgpt)
|
||||
public int edgeOrg(int edge, Point orgpt)
|
||||
{
|
||||
double[] orgpt_out = new double[2];
|
||||
int retVal = edgeOrg_0(nativeObj, edge, orgpt_out);
|
||||
if(orgpt!=null){ orgpt.x = orgpt_out[0]; orgpt.y = orgpt_out[1]; }
|
||||
return retVal;
|
||||
}
|
||||
|
||||
//javadoc: Subdiv2D::edgeOrg(edge)
|
||||
public int edgeOrg(int edge)
|
||||
{
|
||||
|
||||
int retVal = edgeOrg_1(nativeObj, edge);
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: int findNearest(Point2f pt, Point2f* nearestPt = 0)
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::findNearest(pt, nearestPt)
|
||||
public int findNearest(Point pt, Point nearestPt)
|
||||
{
|
||||
double[] nearestPt_out = new double[2];
|
||||
int retVal = findNearest_0(nativeObj, pt.x, pt.y, nearestPt_out);
|
||||
if(nearestPt!=null){ nearestPt.x = nearestPt_out[0]; nearestPt.y = nearestPt_out[1]; }
|
||||
return retVal;
|
||||
}
|
||||
|
||||
//javadoc: Subdiv2D::findNearest(pt)
|
||||
public int findNearest(Point pt)
|
||||
{
|
||||
|
||||
int retVal = findNearest_1(nativeObj, pt.x, pt.y);
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: int getEdge(int edge, int nextEdgeType)
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::getEdge(edge, nextEdgeType)
|
||||
public int getEdge(int edge, int nextEdgeType)
|
||||
{
|
||||
|
||||
int retVal = getEdge_0(nativeObj, edge, nextEdgeType);
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: int insert(Point2f pt)
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::insert(pt)
|
||||
public int insert(Point pt)
|
||||
{
|
||||
|
||||
int retVal = insert_0(nativeObj, pt.x, pt.y);
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: int locate(Point2f pt, int& edge, int& vertex)
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::locate(pt, edge, vertex)
|
||||
public int locate(Point pt, int[] edge, int[] vertex)
|
||||
{
|
||||
double[] edge_out = new double[1];
|
||||
double[] vertex_out = new double[1];
|
||||
int retVal = locate_0(nativeObj, pt.x, pt.y, edge_out, vertex_out);
|
||||
if(edge!=null) edge[0] = (int)edge_out[0];
|
||||
if(vertex!=null) vertex[0] = (int)vertex_out[0];
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: int nextEdge(int edge)
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::nextEdge(edge)
|
||||
public int nextEdge(int edge)
|
||||
{
|
||||
|
||||
int retVal = nextEdge_0(nativeObj, edge);
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: int rotateEdge(int edge, int rotate)
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::rotateEdge(edge, rotate)
|
||||
public int rotateEdge(int edge, int rotate)
|
||||
{
|
||||
|
||||
int retVal = rotateEdge_0(nativeObj, edge, rotate);
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: int symEdge(int edge)
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::symEdge(edge)
|
||||
public int symEdge(int edge)
|
||||
{
|
||||
|
||||
int retVal = symEdge_0(nativeObj, edge);
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: void getEdgeList(vector_Vec4f& edgeList)
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::getEdgeList(edgeList)
|
||||
public void getEdgeList(MatOfFloat4 edgeList)
|
||||
{
|
||||
Mat edgeList_mat = edgeList;
|
||||
getEdgeList_0(nativeObj, edgeList_mat.nativeObj);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: void getLeadingEdgeList(vector_int& leadingEdgeList)
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::getLeadingEdgeList(leadingEdgeList)
|
||||
public void getLeadingEdgeList(MatOfInt leadingEdgeList)
|
||||
{
|
||||
Mat leadingEdgeList_mat = leadingEdgeList;
|
||||
getLeadingEdgeList_0(nativeObj, leadingEdgeList_mat.nativeObj);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: void getTriangleList(vector_Vec6f& triangleList)
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::getTriangleList(triangleList)
|
||||
public void getTriangleList(MatOfFloat6 triangleList)
|
||||
{
|
||||
Mat triangleList_mat = triangleList;
|
||||
getTriangleList_0(nativeObj, triangleList_mat.nativeObj);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: void getVoronoiFacetList(vector_int idx, vector_vector_Point2f& facetList, vector_Point2f& facetCenters)
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::getVoronoiFacetList(idx, facetList, facetCenters)
|
||||
public void getVoronoiFacetList(MatOfInt idx, List<MatOfPoint2f> facetList, MatOfPoint2f facetCenters)
|
||||
{
|
||||
Mat idx_mat = idx;
|
||||
Mat facetList_mat = new Mat();
|
||||
Mat facetCenters_mat = facetCenters;
|
||||
getVoronoiFacetList_0(nativeObj, idx_mat.nativeObj, facetList_mat.nativeObj, facetCenters_mat.nativeObj);
|
||||
Converters.Mat_to_vector_vector_Point2f(facetList_mat, facetList);
|
||||
facetList_mat.release();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: void initDelaunay(Rect rect)
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::initDelaunay(rect)
|
||||
public void initDelaunay(Rect rect)
|
||||
{
|
||||
|
||||
initDelaunay_0(nativeObj, rect.x, rect.y, rect.width, rect.height);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// C++: void insert(vector_Point2f ptvec)
|
||||
//
|
||||
|
||||
//javadoc: Subdiv2D::insert(ptvec)
|
||||
public void insert(MatOfPoint2f ptvec)
|
||||
{
|
||||
Mat ptvec_mat = ptvec;
|
||||
insert_1(nativeObj, ptvec_mat.nativeObj);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
delete(nativeObj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// C++: Subdiv2D(Rect rect)
|
||||
private static native long Subdiv2D_0(int rect_x, int rect_y, int rect_width, int rect_height);
|
||||
|
||||
// C++: Subdiv2D()
|
||||
private static native long Subdiv2D_1();
|
||||
|
||||
// C++: Point2f getVertex(int vertex, int* firstEdge = 0)
|
||||
private static native double[] getVertex_0(long nativeObj, int vertex, double[] firstEdge_out);
|
||||
private static native double[] getVertex_1(long nativeObj, int vertex);
|
||||
|
||||
// C++: int edgeDst(int edge, Point2f* dstpt = 0)
|
||||
private static native int edgeDst_0(long nativeObj, int edge, double[] dstpt_out);
|
||||
private static native int edgeDst_1(long nativeObj, int edge);
|
||||
|
||||
// C++: int edgeOrg(int edge, Point2f* orgpt = 0)
|
||||
private static native int edgeOrg_0(long nativeObj, int edge, double[] orgpt_out);
|
||||
private static native int edgeOrg_1(long nativeObj, int edge);
|
||||
|
||||
// C++: int findNearest(Point2f pt, Point2f* nearestPt = 0)
|
||||
private static native int findNearest_0(long nativeObj, double pt_x, double pt_y, double[] nearestPt_out);
|
||||
private static native int findNearest_1(long nativeObj, double pt_x, double pt_y);
|
||||
|
||||
// C++: int getEdge(int edge, int nextEdgeType)
|
||||
private static native int getEdge_0(long nativeObj, int edge, int nextEdgeType);
|
||||
|
||||
// C++: int insert(Point2f pt)
|
||||
private static native int insert_0(long nativeObj, double pt_x, double pt_y);
|
||||
|
||||
// C++: int locate(Point2f pt, int& edge, int& vertex)
|
||||
private static native int locate_0(long nativeObj, double pt_x, double pt_y, double[] edge_out, double[] vertex_out);
|
||||
|
||||
// C++: int nextEdge(int edge)
|
||||
private static native int nextEdge_0(long nativeObj, int edge);
|
||||
|
||||
// C++: int rotateEdge(int edge, int rotate)
|
||||
private static native int rotateEdge_0(long nativeObj, int edge, int rotate);
|
||||
|
||||
// C++: int symEdge(int edge)
|
||||
private static native int symEdge_0(long nativeObj, int edge);
|
||||
|
||||
// C++: void getEdgeList(vector_Vec4f& edgeList)
|
||||
private static native void getEdgeList_0(long nativeObj, long edgeList_mat_nativeObj);
|
||||
|
||||
// C++: void getLeadingEdgeList(vector_int& leadingEdgeList)
|
||||
private static native void getLeadingEdgeList_0(long nativeObj, long leadingEdgeList_mat_nativeObj);
|
||||
|
||||
// C++: void getTriangleList(vector_Vec6f& triangleList)
|
||||
private static native void getTriangleList_0(long nativeObj, long triangleList_mat_nativeObj);
|
||||
|
||||
// C++: void getVoronoiFacetList(vector_int idx, vector_vector_Point2f& facetList, vector_Point2f& facetCenters)
|
||||
private static native void getVoronoiFacetList_0(long nativeObj, long idx_mat_nativeObj, long facetList_mat_nativeObj, long facetCenters_mat_nativeObj);
|
||||
|
||||
// C++: void initDelaunay(Rect rect)
|
||||
private static native void initDelaunay_0(long nativeObj, int rect_x, int rect_y, int rect_width, int rect_height);
|
||||
|
||||
// C++: void insert(vector_Point2f ptvec)
|
||||
private static native void insert_1(long nativeObj, long ptvec_mat_nativeObj);
|
||||
|
||||
// native support for java finalize()
|
||||
private static native void delete(long nativeObj);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user