增加日志
This commit is contained in:
@ -104,18 +104,18 @@ namespace DH.Devices.Vision
|
||||
// json = "{\"FastDetResult\":[{\"cls_id\":0,\"cls\":\"liewen\",\"fScore\":0.654843,\"rect\":[175,99,110,594]},{\"cls_id\":0,\"cls\":\"liewen\",\"fScore\":0.654589,\"rect\":[2608,19,104,661]},{\"cls_id\":0,\"cls\":\"liewen\",\"fScore\":0.654285,\"rect\":[1275,19,104,662]},{\"cls_id\":0,\"cls\":\"liewen\",\"fScore\":0.620762,\"rect\":[1510,95,107,600]},{\"cls_id\":0,\"cls\":\"liewen\",\"fScore\":0.617812,\"rect\":[2844,93,106,602]}]}";
|
||||
//
|
||||
Console.WriteLine("检测结果JSON:" + json);
|
||||
#pragma warning disable CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
||||
|
||||
HYoloResult detResult = JsonConvert.DeserializeObject<HYoloResult>(json);
|
||||
#pragma warning restore CS8600 // 将 null 字面量或可能为 null 的值转换为非 null 类型。
|
||||
|
||||
if (detResult == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int iNum = detResult.HYolo.Count;
|
||||
#pragma warning disable CS0219 // 变量已被赋值,但从未使用过它的值
|
||||
|
||||
int IokNum = 0;
|
||||
#pragma warning restore CS0219 // 变量已被赋值,但从未使用过它的值
|
||||
|
||||
for (int ix = 0; ix < iNum; ix++)
|
||||
{
|
||||
var det = detResult.HYolo[ix];
|
||||
@ -145,7 +145,6 @@ namespace DH.Devices.Vision
|
||||
Mat originMat = new Mat();
|
||||
Mat detectMat = new Mat();
|
||||
|
||||
#pragma warning disable CS0168 // 声明了变量,但从未使用过
|
||||
try
|
||||
{
|
||||
if (req.mImage == null)
|
||||
|
Reference in New Issue
Block a user