00001
00002 #ifndef __JBXL_GRAPHIC_MATH_H_
00003 #define __JBXL_GRAPHIC_MATH_H_
00004
00005
00014 #include "gdata.h"
00015
00019 typedef struct {
00020 int mode;
00021 int msize;
00022 int nfact;
00023 int* imask;
00024 } FMask;
00025
00026
00027 #define ALL 0x0000
00028 #define NONE_SHAPE 0x0001
00029 #define PEAK 0x0002
00030 #define PIT 0x0004
00031 #define SADDLE_RIDGE 0x0008
00032 #define SADDLE_VALLEY 0x0010
00033 #define MINIMAL 0x0020
00034 #define RIDGE 0x0040
00035 #define VALLEY 0x0080
00036 #define FLAT 0x0100
00037
00038
00039 #define TOP_VIEW 0
00040 #define SIDEZ_VIEW 0
00041 #define SIDEX_VIEW 1
00042 #define SIDEY_VIEW 2
00043 #define TOP_VIEW_DEPTH 3
00044 #define SIDEZ_VIEW_DEPTH 3
00045
00046
00047 WSGraph xSobel(WSGraph vp);
00048 WSGraph ySobel(WSGraph vp);
00049 WSGraph zSobel(WSGraph vp);
00050 FSGraph fxSobel(FSGraph vp);
00051 FSGraph fySobel(FSGraph vp);
00052 FSGraph fzSobel(FSGraph vp);
00053
00054 WSGraph xxSobel(WSGraph vp);
00055 WSGraph yySobel(WSGraph vp);
00056 WSGraph zzSobel(WSGraph vp);
00057 FSGraph fxxSobel(FSGraph vp);
00058 FSGraph fyySobel(FSGraph vp);
00059 FSGraph fzzSobel(FSGraph vp);
00060
00061 WSGraph Nabra (WSGraph vp);
00062 FSGraph fNabra(FSGraph vp);
00063 VSGraph vNabra(WSGraph vp);
00064 VSGraph vfNabra(FSGraph vp);
00065
00066 WSGraph Laplacian(WSGraph vp, int mode);
00067
00068 VSGraph curvature(FSGraph vp);
00069 VSGraph curvature3D(FSGraph vp);
00070 WSGraph curv2WSGraph(VSGraph vp);
00071 WSGraph WSCurve(WSGraph gx, int mode, int cc);
00072
00073 WSGraph euclid_distance(WSGraph vp, int* rr, int bc);
00074 int out_round(WSGraph, int, int, IRBound*, int);
00075
00076 WSGraph edge_enhance(WSGraph gd, int mode);
00077 WSGraph median(WSGraph, int);
00078 FMask gauss_mask(double sig, int mode, int size);
00079 WSGraph imask(WSGraph, FMask);
00080 WSGraph to2d(WSGraph gd, int mode);
00081
00082 #define distance2(vp, rr, bc) euclid_distance(vp, rr, bc)
00083 #define mip(vp) to2d(vp, TOP_VIEW)
00084 #define free_mask(mk) free((mk)->imask)
00085
00086
00087 #endif // __JBXL_GRAPHIC_MATH_H_
00088