|
|
@@ -106,6 +106,9 @@ namespace TeamAAS_VP.Services
|
|
|
/// </summary>
|
|
|
public event EventHandler<TimeSpan> CycleTimingTicked;
|
|
|
|
|
|
+ public float TempExposureTime = 0;
|
|
|
+ public float TempGain = 0;
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 构造函数,注入必要的系统服务。
|
|
|
/// </summary>
|
|
|
@@ -1715,7 +1718,7 @@ namespace TeamAAS_VP.Services
|
|
|
IsCompress = procedure.IsCompress,
|
|
|
ProceductName = procedure.Name,
|
|
|
ImageFileName = imgName,
|
|
|
- Is3DModel=true
|
|
|
+ Is3DModel = true
|
|
|
});
|
|
|
return true;
|
|
|
}
|
|
|
@@ -1777,7 +1780,7 @@ namespace TeamAAS_VP.Services
|
|
|
/// 执行相机拍照并运行 ToolBlock,返回是否成功并通过 out 参数返回 Outputs。
|
|
|
/// 该方法会发布 RenderUpdateNotification 以更新 UI。
|
|
|
/// </summary>
|
|
|
- public bool ExecutePhoto2(ProcedureModel procedure, Dictionary<string, string> InputTerminal, out CogToolBlockTerminalCollection outputCollection)
|
|
|
+ public bool ExecutePhoto2(ProcedureModel procedure, Dictionary<string, string> InputTerminal, out CogToolBlockTerminalCollection outputCollection)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
@@ -1811,7 +1814,7 @@ namespace TeamAAS_VP.Services
|
|
|
// 2. 为ToolBlock传入其他输入终端
|
|
|
if (InputTerminal != null)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
LogHelper.WriteLogInfo($"为ToolBlock传入输入终端");
|
|
|
foreach (var item in InputTerminal)
|
|
|
{
|
|
|
@@ -1880,7 +1883,7 @@ namespace TeamAAS_VP.Services
|
|
|
IsCompress = procedure.IsCompress,
|
|
|
ProceductName = procedure.Name,
|
|
|
ImageFileName = imgName,
|
|
|
- Is3DModel=false
|
|
|
+ Is3DModel = false
|
|
|
});
|
|
|
return true;
|
|
|
}
|
|
|
@@ -1922,7 +1925,7 @@ namespace TeamAAS_VP.Services
|
|
|
SavePath = procedure.SavePath,
|
|
|
ProceductName = procedure.Name,
|
|
|
ImageFileName = imgName,
|
|
|
- Is3DModel=false
|
|
|
+ Is3DModel = false
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
@@ -1939,17 +1942,17 @@ namespace TeamAAS_VP.Services
|
|
|
/// 执行相机拍照并运行 ToolBlock,返回是否成功并通过 out 参数返回 Outputs。
|
|
|
/// 该方法会发布 RenderUpdateNotification 以更新 UI。
|
|
|
/// </summary>
|
|
|
- public bool ExecutePhoto(ProcedureModel procedure,ICogImage[] imges,Dictionary<string, string> InputTerminal, out CogToolBlockTerminalCollection outputCollection,bool is3dmodel, float confThreshold = 0.25f, float iouThreshold = 0.45f)
|
|
|
+ public bool ExecutePhoto(ProcedureModel procedure, ICogImage[] imges, Dictionary<string, string> InputTerminal, out CogToolBlockTerminalCollection outputCollection, bool is3dmodel, float confThreshold = 0.25f, float iouThreshold = 0.45f)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
procedure.ToolBlock.Inputs["InputImage"].Value = imges[0];
|
|
|
- if(is3dmodel==true || imges.Length > 1)
|
|
|
+ if (is3dmodel == true || imges.Length > 1)
|
|
|
{
|
|
|
procedure.ToolBlock.Inputs["InputImage2"].Value = imges[1];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 2. 为ToolBlock传入其他输入终端
|
|
|
if (InputTerminal != null)
|
|
|
{
|
|
|
@@ -1974,11 +1977,14 @@ namespace TeamAAS_VP.Services
|
|
|
// photoAiValue 可能为 null/空,建议给个默认值
|
|
|
bool enablePhotoAi = photoAiValue == "1";
|
|
|
if (enablePhotoAi == true)
|
|
|
- {
|
|
|
+ {
|
|
|
string exeDir = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
|
|
|
|
|
- string modelPath = System.IO.Path.Combine(exeDir, "TrainPhoto", "weights", "best_openvino_model", "best.xml");
|
|
|
- string metadataPath = System.IO.Path.Combine(exeDir, "TrainPhoto", "weights", "best_openvino_model", "metadata.yaml");
|
|
|
+ string trainFolderName = string.IsNullOrWhiteSpace(procedure.CameraTrainFolder) ? "TrainPhoto" : procedure.CameraTrainFolder;
|
|
|
+ string trainRoot = System.IO.Path.Combine(exeDir, "Train", trainFolderName);
|
|
|
+
|
|
|
+ string modelPath = System.IO.Path.Combine(exeDir, trainRoot, "weights", "best_openvino_model", "best.xml");
|
|
|
+ string metadataPath = System.IO.Path.Combine(exeDir, trainRoot, "weights", "best_openvino_model", "metadata.yaml");
|
|
|
|
|
|
// (可选)如果你希望缺文件时给出更明确提示:
|
|
|
if (!File.Exists(modelPath))
|
|
|
@@ -1997,7 +2003,7 @@ namespace TeamAAS_VP.Services
|
|
|
{
|
|
|
var results = yolo.Infer(bitmap);
|
|
|
procedure.ToolBlock.Inputs["PhotoData"].Value = "";
|
|
|
- procedure.ToolBlock.Inputs["Confidence"].Value ="";
|
|
|
+ procedure.ToolBlock.Inputs["Confidence"].Value = "";
|
|
|
// 输出结果
|
|
|
SendTaskMessage($"识别的个数:{results.Count()}", MessageLevel.Alarm);
|
|
|
string ClassName = "";
|
|
|
@@ -2014,6 +2020,9 @@ namespace TeamAAS_VP.Services
|
|
|
// 绘制结果 - 使用 OpenCvSharp
|
|
|
using (var image2 = ImageHelper.ICogImageConvertMat(imges[0]))
|
|
|
{
|
|
|
+
|
|
|
+ var OriginyoloColorCogImage = ImageHelper.MatConvertICogImage(image2, true);
|
|
|
+
|
|
|
// 定义颜色映射
|
|
|
var colors = new[]
|
|
|
{
|
|
|
@@ -2078,14 +2087,17 @@ namespace TeamAAS_VP.Services
|
|
|
HersheyFonts.HersheySimplex, 0.6, Scalar.White, 2);
|
|
|
}
|
|
|
|
|
|
- // 保存结果图像
|
|
|
- //string outputPath = @"G:\TEST\文件\左上插线\result.jpg";
|
|
|
- //Cv2.ImWrite(outputPath, image2);
|
|
|
- //Console.WriteLine($"结果已保存到: {outputPath}");
|
|
|
- var cogImage = ImageHelper.MatConvertICogImage(image2);
|
|
|
- procedure.ToolBlock.Inputs["InputImage"].Value = cogImage;
|
|
|
+ // 关键:这里转成彩色 ICogImage
|
|
|
+ var yoloColorCogImage = ImageHelper.MatConvertICogImage(image2);
|
|
|
+
|
|
|
+ // 模板检测如果需要原图,可以用 imges[0]
|
|
|
+ // 如果你希望模板也拿 YOLO 画框图,就用 yoloColorCogImage
|
|
|
+ procedure.ToolBlock.Inputs["InputImage"].Value = yoloColorCogImage;
|
|
|
+
|
|
|
procedure.ToolBlock.Run();
|
|
|
- outputCollection = procedure.ToolBlock.Outputs; //获取输出终端集合
|
|
|
+
|
|
|
+ outputCollection = procedure.ToolBlock.Outputs;
|
|
|
+
|
|
|
ICogRecord record = null;
|
|
|
foreach (CogToolBlockTerminal item in outputCollection)
|
|
|
{
|
|
|
@@ -2094,6 +2106,7 @@ namespace TeamAAS_VP.Services
|
|
|
}
|
|
|
|
|
|
bool Found = (bool)(outputCollection["Found"].Value);
|
|
|
+
|
|
|
//获取图片存储的图片文件名
|
|
|
string imgName = string.Empty;
|
|
|
if (procedure.IsSaveImage && !string.IsNullOrEmpty(procedure.ImageFileNameFormat))
|
|
|
@@ -2111,11 +2124,36 @@ namespace TeamAAS_VP.Services
|
|
|
// 生成文件名
|
|
|
imgName = template.Generate();
|
|
|
}
|
|
|
+
|
|
|
+ _eventAggregator.GetEvent<RenderUpdateNotification>().Publish(new ShowRender()
|
|
|
+ {
|
|
|
+ Id = procedure.DisplayId,
|
|
|
+ DisplayName = procedure.DisplayName,
|
|
|
+
|
|
|
+ Image = OriginyoloColorCogImage,
|
|
|
+
|
|
|
+ Graphic = outputCollection["Graphic"].Value as CogGraphicCollection,
|
|
|
+ Record = record,
|
|
|
+ Result = Found,
|
|
|
+ IsShow = false,
|
|
|
+ IsSaveImage = procedure.IsSaveImage,
|
|
|
+ SaveImageModel = procedure.SaveImageModel,
|
|
|
+ SaveImagePathModel = procedure.SaveImagePathModel,
|
|
|
+ SavePath = procedure.SavePath,
|
|
|
+ IsCompress = procedure.IsCompress,
|
|
|
+ ProceductName = procedure.Name,
|
|
|
+ ImageFileName = imgName,
|
|
|
+ Is3DModel = is3dmodel,
|
|
|
+ });
|
|
|
+
|
|
|
_eventAggregator.GetEvent<RenderUpdateNotification>().Publish(new ShowRender()
|
|
|
{
|
|
|
Id = procedure.DisplayId,
|
|
|
DisplayName = procedure.DisplayName,
|
|
|
- Image = cogImage,
|
|
|
+
|
|
|
+ // 显示和保存用 YOLO 彩色图
|
|
|
+ Image = yoloColorCogImage,
|
|
|
+
|
|
|
Graphic = outputCollection["Graphic"].Value as CogGraphicCollection,
|
|
|
Record = record,
|
|
|
Result = Found,
|
|
|
@@ -2128,12 +2166,8 @@ namespace TeamAAS_VP.Services
|
|
|
ProceductName = procedure.Name,
|
|
|
ImageFileName = imgName,
|
|
|
Is3DModel = is3dmodel,
|
|
|
- //RangeImage = (CogImage16Range)procedure.ToolBlock.Outputs["RangeImage"].Value,
|
|
|
- //GreyImage = (CogImage16Grey)procedure.ToolBlock.Outputs["GreyImage"].Value
|
|
|
});
|
|
|
- // 可选:显示图像
|
|
|
- //Cv2.ImShow("Detection Result", image2);
|
|
|
- //Cv2.WaitKey(0);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -2199,8 +2233,8 @@ namespace TeamAAS_VP.Services
|
|
|
SavePath = procedure.SavePath,
|
|
|
IsCompress = procedure.IsCompress,
|
|
|
ProceductName = procedure.Name,
|
|
|
- ImageFileName = imgName+"image2",
|
|
|
- Is3DModel = is3dmodel,
|
|
|
+ ImageFileName = imgName + "image2",
|
|
|
+ Is3DModel = false,
|
|
|
});
|
|
|
}
|
|
|
_eventAggregator.GetEvent<RenderUpdateNotification>().Publish(new ShowRender()
|
|
|
@@ -2246,7 +2280,7 @@ namespace TeamAAS_VP.Services
|
|
|
IsCompress = procedure.IsCompress,
|
|
|
ProceductName = procedure.Name,
|
|
|
ImageFileName = imgName + "image2",
|
|
|
- Is3DModel = is3dmodel,
|
|
|
+ Is3DModel = false,
|
|
|
});
|
|
|
}
|
|
|
_eventAggregator.GetEvent<RenderUpdateNotification>().Publish(new ShowRender()
|
|
|
@@ -2293,7 +2327,7 @@ namespace TeamAAS_VP.Services
|
|
|
IsCompress = procedure.IsCompress,
|
|
|
ProceductName = procedure.Name,
|
|
|
ImageFileName = imgName + "image2",
|
|
|
- Is3DModel = is3dmodel,
|
|
|
+ Is3DModel = false,
|
|
|
});
|
|
|
}
|
|
|
_eventAggregator.GetEvent<RenderUpdateNotification>().Publish(new ShowRender()
|
|
|
@@ -2429,7 +2463,7 @@ namespace TeamAAS_VP.Services
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
@@ -2445,12 +2479,12 @@ namespace TeamAAS_VP.Services
|
|
|
/// </summary>
|
|
|
/// <param name="procedure"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task <(bool IsSucceed, ICogImage[] Image, string Msg)> ExecuteGrabImageAsync(ProcedureModel procedure,bool Is3dPhoto)
|
|
|
+ public async Task<(bool IsSucceed, ICogImage[] Image, string Msg)> ExecuteGrabImageAsync(ProcedureModel procedure, bool Is3dPhoto, SystemConfiguration sysConfig)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- var sysConfig = _configService.GetSystemConfiguration();
|
|
|
-
|
|
|
+ //var sysConfig = _configService.GetSystemConfiguration();
|
|
|
+
|
|
|
if (sysConfig.PhotosUse == true)
|
|
|
{
|
|
|
// 1. 采集图像
|
|
|
@@ -2562,6 +2596,7 @@ namespace TeamAAS_VP.Services
|
|
|
{
|
|
|
image = camera.Grab();
|
|
|
image2 = camera.Grab2();
|
|
|
+
|
|
|
LogHelper.WriteLogInfo($"采集图像完成;用时:{(DateTime.Now - nowtime).Milliseconds}ms");
|
|
|
if (image == null || image2 == null)
|
|
|
{
|
|
|
@@ -2573,15 +2608,15 @@ namespace TeamAAS_VP.Services
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
LogHelper.WriteLogInfo($"采集图像完成;用时:{(DateTime.Now - nowtime).Milliseconds}ms");
|
|
|
- if (image == null )
|
|
|
+ if (image == null)
|
|
|
{
|
|
|
|
|
|
SendTaskMessage(Lang.图像采集失败, MessageLevel.Error);
|
|
|
return (false, null, "图像采集失败");
|
|
|
}
|
|
|
- if(procedure.PhotoCount>1)
|
|
|
+ if (procedure.PhotoCount > 1)
|
|
|
{
|
|
|
if (image2 == null)
|
|
|
{
|
|
|
@@ -2591,7 +2626,7 @@ namespace TeamAAS_VP.Services
|
|
|
}
|
|
|
return (true, new ICogImage[] { image, image2 }, "成功");
|
|
|
}
|
|
|
- return (true, new ICogImage[] { image}, "成功");
|
|
|
+ return (true, new ICogImage[] { image }, "成功");
|
|
|
|
|
|
}
|
|
|
}
|
|
|
@@ -2599,16 +2634,39 @@ namespace TeamAAS_VP.Services
|
|
|
{
|
|
|
// 1. 采集图像
|
|
|
var camera = _cameraService.GetCamera(procedure.CameraId);
|
|
|
- bool succed = camera.SetExposureTime(procedure.ExposureTime);
|
|
|
- if (!succed)
|
|
|
+ if (TempExposureTime != procedure.ExposureTime)
|
|
|
{
|
|
|
- SendTaskMessage($"相机曝光设置失败!", MessageLevel.Error);
|
|
|
+ bool succed1 = camera.SetExposureTime(procedure.ExposureTime);
|
|
|
+ if (!succed1)
|
|
|
+ {
|
|
|
+ SendTaskMessage($"相机曝光设置失败!", MessageLevel.Error);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ TempExposureTime = procedure.ExposureTime;
|
|
|
+ }
|
|
|
}
|
|
|
- succed = camera.SetGain(procedure.Gain);
|
|
|
- if (!succed)
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // SendTaskMessage($"相机曝光重复", MessageLevel.Error);
|
|
|
+ //}
|
|
|
+ if (TempGain != procedure.Gain)
|
|
|
{
|
|
|
- SendTaskMessage($"相机增益设置失败!", MessageLevel.Error);
|
|
|
+ bool succed2 = camera.SetGain(procedure.Gain);
|
|
|
+ if (!succed2)
|
|
|
+ {
|
|
|
+ SendTaskMessage($"相机增益设置失败!", MessageLevel.Error);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ TempGain = procedure.Gain;
|
|
|
+ }
|
|
|
}
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // SendTaskMessage($"相机增益重复", MessageLevel.Error);
|
|
|
+ //}
|
|
|
+
|
|
|
DateTime nowtime = DateTime.Now;
|
|
|
LogHelper.WriteLogInfo("开始采集图像");
|
|
|
//var image = camera.Grab();
|
|
|
@@ -2631,19 +2689,18 @@ namespace TeamAAS_VP.Services
|
|
|
LogHelper.WriteLogInfo($"采集图像完成;用时:{(DateTime.Now - nowtime).Milliseconds}ms");
|
|
|
if (image == null)
|
|
|
{
|
|
|
-
|
|
|
SendTaskMessage(Lang.图像采集失败, MessageLevel.Error);
|
|
|
return (false, null, "图像采集失败");
|
|
|
}
|
|
|
return (true, new ICogImage[] { image }, "成功");
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
- LogHelper.WriteLogError("采集图像失败!",ex);
|
|
|
+ LogHelper.WriteLogError("采集图像失败!", ex);
|
|
|
return (false, null, "图像采集失败");
|
|
|
}
|
|
|
}
|
|
|
@@ -2656,7 +2713,7 @@ namespace TeamAAS_VP.Services
|
|
|
/// <param name="robotCoord"></param>
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
/// <returns></returns>
|
|
|
- public async Task<(bool IsSucceed, string[] Items, double Count)> ExecutePhotoGetSinglePoint1(ProcedureModel procedure, ICogImage[] imges, Dictionary<string, string> InputTerminal, double[] robotCoord, CancellationToken cancellationToken,bool is3dmodel, float confThreshold = 0.25f, float iouThreshold = 0.45f)
|
|
|
+ public async Task<(bool IsSucceed, string[] Items, double Count)> ExecutePhotoGetSinglePoint1(ProcedureModel procedure, ICogImage[] imges, Dictionary<string, string> InputTerminal, double[] robotCoord, CancellationToken cancellationToken, bool is3dmodel, float confThreshold = 0.25f, float iouThreshold = 0.45f)
|
|
|
{
|
|
|
DateTime nowtime = DateTime.Now;
|
|
|
try
|
|
|
@@ -2689,37 +2746,19 @@ namespace TeamAAS_VP.Services
|
|
|
// continue;
|
|
|
//}
|
|
|
|
|
|
- SendTaskMessage(Lang.拍照OK, MessageLevel.Debug);
|
|
|
+ //SendTaskMessage(Lang.拍照OK, MessageLevel.Debug);
|
|
|
|
|
|
int Count = (int)(outputCollection["Count"].Value);
|
|
|
string[] PhotoRes = new string[100];
|
|
|
for (int k = 1; k <= Count; k++)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
PhotoRes[k] = (string)(outputCollection[$"dis{k}"].Value);
|
|
|
//PhotoRes[k] = "222";
|
|
|
}
|
|
|
// 3. 获取视觉输出结果
|
|
|
LogHelper.WriteLogInfo("开始获取视觉输出结果");
|
|
|
- /*
|
|
|
- //获取相机校准
|
|
|
- var calib = _calibrationService.GetCalibration(procedure.CalibrationId);
|
|
|
- string points = (string)(outputCollection["Point"].Value);
|
|
|
- string[] strpoints = points.Split(';');
|
|
|
- //先将pos按照逗号进行分隔,拿到数组
|
|
|
- var posParts = strpoints[0].Split(',');
|
|
|
- double _pixel_x = double.Parse(posParts[0]);
|
|
|
- double _pixel_y = double.Parse(posParts[1]);
|
|
|
- double _pixel_u = double.Parse(posParts[2]);
|
|
|
- //转换点位-像素转换成机器人绝对坐标
|
|
|
- var calibResult = _calibrationService.ConvertPixelToPosition((_pixel_x, _pixel_y, _pixel_u), robotCoord, calib, RobotBrand.XYZ_Platform);
|
|
|
- if (!calibResult.IsSucceed)
|
|
|
- {
|
|
|
- return (false, 0, 0, 0);
|
|
|
- }
|
|
|
-
|
|
|
- return (true, calibResult.X, calibResult.Y, calibResult.U);
|
|
|
- */
|
|
|
+
|
|
|
return (true, PhotoRes, Count);
|
|
|
}
|
|
|
SendTaskMessage(Lang.多次拍照失败, MessageLevel.Alarm);
|
|
|
@@ -2757,7 +2796,7 @@ namespace TeamAAS_VP.Services
|
|
|
{
|
|
|
await SetLightBeforePhoto(procedure);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
try
|
|
|
{
|
|
|
//拍照失败时,需要多次拍照
|
|
|
@@ -2838,13 +2877,13 @@ namespace TeamAAS_VP.Services
|
|
|
/// <param name="outImage"></param>
|
|
|
/// <param name="outGraphicCollection"></param>
|
|
|
/// <returns></returns>
|
|
|
- public bool ExecutePhotoEx(ProcedureModel procedure, Dictionary<string, string> InputTerminal, out CogToolBlockTerminalCollection outputCollection,out ICogImage outImage,out CogGraphicCollection outGraphicCollection)
|
|
|
+ public bool ExecutePhotoEx(ProcedureModel procedure, Dictionary<string, string> InputTerminal, out CogToolBlockTerminalCollection outputCollection, out ICogImage outImage, out CogGraphicCollection outGraphicCollection)
|
|
|
{
|
|
|
outImage = null;
|
|
|
outGraphicCollection = null;
|
|
|
try
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
// 1. 采集图像
|
|
|
var camera = _cameraService.GetCamera(procedure.CameraId);
|
|
|
bool succed = camera.SetExposureTime(procedure.ExposureTime);
|
|
|
@@ -2867,7 +2906,7 @@ namespace TeamAAS_VP.Services
|
|
|
outputCollection = null;
|
|
|
return false;
|
|
|
}
|
|
|
- outImage= image;
|
|
|
+ outImage = image;
|
|
|
procedure.ToolBlock.Inputs["InputImage"].Value = image;
|
|
|
LogHelper.WriteLogInfo($"采集图像完成;用时:{(DateTime.Now - nowtime).Milliseconds}ms");
|
|
|
|
|
|
@@ -2905,7 +2944,7 @@ namespace TeamAAS_VP.Services
|
|
|
if (item.Value is ICogRecord)
|
|
|
record = item.Value as ICogRecord;
|
|
|
}
|
|
|
- outGraphicCollection= outputCollection["Graphic"].Value as CogGraphicCollection;
|
|
|
+ outGraphicCollection = outputCollection["Graphic"].Value as CogGraphicCollection;
|
|
|
return true;
|
|
|
}
|
|
|
else
|
|
|
@@ -2987,7 +3026,7 @@ namespace TeamAAS_VP.Services
|
|
|
//{
|
|
|
// return (false, 0, 0, 0);
|
|
|
//}
|
|
|
- return (true, 0,0, 0);
|
|
|
+ return (true, 0, 0, 0);
|
|
|
}
|
|
|
SendTaskMessage(Lang.多次拍照失败, MessageLevel.Alarm);
|
|
|
return (false, 0, 0, 0);
|
|
|
@@ -3112,8 +3151,8 @@ namespace TeamAAS_VP.Services
|
|
|
{
|
|
|
DateTime nowtime = DateTime.Now;
|
|
|
await SetLightBeforePhoto(procedure);
|
|
|
- ICogImage outImage=null;
|
|
|
- CogGraphicCollection outGraphicCollection=null;
|
|
|
+ ICogImage outImage = null;
|
|
|
+ CogGraphicCollection outGraphicCollection = null;
|
|
|
try
|
|
|
{
|
|
|
//拍照失败时,需要多次拍照
|
|
|
@@ -3601,7 +3640,7 @@ namespace TeamAAS_VP.Services
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//判断当前流程是否启用光源控制
|
|
|
if (procedure.IsControlLightChannels)
|
|
|
{
|