iris.nodes.iris_response.image_filters package¶
Submodules¶
iris.nodes.iris_response.image_filters.gabor_filters module¶
- class iris.nodes.iris_response.image_filters.gabor_filters.GaborFilter(*, kernel_size: Tuple[ConstrainedIntValue, ConstrainedIntValue], sigma_phi: float, sigma_rho: float, theta_degrees: float, lambda_phi: float, dc_correction: bool = True, to_fixpoints: bool = False)[source]¶
Bases:
ImageFilter
Implementation of a 2D Gabor filter.
- Reference:
- class Parameters(*, kernel_size: Tuple[ConstrainedIntValue, ConstrainedIntValue], sigma_phi: ConstrainedFloatValue, sigma_rho: ConstrainedFloatValue, theta_degrees: ConstrainedFloatValue, lambda_phi: ConstrainedFloatValue, dc_correction: bool, to_fixpoints: bool)[source]¶
Bases:
Parameters
GaborFilter parameters.
- dc_correction: bool¶
- kernel_size: Tuple[ConstrainedIntValue, ConstrainedIntValue]¶
- lambda_phi: float¶
- sigma_phi: float¶
- sigma_rho: float¶
- theta_degrees: float¶
- to_fixpoints: bool¶
- class iris.nodes.iris_response.image_filters.gabor_filters.LogGaborFilter(*, kernel_size: Tuple[ConstrainedIntValue, ConstrainedIntValue], sigma_phi: float, sigma_rho: float, theta_degrees: float, lambda_rho: float, to_fixpoints: bool = False)[source]¶
Bases:
ImageFilter
Implementation of a 2D LogGabor filter.
- Reference:
- class Parameters(*, kernel_size: Tuple[ConstrainedIntValue, ConstrainedIntValue], sigma_phi: ConstrainedFloatValue, sigma_rho: ConstrainedFloatValue, theta_degrees: ConstrainedFloatValue, lambda_rho: ConstrainedFloatValue, to_fixpoints: bool)[source]¶
Bases:
Parameters
LogGaborFilter parameters.
- kernel_size: Tuple[ConstrainedIntValue, ConstrainedIntValue]¶
- lambda_rho: float¶
- sigma_phi: float¶
- sigma_rho: float¶
- theta_degrees: float¶
- to_fixpoints: bool¶
- iris.nodes.iris_response.image_filters.gabor_filters.convert_to_fixpoint_kernelvalues(kernel_values: ndarray) ndarray [source]¶
Convert the kernel values (both real and imaginary) to fix points.
- Parameters:
kernel_values (np.ndarray) – Kernel values.
- Returns:
fix-point Kernel values.
- Return type:
np.ndarray
- iris.nodes.iris_response.image_filters.gabor_filters.get_radius(x: ndarray, y: ndarray) ndarray [source]¶
Get radius to the image center for a given array of relative positions (x,y).
- Parameters:
x (np.ndarray) – x position relative to the image center.
y (np.ndarray) – y position relative to the image center.
- Returns:
radius to the image center.
- Return type:
np.ndarray
- iris.nodes.iris_response.image_filters.gabor_filters.get_xy_mesh(kernel_size: Tuple[int, int]) Tuple[ndarray, ndarray] [source]¶
Get (x,y) meshgrids for a given kernel size.
- Parameters:
kernel_size (Tuple[int, int]) – Kernel width and height.
- Returns:
meshgrid of (x, y) positions.
- Return type:
Tuple[np.ndarray, np.ndarray]
- iris.nodes.iris_response.image_filters.gabor_filters.normalize_kernel_values(kernel_values: ndarray) ndarray [source]¶
Normalize the kernel values so that the square sum is 1.
- Parameters:
kernel_values (np.ndarray) – Kernel values (complex numbers).
- Returns:
normalized Kernel values.
- Return type:
np.ndarray
- iris.nodes.iris_response.image_filters.gabor_filters.rotate(x: ndarray, y: ndarray, angle: float) Tuple[ndarray, ndarray] [source]¶
Rotate a given array of relative positions (x,y) by a given angle.
- Parameters:
x (np.ndarray) – x position.
y (np.ndarray) – y position.
angle (float) – angle for rotation (in degrees).
- Returns:
rotated x, y positions.
- Return type:
Tuple[np.ndarray, np.ndarray]
- iris.nodes.iris_response.image_filters.gabor_filters.upper_bound_Gabor_parameters(cls: type, values: Dict[str, Any]) Dict[str, Any] [source]¶
Check upper bounds of Gabor filter parameters such as sigma_phi, sigma_rho and lambda_phi for the given kernel_size.
- Parameters:
cls (type) – class type.
values (Dict[str, Any]) – values to be checked.
- Raises:
ImageFilterError – Raised if 1) sigma_phi is greater than kernel_size[0], 2) sigma_rho is greater than kernel_size[1], 3) lambda_phi greater than kernel_size[0].
- Returns:
values of checked parameters.
- Return type:
Dict[str, Any]
- iris.nodes.iris_response.image_filters.gabor_filters.upper_bound_LogGabor_parameters(cls: type, values: Dict[str, Any]) Dict[str, Any] [source]¶
Check upper bound of LogGabor filter parameter lambda_rho for the given kernel_size.
- Parameters:
cls (type) – class type.
values (Dict[str, Any]) – values to be checked.
- Raises:
ImageFilterError – lambda_phi can not be greater than kernel_size[1].
- Returns:
values of checked parameters.
- Return type:
Dict[str, Any]
iris.nodes.iris_response.image_filters.image_filter_interface module¶
- class iris.nodes.iris_response.image_filters.image_filter_interface.ImageFilter(**kwargs: Any)[source]¶
Bases:
Algorithm
Image filter abstract class.
- class Parameters[source]¶
Bases:
Parameters
Default ImageFilter parameters.
- abstract compute_kernel_values() ndarray [source]¶
Compute values of filter kernel.
- Returns:
Computed kernel values.
- Return type:
np.ndarray
- property kernel_values: ndarray¶
Get kernel values.
- Returns:
Filter kernel values.
- Return type:
np.ndarray