Contents

vImageErode_PlanarF(_:_:_:_:_:_:_:_:)

Erodes a 32-bit planar buffer.

Declaration

func vImageErode_PlanarF(_ src: UnsafePointer<vImage_Buffer>, _ dest: UnsafePointer<vImage_Buffer>, _ srcOffsetToROI_X: vImagePixelCount, _ srcOffsetToROI_Y: vImagePixelCount, _ kernel: UnsafePointer<Float>, _ 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 erode operation to enlarge dark structural elements in an image. In the case where the kernel contains all zeros, use the corresponding minimize function instead.

See Also

Related Documentation

Eroding an object