当前位置: 首页>>代码示例>>Java>>正文


Java Imgproc.INTER_CUBIC属性代码示例

本文整理汇总了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);
}
 
开发者ID:KHS-Robotics,项目名称:DemonVision,代码行数:45,代码来源:DefaultPipeline.java


注:本文中的org.opencv.imgproc.Imgproc.INTER_CUBIC属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。