@@ -658,6 +658,16 @@ export interface IMagickImage extends IDisposable {
658
658
*/
659
659
brightnessContrast ( brightness : Percentage , contrast : Percentage , channels : Channels ) : void ;
660
660
661
+ /**
662
+ * Uses a multi-stage algorithm to detect a wide range of edges in images.
663
+ */
664
+ cannyEdge ( ) : void ;
665
+
666
+ /**
667
+ * Uses a multi-stage algorithm to detect a wide range of edges in images.
668
+ */
669
+ cannyEdge ( radius : number , sigma : number , lower : Percentage , upper : Percentage ) : void ;
670
+
661
671
/**
662
672
* Charcoal effect image (looks like charcoal sketch).
663
673
*/
@@ -2642,6 +2652,20 @@ export class MagickImage extends NativeInstance implements IMagickImage {
2642
2652
} ) ;
2643
2653
}
2644
2654
2655
+ cannyEdge ( ) : void ;
2656
+ cannyEdge ( radius : number , sigma : number , lower : Percentage , upper : Percentage ) : void ;
2657
+ cannyEdge ( radiusOrUndefined ?: number , sigmaOrUndefined ?: number , lowerOrUndefined ?: Percentage , upperOrUndefined ?: Percentage ) : void {
2658
+ const radius = this . valueOrDefault ( radiusOrUndefined , 0 ) ;
2659
+ const sigma = this . valueOrDefault ( sigmaOrUndefined , 1 ) ;
2660
+ const lower = this . valueOrDefault ( lowerOrUndefined , new Percentage ( 10 ) ) . toDouble ( ) / 100 ;
2661
+ const upper = this . valueOrDefault ( upperOrUndefined , new Percentage ( 30 ) ) . toDouble ( ) / 100 ;
2662
+
2663
+ this . useException ( exception => {
2664
+ const instance = ImageMagick . _api . _MagickImage_CannyEdge ( this . _instance , radius , sigma , lower , upper , exception . ptr ) ;
2665
+ this . _setInstance ( instance , exception ) ;
2666
+ } ) ;
2667
+ }
2668
+
2645
2669
charcoal ( ) : void ;
2646
2670
charcoal ( radius : number , sigma : number ) : void ;
2647
2671
charcoal ( radiusOrUndefined ?: number , sigmaOrUndefined ?: number ) : void {
0 commit comments