Liu-Wang

This page contains a brief explanation of the fuzzy sets proposed in the study of Liu et. al.

Proposal of fuzzy sets

Seven categories are defined: red, orange, yellow, green, cyan, blue and purple. By default, each of the classes is represented by the following colour:

Colour label

Index

RGB value

HEX value

Red

0

[255, 33, 36]

#FF2124

Orange

1

[248, 149, 29]

#F8951D

Yellow

2

[239, 233, 17]

#EFE911

Green

3

[105, 189, 69]

#69BD45

Cyan

4

[111, 204, 221]

#6FCCDD

Blue

5

[59, 83, 164]

#3B53A4

Purple

6

[158, 80, 159]

#9E509F

The colour associated with each label can be changed when calling the function that performs the segmentation. By default, they are the colours shown in the table above.

The indices of the colours must be positive integers. Negative integers are reserved for the internal calculation of the methods.

Partition of the chromatic space

The H channel, whose values must be in range [0,360][0, 360], is partitioned using trapezoidal membership functions. For the sake of clarity, the parameters aa, bb, mm, nn which uniquely determine the expression of the membership function are given. For more information, see section Fuzzy Logic-based methods.

Colour label

aa

bb

mm

nn

Red

300

20

330

10

Orange

10

55

20

40

Yellow

40

80

55

65

Green

65

170

80

140

Cyan

140

210

170

200

Blue

200

270

210

250

Purple

250

330

270

300

In the definition of the red colour, it can be seen that it is not verified that a<m<n<ba<m<n<b. This is because the chromatic component H of the HSV colour space is circular, and the red colour is the one located on the boundary.

Initial colour balance

Liu's method proposes an initial colour balance in order to correct excess lighting or contrast. The method they use is the Gray World method. The transformation carried out is as follows:

  1. Convert the RGB image, where each R,G,B channel has discrete range [0,255][0, 255], to range [0,1][0,1].

  2. Calculate the average of each channel, and calculate the average of the three previous averages. Say λ\lambda to this value:

λ=R+G+B3\lambda = \dfrac{\overline{R}+\overline{G}+\overline{B}}{3}

3. Make a scale change to each channel. The scale in each case will be si=λCis_i=\dfrac{\lambda}{\overline{C_i}}.

R=λRR,G=λGG,B=λBBR' = \dfrac{\lambda}{\overline{R}}\cdot R, \qquad G' = \dfrac{\lambda}{\overline{G}}\cdot G, \qquad B' = \dfrac{\lambda}{\overline{B}}\cdot B

4. Correct possible out-of-range values. The scale factor sis_i may be greater than 1 in some situations, so it is necessary to set values greater than 1 to 1, and values less than 0 to 0.

References

Liu, C.; Wang, L.. (2016) Fuzzy color recognition and segmentation of robot vision scene. Proceedings: CISP 2015 - 8th International Congress of Image Signal.

Last updated