Monthly Archives: March 2015

Incomplete pair comparison

One of my big academic interests is scaling perceptual phenomena. That is, we take some physical stimuli (for example, a set of sounds of varying intensity/volume) and then we want to know how loud they are perceived to be by people. This allows us to build a relationship between the physical stimulus (in this case intensity) and the perceptual stimulus (in this case loudness). The same idea could be used to scale largeness, smallness, colourfulness, whiteness, lightness, heaviness, sweetness etc. It’s not always a -ness. But it usually is.

There are a great many techniques to scale perception. You can just ask people, for example, to assign a number. For example, you play a sound and ask them to rate how loud it is on a scale, say, from 0 to 100. This is called Magnitude Estimation (ME). It’s a perfectly good technique but it has limitations and one of these is that it can be quite difficult for the participant. And, say, the first stimulus seems really loud and they assign it a loudness of 90; then it turns out that all the subsequent stimuli are louder – then all their estimations will be squeezed in the 90-100 range, which is not ideal. Consequently, in the ME technique we often have so-called anchors – that is, example stimuli at each end of the scale.

An alternative technique is called paired comparison (PC). In this we might have, for example, five stimuli A, B, C, D and E and we present them in pairs and ask the participants which one is louder (or whiter or yellower etc.). The total number of paired comparisons is 10 in this case which is quite manageable. From the results of these paired comparisons it is possible to estimate a scale value for each of the stimuli where the scale value will be an interval scale of loudness (or whiteness or yellowness, etc.). This is a really nice technique and there are quite a few papers that claim that PC is more reliable than ME, for example. However, when the number of stimuli is large the number of pair comparisons becomes huge and the the task is not practicable. When this happens it is possible to undertake so-called incomplete pair comparison where we only present some of the possible pairs to the participants. The question is, however, what proportion of the pairs should be present for the PC experiment to be reliable?

This was the question that Yuan Li and I asked each other during her doctoral research. We undertook a large-scale simulation of a PC experiment. I won’t go into the details here. The method and results have just been published in the Journal of Imaging Science and Technology (JIST). You can see the paper here.

However, I show below the key table from the research which I think might be of interest to other people who are undertaking, or planning to undertake, an incomplete PC experiment.

table

This table shows the number of stimuli that are being compared along the top. Down the left-hand side are the number of observers taking part. The figure in the corresponding row and column shows the per cent of pair comparisons that need to be carried out to get robust results that would be similar to those you would get if you did the full PC experiment. So, for example, if you 20 samples and 15 participants then you need to half of the possible comparisons. For 20 samples there are 190 comparisons so you would need to 95 of them (which could be selected randomly).

I should point out that there is a caveat that needs to be considered. This work is only valid if the observers can be considered to be stochastically identical. If we ask people to rate samples for loudness, or whiteness, or heaviness, for example, I think this assumption is justified. However, if we were asking people to scale how beautiful people’s face were, for example, – an experiment reminiscent of the early facebook experiment by Mark Zuckerberg – then observers could differ wildly in their judgements. One participant may rate as most beautiful a face that another participant rates as the least beautiful. Because of the assumptions that we made in our modelling we cannot predict the proportion of pair comparisons that would be needed in a case like this. We are thinking about it though.

What colour is the sky on mars?

mars_originalmars_red

The cameras never lies. Or does it? Recently I had to take a photo for a medical case and before submitting it I had to sign to say that the photo had not been modified. I did this – but it was ridiculous of course. Many people have this idea that the cameras faithfully captures what the scene looks like and that, unless we intentionally manipulate the images (in photoshop, for example), then we have captured the truth. Nothing could be further from the truth – as the recent image of #TheDress showed.

The top photo above was taken and released by NASA in 1976 and shows a Martian landscape. The sky is blue. However, at the time, Carl Sagan said “Despite the impression on these images, the sky is not blue…The sky is in fact pink.”

You see the original image had not been colour corrected. Colour correction is a process that takes place on most cameras these days without the user being aware of it but in 1976 was not automatic. The process can compensate for the spectral sensitivities of the camera sensors (which may differ from one camera to another) or for the colour of the light source. The second picture (above) shows the colour-corrected image. Some people are now arguing, however, that the amount of colour correction applied by NASA is wrong and that the sky should not be as red as it appears on the second photograph. For the full story including some other nice images of Mars see here.

get it right in black and white

A student was asking me about use of colour in a design (that showed text on a background) today and one of the things I said to her was “Get it right in black and white”. Prof Lindsay MacDonald taught me this. The idea is to make sure there is contrast in lightness and that you are not relying on a contrast in hue for people to read the text. So, for example, if you must put red text on a green background – I don’t advise this particularly, but if you do – then make sure it is a dark green and a light red or a light green and a dark red.

text1

text2

In the above two images, one is easier to read than the other. In both cases the hue of the red and green are the same. But in one case there is a large lightness difference and in the other there is not. if you were to print these out in black and white, one would be more readable than the other. That is what, “Get it right in black and white means.” It’s sensible if for no other reason than it increases the chance that someone who is colour blind (most are red-green colour blind) would be able to read it. Of course, maybe red and green would be not great colours to use in the first place – but that is a longer story.

I have come across a really lovely interactive website that helps with this. It is called colorable. It allows you to enter two colours (in hex format) – or use slider bars to control hue, lightness and saturation – and then it gives you a WCAG contrast ratio and even a pass/fail decision about whether you meet the minimum guidelines. Please try it – it’s great fun.

how colour vision works

yellow

Really super article by Ana Swanson in the Washington Post about colour vision and how it works. As she explains, it is not really correct to think of the long wavelength visible light as being red. It is better, as Newton knew of course, to say that the long-wavelength light has the ability to cause the sensation of redness in us. She gives a nice visual example of how the spectrum looks to a dog, something (by coincidence) that I was only talking about in a lecture last week. As she says:

Is what I see as “blue” really the same thing as what you see as “blue”? Or have we both learned the same name for something that looks different to each of us?

Her article is really worth reading.

There is just one thing I take issue with. It may be ‘nit picking’. But she says “A green leaf, for example, reflects green wavelengths of light and absorbs everything else.”

My image, at the top of this post, shows the reflectance of a typical yellow object. At each wavelength the reflectance is between 0 and 100 per cent. But notice that it is not zero at any wavelength in the range shown (400-700nm). That means that the object reflects light at every wavelength. And it is not 100 at any wavelength meaning that it also absorbs to some extent at every wavelength. It’s just it absorbs more at the shorter wavelengths than at the longer wavelengths and it reflects more at the longer wavelengths than at the shorter ones. But notice one other remarkable thing – the yellow object reflects more light at 700nm (a wavelength we would normally associate with red) than it does at 580nm (a wavelength we might normally associate with yellow).

Yes, the reflected light does look yellow. But, the notion that a “A yellows object reflects yellow wavelengths of light” is misleading. It suggests that the yellow object only reflects, for example, the wavelengths in the spectrum we would normally think of as yellow (around 580nm) and absorbs the rest. This is just not how things are.

What colour is your office?

Decorating-GOMIX-new-office-2

I just saw an interesting article by Kim Lachance Shandrow about how the colour of your office can affect productivity. The article refers to a paper (2007) in Color Research and Application (CRA) by Nancy Kwallek entitled Work week productivity, visual complexity, and individual environmental sensitivity in three offices of different color interiors. The paper suggests that the influences of interior colours on worker productivity were dependent upon individuals’ stimulus screening ability and time of exposure to the interior colours. CRA is a top quality academic journal that is peer reviewed and so I am respectful of the findings.

However, in Kim’s online article there is a lot of stuff that I am highly sceptical about. For example, she writes that “Red … increases the heart rate and blood flow upon sight.” Is this true? Is there really any evidence for this. I have two PhD students working in this area right now and I am far from sure that colour does affect heart rate and, if it does, the effects are probably tiny. And yet we can read statements like this all over the internet as if it is a fact beyond doubt. Other things she says that I take with a pinch of salt is that “green does not cause eye fatigue” and that “yellow triggers innovation.” Don’t get me wrong – I am very interested in how colour can be used to affect us emotionally, psychologically and behaviourally; it’s just there is a danger that if some things are said often enough (such as red increases your blood pressure or heart rate) then people start believing them even though there may be little evidence.

That said, you might find the infographic fun and it is well done. See the original and full article here.

On CIE colour-matching functions

In 1931 the CIE used colour-matching experiments by Wright and Guild to recommend the CIE Standard Observer which is a set of colour-matching functions. These are shown below for standard red, green and blue primaries. These show the amounts – known as tristimulus values – of the three primaries (RGB) that on average an observer would use to match one unit of light at each wavelength in the spectrum. Why are these so important? Because they allow the calculation of tristimulus values for any stimulus (that is, any object viewed under any light as long as we know the spectral reflectance factors of the surface and the spectral power of the light).

650px-CIE1931_RGBCMF.svg

I gave a lecture this week about these and so they are fresh on my mind. I wanted to use this blog post to explain two things about the colour-matching functions that may be puzzling you. The first was stimulated after the lecture when one of the students came up to me with a question. You will note that for some of the shorter wavelengths the red tristimulus value is negative. Hopefully you are aware that no matter how carefully we choose the three primaries we cannot match all colours using mixtures of those three in the normal sense. What we have to do is to add one of the primaries to the thing we are trying to match and then match that with an additive mixture of the other two primaries. The question from the student was, wouldn’t that change the colour of the thing that is being matched? The answer is that it would of course. But it’s ok.

We normally represent this matching with an equation:

S ≡ R[R] + G[G] + B[B]

which simply means that the stimulus S is matched by (that is the symbol ≡) R amounts of the R primary, G amounts of the G primary, and B amounts of the B primary. The values R, G and B are the tristimulus values. I put square brackets around the primaries themselves to distinguish them from the amounts or tristimulus values of the primaries being used in the match.

Now when we add one of the primaries to the stimulus (the thing we are matching) itself, we can write this equation:

S + R[R] ≡ G[G] + B[B]

The new colour, S + R[R], can now be matched by an additive mixture of the other two. Hmmmmmm? You may ask. How does that work? Well, we can rearrange this equation to make:

S ≡ -R[R] + G[G] + B[B]

In other words, matching the additive mixture of the original stimulus S and some red with some green and blue, means that – if it were possible – we could match the original stimulus S with the same amount of green and blue and a negative amount of the red. I appreciate that this is mathematical but I hope that it is maths that anyone could understand. It’s not rocket science. Just simple adding and subtracting. This is how we arrive at the colour-matching functions above. No matter what RGB primaries we use one of them will have to be used in negative amounts to match some of the wavelengths. In practice, this is done by adding it to the stimulus as described above. Of course, you may also know that the RGB colour-matching functions were transformed to XYZ colour-matching functions. These are the XYZ values everyone is familiar with. But that is another story I will devote another post to one day.

The second question though, is isn’t this just arbitrary? If we used a different set of RGB primaries wouldn’t we get a different set of colour-matching functions? Again, the answer is yes, but again it doesn’t matter. The whole point about the CIE system was to work out when two different stimuli would match. If two stimuli are matched by using the same amounts of RGB then by definition those two stimuli must themselves match. If we used different RGB primaries the amounts of those tristimulus values would change, of course, but the matching condition would not. Two stimuli that match would also require the same RGB values as each other to match them, not matter what the primaries were (as long as they were fixed of course). So the key achievement of the CIE system was to define when two stimuli would match. However, it was also useful for colour specification or communication but that does indeed depend upon the choice of primaries and requries standardisation.

I hope people find this post useful. Post any questions or comments below.

Do women use more colour names than men?

I just came across this funny cartoon about the difference between men and women in terms of colour names.

doghouse_color_wheel_altered

But on the same page I found the results from an actual colour survey where over five million colours were named across 222,500 user sessions. One aspect of the results is shown below:

doghouse_analysis

It does seem that there is some evidence that women use more colour names than men – though generally there was agreement between how the names were used. For further details see the original article.

Press coverage of #TheDress

Whatever anyone thinks about the colour of dress and the attention it is received there is one undeniable fact – this story had received huge attention from the public and from the media. That in itself is probably more interesting than the debate itself.

The Daily Mirror story covered the angle that we are all right whatever we see because colour exists only in our heads. According to Dr Paul Knox, a reader from the University of Liverpool’s department of Eye and Vision Science, “Colour isn’t something that exists in the world. Different wavelengths of light exist and can be observed but colour is something we make up inside our heads.”

ITV also took the view that the explanation is that colour doesn’t exist. I broadly agree with this view, but the interesting thing is that that doesn’t explain why there was so much disagreement about the colour in this particular case whilst normally we barely notice any disagreement. If it is simply that colour doesn’t exist then why do we ever agree about colour at all?

On the other hand, in the Guardian an article by Bevil Conway considers cognitive processes in our colour vision and visual strategies that may vary from one person to the next. Of course, Bevil Conway is a super scientist and I agree with almost everything he says. Certainly, cognitive strategies could have something to do with this phenomenon. However, when he says that “By accident or design, the dress is a carefully created composition of orange and blue that confounds our visual systems,” I have to disagree. If you look at a properly taken photograph of the dress or the dress itself in real life what you see is shown below:

dress_original

The dress is not a carefully crafted composition of orange and blue – the dress is blue and black. However, Bevil is probably talking about the image that was circulated not the one shown above. To understand this phenomenon you need to understand colour imaging and the fact that colour images are sometimes not faithful reproductions. One of the reasons why this story has run and run is that there is no simple answer, no 10-second soundbite that can put the story to bed. It is a complicated phenomenon.

Extraordinary facts relating to the vision of colours

In 1794 John Dalton presented a lecture to the Manchester Literary and Philosophical Society about colour vision. The first two sentences are shown below:

It has been observed, that our ideas of colours, sounds, tastes, etc. excited by the same object may be very different in themselves, without our being aware of it; and that we may nevertheless converse intelligibly concerning such objects, as if we were certain the impressions made by them on our minds were exactly similar. All, indeed, that is required for this purpose, is, that the same object should uniformly make the same impression on each mind; and that objects that appear different to one should be equally so to others.

It is interesting to reread this sentence again in the light of the recent controversy about the blue and black dress.

Dalton

colour and language

One of the things that #TheDress controversy has highlighted is that colour is not as fixed as the majority of people believe. We tend to think that objects have a single colour and that we all see that colour the same way. However, in the image below you can see two central grey patches that are physically identical but probably look different in colour to you. My experience is that the majority of people would explain this as the two grey patches being the same colour but looking different in colour because of the background. An illusion.

90

I don’t agree with this way of thinking however. The colours we see when we look at something do depend upon the other colours around it but this is not a a special case. It’s not unusual, as Tom Jones would say. It’s how colour works. If it is an illusion then it’s happening all of the time, almost whenever you are looking at colour. So what is the real colour of something? Is it even sensible talk about an object having a single fixed real colour?

There is a body of research emerging that suggests that the language that we use influences how we see things. Jules Davidoff, a Professor at Goldsmiths University, went to Namibia where he conducted an experiment with the Himba tribe, who speak a language that has no word for blue or distinction between blue and green. When shown a circle with 11 green squares and one blue, they couldn’t pick out which one was different from the others. But the Himba have more words for types of green than we do in English. When looking at a circle of green squares with only one slightly different shade, they could immediately spot the different one, even when the difference was so small that we would find it very difficult to see the odd one out. See below for an example.

davidoff

In the image above – a screenshot from one of Davidoff’s experiments – the Himba tribe can easily see that the green patch at about 1 o’clock is different from the others.

In fact, some people even think that in ancient times we could not see blue at all because we had no word for it. In the Odyssey, Homer famously describes the “wine-dark sea.” But why “wine-dark” and not deep blue or green? It turns out that most ancient languages (including Greek, Chinese, Japanese and Hebrew) did not have a word for blue. Does this mean that they didn’t see blue? Is blue a relatively modern phenomenon? There is a thought-provoking article about this by Kevin Loria at Business Insider. Read more here.