/** * @file color.h * @brief color utility function definition * @author Patrick Roth - roth@stettbacher.ch * @copyright Stettbacher Signal Processing AG * * @remarks * *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* 
* */ #ifndef _COLOR_H #define _COLOR_H #include "color_pipe.h" #define RGB2YUV_COEFF_Y_RED 0.299 ///< RGB to YUV conversion coefficient for Y-Channel: red #define RGB2YUV_COEFF_Y_GREEN 0.587 ///< RGB to YUV conversion coefficient for Y-Channel: green #define RGB2YUV_COEFF_Y_BLUE 0.114 ///< RGB to YUV conversion coefficient for Y-Channel: blue #define RGB2YUV_COEFF_U_RED (-0.299) ///< RGB to YUV conversion coefficient for U-Channel: red #define RGB2YUV_COEFF_U_GREEN (-0.587) ///< RGB to YUV conversion coefficient for U-Channel: green #define RGB2YUV_COEFF_U_BLUE 0.886 ///< RGB to YUV conversion coefficient for U-Channel: blue #define RGB2YUV_COEFF_V_RED 0.701 ///< RGB to YUV conversion coefficient for V-Channel: red #define RGB2YUV_COEFF_V_GREEN (-0.587) ///< RGB to YUV conversion coefficient for V-Channel: green #define RGB2YUV_COEFF_V_BLUE (-0.114) ///< RGB to YUV conversion coefficient for V-Channel: blue #if defined(__cplusplus) || defined(c_plusplus) extern "C" { #endif int color_rgb_to_yuv(int16_t *img_yuv, const void *img_rgb, const int height, const int width, const int bit_channel); int color_yuv_to_rgb(void *img_rgb, const int16_t *img_yuv, const int height, const int width, const int bit_channel); int color_calib(struct color_calib_data_t *color_calib); #if defined(__cplusplus) || defined(c_plusplus) } // extern "C" #endif #endif // _COLOR_H