StructuralSimilarityIndexMeasure class
Structural similarity index measure (SSIM) of two input images.
Contents
- Reference
Calculates the similarity of two input images using SSIM as described in the article "Image Quality Assessment: From Error Visibility to Structural Similarity" by Z. Wang, A. C. Bovik, H. R. Sheikh and E. P. Simoncelli, IEEE Transactions on Image Processing 2004.
Multi-channel images and 3D images are supported. In this case an SSIM value is calculated per channel, and the final SSIM value is the average of all channel SSIM values.
No image cropping is performed when calculating SSIM, out of bounds pixels in the Gaussian window are handled using mirrored repeat.
Inputs:
Outputs:
- 0: SSIM Image
- 1: FloatScalar, SSIM value
Base classes
- class ProcessObject
- Abstract base class for all process objects.
Public functions
- auto create(float maxValue, float minValue, Vector3i windowSize, Vector3f stdDev, float k1, float k2) const -> std::shared_ptr<StructuralSimilarityIndexMeasure>
- Create instance.
- void setStandardDeviation(Vector3f stdDev)
- Set standard deviation of Gaussian window.
- void setWindowSize(Vector3i size)
- Set size (in pixels) of Gaussian window.
Private functions
- void execute() override
Function documentation
std::shared_ptr<StructuralSimilarityIndexMeasure> fast:: StructuralSimilarityIndexMeasure:: create(float maxValue,
float minValue,
Vector3i windowSize,
Vector3f stdDev,
float k1,
float k2) const
Create instance.
| Parameters | |
|---|---|
| maxValue | Maximum possible intensity value |
| minValue | Minimum possible intensity value |
| windowSize | Size of Gaussian window (in pixels) for each dimension |
| stdDev | Standard deviation of Gaussian window (in pixels) for each dimension |
| k1 | Algorithm constant |
| k2 | Algorithm constant |
| Returns | instance |
Get SSIM value from last run
void fast:: StructuralSimilarityIndexMeasure:: setStandardDeviation(Vector3f stdDev)
Set standard deviation of Gaussian window.
| Parameters | |
|---|---|
| stdDev | Standard deviation for each dimension |
void fast:: StructuralSimilarityIndexMeasure:: setWindowSize(Vector3i size)
Set size (in pixels) of Gaussian window.
| Parameters | |
|---|---|
| size | Size for each dimension |