Module: sarpyx.utils.viz
File: sarpyx/utils/viz.py
No module docstring available; module purpose is inferred from implementation.
Exported Symbols (__all__)
No explicit __all__ list. Public symbols inferred from implementation.
Public Functions (4)
show_image function
Display an image using matplotlib with optional color normalization and colorbar.
File location: sarpyx/utils/viz.py:7
Signature
show_image(image: np.ndarray, title: Optional[str]=None, cmap: Optional[str]=None, vmin: Optional[float]=None, vmax: Optional[float]=None, colorbar: bool=True, ax: Optional[plt.Axes]=None) -> plt.Axes
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
image | np.ndarray | yes | - | Input image to display as numpy array |
title | Optional[str] | no | None | Optional title to display above the image |
cmap | Optional[str] | no | None | Optional colormap to use for displaying the image |
vmin | Optional[float] | no | None | Optional minimum data value for colormap scaling |
vmax | Optional[float] | no | None | Optional maximum data value for colormap scaling |
colorbar | bool | no | True | Whether to add a colorbar (default True) |
ax | Optional[plt.Axes] | no | None | Optional matplotlib Axes to plot on, if None a new figure will be created |
Return Type
plt.Axes
The matplotlib Axes containing the image
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.utils.viz import show_image
result = show_image(image=<image>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior. Documented return may be None for some execution paths.
image_histogram_equalization function
Perform histogram equalization on an input image.
File location: sarpyx/utils/viz.py:43
Signature
image_histogram_equalization(image: np.ndarray, number_bins: int=8) -> tuple
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
image | np.ndarray | yes | - | Input image as a numpy array. |
number_bins | int | no | 8 | Number of bins for the histogram. Defaults to 8. |
Return Type
tuple
- Equalized image with the same shape as input. - Cumulative distribution function used for equalization. References: Adapted from http://www.janeriksolem.net/histogram-equalization-with-python-and.html
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.utils.viz import image_histogram_equalization
result = image_histogram_equalization(image=<image>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior.
show_histogram function
Display a histogram of the pixel values in an image.
File location: sarpyx/utils/viz.py:71
Signature
show_histogram(image: np.ndarray, title: Optional[str]=None, ax: Optional[plt.Axes]=None) -> plt.Axes
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
image | np.ndarray | yes | - | Input image as a numpy array |
title | Optional[str] | no | None | Optional title for the histogram |
ax | Optional[plt.Axes] | no | None | Optional matplotlib Axes to plot on, if None a new figure will be created |
Return Type
plt.Axes
The matplotlib Axes containing the histogram
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.utils.viz import show_histogram
result = show_histogram(image=<image>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior. Documented return may be None for some execution paths.
show_histogram_equalization function
Display the histogram equalization of an image.
File location: sarpyx/utils/viz.py:94
Signature
show_histogram_equalization(image: np.ndarray, number_bins: int=8, title: Optional[str]=None, ax: Optional[plt.Axes]=None) -> plt.Axes
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
image | np.ndarray | yes | - | Input image as a numpy array |
number_bins | int | no | 8 | Number of bins for the histogram |
title | Optional[str] | no | None | Optional title for the histogram |
ax | Optional[plt.Axes] | no | None | Optional matplotlib Axes to plot on, if None a new figure will be created |
Return Type
plt.Axes
The matplotlib Axes containing the histogram
Exceptions
None explicitly documented; inferred from implementation.
Side Effects
- inferred from implementation
Example Usage
from sarpyx.utils.viz import show_histogram_equalization
result = show_histogram_equalization(image=<image>)
Edge Cases
Includes optional parameters with implementation-defined fallback behavior. Documented return may be None for some execution paths.
Public Classes (0)
No public classes detected.