Skip to content

Commit

Permalink
fixed bug reported in Issue FORTH-ModelBasedTracker#79 that I introdu…
Browse files Browse the repository at this point in the history
…ced today fixing issue FORTH-ModelBasedTracker#78
  • Loading branch information
AmmarkoV committed Apr 12, 2022
1 parent ed46171 commit bdf8ef0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/MocapNET2/MocapNET2LiveWebcamDemo/livedemo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,14 @@ int main(int argc, char *argv[])
options.inputIsSingleImage = 0;
cap.set(cv::CAP_PROP_FRAME_WIDTH,options.width);
cap.set(cv::CAP_PROP_FRAME_HEIGHT,options.height);
cap >> frame;
}

//This needs to be grabbed to initialize window sizes either on video source, or on webcam source
//--------------------------------------------------------------------
if (!options.inputIsSingleImage)
{ cap >> frame; }
//--------------------------------------------------------------------

//We will accept the input resolution and force it
//on visualization..
options.width = frame.size().width;
Expand Down
7 changes: 7 additions & 0 deletions src/MocapNET2/MocapNETLib2/visualization/visualization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,13 @@ int visualizePoints(
unsigned int save3DVisualization
)
{
if ( (width<=0) || (height<=0) )
{
fprintf(stderr,YELLOW "visualizePoints with image %ux%u\n" NORMAL,width,height);
return 0;
}


#if USE_OPENCV
char textInfo[512];
cv::Scalar color= cv::Scalar(220,220,220,0 /*Transparency here , although if the cv::Mat does not have an alpha channel it is useless*/);
Expand Down

0 comments on commit bdf8ef0

Please sign in to comment.