Analyzers#
This document explains the analyzers defined in finitedepth.
For other types of analyzer, refer to the manual of the corresponding plugin.
CoatingImage#
- finitedepth.coatingimage_analyzer(name, data)[source]#
Image analysis for a single image of coated substrate.
Coating layer is analyzed by constructing
CoatingLayerBaseimplementation.The analyzer defines the following fields in configuration entry:
- referencePath (str): Path to the reference image file.
Image is converted to binary by Otsu’s thresholding.
- targetPath (str): Path to the target image file.
Image is converted to binary by Otsu’s thresholding.
- reference, substrate, layer (mapping, optional):
type (str, optional): Registered class constructor. The constructors are found from entry point groups ‘finitedepth.(references|substrates|coatinglayers)’.
parameters (mapping, optional): Any additional parameter for class constructor.
draw (mapping, optional): Parameters for
draw().
- output (mapping, optional):
(reference|substrate|layer)Data (str, optional): Path to the output CSV file containing analysis result. The results are acquired from
analyze(). Invalid coating layer gives empty data.(reference|substrate|layer)Image (str, optional): Path to the output image file containing visualization result. The results are acquired from
draw().
The default constructors used when type is not specified are
Reference,Substrate, andCoatingLayer.The following is the example for an entry in YAML configuration file:
foo: type: CoatingImage referencePath: foo-ref.png targetPath: foo-target.png reference: parameters: templateROI: [10, 10, 1250, 200] substrateROI: [100, 100, 1200, 500] layer: draw: layer_color: [0, 255, 0] output: layerImage: output/foo.jpg layerData: output/foo.csv
CoatingVideo#
- finitedepth.coatingvideo_analyzer(name, data)[source]#
Image analysis for coated substrate video.
Coating layer is analyzed by constructing
CoatingLayerBaseimplementation. The analyzer defines the following fields in configuration entry:- referencePath (str): Path to the reference image file.
Image is converted to binary by Otsu’s thresholding.
- targetPath (str): Path to the target video file.
Frames are converted to binary by Otsu’s thresholding.
- reference, substrate, layer (mapping, optional):
type (str, optional): Registered class constructor. The constructors are found from entry point groups ‘finitedepth.(references|substrates|coatinglayers)’.
parameters (mapping, optional): Any additional parameter for class constructor.
draw (mapping, optional): Parameters for
draw().
- output (mapping, optional):
(reference|substrate|layer)Data (str, optional): Path to the output CSV file containing analysis result. The results are acquired from
analyze(). Invalid coating layer gives empty data.(reference|substrate)Image (str, optional): Path to the output image file containing visualization result. The results are acquired from
draw().layerVideo (str, optional): Path to the output video file containing visualization result. The frames are acquired from
draw(). The codec is set to be the same as the target video file.
The default constructors used when type is not specified are
Reference,Substrate, andCoatingLayer.The following is the example for an entry in YAML configuration file:
foo: type: CoatingImage referencePath: foo-ref.png targetPath: foo-target.mp4 reference: parameters: templateROI: [10, 10, 1250, 200] substrateROI: [100, 100, 1200, 500] layer: draw: layer_color: [0, 255, 0] output: layerVideo: output/foo.mp4 layerData: output/foo.csv