Distortion Correction¶
Description¶
A plugin to apply radial distortion correction.
Parameters
in_datasets:
visibility: datasets
dtype: "[list[],list[str]]"
description:
summary: A list of the dataset(s) to process.
verbose: A list of strings, where each string gives the name of a dataset that was either specified by a loader plugin or created as output to a previous plugin. The length of the list is the number of input datasets requested by the plugin. If there is only one dataset and the list is left empty it will default to that dataset.
default: "[]"
out_datasets:
visibility: datasets
dtype: "[list[],list[str]]"
description:
summary: A list of the dataset(s) to create.
verbose: A list of strings, where each string is a name to be assigned to a dataset output by the plugin. If there is only one input dataset and one output dataset and the list is left empty, the output will take the name of the input dataset. The length of the list is the number of output datasets created by the plugin.
default: "[]"
polynomial_coeffs:
visibility: basic
dtype: list
description: Parameters of the radial distortion
default: "[1.0, 0.0, 0.0, 0.0, 0.0]"
center_from_top:
visibility: basic
dtype: float
description: The centre of distortion in pixels from the top of the image.
default: "1080.0"
center_from_left:
visibility: basic
dtype: float
description: The centre of distortion in pixels from the left of the image.
default: "1280.0"
file_path:
visibility: basic
dtype: "[None, filepath, str]"
description: Path to the text file having distortion coefficients. Set to None for manually inputing.
default: None
crop_edges:
visibility: basic
dtype: int
description: When applied to previewed/cropped data, the result may contain zeros around the edges, which can be removed by cropping the edges by a specified number of pixels
default: "0"
Key
visibility: The visibility level of the parameter
dtype: The type of data
description: A short explanation of the parameter
default: The default value
options: A list of permitted values
dependency: The name of the parameter and value which this parameter depends upon
range: A guide for the range of the parameter
Citations
Radial lens distortion correction with sub-pixel accuracy for X-ray micro-tomography by Vo, Nghia T et al.
Bibtex
@article{vo2015radial,
title={Radial lens distortion correction with sub-pixel accuracy for X-ray micro-tomography},
author={Vo, Nghia T and Atwood, Robert C and Drakopoulos, Michael},
journal={Optics express},
volume={23},
number={25},
pages={32859--32868},
year={2015},
publisher={Optical Society of America}
}
Endnote
%0 Journal Article
%T Radial lens distortion correction with sub-pixel accuracy for X-ray micro-tomography
%A Vo, Nghia T
%A Atwood, Robert C
%A Drakopoulos, Michael
%J Optics express
%V 23
%N 25
%P 32859-32868
%@ 1094-4087
%D 2015
%I Optical Society of America
API
-
class
DistortionCorrection
[source] -
executive_summary
()[source] Provide a summary to the user for the result of the plugin.
- e.g.
Warning, the sample may have shifted during data collection
Filter operated normally
- Returns
A list of string summaries
-
load_metadata_txt
(file_path)[source] Load distortion coefficients from a text file. Order of the infor in the text file: xcenter ycenter factor_0 factor_1 factor_2 …
- Parameters
file_path (str) – Path to the file
- Returns
Tuple of (xcenter, ycenter, list_fact).
- Return type
tuple of float and list of floats
-
pre_process
()[source] This method is called immediately after base_pre_process().
-
process_frames
(data)[source] This method is called after the plugin has been created by the pipeline framework and forms the main processing step
- Parameters
data (list(np.array)) – A list of numpy arrays for each input dataset.
-
setup
()[source] This method is first to be called after the plugin has been created. It determines input/output datasets and plugin specific dataset information such as the pattern (e.g. sinogram/projection).
-