X would be a test region of interest
lines up all pixels on a single row. To get all reds
to get the Luminance on a row
Multiply by 10 the size of X to work with a region of interest same size as the one you suggest in the question.
If you find this answer of any help solving this question, please click on the thumbs-up vote link,
thanks in advance