- 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.

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 |

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)

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 |

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)

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 |

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)

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 |

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)

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 |

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)

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 |

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)

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 |

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)

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 |

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)

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 |

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)

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 |

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)