Skip to content

mschiffn/f_number

Repository files navigation

Frequency-Dependent F-Number

GitHub GitHub repository size GitHub language count GitHub stargazers GitHub forks View on File Exchange Watch on YouTube ko-fi

Simple MATLAB and CUDA implementations of the frequency-dependent F-number for coherent plane-wave compounding [1], [2], line-by-line scanning [3], and synthetic aperture imaging [4].

CIRS040

What is the F-Number?

The F-number is a user-defined parameter of a technique known as "dynamic aperture". This technique reduces image artifacts in all image formation methods that use the delay-and-sum (DAS) algorithm to focus echo signals. These methods include

  • coherent plane-wave compounding [5];
  • line-by-line scanning [6]; and
  • synthetic aperture imaging [7].

The dynamic aperture has two properties. First, it is centered on the lateral focal position. Second, it widens with the focal length as a function of the F-number. The F-number, for a linear transducer array, equals the quotient of the focal length and the aperture width.

F-number

Typical F-numbers, however, exclude echo signals from the focusing and reduce both the signal-to-noise ratio (SNR) and the lateral resolution.

Established Methods to Compute the F-Number are Contradictory and Yield Frequency-Dependent Results

Established methods to compute optimal F-numbers attribute the image artifacts to two different phenomena:

  1. Measurement noise [5], [8], [9]: The directivity of the array elements attenuates the echoes and reduces the SNR of the recorded signals.

  2. Grating lobes [10], [11]: The width of the aperture determines the grating lobe-to-main lobe ratio.

Both approaches yield similar F-numbers (0.5 <= F <= 2) but are mutually contradictory.

Wide array elements, for example, show an increased directivity.
The "Noise" approach suggests the usage of narrow receive subapertures or, equivalently, large F-numbers for such elements to improve the signal-to-noise ratio.
The "Grating lobes" approach, in contrast, permits wide receive subapertures or, equivalently, small F-numbers for such elements because they attenuate the grating lobes.

Both approaches, moreover, yield F-numbers that increase with the frequency.

The DAS algorithm, however, requires a fixed F-number and typically uses the maximum F-number at the upper frequency bound. This F-number satifies the conditions for all lower frequencies but, owing to its suboptimal value, reduces the spatial resolution.

What Does the Proposed F-Number Accomplish?

The proposed F-number not only eliminates image artifacts but also maintains the spatial resolution of the full aperture [1], [2].

This F-number, in particular, prevents the first-order grating lobes from insonifying reflective image structures. The F-number, to this end, uses a closed-form expression, which derives from the far-field sensitivity of the focused receive subaperture, to impose a minimum angular distance on these grating lobes.

How Does the Implementation Work?

A Fourier-domain beamforming algorithm enables the usage of frequency-dependent F-numbers. The algorithm not only varies the width of the receive subaperture with the voxel position but also with the frequency. This additional frequency dependence, in contrast to a fixed F-number, includes additional frequency components that improve both the contrast and the spatial resolution.

Method Width of the receive subaperture Spatial resolution Grating lobe suppression
No F-number always full optimal none
Fixed F-number position-dependent minimal exaggerated
Proposed F-number frequency- and position-dependent almost optimal optimal

Getting Started

  1. Clone the repository or download the release to your local hard drive.
git clone https://github.com/mschiffn/f_number
  1. Add the repository to your MATLAB path.
addpath( genpath( './f_number' ) )
  1. Run the script "examples.m".
examples

Folder Structure

The repository has the following structure:

.
├── +auxiliary      # auxiliary functions (e.g., dimension and size check)
├── +cuda           # C++/CUDA implementation and MEX interface
├── +f_numbers      # classes for various types of F-numbers (e.g., constant, directivity-derived, proposed)
├── +normalizations # classes for various types of normalizations (e.g., off, on, window-based)
├── +platforms      # classes for various types of platforms (e.g., CPU, GPU)
├── +windows        # classes for various window functions (e.g., boxcar, Hann, Tukey)
├── das_pw.m        # main function
├── data_RF.mat     # experimental data (tissue phantom)
├── examples.m      # examples for the usage of the main function
├── LICENSE         # license file
└── README.md       # this readme

The packages +f_numbers, +normalizations, and +windows contain exemplary class hierarchies to manage various types of F-numbers, normalizations, and window functions.

Image Formation

Use the function das_pw to form images.

In MATLAB type

help das_pw

to obtain an explanation of the input and output arguments.

The typical usage is:

[ image, F_number_values ] = das_pw( positions_x, positions_z, data_RF, f_s, theta_incident, element_width, element_pitch, [ f_lb, f_ub ], c_ref, N_samples_shift, window, F_number, normalization, platform );

The proposed F-number can be instantiated by

chi_lb = 45;  % minimum angular distance of the first-order grating lobes (°)
F_ub = 3;     % maximum permissible F-number
delta = 10;   % safety margin for anti-lobe aliasing (°)
F_number_rx = f_numbers.grating.angle_lb( chi_lb, F_ub, delta );

The directivity-derived F-numbers [5], [6] are

width_over_pitch = 0.918;  % element width-to-element pitch ratio (1)
F_number_rx_1 = f_numbers.directivity.perrot( width_over_pitch );
F_number_rx_2 = f_numbers.directivity.szabo( width_over_pitch );

The standard fixed F-number is

F_number_rx_3 = f_numbers.constant( 3 );

The MEX interface to the C++/CUDA implementation must be compiled:

mexcuda '-L/usr/local/cuda/lib64' -lcudart -lcufft gpu_bf_das_pw_rf.cu

You might have to adapt the library path (here: /usr/local/cuda/lib64) to your system.

📓 References

  1. M. F. Schiffner and G. Schmitz, "Frequency-dependent F-number suppresses grating lobes and improves the lateral resolution in coherent plane-wave compounding," IEEE Trans. Ultrason., Ferroelectr., Freq. Control (2023). DOI:10.1109/TUFFC.2023.3291612

  2. M. F. Schiffner and G. Schmitz, "Frequency-dependent F-number increases the contrast and the spatial resolution in fast pulse-echo ultrasound imaging," 2021 IEEE Int. Ultrasonics Symp. (IUS), Xi’an, China, Sep. 2021, pp. 1–4. DOI:10.1109/IUS52206.2021.9593488 arXiv Watch on YouTube

  3. M. F. Schiffner, “Frequency-dependent F-numbers suppress grating lobes and improve the lateral resolution in line-by-line scanning,” 2024 IEEE Ultrasonics, Ferroelectrics, and Frequency Control Joint Symp. (UFFC-JS), Taipei, Sep. 2024, pp. 1–4. DOI:10.1109/UFFC-JS60046.2024.10793642 arXiv Watch on YouTube

  4. M. F. Schiffner, “Frequency-dependent F-numbers suppress grating lobes and improve both the signal-to-noise ratio and the lateral resolution in synthetic aperture imaging,” 2025 IEEE Int. Ultrasonics Symp. (IUS), Utrecht, Sep. 2025. Watch on YouTube

  5. G. Montaldo, M. Tanter, J. Bercoff, N. Benech, and M. Fink, “Coherent plane-wave compounding for very high frame rate ultrasonography and transient elastography," IEEE Trans. Ultrason., Ferroelectr., Freq. Control, vol. 56, no. 3, pp. 489–506, Mar. 2009. DOI:10.1109/TUFFC.2009.1067

  6. A. Ilovitsh, T. Ilovitsh, J. Foiret, D. N. Stephens, and K. W. Ferrara, “Simultaneous axial multifocal imaging using a single acoustical transmission: A practical implementation,” IEEE Trans. Ultrason., Ferroelectr., Freq. Control, vol. 66, no. 2, pp. 273–284, Feb. 2019. DOI:10.1109/TUFFC.2018.2885080

  7. J. A. Jensen, S. I. Nikolov, K. L. Gammelmark, and M. H. Pedersen, “Synthetic aperture ultrasound imaging,” Ultrasonics, vol. 44, Supplement, e5–e15, Dec. 2006. DOI:10.1016/j.ultras.2006.07.017

  8. V. Perrot, M. Polichetti, F. Varray, and D. Garcia, “So you think you can DAS? A viewpoint on delay-and-sum beamforming,” Ultrasonics, vol. 111, p. 106 309, Mar. 2021. DOI:10.1016/j.ultras.2020.106309

  9. T. L. Szabo, Diagnostic Ultrasound Imaging: Inside Out, 2nd. Elsevier Academic Press, Dec. 2013

  10. B. Delannoy, R. Torguet, C. Bruneel, E. Bridoux, J. M. Rouvaen, and H. Lasota, “Acoustical image reconstruction in parallel-processing analog electronic systems,” J. Appl. Phys., vol. 50, no. 5, pp. 3153–3159, May 1979. DOI:10.1063/1.326397

  11. C. Bruneel, E. Bridoux, B. Delannoy, B. Nongaillard, J. M. Rouvaen, and R. Torguet, “Effect of spatial sampling on an acoustical image reconstruction,” J. Appl. Phys., vol. 49, no. 2, pp. 569–573, Feb. 1978. DOI:10.1063/1.324680