-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rcmcpe
committed
Jul 12, 2020
1 parent
3816a3b
commit e463503
Showing
3 changed files
with
36 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using OpenCvSharp; | ||
|
||
namespace REVUnit.AutoArknights.Core | ||
{ | ||
public static class ScreenArea | ||
{ | ||
public static Rect2f CurrentSanity = new Rect2f(0.8776f, 0.025f, 0.1057f, 0.062f); | ||
public static Rect2f RequiredSanity = new Rect2f(0.9271f, 0.9426f, 0.0323f, 0.0296f); | ||
|
||
public static Mat Apply(this Rect2f area, Mat super) | ||
{ | ||
int w = super.Width; | ||
int h = super.Height; | ||
return super.Clone(new Rect((int) Math.Round(w * area.X), (int) Math.Round(h * area.Y), | ||
(int) Math.Round(w * area.Width), | ||
(int) Math.Round(h * area.Height))); | ||
} | ||
} | ||
} |