UtilImageGetPercentageDifference(Image, Image, Byte) Method
Gets a value indicating the percentage of difference between two images.
Namespace: DevCase.Core.Media.GraphicsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static float GetPercentageDifference(
Image img1,
Image img2,
byte threshold
)
Public Shared Function GetPercentageDifference (
img1 As Image,
img2 As Image,
threshold As Byte
) As Single
Dim img1 As Image
Dim img2 As Image
Dim threshold As Byte
Dim returnValue As Single
returnValue = UtilImage.GetPercentageDifference(img1,
img2, threshold)
public:
static float GetPercentageDifference(
Image^ img1,
Image^ img2,
unsigned char threshold
)
static member GetPercentageDifference :
img1 : Image *
img2 : Image *
threshold : byte -> float32
No code example is currently available or this language may not be supported.
- img1 Image
-
The first image to compare.
- img2 Image
-
The second image to compare with img1.
- threshold Byte
-
A value from 0 to 255 indicating how big a difference will be ignored.
Single
The resulting percentage difference value between the two specified images.
A value of 0 (zero) means the images are equal; a value of 1 (one) means the images are totally different.
This is a code example.
No code example is currently available or this language may not be supported.
Dim img1 As Image = Image.FromFile("C:\Image1.jpg")
Dim img2 As Image = Image.FromFile("C:\Image2.jpg")
Dim threshold As Integer = 1
Dim percentDiff As String =
String.Format("Percentage Difference: {0:0.00}%",
GetPercentageDifference(img1, img2, threshold) * 100)
MessageBox.Show(percentDiff)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.