XnaFanUtilGetDifferenceValue(Image, Image, Int32) Method
Gets a value indicating the percentage of difference between two images.
Namespace: DevCase.ThirdParty.XnaFanAssembly: DevCase.net48.ThirdParty.XnaFan (in DevCase.net48.ThirdParty.XnaFan.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static float GetDifferenceValue(
Image image1,
Image image2,
int threshold = 1
)
Public Shared Function GetDifferenceValue (
image1 As Image,
image2 As Image,
Optional threshold As Integer = 1
) As Single
Dim image1 As Image
Dim image2 As Image
Dim threshold As Integer
Dim returnValue As Single
returnValue = XnaFanUtil.GetDifferenceValue(image1,
image2, threshold)
public:
static float GetDifferenceValue(
Image^ image1,
Image^ image2,
int threshold = 1
)
static member GetDifferenceValue :
image1 : Image *
image2 : Image *
?threshold : int
(* Defaults:
let _threshold = defaultArg threshold 1
*)
-> float32
No code example is currently available or this language may not be supported.
- image1 Image
-
The first image to compare.
- image2 Image
-
The second image to compare.
- threshold Int32 (Optional)
-
A value, from 0 to 100, indicating how big a difference will be ignored.
Default value is 1.
Single
The resulting percentage value.
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}%",
GetDifferenceValue(img1, img2, threshold))
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.