Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.6.0 more image compare options and bugfix #50

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "A flexible rule-based file and folder comparison tool and crate i
repository = "https://github.com/VolumeGraphics/havocompare"
homepage = "https://github.com/VolumeGraphics/havocompare"
documentation = "https://docs.rs/havocompare"
version = "0.5.4"
version = "0.6.0"
edition = "2021"
license = "MIT"
authors = ["Volume Graphics GmbH"]
Expand Down
153 changes: 153 additions & 0 deletions config_scheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,50 @@
}
}
},
"GrayCompareMode": {
"oneOf": [
{
"type": "object",
"required": [
"Structure"
],
"properties": {
"Structure": {
"$ref": "#/definitions/GrayStructureAlgorithm"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"Histogram"
],
"properties": {
"Histogram": {
"$ref": "#/definitions/GrayHistogramCompareMetric"
}
},
"additionalProperties": false
}
]
},
"GrayHistogramCompareMetric": {
"type": "string",
"enum": [
"Correlation",
"ChiSquare",
"Intersection",
"Hellinger"
]
},
"GrayStructureAlgorithm": {
"type": "string",
"enum": [
"MSSIM",
"RMS"
]
},
"HTMLCompareConfig": {
"description": "Plain text comparison config, also used for PDF",
"type": "object",
Expand Down Expand Up @@ -137,6 +181,44 @@
"ImageCompareConfig": {
"description": "Image comparison config options",
"type": "object",
"oneOf": [
{
"type": "object",
"required": [
"RGB"
],
"properties": {
"RGB": {
"$ref": "#/definitions/RGBCompareMode"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"RGBA"
],
"properties": {
"RGBA": {
"$ref": "#/definitions/RGBACompareMode"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"Gray"
],
"properties": {
"Gray": {
"$ref": "#/definitions/GrayCompareMode"
}
},
"additionalProperties": false
}
],
"required": [
"threshold"
],
Expand Down Expand Up @@ -392,6 +474,77 @@
}
}
},
"RGBACompareMode": {
"oneOf": [
{
"description": "full RGBA comparison - probably not intuitive, rarely what you want outside of video processing Will do MSSIM on luma, then RMS on U and V and alpha channels. The calculation of the score is then pixel-wise the minimum of each pixels similarity. To account for perceived indifference in lower alpha regions, this down-weights the difference linearly with mean alpha channel.",
"type": "string",
"enum": [
"Hybrid"
]
},
{
"description": "pre-blend the background in RGBA with this color, use the background RGB values you would assume the pictures to be seen on - usually either black or white",
"type": "object",
"required": [
"HybridBlended"
],
"properties": {
"HybridBlended": {
"type": "object",
"required": [
"b",
"g",
"r"
],
"properties": {
"b": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
},
"g": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
},
"r": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
}
]
},
"RGBCompareMode": {
"oneOf": [
{
"description": "Comparing rgb images using structure. RGB structure similarity is performed by doing a channel split and taking the maximum deviation (minimum similarity) for the result. The image contains the complete deviations. Algorithm: RMS",
"type": "string",
"enum": [
"RMS"
]
},
{
"description": "Comparing rgb images using structure. RGB structure similarity is performed by doing a channel split and taking the maximum deviation (minimum similarity) for the result. The image contains the complete deviations. Algorithm: MSSIM",
"type": "string",
"enum": [
"MSSIM"
]
},
{
"description": "Comparing structure via MSSIM on Y channel, comparing color-diff-vectors on U and V summing the squares Please mind that the RGBSimilarity-Image does not contain plain RGB here. Probably what you want.",
"type": "string",
"enum": [
"Hybrid"
]
}
]
},
"Rule": {
"description": "Representing a single comparison rule",
"type": "object",
Expand Down
Loading
Loading