| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Orientation = RichCreator.Utility.Structs.Orientation; |
| | | using RichCreator.Utility.Captures; |
| | | |
| | | namespace RichCreator.Utility.CV |
| | | { |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 是否在指定颜色在区域内 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static bool RectExistsArray(ZTRectangle rect,ColorArray colorArray) |
| | | { |
| | | ZTRectangle colorRect = ZTRectangle.Empty; |
| | | return RectExistsArray(out colorRect, rect, colorArray); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 是否在指定颜色在区域内 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static bool RectExistsArray(out ZTRectangle arrayRect,ZTRectangle rect, ColorArray colorArray) |
| | | { |
| | | |
| | | //截图 |
| | | System.Drawing.Bitmap bitmap = ScreenCapture.Instance.CaptureScreen(); |
| | | Image<Rgb, byte> image = new Image<Rgb, byte>(bitmap); |
| | | |
| | | //查找地图右上边是否存在时空之门文字 |
| | | if (CVHelper.FindColorArray(out arrayRect, image, colorArray, rect)) |
| | | { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | } |
| | | } |