histogram.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
00026
#ifndef _LIBCP_HISTOGRAM_H_
00027
#define _LIBCP_HISTOGRAM_H_
00028
00029
#include <cstdlib>
00030
#include <iostream>
00031
#include "image.h"
00032
00033
using namespace std;
00034
namespace LIBCP{
00035
00036
struct histo{
00037 Image* img;
00038
int histogram[G];
00039 };
00040
00046 class Histogram
00047 {
00048
public:
00049
static void makeHistogram(
Image* img, histo* histogram );
00050
static int negativeImage(
Image* dst,
Image* src );
00051
static int markLevelRange(
Image* dst,
Image* src,
int markStart,
00052
int markEnd, Color* col,
bool background =
true );
00053
static int stretchContrast(
Image* dst,
Image* src );
00054
static int logarithmOperator(
Image* dst,
Image* src );
00055
static int binarize(
Image* dst,
Image* src,
int threshold );
00056
static int hysteresisThreshold(
Image* dst,
Image* src,
00057
const int low,
const int up );
00058
static int falseColoring(
Image* dst,
Image* src );
00059
static int gammaCorrection(
Image* dst,
Image* src,
float r = 2.2f );
00060
static int localThreshold(
Image* dst,
Image* src );
00061
00062
private:
00063
static int trace(
const int x,
const int y,
00064
Image *src,
Image *dst,
00065
const int lowThreshold );
00066
00067 };
00068 }
00069
00070
#endif
Generated on Wed May 26 16:43:53 2004 for libcp by
1.3.7