daily pastebin goal
85%
SHARE
TWEET

Untitled

a guest Oct 12th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <opencv2/core.hpp>
  2. #include <opencv2/highgui.hpp>
  3.  
  4. int main(int argc, char** argv) {
  5.     cv::Mat img = cv::imread("photo.jpg");
  6.     cv::imshow("image", img);
  7.     cv::waitKey();
  8.     return 0;
  9. }
  10.    
  11. $ g++ -c -o example_opencv.o example_opencv.cpp
  12. $ g++ -o example_opencv example_opencv.o -lopencv_core -lopencv_imgcodecs -lopencv_highgui
  13.    
  14. $ valgrind ./example_opencv
  15. (... lengthy error report ...)
  16. ==14665== LEAK SUMMARY:
  17. ==14665==    definitely lost: 34,152 bytes in 434 blocks
  18. ==14665==    indirectly lost: 0 bytes in 0 blocks
  19. ==14665==      possibly lost: 1,024 bytes in 14 blocks
  20. ==14665==    still reachable: 64,144 bytes in 1,328 blocks
  21. ==14665==         suppressed: 0 bytes in 0 blocks
  22. ==14665== Rerun with --leak-check=full to see details of leaked memory
  23. ==14665==
  24. ==14665== For counts of detected and suppressed errors, rerun with: -v
  25. ==14665== Use --track-origins=yes to see where uninitialised values come from
  26. ==14665== ERROR SUMMARY: 105422 errors from 1000 contexts (suppressed: 0 from 0)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top