How to capture still image from webcam on linux

前端 未结 4 801
逝去的感伤
逝去的感伤 2021-02-04 08:24

I am trying to write a C++/Qt program for linux, where I take a still image photo from a webcam, make some transformations to a photo (cropping, resizing, etc.), and save it to

4条回答
  •  鱼传尺愫
    2021-02-04 09:21

    mplayer -vo png -frames 1 tv://
    

    might give a green screen output as the camera is not yet ready.

    mplayer -vo png -frames 2 tv://
    

    You can try increasing the number of frames and choose a number from which the camera gives correct images.

提交回复
热议问题