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< DiffRegion > | significant_regions |
| std::string | error_message |
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.
| 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.
| 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.
| bool yaze::test::VisualDiffResult::identical = false |
Definition at line 21 of file visual_diff_engine.h.
Referenced by yaze::test::VisualDiffEngine::CompareImpl(), yaze::test::VisualDiffEngine::ComparePixelExact(), Format(), and ToJson().
| 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().
| float yaze::test::VisualDiffResult::similarity = 0.0f |
Definition at line 23 of file visual_diff_engine.h.
Referenced by yaze::test::VisualDiffEngine::CompareImpl(), yaze::test::VisualDiffEngine::ComparePixelExact(), yaze::test::VisualDiffEngine::CompareSSIM(), Format(), and ToJson().
| float yaze::test::VisualDiffResult::difference_pct = 0.0f |
Definition at line 24 of file visual_diff_engine.h.
Referenced by yaze::test::VisualDiffEngine::ComparePixelExact(), Format(), and ToJson().
| int yaze::test::VisualDiffResult::width = 0 |
Definition at line 27 of file visual_diff_engine.h.
Referenced by yaze::test::VisualDiffEngine::CompareImpl(), yaze::test::VisualDiffEngine::ComparePixelExact(), Format(), and ToJson().
| int yaze::test::VisualDiffResult::height = 0 |
Definition at line 28 of file visual_diff_engine.h.
Referenced by yaze::test::VisualDiffEngine::CompareImpl(), yaze::test::VisualDiffEngine::ComparePixelExact(), Format(), and ToJson().
| int yaze::test::VisualDiffResult::total_pixels = 0 |
Definition at line 29 of file visual_diff_engine.h.
Referenced by yaze::test::VisualDiffEngine::ComparePixelExact(), Format(), and ToJson().
| int yaze::test::VisualDiffResult::differing_pixels = 0 |
Definition at line 30 of file visual_diff_engine.h.
Referenced by yaze::test::VisualDiffEngine::ComparePixelExact(), Format(), and ToJson().
| std::vector<uint8_t> yaze::test::VisualDiffResult::diff_image_png |
Definition at line 33 of file visual_diff_engine.h.
Referenced by yaze::test::VisualDiffEngine::CompareImpl(), Format(), yaze::test::VisualDiffEngine::GenerateDiffPng(), yaze::test::VisualDiffEngine::SaveDiffImage(), and ToJson().
| 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().
| 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().
| 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().