Bläddra i källkod

V2.0.6A 尺寸打标bug修复

TongWei
CPL 2 år sedan
förälder
incheckning
cff669750e
2 ändrade filer med 19 tillägg och 3 borttagningar
  1. +15
    -3
      halftoneproject-master/BanBoShi/ImageProcessing/SizeLib.cs
  2. +4
    -0
      halftoneproject-master/BanBoShi/SysCtrl/SysMgr.cs

+ 15
- 3
halftoneproject-master/BanBoShi/ImageProcessing/SizeLib.cs Visa fil

@@ -273,18 +273,30 @@ namespace MaiMuAOI.ImageProcessing
try
{
step = 6;
var posePT = ProcCall1_PI_PT.GetOutputCtrlParamTuple("posePT").DArr;
double[] posePTarr;
try
{
if (ProcCall1_PI_PT.GetOutputCtrlParamTuple("posePT") != null &&
ProcCall1_PI_PT.GetOutputCtrlParamTuple("posePT").DArr != null)
posePTarr = ProcCall1_PI_PT.GetOutputCtrlParamTuple("posePT").DArr;
else
posePTarr = null;
}
catch {
posePTarr = null;
}
step = 7;
//Yolo_Class yolo = new Yolo_Class();
step = 8;
var mat = CamDev.HImageToMat(image);
step = 9;
//task.SaveMat = yolo.DisplayLines(mat, posePT, task.index).Clone();
task.SaveMat = yolo5.DisplayLines(mat, posePT, task.index);
task.SaveMat = yolo5.DisplayLines(mat, posePTarr, task.index);
}
catch (Exception ex)
{
//WarningEvent?.Invoke(WarningEnum.Low, $"SizeLib task err({step}) index({task.index}):" + ex.Message);
WarningEvent?.Invoke(WarningEnum.Low, $"SizeLib task err({step}) index({task.index}):" + ex.Message);
task.SaveMat = null;
}
}


+ 4
- 0
halftoneproject-master/BanBoShi/SysCtrl/SysMgr.cs Visa fil

@@ -8173,7 +8173,11 @@ namespace MaiMuAOI.SysCtrl
path = Util.CreateSubDir(confMgr.SysConfigParams.SizeBigImag.SavePath, new List<string> { order.CreateTime.ToString("yyyyMMdd"), order.SN });
path += $"Size_SN{order.SN}_I{res.index}_X{res.posX}_Y{res.posY}_{model.StepInfo.Name}";
if (res.SaveMat != null)
{
//显示
//OnAutoRuning(new RunEventArgs(0, res.SaveMat));
res.SaveMat.ImWrite(path + "_DB.bmp");
}
}
}


Laddar…
Avbryt
Spara