org.opencv.core.MatOfDouble Java Examples

The following examples show how to use org.opencv.core.MatOfDouble. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Core.java    From react-native-documentscanner-android with MIT License 5 votes vote down vote up
public static void meanStdDev(Mat src, MatOfDouble mean, MatOfDouble stddev, Mat mask)
{
    Mat mean_mat = mean;
    Mat stddev_mat = stddev;
    meanStdDev_0(src.nativeObj, mean_mat.nativeObj, stddev_mat.nativeObj, mask.nativeObj);
    
    return;
}
 
Example #2
Source File: Calib3d.java    From OpenCvFaceDetect with Apache License 2.0 5 votes vote down vote up
public static boolean solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int iterationsCount, float reprojectionError)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    Mat distCoeffs_mat = distCoeffs;
    boolean retVal = solvePnPRansac_3(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount, reprojectionError);
    
    return retVal;
}
 
Example #3
Source File: HOGDescriptor.java    From sudokufx with Apache License 2.0 5 votes vote down vote up
public  void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights)
{
    Mat foundLocations_mat = foundLocations;
    Mat weights_mat = weights;
    detect_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj);
    
    return;
}
 
Example #4
Source File: Calib3d.java    From Form-N-Fun with MIT License 5 votes vote down vote up
public static boolean solvePnP(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    Mat distCoeffs_mat = distCoeffs;
    boolean retVal = solvePnP_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj);
    
    return retVal;
}
 
Example #5
Source File: Calib3d.java    From LPR with Apache License 2.0 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints)
{
    Mat objectPoints_mat = objectPoints;
    Mat distCoeffs_mat = distCoeffs;
    Mat imagePoints_mat = imagePoints;
    projectPoints_2(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj);
    
    return;
}
 
Example #6
Source File: Calib3d.java    From LPR with Apache License 2.0 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints, Mat jacobian, double aspectRatio)
{
    Mat objectPoints_mat = objectPoints;
    Mat distCoeffs_mat = distCoeffs;
    Mat imagePoints_mat = imagePoints;
    projectPoints_0(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj, jacobian.nativeObj, aspectRatio);
    
    return;
}
 
Example #7
Source File: Calib3d.java    From FtcSamples with MIT License 5 votes vote down vote up
public static boolean solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence, Mat inliers, int flags)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    Mat distCoeffs_mat = distCoeffs;
    boolean retVal = solvePnPRansac_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount, reprojectionError, confidence, inliers.nativeObj, flags);
    
    return retVal;
}
 
Example #8
Source File: Calib3d.java    From opencv-documentscanner-android with Apache License 2.0 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints, Mat jacobian, double aspectRatio)
{
    Mat objectPoints_mat = objectPoints;
    Mat distCoeffs_mat = distCoeffs;
    Mat imagePoints_mat = imagePoints;
    projectPoints_0(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj, jacobian.nativeObj, aspectRatio);
    
    return;
}
 
Example #9
Source File: HOGDescriptor.java    From Image-Detection-Samples with Apache License 2.0 5 votes vote down vote up
public  void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights)
{
    Mat foundLocations_mat = foundLocations;
    Mat weights_mat = weights;
    detect_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj);
    
    return;
}
 
Example #10
Source File: Calib3d.java    From OpenCV-AndroidSamples with MIT License 5 votes vote down vote up
public static boolean solvePnP(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    Mat distCoeffs_mat = distCoeffs;
    boolean retVal = solvePnP_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj);
    
    return retVal;
}
 
Example #11
Source File: Calib3d.java    From MOAAP with MIT License 5 votes vote down vote up
public static boolean solvePnP(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int flags)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    Mat distCoeffs_mat = distCoeffs;
    boolean retVal = solvePnP_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, flags);
    
    return retVal;
}
 
Example #12
Source File: Calib3d.java    From FTCVision with MIT License 5 votes vote down vote up
public static boolean solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence, Mat inliers, int flags)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    Mat distCoeffs_mat = distCoeffs;
    boolean retVal = solvePnPRansac_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount, reprojectionError, confidence, inliers.nativeObj, flags);
    
    return retVal;
}
 
Example #13
Source File: Core.java    From SimpleDocumentScanner-Android with MIT License 5 votes vote down vote up
public static void meanStdDev(Mat src, MatOfDouble mean, MatOfDouble stddev, Mat mask)
{
    Mat mean_mat = mean;
    Mat stddev_mat = stddev;
    meanStdDev_0(src.nativeObj, mean_mat.nativeObj, stddev_mat.nativeObj, mask.nativeObj);
    
    return;
}
 
Example #14
Source File: Calib3d.java    From OpenCvFaceDetect with Apache License 2.0 5 votes vote down vote up
public static boolean solvePnP(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int flags)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    Mat distCoeffs_mat = distCoeffs;
    boolean retVal = solvePnP_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, flags);
    
    return retVal;
}
 
Example #15
Source File: Core.java    From OpenCV-android with Apache License 2.0 5 votes vote down vote up
public static void meanStdDev(Mat src, MatOfDouble mean, MatOfDouble stddev)
{
    Mat mean_mat = mean;
    Mat stddev_mat = stddev;
    meanStdDev_1(src.nativeObj, mean_mat.nativeObj, stddev_mat.nativeObj);
    
    return;
}
 
Example #16
Source File: Calib3d.java    From FaceDetectDemo with Apache License 2.0 5 votes vote down vote up
public static boolean solvePnP(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int flags)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    Mat distCoeffs_mat = distCoeffs;
    boolean retVal = solvePnP_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, flags);
    
    return retVal;
}
 
Example #17
Source File: HOGDescriptor.java    From LPR with Apache License 2.0 5 votes vote down vote up
public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold)
{
    Mat foundLocations_mat = foundLocations;
    Mat foundWeights_mat = foundWeights;
    detectMultiScale_1(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale, finalThreshold);
    
    return;
}
 
Example #18
Source File: Calib3d.java    From MOAAP with MIT License 5 votes vote down vote up
public static boolean solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence, Mat inliers, int flags)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    Mat distCoeffs_mat = distCoeffs;
    boolean retVal = solvePnPRansac_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount, reprojectionError, confidence, inliers.nativeObj, flags);
    
    return retVal;
}
 
Example #19
Source File: HOGDescriptor.java    From LPR with Apache License 2.0 5 votes vote down vote up
public  void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights)
{
    Mat foundLocations_mat = foundLocations;
    Mat weights_mat = weights;
    detect_4(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj);
    
    return;
}
 
Example #20
Source File: HOGDescriptor.java    From Chinese-number-gestures-recognition with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold, boolean useMeanshiftGrouping)
{
    Mat foundLocations_mat = foundLocations;
    Mat foundWeights_mat = foundWeights;
    detectMultiScale_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale, finalThreshold, useMeanshiftGrouping);
    
    return;
}
 
Example #21
Source File: Tld.java    From OpenTLDAndroid with Apache License 2.0 5 votes vote down vote up
/**
 * Output: resized zero-mean patch/pattern
 * @param inImg INPUT, outPattern OUTPUT
 * @return stdev
 */
private static double resizeZeroMeanStdev(final Mat inImg, Mat outPattern, int patternSize){
	if(inImg == null || outPattern == null){
		return -1;
	}
	
	Imgproc.resize(inImg, outPattern, new Size(patternSize, patternSize));
	final MatOfDouble mean = new MatOfDouble();
	final MatOfDouble stdev = new MatOfDouble();
	Core.meanStdDev(outPattern, mean, stdev);
	outPattern.convertTo(outPattern, CvType.CV_32F);
	Core.subtract(outPattern, new Scalar(mean.toArray()[0]), outPattern);
	
	return stdev.toArray()[0];
}
 
Example #22
Source File: Net.java    From LPR with Apache License 2.0 5 votes vote down vote up
public  long getPerfProfile(MatOfDouble timings)
{
    Mat timings_mat = timings;
    long retVal = getPerfProfile_0(nativeObj, timings_mat.nativeObj);
    
    return retVal;
}
 
Example #23
Source File: HOGDescriptor.java    From android-object-distance with Apache License 2.0 5 votes vote down vote up
public  void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride, Size padding, MatOfPoint searchLocations)
{
    Mat foundLocations_mat = foundLocations;
    Mat weights_mat = weights;
    Mat searchLocations_mat = searchLocations;
    detect_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, searchLocations_mat.nativeObj);

    return;
}
 
Example #24
Source File: HOGDescriptor.java    From pasm-yolov3-Android with GNU General Public License v3.0 5 votes vote down vote up
public  void detect(Mat img, MatOfPoint foundLocations, MatOfDouble weights, double hitThreshold, Size winStride, Size padding, MatOfPoint searchLocations)
{
    Mat foundLocations_mat = foundLocations;
    Mat weights_mat = weights;
    Mat searchLocations_mat = searchLocations;
    detect_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, weights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, searchLocations_mat.nativeObj);
    
    return;
}
 
Example #25
Source File: Calib3d.java    From OpenCV-Android-Object-Detection with MIT License 5 votes vote down vote up
public static boolean solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    Mat distCoeffs_mat = distCoeffs;
    boolean retVal = solvePnPRansac_1(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj);
    
    return retVal;
}
 
Example #26
Source File: Core.java    From Machine-Learning-Projects-for-Mobile-Applications with MIT License 5 votes vote down vote up
public static void meanStdDev(Mat src, MatOfDouble mean, MatOfDouble stddev)
{
    Mat mean_mat = mean;
    Mat stddev_mat = stddev;
    meanStdDev_1(src.nativeObj, mean_mat.nativeObj, stddev_mat.nativeObj);
    
    return;
}
 
Example #27
Source File: Calib3d.java    From MOAAP with MIT License 5 votes vote down vote up
public static boolean solvePnPRansac(MatOfPoint3f objectPoints, MatOfPoint2f imagePoints, Mat cameraMatrix, MatOfDouble distCoeffs, Mat rvec, Mat tvec, boolean useExtrinsicGuess, int iterationsCount, float reprojectionError, double confidence, Mat inliers, int flags)
{
    Mat objectPoints_mat = objectPoints;
    Mat imagePoints_mat = imagePoints;
    Mat distCoeffs_mat = distCoeffs;
    boolean retVal = solvePnPRansac_0(objectPoints_mat.nativeObj, imagePoints_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, useExtrinsicGuess, iterationsCount, reprojectionError, confidence, inliers.nativeObj, flags);
    
    return retVal;
}
 
Example #28
Source File: CascadeClassifier.java    From real_time_circle_detection_android with MIT License 5 votes vote down vote up
public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize, boolean outputRejectLevels)
{
    Mat objects_mat = objects;
    Mat rejectLevels_mat = rejectLevels;
    Mat levelWeights_mat = levelWeights;
    detectMultiScale3_0(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height, outputRejectLevels);
    
    return;
}
 
Example #29
Source File: HOGDescriptor.java    From FTCVision with MIT License 5 votes vote down vote up
public  void detectMultiScale(Mat img, MatOfRect foundLocations, MatOfDouble foundWeights, double hitThreshold, Size winStride, Size padding, double scale, double finalThreshold, boolean useMeanshiftGrouping)
{
    Mat foundLocations_mat = foundLocations;
    Mat foundWeights_mat = foundWeights;
    detectMultiScale_0(nativeObj, img.nativeObj, foundLocations_mat.nativeObj, foundWeights_mat.nativeObj, hitThreshold, winStride.width, winStride.height, padding.width, padding.height, scale, finalThreshold, useMeanshiftGrouping);
    
    return;
}
 
Example #30
Source File: Calib3d.java    From OpenCV-Android-Object-Detection with MIT License 5 votes vote down vote up
public static void projectPoints(MatOfPoint3f objectPoints, Mat rvec, Mat tvec, Mat cameraMatrix, MatOfDouble distCoeffs, MatOfPoint2f imagePoints)
{
    Mat objectPoints_mat = objectPoints;
    Mat distCoeffs_mat = distCoeffs;
    Mat imagePoints_mat = imagePoints;
    projectPoints_1(objectPoints_mat.nativeObj, rvec.nativeObj, tvec.nativeObj, cameraMatrix.nativeObj, distCoeffs_mat.nativeObj, imagePoints_mat.nativeObj);
    
    return;
}