Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "util/imageUtil"

Index

Variables

Let _Buffer

_Buffer: Buffer = require('buffer/').Buffer as typeof Buffer

Let _noArray

_noArray: Mat

Const asImageData

asImageData: toImageData = toImageData

Functions

ab2str

  • ab2str(buf: Uint8Array): string

asMat

compareL2

  • compareL2(f1: Mat | File, f2: Mat | File, destroyBoth?: boolean): number
  • Compare two images by getting the L2 error (square-root of sum of squared error). The lower the result the more similar are the images.

    Parameters

    • f1: Mat | File
    • f2: Mat | File
    • Default value destroyBoth: boolean = false

    Returns number

data2mat

del

fromArrayBuffer

  • fromArrayBuffer(a: ArrayBuffer): Promise<Mat>

fromFile

  • fromFile(f: string): Promise<Mat>

fromUrl

  • fromUrl(f: string): Promise<Mat>

get

  • get(m: Mat, x: number, y: number): any[]
  • gets the color of pixel at coords (x,y)

    Parameters

    • m: Mat
    • x: number
    • y: number

    Returns any[]

isMat

  • isMat(m: any): boolean

isMatData

  • isMatData(d: any): boolean

isSize

  • isSize(size: any): boolean

jsonParseWithMat

  • jsonParseWithMat(d: string): any
  • Executes JSON.parse on JSON containing Mat instances.

    Parameters

    • d: string

    Returns any

jsonStringifyWithMat

  • jsonStringifyWithMat(s: any): string
  • Executes JSON.stringify on JSON containing Mat instances.

    Parameters

    • s: any

    Returns string

map

  • map(mat: Mat, dst: Mat, fn: function): void

mat2data

noArray

  • noArray(): Mat
  • for overload methods that won't accept undefined as argument, like 'mask' cv.add()

    Returns Mat

pointToSize

set

  • set(m: Mat, x: number, y: number, val: Scalar): void

sizeToPoint

str2ab

  • str2ab(str: string): Uint8Array

toImageData

  • toImageData(img: Mat): object
  • Creates an CV ImageData object from given image.

    Parameters

    Returns object

    • data: Uint8ClampedArray
    • height: number
    • width: number

toRgba

  • Returns a new image that is identical to given (1, 3 or 4 channels) but has 4 RGBA channels.

    Parameters

    • mat: Mat
    • Default value dst: Mat = new cv.Mat()

    Returns Mat

Generated using TypeDoc