Light-Field PSF Transpose Computation
This function transposes a light-field point-spread function.
# Syntax
```
Y = computeLfPsfTranspose(lfPsf)
Y = computeLfPsfTranspose(___, 'DoKeepAllValues', doKeep)
```
# Inputs
* `lfPsf` - a 5D array representing the light-field PSF. The first 2 dimensions should represent image space, the third and fourth dimensions should represent object space, and the fifth dimension should represent the z or axial-dimension of object space.
* type: numeric array
* size(lfPsf, 3) and size(lfPsf, 4) must be odd.
## Parameter/value pairs:
* 'DoKeepAllValues' (default: false) - boolean flag to perform the transpose on a padded array, followed by unpadding of the result. This is done such that no values are lost from the original PSF (although if the image-space dimensions have even size, some values will still be lost). If this flag is set to false the output will have a border of zeros of width ((size(lfPsf, [3, 4]) - 1) / 2).
* type: logical scalar
# Output:
* `lfPsfT` - the transposed light-field PSF.
* type: class(lfPsf)
* size: size(lfPsf)
# Note
This is an implementation of the index-switching transpose described by Martin Eberhart in "Efficient algorithm for calculating transposed PSF matrices for 3D light field deconvolution" (2020).
Cite As
Corban Swain (2026). Light-Field PSF Transpose Computation (https://uk.mathworks.com/matlabcentral/fileexchange/81323-light-field-psf-transpose-computation), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 0.0.8 |
