HELP to resolve this code

1 回表示 (過去 30 日間)
Poonam
Poonam 2015 年 6 月 29 日
コメント済み: Image Analyst 2015 年 6 月 29 日
m=original color image
en=enhanced color image
have written code for measure absolute mean brightness error(AMBE)
function E=eme(x,m)
em=mean2(x);
mm=mean2(m);
E=abs(em-mm);
end
Here E is absolute difference between mean brightness of two color images I think this code will take mean brightness of one channel of color image butcolor image has three channel so how will take the mean brightness value of all three channel
  1 件のコメント
Poonam
Poonam 2015 年 6 月 29 日
PLEASE HELP ME OUT TO RESOLVE THIS CODE

サインインしてコメントする。

回答 (1 件)

Thorsten
Thorsten 2015 年 6 月 29 日
function d = brightnessdiff(I1, I2)
d = rgb2gray(I1) - rgb2gray(I2);
  2 件のコメント
Poonam
Poonam 2015 年 6 月 29 日
why should I convert it into rgb2gray i want mean brightness difference of color image
Image Analyst
Image Analyst 2015 年 6 月 29 日
Brightness is not very precisely defined. Using rgb2gray() will give you the "brightness". You could also use rgb2lab() and use the L channel, or rgb2hsv() and use the V channel. It depends on what you want. Or perhaps you want to convert to LAB color space and look at the Delta E (color difference) which takes into account the total color difference, not just the brightness component. For example Delta E (like in my File Exchange) takes hue and chroma (saturation) into account, as well as brightness, in determining a total color difference.

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by