public class CannyEdgeDetector extends Object implements SinglebandImageProcessor<Float,FImage>
SinglebandImageProcessor.Processable<T,S extends Image<T,S>,I extends Image<?,I>>
Constructor and Description |
---|
CannyEdgeDetector()
Default constructor.
|
CannyEdgeDetector(float sigma)
Construct with the give sigma.
|
CannyEdgeDetector(float lowThresh,
float highThresh,
float sigma)
Construct with all parameters set manually.
|
Modifier and Type | Method and Description |
---|---|
void |
processImage(FImage image)
Process an image.
|
void |
processImage(FImage output,
FImage dx,
FImage dy)
Apply non-max suppression and hysteresis thresholding based on the given
(Sobel) gradient maps and write the result to the given output image.
|
void |
processImage(FImage image,
FSobel sobel)
Apply non-max suppression and hysteresis thresholding based using the
given
FSobel analyser to generate the gradients. |
public CannyEdgeDetector()
public CannyEdgeDetector(float sigma)
sigma
- the amount of initial blurringpublic CannyEdgeDetector(float lowThresh, float highThresh, float sigma)
lowThresh
- lower hysteresis threshold.highThresh
- upper hysteresis threshold.sigma
- the amount of initial blurring.public void processImage(FImage image)
ImageProcessor
Image.internalAssign(Image)
.processImage
in interface ImageProcessor<FImage>
image
- The image to process in place.public void processImage(FImage image, FSobel sobel)
FSobel
analyser to generate the gradients. The gradient
maps held by the FSobel
object will be set to the gradients of
the input image after this method returns.image
- the image to process (and write the result to)sobel
- the computed gradientspublic void processImage(FImage output, FImage dx, FImage dy)
output
- the output imagedx
- the x gradientsdy
- the y gradients