
- Scikit Image – Introduction
- Scikit Image - Image Processing
- Scikit Image - Numpy Images
- Scikit Image - Image datatypes
- Scikit Image - Using Plugins
- Scikit Image - Image Handlings
- Scikit Image - Reading Images
- Scikit Image - Writing Images
- Scikit Image - Displaying Images
- Scikit Image - Image Collections
- Scikit Image - Image Stack
- Scikit Image - Multi Image
- Scikit Image - Data Visualization
- Scikit Image - Using Matplotlib
- Scikit Image - Using Ploty
- Scikit Image - Using Mayavi
- Scikit Image - Using Napari
- Scikit Image - Color Manipulation
- Scikit Image - Alpha Channel
- Scikit Image - Conversion b/w Color & Gray Values
- Scikit Image - Conversion b/w RGB & HSV
- Scikit Image - Conversion to CIE-LAB Color Space
- Scikit Image - Conversion from CIE-LAB Color Space
- Scikit Image - Conversion to luv Color Space
- Scikit Image - Conversion from luv Color Space
- Scikit Image - Image Inversion
- Scikit Image - Painting Images with Labels
- Scikit Image - Contrast & Exposure
- Scikit Image - Contrast
- Scikit Image - Contrast enhancement
- Scikit Image - Exposure
- Scikit Image - Histogram Matching
- Scikit Image - Histogram Equalization
- Scikit Image - Local Histogram Equalization
- Scikit Image - Tinting gray-scale images
- Scikit Image - Image Transformation
- Scikit Image - Scaling an image
- Scikit Image - Rotating an Image
- Scikit Image - Warping an Image
- Scikit Image - Affine Transform
- Scikit Image - Piecewise Affine Transform
- Scikit Image - ProjectiveTransform
- Scikit Image - EuclideanTransform
- Scikit Image - Radon Transform
- Scikit Image - Line Hough Transform
- Scikit Image - Probabilistic Hough Transform
- Scikit Image - Circular Hough Transforms
- Scikit Image - Elliptical Hough Transforms
- Scikit Image - Polynomial Transform
- Scikit Image - Image Pyramids
- Scikit Image - Pyramid Gaussian Transform
- Scikit Image - Pyramid Laplacian Transform
- Scikit Image - Swirl Transform
- Scikit Image - Morphological Operations
- Scikit Image - Erosion
- Scikit Image - Dilation
- Scikit Image - Black & White Tophat Morphologies
- Scikit Image - Convex Hull
- Scikit Image - Generating footprints
- Scikit Image - Isotopic Dilation & Erosion
- Scikit Image - Isotopic Closing & Opening of an Image
- Scikit Image - Skelitonizing an Image
- Scikit Image - Morphological Thinning
- Scikit Image - Masking an image
- Scikit Image - Area Closing & Opening of an Image
- Scikit Image - Diameter Closing & Opening of an Image
- Scikit Image - Morphological reconstruction of an Image
- Scikit Image - Finding local Maxima
- Scikit Image - Finding local Minima
- Scikit Image - Removing Small Holes from an Image
- Scikit Image - Removing Small Objects from an Image
- Scikit Image - Filters
- Scikit Image - Image Filters
- Scikit Image - Median Filter
- Scikit Image - Mean Filters
- Scikit Image - Morphological gray-level Filters
- Scikit Image - Gabor Filter
- Scikit Image - Gaussian Filter
- Scikit Image - Butterworth Filter
- Scikit Image - Frangi Filter
- Scikit Image - Hessian Filter
- Scikit Image - Meijering Neuriteness Filter
- Scikit Image - Sato Filter
- Scikit Image - Sobel Filter
- Scikit Image - Farid Filter
- Scikit Image - Scharr Filter
- Scikit Image - Unsharp Mask Filter
- Scikit Image - Roberts Cross Operator
- Scikit Image - Lapalace Operator
- Scikit Image - Window Functions With Images
- Scikit Image - Thresholding
- Scikit Image - Applying Threshold
- Scikit Image - Otsu Thresholding
- Scikit Image - Local thresholding
- Scikit Image - Hysteresis Thresholding
- Scikit Image - Li thresholding
- Scikit Image - Multi-Otsu Thresholding
- Scikit Image - Niblack and Sauvola Thresholding
- Scikit Image - Restoring Images
- Scikit Image - Rolling-ball Algorithm
- Scikit Image - Denoising an Image
- Scikit Image - Wavelet Denoising
- Scikit Image - Non-local means denoising for preserving textures
- Scikit Image - Calibrating Denoisers Using J-Invariance
- Scikit Image - Total Variation Denoising
- Scikit Image - Shift-invariant wavelet denoising
- Scikit Image - Image Deconvolution
- Scikit Image - Richardson-Lucy Deconvolution
- Scikit Image - Recover the original from a wrapped phase image
- Scikit Image - Image Inpainting
- Scikit Image - Registering Images
- Scikit Image - Image Registration
- Scikit Image - Masked Normalized Cross-Correlation
- Scikit Image - Registration using optical flow
- Scikit Image - Assemble images with simple image stitching
- Scikit Image - Registration using Polar and Log-Polar
- Scikit Image - Feature Detection
- Scikit Image - Dense DAISY Feature Description
- Scikit Image - Histogram of Oriented Gradients
- Scikit Image - Template Matching
- Scikit Image - CENSURE Feature Detector
- Scikit Image - BRIEF Binary Descriptor
- Scikit Image - SIFT Feature Detector and Descriptor Extractor
- Scikit Image - GLCM Texture Features
- Scikit Image - Shape Index
- Scikit Image - Sliding Window Histogram
- Scikit Image - Finding Contour
- Scikit Image - Texture Classification Using Local Binary Pattern
- Scikit Image - Texture Classification Using Multi-Block Local Binary Pattern
- Scikit Image - Active Contour Model
- Scikit Image - Canny Edge Detection
- Scikit Image - Marching Cubes
- Scikit Image - Foerstner Corner Detection
- Scikit Image - Harris Corner Detection
- Scikit Image - Extracting FAST Corners
- Scikit Image - Shi-Tomasi Corner Detection
- Scikit Image - Haar Like Feature Detection
- Scikit Image - Haar Feature detection of coordinates
- Scikit Image - Hessian matrix
- Scikit Image - ORB feature Detection
- Scikit Image - Additional Concepts
- Scikit Image - Render text onto an image
- Scikit Image - Face detection using a cascade classifier
- Scikit Image - Face classification using Haar-like feature descriptor
- Scikit Image - Visual image comparison
- Scikit Image - Exploring Region Properties With Pandas
Scikit Image - Radon Transform
The Radon transform is a mathematical technique used in image processing and tomography to analyze and reconstruct images from their projections. It plays a significant role in computed tomography (CT) and other medical imaging applications.
In general, the Radon transform takes projections and mathematically transforms them into a different representation called a "sinogram", which is a linear transform of the original image. The sinogram captures the intensity values of the object's projections at different angles. The Radon transform essentially converts the data from the spatial domain (original image) into the Radon domain (sinogram).
To reconstruct the original image from the sinogram, the inverse Radon transform is applied.
In Scikit-image, the Radon transform and its inverse can be performed using the radon(), iradon(), and iradon_sart() functions. These functions allow you to simulate tomography experiments, perform the Radon transform, and reconstruct images using different algorithms.
Using the skimage.transform.radon() function
The skimage.transform.radon() function is used to compute the Radon transform of an input image, given specified projection angles.
Syntax
Following is the syntax of this function −
skimage.transform.radon(image, theta=None, circle=True, *, preserve_range=False)
Parameters
- image: An array-like object representing the input image. The rotation axis for the Radon transform will be placed at the pixel indices (image.shape[0] // 2, image.shape[1] // 2), which corresponds to the center of the image.
- theta (optional): An array-like object containing the projection angles(in degrees) at which the Radon transform should be computed. If set to None, the default value is np.arange(180).
- circle (optional): A boolean flag that determines whether to assume the image is zero outside the inscribed circle. If set to True, the width of each projection in the resulting sinogram will be equal to the minimum of the image's width and height.
- preserve_range (optional): A boolean flag that controls whether to keep the original range of values in the output sinogram. If set to True, the sinogram will retain the original value range. If set to False, the input image will be converted to a floating-point format following the conventions of img_as_float.
Return Value
It returns an ndarray(radon_image) representing the computed Radon transform (sinogram) of the input image. The tomography rotation axis will be positioned at the pixel index radon_image.shape[0] // 2 along the 0th dimension of radon_image.
Example
The following example demonstrates how to use the radon() function to perform the radon transform of an image with specified projection angles.
import numpy as np import matplotlib.pyplot as plt from skimage import transform, io # Load an input image image = io.imread('Images/test image.png', as_gray=True) image = transform.rescale(image, scale=0.4, mode='reflect', channel_axis=None) # Define projection angles theta = np.linspace(0, 180, 180, endpoint=False) # Perform Radon transform sinogram = transform.radon(image, theta=theta) # Perform inverse Radon transform using Filtered Back Projection algorithm reconstructed = transform.iradon(sinogram , theta=theta) # Plot the original and transformed images side by side fig, axes = plt.subplots(1, 2, figsize=(10, 5)) axes[0].imshow(image, cmap='gray') axes[0].set_title('Original Image') axes[0].axis('off') axes[1].imshow(sinogram, cmap='gray', aspect='auto', extent=(0, 180, 0, sinogram.shape[0])) axes[1].set_title('Radon Transform') axes[1].set_xlabel('Projection Angle (degrees)') axes[1].set_ylabel('Projection Position(pixels)') plt.tight_layout() plt.show()
Output
On executing the above program, you will get the following output −

Using the skimage.transform.iradon function
The skimage.transform.iradon() function is used for performing an inverse Radon transform to reconstruct an image from its radon transform (sinogram) using the filtered back projection algorithm.
Syntax
Following is the syntax of this function −
skimage.transform.iradon(radon_image, theta=None, output_size=None, filter_name='ramp', interpolation='linear', circle=True, preserve_range=True)
Parameters
- radon_image: A 2D array representing the input radon transform (sinogram). Each column of the image corresponds to a projection along a different angle. The tomography rotation axis should positioned at the pixel index radon_image.shape[0] // 2 along the 0th dimension of radon_image.
- theta (optional): A 1D array specifying the reconstruction angles (in degrees). The default is to use angles evenly spaced between 0 and 180 degrees, with the number of angles determined by the shape of radon_image.
- output_size (optional): An integer specifying the number of rows and columns in the reconstructed image.
- filter_name (optional): A string specifying the filter used for frequency domain filtering. The default is the ramp filter. Other available filters include: 'ramp', 'shepp-logan', 'cosine', 'hamming', and 'hann'. Assigning None results in no filtering.
- interpolation (optional): A string indicating the interpolation method used during reconstruction. Options include: 'linear', 'nearest', and 'cubic' (note that 'cubic' can be slower).
- circle (optional): A boolean flag that determines whether to assume that the reconstructed image is zero outside the inscribed circle. This also modifies the default output_size to match the behavior of the radon function when called with circle=True.
- preserve_range (optional): A boolean flag determining whether to retain the original range of values. If set to True, the input image is preserved as is. Otherwise, the input image is converted according to the conventions of img_as_float.
Return Value
It returns an ndarray representing the reconstructed image. The rotation axis will be located at the pixel indices (reconstructed.shape[0] // 2, reconstructed.shape[1] // 2).
Example
The following example demonstrates how to use the iradon() function to perform the inverse radon transform to reconstruct an image from its radon transform (sinogram) using the Filtered Back Projection algorithm.
import numpy as np import matplotlib.pyplot as plt from skimage import transform, io # Load an input image image = io.imread('Images/test image.png', as_gray=True) image = transform.rescale(image, scale=0.4, mode='reflect', channel_axis=None) # Define projection angles theta = np.linspace(0, 180, 180, endpoint=False) # Perform Radon transform sinogram = transform.radon(image, theta=theta) # Perform inverse Radon transform using Filtered Back Projection algorithm reconstructed = transform.iradon(sinogram , theta=theta) # Plot the original, transformed, and Reconstructed images side by side fig, axes = plt.subplots(1, 3, figsize=(12, 4)) axes[0].imshow(image, cmap='gray') axes[0].set_title('Original Image') axes[0].axis('off') axes[1].imshow(sinogram, cmap='gray', aspect='auto', extent=(0, 180, 0, sinogram.shape[0])) axes[1].set_title('Radon Transform') axes[1].set_xlabel('Projection Angle (degrees)') axes[1].set_ylabel('Projection Position(pixels)') axes[2].imshow(reconstructed, cmap='gray') axes[2].set_title('Reconstructed Image\nFiltered back projection') axes[2].axis('off') plt.tight_layout() plt.show()
Output
On executing the above program, you will get the following output −

Using the skimage.transform.iradon_sart() function
The skimage.transform.iradon_sart() function is used for performing an inverse radon transform to reconstruct an image from its radon transform (sinogram) using a single iteration of the Simultaneous Algebraic Reconstruction Technique (SART) algorithm. The SART algorithm is an iterative method commonly used in computed tomography (CT) for image reconstruction from projection data.
Syntax
Following is the syntax of this function −
skimage.transform.iradon_sart(radon_image, theta=None, image=None, projection_shifts=None, clip=None, relaxation=0.15, dtype=None)
Parameters
- radon_image: A 2D array representing the input radon transform (sinogram). Each column of the image corresponds to a projection along a different angle. The tomography rotation axis should positioned at the pixel index radon_image.shape[0] // 2 along the 0th dimension of radon_image.
- theta (optional): A 1D array specifying the reconstruction angles (in degrees). The default is to use angles evenly spaced between 0 and 180 degrees, with the number of angles determined by the shape of radon_image.
- image (optional): A 2D array representing an initial reconstruction estimate. The shape of this array should match the shape of radon_image. The default is an array of zeros.
- projection_shifts (optional): A 1D array specifying how much to shift the projections in radon_image before reconstructing the image. This can be useful for correcting alignment issues. The i'th value defines the shift of the i'th column of radon_image.
- clip (optional): A length-2 sequence of floats that enforces the range of values in the reconstructed tomogram to lie between clip[0] and clip[1].
- relaxation (optional): A float value controlling the relaxation parameter for the update step of the SART algorithm. A higher value can improve convergence rate, but too high values may lead to instability. Values close to or higher than 1 are not recommended.
- dtype (optional): The output data type for the reconstructed image. By default, if the input data type is not float, the input is cast to double. Otherwise, dtype is set to the input data type.
Return Value
It returns an ndarray representing the reconstructed image. The rotation axis will be located at the pixel indices (reconstructed.shape[0] // 2, reconstructed.shape[1] // 2).
Example
The following example demonstrates how to use the iradon() function to perform the inverse radon transform to reconstruct an image from its radon transform (sinogram) using the SART algorithm.
import numpy as np import matplotlib.pyplot as plt from skimage import transform, io # Load an input image image = io.imread('Images/test image.png', as_gray=True) image = transform.rescale(image, scale=0.4, mode='reflect', channel_axis=None) # Define projection angles theta = np.linspace(0, 180, 180, endpoint=False) # Perform Radon transform sinogram = transform.radon(image, theta=theta) # Perform inverse Radon transform using the SART algorithm reconstructed = transform.iradon_sart(sinogram , theta=theta) # Plot the original, transformed, and Reconstructed images side by side fig, axes = plt.subplots(1, 3, figsize=(12, 4)) axes[0].imshow(image, cmap='gray') axes[0].set_title('Original Image') axes[0].axis('off') axes[1].imshow(sinogram, cmap='gray', aspect='auto', extent=(0, 180, 0, sinogram.shape[0])) axes[1].set_title('Radon Transform') axes[1].set_xlabel('Projection Angle (degrees)') axes[1].set_ylabel('Projection Position(pixels)') axes[2].imshow(reconstructed, cmap='gray') axes[2].set_title('Reconstructed Image\nSART') axes[2].axis('off') plt.tight_layout() plt.show()
Output
On executing the above program, you will get the following output −
