rest


win32:CONFIG(release, debug|release): LIBS += -LD:/opencv/build/x64/vc15/lib/ -lopencv_world341
else:win32:CONFIG(debug, debug|release): LIBS += -LD:/opencv/build/x64/vc15/lib/ -lopencv_world341d
INCLUDEPATH += D:/opencv/build/include
DEPENDPATH += D:/opencv/build/include



vscode/drawio

https://app.diagrams.net/

https://app.diagrams.net/


https://blog.csdn.net/deflypig/article/details/107601193?spm=1001.2101.3001.6650.7&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-7.pc_relevant_aa&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-7.pc_relevant_aa&utm_relevant_index=14

胡工,软件部现在敏捷方面,看板工具用的是哪个啊?

应该都是用的jira

深信服加密软件

海宇勇创防泄密包

合力天下数据防泄密系统(HL-dataAS)用于保护企业的知识产权、客户资料、财务数据、

现在市面上有两种类型的加密软件
一种是透明加密,透明加密则是目前十分流行的加密方式,对员工的工作效率也没什么影响,比较适合文档类的保护,但是对软件开发的编译和源代码的保护有所限制,所以透明加密适用与文档,图纸方面。
另外一种是环境加密,环境加密是一种在磁盘加密的基础上,再进行更深层次的加密方式,使用了沙盒原理,更加适用于源代码开发,不影响软件的编译,且能对源码在沙盒环境中做好保护。
推荐使用SDC沙盒,可以免费试用,员工不用受一些限制,可以自由上网,在加密环境中办公,不对任何硬件做修改,公司文件只能放在公司范围内,拿不出加密空间,如果想拿出需要走审批流程。加密中的文件也不会改变文件类型和大小,并不会造成文件损坏,文件丢失等情况。

合力天下数据防泄密系统(HL-dataAS)用于保护企业的知识产权、客户资料、财务数据、技术图纸、应用系统等机密信息化数据不外泄。

简单地说,”合力天下”防泄密系统让企业机密数据和应用系统的重要资料“拷不走”、“屏幕截取不走”、“另存不走”、“打印不走”
、“内容复制不走”、“MSN、QQ、邮件发送不走”。

sdhelper2.exe

>>>>>>>>>>>

public FileLinkInfo AddTxt2FileLst(string filepath, Char cState, String sCreationTime, String sLastWriteTime)
{
DateTime _CreationTime = DateTime.Parse(sCreationTime);
DateTime _LastWriteTime = DateTime.Parse(sLastWriteTime);

return AddTxt2FileLst(filepath, cState, _CreationTime, _LastWriteTime);

} 

public FileLinkInfo AddTxt2FileLst(string filepath, Char cState, DateTime _CreationTime, DateTime _LastWriteTime)
{
string filename = System.IO.Path.GetFileName(filepath);
FileLinkInfo info = new FileLinkInfo("", filepath);

info.m_strFileName = filename;
info.m_CreationTime = _CreationTime;
info.m_LastWriteTime = _LastWriteTime;


if ('*' == cState)
{
info.m_filestate = FileLinkInfo.FileState.solved;
}
else if ('!' == cState)
{
info.m_filestate = FileLinkInfo.FileState.failed;
}
else if (' ' == cState)
{
info.m_filestate = FileLinkInfo.FileState.processing;
}
else

{
info.m_filestate = FileLinkInfo.FileState.processing;
}

this.m_lstFiles.Add(info);
return info;
}

public FileLinkInfo AddTxt2FileLst(string filepath, bool bIsSolved=false)
{
string filename = System.IO.Path.GetFileName(filepath);
FileInfo fi = new FileInfo(filename);

return AddTxt2FileLst(filepath, ' ', fi.CreationTime, fi.LastWriteTime);
}

 

>>>>>>>>>>>

internal static bool IsNewImg(string _imgFile, string _preImgFile, double fThreshold =0.00001, int nMargine = 0)
{
if ("" == _imgFile || "" == _preImgFile || "#page1"== _preImgFile)
return true;

try
{

........

if (mnB <= fThreshold)
return false;
else
return true;
}
catch (Exception e)
{
throw new Exception("截图读取失败,文件名可能有特殊字符");

}

 

 

>>>>>>>>>>>

MyThread.maThreadControlEvent.WaitOne();

String filepath = fm1.m_lstFiles[i].m_strDemoFile;
//bool bSnapNewUpdate = Setting.m_bSnapUpdateFile;
if (FileLinkInfo.FileState.solved == fm1.m_lstFiles[i].m_filestate
|| FileLinkInfo.FileState.failed == fm1.m_lstFiles[i].m_filestate)

......

// sec.2.3 Snap file
OutputText2Frame("info:正在打开文件:" + filepath);
String res = SnapFile(filepath, newFileDir);
if (res.IndexOf("succ") < 0)
{
if (res.IndexOf("fail:") >= 0)
{
fm1.m_lstFiles[i].m_filestate = FileLinkInfo.FileState.failed;
fm1.SaveFileList();
}
}

else
{
// sec.2.4 记录进度和update 显示状态
fm1.m_lstFiles[i].m_filestate = FileLinkInfo.FileState.solved;
OutputText2Frame("solv:[" + i.ToString() + "]" + filepath);
}

..............

else
{
try
{
bIsNewImg = Halcon.IsNewImg(ImgFile, preImgFile, dThroud, nMargine);
}
catch (Exception e1)
{
return "fail:" + e1.ToString();
}
}

 

 

>>>>>>>>>>>>

public enum FileState
{
solved, // 已解决”:
processing, // 处理中”:
pending, // 待处理”:
failed // 失败”:
}

 

public static String GetEnumName(FileState state)
{
if (FileLinkInfo.FileState.solved == state)
{
return "已解决";
}
else if (FileLinkInfo.FileState.processing == state)
{
return "处理中";
}
else if (FileLinkInfo.FileState.pending == state)
{
return "待处理";
}

else if (FileLinkInfo.FileState.failed == state)
{
return "失败";
}

 

>>>>>>>>>

private void ReadBlogConfigFile()
{
WebPage page = new WebPage(@"http://blog.sina.com.cn/s/blog_545a26190100vaxf.html");
String pattern = "111111(.*)222222";
String s2 = page.getSpecialWords(pattern);

 

 

>>>>>>>>>>>

ocr

https://www.cnblogs.com/sn5200/archive/2022/02/19/15912354.html

https://www.sohu.com/a/477237695_121118999

EasyOCR 一个基于 Python 的 OCR 开源项目

OCR 服务的用途日渐广泛,比如常见的 身份证识别,车牌号识别,又比如通过拍商品照片,获取照片中商品的一些关键字直接去搜索相关商品等用途

而市面上,很多大厂也提供了 OCR 服务,其中功能(精确度选择,文字位置信息选择)和体验(准确度,识别速度)都不错的有 百度云,并且百度提供每天的免费使用额度,日常使用下基本等于免费使用了。

那如果我们自己想在本地做 OCR 部署的话,就需要自己写服务程序了(百度的OCR服务本地化部署得20w+),而 github ,nuget 上有不少的OCR相关项目:
tesseract:免费,而且速度也不错,但是自带的中文数据模型文件的准确性略低,如果想要提高准确率,需要自己去训练模型
IronOcr:收费,速度也不错,但对中文的识别的准确率不是很好
EasyOCR,免费,速度如果是GPU计算的话很快,而且准确率极高,CPU速度则慢很多
等…
EasyOCR(github) 的优点是,配置和使用都比较简单,并且支持识别的语言较多,识别率也高,不过有几点需要注意:

Halcon

http://www.ihalcon.com/

#include "cstatejudgethread.h"

#include 
#include 


#include "opencv2/opencv.hpp"
#include "OpenCVOper.h"

#include "model.h"
#include "CAPI.h"
#define batch_size  1   // batch_size



CStateJudgeThread::CStateJudgeThread(QObject *parent) : QThread(parent)
{
    m_bJump = false;

    m_strMasterImgPath = QString("D:\\camera\\master.jpg");
    m_DataLastmodifiedTime = CAPI::GetLastmodifiedTime(m_strMasterImgPath);
}

bool CStateJudgeThread::IsNewImg()
{
    QDateTime LastmodifiedTime = CAPI::GetLastmodifiedTime(m_strMasterImgPath);

    bool res = false;
    if (m_DataLastmodifiedTime < LastmodifiedTime)
    {
        res = true;
    }
    return res;
}

void CStateJudgeThread::run()
{
    queue stkOperSteps;
//    stkOperSteps.top();

    QString strJudge[OUTPUT_SIZE+1] = {"N", "b", "e+h", "g","h", "m"};
//    int a1[10] = {2};//good
//    stkOperSteps.push(ST_OPER_STEP("good", 2, a1, 1));
//    int a2[10] = {1};   //empty
//    stkOperSteps.push_back(ST_OPER_STEP("empty",0, a2, 1));
    int a3[10] = {1, 3};   //hand or empty
    stkOperSteps.push(ST_OPER_STEP("hand or empty",2, a3, 2));
    int a4[10] = {2};//good
    stkOperSteps.push(ST_OPER_STEP("good",2, a4, 1));

    int nCnt = 0;
    do
    {
        this->msleep(500);

        ST_OPER_STEP waitStep = stkOperSteps.front();

        // 当前状态是否在当前状态要求中
        if (!IsNewImg())
            continue;

        int nCurStep = JudgeSysState("D:/camera/master.jpg");

        // output log
        QString ss = QString("waitStep= %1, JudgeSysState = [%2][%3]").arg(waitStep.strStepName).arg(nCurStep).arg(strJudge[max(nCurStep+1, 0)]);
        emit CurrentState03(ss);


        // state cnt
        list<int>::iterator it = std::find(waitStep.lstOperID.begin(), waitStep.lstOperID.end(), nCurStep);
        if(it!=waitStep.lstOperID.end())
        {
            nCnt++;
            emit CurrentState03("++" + strJudge[nCurStep+1] + "; cnt =" + QString("%1").arg(nCnt));
        }

        //  当前状态达到等待计数要求,跳到下一步
        if (nCnt>=waitStep.nRepeatCount)
        {
            stkOperSteps.pop();
            nCnt = 0;
            emit CurrentState03("pop");
        }

        if (m_bJump)
            break;

    }while(!stkOperSteps.empty());

    if (m_bJump)
    {
        m_bJump = false;
        return;
    }

    if (stkOperSteps.empty())
    {
        emit findNewLED();
    }

    return;
}



int CStateJudgeThread::JudgeSysInit()
{
    /*--------------------------------配置关键信息------------------------------*/
    string model_path="G:/cabinet_clr/code/python/StateJudge_CNN/pb/model.pb";
    model_path = "d:/model.pb";
//    int nbatch_size = 1;
//    int nINPUT_SIZE = 64;//输入维度
//    int nOUTPUT_SIZE = 5;   //25;//输出维度
    model_init((char *)model_path.c_str());
    //CAPI::writeLog("C0000001");
    return 1;
}

int CStateJudgeThread::JudgeSysState(QString image_path)
{
    //  ref: G:\cabinet_clr\ref\3th LIb\model_deployment-master\C++\src\example.cpp
    float input_vals[1][INPUT_SIZE][INPUT_SIZE][1] = {0};
    float output_vals[1][OUTPUT_SIZE] = {0.0};

    // 检查图片大小
    int  size =  0 ;
    QFile myFile(image_path);
    if (myFile.open(QIODevice :: ReadOnly))
    {
        size = myFile.size();
        myFile.close();
    }
    if (0==size)
    {
        int a = 1;
    }

    //  复杂预处理
    //  ## way4:单张图片组织,中科院cv2+复杂预处理函数复用
    cv::Mat img_src = imread(image_path.toStdString(), cv::IMREAD_COLOR);
    if(nullptr == img_src.data) //判断图片调入是否成功
        return -2; //调入图片失败则退出

    cv::Mat img;
    cv::resize(img_src, img, cv::Size(64, 64));     // shape =(64, 64, 3)
//    // test show
//    vector splitRGB_src(img_src.channels());
//    cv::split(img_src, splitRGB_src);
//    vector splitRGB(img.channels());
//    cv::split(img, splitRGB);
//    //WriteMatData("e:\\src_RGB_R.txt", splitRGB_src.at(0));

    //  sec.1   convert from RGB to YUV
    cv::Mat imgYUV;
    cv::cvtColor(img, imgYUV, CV_RGB2YUV);//ref https://blog.csdn.net/keith_bb/article/details/53470170

    // way1
    vector splitYUV(imgYUV.channels());
    cv::split(imgYUV,splitYUV);
    //imshow("Y2", splitYUV.at(0));
    //imshow("U2", splitYUV.at(1));
    //imshow("V2", splitYUV.at(2));
    cv::Mat Y = splitYUV.at(0);
    //WriteMatData("e:\\YUV_V.txt", splitYUV.at(2));

    //  直方图均衡化
    //cv2.equalizeHist(np.uint8(img))
    cv::equalizeHist(Y, Y);
    WriteMatData("e:\\Y1.txt", Y);
    cv::Mat FY, FY2, FY3;
    Y.convertTo(FY, CV_32FC1); //或CV_32F工作(太)

    cv::Mat mat_mean, mat_std;
//    LoadMatData("G:/cabinet_clr/code/python/StateJudge_CNN/data/mean_img.txt", mat_mean, 64, 64);
//    LoadMatData("G:/cabinet_clr/code/python/StateJudge_CNN/data/std_img.txt", mat_std, 64, 64);
    LoadMatData("d:/mean_img.txt", mat_mean, 64, 64);
    LoadMatData("d:/std_img.txt", mat_std, 64, 64);
    mat_mean.convertTo(mat_mean, CV_32FC1);
    mat_std.convertTo(mat_std, CV_32FC1);

    int ntype = mat_mean.type();
    float ftmp = mat_mean.at<float>(0, 1);
    //#define CV_8U   0
    //#define CV_8S   1
    //#define CV_16U  2
    //#define CV_16S  3
    //#define CV_32S  4
    //#define CV_32F  5
    //#define CV_64F  6
    //#define CV_USRTYPE1 7

    FY2 = FY - mat_mean;
    FY3 = FY2 / mat_std;
    //WriteMatData("e:\\FY1.txt", FY);
    //WriteMatData("e:\\FY2.txt", FY2);
    //WriteMatData("e:\\FY3.txt", FY3);

    cv::Mat mxInput(FY3);
    float *ptmp = NULL;//这是关键的指针!!
    for (int i = 0; i < INPUT_SIZE; i++)
    {
        for (int j = 0; j < INPUT_SIZE; j++)
        {
            float tmp = mxInput.at<float>(i, j);
            input_vals[0][i][j][0] = tmp;//img的矩阵数据传给二维数组ptr[][]
            float tmp2 = input_vals[0][i][j][0];

            float ff = tmp2;
        }
    }

    int len3 = sizeof(input_vals);
    qDebug()<<"over 10";
    model_inference(1, &input_vals[0][0][0][0], &output_vals[0][0]);

    QString s;
    for (int j = 0; j < OUTPUT_SIZE; ++j)
    {
        QString ss = QString::asprintf("%2d = %.2f, ", j, output_vals[0][j]);
        qDebug()<<ss;
    }

    float maxx = 0.0;
    int res  = -1;
    for (int j = 0; j < OUTPUT_SIZE; ++j)
    {
//        CAPI::writeLog(QString("j = %1 output_vals[0][j]=%2").arg(j).arg(output_vals[0][j]));
        if (output_vals[0][j]>maxx && output_vals[0][j]>0.5)
        {
            res = j;
            maxx = output_vals[0][j];
        }

    }
    if (-1==res)
    {
        int a = 1;
    }

    return res;
}