Skip to content

Question regarding code #42

@D0miH

Description

@D0miH

Hello,
first of all thanks for publishing this awesome project @apchenstu.

I was looking through the code of the facialDetails.py file and have a question regarding this python script.
During creation of the patches you stitch them together using the weights and accumulate the weights in the count array. But why are you dividing each pixel by the weights in this two lines?:

mask = count > 0
img[mask] /= count[mask]

My guess is that the result is somehow "normalized" but how exactly is it normalized? Such that it is in a range between 0 and 255?

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