这是indexloc提供的服务,不要输入任何密码
Skip to content

GaussianNoise uint8 [0,255] compatibility #9148

@diaz-esparza

Description

@diaz-esparza

🚀 The feature

Adding compatibility to uint8-dtype [0,255]-range image format to the GaussianNoise transform.

Motivation, pitch

Found this transformation to be useful, but had an experimental pipeline that did some transformations out of order to try and keep uint8 dtype for as long as possible.

The solution is also very simple, as we just have to move the normally-distributed array from [0-1] to the [0-255] representation range and optionally do rounding. I already have a version of this implemented, and with uint8s being the regular way to open standard images I think some other people might also find it convenient :)

Also, it's just a bit more performant than doing a cast from uint8 to float_ and back :v

Alternatives

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions