-
Notifications
You must be signed in to change notification settings - Fork 15
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(BufferedImage) --> Image(Mat) is slow #424
Comments
Possibly related: #426 https://stackoverflow.com/a/3432532
|
This PR fixes the tint issue: #427 However it's still slow (though perhaps less slow than in was with the alpha channel...) |
Java 2D in general is slow. It should be used only for legacy support or for where performance isn't a problem. |
Yeah, it's more for interop, all image steps in KS use javacv. We're using BufferedImage as the source of some generated data in a demo. What we're doing there is not complex (combining a couple of images that have alpha channels). It could simply be easier to rewrite that part in javacv if it proves to be a bottleneck in practice than worrying about optimizing this right now. More generally for the conversion, it should be possible (at least in some circumstances) to pass or adapt the DataBuffer from the BufferedImage Raster to javacv; currently this is using the (not exactly performant/elegant/well designed) approach of using png as an intermediate format. |
For large images it's seconds per frame, and everything has a red hue when visualized via ShowImageStep
The text was updated successfully, but these errors were encountered: