Java Code Examples for org.opencv.imgproc.Imgproc.INTER_CUBIC

The following are Jave code examples for showing how to use INTER_CUBIC of the org.opencv.imgproc.Imgproc class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: DemonVision   File: DefaultPipeline.java   Source Code and License Vote up 4 votes
/**
 * This is the primary method that runs the entire pipeline and updates the outputs.
 */
@Override
public void process(Mat source) {
	// Step Resize_Image0:
	Mat resizeImageInput = source;
	double resizeImageWidth = (double) res.getX();
	double resizeImageHeight = (double) res.getY();
	int resizeImageInterpolation = Imgproc.INTER_CUBIC;
	resizeImage(resizeImageInput, resizeImageWidth, resizeImageHeight, resizeImageInterpolation, resizeImageOutput);

	// Step Blur0:
	Mat blurInput = resizeImageOutput;
	Blur.Type blurType = blur.getType();
	double blurRadius = blur.getRadius();
	blur(blurInput, blurType, blurRadius, blurOutput);

	// Step RGB_Threshold0:
	Mat rgbThresholdInput = blurOutput;
	double[] rgbThresholdRed = {rgb.getMinRed(), rgb.getMaxRed()};
	double[] rgbThresholdGreen = {rgb.getMinGreen(), rgb.getMaxGreen()};
	double[] rgbThresholdBlue = {rgb.getMinBlue(), rgb.getMaxBlue()};
	rgbThreshold(rgbThresholdInput, rgbThresholdRed, rgbThresholdGreen, rgbThresholdBlue, rgbThresholdOutput);

	// Step Find_Contours0:
	Mat findContoursInput = rgbThresholdOutput;
	boolean findContoursExternalOnly = false;
	findContours(findContoursInput, findContoursExternalOnly, findContoursOutput);

	// Step Filter_Contours0:
	ArrayList<MatOfPoint> filterContoursContours = findContoursOutput;
	double filterContoursMinArea = 100.0;
	double filterContoursMinPerimeter = 0.0;
	double filterContoursMinWidth = 0.0;
	double filterContoursMaxWidth = 1000.0;
	double filterContoursMinHeight = 0.0;
	double filterContoursMaxHeight = 1000.0;
	double[] filterContoursSolidity = {0, 100};
	double filterContoursMaxVertices = 1000000.0;
	double filterContoursMinVertices = 0.0;
	double filterContoursMinRatio = 0.0;
	double filterContoursMaxRatio = 1000.0;
	filterContours(filterContoursContours, filterContoursMinArea, filterContoursMinPerimeter, filterContoursMinWidth, filterContoursMaxWidth, filterContoursMinHeight, filterContoursMaxHeight, filterContoursSolidity, filterContoursMaxVertices, filterContoursMinVertices, filterContoursMinRatio, filterContoursMaxRatio, filterContoursOutput);
}