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

curious about red shift loop implementation #9

Open
1mike12 opened this issue Aug 16, 2024 · 1 comment
Open

curious about red shift loop implementation #9

1mike12 opened this issue Aug 16, 2024 · 1 comment

Comments

@1mike12
Copy link

1mike12 commented Aug 16, 2024

Curious why the new_avg_r starts off as the correct avg red of the input image, but then gets updated as the sum of all colors?

new_avg_r = np.sum(shifted)

IE why isn't the code this:

    while(new_avg_r < MIN_AVG_RED):

        shifted = hue_shift_red(avg_mat, hue_shift)
        new_avg_r = np.mean(shifted[..., 0]) # <-----
        hue_shift += 1
        if hue_shift > MAX_HUE_SHIFT:
            new_avg_r = MIN_AVG_RED
@1mike12 1mike12 changed the title curious about code curious about red shift loop implementation Aug 16, 2024
@bornfree
Copy link
Owner

Sorry it's been a while since I edited this repo.
Give me a couple of days to refresh my knowledge of the code and get back.

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