summaryrefslogtreecommitdiff
path: root/opencv.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'opencv.d.ts')
-rw-r--r--opencv.d.ts23
1 files changed, 23 insertions, 0 deletions
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