using Maxwell.SemiFramework.DefaultConfig.Vision;
using MwFramework.Device.Model;
using SemiconductorVisionAlgorithm.SemiParams;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MainShell.Vision.Common
{
    public static class CameraImageTypeConverter
    {
        public static SemiconductorVisionAlgorithm.SemiParams.Camera ToSemiCamera(this CameraData image)
        {
            Camera camera = new Camera();
            if (image != null)
            {
                camera.Ptr = ImageHelper.GetImageHandle(image);
                camera.Height = (int)image.Height;
                camera.Width = (int)image.Width;
            }
            return camera;
        }
    }
}
