![]() | InDesign SDK 20.5 |
#include <IEdgeDetection.h>

Public Types | |
| enum | { kAllowHoles = 1 << 0, kIntersectWithFrame = 1 << 1, kDisplayMask = 1 << 2, kForceHighRes = 1 << 3, kForceProxy = 1 << 4 } |
Public Member Functions | |
| virtual ErrorCode | MaskToPolygon (const UIDRef &itemRef, IPathGeometry *pNew, int16 channelIndex, int32 resolution, uint32 flags, uint8 threshold, PMReal tolerance, PMReal minPathSize, EdgeDetectionProcPtr progressPtr, ImagingTypes::ImageDataPtr imageMaskDataPtr=nullptr) const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This interface is used by the kEdgeDetectionBoss to create an IPathGeometry by performing edge detection on an image. The image is converted to grayscale, then converted to 1-bit using the gray threshold, and edge detection is performed on this 1-bit image to create a polygonal path. The polygon is then smoothed to create a spline-based path.
| anonymous enum |
enumeration of flags which client can bitwise or together
| pure virtual |
Perform edge detection on an image to create a path.
| itemRef | - IN: the source image |
| pNew | - OUT: resulting path |
| channelIndex | - IN: 0 = Composite, n = alpha channel number n-1. |
| resolution | - IN: The desired resolution of the path. Pass zero to indicate source resolution. |
| flags | - IN: Combination of kAllowHoles, kIntersectWithFrame, kDisplayMask, kForceHighRes, kForceProxy. |
| threshold | - IN: Gray threshold between 0 and 255 to determine which pixels become black and which become white in the 1-bit stage of the process. |
| tolerance | - IN: How sloppy can we be. 0 will produce unsmoothed polygonal path |
| minPathSize | - IN: Delete all paths with bounding box smaller than this size |
| progressPtr | - IN: Pointer to a progress bar callback. Can be nil. |
| imageMaskDataPtr | - IN: Optional. Required in case we want to apply edge detection to an image mask (for eg. Select Subject mask) rather than the original image. In case this parameter is provided, it will take precedence over original image for edge detection. |