GaussianDenoising¶
giant.image_processing.denoising
:
- class giant.image_processing.denoising.GaussianDenoising(options=None)[source]¶
Uses gaussian smoothing to reduce noise in an image.
All we do is convolve a 2d gaussian kernel with the image. This has the effect of reducing noise spikes but also reduces sharpness in the image. It can be fairly effective for reducing noise in images only of point sources without removing too many dim ones. It is also generally fast.
- Parameters:
options (GaussianDenoisingOptions | None) – the options to configure the class with
- border_type: int = 4¶
The pixel extrapolation method.
BORDER_WRAP is not supported.
- property options_dict: Dict¶
Determine the options input to the dataclass.
This property method will ignore all internal properties and functions
- property original_options: OptionsT¶
Get the original configuration options.
- Returns:
OptionsT: The original options used during initialization.
Warning
Modifying the returned object will affect reset behavior.
- sigma_x: float = 0.0¶
Gaussian kernel standard deviation in x direction.
If both this and sigma_y are 0 then they are computed from the size.
- sigma_y: float = 0.0¶
Guassian kernel standard deviation in y direction.
If 0 and sigma_x is not 0 then set to sigma_x. If both sigma_x and this are 0 then computed from the size.
- size: tuple[int, int] = (5, 5)¶
Gaussian kernel size width, height.
Must both be positive and odd or 0 which implies they should be computed from sigma.
- allowed_dtypes: list[DTypeLike] = [<class 'numpy.float32'>]¶
The allowed datatype. Technically uint8, int16, uint16, and float64 are also supported but we want the output to be float32 so force everything to that.
Summary of Methods
Update the options as attributes of the object class |
|
Compares each attribute of self to other and stores the result in a dict mapping the attribute to the comparison result. |
|
this is used to overwrite options in variables only used in __init__ |
|
This method is used for special cases when certain options should be overwritten |
|
Resets the class to the state it was originally initialized with. |