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