public class EdgeDrawing extends Algorithm
Modifier and Type | Field and Description |
---|---|
static int |
LSD |
static int |
PREWITT |
static int |
SCHARR |
static int |
SOBEL |
Modifier | Constructor and Description |
---|---|
protected |
EdgeDrawing(long addr) |
Modifier and Type | Method and Description |
---|---|
static EdgeDrawing |
__fromPtr__(long addr) |
void |
detectEdges(Mat src)
Detects edges in a grayscale image and prepares them to detect lines and ellipses.
|
void |
detectEllipses(Mat ellipses)
Detects circles and ellipses.
|
void |
detectLines(Mat lines)
Detects lines.
|
protected void |
finalize() |
void |
getEdgeImage(Mat dst)
returns Edge Image prepared by detectEdges() function.
|
void |
getGradientImage(Mat dst)
returns Gradient Image prepared by detectEdges() function.
|
MatOfInt |
getSegmentIndicesOfLines()
Returns for each line found in detectLines() its edge segment index in getSegments()
|
List<MatOfPoint> |
getSegments()
Returns std::vector<std::vector<Point>> of detected edge segments, see detectEdges()
|
void |
setParams(EdgeDrawing_Params parameters)
sets parameters.
|
clear, empty, getDefaultName, getNativeObjAddr, save
public static final int PREWITT
public static final int SOBEL
public static final int SCHARR
public static final int LSD
public static EdgeDrawing __fromPtr__(long addr)
public void detectEdges(Mat src)
src
- 8-bit, single-channel, grayscale input image.public void getEdgeImage(Mat dst)
dst
- returns 8-bit, single-channel output image.public void getGradientImage(Mat dst)
dst
- returns 16-bit, single-channel output image.public List<MatOfPoint> getSegments()
public MatOfInt getSegmentIndicesOfLines()
public void detectLines(Mat lines)
lines
- output Vec<4f> contains the start point and the end point of detected lines.
Note: you should call detectEdges() before calling this function.public void detectEllipses(Mat ellipses)
ellipses
- output Vec<6d> contains center point and perimeter for circles, center point, axes and angle for ellipses.
Note: you should call detectEdges() before calling this function.public void setParams(EdgeDrawing_Params parameters)
parameters
- Parameters of the algorithmCopyright © 2024. All rights reserved.