Пример #1
0
 public VisualScriptElement(Bitmap img, List <Point> coords, string triggerKeyIdx, ImageCompareMethod method, double t)
 {
     Image          = img;
     Coords         = coords;
     TriggerKey     = triggerKeyIdx;
     CompareMethod  = method;
     ToleranceLevel = t;
 }
Пример #2
0
 public static bool ImageContains(Bitmap srcImg, Bitmap nestedImg, Point xy, ImageCompareMethod method, double t)
 {
     t = tolerance;
     if (method == ImageCompareMethod.COMPARE_PIXELS)
     {
         return(ImageRoughlyContains(srcImg, nestedImg, xy));
     }
     if (method == ImageCompareMethod.SCALED_COMPARE_PIXELS)
     {
         return(ImageRoughlyContainsScaled(srcImg, nestedImg, xy));
     }
     if (method == ImageCompareMethod.EMGU_CV)
     {
         return(CvImageContains(srcImg, nestedImg, xy));
     }
     return(false);
 }