Skip to content
Snippets Groups Projects
Commit ea8a00b1 authored by simon.fanetti's avatar simon.fanetti
Browse files

debug

parent 1f6b7bc1
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ display_levels: display_levels.o
$(CCP) $^ -o $@ -L$(API_PATH)/build -lsandbox $(DEP_SANDBOX)
%.o: %.cpp
#$(CCP) $(DBG_GPROF) $(CFLAGS) -I$(API_PATH)/inc -c $< -o $@
$(CCP) $(CFLAGS) -I$(API_PATH)/inc -c $< -o $@
run:
......
......@@ -12,7 +12,7 @@ int main(){
char *sandbox_conf_file = (char*)"../../sandbox_conf.yaml";
// Debug
// char * sandbox_conf_file = (char *)"../../../sandbox_conf.yaml";
//char * sandbox_conf_file = (char *)"../../../sandbox_conf.yaml";
if(sandbox.loadConfigFrom(sandbox_conf_file)){
std::cout << "Failed to load the configuration" << std::endl;
......@@ -34,7 +34,7 @@ int main(){
*/
void displayLevels(Sandbox &sandbox){
float sandboxHeight = 0.2f;
float sandboxHeight = 0.17f;
// top => distance from camera to the top of the sandbox
float top = sandbox.getProjection()->getDistanceTopSandbox();
......@@ -54,20 +54,20 @@ void displayLevels(Sandbox &sandbox){
/*
std::chrono::milliseconds start_ms = std::chrono::duration_cast< std::chrono::milliseconds >( std::chrono::system_clock::now().time_since_epoch() );
int cpt_frame = 0;
*/
*/
do{
//for(int i=0; i<200; i++){
sandbox.captureFrame();
sandbox.getDepthFrame().copyTo(new_depth);
new_depth.copyTo( depth_cache, (cv::abs(depth_cache-new_depth) > DEPTH_MARGIN_ERROR) );
colorizeDepth(depth_cache, top-sandboxHeight, sandboxHeight).copyTo(colorized);
colorizeDepth(depth_cache, top, sandboxHeight).copyTo(colorized);
cv::cvtColor(colorized, res, CV_RGB2BGR);
sandbox.adjustProjection(res).copyTo(res);
cv::imshow(windowName, res);
/*
/*
cpt_frame++;
std::chrono::milliseconds now_ms = std::chrono::duration_cast< std::chrono::milliseconds >( std::chrono::system_clock::now().time_since_epoch() );
if(now_ms-start_ms > std::chrono::milliseconds(1000)){
......@@ -75,7 +75,7 @@ void displayLevels(Sandbox &sandbox){
cpt_frame = 0;
start_ms = std::chrono::duration_cast< std::chrono::milliseconds >( std::chrono::system_clock::now().time_since_epoch() );
}
*/
*/
//}
} while (cv::waitKey(10) != ESCAPE_CHAR);
......
No preview for this file type
This diff is collapsed.
This diff is collapsed.
apps/display_levels/index.jpeg

5.52 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment