Compare commits

..

No commits in common. 'e19bdc7d5331b8ae334b521ac2ea2aad42044ec2' and '68f0d4aa45d2f031e2404c02d353ff1d8c1c8925' have entirely different histories.

@ -4,10 +4,6 @@
#include "Define.h" #include "Define.h"
#include <omp.h> #include <omp.h>
#include "AICommonDefine.h" #include "AICommonDefine.h"
// BQ blob 来源标记:写入 ERROR_DOTS_BLOB_DATA::UserErrorType 字段。
// BQ blob 的分类结果会覆盖 ErrType,用该标记记录来源掩码是 BQ mask,
// 供 CalBlob_Other / CalBLobMean_GrayDis 在计算能量、灰度时选中正确的 mask。
static const int BQ_BLOB_SOURCE_FLAG = -100;
// 用于排序轮廓的比较函数 // 用于排序轮廓的比较函数
static bool compareContourAreas(const vector<Point> &contour1, const vector<Point> &contour2) static bool compareContourAreas(const vector<Point> &contour1, const vector<Point> &contour2)
{ {
@ -174,7 +170,7 @@ int ImgCheckAnalysisy::GetStatus()
std::string ImgCheckAnalysisy::GetVersion() std::string ImgCheckAnalysisy::GetVersion()
{ {
return std::string("BOE_1.3.10_" + std::string(__DATE__) + "_" + std::string(__TIME__)); return std::string("BOE_1.3.9_" + std::string(__DATE__) + "_" + std::string(__TIME__));
} }
std::string ImgCheckAnalysisy::GetErrorInfo() std::string ImgCheckAnalysisy::GetErrorInfo()
@ -310,7 +306,8 @@ cv::Scalar ImgCheckAnalysisy::calc_blob_info_withstats(cv::Mat &img, const cv::M
// CheckUtil::printROI(roi, "roi-----------"); // CheckUtil::printROI(roi, "roi-----------");
// printf("img --%d %d \n", img.cols, img.rows); // printf("img --%d %d \n", img.cols, img.rows);
// printf("mask --%d %d \n", mask.cols, mask.rows); // printf("mask --%d %d \n", mask.cols, mask.rows);
cv::Mat cmask = mask(roi); // getchar(); cv::Mat cmask = mask(roi);
// getchar();
// 扩张掩膜 // 扩张掩膜
cv::Scalar mean_bk = cv::mean(cimg, ~cmask); cv::Scalar mean_bk = cv::mean(cimg, ~cmask);
@ -749,13 +746,8 @@ int ImgCheckAnalysisy::CalBlob_Other()
int config_qx_type = blobs.blobTab[i].ErrType; int config_qx_type = blobs.blobTab[i].ErrType;
std::shared_ptr<ImageAllResult::Image_AI_Det_Result> pDetAIResult = m_pImageAllResult->qx_DetAIResult; std::shared_ptr<ImageAllResult::Image_AI_Det_Result> pDetAIResult = m_pImageAllResult->qx_DetAIResult;
// BQ 标签检测的 blob:来源 mask 是 BQ mask(分类线程会改 ErrType,靠 UserErrorType 标记识别)
if (blobs.blobTab[i].UserErrorType == BQ_BLOB_SOURCE_FLAG && m_pImageAllResult->bq_DetAIResult)
{
pDetAIResult = m_pImageAllResult->bq_DetAIResult;
}
// 127cell 检测类型。 // 127cell 检测类型。
else if (config_qx_type == CONFIG_QX_NAME_white_Cell || config_qx_type == CONFIG_QX_NAME_black_Cell) if (config_qx_type == CONFIG_QX_NAME_white_Cell || config_qx_type == CONFIG_QX_NAME_black_Cell)
{ {
pDetAIResult = m_pImageAllResult->cell127_DetAIResult; pDetAIResult = m_pImageAllResult->cell127_DetAIResult;
} }
@ -1099,13 +1091,8 @@ int ImgCheckAnalysisy::CalBLobMean_GrayDis()
int config_qx_type = blobs.blobTab[i].ErrType; int config_qx_type = blobs.blobTab[i].ErrType;
std::shared_ptr<ImageAllResult::Image_AI_Det_Result> pDetAIResult = m_pImageAllResult->qx_DetAIResult; std::shared_ptr<ImageAllResult::Image_AI_Det_Result> pDetAIResult = m_pImageAllResult->qx_DetAIResult;
// BQ 标签检测的 blob:来源 mask 是 BQ mask(分类线程会改 ErrType,靠 UserErrorType 标记识别)
if (blobs.blobTab[i].UserErrorType == BQ_BLOB_SOURCE_FLAG && m_pImageAllResult->bq_DetAIResult)
{
pDetAIResult = m_pImageAllResult->bq_DetAIResult;
}
// 127cell 检测类型。 // 127cell 检测类型。
else if (config_qx_type == CONFIG_QX_NAME_white_Cell || config_qx_type == CONFIG_QX_NAME_black_Cell) if (config_qx_type == CONFIG_QX_NAME_white_Cell || config_qx_type == CONFIG_QX_NAME_black_Cell)
{ {
pDetAIResult = m_pImageAllResult->cell127_DetAIResult; pDetAIResult = m_pImageAllResult->cell127_DetAIResult;
} }
@ -2615,7 +2602,6 @@ int ImgCheckAnalysisy::GetBlob_BQ()
for (int i = 0; i < blobs_bq.blobCount; i++) for (int i = 0; i < blobs_bq.blobCount; i++)
{ {
blobs_bq.blobTab[i].ErrType = CONFIG_QX_NAME_LD; // 以亮点作为初始类型,后续分类修正 blobs_bq.blobTab[i].ErrType = CONFIG_QX_NAME_LD; // 以亮点作为初始类型,后续分类修正
blobs_bq.blobTab[i].UserErrorType = BQ_BLOB_SOURCE_FLAG; // 标记来源=BQ mask,能量/灰度按 BQ mask 计算
} }
// 将BQ的blob汇入主blob列表 // 将BQ的blob汇入主blob列表

Loading…
Cancel
Save