Текстура с одним каналом - это и есть гисторамма. Для текстуры RGB гистораммой будет текстура с одним каналом, полученным как максимум соответстующих точек.
Найди максимальное число в гисторамме - М. Это число нужно поднять до максимально возможного в формате текстуры. Например, если М = 200, а макс. возм. = 255, то все каналы первоначальной текстуры умножай на (255 / 200).
З.Ы. Приятно встретить земляка на иноземном форуме, и диалог получился приватный
well, that’s what i call a clear answer to the problem.
but, may i add the following comment: if you solve your problem in the recommended way,
you should not forget to это и есть гисторамма, before you Найди максимальное число в гисторамме…
AFAIK, histogramm value is not max from RGB, it’s the luminance value for given pixel…
float pix_lm = pixcol.r0.2125f+pixcol.g0.7154f+pixcol.b*0.0721f;
Calculating histograms for floating point images is a bit more complicated since there are an arbitrary number of color ranges in the image, but usually you just find the minimum and maximum and then subdivide this range into n buckets.
Auto levels in Photoshop essentially just scales the colors in an image so that the minimum value is mapped to 0 and the maximum to 255 for each channel.
As transfer technics is working than why not writing on rus layout…
Are coefficients may be other. There are many colorymetry government standarts in Russia at any rate are existing. But I am sure what this type of histogram is shall suit to declared intend.