Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::CompareResult Struct Reference

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.

Detailed Description

Result of comparing two screenshots.

Member Function Documentation

◆ passes()

bool pulp::view::CompareResult::passes ( float threshold = kDefaultSimilarityThreshold) const
inline

Returns true if similarity is at or above the given threshold, which defaults to kDefaultSimilarityThreshold.

Member Data Documentation

◆ diff_pixels

uint32_t pulp::view::CompareResult::diff_pixels = 0

Pixels that differ beyond threshold.

◆ error

std::string pulp::view::CompareResult::error

Error message if comparison failed.

◆ mean_error

float pulp::view::CompareResult::mean_error = 0.0f

Mean per-channel error (0-255 scale).

◆ similarity

float pulp::view::CompareResult::similarity = 0.0f

0.0 = completely different, 1.0 = identical

◆ total_pixels

uint32_t pulp::view::CompareResult::total_pixels = 0

Total pixels compared.

◆ valid

bool pulp::view::CompareResult::valid = false

True if comparison completed successfully.


The documentation for this struct was generated from the following file: