How to normalize an RGB value with reference RGB values

I want to get the RGB values ​​of an image in many lighting conditions. To get some sort of neutral scenario, I want to normalize the RGB values ​​with the RGB values ​​for some predefined images.

Let me explain. I have 6 predefined images and I know their exact average RGB values. Now I will take a picture of an unknown image in different lighting conditions. I will also take pictures of the predefined 6 images in the same conditions. Now my goal is to determine the normalization formula by comparing the known rgb reference values ​​of the predefined images with the values ​​computed from the camera image. with this normalization parameter, I will calibrate the RGB value of the unknown image. So that I can get the average RGB value from an unknown image in a neutral way, regardless of the lighting conditions.

How can I achieve this easily in Java.

+5
source share
2 answers

RGB. R, G, B , .

, - . , (240,200,120), (250, 190 150) - 240/250, 200/190 120/150. .

, . , , (200,150,20), (190,140,10), , . .

0

, , - RGB, , . , - , , , .

RGB, .

( java):

1) Convert - RGBImage --> YUVImage
2) Normalize RGBImage using the Y component
3) Convert - Normalized(YUVImage) --> Normalized(RGBImage)

.

ELSE, , .

+1

All Articles