Converting livestream RGB video to gray scale

11 views (last 30 days)
Hello I am wondering if it is possible to convert a livestream RGB into grayscale while still remaining in live video
this is what i have so far to obtain live video however I am stuck on how to make gray scale
or how to put the live video on a plot
cam = webcam
preview(cam)

Accepted Answer

Image Analyst
Image Analyst on 4 Jul 2022
Edited: Image Analyst on 4 Jul 2022
After you call videoinput set ReturnedColorSpace to 'grayscale'.
vidobj = videoinput(theVideoAdaptor, cameraDeviceID, selectedCameraFormats{selectedFormatIndex});
vidobj.ReturnedColorSpace = 'grayscale';
  6 Comments
Jose
Jose on 5 Jul 2022
hmm do you think it can work on my internal laptop camera?
Image Analyst
Image Analyst on 5 Jul 2022
Maybe - with my Logitech demo you might have to debug it and figure out what the adapter name of your camera is and replace Logitech with your computer camera's name.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!