Ask Your Question

Revision history [back]

Opencv.js Uncaught TypeError: fields[fieldName].write is not a function

Hi everyone,

I'm trying to use cv.GaussianBlur() on OpenCV.js, but it gives error like that:

Uncaught TypeError: fields[fieldName].write is not a function
at Object.toWireType (opencv4.js:24)
at Object.blur (eval at new_ (opencv4.js:24), <anonymous>:9:26)
at Object.blur (opencv4.js:24)
at HTMLImageElement.img.onload (custom.js:120)

There is no problem with cv.cvtColor() function, but when try to use GaussianBlur or blur, it gives error.

Opencv.js Uncaught TypeError: fields[fieldName].write is not a function

Hi everyone,

I'm trying to use cv.GaussianBlur() on OpenCV.js, but it gives error like that:

Uncaught TypeError: fields[fieldName].write is not a function
at Object.toWireType (opencv4.js:24)
at Object.blur (eval at new_ (opencv4.js:24), <anonymous>:9:26)
at Object.blur (opencv4.js:24)
at HTMLImageElement.img.onload (custom.js:120)

There is no problem with cv.cvtColor() function, but when try to use GaussianBlur or blur, it gives error.

I'm using OpenCV on JavaScript as opencv.js

I'm using Opencv.js 4.1 from this link: https://docs.opencv.org/4.1.0/opencv.js

I've only added <script type="text/javascript" async src="opencv.js></script>" to load the opencv.js