How do I get RGB-Values

1 view (last 30 days)
Ismail Güclü
Ismail Güclü on 23 Aug 2020
Answered: Ismail Güclü on 26 Aug 2020
Is it possible to read the rgb-value from a monitor (not image/without screenshot) ? 2. Quesrion: RGB-value from a realtime video ? Thx
  2 Comments
KSSV
KSSV on 24 Aug 2020
Yes you can read video frame by frame as a image/ RGB value. Read this: https://www.mathworks.com/help/matlab/ref/videoreader.html
How you expect to enter RGB values? Manually? Yes you can do but it is tedious isn't it?
Image Analyst
Image Analyst on 24 Aug 2020
How did the image get onto the monitor? If it was from MATLAB, then yes, you have the variable. If it was by some other program (Excel, Powerpoint, Photoshop, or whatever) then you'd have to figure out how to do a screen capture first, then examine the saved image.

Sign in to comment.

Answers (2)

Walter Roberson
Walter Roberson on 24 Aug 2020
Yes? No?
  • Some graphics cards allow the rendered values to be read out of the buffer. MS Windows in particular tends to restrict this ability because it can be used to bypass some kinds of Digital Rights Management. Arguably this would be a screenshot.
  • if you added appropriate hardware such as a frame buffer, you could keep a copy of the video stream, especially with digital protocols such as HDMI. Arguably this would be a screenshot.
  • However the above options only record the graphics sent to the monitor, which is not the same as the monitor will display. Most monitors are not calibrated, and most monitors have built-in gamma adjustment. Hypothetically you might be able to retrieve the gamma table the monitor uses, but the calibration information requires calibration hardware.... and warming up the monitor several days before hand to stabilize the electronics.
Overall I would say that given the contradictions in your requirements, that the answer has to be NO.

Ismail Güclü
Ismail Güclü on 26 Aug 2020
Thank you

Tags

Community Treasure Hunt

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

Start Hunting!