Misplaced Pages

Phase stretch transform

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
PST operated on an astronomical image reveals the accuracy of the method in enhancing sharp and faint features.
PST edge detection on lightbulb image
Feature enhancement in an image (St Paul's Cathedral, London) using phase stretch transform (PST). Left panel shows the original image and the right panel shows the detected features using PST.
PST applied for resolution enhancement in microscopy
Application of PST to feature enhancement in biomedical images. Left panel shows the original image and the right panel shows the detected features using PST.
PST operated on Barbara image reveals the accuracy of the method in enhancing sharp and close by features. Left panel shows the original image and the right panel shows the detected features using PST.
Application of PST for feature enhancement in synthetic-aperture radar (SAR) images. In this figure detected features (in red) are overlaid with the original SAR image.
Feature detection on 1-D time domain data using phase stretch transform.

Phase stretch transform (PST) is a computational approach to signal and image processing. One of its utilities is for feature detection and classification. PST is related to time stretch dispersive Fourier transform. It transforms the image by emulating propagation through a diffractive medium with engineered 3D dispersive property (refractive index). The operation relies on symmetry of the dispersion profile and can be understood in terms of dispersive eigenfunctions or stretch modes. PST performs similar functionality as phase-contrast microscopy, but on digital images. PST can be applied to digital images and temporal (time series) data. It is a physics-based feature engineering algorithm.

Operation principle

Here the principle is described in the context of feature enhancement in digital images. The image is first filtered with a spatial kernel followed by application of a nonlinear frequency-dependent phase. The output of the transform is the phase in the spatial domain. The main step is the 2-D phase function which is typically applied in the frequency domain. The amount of phase applied to the image is frequency dependent, with higher amount of phase applied to higher frequency features of the image. Since sharp transitions, such as edges and corners, contain higher frequencies, PST emphasizes the edge information. Features can be further enhanced by applying thresholding and morphological operations. PST is a pure phase operation whereas conventional edge detection algorithms operate on amplitude.

Physical and mathematical foundations of phase stretch transform

Photonic time stretch technique can be understood by considering the propagation of an optical pulse through a dispersive fiber. By disregarding the loss and non-linearity in fiber, the non-linear Schrödinger equation governing the optical pulse propagation in fiber upon integration reduces to:

E o ( z , t ) = 1 2 π E ~ i ( 0 , ω ) e i β 2 z ω 2 2 e i ω t d ω {\displaystyle E_{o}(z,t)={\frac {1}{2\pi }}\int _{-\infty }^{\infty }{\tilde {E}}_{i}(0,\omega )\cdot e^{\frac {-i\beta _{2}z\omega ^{2}}{2}}\cdot e^{i\omega {t}}\,d\omega } (1)

where β 2 {\displaystyle \beta _{2}} = GVD parameter, z is propagation distance, E o ( z , t ) {\displaystyle E_{o}(z,t)} is the reshaped output pulse at distance z and time t. The response of this dispersive element in the time-stretch system can be approximated as a phase propagator as presented in H ( ω ) = e i φ ( ω ) = e i m = 0 φ m ( ω ) = m = 0 H m ( ω ) {\displaystyle H(\omega )=e^{i\varphi (\omega )}=e^{i\sum _{m=0}^{\infty }\varphi _{m}(\omega )}=\prod _{m=0}^{\infty }H_{m}(\omega )} (2)

Therefore, Eq. 1 can be written as following for a pulse that propagates through the time-stretch system and is reshaped into a temporal signal with a complex envelope given by

E o ( t ) = 1 2 π E ~ i ( ω ) H ( ω ) e i ω t d ω {\displaystyle E_{o}(t)={\frac {1}{2\pi }}\int _{-\infty }^{\infty }{\tilde {E}}_{i}(\omega )\cdot H(\omega )\cdot e^{i\omega t}\,d\omega } (3)

The time stretch operation is formulated as generalized phase and amplitude operations,

S { E i ( t ) } = + F { E i ( t ) } e i φ ( ω ) L ~ ( ω ) e i ω t d ω {\displaystyle \mathbb {S} \{E_{i}(t)\}=\int _{-\infty }^{+\infty }{\mathcal {F}}\{E_{i}(t)\}\cdot e^{i\varphi (\omega )}\cdot {\tilde {L}}(\omega )\cdot e^{i\omega {t}}d\omega } (4)

where e i φ ( ω ) {\displaystyle e^{i\varphi (\omega )}} is the phase filter and L ~ ( ω ) {\displaystyle {\tilde {L}}(\omega )} is the amplitude filter. Next the operator is converted to discrete domain,

S { E i [ n ] } = 1 N u = 0 N 1 F F T { E i ( n ) } K ~ ( u ) L ~ ( u ) e i 2 π N u n {\displaystyle \mathbb {S} \{E_{i}\}={\frac {1}{N}}\sum _{u=0}^{N-1}FFT\{E_{i}(n)\}\cdot {\tilde {K}}(u)\cdot {\tilde {L}}(u)\cdot e^{i{\frac {2\pi }{N}}un}} (5)

where u {\displaystyle u} is the discrete frequency, K ~ ( u ) {\displaystyle {\tilde {K}}(u)} is the phase filter, L ~ ( u ) {\displaystyle {\tilde {L}}(u)} is the amplitude filter and FFT is fast Fourier transform.

The stretch operator S { } {\displaystyle \mathbb {S} \{\}} for a digital image is then

S { E i [ n , m ] } = 1 M N v = 0 N 1 u = 0 M 1 F F T 2 { E i ( n , m ) } K ~ ( u , v ) L ~ ( u , v ) e i 2 π M u m e i 2 π N v n {\displaystyle \mathbb {S} \{E_{i}\}={\frac {1}{MN}}\sum _{v=0}^{N-1}\sum _{u=0}^{M-1}FFT^{2}\{E_{i}(n,m)\}\cdot {\tilde {K}}(u,v)\cdot {\tilde {L}}(u,v)\cdot e^{i{\frac {2\pi }{M}}um}\cdot e^{i{\frac {2\pi }{N}}vn}} (6)

In the above equations, E i [ n , m ] {\displaystyle E_{i}} is the input image, n {\displaystyle n} and m {\displaystyle m} are the spatial variables, F F T 2 {\displaystyle FFT^{2}} is the two-dimensional fast Fourier transform, and u {\displaystyle u} and v {\displaystyle v} are spatial frequency variables. The function K ~ ( u , v ) {\displaystyle {\tilde {K}}(u,v)} is the warped phase kernel and the function L ~ ( u , v ) {\displaystyle {\tilde {L}}(u,v)} is a localization kernel implemented in frequency domain. PST operator is defined as the phase of the Warped Stretch Transform output as follows

P S T { E i [ n , m ] } { S { E i [ x , y ] } } {\displaystyle PST\{E_{i}\}\triangleq \measuredangle \{\mathbb {S} \{E_{i}\}\}} (7)

where { } {\displaystyle \measuredangle \{\}} is the angle operator.

PST kernel implementation

The warped phase kernel K ~ ( u , v ) {\displaystyle {\tilde {K}}(u,v)} can be described by a nonlinear frequency dependent phase

K ~ ( u , v ) = e i φ ( u , v ) {\displaystyle {\tilde {K}}(u,v)=e^{i\varphi (u,v)}}

While arbitrary phase kernels can be considered for PST operation, here we study the phase kernels for which the kernel phase derivative is a linear or sublinear function with respect to frequency variables. A simple example for such phase derivative profiles is the inverse tangent function. Consider the phase profile in the polar coordinate system

φ ( u , v ) = φ polar ( r , θ ) = φ polar ( r ) {\displaystyle \varphi (u,v)=\varphi _{\text{polar}}(r,\theta )=\varphi _{\text{polar}}(r)}

From d φ ( r ) d r = tan 1 ( r ) {\displaystyle {\frac {d\varphi (r)}{dr}}=\tan ^{-1}(r)} we have φ ( r ) = r tan 1 ( r ) 1 2 log ( r 2 + 1 ) {\displaystyle \varphi (r)=r\tan ^{-1}(r)-{\frac {1}{2}}\log(r^{2}+1)}

Therefore, the PST kernel is implemented as

φ ( r ) = S ( W r ) tan 1 ( W r ) 1 2 log ( 1 + ( W r ) 2 ) ( W r max ) tan 1 ( W r max ) 1 2 log ( 1 + ( W r max ) 2 ) {\displaystyle \varphi (r)=S\cdot {\frac {(Wr)\cdot \tan ^{-1}(Wr)-{\frac {1}{2}}\log(1+(Wr)^{2})}{(Wr_{\max })\cdot \tan ^{-1}(Wr_{\max })-{\frac {1}{2}}\log(1+(Wr_{\max })^{2})}}}

where S {\displaystyle S} and W {\displaystyle W} are real-valued numbers related to the strength and warp of the phase profile

Applications

PST has been used for edge detection in biological and biomedical images as well as synthetic-aperture radar (SAR) image processing. PST has also been applied to improve the point spread function for single molecule imaging in order to achieve super-resolution. The transform exhibits intrinsic superior properties compared to conventional edge detectors for feature detection in low contrast visually impaired images.

The PST function can also be performed on 1-D temporal waveforms in the analog domain to reveal transitions and anomalies in real time.

Open source code release

On February 9, 2016, a UCLA Engineering research group has made public the computer code for PST algorithm that helps computers process images at high speeds and "see" them in ways that human eyes cannot. The researchers say the code could eventually be used in face, fingerprint, and iris recognition systems for high-tech security, as well as in self-driving cars' navigation systems or for inspecting industrial products. The Matlab implementation for PST can also be downloaded from Matlab Files Exchange. However, it is provided for research purposes only, and a license must be obtained for any commercial applications. The software is protected under a US patent. The code was then significantly refactored and improved to support GPU acceleration. In May 2022, it became one algorithm in PhyCV: the first physics-inspired computer vision library.

See also

References

  1. M. H. Asghari, and B. Jalali, "Edge detection in digital images using dispersive phase stretch", International Journal of Biomedical Imaging, Vol. 2015, Article ID 687819, pp. 1–6 (2015).
  2. M. H. Asghari, and B. Jalali, "Physics-inspired image edge detection", IEEE Global Signal and Information Processing Symposium (GlobalSIP 2014), paper: WdBD-L.1, Atlanta, December 2014.
  3. Y. Han and B. Jalali, "Photonic time-stretched analog-to-digital converter: fundamental concepts and practical considerations", Journal of Lightwave Technology 21, 3085 (2003)
  4. ^ B. Jalali and A. Mahjoubfar, "Tailoring Wideband Signals With a Photonic Hardware Accelerator", Proceedings of the IEEE, Vol. 103, No. 7, pp. 1071–1086 (2015).
  5. Physics-based Feature Engineering. Jalali et al. Optics, Photonics and Laser Technology, 2019
  6. Agrawal, G. P. (2007). Nonlinear fiber optics. Academic press. Chicago.
  7. Abdol, A.M.; Bedard, Andrew; Lánský, Imke; Kaandorp, J.A. (2018). "High-throughput method for extracting and visualizing the spatial gene expressions from in situ hybridization images: A case study of the early development of the sea anemone Nematostella vectensis". Gene Expression Patterns. 27: 36–45. doi:10.1016/j.gep.2017.10.005. ISSN 1567-133X. PMID 29122675.
  8. M. H. Asghari, C. Clemente, B. Jalali, and J. Soraghan, "Synthetic aperture radar image compression using discrete anamorphic stretch transform", IEEE Global Signal and Information Processing Symposium (GlobalSIP 2014), paper: WsBD-P.7, Atlanta, December 2014.
  9. C. V. Ilioudis, C. Clemente, M. H. Asghari, B. Jalali, and J. Soraghan, "Edge detection in SAR images using Dispersive Phase Stretch Transform", submitted to 2nd IET International Conference on Intelligent Signal Processing, London, 2015
  10. T. Ilovitsh, B. Jalali, M. H. Asghari, and Z. Zalevsky, "Phase stretch transform for super-resolution localization microscopy", Biomedical optics express. 2016 Oct 1;7(10):4198–209.
  11. M. Suthar, H. Asghari, and B. Jalali, "Feature Enhancement in Visually Impaired Images", IEEE Access 6 (2018): 1407–1415.
  12. "JalaliLabUCLA/Image-feature-detection-using-Phase-Stretch-Transform – File Exchange – MATLAB Central".

External links

Categories: