True color detection from taken picture
7 views (last 30 days)
Hello I have a problem with a project, I am writing here the exact task for it:
True color detection
The red color in the ring has real RGB values: 255 , 0 , 0 . In hexadecimal form: ff0000 . The goal of the assignment is to program a program that will be able to recognize the true RGB values of the colors of the swatch. All RGB color values are shifted because the swatch was taken with a phone which distorts. I need to find out the color and then shift it by the necessary RGB values. (note: it is not allowed to use graphic programs, e.g.: Photoshop, gimp, etc. for the final realization).
I have tried it with a code which I will add here, but it only works when I load the original picture too. I need to rework without the need of the original picture,it must detect the real color from a taken picture and shift back the color value to the original picture. I hope it is understandable and someone can help me with this, I need this ASAP, thank you.
PS: You need to open both .m files (project and readPoints), but run only the project file, it opens the photo.jpg and a coursor appears, you need to click on a random color, then a point appears where you clicked, the results will appear in the the command line, everything else is explained in the scripts.
Image Analyst on 22 Nov 2022
This is a lot of work. Basically there is no "true" RGB values for the chips. The best you can do is to assume the "true" colors for the chips is the sRGB values given in the mnaufacturer's specification sheet. So then you can measure the actual RGB values of all the chips, and compare them to the sRGB values and develop a transform to change the bad/test values into estimated sRGB values. I go over this in my attached seminar.
See my Image Processing Tutorial in my File Exchange if you want code to get the sRGB values and create a chart with the sRGB values:
I also have attached a class that helps do some of the color correction stuff and color calibration stuff. Color correction (RGB-to-RGB) is different than color calibration (RGB to CIE LAB).
Image Analyst on 23 Nov 2022
Attached is a demo to take a "test" (bad) image of a color checker chart and correct it such that the chip values are much closer to the standard, published sRGB values that come from the manufacturer's specification sheet that comes with the chart. This color correction (not calibration) is a transform of a bad chart (upper left) using an RGB-to-RGB transform to a corrected/fixed/repaired image (lower left) that has chips that are now closer to the standard sRGB values (upper right) than the original image.
Of course I just corrected the chart image but once you have the transform you can now use it to transform ANY color image as long as it was taken under the same conditions as your chart image.