Skip to content

TODO: Detection method for black photos #7

Open
@mathematicalmichael

Description

@mathematicalmichael

Currently the logic checks if all pixels in all channels are below 20.

How well is this working? If it's fine, keep it.

If you want to do something else, here are some suggestions based on my experience with image processing:

Take the average pixel value across all channels. Threshold it to <5. That way, even small blips of white that may be there will get washed out in the process of averaging. From what I understand, having a single pixel of (255,255,255) right now would prevent the logic from returning True (I'm not native to JS but that's my understanding from the cloudfunction repo's index.js).

Take the median. Same logic.

Sum all three channels, divide by 3. If the proportion of pixels below (5,5,5) exceeds 95% / 99%, mark it as solid.

JPEG compression really in theory shouldn't be leaving artifacts in all-black images. But if someone clips just a bit of white in there, we want to be able to catch that.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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