How do I capture images in OpenCV and saving in pgm format?

前端 未结 5 1342
一生所求
一生所求 2020-12-20 04:28

I am brand new to programming in general, and am working on a project for which I need to capture images from my webcam (possibly using OpenCV), and save the images as pgm f

5条回答
  •  情深已故
    2020-12-20 05:02

    If you don't need superaccurate 2seconds then simply put a sleep(2) or Sleep(2000) in the while(1) loop to wait fro 2seconds before each grab,

    Write images with cvSaveImage() just put the extention .pgm on the filename and it will use pgm.

提交回复
热议问题