From 83d1a1c558293e1b14c9a5847628e7661f749c66 Mon Sep 17 00:00:00 2001 From: trisusilo48 Date: Mon, 21 Oct 2024 14:54:11 +0700 Subject: initial commit --- opencv.d.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 opencv.d.ts (limited to 'opencv.d.ts') diff --git a/opencv.d.ts b/opencv.d.ts new file mode 100644 index 0000000..b292622 --- /dev/null +++ b/opencv.d.ts @@ -0,0 +1,23 @@ +// opencv.d.ts + +declare module 'opencv.js' { + export interface Mat { + // Tambahkan fungsi dan properti yang Anda gunakan + rows: number; + cols: number; + type: () => number; + data: Uint8Array; + // Tambahkan metode lain yang Anda butuhkan + delete: () => void; + } + + export const cv: { + // Definisikan metode dan properti yang Anda gunakan + matFromImageData: (imageData: ImageData) => Mat; + cvtColor: (src: Mat, dst: Mat, code: number, dstCn?: number) => void; + threshold: (src: Mat, dst: Mat, thresh: number, maxValue: number, type: number) => void; + // Tambahkan lainnya sesuai kebutuhan + }; + export default cv; + } + \ No newline at end of file -- cgit v1.2.3