cdahms
cdahms

Reputation: 3750

LAB color space (vs RGB or HSV) - OpenCV example?

Good afternoon,

I've used the RGB and HSV color spaces in OpenCV extensively and would like to branch my knowledge out to LAB as well, however I'm having a hard time getting started. At this point my questions are:

1) What is the advantage of LAB over HSV? I'm well aware of the advantage of HSV over RGB (generally illumination invariance) but I can't seem to find a good source clarifying the advantage of LAB vs HSV. I presume LAB must be advantageous in at least some situations since it involves processing two color channels instead of one.

2) Is anybody aware of a good OpenCV example of a vision task that won't work using HSV but will work with LAB? I can find plenty of examples of vision tasks that can't be done with RGB but can with HSV, however I can't seem to find an example that can't be done with HSV but can with LAB.

I've found some sources that offer some degree of assistance on this topic such as:

Most "stable" color representation : RGB? HSV? CIELAB?

https://en.wikipedia.org/wiki/List_of_color_spaces_and_their_uses

https://www.quora.com/What-are-the-differences-between-RGB-HSV-and-CIE-Lab

But none of these answers either of the above questions directly, especially the 2nd. Any assistance would be greatly appreciated.

Upvotes: 3

Views: 7052

Answers (1)

ma.mehralian
ma.mehralian

Reputation: 1284

1) Lab color space is more perceptually linear than other color spaces. Perceptually linear means that a change of the same amount in a color value should produce a change of about the same visual importance. It is important especially when you try to measure the perceptually difference of two colors. for more information see Color difference wiki.

In addition HSL and HSV wiki page list some other Disadvantages of HSV, which also shows the superiority of Lab color space.

2) I have never seen an OpenCV example in this case!? but there are many applications Like Adobe Photoshop that allow image editing using "Lab mode"

Upvotes: 2

Related Questions