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

Basic content statistics for a decoded PNG. More...

#include <screenshot_compare.hpp>

Public Member Functions

bool passes_content_floor (uint32_t min_unique_colors=16, double min_luminance_stddev=1.0, double min_non_background_coverage=0.05, double min_opaque_coverage=0.95) const

Public Attributes

bool valid = false
uint32_t width = 0
uint32_t height = 0
uint32_t total_pixels = 0
uint32_t unique_colors = 0
 Exact count unless unique_colors_capped is true.
bool unique_colors_capped = false
double luminance_mean = 0.0
double luminance_stddev = 0.0
double alpha_mean = 0.0
double opaque_coverage = 0.0
double non_background_coverage = 0.0
 Fraction of pixels that differ from the dominant background color.
std::string error

Detailed Description

Basic content statistics for a decoded PNG.

This is intentionally separate from visual similarity: two screenshots can be byte-identical and still be useless if they are stable empty frames.

Member Function Documentation

◆ passes_content_floor()

bool pulp::view::ScreenshotContentStats::passes_content_floor ( uint32_t min_unique_colors = 16,
double min_luminance_stddev = 1.0,
double min_non_background_coverage = 0.05,
double min_opaque_coverage = 0.95 ) const
inline

Member Data Documentation

◆ alpha_mean

double pulp::view::ScreenshotContentStats::alpha_mean = 0.0

◆ error

std::string pulp::view::ScreenshotContentStats::error

◆ height

uint32_t pulp::view::ScreenshotContentStats::height = 0

◆ luminance_mean

double pulp::view::ScreenshotContentStats::luminance_mean = 0.0

◆ luminance_stddev

double pulp::view::ScreenshotContentStats::luminance_stddev = 0.0

◆ non_background_coverage

double pulp::view::ScreenshotContentStats::non_background_coverage = 0.0

Fraction of pixels that differ from the dominant background color.

This is exact unless unique_colors_capped is true, where it is still useful as an empty-frame floor but not a precise coverage metric.

◆ opaque_coverage

double pulp::view::ScreenshotContentStats::opaque_coverage = 0.0

◆ total_pixels

uint32_t pulp::view::ScreenshotContentStats::total_pixels = 0

◆ unique_colors

uint32_t pulp::view::ScreenshotContentStats::unique_colors = 0

Exact count unless unique_colors_capped is true.

◆ unique_colors_capped

bool pulp::view::ScreenshotContentStats::unique_colors_capped = false

◆ valid

bool pulp::view::ScreenshotContentStats::valid = false

◆ width

uint32_t pulp::view::ScreenshotContentStats::width = 0

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