RodDalBen/SHINE_color

choice of HSV vs other color spaces?

Closed this issue · 2 comments

(as part of JOSS review)

I have yet to dive into the code, but in the name of expediency, I think it appropriate to raise a question that I predict will arise:

HSV is only loosely related to psychophysically or physiologically meaningful colorspaces. Is it the right tool to use here?

More specifically, considering the range of potential ways in which one can convert from RGB to a (pseudo-)luminance channel, which choice was made? Do the results it produces suffice for pupilometry (and other visual psychophysics) experiments, and are the implicit assumptions appropriate?
Were alternatives such as CIELAB/CIELUV/DKL/[more recent color appearance spaces] considered?

At a minimum, a discussion of how these issues are thought of is warranted in the paper.

[Additional context: I know a fair amount about CIE colorimetry, but little about what I think of as 'computer scientist color-spaces' such as HSV]

This is a great question @da5nsy ! Let me give you the context for my decision for HSV.

My initial idea was to use the DKL color space, as the idea arose when working with Psychopy/Python, that has a built-in function rgb2dkl. However, both SHINE and SHINE_color are powered by the MATLAB Image Processing Toolbox. This toolbox does not support DKL color space. There are custom functions on the web, but, at least for now, I prefer to stick with the toolbox.

My next choice was for CIELab, which is supported by MATLAB toolbox. I tried it in a related project, but the resulting images were very odd and not so consistent when measured with a luminance meter. I turned to HSV as an alternative color space to contrast it with CIELab results. HSV results were surprisingly good. The transformed images (from NOUN database, available as examples on the INPUT folder from SHINE_color) were more appealing and the light meter measures were more consistent and closer to the ones with greyscale images from SHINE. Thus, with HSV, SHINE_color was doing what it is supposed to do: output images with similar physical lightness.

Now, I understand your concern. Physical lightness is not always the same as perceived brightness. So images with similar physical luminance could elicit different pupil dilations. My understanding is that researchers are usually very aware of this challenge. As I tried to point in the manuscript, controlling low-level properties of stimuli is just one step towards a valid pupillometry design. For instance, stimuli (that usually vary in complexity) must be empirically validated with the target population (infants, children, adults will most likely respond differently to the same stimuli set) in the target cultural context. Also, inventive counterbalancing is necessary to minimize individual differences. On top of that, there are several other "details" to consider.

One way to give more flexibility to SHINE_color would be to have all color spaces supported by MATLAB Image Processing Toolbox (i.e., HSV, CIE XYZ, CIELab, YCbCr, YIQ). as options that the user could choose from (or, given enough memory, run them all at once and compare the results). What do you think about that?

Another alternative to have even more options would be to rely on color space transformations, like this, this, plus the rgb2dkl, but I would rather stick with the Image Processing Toolbox for now.

From v0.0.3, SHINE_color supports HSV and CIELab colorspaces. I will close this for now, but leave a comment if you are reading this and would like to work with another colorspace.