Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi! i am trying to take a snapshot using webcam. How to remove the error generated as below:

error : OpenCV(3.4.1) Error: Unspecified error (could not find a writer for the specified extension) in cv::imwrite_, file C:\build\master_winpack-bindings-win64-vc14-static\opencv\modules\imgcodecs\src\loadsave.cpp, line 678

Snapshot button code : int returnVal = jFileChooser1.showSaveDialog(this); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = jFileChooser1.getSelectedFile(); Imgcodecs.imwrite(file.getPath(), frame); } else { System.out.println("File access cancelled by user.");

Hi! i am trying to take a snapshot using webcam. How to remove the error generated as below:

error : OpenCV(3.4.1) Error: Unspecified error (could not find a writer for the specified extension) in cv::imwrite_, file C:\build\master_winpack-bindings-win64-vc14-static\opencv\modules\imgcodecs\src\loadsave.cpp, line 678

Snapshot button code : int returnVal = jFileChooser1.showSaveDialog(this); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = jFileChooser1.getSelectedFile(); Imgcodecs.imwrite(file.getPath(), frame); } else { System.out.println("File access cancelled by user.");