Java Code Examples for org.opencv.core.MatOfInt

The following are top voted examples for showing how to use org.opencv.core.MatOfInt. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: mao-android   File: Core.java   View source code 5 votes vote down vote up
public static void mixChannels(List<Mat> src, List<Mat> dst, MatOfInt fromTo)
{
    Mat src_mat = Converters.vector_Mat_to_Mat(src);
    Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
    Mat fromTo_mat = fromTo;
    mixChannels_0(src_mat.nativeObj, dst_mat.nativeObj, fromTo_mat.nativeObj);
    
    return;
}
 
Example 2
Project: real_time_circle_detection_android   File: Imgproc.java   View source code 5 votes vote down vote up
public static void convexHull(MatOfPoint points, MatOfInt hull)
{
    Mat points_mat = points;
    Mat hull_mat = hull;
    convexHull_1(points_mat.nativeObj, hull_mat.nativeObj);
    
    return;
}
 
Example 3
Project: OpenCV   File: Objdetect.java   View source code 5 votes vote down vote up
public static void groupRectangles(MatOfRect rectList, MatOfInt weights, int groupThreshold)
{
    Mat rectList_mat = rectList;
    Mat weights_mat = weights;
    groupRectangles_1(rectList_mat.nativeObj, weights_mat.nativeObj, groupThreshold);
    
    return;
}
 
Example 4
Project: renderscript_examples   File: Subdiv2D.java   View source code 5 votes vote down vote up
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;
}
 
Example 5
Project: opencv-documentscanner-android   File: Subdiv2D.java   View source code 5 votes vote down vote up
public  void getLeadingEdgeList(MatOfInt leadingEdgeList)
{
    Mat leadingEdgeList_mat = leadingEdgeList;
    getLeadingEdgeList_0(nativeObj, leadingEdgeList_mat.nativeObj);
    
    return;
}
 
Example 6
Project: FTC2016   File: Imgproc.java   View source code 5 votes vote down vote up
public static void calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat channels_mat = channels;
    Mat histSize_mat = histSize;
    Mat ranges_mat = ranges;
    calcHist_1(images_mat.nativeObj, channels_mat.nativeObj, mask.nativeObj, hist.nativeObj, histSize_mat.nativeObj, ranges_mat.nativeObj);
    
    return;
}
 
Example 7
Project: android-age-estimator   File: CascadeClassifier.java   View source code 5 votes vote down vote up
public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights)
{
    Mat objects_mat = objects;
    Mat rejectLevels_mat = rejectLevels;
    Mat levelWeights_mat = levelWeights;
    detectMultiScale3_1(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj);
    
    return;
}
 
Example 8
Project: Checkerboard-IMU-Comparator   File: CascadeClassifier.java   View source code 5 votes vote down vote up
public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections)
{
    Mat objects_mat = objects;
    Mat numDetections_mat = numDetections;
    detectMultiScale2_1(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj);
    
    return;
}
 
Example 9
Project: Team9261-2017-2018   File: Net.java   View source code 5 votes vote down vote up
public  void getMemoryConsumption(int layerId, MatOfInt netInputShape, long[] weights, long[] blobs)
{
    Mat netInputShape_mat = netInputShape;
    double[] weights_out = new double[1];
    double[] blobs_out = new double[1];
    getMemoryConsumption_1(nativeObj, layerId, netInputShape_mat.nativeObj, weights_out, blobs_out);
    if(weights!=null) weights[0] = (long)weights_out[0];
    if(blobs!=null) blobs[0] = (long)blobs_out[0];
    return;
}
 
Example 10
Project: opencv-documentscanner-android   File: CascadeClassifier.java   View source code 5 votes vote down vote up
public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
{
    Mat objects_mat = objects;
    Mat numDetections_mat = numDetections;
    detectMultiScale2_0(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
    
    return;
}
 
Example 11
Project: DogeCV   File: Imgcodecs.java   View source code 5 votes vote down vote up
public static boolean imwrite(String filename, Mat img, MatOfInt params)
{
    Mat params_mat = params;
    boolean retVal = imwrite_0(filename, img.nativeObj, params_mat.nativeObj);
    
    return retVal;
}
 
Example 12
Project: DNNLibrary   File: Imgproc.java   View source code 5 votes vote down vote up
public static void calcBackProject(List<Mat> images, MatOfInt channels, Mat hist, Mat dst, MatOfFloat ranges, double scale)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat channels_mat = channels;
    Mat ranges_mat = ranges;
    calcBackProject_0(images_mat.nativeObj, channels_mat.nativeObj, hist.nativeObj, dst.nativeObj, ranges_mat.nativeObj, scale);
    
    return;
}
 
Example 13
Project: DNNLibrary   File: Net.java   View source code 5 votes vote down vote up
public  long getFLOPS(MatOfInt netInputShape)
{
    Mat netInputShape_mat = netInputShape;
    long retVal = getFLOPS_0(nativeObj, netInputShape_mat.nativeObj);
    
    return retVal;
}
 
Example 14
Project: mao-android   File: BRISK.java   View source code 5 votes vote down vote up
public static BRISK create(MatOfFloat radiusList, MatOfInt numberList, float dMax, float dMin, MatOfInt indexChange)
{
    Mat radiusList_mat = radiusList;
    Mat numberList_mat = numberList;
    Mat indexChange_mat = indexChange;
    BRISK retVal = new BRISK(create_2(radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax, dMin, indexChange_mat.nativeObj));
    
    return retVal;
}
 
Example 15
Project: MOAAP   File: Imgproc.java   View source code 5 votes vote down vote up
public static void calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges, boolean accumulate)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat channels_mat = channels;
    Mat histSize_mat = histSize;
    Mat ranges_mat = ranges;
    calcHist_0(images_mat.nativeObj, channels_mat.nativeObj, mask.nativeObj, hist.nativeObj, histSize_mat.nativeObj, ranges_mat.nativeObj, accumulate);
    
    return;
}
 
Example 16
Project: FlashLib   File: CvCamera.java   View source code 5 votes vote down vote up
/**
 * Opens a new camera using openCV at a certain device index with 
 * a given frame width and height, and a compression quality.
 * 
 * @param cam the device index from 0.
 * @param width the frame width
 * @param height the frame height
 * @param quality the compression quality
 * 
 * @throws RuntimeException if the camera could not be opened
 */
public CvCamera(int cam, int width, int height, int quality){
	capture = new VideoCapture();
	capture.open(cam);
	if(!capture.isOpened())
		throw new RuntimeException("Unable to open camera " + cam);
	
	image = new Mat();
	buffer = new MatOfByte();
	compressParams = new MatOfInt(Imgcodecs.CV_IMWRITE_JPEG_QUALITY, quality);
	capture.set(Videoio.CAP_PROP_FRAME_WIDTH, width);
	capture.set(Videoio.CAP_PROP_FRAME_HEIGHT, height);
	
	camIndex = cam;
	this.quality = quality;
}
 
Example 17
Project: Team9261-2017-2018   File: Imgproc.java   View source code 5 votes vote down vote up
public static void calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges, boolean accumulate)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat channels_mat = channels;
    Mat histSize_mat = histSize;
    Mat ranges_mat = ranges;
    calcHist_0(images_mat.nativeObj, channels_mat.nativeObj, mask.nativeObj, hist.nativeObj, histSize_mat.nativeObj, ranges_mat.nativeObj, accumulate);
    
    return;
}
 
Example 18
Project: MOAAP   File: CascadeClassifier.java   View source code 5 votes vote down vote up
public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights)
{
    Mat objects_mat = objects;
    Mat rejectLevels_mat = rejectLevels;
    Mat levelWeights_mat = levelWeights;
    detectMultiScale3_1(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj);
    
    return;
}
 
Example 19
Project: Image-Detection-Samples   File: Imgproc.java   View source code 5 votes vote down vote up
public static void convexHull(MatOfPoint points, MatOfInt hull)
{
    Mat points_mat = points;
    Mat hull_mat = hull;
    convexHull_1(points_mat.nativeObj, hull_mat.nativeObj);
    
    return;
}
 
Example 20
Project: NotifyTools   File: Subdiv2D.java   View source code 5 votes vote down vote up
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;
}
 
Example 21
Project: react-native-scan-doc   File: CascadeClassifier.java   View source code 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 22
Project: DNNLibrary   File: BRISK.java   View source code 5 votes vote down vote up
public static BRISK create(int thresh, int octaves, MatOfFloat radiusList, MatOfInt numberList, float dMax, float dMin, MatOfInt indexChange)
{
    Mat radiusList_mat = radiusList;
    Mat numberList_mat = numberList;
    Mat indexChange_mat = indexChange;
    BRISK retVal = new BRISK(create_0(thresh, octaves, radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax, dMin, indexChange_mat.nativeObj));
    
    return retVal;
}
 
Example 23
Project: react-native-scan-doc   File: Core.java   View source code 5 votes vote down vote up
public static void mixChannels(List<Mat> src, List<Mat> dst, MatOfInt fromTo)
{
    Mat src_mat = Converters.vector_Mat_to_Mat(src);
    Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
    Mat fromTo_mat = fromTo;
    mixChannels_0(src_mat.nativeObj, dst_mat.nativeObj, fromTo_mat.nativeObj);
    
    return;
}
 
Example 24
Project: Ftc2018RelicRecovery   File: Subdiv2D.java   View source code 5 votes vote down vote up
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;
}
 
Example 25
Project: react-native-scan-doc   File: Core.java   View source code 5 votes vote down vote up
public static void mixChannels(List<Mat> src, List<Mat> dst, MatOfInt fromTo)
{
    Mat src_mat = Converters.vector_Mat_to_Mat(src);
    Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
    Mat fromTo_mat = fromTo;
    mixChannels_0(src_mat.nativeObj, dst_mat.nativeObj, fromTo_mat.nativeObj);
    
    return;
}
 
Example 26
Project: renderscript_examples   File: Imgproc.java   View source code 5 votes vote down vote up
public static void convexHull(MatOfPoint points, MatOfInt hull, boolean clockwise)
{
    Mat points_mat = points;
    Mat hull_mat = hull;
    convexHull_0(points_mat.nativeObj, hull_mat.nativeObj, clockwise);
    
    return;
}
 
Example 27
Project: MOAAP   File: CascadeClassifier.java   View source code 5 votes vote down vote up
public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights)
{
    Mat objects_mat = objects;
    Mat rejectLevels_mat = rejectLevels;
    Mat levelWeights_mat = levelWeights;
    detectMultiScale3_1(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj);
    
    return;
}
 
Example 28
Project: MOAAP   File: PCTSignatures.java   View source code 5 votes vote down vote up
public static PCTSignatures create(MatOfPoint2f initSamplingPoints, MatOfInt initClusterSeedIndexes)
{
    Mat initSamplingPoints_mat = initSamplingPoints;
    Mat initClusterSeedIndexes_mat = initClusterSeedIndexes;
    PCTSignatures retVal = new PCTSignatures(create_3(initSamplingPoints_mat.nativeObj, initClusterSeedIndexes_mat.nativeObj));
    
    return retVal;
}
 
Example 29
Project: EyeShopping   File: CascadeClassifier.java   View source code 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 30
Project: react-native-scan-doc   File: BRISK.java   View source code 5 votes vote down vote up
public static BRISK create(MatOfFloat radiusList, MatOfInt numberList, float dMax, float dMin, MatOfInt indexChange)
{
    Mat radiusList_mat = radiusList;
    Mat numberList_mat = numberList;
    Mat indexChange_mat = indexChange;
    BRISK retVal = new BRISK(create_2(radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax, dMin, indexChange_mat.nativeObj));
    
    return retVal;
}
 
Example 31
Project: react-native-scan-doc   File: CascadeClassifier.java   View source code 5 votes vote down vote up
public  void detectMultiScale2(Mat image, MatOfRect objects, MatOfInt numDetections, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
{
    Mat objects_mat = objects;
    Mat numDetections_mat = numDetections;
    detectMultiScale2_0(nativeObj, image.nativeObj, objects_mat.nativeObj, numDetections_mat.nativeObj, scaleFactor, minNeighbors, flags, minSize.width, minSize.height, maxSize.width, maxSize.height);
    
    return;
}
 
Example 32
Project: NotifyTools   File: Imgcodecs.java   View source code 5 votes vote down vote up
public static boolean imencode(String ext, Mat img, MatOfByte buf, MatOfInt params)
{
    Mat buf_mat = buf;
    Mat params_mat = params;
    boolean retVal = imencode_0(ext, img.nativeObj, buf_mat.nativeObj, params_mat.nativeObj);
    
    return retVal;
}
 
Example 33
Project: Team9261-2017-2018   File: Imgcodecs.java   View source code 5 votes vote down vote up
public static boolean imwrite(String filename, Mat img, MatOfInt params)
{
    Mat params_mat = params;
    boolean retVal = imwrite_0(filename, img.nativeObj, params_mat.nativeObj);
    
    return retVal;
}
 
Example 34
Project: real_time_circle_detection_android   File: Imgproc.java   View source code 5 votes vote down vote up
public static void convexHull(MatOfPoint points, MatOfInt hull, boolean clockwise)
{
    Mat points_mat = points;
    Mat hull_mat = hull;
    convexHull_0(points_mat.nativeObj, hull_mat.nativeObj, clockwise);
    
    return;
}
 
Example 35
Project: Image-Detection-Samples   File: Imgproc.java   View source code 5 votes vote down vote up
public static void calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat channels_mat = channels;
    Mat histSize_mat = histSize;
    Mat ranges_mat = ranges;
    calcHist_1(images_mat.nativeObj, channels_mat.nativeObj, mask.nativeObj, hist.nativeObj, histSize_mat.nativeObj, ranges_mat.nativeObj);
    
    return;
}
 
Example 36
Project: NotifyTools   File: BRISK.java   View source code 5 votes vote down vote up
public static BRISK create(MatOfFloat radiusList, MatOfInt numberList, float dMax, float dMin, MatOfInt indexChange)
{
    Mat radiusList_mat = radiusList;
    Mat numberList_mat = numberList;
    Mat indexChange_mat = indexChange;
    BRISK retVal = new BRISK(create_4(radiusList_mat.nativeObj, numberList_mat.nativeObj, dMax, dMin, indexChange_mat.nativeObj));
    
    return retVal;
}
 
Example 37
Project: react-native-scan-doc   File: Subdiv2D.java   View source code 5 votes vote down vote up
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;
}
 
Example 38
Project: MOAAP   File: FREAK.java   View source code 5 votes vote down vote up
public static FREAK create(boolean orientationNormalized, boolean scaleNormalized, float patternScale, int nOctaves, MatOfInt selectedPairs)
{
    Mat selectedPairs_mat = selectedPairs;
    FREAK retVal = new FREAK(create_0(orientationNormalized, scaleNormalized, patternScale, nOctaves, selectedPairs_mat.nativeObj));
    
    return retVal;
}
 
Example 39
Project: react-native-scan-doc   File: CascadeClassifier.java   View source code 5 votes vote down vote up
public  void detectMultiScale3(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights)
{
    Mat objects_mat = objects;
    Mat rejectLevels_mat = rejectLevels;
    Mat levelWeights_mat = levelWeights;
    detectMultiScale3_1(nativeObj, image.nativeObj, objects_mat.nativeObj, rejectLevels_mat.nativeObj, levelWeights_mat.nativeObj);
    
    return;
}
 
Example 40
Project: MOAAP   File: Imgproc.java   View source code 5 votes vote down vote up
public static void calcHist(List<Mat> images, MatOfInt channels, Mat mask, Mat hist, MatOfInt histSize, MatOfFloat ranges, boolean accumulate)
{
    Mat images_mat = Converters.vector_Mat_to_Mat(images);
    Mat channels_mat = channels;
    Mat histSize_mat = histSize;
    Mat ranges_mat = ranges;
    calcHist_0(images_mat.nativeObj, channels_mat.nativeObj, mask.nativeObj, hist.nativeObj, histSize_mat.nativeObj, ranges_mat.nativeObj, accumulate);
    
    return;
}