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

Distance function bias seems off, picks wrong colors sometimes #1

Open
roosta opened this issue Jun 2, 2021 · 4 comments
Open

Distance function bias seems off, picks wrong colors sometimes #1

roosta opened this issue Jun 2, 2021 · 4 comments

Comments

@roosta
Copy link
Member

roosta commented Jun 2, 2021

I use a bias when calculating distance between colors, seems a bit wrong, the program tends to favor the wrong color sometimes

@RustemB
Copy link
Contributor

RustemB commented Jun 2, 2021

original
image

srcery-ized
image

:D

Takes ~0.03s to convert

@roosta
Copy link
Member Author

roosta commented Jun 2, 2021

neat, that was quick too. I tried some 4k images and that took a good while. Colors don't seem that off either. Calling that a success ;)

@RustemB
Copy link
Contributor

RustemB commented Jun 2, 2021

have you run with --release?

[rustemb@machine srcery-convert]$ time cargo run  -- ~/Pictures/Saturn.png Saturn.png
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
     Running `target/debug/srcery-convert /home/rustemb/Pictures/Saturn.png Saturn.png`

real	0m16.007s
user	0m15.846s
sys	0m0.034s
[rustemb@machine srcery-convert]$ time cargo run --release  -- ~/Pictures/Saturn.png Saturn.png
    Finished release [optimized] target(s) in 0.09s
     Running `target/release/srcery-convert /home/rustemb/Pictures/Saturn.png Saturn.png`

real	0m0.732s
user	0m0.648s
sys	0m0.029s

@roosta
Copy link
Member Author

roosta commented Jun 2, 2021

No never actually tried that :D, that quite a bit of improvement I must say

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

2 participants