|
@@ -731,8 +731,8 @@ namespace OnLineCard{
|
|
|
{
|
|
|
//根据图片像素比例调整定位点检查区域高度
|
|
|
double dLocPointHeight = m_pTemplate->pages[1].location.at(0).pos.h;
|
|
|
- m_pTemplate->dingweidian_range_top = dLocPointHeight * 5 * src_gray_img->height / m_pTemplate->pages[1].h;
|
|
|
- m_pTemplate->dingweidian_rang_buttom = dLocPointHeight * 5 * src_gray_img->height / m_pTemplate->pages[1].h;
|
|
|
+ m_pTemplate->dingweidian_range_top = dLocPointHeight * 6 * src_gray_img->height / m_pTemplate->pages[1].h;
|
|
|
+ m_pTemplate->dingweidian_rang_buttom = dLocPointHeight * 6 * src_gray_img->height / m_pTemplate->pages[1].h;
|
|
|
}
|
|
|
int range = m_pTemplate->dingweidian_range_top;
|
|
|
//LOGFMTI("MyFindDingWeiDian 1 range=%d", range);
|
|
@@ -1084,7 +1084,8 @@ namespace OnLineCard{
|
|
|
rc_tmp.height = lcs[j].pos.h;
|
|
|
vec_locations_word.push_back(rc_tmp);
|
|
|
}
|
|
|
- wordloctlt = vec_locations_word[3].y - vec_locations_word[0].y;
|
|
|
+ std::sort(vec_locations_word.begin(), vec_locations_word.end(), sort_locate_point_by_y);
|
|
|
+ wordloctlt = vec_locations_word[vec_locations_word.size() - 1].y - vec_locations_word[0].y;
|
|
|
double word_w = page.w;
|
|
|
double word_h = page.h;
|
|
|
tt[2] = word_w;
|
|
@@ -1224,7 +1225,9 @@ namespace OnLineCard{
|
|
|
int m = 0;
|
|
|
dingweidianH = m_pTemplate->pages[1].location[m].pos.h;
|
|
|
dingweidianW = m_pTemplate->pages[1].location[m].pos.w;
|
|
|
- m_default_schema_param.main_locate_point_distance = m_pTemplate->pages[1].location[m + 2].pos.x - m_pTemplate->pages[1].location[m].pos.x;
|
|
|
+ std::vector<Location> vecLocation = m_pTemplate->pages[1].location;
|
|
|
+ std::sort(vecLocation.begin(), vecLocation.end(), [=](Location l1, Location l2){ return l1.pos.x < l2.pos.x; });
|
|
|
+ m_default_schema_param.main_locate_point_distance = vecLocation.at(vecLocation.size() - 1).pos.x - vecLocation.begin()->pos.x;
|
|
|
m_default_schema_param.shijuanwidth = m_pTemplate->pages[1].w;
|
|
|
for (int i = 0; i < 4; i++)
|
|
|
{
|