XnaFanUtilGetDifferenceValue(String, String, 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(
string imageFilepath1,
string imageFilepath2,
int threshold = 1
)
Public Shared Function GetDifferenceValue (
imageFilepath1 As String,
imageFilepath2 As String,
Optional threshold As Integer = 1
) As Single
Dim imageFilepath1 As String
Dim imageFilepath2 As String
Dim threshold As Integer
Dim returnValue As Single
returnValue = XnaFanUtil.GetDifferenceValue(imageFilepath1,
imageFilepath2, threshold)
public:
static float GetDifferenceValue(
String^ imageFilepath1,
String^ imageFilepath2,
int threshold = 1
)
static member GetDifferenceValue :
imageFilepath1 : string *
imageFilepath2 : string *
?threshold : int
(* Defaults:
let _threshold = defaultArg threshold 1
*)
-> float32
No code example is currently available or this language may not be supported.
- imageFilepath1 String
-
The filepath of the first image to compare.
- imageFilepath2 String
-
The filepath of 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 = "C:\Image1.jpg"
Dim img2 As Image = "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.