Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
48e6945bd6 | |||
3f9d951e80 | |||
00f4b9c95d | |||
0ed659e482 |
@ -1,4 +1,5 @@
|
|||||||
using OpenCvSharp;
|
using OpenCvSharp;
|
||||||
|
using Sunny.UI.Win32;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -14,7 +15,6 @@ namespace HisenceYoloDetection
|
|||||||
{
|
{
|
||||||
public static class CheckDiffSciHelper
|
public static class CheckDiffSciHelper
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -68,8 +68,6 @@ namespace HisenceYoloDetection
|
|||||||
{
|
{
|
||||||
Cv2.Threshold(gimg2, thr2, 0, 255, ThresholdTypes.Binary | ThresholdTypes.Otsu);
|
Cv2.Threshold(gimg2, thr2, 0, 255, ThresholdTypes.Binary | ThresholdTypes.Otsu);
|
||||||
}
|
}
|
||||||
// Cv2.Threshold(gimg2, thr2, 0, 255, ThresholdTypes.Binary | ThresholdTypes.Otsu);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Rect area2 = new Rect(148,30,229,222);
|
//Rect area2 = new Rect(148,30,229,222);
|
||||||
@ -190,6 +188,7 @@ namespace HisenceYoloDetection
|
|||||||
return isMatch;
|
return isMatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static Rect strChangeRect(string strrect)
|
public static Rect strChangeRect(string strrect)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(strrect))
|
if (!string.IsNullOrEmpty(strrect))
|
||||||
|
@ -195,10 +195,11 @@ namespace HisenceYoloDetection
|
|||||||
|
|
||||||
bool st = ManagerModelHelper.StrMatch2(s1, s2);
|
bool st = ManagerModelHelper.StrMatch2(s1, s2);
|
||||||
|
|
||||||
//Rect rect = new Rect(0, 0, 0, 0);
|
Rect rect = new Rect(0, 0, 0, 0);
|
||||||
//string path2 = "D:\\Hisence\\SQLImages\\W80WXWJ060539V0WW80WX120293\\2\\W80WXWJ060539V0WW80WX120293result.jpg";
|
string path2 = "D:\\Hisence\\SQLImages\\LR1006G4SILVERWJ060480U0SW901N120105\\4\\LR1006G4SILVERWJ060480U0SW901N120105result.jpg";
|
||||||
//Mat cameraMat = Cv2.ImRead(path2);
|
string path23 = "D:\\Hisence\\SQLImages\\LR1006G4SILVERWJ060480U0SW901N120105\\4\\L1.jpg";
|
||||||
//bool ifg = CheckDiffSciHelper.CheckDiffSci(path2, cameraMat, rect, rect, false, "D://Hisence//Test");
|
Mat cameraMat = Cv2.ImRead(path23);
|
||||||
|
bool ifg = CheckDiffSciHelper.CheckDiffSci(path2, cameraMat, rect, rect, false, "D://Hisence//Test");
|
||||||
|
|
||||||
string vBarPath = "D:\\Hisence\\<5C><><EFBFBD><EFBFBD>\\Lp\\202452414231.jpg";
|
string vBarPath = "D:\\Hisence\\<5C><><EFBFBD><EFBFBD>\\Lp\\202452414231.jpg";
|
||||||
string vCam1OnePath = "D:\\Hisence\\<5C><><EFBFBD><EFBFBD>\\Lp\\001.jpg";
|
string vCam1OnePath = "D:\\Hisence\\<5C><><EFBFBD><EFBFBD>\\Lp\\001.jpg";
|
||||||
@ -2927,8 +2928,13 @@ namespace HisenceYoloDetection
|
|||||||
if (!saveimage)
|
if (!saveimage)
|
||||||
{
|
{
|
||||||
SQLStr = SQlxK_HisenceWord.ThreeblockMainWord;
|
SQLStr = SQlxK_HisenceWord.ThreeblockMainWord;
|
||||||
OneIF = ManagerModelHelper.StrMatch2(xK_HisenceWord.ThreeblockMainWord, SQlxK_HisenceWord.ThreeblockMainWord);
|
bool OneIF1 = ManagerModelHelper.StrMatch2(xK_HisenceWord.ThreeblockMainWord, SQlxK_HisenceWord.ThreeblockMainWord);
|
||||||
if (!OneIF)
|
|
||||||
|
Rect rect = new Rect(0, 0, 0, 0);
|
||||||
|
string PathSql = SQlxK_HisenceWord.ThreeblockPath;
|
||||||
|
|
||||||
|
juanjiMatch = CheckDiffSciHelper.CheckDiffSci(PathSql, CutBlockMat, rect, rect, false, "D://Hisence//Test");
|
||||||
|
if (!OneIF1 || !juanjiMatch)
|
||||||
{
|
{
|
||||||
DisplayResult(mLcut);
|
DisplayResult(mLcut);
|
||||||
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>İ<EFBFBD>
|
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>İ<EFBFBD>
|
||||||
@ -2951,8 +2957,13 @@ namespace HisenceYoloDetection
|
|||||||
if (!saveimage)
|
if (!saveimage)
|
||||||
{
|
{
|
||||||
SQLStr = SQlxK_HisenceWord.FourblockMainWord;
|
SQLStr = SQlxK_HisenceWord.FourblockMainWord;
|
||||||
OneIF = ManagerModelHelper.StrMatch2(xK_HisenceWord.FourblockMainWord, SQlxK_HisenceWord.FourblockMainWord);
|
bool OneIF1 = ManagerModelHelper.StrMatch2(xK_HisenceWord.FourblockMainWord, SQlxK_HisenceWord.FourblockMainWord);
|
||||||
if (!OneIF)
|
|
||||||
|
Rect rect = new Rect(0, 0, 0, 0);
|
||||||
|
string PathSql = SQlxK_HisenceWord.FourblockPath;
|
||||||
|
|
||||||
|
juanjiMatch = CheckDiffSciHelper.CheckDiffSci(PathSql, CutBlockMat, rect, rect, false, "D://Hisence//Test");
|
||||||
|
if (!OneIF1 || !juanjiMatch)
|
||||||
{
|
{
|
||||||
DisplayResult(mLcut);
|
DisplayResult(mLcut);
|
||||||
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>İ<EFBFBD>
|
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>İ<EFBFBD>
|
||||||
@ -2975,8 +2986,12 @@ namespace HisenceYoloDetection
|
|||||||
if (!saveimage)
|
if (!saveimage)
|
||||||
{
|
{
|
||||||
SQLStr = SQlxK_HisenceWord.FiveblockMainWord;
|
SQLStr = SQlxK_HisenceWord.FiveblockMainWord;
|
||||||
OneIF = ManagerModelHelper.StrMatch2(xK_HisenceWord.FiveblockMainWord, SQlxK_HisenceWord.FiveblockMainWord);
|
bool OneIF1 = ManagerModelHelper.StrMatch2(xK_HisenceWord.FiveblockMainWord, SQlxK_HisenceWord.FiveblockMainWord);
|
||||||
if (!OneIF)
|
Rect rect = new Rect(0, 0, 0, 0);
|
||||||
|
string PathSql = SQlxK_HisenceWord.FiveblockMainWord;
|
||||||
|
|
||||||
|
juanjiMatch = CheckDiffSciHelper.CheckDiffSci(PathSql, CutBlockMat, rect, rect, false, "D://Hisence//Test");
|
||||||
|
if (!OneIF1 || !juanjiMatch)
|
||||||
{
|
{
|
||||||
DisplayResult(mLcut);
|
DisplayResult(mLcut);
|
||||||
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>İ<EFBFBD>
|
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>İ<EFBFBD>
|
||||||
@ -2998,7 +3013,13 @@ namespace HisenceYoloDetection
|
|||||||
if (!saveimage)
|
if (!saveimage)
|
||||||
{
|
{
|
||||||
SQLStr = SQlxK_HisenceWord.SixblockMainWord;
|
SQLStr = SQlxK_HisenceWord.SixblockMainWord;
|
||||||
OneIF = ManagerModelHelper.StrMatch2(xK_HisenceWord.SixblockMainWord, SQlxK_HisenceWord.SixblockMainWord);
|
bool OneIF1 = ManagerModelHelper.StrMatch2(xK_HisenceWord.SixblockMainWord, SQlxK_HisenceWord.SixblockMainWord);
|
||||||
|
|
||||||
|
Rect rect = new Rect(0, 0, 0, 0);
|
||||||
|
string PathSql = SQlxK_HisenceWord.SixblockPath;
|
||||||
|
|
||||||
|
juanjiMatch = CheckDiffSciHelper.CheckDiffSci(PathSql, CutBlockMat, rect, rect, false, "D://Hisence//Test");
|
||||||
|
if (!OneIF1 || !juanjiMatch)
|
||||||
if (!OneIF)
|
if (!OneIF)
|
||||||
{
|
{
|
||||||
// DisplayResult(mLcut);
|
// DisplayResult(mLcut);
|
||||||
@ -3022,8 +3043,12 @@ namespace HisenceYoloDetection
|
|||||||
if (!saveimage)
|
if (!saveimage)
|
||||||
{
|
{
|
||||||
SQLStr = SQlxK_HisenceWord.SevenblockMainWord;
|
SQLStr = SQlxK_HisenceWord.SevenblockMainWord;
|
||||||
OneIF = ManagerModelHelper.StrMatch2(xK_HisenceWord.SevenblockMainWord, SQlxK_HisenceWord.SevenblockMainWord);
|
bool OneIF1 = ManagerModelHelper.StrMatch2(xK_HisenceWord.SevenblockMainWord, SQlxK_HisenceWord.SevenblockMainWord);
|
||||||
if (!OneIF)
|
Rect rect = new Rect(0, 0, 0, 0);
|
||||||
|
string PathSql = SQlxK_HisenceWord.SevenblockPath;
|
||||||
|
|
||||||
|
juanjiMatch = CheckDiffSciHelper.CheckDiffSci(PathSql, CutBlockMat, rect, rect, false, "D://Hisence//Test");
|
||||||
|
if (!OneIF1 || !juanjiMatch)
|
||||||
{
|
{
|
||||||
//DisplayResult(mLcut);
|
//DisplayResult(mLcut);
|
||||||
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>İ<EFBFBD>
|
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>İ<EFBFBD>
|
||||||
@ -3045,8 +3070,12 @@ namespace HisenceYoloDetection
|
|||||||
if (!saveimage)
|
if (!saveimage)
|
||||||
{
|
{
|
||||||
SQLStr = SQlxK_HisenceWord.EightblockMainWord;
|
SQLStr = SQlxK_HisenceWord.EightblockMainWord;
|
||||||
OneIF = ManagerModelHelper.StrMatch2(xK_HisenceWord.EightblockMainWord, SQlxK_HisenceWord.EightblockMainWord);
|
bool OneIF1 = ManagerModelHelper.StrMatch2(xK_HisenceWord.EightblockMainWord, SQlxK_HisenceWord.EightblockMainWord);
|
||||||
if (!OneIF)
|
Rect rect = new Rect(0, 0, 0, 0);
|
||||||
|
string PathSql = SQlxK_HisenceWord.EightblockPath;
|
||||||
|
|
||||||
|
juanjiMatch = CheckDiffSciHelper.CheckDiffSci(PathSql, CutBlockMat, rect, rect, false, "D://Hisence//Test");
|
||||||
|
if (!OneIF1 || !juanjiMatch)
|
||||||
{
|
{
|
||||||
// DisplayResult(mLcut);
|
// DisplayResult(mLcut);
|
||||||
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>İ<EFBFBD>
|
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>İ<EFBFBD>
|
||||||
@ -3067,10 +3096,9 @@ namespace HisenceYoloDetection
|
|||||||
using (StreamWriter sw = new StreamWriter(txtLog, true))
|
using (StreamWriter sw = new StreamWriter(txtLog, true))
|
||||||
{
|
{
|
||||||
|
|
||||||
if (blockIndex == "2")
|
|
||||||
{
|
sw.WriteLine("<22><>" + blockIndex + "<22><><EFBFBD><EFBFBD>ƥ<EFBFBD><C6A5>" + juanjiMatch);
|
||||||
sw.WriteLine("<22><><EFBFBD><EFBFBD>ƥ<EFBFBD><C6A5>" + juanjiMatch);
|
|
||||||
}
|
|
||||||
sw.WriteLine("<22><>" + blockIndex + "<22><><EFBFBD>ݿ<EFBFBD>" + SQLStr + "<22>ؼ<EFBFBD><D8BC><EFBFBD>" + MainWoidStr + "<22><><EFBFBD><EFBFBD>" + OneIF + "\n");
|
sw.WriteLine("<22><>" + blockIndex + "<22><><EFBFBD>ݿ<EFBFBD>" + SQLStr + "<22>ؼ<EFBFBD><D8BC><EFBFBD>" + MainWoidStr + "<22><><EFBFBD><EFBFBD>" + OneIF + "\n");
|
||||||
sw.WriteLine("<22><>" + blockIndex + " <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> " + TextWoidStr + "\n");
|
sw.WriteLine("<22><>" + blockIndex + " <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> " + TextWoidStr + "\n");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user