using MainShell.Models;
using System.Threading;
using System.Threading.Tasks;

namespace MainShell.Vision
{
    /// <summary>
    /// 模板匹配服务接口。
    /// </summary>
    public interface IFindTemplateService
    {
        /// <summary>
        /// 采集图像并执行单个模板匹配。
        /// </summary>
        Task<VisionProcessResult<FindTemplateResult>> ProcessAsync(
            FindTemplateRequest request,
            CancellationToken cancellationToken = default(CancellationToken));

        /// <summary>
        /// 对已有图像直接执行单个模板匹配。
        /// </summary>
        Task<VisionProcessResult<FindTemplateResult>> ProcessImageAsync(
            MxImage image,
            FindTemplateImageRequest request,
            CancellationToken cancellationToken = default(CancellationToken));

        /// <summary>
        /// 采集图像并执行多个模板匹配。
        /// </summary>
        Task<VisionProcessResult<FindTemplatesResult>> ProcessMultipleAsync(
            FindTemplateRequest request,
            CancellationToken cancellationToken = default(CancellationToken));

        /// <summary>
        /// 对已有图像直接执行多个模板匹配。
        /// </summary>
        Task<VisionProcessResult<FindTemplatesResult>> ProcessMultipleImageAsync(
            MxImage image,
            FindTemplateImageRequest request,
            CancellationToken cancellationToken = default(CancellationToken));
    }
}
