Ask Your Question

Revision history [back]

//TAKE A PHOTO

if(image.empty())
{
  std::cerr << "Something is wrong with the webcam, ....." << std::endl;
}
imwrite("snapshot.jpg", image);

http://docs.opencv.org/modules/highgui/doc/reading_and_writing_images_and_video.html?highlight=imwrite#imwrite