public class ScanSegment extends Algorithm
Modifier | Constructor and Description |
---|---|
protected |
ScanSegment(long addr) |
Modifier and Type | Method and Description |
---|---|
static ScanSegment |
__fromPtr__(long addr) |
protected void |
finalize() |
void |
getLabelContourMask(Mat image)
Returns the mask of the superpixel segmentation stored in the ScanSegment object.
|
void |
getLabelContourMask(Mat image,
boolean thick_line)
Returns the mask of the superpixel segmentation stored in the ScanSegment object.
|
void |
getLabels(Mat labels_out)
Returns the segmentation labeling of the image.
|
int |
getNumberOfSuperpixels()
Returns the actual superpixel segmentation from the last image processed using iterate.
|
void |
iterate(Mat img)
Calculates the superpixel segmentation on a given image with the initialized
parameters in the ScanSegment object.
|
clear, empty, getDefaultName, getNativeObjAddr, save
public static ScanSegment __fromPtr__(long addr)
public int getNumberOfSuperpixels()
public void iterate(Mat img)
img
- Input image. Supported format: CV_8UC3. Image size must match with the initialized
image size with the function createScanSegment(). It MUST be in Lab color space.public void getLabels(Mat labels_out)
labels_out
- Return: A CV_32UC1 integer array containing the labels of the superpixel
segmentation. The labels are in the range [0, getNumberOfSuperpixels()].public void getLabelContourMask(Mat image, boolean thick_line)
image
- Return: CV_8UC1 image mask where -1 indicates that the pixel is a superpixel border, and 0 otherwise.thick_line
- If false, the border is only one pixel wide, otherwise all pixels at the border are masked.public void getLabelContourMask(Mat image)
image
- Return: CV_8UC1 image mask where -1 indicates that the pixel is a superpixel border, and 0 otherwise.Copyright © 2024. All rights reserved.