![]() |
IDS peak IPL v1.14.0
|
Configure and measure the sharpness of a given image. More...
#include <peak_ipl/algorithm/peak_ipl_sharpness.hpp>
Classes | |
| struct | SharpnessROI |
Public Types | |
| enum class | SharpnessAlgorithm : uint16_t { Tenengrad , MeanScore , HistogramVariance , Sobel } |
| Measure Algorithms. More... | |
| enum class | SharpnessROIWeight : uint16_t { Weak = 0x0021 , Medium = 0x0042 , Strong = 0x0063 } |
| using | SharpnessROIList = std::vector< SharpnessROI > |
Public Member Functions | |
| Sharpness () | |
| Constructor for a new Sharpness instance. | |
| ~Sharpness () | |
| Destructor for the Sharpness instance. | |
| Sharpness (const Sharpness &other) | |
| Copy Constructor for a new Sharpness instance. | |
| Sharpness & | operator= (const Sharpness &other) |
| Copy assigment for Sharpness instance. | |
| Sharpness (Sharpness &&other) noexcept | |
| Move constructor for Sharpness instance. | |
| Sharpness & | operator= (Sharpness &&other) noexcept |
| Move assignment for Sharpness instance. | |
| double | Measure (const Image &image) |
| Measures the sharpness of the given image. The higher the value, the better the sharpness. | |
| bool | IsPixelFormatSupported (PixelFormatName pixelFormatName) const |
| Checks if the given pixel format can be used for sharpness measurement. | |
| std::vector< PixelFormatName > | SupportedPixelFormats () const |
| Returns a list of supported pixel formats which can be used for sharpness measurement. | |
| void | SetAlgorithm (SharpnessAlgorithm algorithm) |
| Sets the algorithm used for measurement calculation. | |
| SharpnessAlgorithm | Algorithm () const |
| Returns the used algorithm for the sharpness measurement. | |
| Size2D | ROIMinSize () const |
| Gets the minimum size of a ROI, in which the sharpness is measured. | |
| void | SetROIs (const SharpnessROIList &rois) |
| Sets the region of interests in which the sharpness is measured. | |
| void | SetROI (const SharpnessROI &roi) |
| Set ROI in which the sharpness is measured. | |
| void | SetROI (const Rect2D &roi) |
| Set ROI in which the sharpness is measured. | |
| SharpnessROIList | ROIs () const |
| Gets ROIs in which the sharpness is measured. | |
Configure and measure the sharpness of a given image.
The class allows the measurement of the sharpness in a defined ROI of the given image. To get a sharpness value, the edges in the image are evaluated. The sharpness can only be indicated as a relative value, as it depends on the edges in the current image. An image with fewer edges won't reach the sharpness value of an image with a lot of edges.
| using peak::ipl::Sharpness::SharpnessROIList = std::vector<SharpnessROI> |
|
strong |
|
strong |
|
inline |
|
inline |
|
inline |
Copy Constructor for a new Sharpness instance.
Creates a new Sharpness instance.
| [in] | other | The other instance to acquire a reference for. |
|
inlinenoexcept |
Move constructor for Sharpness instance.
Moves the instance from other to this. Afterwards other is invalid.
| [in] | other | The other instance to move. |
|
inline |
Returns the used algorithm for the sharpness measurement.
|
inline |
Checks if the given pixel format can be used for sharpness measurement.
| [in] | pixelFormatName | The pixelFormat of the input image. |
|
inline |
Measures the sharpness of the given image. The higher the value, the better the sharpness.
| [in] | image | The image to measure the relative sharpness. |
| InvalidPixelFormat | pixel format isn't supported. |
Copy assigment for Sharpness instance.
Acquires a reference from other to this instance. If this instance already has a reference, it will be destroyed.
| [in] | other | The other instance to acquire a reference for. |
Move assignment for Sharpness instance.
Moves the instance from other to this. Afterwards other is invalid.
| [in] | other | The other instance to move. |
|
inline |
Gets the minimum size of a ROI, in which the sharpness is measured.
|
inline |
Gets ROIs in which the sharpness is measured.
|
inline |
Sets the algorithm used for measurement calculation.
|
inline |
|
inline |
|
inline |
Sets the region of interests in which the sharpness is measured.
| [in] | rois | SharpnessROIList to set. |
|
inline |
Returns a list of supported pixel formats which can be used for sharpness measurement.