Commit b19c6765 authored by Lluis Gomez-Bigorda's avatar Lluis Gomez-Bigorda

fix Win x64 and iOS warnings

parent 7cd6dbb0
...@@ -211,7 +211,7 @@ public: ...@@ -211,7 +211,7 @@ public:
if (recognition_probabilities[i][j] > best_p) if (recognition_probabilities[i][j] > best_p)
{ {
best_p = recognition_probabilities[i][j]; best_p = recognition_probabilities[i][j];
best_idx = j; best_idx = (int)j;
} }
} }
...@@ -261,8 +261,8 @@ public: ...@@ -261,8 +261,8 @@ public:
{ {
beamSearch_node node; beamSearch_node node;
node.segmentation.push_back(i); node.segmentation.push_back((int)i);
node.segmentation.push_back(j); node.segmentation.push_back((int)j);
node.score = score_segmentation(node.segmentation, out_sequence); node.score = score_segmentation(node.segmentation, out_sequence);
vector< vector<int> > childs = generate_childs( node.segmentation ); vector< vector<int> > childs = generate_childs( node.segmentation );
node.expanded = true; node.expanded = true;
...@@ -320,7 +320,7 @@ private: ...@@ -320,7 +320,7 @@ private:
vector< vector<int> > childs; vector< vector<int> > childs;
for (size_t i=segmentation[segmentation.size()-1]+1; i<oversegmentation.size(); i++) for (size_t i=segmentation[segmentation.size()-1]+1; i<oversegmentation.size(); i++)
{ {
int seg_point = i; int seg_point = (int)i;
if (find(segmentation.begin(), segmentation.end(), seg_point) == segmentation.end()) if (find(segmentation.begin(), segmentation.end(), seg_point) == segmentation.end())
{ {
vector<int> child = segmentation; vector<int> child = segmentation;
...@@ -368,16 +368,16 @@ private: ...@@ -368,16 +368,16 @@ private:
// in other cases we do it because the overlapping between two chars is too large // in other cases we do it because the overlapping between two chars is too large
// TODO Add more heuristics (e.g. penalize large inter-character variance) // TODO Add more heuristics (e.g. penalize large inter-character variance)
Mat interdist (segmentation.size()-1, 1, CV_32F, 1); Mat interdist ((int)segmentation.size()-1, 1, CV_32F, 1);
for (size_t i=0; i<segmentation.size()-1; i++) for (size_t i=0; i<segmentation.size()-1; i++)
{ {
interdist.at<float>(i,0) = oversegmentation[segmentation[i+1]]*step_size - interdist.at<float>(i,0) = (float)oversegmentation[segmentation[(int)i+1]]*step_size -
oversegmentation[segmentation[i]]*step_size; (float)oversegmentation[segmentation[(int)i]]*step_size;
if ((float)interdist.at<float>(i,0)/win_size > 2.25) // TODO explain how did you set this thrs if ((float)interdist.at<float>((int)i,0)/win_size > 2.25) // TODO explain how did you set this thrs
{ {
return -DBL_MAX; return -DBL_MAX;
} }
if ((float)interdist.at<float>(i,0)/win_size < 0.15) // TODO explain how did you set this thrs if ((float)interdist.at<float>((int)i,0)/win_size < 0.15) // TODO explain how did you set this thrs
{ {
return -DBL_MAX; return -DBL_MAX;
} }
...@@ -517,7 +517,7 @@ OCRBeamSearchClassifierCNN::OCRBeamSearchClassifierCNN (const string& filename) ...@@ -517,7 +517,7 @@ OCRBeamSearchClassifierCNN::OCRBeamSearchClassifierCNN (const string& filename)
nr_feature = weights.rows; nr_feature = weights.rows;
nr_class = weights.cols; nr_class = weights.cols;
patch_size = sqrt(kernels.cols); patch_size = (int)sqrt(kernels.cols);
window_size = 4*patch_size; window_size = 4*patch_size;
step_size = 4; step_size = 4;
quad_size = 12; quad_size = 12;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment