Skip to content

Commit

Permalink
prevent OpenCV Assertion error, although not yet fixed its cause FORT…
Browse files Browse the repository at this point in the history
  • Loading branch information
AmmarkoV committed Apr 12, 2022
1 parent 869c284 commit ed46171
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/MocapNET2/MocapNET2LiveWebcamDemo/livedemo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,9 @@ int main(int argc, char *argv[])
1// We will do the waitKey call ourselves
);

imshow("Skeletons", viewMat);
if ( (viewMat.size().width >0) && (viewMat.size().height>0) )
{ imshow("Skeletons", viewMat); } else
{ std::cerr<<"Invalid skeleton visualization frame.. \n"; }
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/MocapNET2/MocapNETLib2/visualization/visualization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1562,8 +1562,10 @@ int visualizePoints(
*/

//At last we are able to show the window..
cv::imshow(windowName,img);

if ( (img.size().width >0) && (img.size().height>0) ) { cv::imshow(windowName,img); } else
{ std::cerr<<"Invalid visualization frame.. \n"; }


if (save3DVisualization)
{
char filename[512];
Expand Down

0 comments on commit ed46171

Please sign in to comment.