Cant save image using OpenCV

前端 未结 2 1336
谎友^
谎友^ 2021-01-29 09:36

I was trying to save images from a video file but It couldn\'t save any image in my hard drive. I compiled following program without errors.

#include 

        
2条回答
  •  难免孤独
    2021-01-29 09:56

    Don't know if you solved the problem or not. if not you can use imwrite("test.jpg",img); to save an image,

    here is an example- while(1) {

      img=cvQueryFrame(cv_cap);
      cvShowImage("Video",img);
      imwrite("test.jpg",img);
    }
    

提交回复
热议问题