Skip to content

Commit

Permalink
removed comma from number
Browse files Browse the repository at this point in the history
  • Loading branch information
atosh502 committed Mar 12, 2017
1 parent ca9edb8 commit 85a0ee2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/manager/mainWindow.hh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <glibmm.h>
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include "../daemon/ImageDetails.hh"
#include "myarea.hh"
#include "proxy.hh"
Expand Down Expand Up @@ -194,10 +195,18 @@ void MainWindow::load_scrolled_window()
{
damn_integers = get_various_strings(finally_int_string, '$');
// there are 6 integers x, y, width, length, label, confidence

// remove comma from x co-ordinate
std::string x = damn_integers[0];
x.erase(std::remove(x.begin(), x.end(), ','), x.end());

std::string y = damn_integers[1];
y.erase(std::remove(y.begin(), y.end(), ','), y.end());

temp_faces.push_back(
FaceDetail(
cv::Rect(
atoi(damn_integers[0].c_str()) /* x */, atoi(damn_integers[1].c_str()) /* y */,
atoi(x.c_str()) /* x */, atoi(y.c_str()) /* y */,
atoi(damn_integers[2].c_str())/*width*/, atoi(damn_integers[3].c_str()) /*length*/
),
atoi(damn_integers[4].c_str()) /*label*/,
Expand Down

0 comments on commit 85a0ee2

Please sign in to comment.