The following images were of different-colored nail polish on white paper under a fluorescent light, taken with a Sony Ericsson DSC-T10 digital camera with an Exposure Value of -1.
**As we can see, the "best" settings for the set-up are the automatic white balance and fluorescent settings,as it should be; these show the colors as they are perceived by my eyes (albeit darker because of the low EV setting). The daylight setting makes them look dull (to balance out the bright sunlight), while the cloudy setting appears to increase their saturation. The incandescent white balance setting is by far the worst, giving a bluish tinge to the colors, evidenced by the now-light-blue paper background; this is to cancel out the yellow-orange tinge incandescent light usually casts on everything. The flash setting has the same effect as that of the daylight setting, though it makes them even darker, this is because light from the camera's flash bulb would be more intense than the diffused sunlight outdoors.
Next we use two popularly used automatic white balancing algorithms to enhance the most "wrongly balanced" image, which is of course the image taken using the Incandescent Light setting.
using the following code:
im=imread('act15v.jpg');
//im2=imread('white.jpg');
//r=mean(im2(:,:,1));
//g=mean(im2(:,:,2));
//b=mean(im2(:,:,3));
//im(:,:,1)=im(:,:,1)/r;
//im(:,:,2)=im(:,:,2)/g;
//im(:,:,3)=im(:,:,3)/b;
rg=mean(im(:,:,1));
gg=mean(im(:,:,2));
bg=mean(im(:,:,3));
im(:,:,1)=im(:,:,1)/rg;
im(:,:,2)=im(:,:,2)/gg;
im(:,:,3)=im(:,:,3)/bg;
imshow(im);
...the first (commented out) part employs the Reference White Algorithm. Basically, it takes the RGB values of a white reference part of the image and saves them as the variables r,g,b then divides the RGB layers of the image by the corresponding saved reference value. We obtained the following image:
...the second part of the code employs the Grey World Algorithm, it assumes that the average color of the world is grey. Basically, the code takes the averages of the RGB values of the unbalanced image then divides the RGB layers of the image by the corresponding stored averages. We obtained the following image:
image though because it totally erases 3 of the patches, the orange and two shades of yellow, and most of the yellowgreen patch.
Now to see the effectiveness of the same algorithms on a wrongly-balanced image with just one hue (and a patch of white for reference). Below is a picture of the hems of shirts with different shades of purple(/violet), taken with the same digital camera and under the same light as the previous set of pictures, again using the "incandescent" white balance setting. This is followed by the same image after it has been white balanced using the Reference White Algorithm, then again using the Grey World Algorithm.
**I give myself a grade of 10 for this activity, because the results were satisfactory and all the objectives were achieved.
**thank you to mark leo for the help.