Now you can download a copy of these docs so you can use them offline! Download now
ColorImage.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2008. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
5 /*----------------------------------------------------------------------------*/
6 
7 #ifndef __COLOR_IMAGE_H__
8 #define __COLOR_IMAGE_H__
9 
10 #include "ImageBase.h"
11 #include "BinaryImage.h"
12 #include "Threshold.h"
13 
14 class ColorImage : public ImageBase
15 {
16 public:
17  ColorImage(ImageType type);
18  virtual ~ColorImage();
19  BinaryImage *ThresholdRGB(int redLow, int redHigh, int greenLow, int greenHigh, int blueLow, int blueHigh);
20  BinaryImage *ThresholdHSL(int hueLow, int hueHigh, int saturationLow, int saturationHigh, int luminenceLow, int luminenceHigh);
21  BinaryImage *ThresholdHSV(int hueLow, int hueHigh, int saturationLow, int saturationHigh, int valueHigh, int valueLow);
22  BinaryImage *ThresholdHSI(int hueLow, int hueHigh, int saturationLow, int saturationHigh, int intensityLow, int intensityHigh);
23  BinaryImage *ThresholdRGB(Threshold &threshold);
24  BinaryImage *ThresholdHSL(Threshold &threshold);
25  BinaryImage *ThresholdHSV(Threshold &threshold);
26  BinaryImage *ThresholdHSI(Threshold &threshold);
27  MonoImage *GetRedPlane();
28  MonoImage *GetGreenPlane();
29  MonoImage *GetBluePlane();
30  MonoImage *GetHSLHuePlane();
31  MonoImage *GetHSVHuePlane();
32  MonoImage *GetHSIHuePlane();
33  MonoImage *GetHSLSaturationPlane();
34  MonoImage *GetHSVSaturationPlane();
35  MonoImage *GetHSISaturationPlane();
36  MonoImage *GetLuminancePlane();
37  MonoImage *GetValuePlane();
38  MonoImage *GetIntensityPlane();
39  void ReplaceRedPlane(MonoImage *plane);
40  void ReplaceGreenPlane(MonoImage *plane);
41  void ReplaceBluePlane(MonoImage *plane);
42  void ReplaceHSLHuePlane(MonoImage *plane);
43  void ReplaceHSVHuePlane(MonoImage *plane);
44  void ReplaceHSIHuePlane(MonoImage *plane);
48  void ReplaceLuminancePlane(MonoImage *plane);
49  void ReplaceValuePlane(MonoImage *plane);
50  void ReplaceIntensityPlane(MonoImage *plane);
51  void ColorEqualize();
52  void LuminanceEqualize();
53 
54 private:
55  BinaryImage *ComputeThreshold(ColorMode colorMode, int low1, int high1, int low2, int high2, int low3, int high3);
56  void Equalize(bool allPlanes);
57  MonoImage * ExtractColorPlane(ColorMode mode, int planeNumber);
58  MonoImage * ExtractFirstColorPlane(ColorMode mode);
59  MonoImage * ExtractSecondColorPlane(ColorMode mode);
60  MonoImage * ExtractThirdColorPlane(ColorMode mode);
61  void ReplacePlane(ColorMode mode, MonoImage *plane, int planeNumber);
62  void ReplaceFirstColorPlane(ColorMode mode, MonoImage *plane);
63  void ReplaceSecondColorPlane(ColorMode mode, MonoImage *plane);
64  void ReplaceThirdColorPlane(ColorMode mode, MonoImage *plane);
65 };
66 
67 #endif
68 
void ReplaceGreenPlane(MonoImage *plane)
Definition: ColorImage.cpp:342
void ReplaceLuminancePlane(MonoImage *plane)
Definition: ColorImage.cpp:423
void ReplaceHSIHuePlane(MonoImage *plane)
Definition: ColorImage.cpp:383
void ReplaceHSVSaturationPlane(MonoImage *plane)
Definition: ColorImage.cpp:403
BinaryImage * ThresholdHSI(int hueLow, int hueHigh, int saturationLow, int saturationHigh, int intensityLow, int intensityHigh)
Definition: ColorImage.cpp:132
BinaryImage * ThresholdHSV(int hueLow, int hueHigh, int saturationLow, int saturationHigh, int valueHigh, int valueLow)
Definition: ColorImage.cpp:105
void ReplaceHSLHuePlane(MonoImage *plane)
Definition: ColorImage.cpp:363
void ReplaceHSLSaturationPlane(MonoImage *plane)
Definition: ColorImage.cpp:393
void ReplaceBluePlane(MonoImage *plane)
Definition: ColorImage.cpp:352
BinaryImage * ThresholdHSL(int hueLow, int hueHigh, int saturationLow, int saturationHigh, int luminenceLow, int luminenceHigh)
Definition: ColorImage.cpp:78
void ReplaceHSISaturationPlane(MonoImage *plane)
Definition: ColorImage.cpp:413
void ReplaceValuePlane(MonoImage *plane)
Definition: ColorImage.cpp:433
void ReplaceIntensityPlane(MonoImage *plane)
Definition: ColorImage.cpp:443
void ReplaceHSVHuePlane(MonoImage *plane)
Definition: ColorImage.cpp:373
BinaryImage * ThresholdRGB(int redLow, int redHigh, int greenLow, int greenHigh, int blueLow, int blueHigh)
Definition: ColorImage.cpp:51
void ReplaceRedPlane(MonoImage *plane)
Definition: ColorImage.cpp:332

Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by doxygen 1.8.6