MATLAB Answers

Get an image as an input from webcam

1 view (last 30 days)
Mohammad Almekami
Mohammad Almekami on 18 Jan 2020
Answered: Star Strider on 18 Jan 2020
I would like to get an image form webcam as an input an save it on a file. Also I would like to delete this image from the file when a new image has been taken by the webcam.(following image delete previous image).

  0 Comments

Sign in to comment.

Answers (1)

Star Strider
Star Strider on 18 Jan 2020
I assume here that you are using a USB webcam, and not the Image Aquisition Toolbox.
To take picture, use the snapshot function:
img = snapshot(cam);
Then save it using the imwrite function. To delete it later, remember the filename, then use:
savedImage = which(filename)
delete(savedImage)

  0 Comments

Sign in to comment.

Sign in to answer this question.

Products


Translated by