23 lines
613 B
C#
23 lines
613 B
C#
using Aurora.Api.DataType;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace VisionCommon {
|
|
public class RoiUtil {
|
|
public const int FindRoiMargin = 50;
|
|
|
|
public static ROI GetDefaultFindRoi(ImageSize imageSize) {
|
|
var imageCenter = new ImagePoint(
|
|
imageSize.Width * 0.5,
|
|
imageSize.Height * 0.5);
|
|
|
|
return new ROI(
|
|
imageCenter,
|
|
imageSize.Width - FindRoiMargin,
|
|
imageSize.Height - FindRoiMargin);
|
|
}
|
|
}
|
|
} |