Color2Gray PCA Image Analysis and Projection

We explored linear dimensionality reduction techiniques via principal component analysis (PCA). Below is a brief explanation of the algorithm and the results of PCA in both RGB and CIELAB color spaces. Algorithm:
• Resize image
• Down Sample images to have a width of 20 (and proportional height); save computation time
• Use PCA
• Use Principal Component Analysis to find the primary and secondary axis in a tristimulus color space (in this case RGB and CIELAB).
• PCA also finds the mean value of the image
• Plot
• Plot downsampled image pixels with respect to RGB/CIELAB
• Plot primary (black dashed line) and secondary axis (red dotted line)
• Axis are centered at mean value of image
• Project
• Project the full-resolution original image pixels onto the primary axis using closest point
• Scale this new luminance image to use full range
• For the RGB iamge, I map the image to the max and min of the original RGB image and then map that to [0,1]
• For LAB, I map the Luminance of the original L channel to the new values and then convert the image to an RGB grayscale image (this is the "normal range" image)
• The other LAB grayscale image is the result of mapping the projected values to 0,1 and doesn't convert back to RGB
• Problems:
• Dynamic range mapping; what is white, what is black?
• Sometimes the image is inverted; This is a problem for abWB, EquiLumDots, and GreyWheel; so they are shown with the corrected "inverted" images
• PCA is quite sensitive to the color space in which computation takes place. If the mage is largely isoluminant, then the weighting of the luminances will not matter and the result will just reflect how the color space stretches the chromatic differences.

abWB RGB_2_Gray

 Gray (Maps to [min, max] of original image, then [0,1]) Plot perpendicular to primary & secondary axis Plot RB axis Plot RG axis Plot GB axis

abWB LAB_2_Gray

 Projected Gray [0,1] Plot perpendicular to primary & secondary axis Plot LB axis Plot LA axis Plot AB axis

Gray in Normal range ([min,max] of L, then conv to RGB Grayscale)

colorBlind12 RGB_2_Gray

 Gray (Maps to [min, max] of original image, then [0,1]) Plot perpendicular to primary & secondary axis Plot RB axis Plot RG axis Plot GB axis

colorBlind12 LAB_2_Gray

 Project Gray [0,1] Plot perpendicular to primary & secondary axis Plot LB axis Plot LA axis Plot AB axis

Gray in Normal range ([min,max] of L, then conv to RGB Grayscale)

colorBlind35 RGB_2_Gray

 Gray (Maps to [min, max] of original image, then [0,1]) Plot perpendicular to primary & secondary axis Plot RB axis Plot RG axis Plot GB axis

colorBlind35 LAB_2_Gray

 Project Gray [0,1] Plot perpendicular to primary & secondary axis Plot LB axis Plot LA axis Plot AB axis

Gray in Normal range ([min,max] of L, then conv to RGB Grayscale)

colorBlind45 RGB_2_Gray

 Gray (Maps to [min, max] of original image, then [0,1]) Plot perpendicular to primary & secondary axis Plot RB axis Plot RG axis Plot GB axis

colorBlind45 LAB_2_Gray

 Project Gray [0,1] Plot perpendicular to primary & secondary axis Plot LB axis Plot LA axis Plot AB axis

Gray in Normal range ([min,max] of L, then conv to RGB Grayscale)

colorBlind6 RGB_2_Gray

 Gray (Maps to [min, max] of original image, then [0,1]) Plot perpendicular to primary & secondary axis Plot RB axis Plot RG axis Plot GB axis

colorBlind6 LAB_2_Gray

 Project Gray [0,1] Plot perpendicular to primary & secondary axis Plot LB axis Plot LA axis Plot AB axis

Gray in Normal range ([min,max] of L, then conv to RGB Grayscale)

colorwheel RGB_2_Gray

 Gray (Maps to [min, max] of original image, then [0,1]) Plot perpendicular to primary & secondary axis Plot RB axis Plot RG axis Plot GB axis

colorwheel LAB_2_Gray

 Project Gray [0,1] Plot perpendicular to primary & secondary axis Plot LB axis Plot LA axis Plot AB axis

Gray in Normal range ([min,max] of L, then conv to RGB Grayscale)

EqLumDots RGB_2_Gray

 Gray (Maps to [min, max] of original image, then [0,1]) Plot perpendicular to primary & secondary axis Plot RB axis Plot RG axis Plot GB axis

EqLumDots LAB_2_Gray

 Projected Gray [0,1] Plot perpendicular to primary & secondary axis Plot LB axis Plot LA axis Plot AB axis

Gray in Normal range ([min,max] of L, then conv to RGB Grayscale)

greywheel RGB_2_Gray

 Gray (Maps to [min, max] of original image, then [0,1]) Plot perpendicular to primary & secondary axis Plot RB axis Plot RG axis Plot GB axis

greywheel LAB_2_Gray

 Projected Gray [0,1] Plot perpendicular to primary & secondary axis Plot LB axis Plot LA axis Plot AB axis

Gray in Normal range ([min,max] of L, then conv to RGB Grayscale)

rg15x10 RGB_2_Gray

 Gray (Maps to [min, max] of original image, then [0,1]) Plot perpendicular to primary & secondary axis Plot RB axis Plot RG axis Plot GB axis

rg15x10 LAB_2_Gray

 Project Gray [0,1] Plot perpendicular to primary & secondary axis Plot LB axis Plot LA axis Plot AB axis

Gray in Normal range ([min,max] of L, then conv to RGB Grayscale)

Sunrise RGB_2_Gray

 Gray (Maps to [min, max] of original image, then [0,1]) Plot perpendicular to primary & secondary axis Plot RB axis Plot RG axis Plot GB axis

Sunrise LAB_2_Gray

 Project Gray [0,1] Plot perpendicular to primary & secondary axis Plot LB axis Plot LA axis Plot AB axis

Gray in Normal range ([min,max] of L, then conv to RGB Grayscale)