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

Floating point vs Integer Math #49

Open
rtlprmft opened this issue May 13, 2020 · 0 comments
Open

Floating point vs Integer Math #49

rtlprmft opened this issue May 13, 2020 · 0 comments

Comments

@rtlprmft
Copy link

You are using integer math in summing frames to increase processing speed. Integer math has the advantage that it can keep the high precision of floating point values even though you use integers. But then (e.g. when adding YUYV images), you artificially reduce the precision of your result to 8bit before you sum (average) your frames. You would get a much better result if you first summed them and later clip them. I have produced a version of the code which uses 16bit integer precision combined with 32bit buffers to achieve a better image quality when adding images that internally are anyways available in 16bit precision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant