image-js
Version:
Image processing and manipulation in JavaScript
54 lines • 2.18 kB
TypeScript
import type { BorderInterpolationFunction } from './utils.types.js';
export declare const BorderType: {
readonly CONSTANT: "constant";
readonly REPLICATE: "replicate";
readonly REFLECT: "reflect";
readonly WRAP: "wrap";
readonly REFLECT_101: "reflect101";
};
export type BorderType = (typeof BorderType)[keyof typeof BorderType];
/**
* Pick the border interpolation algorithm.
* The different algorithms are illustrated here:
* @see {@link https://vovkos.github.io/doxyrest-showcase/opencv/sphinx_rtd_theme/enum_cv_BorderTypes.html}
* @param type - The border type.
* @param value - A pixel value if BorderType.CONSTANT is used.
* @returns The border interpolation function.
*/
export declare function getBorderInterpolation(type: BorderType, value: number | number[]): BorderInterpolationFunction;
/**
* Interpolate using a constant point.
* @param point - The point to interpolate.
* @param length - The length of the image.
* @returns The interpolated point.
*/
export declare function interpolateConstantPoint(point: number, length: number): number;
/**
* Interpolate by replicating the border.
* @param point - The point to interpolate.
* @param length - The length of the image.
* @returns The interpolated point.
*/
export declare function interpolateReplicatePoint(point: number, length: number): number;
/**
* Interpolate by reflecting the border.
* @param point - The point to interpolate.
* @param length - The length of the image.
* @returns The interpolated point.
*/
export declare function interpolateReflectPoint(point: number, length: number): number;
/**
* Interpolate by wrapping the border.
* @param point - The point to interpolate.
* @param length - The length of the image.
* @returns The interpolated point.
*/
export declare function interpolateWrapPoint(point: number, length: number): number;
/**
* Interpolate by reflecting the border.
* @param point - The point to interpolate.
* @param length - The length of the image.
* @returns The interpolated point.
*/
export declare function interpolateReflect101Point(point: number, length: number): number;
//# sourceMappingURL=interpolateBorder.d.ts.map