You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I haven't found a quick method for setting the pixel of an image in opencv.js, at the moment I'm doing this img.data.set([r, g, b, a], row * img.cols * img.channels() + col * img.channels());, which I find to be too verbose.
It would be good to have a utility lib in Xaval that provides shortcuts and quick wrappers for such basic operations.
In this case it could be something like util.setPixel(img, row, col, pixel) where pixel is an array with the pixel components. Or maybe it would be sensible to specify the channels: util.setPixel4(img, row, col, pixel) or util.setPixel(img, row, col, channels, pixel).
The text was updated successfully, but these errors were encountered:
habbes
added
the
api
related to the api exposed by the xaval environment, libraries, methods, design, structure, etc.
label
Jun 26, 2018
I haven't found a quick method for setting the pixel of an image in opencv.js, at the moment I'm doing this
img.data.set([r, g, b, a], row * img.cols * img.channels() + col * img.channels());
, which I find to be too verbose.It would be good to have a utility lib in Xaval that provides shortcuts and quick wrappers for such basic operations.
In this case it could be something like
util.setPixel(img, row, col, pixel)
wherepixel
is an array with the pixel components. Or maybe it would be sensible to specify the channels:util.setPixel4(img, row, col, pixel)
orutil.setPixel(img, row, col, channels, pixel)
.The text was updated successfully, but these errors were encountered: