yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::test::VisualDiffResult Struct Reference

Result of visual comparison with diff image. More...

#include <visual_diff_engine.h>

Classes

struct  DiffRegion
 

Public Member Functions

std::string Format () const
 Format result for human-readable output.
 
std::string ToJson () const
 Serialize to JSON for MCP tool output.
 

Public Attributes

bool identical = false
 
bool passed = false
 
float similarity = 0.0f
 
float difference_pct = 0.0f
 
int width = 0
 
int height = 0
 
int total_pixels = 0
 
int differing_pixels = 0
 
std::vector< uint8_t > diff_image_png
 
std::string diff_description
 
std::vector< DiffRegionsignificant_regions
 
std::string error_message
 

Detailed Description

Result of visual comparison with diff image.

Designed for gRPC serialization and MCP tool output.

Definition at line 20 of file visual_diff_engine.h.

Member Function Documentation

◆ Format()

std::string yaze::test::VisualDiffResult::Format ( ) const

Format result for human-readable output.

Definition at line 59 of file visual_diff_engine.cc.

References diff_description, diff_image_png, difference_pct, differing_pixels, error_message, height, identical, passed, significant_regions, similarity, total_pixels, and width.

◆ ToJson()

std::string yaze::test::VisualDiffResult::ToJson ( ) const

Serialize to JSON for MCP tool output.

Definition at line 97 of file visual_diff_engine.cc.

References diff_image_png, difference_pct, differing_pixels, error_message, height, identical, passed, significant_regions, similarity, total_pixels, and width.

Member Data Documentation

◆ identical

bool yaze::test::VisualDiffResult::identical = false

◆ passed

bool yaze::test::VisualDiffResult::passed = false

Definition at line 22 of file visual_diff_engine.h.

Referenced by yaze::test::VisualDiffEngine::CompareImpl(), Format(), and ToJson().

◆ similarity

◆ difference_pct

float yaze::test::VisualDiffResult::difference_pct = 0.0f

◆ width

int yaze::test::VisualDiffResult::width = 0

◆ height

int yaze::test::VisualDiffResult::height = 0

◆ total_pixels

int yaze::test::VisualDiffResult::total_pixels = 0

◆ differing_pixels

int yaze::test::VisualDiffResult::differing_pixels = 0

◆ diff_image_png

std::vector<uint8_t> yaze::test::VisualDiffResult::diff_image_png

◆ diff_description

std::string yaze::test::VisualDiffResult::diff_description

Definition at line 34 of file visual_diff_engine.h.

Referenced by yaze::test::VisualDiffEngine::CompareImpl(), and Format().

◆ significant_regions

std::vector<DiffRegion> yaze::test::VisualDiffResult::significant_regions

Definition at line 44 of file visual_diff_engine.h.

Referenced by yaze::test::VisualDiffEngine::CompareImpl(), Format(), and ToJson().

◆ error_message

std::string yaze::test::VisualDiffResult::error_message

Definition at line 47 of file visual_diff_engine.h.

Referenced by yaze::test::VisualDiffEngine::CompareImpl(), Format(), and ToJson().


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