當前位置: 首頁>>代碼示例>>Java>>正文


Java Imgproc.RETR_EXTERNAL屬性代碼示例

本文整理匯總了Java中org.opencv.imgproc.Imgproc.RETR_EXTERNAL屬性的典型用法代碼示例。如果您正苦於以下問題:Java Imgproc.RETR_EXTERNAL屬性的具體用法?Java Imgproc.RETR_EXTERNAL怎麽用?Java Imgproc.RETR_EXTERNAL使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.opencv.imgproc.Imgproc的用法示例。


在下文中一共展示了Imgproc.RETR_EXTERNAL屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: findContours

/**
 * Sets the values of pixels in a binary image to their distance to the nearest
 * black pixel.
 * 
 * @param input
 *            The image on which to perform the Distance Transform.
 * @param type
 *            The Transform.
 * @param maskSize
 *            the size of the mask.
 * @param output
 *            The image in which to store the output.
 */
private void findContours (Mat input, boolean externalOnly,
        List<MatOfPoint> contours)
{
    Mat hierarchy = new Mat();
    contours.clear();
    int mode;
    if (externalOnly)
        {
        mode = Imgproc.RETR_EXTERNAL;
        }
    else
        {
        mode = Imgproc.RETR_LIST;
        }
    int method = Imgproc.CHAIN_APPROX_SIMPLE;
    Imgproc.findContours(input, contours, hierarchy, mode, method);
}
 
開發者ID:FIRST-Team-339,項目名稱:2017,代碼行數:30,代碼來源:GripPipeline.java

示例2: findContours

/**
 * Sets the values of pixels in a binary image to their distance to the nearest black pixel.
 * 
 * @param input
 *            The image on which to perform the Distance Transform.
 * @param type
 *            The Transform.
 * @param maskSize
 *            the size of the mask.
 * @param output
 *            The image in which to store the output.
 */
private void findContours(Mat input, boolean externalOnly, List<MatOfPoint> contours) {
	Mat hierarchy = new Mat();
	contours.clear();
	int mode;
	if (externalOnly) {
		mode = Imgproc.RETR_EXTERNAL;
	} else {
		mode = Imgproc.RETR_LIST;
	}
	int method = Imgproc.CHAIN_APPROX_SIMPLE;
	Imgproc.findContours(input, contours, hierarchy, mode, method);
}
 
開發者ID:chopshop-166,項目名稱:frc-2017,代碼行數:24,代碼來源:Vision.java

示例3: findContours

/**
 * Sets the values of pixels in a binary image to their distance to the nearest black pixel.
 * @param input The image on which to perform the Distance Transform.
 * @param type The Transform.
 * @param maskSize the size of the mask.
 * @param output The image in which to store the output.
 */
private void findContours(Mat input, boolean externalOnly,
	List<MatOfPoint> contours) {
	Mat hierarchy = new Mat();
	contours.clear();
	int mode;
	if (externalOnly) {
		mode = Imgproc.RETR_EXTERNAL;
	}
	else {
		mode = Imgproc.RETR_LIST;
	}
	int method = Imgproc.CHAIN_APPROX_SIMPLE;
	Imgproc.findContours(input, contours, hierarchy, mode, method);
}
 
開發者ID:mustafamertunali,項目名稱:FRC-6416-frc2017,代碼行數:21,代碼來源:GripPipeline.java

示例4: findContours

@Override
public List<MatOfPoint> findContours(Mat image) {
    List<MatOfPoint> contours = new ArrayList<>();
    Mat hierarchy = new Mat();
    int mode = Imgproc.RETR_EXTERNAL;
    int method = Imgproc.CHAIN_APPROX_SIMPLE;
    Imgproc.findContours(image, contours, hierarchy, mode, method);
    return contours;
}
 
開發者ID:kylecorry31,項目名稱:Robot-Vision-API,代碼行數:9,代碼來源:StandardContourFinder.java

示例5: findContours

/**
 * Sets the values of pixels in a binary image to their distance to the
 * nearest black pixel.
 *
 * @param input
 *          The image on which to perform the Distance Transform.
 * @param type
 *          The Transform.
 * @param maskSize
 *          the size of the mask.
 * @param output
 *          The image in which to store the output.
 */
private void findContours(Mat input, boolean externalOnly, List<MatOfPoint> contours) {
  Mat hierarchy = new Mat();
  contours.clear();
  int mode;
  if (externalOnly) {
    mode = Imgproc.RETR_EXTERNAL;
  } else {
    mode = Imgproc.RETR_LIST;
  }
  int method = Imgproc.CHAIN_APPROX_SIMPLE;
  Imgproc.findContours(input, contours, hierarchy, mode, method);
}
 
開發者ID:cyborgs3335,項目名稱:STEAMworks,代碼行數:25,代碼來源:GripPipelineWithBlur.java


注:本文中的org.opencv.imgproc.Imgproc.RETR_EXTERNAL屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。