Ask Your Question
0

How to snapshot webcam streaming and save to path in javafx button event

asked 2018-07-06 00:56:45 -0600

chinnataroz gravatar image

updated 2018-07-12 03:08:23 -0600

.

@FXML
    private void capImage(ActionEvent event) {
      VideoCapture cap = new VideoCapture(0);
     while(cap.isOpened()) {
     Mat frame = new Mat();
     if (cap.read(frame)) {
         Imgcodecs.write( "testcap".png", frame); // imgcodecs cannot find symbol
     }

in opencv 341 anything wrong and i am beginner programmer thank you for commennt. thank sir.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-07-06 01:01:27 -0600

berak gravatar image

only one line in 8 seriously wrong, not bad for a total noob ;)

Imgcodecs.imwrite( "testcap.png", frame);
                           ^ erroneous ' " ' 
            ^ the method is called imwrite()
edit flag offensive delete link more

Comments

bookmark the javadocs , please.

berak gravatar imageberak ( 2018-07-06 01:03:03 -0600 )edit
1

thank you master!!

chinnataroz gravatar imagechinnataroz ( 2018-07-06 01:37:22 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-07-06 00:56:45 -0600

Seen: 375 times

Last updated: Jul 12 '18