本文整理汇总了Java中com.googlecode.javacpp.FloatPointer类的典型用法代码示例。如果您正苦于以下问题:Java FloatPointer类的具体用法?Java FloatPointer怎么用?Java FloatPointer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FloatPointer类属于com.googlecode.javacpp包,在下文中一共展示了FloatPointer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: floatPointerToString
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
/** Returns a string representation of the given float pointer.
*
* @param floatPointer the given float pointer
* @return a string representation of the given float pointer
*/
private String floatPointerToString(final FloatPointer floatPointer) {
final StringBuilder stringBuilder = new StringBuilder();
boolean isFirst = true;
stringBuilder.append('[');
for (int i = 0; i < floatPointer.capacity(); i++) {
if (isFirst) {
isFirst = false;
} else {
stringBuilder.append(", ");
}
stringBuilder.append(floatPointer.get(i));
}
stringBuilder.append(']');
return stringBuilder.toString();
}
开发者ID:wordin0,项目名称:javacv,代码行数:22,代码来源:FaceRecognition.java
示例2: RGBDOdometry
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
@Namespace("cv") public static native boolean RGBDOdometry(@InputMat CvMat Rt, CvMat initRt,
IplImage image0, IplImage depth0, IplImage mask0,
IplImage image1, IplImage depth1, IplImage mask1,
CvMat cameraMatrix, float minDepth/*=0*/, float maxDepth/*=4*/, float maxDepthDiff/*=0.07*/,
@Const @StdVector IntPointer iterCounts/*=null*/,
@Const @StdVector FloatPointer minGradientMagnitudes/*=null*/,
int transformType/*=RIGID_BODY_MOTION*/);
开发者ID:wordin0,项目名称:javacv,代码行数:8,代码来源:opencv_contrib.java
示例3: cvCalcOpticalFlowPyrLK
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
public static native void cvCalcOpticalFlowPyrLK(CvArr prev, CvArr curr, CvArr prev_pyr,
CvArr curr_pyr, CvPoint2D32f prev_features, CvPoint2D32f curr_features,
int count, @ByVal CvSize win_size, int level, @Cast("char*") byte[] status,
FloatPointer track_error, @ByVal CvTermCriteria criteria, int flags);
开发者ID:wordin0,项目名称:javacv,代码行数:5,代码来源:opencv_video.java
示例4: cvCalcAffineFlowPyrLK
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
public static native void cvCalcAffineFlowPyrLK(CvArr prev, CvArr curr, CvArr prev_pyr,
CvArr curr_pyr, CvPoint2D32f prev_features, CvPoint2D32f curr_features,
FloatPointer matrices, int count, @ByVal CvSize win_size, int level,
@Cast("char*") byte[] status, FloatPointer track_error, @ByVal CvTermCriteria criteria, int flags);
开发者ID:wordin0,项目名称:javacv,代码行数:5,代码来源:opencv_video.java
示例5: call
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
public native void call(CvSVMKernel o, int vec_count, int vec_size, @Cast("const float**")
PointerPointer vecs, @Const FloatPointer another, FloatPointer results);
开发者ID:wordin0,项目名称:javacv,代码行数:3,代码来源:opencv_ml.java
示例6: cvSnakeImage
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
public static native void cvSnakeImage(IplImage image, CvPoint points, int length,
FloatPointer alpha, FloatPointer beta, FloatPointer gamma, int coeff_usage,
@ByVal CvSize win, @ByVal CvTermCriteria criteria, int calc_gradient/*=1*/);
开发者ID:wordin0,项目名称:javacv,代码行数:4,代码来源:opencv_legacy.java
示例7: cvMakeHistHeaderForArray
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
public static CvHistogram cvMakeHistHeaderForArray(int dims, int[] sizes, CvHistogram hist,
FloatPointer data, float[][] ranges/*=null*/, int uniform/*=1*/) {
return cvMakeHistHeaderForArray(dims, sizes, hist, data, ranges == null ? null : new PointerPointer(ranges), uniform);
}
开发者ID:wordin0,项目名称:javacv,代码行数:5,代码来源:opencv_imgproc.java
示例8: cvDistTransform
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
public static native void cvDistTransform(CvArr src, CvArr dst, int distance_type/*=CV_DIST_L2*/,
int mask_size/*=3*/, FloatPointer mask/*=null*/, CvArr labels/*=null*/, int labelType/*=CV_DIST_LABEL_CCOMP*/);
开发者ID:wordin0,项目名称:javacv,代码行数:3,代码来源:opencv_imgproc.java
示例9: cvFitLine
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
public static native void cvFitLine(CvArr points, int dist_type, double param,
double reps, double aeps, FloatPointer line);
开发者ID:wordin0,项目名称:javacv,代码行数:3,代码来源:opencv_imgproc.java
示例10: getPoints
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
public native void getPoints(@InputArray FloatPointer idx, @OutputArray CvMat pts,
@OutputArray IntPointer labels/*=null*/);
开发者ID:wordin0,项目名称:javacv,代码行数:3,代码来源:opencv_core.java
示例11: svmDetector
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
@Const @StdVector
public native FloatPointer svmDetector();
开发者ID:wordin0,项目名称:javacv,代码行数:3,代码来源:opencv_objdetect.java
示例12: Index
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
public Index(FloatPointer features, IndexParams params, int distType/*=FLANN_DIST_L2*/) {
allocate(features, params, distType);
}
开发者ID:wordin0,项目名称:javacv,代码行数:4,代码来源:opencv_flann.java
示例13: allocate
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
private native void allocate(@InputArray FloatPointer features, @ByRef IndexParams params,
@Cast("cvflann::flann_distance_t") int distType);
开发者ID:wordin0,项目名称:javacv,代码行数:3,代码来源:opencv_flann.java
示例14: build
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
public native void build(@InputArray FloatPointer features, @ByRef IndexParams params,
@Cast("cvflann::flann_distance_t") int distType/*=FLANN_DIST_L2*/);
开发者ID:wordin0,项目名称:javacv,代码行数:3,代码来源:opencv_flann.java
示例15: knnSearch
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
public native void knnSearch(@InputArray FloatPointer query, @OutputArray IntPointer indices,
@OutputArray FloatPointer dists, int knn, @ByRef SearchParams params/*=SearchParams()*/);
开发者ID:wordin0,项目名称:javacv,代码行数:3,代码来源:opencv_flann.java
示例16: radiusSearch
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
public native int radiusSearch(@InputArray FloatPointer query,
@OutputArray IntPointer indices, @OutputArray FloatPointer dists,
double radius, int maxResults, @ByRef SearchParams params/*=SearchParams()*/);
开发者ID:wordin0,项目名称:javacv,代码行数:4,代码来源:opencv_flann.java
示例17: compute
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
public native void compute(@InputMat CvArr img, @StdVector FloatPointer descriptors,
@ByVal CvSize winStride/*=Size()*/, @Const @StdVector("CvPoint,cv::Point") CvPoint locations/*=null*/);
开发者ID:wordin0,项目名称:javacv,代码行数:3,代码来源:opencv_contrib.java
示例18: recognizeFileList
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
/** Recognizes the face in each of the test images given, and compares the results with the truth.
*
* @param szFileTest the index file of test images
*/
public void recognizeFileList(final String szFileTest) {
LOGGER.info("===========================================");
LOGGER.info("recognizing faces indexed from " + szFileTest);
int i = 0;
int nTestFaces = 0; // the number of test images
CvMat trainPersonNumMat; // the person numbers during training
float[] projectedTestFace;
String answer;
int nCorrect = 0;
int nWrong = 0;
double timeFaceRecognizeStart;
double tallyFaceRecognizeTime;
float confidence = 0.0f;
// load test images and ground truth for person number
testFaceImgArr = loadFaceImgArray(szFileTest);
nTestFaces = testFaceImgArr.length;
LOGGER.info(nTestFaces + " test faces loaded");
// load the saved training data
trainPersonNumMat = loadTrainingData();
if (trainPersonNumMat == null) {
return;
}
// project the test images onto the PCA subspace
projectedTestFace = new float[nEigens];
timeFaceRecognizeStart = (double) cvGetTickCount(); // Record the timing.
for (i = 0; i < nTestFaces; i++) {
int iNearest;
int nearest;
int truth;
// project the test image onto the PCA subspace
cvEigenDecomposite(
testFaceImgArr[i], // obj
nEigens, // nEigObjs
eigenVectArr, // eigInput (Pointer)
0, // ioFlags
null, // userData
pAvgTrainImg, // avg
projectedTestFace); // coeffs
//LOGGER.info("projectedTestFace\n" + floatArrayToString(projectedTestFace));
final FloatPointer pConfidence = new FloatPointer(confidence);
iNearest = findNearestNeighbor(projectedTestFace, new FloatPointer(pConfidence));
confidence = pConfidence.get();
truth = personNumTruthMat.data_i().get(i);
nearest = trainPersonNumMat.data_i().get(iNearest);
if (nearest == truth) {
answer = "Correct";
nCorrect++;
} else {
answer = "WRONG!";
nWrong++;
}
LOGGER.info("nearest = " + nearest + ", Truth = " + truth + " (" + answer + "). Confidence = " + confidence);
}
tallyFaceRecognizeTime = (double) cvGetTickCount() - timeFaceRecognizeStart;
if (nCorrect + nWrong > 0) {
LOGGER.info("TOTAL ACCURACY: " + (nCorrect * 100 / (nCorrect + nWrong)) + "% out of " + (nCorrect + nWrong) + " tests.");
LOGGER.info("TOTAL TIME: " + (tallyFaceRecognizeTime / (cvGetTickFrequency() * 1000.0 * (nCorrect + nWrong))) + " ms average.");
}
}
开发者ID:wordin0,项目名称:javacv,代码行数:73,代码来源:FaceRecognition.java
示例19: cvCalcCovarMatrixEx
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
public static void cvCalcCovarMatrixEx(int nObjects, IplImage[] input, int ioFlags, int ioBufSize,
@Cast("uchar*") BytePointer buffer, Pointer userData, IplImage avg, FloatPointer covarMatrix) {
cvCalcCovarMatrixEx(nObjects, new IplImageArray(input), ioFlags, ioBufSize, buffer, userData, avg, covarMatrix);
}
开发者ID:wordin0,项目名称:javacv,代码行数:5,代码来源:opencv_legacy.java
示例20: cvCalcEigenObjects
import com.googlecode.javacpp.FloatPointer; //导入依赖的package包/类
public static native void cvCalcEigenObjects(int nObjects, Pointer input, Pointer output, int ioFlags,
int ioBufSize, Pointer userData, CvTermCriteria calcLimit, IplImage avg, FloatPointer eigVals);
开发者ID:wordin0,项目名称:javacv,代码行数:3,代码来源:opencv_legacy.java
注:本文中的com.googlecode.javacpp.FloatPointer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论