public static bool IsEqual(this Rectangle objA, Rectangle objB, int threshold)
{
return (Math.Abs(objA.X - objB.X) < threshold) &&
(Math.Abs(objA.Y - objB.Y) < threshold) &&
(Math.Abs(objA.Width - objB.Width) < threshold) &&
(Math.Abs(objA.Height - objB.Height) < threshold);
}