# How to identify segments of colour and compare

Imagine a wide screen image projected from more than one video projector. Each projector handles a segment of the screen. The overlapping areas are corrected for within each projector.

Before adjustment, the images may differ in brightness and hue.

Taking a picture of the screen showing a 'white' image, I will identify the screen with Hough line detection and correct the perspective, hopefully resulting in the image below.

How do I then identify the number of segments and calculate the average of how they differ in brightness, hue and saturation?

This information will then be used to adjust each projector and ultimately provide a uniform image across the whole screen.

TIA

Dave

-

I think a robust fully automated procedure is difficult to achieve. However, if the number of projectors is low, you could do something manually:

i0 = Import["http://i.stack.imgur.com/9BXlk.png"];
{h, s, b} =  ImageData[ColorConvert[i0, "HSB"]][[All, All, #]] & /@ Range@3


Hues;

ClusteringComponents[h] // Colorize


You can see three different projectors with three different hues. Here are the hue's values:

ListPlot[h[[1]]]


ClusteringComponents[s] // Colorize


The saturation is the same for the last two. Here are the saturation values:

ListPlot[s[[1]]]


ClusteringComponents[b] // Colorize


The brightness is the same for all three

-