Measuring the luminosity of a picture?
12 ビュー (過去 30 日間)
古いコメントを表示
Hi, I have to measure the luminosity of a picture using the l,a,b parameters, so I can compare the luminosity of several pictures. How would I go about to achieve this?
1 件のコメント
Stephen23
2025 年 2 月 10 日 11:34
"Measuring the luminosity of a picture?"
Luminosity an absolute measure of radiated electromagnetic energy per unit time, so unless you know something about the duration of the exposure in addition to some kind of calibration of the image scale, this is likely impossible.
What is much more likely is that you are mixing up luminosity with lightness: https://en.wikipedia.org/wiki/Lightness
回答 (1 件)
Gautam
2025 年 2 月 10 日 9:03
Hi Nathan,
You can use the Image Processing Toolbox, which provides functions for color space conversion. You can follow these steps to compare the luminosity of the pictures:
- Use "imread" to load the image into MATLAB.
- Use "rgb2lab" to convert the image from RGB to L*a*b* color space. The L* channel represents the lightness or luminosity of the image.
- Compute the mean or other statistical measures of the L* channel to quantify the luminosity.
- Use the calculated statistics to compare luminosity across different images.
You can also consider normalizing the L* values if images have different ranges or lighting conditions.
Refer to the following links for more infromation on these functions
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!