Thanks to visit codestin.com
Credit goes to github.com

Skip to content

curious about red shift loop implementation #9

@1mike12

Description

@1mike12

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions