Commit 7bde9abc4816ffb83258b34966362d009b153c80

Authored by bhklein
1 parent 8ef38ce8

isnan compile error

Showing 1 changed file with 8 additions and 8 deletions
openbr/janus.cpp
... ... @@ -94,10 +94,10 @@ janus_error janus_detect(const janus_image image, janus_attributes *attributes_a
94 94 janus_error janus_augment(const janus_image image, janus_attributes *attributes, janus_template template_)
95 95 {
96 96 Template t;
97   - if (isnan(attributes->face_x) ||
98   - isnan(attributes->face_y) ||
99   - isnan(attributes->face_width) ||
100   - isnan(attributes->face_height))
  97 + if (std::isnan(attributes->face_x) ||
  98 + std::isnan(attributes->face_y) ||
  99 + std::isnan(attributes->face_width) ||
  100 + std::isnan(attributes->face_height))
101 101 return JANUS_MISSING_ATTRIBUTES;
102 102  
103 103 QRectF rect(attributes->face_x,
... ... @@ -117,10 +117,10 @@ janus_error janus_augment(const janus_image image, janus_attributes *attributes,
117 117  
118 118 input = input(cv::Rect(rect.x(), rect.y(), rect.width(), rect.height())).clone();
119 119 t.append(input);
120   - if (!isnan(attributes->right_eye_x) &&
121   - !isnan(attributes->right_eye_y) &&
122   - !isnan(attributes->left_eye_x) &&
123   - !isnan(attributes->left_eye_y)) {
  120 + if (!std::isnan(attributes->right_eye_x) &&
  121 + !std::isnan(attributes->right_eye_y) &&
  122 + !std::isnan(attributes->left_eye_x) &&
  123 + !std::isnan(attributes->left_eye_y)) {
124 124 t.file.set("Affine_0", QPointF(attributes->right_eye_x - rect.x(), attributes->right_eye_y - rect.y()));
125 125 t.file.set("Affine_1", QPointF(attributes->left_eye_x - rect.x(), attributes->left_eye_y - rect.y()));
126 126 t.file.set("First_Eye", t.file.get<QPointF>("Affine_0"));
... ...