holoride
Search Results for

    Show / Hide Table of Contents

    Class MapUtils

    A collection of useful map functions.

    Inheritance
    object
    MapUtils
    Namespace: Holoride.ElasticSDK
    Assembly: Holoride.ElasticSDK.Library.Runtime.dll
    Syntax
    public static class MapUtils

    Methods

    DistanceTransform(IReadOnlyList<float>, float[], float, float, bool, bool)

    Performs a distance transform on an image for pixels greater than the threshold.

    Declaration
    public static void DistanceTransform(IReadOnlyList<float> inputImage, float[] outputImage, float pixelDistance, float threshold, bool invert = false, bool borderDistance = false)
    Parameters
    Type Name Description
    IReadOnlyList<float> inputImage

    The input image with a square resolution.

    float[] outputImage

    The output image of the same size as the input image.

    float pixelDistance

    The pixel distance to scale the output.

    float threshold

    Values are set to the euclidean distance to the closest point falling below this threshold.

    bool invert

    States whether to compute distances to pixels above the threshold instead.

    bool borderDistance

    States whether to include distances to the image boarder.

    Index2D(int, int, int, int)

    Converts the 2d index of a rectangular image to a single integer index.

    Declaration
    public static int Index2D(int x, int y, int resolutionX, int resolutionY)
    Parameters
    Type Name Description
    int x

    The x coordinate.

    int y

    The y coordinate.

    int resolutionX

    The resolution in x dimension.

    int resolutionY

    The resolution in y dimension.

    Returns
    Type Description
    int

    The linear index.

    Index2D(int, int, int)

    Converts the 2d index of a squared image to a single integer index.

    Declaration
    public static int Index2D(int x, int y, int resolution)
    Parameters
    Type Name Description
    int x

    The x coordinate.

    int y

    The y coordinate.

    int resolution

    The resolution in each dimension.

    Returns
    Type Description
    int

    The linear index.

    In This Article

    Back to top
    ©   holoride
    Privacy   Imprint