Medical & Scientific Vision
Ultrasound Imaging
A medical imaging method that sends short sound pulses into the body and forms images from their echoes, converting echo time to depth with an assumed speed of sound, building B-mode images by beamforming, envelope detection and log compression, and producing a speckle texture whose statistics follow from the physics.
intermediate
Ultrasound imaging, also called sonography, forms images of the inside of the body from the echoes of short sound pulses. A transducer pressed against the skin sends a pulse along a line, listens to the echoes that tissue boundaries and small inhomogeneities send back, and converts the time of each echo into a depth by assuming a speed of sound. Sweeping the line across a plane gives a cross-sectional image in which brightness encodes echo strength, the B-mode (brightness mode) image. Lacefield (2014) describes it as the most commonly used diagnostic imaging modality, with about a quarter of all imaging examinations worldwide at the start of the 21st century, and attributes this to the low cost and portability of scanners, the absence of ionizing radiation, real-time imaging of moving structures and blood flow, and soft-tissue contrast without an injected agent.
For computer vision, ultrasound differs from the other medical sensors in three ways. It is natively video: a scanner produces tens of frames per second, and the radiology overview’s examples of ultrasound analysis, such as echocardiography, work on sequences (Computer Vision in Radiology). Its images are made by a coherent wave, so tissue that looks uniform to the eye appears as a grainy pattern called speckle, whose statistics follow from the physics and which behaves neither like the image noise of a camera nor like a texture of the tissue itself. And its pixel values are not calibrated: they depend on gains, compression curves and the position of a probe that an operator holds in their hand.
How It Works
Sound in tissue: speed, impedance and reflection
An acoustic wave is a travelling pressure disturbance of alternating compressions and rarefactions. In a fluid of density and compressibility it travels at the speed of sound , and a wave of frequency has wavelength (Lacefield, 2014, Eqs. 12.3–12.4). Ultrasound means frequencies above about 20 kHz; diagnostic imaging generally uses 2–15 MHz (Lacefield, 2014), and Neumann and Kollorz (2018) give a typical range of 2–40 MHz. At 5 MHz in soft tissue the wavelength is about 0.3 mm.
Soft tissues have speeds of sound close to that of water. Lacefield’s Table 12.1 lists 1450–1460 m/s for fat, 1555–1570 m/s for liver and 1550–1600 m/s for muscle, against 330 m/s for air and 3360–4080 m/s for skull bone; Jensen (2002) gives a range from 1446 m/s (fat) to 1566 m/s (spleen).
Echoes arise where the acoustic impedance changes. For plane waves the impedance is (Lacefield, 2014, Eq. 12.7), measured in rayl (kg m⁻² s⁻¹). At normal incidence on a flat boundary between media with impedances and , the fraction of the incident intensity that is reflected is
the square of the pressure reflection coefficient (Neumann & Kollorz, 2018, Eq. 11.2; Lacefield, 2014, Eq. 12.9 gives the signed pressure form for oblique incidence). Neighbouring soft tissues differ in impedance by a few per cent, so each boundary reflects a small fraction and passes the rest on: Neumann and Kollorz tabulate 1% for fat against muscle and 0.1% for muscle against blood, but 43.5% for brain against skull bone and 99.9% for soft tissue against air. With Lacefield’s impedances (about 1.36 MRayl for fat, 1.66 MRayl for muscle, 1.65 MRayl for liver and 0.0004 MRayl for air), the formula reproduces the 1% and the 99.9% (our arithmetic). The last figure is why a coupling gel is spread between transducer and skin, and why air-filled organs such as the lungs cannot be examined with ultrasound (Neumann & Kollorz, 2018).
Smooth boundaries much larger than the wavelength reflect like mirrors. Structures similar to or smaller than the wavelength scatter weaker echoes in all directions, and the interference of echoes scattered back from cellular-scale features produces the speckle texture that fills the inside of organs (Lacefield, 2014). Jensen (2002) stresses that this scattered field, not reflection from plane boundaries, is most of what a scanner displays, since sharp plane boundaries seldom exist in the body.
Attenuation and frequency
The pressure amplitude of a wave decays exponentially with distance, , through absorption (the main mechanism, converting the wave’s energy to heat), scattering out of the beam and other losses. In soft tissue grows roughly in proportion to frequency, with and sufficient for most diagnostic purposes, so attenuation coefficients are quoted in dB/(cm·MHz) (Lacefield, 2014, §12.2.4, §12.3.1). Lacefield’s table gives about 0.5 dB/cm at 1 MHz for fat, 1.0 for liver and 1.2 for muscle, and tissue-mimicking phantoms are made with 0.5 or 0.75 dB/(cm·MHz). Because echoes travel to the reflector and back, the loss in decibels is twice the one-way value.
This sets the basic trade-off of the modality. Higher frequencies give shorter wavelengths and finer resolution but are attenuated faster, so they reach less deep. Neumann and Kollorz (2018, Table 11.4) give maximum penetration depths of about 15 cm at 3.5 MHz, 7 cm at 7.5 MHz, 1.2 cm at 20 MHz and 0.6 cm at 40 MHz, with abdominal and fetal imaging at the low end and eye, skin and intravascular imaging at the high end.
Pulse-echo ranging and the speed-of-sound assumption
A scanner measures the arrival time of each echo after the pulse was sent and maps it to the distance from the array using an assumed speed of sound (Lacefield, 2014, §13.1). Since the pulse travels to the reflector and back, the depth is
Scanners use m/s, the average for soft tissue, everywhere in the field of view, both for this mapping and for the focusing delays described below (Lacefield, 2014, §13.2.1; Jensen, 2002). Where the true speed differs, echoes are placed at the wrong depth, and focusing delays computed for 1540 m/s no longer align echoes from the same scatterer, which blurs the image; van Sloun, Cohen and Eldar (2020) name these speed-of-sound aberrations as one of the main limits of conventional beamforming. Because soft tissues cluster near 1540 m/s, the geometric distortion is rarely perceptible, but Lacefield notes that it matters in image-guided interventions.
Pulse-echo timing also sets the frame rate: the next pulse waits for echoes from the deepest point, so one line of a 15 cm deep image takes about 195 µs, and about 100 lines give about 51 images per second (Jensen, 2002). Wider fields of view, finer line spacing and more transmit focal zones all lower it (Lacefield, 2014, §13.2.3).
Transducers and beamforming
Transducers rely on the piezoelectric effect: a voltage across a piezoelectric crystal, conventionally the ceramic lead zirconate titanate (PZT), makes it vibrate, and a vibration produces a voltage, so the same element transmits and receives. The transducer’s bandwidth sets the length of the transmitted pulse, typically 1.5–2 cycles (Lacefield, 2014, §12.4). Modern probes are arrays of small elements. A linear array steps an active sub-aperture along the array and gives a rectangular image; a curvilinear (convex) array does the same on a curved face and gives a sector; a phased array uses all its elements for every line and steers the beam electronically through a sector of up to 90° (Lacefield, 2014, §13.2.1), which suits imaging the heart between the ribs (Jensen, 2002).
All three focus by delay-and-sum beamforming. On transmission, each element is fired with a delay computed from its distance to the focal point, for m/s, so that all pulses arrive there at the same time. On reception, similar delays align the echoes that each element receives from the focus before they are summed (Lacefield, 2014, §13.2.1). Receive focusing is dynamic: since echo time corresponds to depth, the receive delays are updated continuously as echoes arrive, so the receive focus follows the pulse down the line at no cost in frame rate, whereas each additional transmit focal zone requires firing the line again (Lacefield, 2014, §13.2.3). Weighting (apodizing) the elements before summation trades lateral resolution for lower side lobes, and elements spaced too widely produce grating lobes, copies of the beam in other directions (Lacefield, 2014, §13.2.2). Van Sloun et al. (2020) call delay-and-sum the industry standard because of its low complexity, and describe the move to digital, pixel-based beamforming and to unfocused plane- or diverging-wave transmissions, which reach very high (“ultrafast”) frame rates at the cost of lateral resolution.
Forming a B-mode image
Lacefield (2014, §13.3, Fig. 13.4) gives the processing chain of a B-mode scanner. The echo signals of the elements are amplified, digitized and beamformed into one radio-frequency (RF) signal per scan line, which oscillates at the transducer frequency. Then:
- Time-gain compensation (TGC). Echoes from deeper tissue have been attenuated more, so each line is amplified by a gain that grows approximately exponentially with arrival time. The user sets its slope in several depth bands to obtain visually consistent brightness, alongside an overall gain and a lateral gain.
- Envelope detection. The magnitude of the RF signal is extracted. Older scanners used analogue demodulation (rectification and low-pass filtering); modern ones compute the quadrature component with the Hilbert transform and take the magnitude of the in-phase and quadrature pair, so that the brightness follows the echo amplitude rather than the carrier oscillation. Van Sloun et al. (2020) describe the same step as the magnitude of the complex in-phase and quadrature (IQ) data.
- Log compression. The echo data can span more than 80 dB, far more than the 48 dB () of an 8-bit display, so the magnitude is converted to decibels. One effective algorithm in Lacefield’s description takes the mean magnitude over the field of view as reference and maps a displayed dynamic range of dB linearly to grey levels: dB to 0, the mean to 128 and dB to 255, with typically 60 or 80 dB. Van Sloun et al. add that scanners may use specifically designed compression curves stored as look-up tables.
- Scan conversion. Samples are mapped to their positions on a Cartesian pixel grid. Linear-array images are interpolated laterally, since scan lines are much farther apart than samples along a line; sector images, acquired on a polar grid, are resampled, averaging or taking the maximum where lines overlap near the apex and interpolating where they diverge at depth.
The displayed image is therefore a log-compressed, interpolated, user-adjusted map of envelope amplitude: a monotonic but nonlinear function of echo strength, not a physical quantity. A-mode, the earliest display, plots the envelope of a single line against depth; M-mode shows one line over time, which suits moving structures such as the heart wall (Lacefield, 2014; Neumann & Kollorz, 2018).
Doppler in outline
Motion of scatterers shifts the echo frequency. For a reflector moving with speed at angle to the beam, the Doppler frequency is
where is the transmitted frequency (Lacefield, 2014, Eq. 12.18). The cosine makes Doppler blind to motion across the beam. Blood moves at up to about 1 m/s at the entrance to the aorta (Lacefield, 2014), which at 5 MHz gives a shift of about 6.5 kHz (our arithmetic). Pulsed-wave Doppler samples a chosen depth once per pulse, so it aliases above a maximum velocity , where the pulse repetition frequency PRF can be at most for a gate at depth (Lacefield, 2014, Eqs. 12.19–12.20). Colour Doppler overlays the mean axial velocity on the B-mode image in red and blue, which van Sloun et al. (2020) describe as estimated from the first lag of the autocorrelation over successive pulses; power Doppler displays the total Doppler power, which does not depend on angle and does not alias but gives no direction (Lacefield, 2014, §13.5.1).
Data It Produces
A scanner produces several kinds of data, and the ones that reach a vision pipeline are usually the most processed:
- Channel and RF data. The digitized signals of each element before beamforming, and the beamformed RF or IQ lines after it. They are typically sampled at 4–10 times their bandwidth for accurate focusing, and their data rates strain storage and transfer (van Sloun et al., 2020); learned beamforming works on them.
- B-mode frames and cine loops. Envelope-detected, log-compressed, scan-converted images, 2D or 3D, displayed at tens of frames per second.
- Doppler data. Colour and power Doppler overlays and spectral Doppler displays of velocity against time.
In DICOM, ultrasound images use 8 bits per sample, in monochrome or colour, the only exception being a 16-bit palette for palette-colour images (DICOM PS3.3, C.8.5.6). Physical geometry is not stored as a single pixel spacing: the US Region Calibration Module describes one or more rectangular regions of the image, each with its own spatial format (2D, M-mode, spectral Doppler), physical units (for example cm, seconds or cm/s) and physical increments per pixel in x and y, because one image can contain several regions with different calibrations, such as the quadrants of a quad-screen display (DICOM PS3.3, C.8.5.5). For vision, the pixel array is a screen image whose values have already passed through TGC, compression and grey mapping, often with annotations around it, as Medical Computer Vision notes for burned-in text, and whose millimetre scale has to be read from the region calibration.
Characteristics
| Property | What sets it | Typical values |
|---|---|---|
| Axial resolution | Pulse length: for an -cycle pulse | Finer than 1 mm for 1.5–2 cycle pulses (Lacefield, 2014, Eq. 12.12) |
| Lateral resolution | Aperture and focus: (focal distance , aperture length ) | 1–2 mm for f-numbers of 2 to 6 (Lacefield, 2014, Eq. 12.17) |
| Elevation (slice) thickness | Fixed acoustic lens on 1D arrays | Several millimetres (Lacefield, 2014, §13.2.2) |
| Penetration | Frequency-dependent attenuation | About 15 cm at 3.5 MHz to 0.6 cm at 40 MHz (Neumann & Kollorz, 2018) |
| Frame rate | Depth, number of lines, focal zones | 20–100 images per second (Jensen, 2002) |
| Displayed dynamic range | Log compression | Typically 60 or 80 dB (Lacefield, 2014) |
The axial resolution is half the pulse length because the pulse makes a round trip; the lateral resolution, by the Rayleigh criterion, is the distance from the peak of the focused beam to its first zero (Lacefield, 2014, Eqs. 12.12, 12.17). Neumann and Kollorz (2018) give simpler rules of thumb of axially and laterally, and state that lateral resolution is always inferior to axial. Resolution is thus anisotropic, finest along the beam, coarser across it and coarsest out of the plane, and the lateral resolution varies with depth around the focus.
Speckle
Statistics of fully developed speckle
Lacefield (2014, §13.6.2) explains speckle with a random walk model that was originally developed in optics. At any instant the scanner receives echoes from many unresolved scatterers within one resolution cell, the volume defined by the three-dimensional point-spread function. In the narrowband limit each echo is a phasor with its own magnitude and phase, and the received signal is their coherent sum. If the scatterers are similar and placed at random, the phases are uniformly distributed on , the sum is a random walk in the complex plane, and with at least about 10 scatterers per resolution cell the magnitude of the sum, which is the envelope-detected signal , follows the Rayleigh distribution:
Its mean is and its variance , so the ratio of mean to standard deviation, which Lacefield calls the point SNR, is whatever the scattering strength . The size of the speckle grains, the autocorrelation length of the pattern, is set by the point-spread function and not by the tissue (Lacefield, 2014). Speckle in a uniform region therefore carries little information beyond the mean scattering strength, and its fluctuations can hide low-contrast lesions.
Two consequences matter for image processing, and both follow from the Rayleigh model rather than from a cited source. Speckle is multiplicative: the standard deviation of is proportional to its mean, so a brighter region is proportionally more grainy. And log compression turns it into an additive fluctuation of fixed size. The intensity is exponentially distributed, the logarithm of an exponential variable has variance , and so
the same in a dark region as in a bright one. On a log-compressed B-mode image, fully developed speckle is thus a fluctuation of about 5.6 dB around the local mean, whatever that mean is.
Speckle as signal
Lacefield warns that the comparison with noise can mislead: speckle is the signal in most of the image, it does not change between frames if probe and tissue are still, and tissues are organized, so the model’s conditions hold strictly only in simulations and phantoms. With fewer than about ten scatterers per cell, or several populations of scatterers, the first- and second-order statistics of the echoes do carry information about the tissue, which motivates quantitative tissue characterization. Speckle that moves with the tissue can also be tracked: freehand 3D systems estimate in-plane probe motion by cross-correlating consecutive frames and out-of-plane motion from how quickly the speckle decorrelates (Lacefield, 2014, §13.4.4), a form of optical flow on coherent images. On the scanner, the most successful speckle reduction method in Lacefield’s account is spatial compounding, which averages images of the same region acquired from different angles.
Practical Example
The two scripts below build B-mode images of synthetic scatterer fields with NumPy 2.3.5 and SciPy 1.16.3. They follow the approach of simulation phantoms such as those of Jensen and Munk (1997), who model homogeneous tissue as randomly placed scatterers with Gaussian-distributed amplitudes and make cysts by setting the amplitudes in a region to zero, but replace the physical field calculation with a much simpler linear model. The RF image is the scatterer map convolved with a fixed, separable pulse-echo point-spread function: along depth, a 2-cycle pulse at 5 MHz, whose oscillation has period in depth because of the round trip; across, a Gaussian beam with a full width at half maximum (FWHM) of 0.6 mm. The model is two-dimensional, has no elevation, no diffraction, no side lobes and no depth-dependent focusing, and treats attenuation as a smooth amplitude loss applied to the scatterers.
The first script places 100 scatterers per mm² in a 30 × 20 mm field, about 18 per resolution cell (the product of the axial and lateral FWHM), adds an anechoic cyst and a bright inclusion that attenuates ten times more strongly than the background (0.5 dB/(cm·MHz), Lacefield’s phantom value), adds electronic noise 40 dB below the echo level, and then applies TGC, envelope detection by the Hilbert transform and Lacefield’s log compression with a 60 dB display range.
import numpy as np
from scipy.signal import fftconvolve, hilbert
rng = np.random.default_rng(0)
c, f0, fs = 1540.0, 5e6, 40e6 # speed of sound (m/s), centre frequency, sampling rate
lam = c / f0 * 1e3 # wavelength in mm (0.308)
dz, dx = c / (2 * fs) * 1e3, 0.1 # depth step per sample (mm), scan-line spacing (mm)
z = np.arange(10, 40, dz) # depth of each sample (mm)
x = np.arange(-10, 10, dx) # lateral position of each scan line (mm)
Z, X = np.meshgrid(z, x, indexing="ij") # axis 0 = depth (fast time), axis 1 = scan line
# Separable pulse-echo PSF: a 2-cycle pulse along depth, a Gaussian beam across.
fwhm_z, fwhm_x = 2 * lam / 2, 0.6 # axial FWHM N_c * lambda / 2, lateral FWHM (mm)
kz = np.arange(-1.0, 1.0, dz)
kx = np.arange(-1.5, 1.5 + dx / 2, dx)
psf_z = np.exp(-4 * np.log(2) * kz**2 / fwhm_z**2) * np.cos(2 * np.pi * kz / (lam / 2))
psf_x = np.exp(-4 * np.log(2) * kx**2 / fwhm_x**2)
psf = np.outer(psf_z, psf_x)
# Scatterer field: random positions, Gaussian amplitudes, 100 per mm^2.
n = int(100 * (z[-1] - z[0]) * (x[-1] - x[0]))
iz = rng.integers(0, z.size, n)
ix = rng.integers(0, x.size, n)
amp = rng.standard_normal(n)
scat = np.zeros(Z.shape)
np.add.at(scat, (iz, ix), amp)
cyst = (Z - 20) ** 2 + (X + 4) ** 2 < 3**2 # fluid: no scatterers, no attenuation
stone = (Z - 18) ** 2 + (X - 5) ** 2 < 2**2 # bright, strongly attenuating inclusion
scat[cyst] = 0.0
scat[stone] *= 2.0
alpha = np.full(Z.shape, 0.5) # attenuation, dB/(cm MHz)
alpha[cyst], alpha[stone] = 0.0, 5.0
# Two-way attenuation accumulated along each scan line (uniform 0.5 above z = 10 mm).
loss_db = 2 * f0 / 1e6 * (0.5 * 1.0 + np.cumsum(alpha, axis=0) * dz / 10)
rf_clean = fftconvolve(scat, psf, mode="same") # no attenuation, for reference
rf = fftconvolve(scat * 10 ** (-loss_db / 20), psf, mode="same")
rf += rng.normal(0, 0.01 * rf_clean.std(), rf.shape) # electronic noise at -40 dB
tgc = 10 ** (2 * f0 / 1e6 * 0.5 * (Z / 10) / 20) # undoes background loss only
env_raw = np.abs(hilbert(rf, axis=0))
env = np.abs(hilbert(rf * tgc, axis=0))
# Log compression: dB relative to the mean envelope, 60 dB shown, mean -> grey 128.
db = 20 * np.log10(env / env.mean())
grey = np.clip(np.round(128 + db * 255 / 60), 0, 255).astype(np.uint8)
def box(zr, xr):
return (Z >= zr[0]) & (Z < zr[1]) & (X >= xr[0]) & (X < xr[1])
def mean_db(e, zr, xr):
return 20 * np.log10(e[box(zr, xr)].mean() / env.mean())
def loss(zr, xr): # mean two-way loss in a box, dB
return loss_db[box(zr, xr)].mean()
clear = (-0.5, 2.5) # columns crossing neither inclusion
print("depth band (mm) loss (dB) before TGC (dB) after TGC (dB)")
for zr in [(11, 13), (23, 25), (36, 38)]:
print(f"{zr[0]:>4}-{zr[1]:<12} {loss(zr, clear):>9.1f} {mean_db(env_raw, zr, clear):>17.1f} "
f"{mean_db(env, zr, clear):>16.1f}")
roi = (Z >= 11) & (Z < 15)
e = env[roi]
print(f"\nspeckle ROI: point SNR = {e.mean() / e.std():.2f} (Rayleigh {np.sqrt(np.pi / (4 - np.pi)):.2f}), "
f"std of dB = {db[roi].std():.2f} (Rayleigh {20 / np.log(10) * np.pi / np.sqrt(24):.2f})")
ref = mean_db(env, (26, 34), clear)
print(f"cyst interior vs background: {mean_db(env, (18, 22), (-6, -2)) - mean_db(env, (18, 22), clear):6.1f} dB")
lref = loss((26, 34), clear)
print(f"below cyst (enhancement): {mean_db(env, (26, 34), (-6, -2)) - ref:6.1f} dB "
f"(path loss predicts {lref - loss((26, 34), (-6, -2)):+.1f})")
print(f"below inclusion (shadow): {mean_db(env, (26, 34), (4, 6)) - ref:6.1f} dB "
f"(path loss predicts {lref - loss((26, 34), (4, 6)):+.1f})")
print(f"grey levels clipped to 0 / 255: {np.mean(grey == 0):.1%} / {np.mean(grey == 255):.1%}")
Output:
depth band (mm) loss (dB) before TGC (dB) after TGC (dB)
11-13 6.0 -3.5 2.6
23-25 12.0 -11.7 0.2
36-38 18.5 -17.3 1.2
speckle ROI: point SNR = 1.77 (Rayleigh 1.91), std of dB = 5.83 (Rayleigh 5.57)
cyst interior vs background: -29.6 dB
below cyst (enhancement): 3.9 dB (path loss predicts +2.8)
below inclusion (shadow): -16.8 dB (path loss predicts -17.2)
grey levels clipped to 0 / 255: 2.0% / 0.0%
Before TGC, the echo level falls with depth by about as much as the computed path loss rises, within about 2 dB, the fluctuation of a mean over a few dozen speckle cells; TGC, set to undo exactly the background loss, levels the bands to within a similar margin. In the uniform region near the top, the speckle statistics are close to the Rayleigh values but on the grainy side, slightly further from them than the second script’s larger fields at similar densities; one region a few millimetres deep holds only a few hundred speckle cells, so its estimate varies with the seed. The cyst has no scatterers, so its interior sits at the bottom of the 60 dB display window, at the level of the TGC-amplified electronic noise, and accounts for most of the 2% of pixels clipped to black; because the model’s Gaussian beam has no side lobes, nothing fills the cyst in, so this contrast is better than a scanner would show (our reasoning, from Lacefield’s account of side lobes). Below the cyst the image is brighter, and below the inclusion much darker, by roughly the computed difference in path loss. TGC depends on depth only, so it cannot remove either: these are the enhancement and shadowing artifacts described below.
The second script asks how many scatterers a resolution cell needs before the speckle is fully developed. It repeats the simulation without attenuation or noise for densities from 0.5 to 50 scatterers per cell and prints the range over seeds 0 to 4.
import numpy as np
from scipy.signal import fftconvolve, hilbert
c, f0, fs = 1540.0, 5e6, 40e6
lam = c / f0 * 1e3
dz, dx = c / (2 * fs) * 1e3, 0.1
fwhm_z, fwhm_x = 2 * lam / 2, 0.6
kz = np.arange(-1.0, 1.0, dz)
kx = np.arange(-1.5, 1.5 + dx / 2, dx)
psf = np.outer(np.exp(-4 * np.log(2) * kz**2 / fwhm_z**2) * np.cos(2 * np.pi * kz / (lam / 2)),
np.exp(-4 * np.log(2) * kx**2 / fwhm_x**2))
nz, nx = int(20 / dz), int(20 / dx) # 20 mm x 20 mm field
cell = fwhm_z * fwhm_x # resolution cell area, mm^2
inner = (slice(int(2 / dz), nz - int(2 / dz)), slice(20, nx - 20)) # drop 2 mm margins
print("scatterers per cell point SNR (seeds 0-4) std of dB (seeds 0-4)")
for per_cell in [0.5, 1, 2, 5, 10, 20, 50]:
snr, sdb = [], []
for seed in range(5):
rng = np.random.default_rng(seed)
n = int(per_cell * 400 / cell)
scat = np.zeros((nz, nx))
np.add.at(scat, (rng.integers(0, nz, n), rng.integers(0, nx, n)), rng.standard_normal(n))
env = np.abs(hilbert(fftconvolve(scat, psf, mode="same"), axis=0))[inner]
snr.append(env.mean() / env.std())
sdb.append((20 * np.log10(env)).std())
print(f"{per_cell:>19} {min(snr):.2f} - {max(snr):.2f} {min(sdb):.2f} - {max(sdb):.2f}")
print(f"Rayleigh (fully developed): SNR {np.sqrt(np.pi / (4 - np.pi)):.2f}, "
f"std of dB {20 / np.log(10) * np.pi / np.sqrt(24):.2f}")
Output:
scatterers per cell point SNR (seeds 0-4) std of dB (seeds 0-4)
0.5 0.81 - 0.86 15.65 - 17.00
1 1.07 - 1.12 10.13 - 10.65
2 1.34 - 1.40 7.36 - 7.70
5 1.62 - 1.65 6.12 - 6.28
10 1.78 - 1.82 5.75 - 5.85
20 1.82 - 1.86 5.66 - 5.75
50 1.84 - 1.92 5.55 - 5.73
Rayleigh (fully developed): SNR 1.91, std of dB 5.57
With one or two scatterers per cell, the image is a sparse field of isolated bright points on a dark background: the point SNR is far below 1.91 and the spread in decibels is two to three times the Rayleigh value. As the density grows, the statistics approach the Rayleigh limit from below; from about 10 scatterers per cell on, the point SNR is within about 0.1 of 1.91 and the decibel spread within about 0.3 dB of 5.57, which matches Lacefield’s threshold of about ten scatterers. The approach is gradual, so even at 20 per cell the values stay slightly on the grainy side of the limit. In tissue, departures from these values are what quantitative ultrasound measures, and what a learned model may pick up as texture.
Artifacts
Lacefield (2014, §13.6.1) explains the common B-mode artifacts from the physics above; each breaks one of the scanner’s assumptions (our grouping):
- Acoustic shadowing. A strongly attenuating feature lowers the intensity reaching everything behind it, which appears darker than laterally adjacent tissue at the same depth.
- Acoustic enhancement. A weakly attenuating inclusion, such as a fluid-filled cyst, makes the tissue behind it brighter than expected. Since TGC is the same on all lines and the lateral gain the same at all depths, neither corrects shadowing or enhancement, and sonographers sometimes use these artifacts as observations in their own right.
- Reverberation. A pulse bouncing back and forth between two strongly reflecting interfaces returns repeated copies of the deeper boundary, spaced by the object’s thickness and fading with depth; behind calcifications or metal this appears as a comet-tail artifact.
- Mirror images. A strong specular reflector, the diaphragm being the classic case, redirects the pulse; echoes returning by the longer path are displayed behind the reflector, producing a mirror copy of structures, for example above the diaphragm where the air-filled lung should give no signal.
- Refraction. Oblique incidence on a boundary between tissues with different speeds of sound bends the beam, so reflectors are displayed at the wrong lateral position.
- Speed-of-sound errors. A region faster than 1540 m/s makes the echoes behind it arrive early, so structures behind it appear too shallow.
- Side and grating lobes. Echoes received through side lobes are displayed on the beam axis, partly filling cysts and lowering contrast; grating lobes can produce symmetrical ghost copies of strong reflectors.
CAMUS’s authors name reverberation, clutter and acoustic shadowing among the artifacts that make echocardiographic images hard to delineate (Leclerc et al., 2019). For vision models these artifacts are structured, physically caused image content: a shadow is a region of missing information, not dark tissue, and a reverberation is a repeated boundary, not anatomy.
Calibration
Ultrasound has no equivalent of the Hounsfield scale of computed tomography: grey levels depend on the transducer, frequency, gains, TGC, dynamic range and compression curve. What is calibrated is geometry and system performance. The depth scale rests on the 1540 m/s assumption, and the DICOM region calibration ties pixels to physical units. Quality assurance uses tissue-mimicking phantoms with a speed of sound of 1540 m/s, an attenuation of 0.5 or 0.75 dB/(cm·MHz) and suspended scatterers that produce realistic speckle; wire targets at decreasing spacings test axial and lateral resolution, inclusions of known backscatter contrast and anechoic cysts test contrast resolution, and flow phantoms pump a blood-mimicking fluid through channels to test Doppler (Lacefield, 2014, §13.6.3).
Processing the Data
The physics and the way the images are acquired shape what works in vision on ultrasound:
- Operator dependence. The operator holds the probe and so chooses the view, and sets the gain, TGC, lateral gain and transmit focal zones while scanning (Lacefield, 2014, §13.2.3, §13.3). Freehand 3D reconstruction depends on how regularly the sonographer sweeps the probe, whereas mechanically swept 3D acquisition does not depend on the operator (Lacefield, 2014, §13.4.4). In CAMUS, acquired in clinical routine, some cases were difficult to trace, acquisition settings varied widely, parts of the wall were not visible in some patients, and for some the recommended probe orientation for a four-chamber view could not be achieved, so a five-chamber view was acquired; the expert graded 19% of the images as poor quality (Leclerc et al., 2019). The authors also list variation in the speckle pattern along the myocardium, caused by the orientation of the probe relative to the tissue, among the difficulties for segmentation. A model trained on one operator’s or one site’s views therefore meets differently framed, differently gained images elsewhere; augmenting gain, contrast and geometry, and testing across operators and sites, address this (our reasoning).
- Intensity is relative. Because grey levels depend on user settings and a log mapping, per-image normalization is common. Since log compression makes speckle additive, filters designed for additive noise act more consistently on log-compressed data than on the envelope, but a local mean taken in decibels is biased: by the same exponential model it lies about 2.5 dB (, with Euler’s constant ) below the decibel value of the mean intensity (our reasoning from the speckle statistics above); image denoising methods built for white Gaussian noise still mis-model speckle, which is spatially correlated over the point-spread function.
- Geometry. Sector images have a fan-shaped valid region, resolution that varies with depth and position, and pixels whose physical size is given by the region calibration. CAMUS, for example, resampled all its sequences from polar coordinates onto one Cartesian grid of 0.3 mm () across and 0.15 mm () along the beam (Leclerc et al., 2019).
- Video and motion. Measurements such as cardiac volumes need specific frames (end-diastole and end-systole) and benefit from temporal context; speckle tracking estimates tissue motion.
- Working before the image. Van Sloun et al. (2020) survey learned methods along the imaging chain: on channel data, beamformers that learn delays and apodization and adaptive spectral Doppler estimation; on IQ data, compressive encodings for tissue Doppler; and on image sequences, clutter suppression and super-resolution vascular imaging. The first two groups need data that a DICOM ultrasound image, an 8-bit processed picture, does not contain (our reading of C.8.5.6).
- Annotation and agreement. Delineations vary between experts. In CAMUS, on 40 patients with good or medium image quality, inter-observer Dice scores between three cardiologists’ endocardial and epicardial left-ventricle contours ranged from 0.82 to 0.94 in the paper’s Table III (its text gives 0.82 to 0.93), and one cardiologist annotating the same patients twice, seven months apart, agreed more closely with themself (Leclerc et al., 2019). Results are measured against that variability; medical image segmentation describes the metrics and models.
Strengths
- No ionizing radiation; Neumann and Kollorz (2018) describe it as one of the least harmful imaging techniques, used even in pregnancy.
- Real-time imaging of moving structures, and blood flow and tissue motion from the same probe through Doppler, with frame rates far higher for ultrafast transmissions (van Sloun et al., 2020).
- Low cost and portability (Lacefield, 2014).
Limitations
- Bone and air block the beam, and fine resolution needs high frequencies that penetrate only shallowly.
- Speckle, artifacts, uncalibrated grey levels, operator dependence and coarse elevation resolution, as described above.
Typical Applications
Lacefield (2014) names cardiac and vascular imaging, abdominal organs and imaging of the developing fetus as the historical core, with growing use in cancer imaging, musculoskeletal imaging and ophthalmology; Neumann and Kollorz (2018) add therapeutic uses, such as breaking up stones with localized high-intensity ultrasound. Vision tasks on ultrasound include:
- Segmentation and measurement, such as the left ventricle and atrium in echocardiography: CAMUS (Leclerc et al., 2019; its CREATIS page requires users to cite the paper and, as of October 2026, names no licence) has apical two- and four-chamber sequences from 500 patients, from one hospital and one scanner model. The authors report that U-Net-style encoder–decoder networks, evaluated offline on these routine exams by ten-fold cross-validation on the patients with good or medium image quality against one cardiologist’s contours, gave segmentation scores between the inter- and intra-observer values; for the left-ventricular ejection fraction, their best correlation with the reference was 0.82, which they considered too low against the intra-observer 0.90 for clinical dependability.
- Video analysis, such as ejection fraction from echocardiogram videos, for which Computer Vision in Radiology describes EchoNet-Dynamic and its evaluation.
- Registration, for example of pre-operative MRI to intra-operative ultrasound during brain surgery, a task of the Learn2Reg challenge (medical image registration).
- Reconstruction and beamforming, including 3D reconstruction from freehand sweeps and learned beamforming from channel data (van Sloun et al., 2020).
History
Christian Doppler studied the effect named after him in 1842, and Pierre and Jacques Curie discovered piezoelectricity in quartz in 1880 (Lacefield, 2014). Neumann and Kollorz (2018) date the first ultrasound device in clinical use to 1958 and the first report of a 3D ultrasound system, by Kazunori Baba, to 1984. In Lacefield’s account, most scanners manufactured since 1992 display real-time estimates of the thermal and mechanical indices, multirow arrays allowing electronic focusing in elevation emerged in the late 1990s, and receive processing moved to digital electronics; van Sloun et al. (2020) describe the more recent turn to digital pixel-based beamforming, ultrafast unfocused transmissions and learned processing along the imaging chain.
Comparison with Other Sensors
- Computed tomography measures X-ray attenuation along lines and reconstructs calibrated values in Hounsfield units, with ionizing radiation; ultrasound measures echo times and amplitudes along beams, in real time, without radiation, with uncalibrated values and a limited acoustic window.
- MRI gives cross-sectional soft-tissue contrast set by sequence parameters but, as the MRI article reports, acquires more slowly, and it reconstructs from Fourier samples; ultrasound forms images line by line in real time.
- X-ray radiography projects the whole body thickness onto one image (X-ray radiography); ultrasound images a slice and cannot see through bone or gas.
- Cameras record incoherent light, so a uniform surface gives a uniform image apart from image noise; ultrasound uses a coherent wave and an unresolved scatterer field, so a uniform tissue gives speckle (our reasoning from the random walk model).
- Synthetic aperture radar is the closest relative in this respect: it is also a coherent, ranging sensor that forms images from echo delays and shows speckle from unresolved scatterers, as synthetic aperture radar imaging and remote sensing describe; there, multilooking averages independent looks much as spatial compounding averages views from different angles in ultrasound (our comparison).
Related
- Computed Tomography (CT)
An X-ray imaging method that measures attenuation along many lines through the body and reconstructs cross-sectional images from them, with each voxel calibrated in Hounsfield units.
- Magnetic Resonance Imaging (MRI)
A medical imaging method that uses a strong magnet, magnetic field gradients and radio waves to sample the spatial Fourier transform (k-space) of the body's hydrogen magnetization, producing cross-sectional images whose contrast is set by tissue relaxation times and the scanner's sequence parameters.
- Medical Image Segmentation
Delineating organs, tumors, lesions and other structures voxel by voxel in CT, MRI and other medical images; the 2D, 2.5D and 3D approaches, losses for very small targets, voxel spacing and anisotropy, metrics such as Dice and surface distances with their pitfalls, and benchmarks such as the Medical Segmentation Decathlon.
- Image Denoising
Estimating a clean image from a noisy observation, removing random variation while keeping edges, texture, and fine detail.
- Optical Flow
The apparent motion of image content between two frames, represented as a two-dimensional displacement at every pixel.
- Computer Vision in Radiology
How computer vision is used on radiological images such as chest X-rays, mammograms, CT, MRI and ultrasound, for computer-aided detection and diagnosis, triage of reading worklists, quantification and report generation, and how such systems are evaluated, why they fail through shortcut learning and dataset shift, and how regulators classify them.
References
- Lacefield, J. C. (2014). Physics of Ultrasound (Chapter 12) and Ultrasound Imaging (Chapter 13). In D. R. Dance, S. Christofides, A. D. A. Maidment, I. D. McLean & K. H. Ng (Eds.), Diagnostic Radiology Physics: A Handbook for Teachers and Students, 291–331. International Atomic Energy Agency, Vienna.
- Neumann, D. & Kollorz, E. (2018). Ultrasound. In A. Maier, S. Steidl, V. Christlein & J. Hornegger (Eds.), Medical Imaging Systems: An Introductory Guide, Lecture Notes in Computer Science, 237–249. Springer (open access, CC BY 4.0).
- Jensen, J. A. (2002). Ultrasound Imaging and Its Modeling. In M. Fink et al. (Eds.), Imaging of Complex Media with Acoustic and Seismic Waves, Topics in Applied Physics, 84, 135–166. Springer (read in the author's preprint).
- Jensen, J. A. & Munk, P. (1997). Computer Phantoms for Simulating Ultrasound B-Mode and CFM Images. In S. Lees & L. A. Ferrari (Eds.), Acoustical Imaging, 23, 75–80. Plenum Press (read in the authors' copy).
- van Sloun, R. J. G., Cohen, R. & Eldar, Y. C. (2020). Deep Learning in Ultrasound Imaging. Proceedings of the IEEE, 108(1), 11–29 (read in arXiv:1907.02994v2).
- Leclerc, S., Smistad, E., Pedrosa, J., Østvik, A., Cervenansky, F., Espinosa, F., Espeland, T., Berg, E. A. R., Jodoin, P.-M., Grenier, T., Lartizien, C., D'hooge, J., Lovstakken, L. & Bernard, O. (2019). Deep Learning for Segmentation Using an Open Large-Scale Dataset in 2D Echocardiography. IEEE Transactions on Medical Imaging, 38(9), 2198–2210 (read in arXiv:1908.06948v2).
- CREATIS. CAMUS: Cardiac Acquisitions for Multi-structure Ultrasound Segmentation (project page), accessed October 2026.
- National Electrical Manufacturers Association (2026). DICOM PS3.3 2026d: Information Object Definitions. Section C.8.5.5 (US Region Calibration Module) and Section C.8.5.6 (US Image Module).