conversions.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
#ifndef _LIBCP_CONVERSIONS_H_
00026
#define _LIBCP_CONVERSIONS_H_
00027
00028
using namespace std;
00029
00030
#include "image.h"
00031
00032
namespace LIBCP{
00033
00040 class Conversions
00041 {
00042
public:
00043
static int binarize(
Image* dst,
Image* src );
00044
static int grayScale(
Image* dst,
Image* src );
00045
static int colorize(
Image* dst,
Image* src );
00046
static int splitColorPlanes(
Image* source,
00047
Image* redPlane,
Image* greenPlane,
00048
Image* bluePlane );
00049
static int mergeColorPlanes(
Image* destination,
00050
Image* redPlane,
Image* greenPlane,
00051
Image* bluePlane );
00052
static int RGBtoHSV(
Image* dst,
Image* src );
00053
static int HSVtoRGB(
Image* dst,
Image* src );
00054
00055
00056
private:
00057
static void rgb2hsv(
float R,
float G,
float B,
00058
float& H,
float& S,
float& V );
00059
00060
static void hsv2rgb(
float H,
float S,
float V,
00061
float& R,
float& G,
float& B );
00062
00063
static float max_of(
float first,
float second,
float third );
00064
static float min_of(
float first,
float second,
float third );
00065
00066 };
00067
00068 }
00069
00070
#endif
Generated on Wed May 26 16:43:53 2004 for libcp by
1.3.7