Assume I have a 3 channel image to which I want to do some transformation.
For example, say I want to make all white pixels red.
In python I could do something like:
img[img == (255, 255, 255)] = (255, 0, 0)
Is there any equivalent syntax in Javascript to be applied to OpenCV.js matrices?
Iterating through each pixel in the image manually is terribly slow.
Aucun commentaire:
Enregistrer un commentaire