log 精简日志,去掉printf

main
liusiyang 3 weeks ago
parent d5b0ac89bc
commit 7cc8f0db2e

@ -105,9 +105,9 @@ struct PRINT_LOG_
break;
}
str += stepStr + ": ";
str += str_Format(format, args...);
printf("%s\n", str.c_str());
// str += stepStr + ": ";
// str += str_Format(format, args...);
// printf("%s\n", str.c_str());
return str;
}

@ -96,7 +96,7 @@ struct DetLog
str += str_Format_1(format, args...);
if (bPrintStr)
{
printf("%s\n", str.c_str());
// printf("%s\n", str.c_str());
}
{
std::lock_guard<std::mutex> lock(mtx);
@ -132,7 +132,7 @@ struct DetLog
str += str_Format_1(format, args...);
if (bPrintStr)
{
printf("%s\n", str.c_str());
// printf("%s\n", str.c_str());
}
if (LogLevel <= addLogLevel)

@ -3,7 +3,7 @@
* @Date: 2025-09-11 15:32:52
* @LastEditors: xiewenji 527774126@qq.com
* @LastEditTime: 2025-09-14 17:41:14
* @FilePath: /BOE_CELL_AOI_Detect/AlgorithmModule/include/ImageDetBase.h
* @FilePath: /BOE_FOG_Detect/AlgorithmModule/include/ImageDetBase.h
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
#ifndef ImageDetBase_H_

@ -75,7 +75,7 @@ private:
}
}
}
printf("find fail ============= \n");
// printf("find fail ============= \n");
// 实在找不到,就返回原始位置
return newRect;
}

@ -52,8 +52,8 @@ public:
}
void Print()
{
printf("bSaveResultImg %s strChannel %s\n",
BOOL_TO_STR(bSaveResultImg), strChannel.c_str());
// printf("bSaveResultImg %s strChannel %s\n",
// BOOL_TO_STR(bSaveResultImg), strChannel.c_str());
}
};

@ -91,10 +91,10 @@ struct QX_Info
}
void print(std::string str)
{
printf("%s blobIdx %d,result %d area %f energy %f hj %f length %f md %f x %f y %f x %f y %f \n",
str.c_str(), blobIdx, result, area, energy, hj, length, density, plocatin_mm.x, plocatin_mm.y, plocatin_pixel.x, plocatin_pixel.y);
printf("%s blobIdx %d,fmindis %f mindis_locatin_pixel x %d y %d \n",
str.c_str(), blobIdx, fmindis, mindis_locatin_pixel.x, mindis_locatin_pixel.y);
// printf("%s blobIdx %d,result %d area %f energy %f hj %f length %f md %f x %f y %f x %f y %f \n",
// str.c_str(), blobIdx, result, area, energy, hj, length, density, plocatin_mm.x, plocatin_mm.y, plocatin_pixel.x, plocatin_pixel.y);
// printf("%s blobIdx %d,fmindis %f mindis_locatin_pixel x %d y %d \n",
// str.c_str(), blobIdx, fmindis, mindis_locatin_pixel.x, mindis_locatin_pixel.y);
}
std::string GetInfo()
{
@ -248,7 +248,7 @@ struct QXAnalysis_Config
}
void print(std::string str)
{
printf("%s bok %d num %d area %f dis %f len %f hj %d md %f\n", str.c_str(), bok, num, area, dis, len, hj, density);
// printf("%s bok %d num %d area %f dis %f len %f hj %d md %f\n", str.c_str(), bok, num, area, dis, len, hj, density);
}
};
@ -303,8 +303,8 @@ struct QX_RESULT
}
void print(std::string str)
{
printf("%s blobIdx %d error_Type %d qx_Num %d min dis %f flen %f x %d y %d \n",
str.c_str(), blobIdx, error_Type, qx_Num, mindis, flen, qx_MisDis_point_pixel.x, qx_MisDis_point_pixel.y);
// printf("%s blobIdx %d error_Type %d qx_Num %d min dis %f flen %f x %d y %d \n",
// str.c_str(), blobIdx, error_Type, qx_Num, mindis, flen, qx_MisDis_point_pixel.x, qx_MisDis_point_pixel.y);
}
};
struct QX_Analysis_Result_List

@ -168,7 +168,7 @@ int AIClassify::GetDetRoiList(const cv::Mat &src_Img, cv::Rect qx_roi, std::vect
// }
if (pieceList.size() <= 0)
{
printf("Select Roi fail\n");
// printf("Select Roi fail\n");
return 1;
}
AI_PIECE_INFO selectPiece;

@ -63,7 +63,7 @@ int AI_Edge_Algin::Detect(const cv::Mat &img, DetConfig *pDetConfig, std::shared
re = Det_big(img, rois, pCheckResult_Aling->edge_RoiList, Big_roi, big_mask);
if (re != 0)
{
printf("AICheck_Edge_Big----error %d \n", re);
// printf("AICheck_Edge_Big----error %d \n", re);
if (m_pDetConfig->IsSaveProcessImg())
{
cv::imwrite(str_error, img);
@ -84,7 +84,7 @@ int AI_Edge_Algin::Detect(const cv::Mat &img, DetConfig *pDetConfig, std::shared
re = Dtet_small(img, rois, Src_Mask);
if (re != 0)
{
printf("AICheck_Edge_Small----error %d \n", re);
// printf("AICheck_Edge_Small----error %d \n", re);
if (m_pDetConfig->IsSaveProcessImg())
{
cv::imwrite(str_error, img);
@ -151,7 +151,7 @@ int AI_Edge_Algin::Detect(const cv::Mat &img, DetConfig *pDetConfig, std::shared
{
double widthDiff = std::abs(result_roi.width - m_pDetConfig->drawRoi.width) * 1.0f / std::min(result_roi.width, m_pDetConfig->drawRoi.width);
double heightDiff = std::abs(result_roi.height - m_pDetConfig->drawRoi.height) * 1.0f / std::min(result_roi.height, m_pDetConfig->drawRoi.height);
printf("draw roi %s det %s widthDiff %f heightDiff %f\n", CheckUtil::GetRectString(m_pDetConfig->drawRoi).c_str(), CheckUtil::GetRectString(result_roi).c_str(), widthDiff, heightDiff);
//printf("draw roi %s det %s widthDiff %f heightDiff %f\n", CheckUtil::GetRectString(m_pDetConfig->drawRoi).c_str(), CheckUtil::GetRectString(result_roi).c_str(), widthDiff, heightDiff);
// 如果差异超过10%,抛出异常
if (widthDiff > 0.10)
{
@ -178,7 +178,7 @@ int AI_Edge_Algin::Detect(const cv::Mat &img, DetConfig *pDetConfig, std::shared
{
int diff = std::abs(va_big - va_small); // 面积的差异值。
float fs = diff * 1.0f / va_big;
printf("va_big %d va_small %d dff %d diffscale %f \n", va_big, va_small, diff, fs);
// printf("va_big %d va_small %d dff %d diffscale %f \n", va_big, va_small, diff, fs);
if (fs > 0.1)
{
// if (true)
@ -211,7 +211,7 @@ int AI_Edge_Algin::Detect(const cv::Mat &img, DetConfig *pDetConfig, std::shared
{
int diff = std::abs(va_draw - va_small); // 面积的差异值。
float fs = diff * 1.0f / va_draw;
printf("va_draw %d va_small %d dff %d diffscale %f \n", va_draw, va_small, diff, fs);
// printf("va_draw %d va_small %d dff %d diffscale %f \n", va_draw, va_small, diff, fs);
if (fs > 0.1)
{
return 56;
@ -388,13 +388,13 @@ int AI_Edge_Algin::InitModel_ALL()
int re = InitModel_Big();
if (re != 0)
{
printf("AI_Edge_Algin InitModel_Big Error \n");
// printf("AI_Edge_Algin InitModel_Big Error \n");
return re;
}
re = InitModel_Small();
if (re != 0)
{
printf("AI_Edge_Algin InitModel_Small Error \n");
// printf("AI_Edge_Algin InitModel_Small Error \n");
return re;
}
@ -431,7 +431,7 @@ int AI_Edge_Algin::Det_big(const cv::Mat &img, vector<Rect> &smallRoiList, std::
big_mask = mask;
if (re != 0)
{
printf("AICheck_Edge_Big----error \n");
// printf("AICheck_Edge_Big----error \n");
int re123 = 100 + re;
return re123;
}
@ -481,7 +481,7 @@ int AI_Edge_Algin::Det_big(const cv::Mat &img, vector<Rect> &smallRoiList, std::
{
double widthDiff = std::abs(bigRoi.width - m_pDetConfig->drawRoi.width) * 1.0f / std::min(bigRoi.width, m_pDetConfig->drawRoi.width);
double heightDiff = std::abs(bigRoi.height - m_pDetConfig->drawRoi.height) * 1.0f / std::min(bigRoi.height, m_pDetConfig->drawRoi.height);
printf("draw roi %s bigRoi %s widthDiff %f heightDiff %f\n", CheckUtil::GetRectString(m_pDetConfig->drawRoi).c_str(), CheckUtil::GetRectString(bigRoi).c_str(), widthDiff, heightDiff);
// printf("draw roi %s bigRoi %s widthDiff %f heightDiff %f\n", CheckUtil::GetRectString(m_pDetConfig->drawRoi).c_str(), CheckUtil::GetRectString(bigRoi).c_str(), widthDiff, heightDiff);
// 如果差异超过10%,抛出异常
if (widthDiff > 0.10)
{
@ -753,7 +753,7 @@ int AI_Edge_Algin::Dtet_small(const cv::Mat &img, vector<Rect> &smallRoiList, cv
if (!CheckUtil::RoiInImg(task->roi, img))
{
CheckUtil::printROI(task->roi, "small roi 1 ");
printf("img %d %d \n", img.cols, img.rows);
// printf("img %d %d \n", img.cols, img.rows);
}
task->input = img(smallRoiList.at(submitted)).clone();
@ -919,8 +919,8 @@ int Image_Feature_Algin::Detect(DetConfig *pDetConfig, Align_Result *pResult, st
int m_y = pDetConfig->feature_Roi.y * fy - pDetConfig->Search_Roi.y;
pResult->offt_x = bestMatch.x - m_x;
pResult->offt_y = bestMatch.y - m_y;
printf("m_x %d bestMatch.x %d offt_x %d\n", m_x, bestMatch.x, pResult->offt_x);
printf("m_y %d bestMatch.y %d offt_y %d\n", m_y, bestMatch.y, pResult->offt_y);
// printf("m_x %d bestMatch.x %d offt_x %d\n", m_x, bestMatch.x, pResult->offt_x);
// printf("m_y %d bestMatch.y %d offt_y %d\n", m_y, bestMatch.y, pResult->offt_y);
pResult->bDet = true;

@ -129,11 +129,11 @@ int AI_Edge_QX_Det::Detect(const cv::Mat &img, cv::Mat &detmask, DetConfig *pDet
m_pdetlog = pdetlog;
if (pDetConfig->ninstruct == 767)
{
nRuntype = 1;
// nRuntype = 1;
}
else if (pDetConfig->ninstruct == 768)
{
nRuntype = 2;
// nRuntype = 2;
}
bool bdege = false;

@ -22,7 +22,7 @@ AI_Mark_Det::~AI_Mark_Det()
int AI_Mark_Det::Detect(const cv::Mat &img, DetConfigResult *pDetConfig)
{
m_pdetlog = pDetConfig->pdetlog;
printf("AI_Mark_Det::Detect \n");
// printf("AI_Mark_Det::Detect \n");
cv::Rect searchroi = pDetConfig->searchroi;
if (searchroi.x < 0)

@ -81,10 +81,10 @@ int AI_SecondDet::Detect(const cv::Mat &img, const cv::Mat &mask, DetConfigResul
{
if (pDetConfig->pfunction_secondDet->pol_saveProcessImg)
{
printf("mask %d %d \n", mask.cols, mask.rows);
printf("AIroi %d %d %d %d\n", AIroi.x, AIroi.y, AIroi.width, AIroi.height);
// printf("mask %d %d \n", mask.cols, mask.rows);
// printf("AIroi %d %d %d %d\n", AIroi.x, AIroi.y, AIroi.width, AIroi.height);
detimg123 = mask(AIroi).clone();
printf("1111mask %d %d \n", mask.cols, mask.rows);
// printf("1111mask %d %d \n", mask.cols, mask.rows);
}
re12 = Det_Pol(detimg, pDetConfig);

@ -75,7 +75,7 @@ int ReadFlawCodeConfig(std::string json_path)
{
m_FlawCodeList.erase(m_FlawCodeList.begin(), m_FlawCodeList.end());
std::string strPath = json_path;
printf("ReadFlawCodeConfig path %s\n", strPath.c_str());
// printf("ReadFlawCodeConfig path %s\n", strPath.c_str());
Json::CharReaderBuilder builder;
builder["collectComments"] = true;
Json::Value root;
@ -83,12 +83,12 @@ int ReadFlawCodeConfig(std::string json_path)
std::ifstream ifs(strPath);
if (!ifs.is_open())
{
printf("error:file is open\n");
// printf("error:file is open\n");
return 0;
}
if (!Json::parseFromStream(builder, ifs, &root, &err))
{
printf("error:parseFromStream\n");
// printf("error:parseFromStream\n");
return 0;
}
@ -505,7 +505,7 @@ int ALLImgCheckAnalysisy::Det_Product(std::shared_ptr<Product> &product)
// AnalysiyAll(0);
MergeShowImg(product);
SetProductResult(product);
printf(">>>>>>>>>>>>>>>Det_Product****************det End************\n");
// printf(">>>>>>>>>>>>>>>Det_Product****************det End************\n");
return 0;
}
@ -629,7 +629,7 @@ int ALLImgCheckAnalysisy::PushInImg_New(std::shared_ptr<shareImage> p)
strBase += " Channel:";
strBase += p->strChannel;
printf("strBase %s p->Status %d\n", strBase.c_str(), p->Status);
// printf("strBase %s p->Status %d\n", strBase.c_str(), p->Status);
std::shared_ptr<Product> product;
{
std::string strcameraName = p->strParm_WorkCamName;
@ -655,13 +655,13 @@ int ALLImgCheckAnalysisy::PushInImg_New(std::shared_ptr<shareImage> p)
// 模式为第一张图,返回异常
if(IN_IMG_Status_Start == p->Status)
{
cout << "---ProductID_Exist && IN_IMG_Status_Start == p->Status---" << endl;
// cout << "---ProductID_Exist && IN_IMG_Status_Start == p->Status---" << endl;
return CHECK_ERROR_PRODUCT_ID_EXIST;
}
// 图片都已经完了的状态
if(product->bIsImgComplete)
{
cout << "---ProductID_Exist && product->bIsImgComplete is true---" << endl;
// cout << "---ProductID_Exist && product->bIsImgComplete is true---" << endl;
ErrorReturn(p);
return CHECK_ERROR_PRODUCT_ID_EXIST;
@ -672,7 +672,7 @@ int ALLImgCheckAnalysisy::PushInImg_New(std::shared_ptr<shareImage> p)
{
strlog += "isnot exist";
//设置其他m_ProductList送图状态设置为结束
cout << "-------set m_ProductList other product to end-------" << endl ;
// cout << "-------set m_ProductList other product to end-------" << endl ;
std::lock_guard<std::mutex> lock(mtx_ProductList);
for(auto &tem:m_ProductList){
tem->bIsImgComplete = true;
@ -705,7 +705,6 @@ int ALLImgCheckAnalysisy::PushInImg_New(std::shared_ptr<shareImage> p)
m_CurProductIdx++;
m_ProductList.push_back(product);
std::string strTimg = CheckUtil::getCurTimeHMS();
product->productBaseResult->detlog->bPrintStr = true;
product->productBaseResult->detlog->AddCheckstr(PrintLevel_0, "PushInImg", "add new product %s %s ", p->strImgProductID.c_str(), strTimg.c_str());
}
else
@ -731,7 +730,6 @@ int ALLImgCheckAnalysisy::PushInImg_New(std::shared_ptr<shareImage> p)
if (pCamera.get() == nullptr)
{
strlog += " | CHECK_ERROR_Camear_ID_Error";
product->productBaseResult->detlog->bPrintStr = true;
product->productBaseResult->detlog->AddCheckstr(PrintLevel_1, "PushInImg end", "%s", strlog.c_str());
ErrorReturn(p);
return CHECK_ERROR_Camear_ID_Error;
@ -748,7 +746,6 @@ int ALLImgCheckAnalysisy::PushInImg_New(std::shared_ptr<shareImage> p)
product->AddLog(m_strTest);
m_strTest = "";
}
product->productBaseResult->detlog->bPrintStr = true;
product->productBaseResult->detlog->AddCheckstr(PrintLevel_0, "PushInImg end", "%s", strlog.c_str());
ProductList_cond.notify_all();
}
@ -829,7 +826,7 @@ int ALLImgCheckAnalysisy::MergeShowImg(std::shared_ptr<Product> product)
void ALLImgCheckAnalysisy::Clear_m_ProductList(){
int num = m_ProductList.size();
string strlog = "";
printf("******************\n\n m_ProductImgDetResultList %ld \n", m_ProductList.size());
// printf("******************\n\n m_ProductImgDetResultList %ld \n", m_ProductList.size());
std::lock_guard<std::mutex> lock(mtx_ProductList);
int idx = -1;
for (int i = 0; i < m_ProductList.size(); i++)

@ -4,7 +4,7 @@
#include "BlobBase.h"
void pretest(double x)
{
printf("fff %f \n", x);
// printf("fff %f \n", x);
}
#define max(a, b) (((a) > (b)) ? (a) : (b))

@ -96,7 +96,7 @@ int CameraCheckAnalysisy::Detect_Pre()
strBasic = ">>" + strSN + " cam:" + m_strcameraName;
m_pdetlog->AddCheckstr(PrintLevel_1, "Detect_Pre", "%s ==================start",
strBasic.c_str());
printf( "%s ==================Detect_Pre start\n", strBasic.c_str());
// printf( "%s ==================Detect_Pre start\n", strBasic.c_str());
std::shared_ptr<ImageAllResult> L255 = m_pCheck_Result->GetL255DetImg();
@ -280,7 +280,7 @@ int CameraCheckAnalysisy::Detect_Images()
long te = CheckUtil::getcurTime();
m_pdetlog->AddCheckstr(PrintLevel_0, "Detect_Images", "Cam %s =====ALL image det complate time %ld ms=============End", strBasic.c_str(), te - ts);
// getchar();
printf("Cam %s =====ALL image det complate time %ld ms=============End \n", strBasic.c_str(), te - ts);
// printf("Cam %s =====ALL image det complate time %ld ms=============End \n", strBasic.c_str(), te - ts);
return 0;
}
@ -367,8 +367,8 @@ int CameraCheckAnalysisy::ResultParamJudge()
// m_pdetlog->AddCheckstr(PrintLevel_1, "ResultParamJudge", " det time %ld ms judge %ld draw %ld", t3 - t1, t2 - t1, t3 - t2);
// 把结果转成 json 保存。 用以复测
std::shared_ptr<CheckResult> m_CheckResult_shareP = m_pCheck_Result->ImageALLDetResultList.at(imgidx)->result;
m_CheckResult_shareP->strResultJson = m_CheckResultJson.GetResultString(m_pCheck_Result->ImageALLDetResultList.at(imgidx)->pDetResult);
// std::shared_ptr<CheckResult> m_CheckResult_shareP = m_pCheck_Result->ImageALLDetResultList.at(imgidx)->result;
// m_CheckResult_shareP->strResultJson = m_CheckResultJson.GetResultString(m_pCheck_Result->ImageALLDetResultList.at(imgidx)->pDetResult);
}
long te = CheckUtil::getcurTime();
m_pdetlog->AddCheckstr(PrintLevel_1, "ResultParamJudge", "==================End time %ld ms ", te - ts);
@ -434,7 +434,7 @@ int CameraCheckAnalysisy::ImgEdge(std::shared_ptr<ImageAllResult> L255, ChannelC
m_pdetlog->AddCheckstr(PrintLevel_1, "ImgEdge", "==================start %s ", m_strcameraName.c_str());
Function_EdgeROI *pEdgeROI;
pEdgeROI = &pFuntion_L255->function.f_EdgeROI;
pEdgeROI->print("pEdgeROI");
// pEdgeROI->print("pEdgeROI");
Function_Image_Align *pAlign;
pAlign = &pFuntion_L255->function.f_Image_Align;
@ -892,10 +892,8 @@ int CameraCheckAnalysisy::CheckImgRun()
std::string strCameraName = m_pCheck_Result->cameraBaseResult->strCameraName;
int re = 0;
Check_Step curcheckStep = m_pCheck_Result->GetCheckStep();
m_pdetlog->bPrintStr = false;
m_pdetlog->AddCheckstr(PrintLevel_1, "CheckImgRun", "Cam %s ------Product_Off_X_mm %f ",
m_strcameraName.c_str(), m_AnalysisyConfig.commonCheckConfig.baseConfig.fProduct_Off_X_mm);
m_pdetlog->bPrintStr = true;
// 如果是未检测状态,则开始预处理
if (curcheckStep == Check_Step_NODet)
{
@ -1235,7 +1233,7 @@ static std::string SanitizePathComponent(const std::string& input) {
int CameraCheckAnalysisy::ngImgSave() {
// 拷贝智能指针,保证在异步任务中引用计数有效
auto result_copy = m_pCheck_Result;
std::string save_path_root = "/home/aidlux/BOE/CELL_ET/cloud/";
std::string save_path_root = "/home/aidlux/BOE/FOG/cloud/";
auto task = std::async(std::launch::async, [result_copy, save_path_root]() {
try {

@ -3,7 +3,7 @@
* @Date: 2025-09-13 20:39:37
* @LastEditors: xiewenji 527774126@qq.com
* @LastEditTime: 2025-09-24 14:17:12
* @FilePath: /BOE_CELL_AOI_Detect/AlgorithmModule/src/CameraResult.cpp
* @FilePath: /BOE_FOG_Detect/AlgorithmModule/src/CameraResult.cpp
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
#include "CameraResult.h"
@ -64,7 +64,6 @@ int CameraResult::AddDetImage(std::shared_ptr<shareImage> p)
}
}
std::string strTimg = CheckUtil::getCurTimeHMS();
detlog->bPrintStr = true;
detlog->AddCheckstr(PrintLevel_0, "PushInImg", " product %s Cam %s add new image channel = %s sum img %ld %s",
productBaseResult->strproductName.c_str(),
cameraBaseResult->strCameraName.c_str(), imgResult->strChannel.c_str(), ImageALLDetResultList.size(), strTimg.c_str());

@ -190,7 +190,7 @@ int Edge_Search::Detect_AI(const cv::Mat &detimg, DetConfigResult *pDetConfig, s
if (re != 0)
{
printf("AIEdgeDete error \n");
// printf("AIEdgeDete error \n");
return re;
}
pEdgeDetResult->nresult = 0;
@ -329,7 +329,7 @@ int Edge_Search::Detect_Draw(const cv::Mat &detimg, DetConfigResult *pDetConfig,
cv::Mat temimg;
cv::threshold(detimg(roi), temimg, threshold_value, max_value, threshold_type);
printf("threshold_value %d\n", threshold_value);
// printf("threshold_value %d\n", threshold_value);
// 定义膨胀核
int dilation_size = 3; // 膨胀核的大小
if (pEdgeROI->AI_Erode_Size > 0 && pEdgeROI->AI_Erode_Size < 101)
@ -341,8 +341,8 @@ int Edge_Search::Detect_Draw(const cv::Mat &detimg, DetConfigResult *pDetConfig,
// 进行膨胀操作
cv::Mat dilated_image;
cv::dilate(temimg, dilated_image, kernel);
printf("detMaskImg= %d %d %d\n", detMaskImg.cols, detMaskImg.rows, detMaskImg.channels());
printf("dilated_image= %d %d %d\n", dilated_image.cols, dilated_image.rows, dilated_image.channels());
// printf("detMaskImg= %d %d %d\n", detMaskImg.cols, detMaskImg.rows, detMaskImg.channels());
// printf("dilated_image= %d %d %d\n", dilated_image.cols, dilated_image.rows, dilated_image.channels());
detMaskImg += dilated_image;
}
pEdgeDetResult->shieldMask = detMaskImg;
@ -498,7 +498,7 @@ int Edge_Search::SearchEdge(const cv::Mat &detimg, cv::Rect &roi, bool bsave)
int re = UDNoiseEdgeDetect(img, 3, 40, 1, detroi, 30, 60);
if (re < 0)
{
printf("edge error 1 %d \n", re);
// printf("edge error 1 %d \n", re);
return re;
}
roi.y = re + exp;
@ -508,7 +508,7 @@ int Edge_Search::SearchEdge(const cv::Mat &detimg, cv::Rect &roi, bool bsave)
cv::Point p1 = cv::Point(0, re);
cv::Point p2 = cv::Point(img.cols, re);
cv::line(showimg, p1, p2, cv::Scalar(255, 0, 255), 5);
printf(">>>>>1>>000000>\n");
// printf(">>>>>1>>000000>\n");
}
// cv::Point p1 = cv::Point(0, re);
// cv::Point p2 = cv::Point(img.cols, re);
@ -678,8 +678,8 @@ int Edge_Search::Feature_Align(const cv::Mat &detimg, DetConfigResult *pDetConfi
// cv::imwrite("Align_Kernel_img.png", pFuntion_L255->function.f_Image_Align.feature_Mask);
// cv::imwrite("detmaskssss.png", m_DetEdge.detmask);
// cv::imwrite("ssss.png", L255->in_shareImage->img);
CheckUtil::printROI(Det_CropRoi, "Det Img Crop Roi");
CheckUtil::printROI(pAlign->Crop_Roi, "Param Img Crop Roi");
// CheckUtil::printROI(Det_CropRoi, "Det Img Crop Roi");
// CheckUtil::printROI(pAlign->Crop_Roi, "Param Img Crop Roi");
Image_Feature_Algin::DetConfig detconfig;
detconfig.DetImg = detImg_mask;
detconfig.TemplateImg = pAlign->feature_Mask;
@ -771,13 +771,13 @@ int Edge_Search::UDNoiseEdgeDetect(cv::Mat img, int DirectSign, int Gate, int Bo
}
if (img.channels() != 1)
{
printf("*****************************channels\n");
// printf("*****************************channels\n");
return -12;
}
if (StepCount < 0 || StepCount >= roi.width)
{
printf("*****************************StepCount\n");
// printf("*****************************StepCount\n");
return -22;
}
@ -1023,13 +1023,13 @@ int Edge_Search::LRNoiseEdgeDetect(cv::Mat img, int DirectSign, int Gate, int Bo
}
if (img.channels() != 1)
{
printf("*****************************channels\n");
// printf("*****************************channels\n");
return -1;
}
if (StepCount < 0 || StepCount >= roi.width)
{
printf("*****************************StepCount\n");
// printf("*****************************StepCount\n");
return -2;
}

@ -3,7 +3,7 @@
* @Date: 2025-09-13 20:39:37
* @LastEditors: xiewenji 527774126@qq.com
* @LastEditTime: 2025-09-24 14:17:55
* @FilePath: /BOE_CELL_AOI_Detect/AlgorithmModule/src/CameraResult.cpp
* @FilePath: /BOE_FOG_Detect/AlgorithmModule/src/CameraResult.cpp
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
#include "ImageAllResult.h"

@ -185,7 +185,7 @@ int ImageMerge::GetRectAndPoint(const cv::Mat &img, cv::Rect &roi, cv::Point &me
int re123 = GetEdgePoint(img, &config, A_line_up);
if (re123 != 0)
{
printf("DirectSign_UP::111111111111GetEdgePoint111111 A_line_up %d\n", re123);
// printf("DirectSign_UP::111111111111GetEdgePoint111111 A_line_up %d\n", re123);
return 1;
}
@ -205,7 +205,7 @@ int ImageMerge::GetRectAndPoint(const cv::Mat &img, cv::Rect &roi, cv::Point &me
re123 = GetEdgePoint(img, &config, A_line_down);
if (re123 != 0)
{
printf("DirectSign_UP::111111111111GetEdgePoint111111 A_line_down %d\n", re123);
// printf("DirectSign_UP::111111111111GetEdgePoint111111 A_line_down %d\n", re123);
return 1;
}

@ -732,10 +732,8 @@ int ImageResultJudge::ResultJudge(std::shared_ptr<ImageAllResult> pImageResult)
break;
}
}
pImageLog->bPrintStr = true;
pImageLog->AddCheckstr(PrintLevel_1, DET_LOG_LEVEL_3, "Param Judge", "img %s ====================End ng %d ys %d ok %d nojudge %d ",
pImageResult->strChannel.c_str(), pImageResult->NG_num, pImageResult->YS_num, pImageResult->Ok_num, pImageResult->NoJudge_num);
pImageLog->bPrintStr = false;
return 0;
}

@ -3,7 +3,7 @@
* @Date: 2025-09-11 15:32:52
* @LastEditors: xiewenji 527774126@qq.com
* @LastEditTime: 2025-09-16 09:40:36
* @FilePath: /BOE_CELL_AOI_Detect/AlgorithmModule/src/ImageStorage.cpp
* @FilePath: /BOE_FOG_Detect/AlgorithmModule/src/ImageStorage.cpp
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
#include "ImageStorage.h"

@ -52,22 +52,22 @@ int ImgCheckAnalysisy::UpdateConfig(void *pconfig, int nConfigType)
re = LoadRunConfig(pconfig);
if (re == 0)
{
printf("---> LoadRunConfig Succ\n");
// printf("---> LoadRunConfig Succ\n");
}
else
{
printf("---> LoadRunConfig Fail\n");
// printf("---> LoadRunConfig Fail\n");
}
break;
case CHECK_CONFIG_Module:
re = LoadCheckConfig(pconfig);
if (re == 0)
{
printf("---> LoadAnalysisConfig Succ\n");
// printf("---> LoadAnalysisConfig Succ\n");
}
else
{
printf("---> LoadAnalysisConfig Fail\n");
// printf("---> LoadAnalysisConfig Fail\n");
}
break;
default:
@ -100,7 +100,7 @@ int ImgCheckAnalysisy::RunStart(void *pconfig1)
runner->Start();
m_nErrorCode = CHECK_OK;
printf("ImgCheckAnalysisy >>>> ImgCheckThread %d Start Succ \n", m_nThreadIdx);
// printf("ImgCheckAnalysisy >>>> ImgCheckThread %d Start Succ \n", m_nThreadIdx);
return m_nErrorCode;
}
@ -423,7 +423,6 @@ int ImgCheckAnalysisy::CheckRun()
{
m_pdetlog->bPrintStr = true;
}
m_pdetlog->bPrintStr = true;
m_pdetlog->AddCheckstr(PrintLevel_0, "1、basic Info", "---------------------------1、basic Info---------------------------------");
m_pdetlog->AddCheckstr(PrintLevel_0, "Version", "%s", GetVersion().c_str());

@ -3,7 +3,7 @@
* @Date: 2025-09-13 19:26:19
* @LastEditors: xiewenji 527774126@qq.com
* @LastEditTime: 2025-09-17 18:10:38
* @FilePath: /BOE_CELL_AOI_Detect/AlgorithmModule/src/Product.cpp
* @FilePath: /BOE_FOG_Detect/AlgorithmModule/src/Product.cpp
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*
*/
@ -34,7 +34,6 @@ std::shared_ptr<CameraResult> Product::GetCameraResult(std::string strcameraName
return ptr;
}
}
productBaseResult->detlog->bPrintStr = true;
// 不存在,创建新的 CameraResult 并插入 map
std::shared_ptr<CameraResult> newResult = std::make_shared<CameraResult>();
newResult->productBaseResult = productBaseResult;

@ -347,7 +347,7 @@ struct AandEParam
}
void print(std::string str)
{
printf("%s bEnable %d bOk %d area %f area_max %f energy %f hj %f length %f num %d dis %f density %f \n", str.c_str(), bEnable, bOk, area, area_max, energy, hj, length, num, dis, density);
// printf("%s bEnable %d bOk %d area %f area_max %f energy %f hj %f length %f num %d dis %f density %f \n", str.c_str(), bEnable, bOk, area, area_max, energy, hj, length, num, dis, density);
}
void copy(AandEParam tem)
{
@ -706,13 +706,13 @@ struct Function_Base_Det
}
void print(std::string str)
{
printf("%s>>bOpen %d strAIMode %s ", str.c_str(), bOpen, strAIMode.c_str());
// printf("%s>>bOpen %d strAIMode %s ", str.c_str(), bOpen, strAIMode.c_str());
for (int i = 0; i < DetQXList.size(); i++)
{
printf("%s ", DetQXList.at(i).c_str());
}
printf(" \n");
// for (int i = 0; i < DetQXList.size(); i++)
// {
// printf("%s ", DetQXList.at(i).c_str());
// }
// printf(" \n");
}
std::string GetInfo(std::string str)
@ -751,7 +751,7 @@ struct Function_Use_UP_QX
}
void print(std::string str)
{
printf("%s>>bOpen %d, IOU %f \n", str.c_str(), bOpen, fIOU);
// printf("%s>>bOpen %d, IOU %f \n", str.c_str(), bOpen, fIOU);
}
std::string GetInfo(std::string str)
{
@ -779,7 +779,7 @@ struct Function_OnlyBLob
}
void print(std::string str)
{
printf("%s>>bOpen %d\n", str.c_str(), bOpen);
// printf("%s>>bOpen %d\n", str.c_str(), bOpen);
}
std::string GetInfo(std::string str)
{
@ -810,7 +810,7 @@ struct Function_YXDet
}
void print(std::string str)
{
printf("%s>>bOpen %d strModle %s\n", str.c_str(), bOpen, strModle.c_str());
// printf("%s>>bOpen %d strModle %s\n", str.c_str(), bOpen, strModle.c_str());
}
std::string GetInfo(std::string str)
{
@ -849,8 +849,8 @@ struct Function_AI_QX
}
void print(std::string str)
{
printf("%s>>bOpen %d POLToWhitePOL %d AllToChess %d 127WhitePOl_UseDP %d 127WhitePOl_DP_IOU %f\n",
str.c_str(), bOpen, bPOLToWhitePOL, bAllToChess, b127WhitePOl_UseDP, f127WhitePOl_DP_IOU);
// printf("%s>>bOpen %d POLToWhitePOL %d AllToChess %d 127WhitePOl_UseDP %d 127WhitePOl_DP_IOU %f\n",
// str.c_str(), bOpen, bPOLToWhitePOL, bAllToChess, b127WhitePOl_UseDP, f127WhitePOl_DP_IOU);
}
std::string GetInfo(std::string str)
{
@ -891,7 +891,7 @@ struct Function_AI_LD
}
void print(std::string str)
{
printf("%s>>bOpen %d bUseDP %d bWTBLD %d bHSLD %d fDP_IOU %f\n", str.c_str(), bOpen, bUseDP, bWTBLD, bHSLD, fDP_IOU);
// printf("%s>>bOpen %d bUseDP %d bWTBLD %d bHSLD %d fDP_IOU %f\n", str.c_str(), bOpen, bUseDP, bWTBLD, bHSLD, fDP_IOU);
}
std::string GetInfo(std::string str)
{

@ -3,7 +3,7 @@
* @Date: 2025-09-11 15:32:54
* @LastEditors: xiewenji 527774126@qq.com
* @LastEditTime: 2025-09-13 18:49:40
* @FilePath: /BOE_CELL_AOI_Detect/ConfigModule/include/ConfigBase.h
* @FilePath: /BOE_FOG_Detect/ConfigModule/include/ConfigBase.h
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
#ifndef ConfigBase_H_

Loading…
Cancel
Save