Selaa lähdekoodia

V2.0.6A 尺寸打标bug修复

TongWei
CPL 2 vuotta sitten
vanhempi
commit
cff669750e
2 muutettua tiedostoa jossa 19 lisäystä ja 3 poistoa
  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 Näytä tiedosto

@@ -273,18 +273,30 @@ namespace MaiMuAOI.ImageProcessing
try try
{ {
step = 6; 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; step = 7;
//Yolo_Class yolo = new Yolo_Class(); //Yolo_Class yolo = new Yolo_Class();
step = 8; step = 8;
var mat = CamDev.HImageToMat(image); var mat = CamDev.HImageToMat(image);
step = 9; step = 9;
//task.SaveMat = yolo.DisplayLines(mat, posePT, task.index).Clone(); //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) 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; task.SaveMat = null;
} }
} }


+ 4
- 0
halftoneproject-master/BanBoShi/SysCtrl/SysMgr.cs Näytä tiedosto

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


Ladataan…
Peruuta
Tallenna