OpenCv.js: what's the quickest way to set the pixel of an image?

asked 2018-06-26 18:14:40 -0500

habbes gravatar image

What's the quickest way for setting the pixel value of image Mat in OpenCv.js?

I'm currently doing[r, g, b, a], row * img.cols * img.channels() + col * img.channels());

But I'm wondering whether there's a less-verbose built-in method in opencv.js, something analogous to img.ucharPtr(row, col) when retrieving the pixel value.

edit retag flag offensive close merge delete