image-js
Version:
Image processing and manipulation in JavaScript
25 lines • 1.09 kB
TypeScript
import type { Image } from '../Image.js';
import type { Mask } from '../Mask.js';
export interface AlignMinDifferenceOptions {
/**
* Initial step size by which the images will be translated.
* @default `Math.max(Math.round(Math.min(source.width, source.height, Math.max(xSpan, ySpan)) / 10,),1,)`
*/
startStep?: number;
mask?: Mask;
}
/**
* Aligns two images by finding the translation that minimizes the mean difference of all channels.
* between them. The source image should fit entirely in the destination image.
* @param source - Image to align.
* @param destination - Image to align to.
* @param options - Align images min difference options.
* @returns Translation that minimizes the mean difference between the images.
* Gives the origin of the source image relatively to the top-left corner of the destination image.
*/
export declare function alignMinDifference(source: Image, destination: Image, options?: AlignMinDifferenceOptions): {
row: number;
column: number;
similarity: number;
};
//# sourceMappingURL=alignMinDifference.d.ts.map