色温值、曝光值与RGB颜色值的关系公式?

来源:百度知道 编辑:UC知道 时间:2024/05/27 02:31:44
我要对RAW图像进行白平衡、曝光值调节,寻求色温值、曝光值与RGB颜色值的关系公式?
我要的不是RGB转HS*,我是要调节RAW的白平衡和曝光值算法!!!!!!不过,还是谢谢你!

不好意思
是matlab源代码
应该比较容易懂的

function [hout,s,v] = rgb2hsv(r,g,b)
%RGB2HSV Convert red-green-blue colors to hue-saturation-value.
% H = RGB2HSV(M) converts an RGB color map to an HSV color map.
% Each map is a matrix with any number of rows, exactly three columns,
% and elements in the interval 0 to 1. The columns of the input matrix,
% M, represent intensity of red, blue and green, respectively. The
% columns of the resulting output matrix, H, represent hue, saturation
% and color value, respectively.
%
% HSV = RGB2HSV(RGB) converts the RGB image RGB (3-D array) to the
% equivalent HSV image HSV (3-D array).
%
% CLASS SUPPORT
% -------------
% If the input is an RGB image, it can be of class uint8, uint16, or
% double; the output image is of class double. If the input is a
% colormap, the input and output colormaps are both of class double.
%
% S