Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image utility library #69

Open
habbes opened this issue Jun 26, 2018 · 0 comments
Open

Image utility library #69

habbes opened this issue Jun 26, 2018 · 0 comments
Labels
api related to the api exposed by the xaval environment, libraries, methods, design, structure, etc.

Comments

@habbes
Copy link
Owner

habbes commented 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) 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).

@habbes habbes added the api related to the api exposed by the xaval environment, libraries, methods, design, structure, etc. label Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api related to the api exposed by the xaval environment, libraries, methods, design, structure, etc.
Projects
None yet
Development

No branches or pull requests

1 participant