本文整理匯總了Java中org.opencv.imgproc.Imgproc.INTER_CUBIC屬性的典型用法代碼示例。如果您正苦於以下問題:Java Imgproc.INTER_CUBIC屬性的具體用法?Java Imgproc.INTER_CUBIC怎麽用?Java Imgproc.INTER_CUBIC使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.opencv.imgproc.Imgproc
的用法示例。
在下文中一共展示了Imgproc.INTER_CUBIC屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: process
/**
* 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);
}