mirror of
https://github.com/doomertheboomer/depthrush.git
synced 2026-09-04 14:54:29 -05:00
add calibration saving
This commit is contained in:
@@ -2,6 +2,23 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
// load config from ini
|
||||
mINI::INIFile file("depthrush.ini");
|
||||
mINI::INIStructure ini;
|
||||
file.read(ini);
|
||||
std::string& readValue = ini["calibration"]["xGrad"];
|
||||
float xGrad = std::stof(readValue);
|
||||
readValue = ini["calibration"]["xOffset"];
|
||||
float xOffset = std::stof(readValue);
|
||||
readValue = ini["calibration"]["yGrad"];
|
||||
float yGrad = std::stof(readValue);
|
||||
readValue = ini["calibration"]["yOffset"];
|
||||
float yOffset = std::stof(readValue);
|
||||
readValue = ini["calibration"]["zGrad"];
|
||||
float zGrad = std::stof(readValue);
|
||||
readValue = ini["calibration"]["zOffset"];
|
||||
float zOffset = std::stof(readValue);
|
||||
|
||||
int choice = 0;
|
||||
std::cout << "Depthrush test application\n";
|
||||
std::cout << "1. Calibrate Kinect\n";
|
||||
@@ -13,7 +30,7 @@ int main()
|
||||
return 0;
|
||||
}
|
||||
else if (choice == 2) {
|
||||
kinectTest(1, 1, 1, 1, 1, 1);
|
||||
kinectTest(xGrad, xOffset, yGrad, yOffset, zGrad, zOffset);
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user