Result of comparing two screenshots. More...
#include <screenshot_compare.hpp>
Public Member Functions | |
| bool | passes (float threshold=kDefaultSimilarityThreshold) const |
| Returns true if similarity is at or above the given threshold, which defaults to kDefaultSimilarityThreshold. | |
Public Attributes | |
| bool | valid = false |
| True if comparison completed successfully. | |
| float | similarity = 0.0f |
| 0.0 = completely different, 1.0 = identical | |
| uint32_t | total_pixels = 0 |
| Total pixels compared. | |
| uint32_t | diff_pixels = 0 |
| Pixels that differ beyond threshold. | |
| float | mean_error = 0.0f |
| Mean per-channel error (0-255 scale). | |
| std::string | error |
| Error message if comparison failed. | |
Result of comparing two screenshots.
|
inline |
Returns true if similarity is at or above the given threshold, which defaults to kDefaultSimilarityThreshold.
| uint32_t pulp::view::CompareResult::diff_pixels = 0 |
Pixels that differ beyond threshold.
| std::string pulp::view::CompareResult::error |
Error message if comparison failed.
| float pulp::view::CompareResult::mean_error = 0.0f |
Mean per-channel error (0-255 scale).
| float pulp::view::CompareResult::similarity = 0.0f |
0.0 = completely different, 1.0 = identical
| uint32_t pulp::view::CompareResult::total_pixels = 0 |
Total pixels compared.
| bool pulp::view::CompareResult::valid = false |
True if comparison completed successfully.