ButteraugliDistance Struct
The Butteraugli distance between two frames (ImageSimilarity.ComputeButteraugliDistance): the two values that libjxl's butteraugli_main prints.
public readonly struct ButteraugliDistance : IEquatable<ButteraugliDistance>- Implements
Constructors
| Name | Description |
|---|---|
| ButteraugliDistance(double, double) | Initializes a new instance of the ButteraugliDistance struct. |
ButteraugliDistance(double, double)
ButteraugliDistance.csInitializes a new instance of the ButteraugliDistance struct.
Properties
| Name | Description |
|---|---|
| MaxDistance | Gets the largest distance of the map, the value usually called "the Butteraugli distance": 0 for identical pixels, below about 1 when the difference is not visible, and larger values for more visible differences. |
| PNorm3 | Gets the 3-norm of the map (the mean of its 3-, 6- and 12-norms): a summary of the whole frame, smaller than ButteraugliDistance.MaxDistance, that a localized difference raises less. |
MaxDistance
ButteraugliDistance.csGets the largest distance of the map, the value usually called "the Butteraugli distance": 0 for identical pixels, below about 1 when the difference is not visible, and larger values for more visible differences.
public double MaxDistance { get; }Property value
Remarks
It is the distance of the worst pixel, so a difference confined to a small area weighs fully.
PNorm3
ButteraugliDistance.csGets the 3-norm of the map (the mean of its 3-, 6- and 12-norms): a summary of the whole frame, smaller than ButteraugliDistance.MaxDistance, that a localized difference raises less.
public double PNorm3 { get; }Property value
Methods
| Name | Description |
|---|---|
| Equals(ButteraugliDistance) | Indicates whether the current object is equal to another object of the same type. |
| Equals(object?) | Indicates whether this instance and a specified object are equal. |
| GetHashCode() | Returns the hash code for this instance. |
| ToString() | Returns the distance formatted as {MaxDistance} (3-norm: {PNorm3}). |
Equals overloads
Equals(ButteraugliDistance)
ButteraugliDistance.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(ButteraugliDistance other)Parameters
otherButteraugliDistance- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.
Equals(object?)
ButteraugliDistance.csGetHashCode()
ButteraugliDistance.csToString()
ButteraugliDistance.csOperators
| Name | Description |
|---|---|
| operator ==(ButteraugliDistance, ButteraugliDistance) | Compares two distances for equality. |
| operator !=(ButteraugliDistance, ButteraugliDistance) | Compares two distances for inequality. |
operator ==(ButteraugliDistance, ButteraugliDistance)
ButteraugliDistance.csCompares two distances for equality.
public static bool operator ==(ButteraugliDistance left, ButteraugliDistance right)Parameters
leftButteraugliDistance- The first distance.
rightButteraugliDistance- The second distance.
Returns
bool true if both distances are equal; otherwise false.
operator !=(ButteraugliDistance, ButteraugliDistance)
ButteraugliDistance.csCompares two distances for inequality.
public static bool operator !=(ButteraugliDistance left, ButteraugliDistance right)Parameters
leftButteraugliDistance- The first distance.
rightButteraugliDistance- The second distance.
Returns
bool true if the distances differ; otherwise false.