Contents

vImageDilate_Planar8(_:_:_:_:_:_:_:_:)

Dilates an 8-bit planar buffer.

Declaration

func vImageDilate_Planar8(_ src: UnsafePointer<vImage_Buffer>, _ dest: UnsafePointer<vImage_Buffer>, _ srcOffsetToROI_X: vImagePixelCount, _ srcOffsetToROI_Y: vImagePixelCount, _ kernel: UnsafePointer<UInt8>, _ kernel_height: vImagePixelCount, _ kernel_width: vImagePixelCount, _ flags: vImage_Flags) -> vImage_Error

Parameters

  • src:

    The source vImage buffer.

  • dest:

    A pointer to the destination vImage buffer structure. You’re responsible for filling out the Height, Width, and Rowbytes fields of this structure, and for allocating a data buffer of the appropriate size. On return, the data buffer this structure points to contains the destination image data. When you no longer need the data buffer, deallocate the memory to prevent memory leaks.

  • srcOffsetToROI_X:

    The horizontal offset, in pixels, to the upper-left pixel of the region of interest within the source image.

  • srcOffsetToROI_Y:

    The vertical offset, in pixels, to the upper-left pixel of the region of interest within the source image.

  • kernel:

    The kernel data that contains kernel_height * kernel_width elements.

  • kernel_height:

    The height of the kernel in pixels. This value needs to be odd.

  • kernel_width:

    The width of the kernel in pixels. This value needs to be odd.

  • flags:

    The options to use when performing the operation. If your code implements its own tiling or its own multithreading, pass Kvimagedonottile; otherwise, pass Kvimagenoflags.

Return Value

kvImageNoError; otherwise, one of the error codes in Data Types and Constants.

Discussion

Use the dilate operation to enlarge light structural elements in an image. In the case where the kernel contains all zeros, use the corresponding maximize function instead.

See Also

Related Documentation

Dilating an object