Docsity

Biomedical imaging notes, Appunti di Elaborazione digitale delle immagini

Toggle sidebar
bg1
Notes
1
Notes
1. The main characteristics of an image
1.1 How to acquire an image
1.2 Classification of bio-images
1.3 Acquisition of images
1.4 The digital image processing system
1.6 Resolution
1.7 Digitalization
1.8 Operations
2. Punctual operations
2.1 Zooming and shrinking
2.2 Interpolation
2.3 Matrix
2.4 Masks
2.5 The color image
2.6 Histogram of an image
2.8 Mathematical operations
2.9 Logical operators
2.10 Log-polar transformation
2.11 Bitshift operations
2.12 Geometric operators
2.13 Processing techniques
2.14 Filters
3. Fourier Domain
3.1 The Fourier Transform
4. Image restoration and degradation
4.1 Image degradation due to noise
4.2 Geometric degradation
4.3 Image restoration
5. Morphological operators
5.1 Connectivity
5.2 Dilation
5.3 Erosion
5.4 Opening
5.5 Closing
5.6 Hit and miss
5.6 Thinning and skeletonization
5.7 Thicking
6. Image fusion
6.1 Multi-modal registration
6.2 Spatial Co-registration mode
6.3 Statistic fusion image
7. Radon transform
7.1 XRay computed tomography
7.2 Projection and radon transform
7.3 Backprojection
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Anteprima parziale del testo

Scarica Biomedical imaging notes e più Appunti in PDF di Elaborazione digitale delle immagini solo su Docsity!

Notes

  1. The main characteristics of an image 1.1 How to acquire an image 1.2 Classification of bio-images 1.3 Acquisition of images 1.4 The digital image processing system 1.5 Optical illusions 1.6 Resolution 1.7 Digitalization 1.8 Operations
  2. Punctual operations 2.1 Zooming and shrinking 2.2 Interpolation 2.3 Matrix 2.4 Masks 2.5 The color image 2.6 Histogram of an image 2.8 Mathematical operations 2.9 Logical operators 2.10 Log-polar transformation 2.11 Bitshift operations 2.12 Geometric operators 2.13 Processing techniques 2.14 Filters
  3. Fourier Domain 3.1 The Fourier Transform
  4. Image restoration and degradation 4.1 Image degradation due to noise 4.2 Geometric degradation 4.3 Image restoration
  5. Morphological operators 5.1 Connectivity 5.2 Dilation 5.3 Erosion 5.4 Opening 5.5 Closing 5.6 Hit and miss 5.6 Thinning and skeletonization 5.7 Thicking
  6. Image fusion 6.1 Multi-modal registration 6.2 Spatial Co-registration mode 6.3 Statistic fusion image
  7. Radon transform 7.1 XRay computed tomography 7.2 Projection and radon transform 7.3 Backprojection

1. The main characteristics of an image

1.1 How to acquire an image

In the history of science, researchers have tried to record their observations pictorially. Initially, the main method to “acquireˮ images of what was inside the human body was through dissection technique of cadavers. Yet, as technology advanced, novel medical imaging modalities emerged persisting to the present day. However, the evolution of biomedical instrumentation sometimes derives from other fields. For instance, military research has led to ultrasound technology, while nuclear reactors have helped create radio-pharmaceuticals for nuclear medicine. Letʼs delve deep into the different techniques of imaging.

1.1.1 X-Ray radiography

X-ray technology involves the use of electromagnetic radiation to create images of the inside of the body. In case of planar radiography, X-rays are directed through the patient and detected using a flat panel beneath them. The detected X-ray energy is converted to light, then into voltage and finally itʼs digitized. The acquired image is a two-dimensional projection of the tissues lying between the source and the detector of X-rays. Bones and calcifications are clearly visible due to their high X-ray absorption compared to the one of soft tissue.

For some clinical diagnoses, it is necessary to acquire a three-dimensional image. This can be done through the so called X-ray computed tomography CT scan. In CT scans, the X-ray source and detectors rotate around the patient, capturing one-dimensional projections. These projections are then reconstructed into a two-dimensional image. Horizontal movement of the patient during image acquisition adds the third dimension.

7.4 Projection theorem 7.5 Discrete Fourier reconstruction 7.6 Filtered Backprojection algorithm

Planar scintigraphy: itʼs the most basic technique and it provides a two-dimensional image analogous to a planar X-ray scan. Single Photon Emission Computed Tomography SPECT it produces a series of contiguous two-dimensional images of the distribution of the radiotracer. Positron Emission Tomography PET it involves a different type of radiotracer that emits positrons (positively charged electrons) and it produces high quality three-dimensional images.

1.1.3 Ultrasound

Of all the standard clinical imaging techniques ultrasound is by far the least expensive and most portable. It can acquired continuous images at real-time without safety concerns.

Ultrasound imaging works by emitting high-frequency sound waves into the body, which bounce off organs and tissues, creating echoes.

These echoes are then captured by a transducer and converted into real-time images displayed on a monitor, allowing visualization of internal structures without using ionizing radiation.

The clinical used frequency is between 1 and 15 MHz, while the speed of sound in tissues is 1540 m/s. So the range of wavelengths of ultrasound in tissue is between 0.1 and 1.5 mm

Additionally, ultrasound can assess blood flow and identify flow direction using varying gray scale levels.

1.1.4 Magnetic Resonance Imaging (MRI)

Itʼs the most recently  1973  imaging technology.

MRI provides a spatial map of the hydrogen nuclei (water and lipid) in different tissues.

The MRI system has three main parts: a superconducting magnet, a set of magnetic field gradient coils, and a radiofrequency transmitter and receiver.

The superconducting magnet is very strong, about 3 Tesla, much stronger than the Earth's magnetic field.

This magnet causes the protons in the body to spin at a certain frequency, known as the 'resonance' frequency.

The magnetic field gradients change this frequency depending on where the protons are in the body, allowing the MRI machine to create detailed images.

The main advantages of this technique are:

No ionizing radiation required Images can be both two or three dimensional Excellent soft-tissue contrast High spatial resolution

The main disadvantages are:

Slower  30 40 minutes) compared to CT and ultrasound Patients with metallic implants are precluded from MRI Expensive

1.2 Classification of bio-images

Bio-images can be classified into different categories according to the chosen discriminating element.

1.2.1 Invasiveness

An imaging technique is said to be invasive if it involves the introduction of an instrument, such as a probe or a catheter, into the patientʼs body.

Otherwise, the technique is non-invasive.

1.2.2 Used technology

As we previously seen, there are different types of techniques such as radiography, scintigraphy, ultrasound and so on.

Images can also be categorized based on whether contrast agents were used during acquisition or not.

1.2.3 Resolution type

Quantization: itʼs the process of converting the sampled analog signal into a digital signal by assigning discrete numerical values (digital codes) to each sample. The number of bits used to represent each sample determines the precision or dynamic range of the digital signal.

Example:

Example:

When an image is black and white (grayscale), each element in the sampling matrix represents a different shade of gray. After sampling, a quantizer is applied to transform the sampled values into discrete numerical values typically ranging from 0 to 255.

For a color image, the sampling matrix represents different levels of red, green, and blue RGB intensities at each pixel.

1.4 The digital image processing system

1.4.1 The system

The digital image processing system involves capturing image data using image sensors, converting the analog signals into digital format using ADCs, storing the digital image data in image memory, processing the images using specialized software, converting the processed digital data back into analog signals using DACs, and finally displaying the visual images on a display device. Example of image sensors:

Another way is to average signal from different scans.

In the image below, a is obtain with a single scan, b with 2 identical scans averaged, c with 4 and d with 16 scans.

Quality of images depends also on the technique used for the acquisition. Below we can see from left to right: image of the breast obtained with radiographic, magnetic resonance, ultrasound and scintigraphic techniques.

1.4.2 Electromagnetic (EM) energy spectrum

Gamma Rays  PET and SPECT

X-rays  CT

Ultra-violet

Visible-light  Microscope, camera system

Infrared

Microwaves

Radio waves

1.6 Resolution

Resolution in imaging refers to the ability to distinguish between closely spaced objects or details in an image.

When imaging a very small, bright point on a dark background, such as a point source of light, it may not appear as sharp in the image as it actually is. Instead, it will appear as a smoothed-out blob, which is known as the point spread function PSF. The PSF describes how light from a point source spreads out in the image due to factors like optical imperfections and diffraction.

When two such blobs are placed close together, at a distance equal to or shorter than the resolution limit of the imaging system, they will no longer be distinguishable as two separate objects.

This is because the blurred edges of the blobs overlap, making it difficult for the observer to discern individual points. This distance at which two points merge into a single blob defines the resolution limit of the imaging system.

Higher the number of pixels, higher the resolution.

Pay attention: the dimension of the image and the number of pixels within the image are two different things.

In the example below, the dimension is reduced, maintaining the same number of pixels:

Here instead, the dimension is the same for all the pictures, but the resolution decreases.

MATLAB functions

imread() % reading an image with different postfixes imresize() % resizing an image to any given size figure % opening a new graphical window subplot(#of row, # of col, location) % showing different % plots/images in one graphical window imshow() % displaying an image

% -----------------------------------Example code ------------------------ % Generating figure

im=imread('obelix.jpg'); im=rgb2gray(imread('obelix.jpg')); % Transform the image from RGB to gray im1=imresize(im, [1024 1024]); % Change the dimension of the image without im2=imresize(im1, [1024 1024]/2);

In the following image we can see that the variation of the gray levels doesnʼt impact the acquired XRay images of the brain.

MATLAB code

% Example im=imread('obelix.jpg'); im=rgb2gray(imread('obelix.jpg')); im1=imresize(im, [1024 1024]); im2= gray2ind(im1,2^7); im3= gray2ind(im1,2^6); im4= gray2ind(im1,2^5); im5= gray2ind(im1,2^4); im6= gray2ind(im1,2^3); im7= gray2ind(im1,2^2); im8= gray2ind(im1,2^1);

figure; subplot(2,4,1);imshow(im1,[]);subplot(2,4,2);imshow(im2,[]) subplot(2,4,3);imshow(im3,[]);subplot(2,4,4);imshow(im4,[]) subplot(2,4,5);imshow(im5,[]);subplot(2,4,6);imshow(im6,[]) subplot(2,4,7);imshow(im7,[]);subplot(2,4,8);imshow(im8,[])

1.8 Operations

1.8.1 Linear operators

Consider a general operator. Given an image as input, outputs an image :

is called a linear operator if

where are constant values.

See slide

1.8.2 Multi-image operation

Average:

Example:

H f ( x , y ) g ( x , y )
H [ f ( x , y )] = g ( x , y )
H
H [ a i fi ( x , y ) + a j fj ( x , y )] = a i H [ f i ( x , y )] + a j H [ f j ( x , y )] = a i g i ( x , y ) + a j g j ( x , y )
a i , aj
I + ( i , j ) = I 1 ( i , j ) + I 2 ( i , j )
I − ( i , j ) = I 1 ( i , j ) − I 2 ( i , j )
Iav ( i , j ) = ( I ( i , j ) +
n
1 ... +^ I^ n ( i ,^ j ))

2. Punctual operations

2.1 Zooming and shrinking

Zooming and shrinking are processes to enlarge (zooming) or reduce (shrinking) the size of a digital image. To perform zooming, first, new pixels need to be created to fill in the increased size of the image; then, gray values are assigned to these new pixels. Gray levels are determined using interpolation.

2.2 Interpolation

Interpolation refers to the method used to generate new pixels when resizing an image.

2.2.1 Definition of neighbors of a pixel

Given a pixel of coordinates , we can define: Horizontal and vertical neighbors as:

p ( x , y )

Diagonal neighbors as:

For a total of 8 neighbors.

2.2.2 Example

Consider the following pixel, which four vertices coordinates are :

The gray values at the four corners are respectively.

Suppose that you want to determine the gray value at coordinates based on the known gray values at the four vertices.

We can use different types of interpolation methods:

Linear interpolation First, we need to compute the gray value at by linearly interpolating between the gray values at and :

Then, compute the gray value at by interpolating between the gray values at and .

N 4 ( p ) ={( x + 1, y ), ( x − 1, y ), ( x , y − 1), ( x , y + 1)}
N D ( p ) ={( x − 1, y − 1), ( x − 1, y + 1), ( x + 1, y − 1), ( x + 1, y + 1)}
f 00 , f 01 , f 10 , f 11
( x , y )
(0, y )
f (0, y ) = f (0, 0) + y ( f (0, 1) − f (0, 0))
(1, y ) (1, 0)
f (1, y ) = f (1, 0) + y ( f (1, 1) − f (1, 0))