using HalconDotNet;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;
using Community;
using System.Windows;
using System.IO;
using System.Collections.ObjectModel;
using Model.Vision;
namespace ViewModel.Vision
{
///
/// OCR_VM
///
partial class HalconVisual
{
#region 各种方法
///
/// 创建图像校正模型
///
public DelegateCommand CreateImageCorrectionModelCommand { get; set; }
///
/// 图像校正测试
///
public DelegateCommand ImageCorrectionTestCommand { get; set; }
///
/// 新增OCR roi
///
public DelegateCommand AddOcrRoiCommand { get; set; }
///
/// 保存OCR roi
///
public DelegateCommand SaveOcrRoiCommand { get; set; }
///
/// 字体训练
///
public DelegateCommand FontTrainingCommand { get; set; }
///
/// OCR字符读取识别测试
///
public DelegateCommand OcrReadTestCommand { get; set; }
#endregion
#region 校正后的图像
///
/// 校正后的图像
///
HObject CorrectingImage;
#endregion
#region 选中的Ocr ROI
private V_ROI selectOcrRoi;
///
/// 选中的Ocr ROI
///
public V_ROI SelectOcrRoi
{
get { return selectOcrRoi; }
set
{
selectOcrRoi = value;
this.RaisePropertyChanged("SelectOcrRoi");
}
}
#endregion
#region OCR相关初始化
///
/// OCR相关初始化
///
public void V_OcrVMInitialization()
{
CreateImageCorrectionModelCommand = new DelegateCommand();
CreateImageCorrectionModelCommand.ExecuteAction = new Action