本文整理了Java中org.opencv.features2d.KeyPoint.<init>()
方法的一些代码示例,展示了KeyPoint.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyPoint.<init>()
方法的具体详情如下:
包路径:org.opencv.features2d.KeyPoint
类名称:KeyPoint
方法名:<init>
[英]The keypoint constructors
[中]关键点构造函数
代码示例来源:origin: com.sikulix/sikulixapi
public KeyPoint[] toArray() {
int num = (int) total();
KeyPoint[] a = new KeyPoint[num];
if(num == 0)
return a;
float buff[] = new float[num * _channels];
get(0, 0, buff); //TODO: check ret val!
for(int i=0; i<num; i++)
a[i] = new KeyPoint( buff[_channels*i+0], buff[_channels*i+1], buff[_channels*i+2], buff[_channels*i+3],
buff[_channels*i+4], (int) buff[_channels*i+5], (int) buff[_channels*i+6] );
return a;
}
代码示例来源:origin: ytai/IOIOPlotter
public KeyPoint[] toArray() {
int num = (int) total();
KeyPoint[] a = new KeyPoint[num];
if(num == 0)
return a;
float buff[] = new float[num * _channels];
get(0, 0, buff); //TODO: check ret val!
for(int i=0; i<num; i++)
a[i] = new KeyPoint( buff[_channels*i+0], buff[_channels*i+1], buff[_channels*i+2], buff[_channels*i+3],
buff[_channels*i+4], (int) buff[_channels*i+5], (int) buff[_channels*i+6] );
return a;
}
代码示例来源:origin: nu.pattern/opencv
public KeyPoint[] toArray() {
int num = (int) total();
KeyPoint[] a = new KeyPoint[num];
if(num == 0)
return a;
float buff[] = new float[num * _channels];
get(0, 0, buff); //TODO: check ret val!
for(int i=0; i<num; i++)
a[i] = new KeyPoint( buff[_channels*i+0], buff[_channels*i+1], buff[_channels*i+2], buff[_channels*i+3],
buff[_channels*i+4], (int) buff[_channels*i+5], (int) buff[_channels*i+6] );
return a;
}
代码示例来源:origin: abhn/marvel
public KeyPoint[] toArray() {
int num = (int) total();
KeyPoint[] a = new KeyPoint[num];
if(num == 0)
return a;
float buff[] = new float[num * _channels];
get(0, 0, buff); //TODO: check ret val!
for(int i=0; i<num; i++)
a[i] = new KeyPoint( buff[_channels*i+0], buff[_channels*i+1], buff[_channels*i+2], buff[_channels*i+3],
buff[_channels*i+4], (int) buff[_channels*i+5], (int) buff[_channels*i+6] );
return a;
}
代码示例来源:origin: jtsky/EasyPR_Android
public KeyPoint[] toArray() {
int num = (int) total();
KeyPoint[] a = new KeyPoint[num];
if(num == 0)
return a;
float buff[] = new float[num * _channels];
get(0, 0, buff); //TODO: check ret val!
for(int i=0; i<num; i++)
a[i] = new KeyPoint( buff[_channels*i+0], buff[_channels*i+1], buff[_channels*i+2], buff[_channels*i+3],
buff[_channels*i+4], (int) buff[_channels*i+5], (int) buff[_channels*i+6] );
return a;
}
代码示例来源:origin: stackoverflow.com
import com.googlecode.javacv.cpp.opencv_core.CvMat;
import com.googlecode.javacv.cpp.opencv_features2d.FeatureDetector;
import com.googlecode.javacv.cpp.opencv_features2d.KeyPoint;
import com.googlecode.javacv.cpp.opencv_nonfree.SIFT;
import static com.googlecode.javacv.cpp.opencv_highgui.cvLoadImageM;
public class any {
public static void main(String args[])
{
final CvMat image1 = cvLoadImageM("C:/temp/316.jpg" , 0);
final CvMat image2 = cvLoadImageM("C:/temp/330.jpg", 0);
if(image1==null)
System.out.println("image is null");
if(image2==null)
System.out.println("image is null");
SIFT sift = new SIFT();
FeatureDetector featureDetector =sift.getFeatureDetector();
KeyPoint keypoint1 = new KeyPoint();
KeyPoint keypoint2 = new KeyPoint() ;
featureDetector.detect(image1, keypoint1 , null);
featureDetector.detect(image2,keypoint2, null);
System.out.println(keypoint1);
}
}
代码示例来源:origin: com.sikulix/sikulixapi
public static void Mat_to_vector_KeyPoint(Mat m, List<KeyPoint> kps) {
if (kps == null)
throw new java.lang.IllegalArgumentException("Output List can't be null");
int count = m.rows();
if (CvType.CV_64FC(7) != m.type() || m.cols() != 1)
throw new java.lang.IllegalArgumentException(
"CvType.CV_64FC(7) != m.type() || m.cols()!=1\n" + m);
kps.clear();
double[] buff = new double[7 * count];
m.get(0, 0, buff);
for (int i = 0; i < count; i++) {
kps.add(new KeyPoint((float) buff[7 * i], (float) buff[7 * i + 1], (float) buff[7 * i + 2], (float) buff[7 * i + 3],
(float) buff[7 * i + 4], (int) buff[7 * i + 5], (int) buff[7 * i + 6]));
}
}
代码示例来源:origin: abhn/marvel
public static void Mat_to_vector_KeyPoint(Mat m, List<KeyPoint> kps) {
if (kps == null)
throw new java.lang.IllegalArgumentException("Output List can't be null");
int count = m.rows();
if (CvType.CV_64FC(7) != m.type() || m.cols() != 1)
throw new java.lang.IllegalArgumentException(
"CvType.CV_64FC(7) != m.type() || m.cols()!=1\n" + m);
kps.clear();
double[] buff = new double[7 * count];
m.get(0, 0, buff);
for (int i = 0; i < count; i++) {
kps.add(new KeyPoint((float) buff[7 * i], (float) buff[7 * i + 1], (float) buff[7 * i + 2], (float) buff[7 * i + 3],
(float) buff[7 * i + 4], (int) buff[7 * i + 5], (int) buff[7 * i + 6]));
}
}
代码示例来源:origin: nu.pattern/opencv
public static void Mat_to_vector_KeyPoint(Mat m, List<KeyPoint> kps) {
if (kps == null)
throw new java.lang.IllegalArgumentException("Output List can't be null");
int count = m.rows();
if (CvType.CV_64FC(7) != m.type() || m.cols() != 1)
throw new java.lang.IllegalArgumentException(
"CvType.CV_64FC(7) != m.type() || m.cols()!=1\n" + m);
kps.clear();
double[] buff = new double[7 * count];
m.get(0, 0, buff);
for (int i = 0; i < count; i++) {
kps.add(new KeyPoint((float) buff[7 * i], (float) buff[7 * i + 1], (float) buff[7 * i + 2], (float) buff[7 * i + 3],
(float) buff[7 * i + 4], (int) buff[7 * i + 5], (int) buff[7 * i + 6]));
}
}
代码示例来源:origin: ytai/IOIOPlotter
public static void Mat_to_vector_KeyPoint(Mat m, List<KeyPoint> kps) {
if (kps == null)
throw new java.lang.IllegalArgumentException("Output List can't be null");
int count = m.rows();
if (CvType.CV_64FC(7) != m.type() || m.cols() != 1)
throw new java.lang.IllegalArgumentException(
"CvType.CV_64FC(7) != m.type() || m.cols()!=1\n" + m);
kps.clear();
double[] buff = new double[7 * count];
m.get(0, 0, buff);
for (int i = 0; i < count; i++) {
kps.add(new KeyPoint((float) buff[7 * i], (float) buff[7 * i + 1], (float) buff[7 * i + 2], (float) buff[7 * i + 3],
(float) buff[7 * i + 4], (int) buff[7 * i + 5], (int) buff[7 * i + 6]));
}
}
代码示例来源:origin: jtsky/EasyPR_Android
public static void Mat_to_vector_KeyPoint(Mat m, List<KeyPoint> kps) {
if (kps == null)
throw new java.lang.IllegalArgumentException("Output List can't be null");
int count = m.rows();
if (CvType.CV_64FC(7) != m.type() || m.cols() != 1)
throw new java.lang.IllegalArgumentException(
"CvType.CV_64FC(7) != m.type() || m.cols()!=1\n" + m);
kps.clear();
double[] buff = new double[7 * count];
m.get(0, 0, buff);
for (int i = 0; i < count; i++) {
kps.add(new KeyPoint((float) buff[7 * i], (float) buff[7 * i + 1], (float) buff[7 * i + 2], (float) buff[7 * i + 3],
(float) buff[7 * i + 4], (int) buff[7 * i + 5], (int) buff[7 * i + 6]));
}
}
代码示例来源:origin: stackoverflow.com
KeyPoint kp = new KeyPoint();
代码示例来源:origin: stackoverflow.com
KeyPoint kp = new KeyPoint();
代码示例来源:origin: stackoverflow.com
KeyPoint impKeyPoint = new KeyPoint();
KeyPoint tempKeyPoint = new KeyPoint();
tempKeyPoint = impKeyPoint;
tempKeyPoint.size = 120;
KeyPoint tempKeyPoint = new KeyPoint();
tempKeyPoint = impKeyPoint;
tempKeyPoint.size = 120;
内容来源于网络,如有侵权,请联系作者删除!