edges.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_EDGES_H_
00027
#define _LIBCP_EDGES_H_
00028
00029
using namespace std;
00030
00031
#include "image.h"
00032
00033
namespace LIBCP{
00034
00039 struct HoughAccu {
00040
int xMin;
00041
int xMax;
00042
int yMin;
00043
int yMax;
00044
int width;
00045
int height;
00046
int radius;
00047
float *data;
00048 };
00049
00054 class Edges
00055 {
00056
00057
public:
00058
static int laplacianOfGaussian(
Image* dst,
Image* src );
00059
static int onePixelEdge(
Image* dst,
Image* src,
int window );
00060
static int morphologicalEdge(
Image* dst,
Image* src );
00061
static int lineExtract(
Image* dst,
Image* src );
00062
static int cannyEdge(
Image* dst,
Image* src,
00063
const int sigma );
00064
static int hysteresisThreshold(
Image* dst,
Image* src );
00065
static int localThreshold(
Image* dst,
Image* src );
00066
static int houghTransformLines(
Image* dst,
Image* src );
00067
static int houghTransformLinesFromGradient(
Image* dst,
Image* src,
00068
Image* gradient );
00069
static int inverseHoughTransformLines(
Image* dst,
Image* src );
00070
static int houghTransformCircles(
Image* dst,
Image* src,
00071
const int radius );
00072
static int houghTransformCircles(
Image* dst_image,
Image* dst_accu,
00073
Image* src,
00074
const int minRadius,
00075
const int maxRadius,
00076
const int xOffset,
00077
const int yOffset,
00078
int &originX,
00079
int &originY,
00080
double &radius);
00081
static int inverseHoughTransformCircles(
Image* dst,
Image* src,
00082
const int threshold,
00083
const int radius );
00084
00085
private:
00086
static int simpleCircle(
HoughAccu *accu,
00087
const int x,
const int y,
00088
const int r,
const float color);
00089
static double gauss(
double x,
double sigma );
00090
static double meanGauss (
double x,
double sigma );
00091
static double dGauss (
double x,
double sigma );
00092
static double norm (
double x,
double y );
00093
static bool inAccuWidth(
const HoughAccu *accu,
const int x);
00094
static bool inAccuHeight(
const HoughAccu *accu,
const int y);
00095
00096 };
00097 }
00098
00099
#endif //_LIBCP_EDGES_H_
Generated on Wed May 26 16:43:53 2004 for libcp by
1.3.7