文摘
The YCbCr (luminance, chrominance-blue, and chrominance-red) color space is adopted in video codecs or transmission, while the HSV (hue, saturation and value) color space is used in some video analysis algorithms. In this paper, a fast algorithm based on fixed-point digital signal processors (DSPs) is proposed for YCbCr to HSV conversion. Floating-point multiplications are replaced with fixed-point shifts, 16-bit fixed-point multiplications, and additions. To compensate for rounding error and convert floating-point multiplication into 16-bit fixed-point multiplication in the calculation, tables occupying 225 bytes and 256 bytes are established, respectively. According to the experimental results, the error caused by the proposal is within the acceptable range. At the same time, the proposed algorithm is about 10 times faster than traditional YCbCr to HSV conversion algorithm on a fixed-point digital signal processor (DSP) platform and about 1.41 times faster on a personal computer (PC) platform.