Skip to content

Commit

Permalink
added both height and top in csv
Browse files Browse the repository at this point in the history
  • Loading branch information
dsgou committed May 5, 2016
1 parent f0332f1 commit 82a3342
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Binary file removed fusion/camera_rgb_optical_frame.jpg
Binary file not shown.
1 change: 1 addition & 0 deletions fusion/include/fusion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class Fusion_processing
float x = 0.0;
float y = 0.0;
float z = 0.0;
float top = 0.0;
float height = 0.0;
float distance = 0.0;
};
Expand Down
6 changes: 3 additions & 3 deletions fusion/src/fusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ Fusion_processing::Fusion_processing()
}
}


Fusion_processing::~Fusion_processing()
{
//destroy GUI windows
Expand Down Expand Up @@ -219,12 +218,12 @@ void Fusion_processing::writeCSV(Fusion_processing::People& collection, string p
<<pos.x<<"\t"
<<pos.y<<"\t"
<<pos.z<<"\t"
<<pos.top<<"\t"
<<pos.height<<"\t"
<<pos.distance<<
endl;

}

storage.close();
}
}
Expand Down Expand Up @@ -640,7 +639,8 @@ void Fusion_processing::calculatePosition(Rect_<int>& rect, Fusion_processing::P
ver_y = (depth_height/2 - ver_y);

bottom = depth * ver_y / hor_focal;
pos.height = abs(top);// - bottom);
pos.top = abs(top);
pos.height = abs(top - bottom);

}

Expand Down
2 changes: 1 addition & 1 deletion fusion/src/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ string Utility::initialize(string path_, bool create_csv, bool save_images)
pchar = (session_path + "/csv/session.csv").c_str();
ofstream storage;
storage.open (pchar,ios::out | ios::app );
storage<<"Timestamp\tRect_id\tRect_x\tRect_y\tRect_W\tRect_H\tMeter_X\tMeter_Y\tMeter_Z\tHeight\tDistance"<<endl;
storage<<"Timestamp\tRect_id\tRect_x\tRect_y\tRect_W\tRect_H\tMeter_X\tMeter_Y\tMeter_Z\tTop\tHeight\tDistance"<<endl;
storage.close();
}
return (session_path).c_str();
Expand Down

0 comments on commit 82a3342

Please sign in to comment.