00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef RGBCUBE_IPOL_H
00020 #define RGBCUBE_IPOL_H
00021
00022 int count_RGBcolors(unsigned char *imR, unsigned char *imG,
00023 unsigned char *imB,
00024 int w, int h);
00025
00026 void PCAviews(unsigned char *imR, unsigned char *imG, unsigned char *imB,
00027 int w, int h,
00028 unsigned char *refR, unsigned char *refG, unsigned char *refB,
00029 int wref, int href,
00030 unsigned char *im12R, unsigned char *im12G, unsigned char *im12B,
00031 unsigned char *im13R, unsigned char *im13G, unsigned char *im13B,
00032 unsigned char *im23R, unsigned char *im23G,
00033 unsigned char *im23B,
00034 int wout, int hout);
00035
00036 void PCAviewsB(unsigned char *imR, unsigned char *imG, unsigned char *imB,
00037 int w, int h,
00038 unsigned char *refR, unsigned char *refG, unsigned char *refB,
00039 int wref, int href,
00040 unsigned char *im123R, unsigned char *im123G,
00041 unsigned char *im123B,
00042 int wout, int hout);
00043
00044 void PCAviews_density(unsigned char *imR, unsigned char *imG,
00045 unsigned char *imB,
00046 int w, int h,
00047 unsigned char *refR, unsigned char *refG,
00048 unsigned char *refB,
00049 unsigned char *im12R, unsigned char *im12G,
00050 unsigned char *im12B,
00051 unsigned char *im13R, unsigned char *im13G,
00052 unsigned char *im13B,
00053 unsigned char *im23R, unsigned char *im23G,
00054 unsigned char *im23B,
00055 int wout, int hout,
00056 int rdst, unsigned char cumdsty, unsigned char *Idsty);
00057
00058 void PCAviews_densityB(unsigned char *imR, unsigned char *imG,
00059 unsigned char *imB,
00060 int w, int h,
00061 unsigned char *refR, unsigned char *refG,
00062 unsigned char *refB,
00063 unsigned char *im123R, unsigned char *im123G,
00064 unsigned char *im123B,
00065 int wout, int hout, int rdst, unsigned char cumdsty,
00066 unsigned char *Idsty);
00067
00068 void rmHighGradHue(unsigned char *imR, unsigned char *imG, unsigned char *imB,
00069 unsigned char *lowR, unsigned char *lowG,
00070 unsigned char *lowB,
00071 unsigned char *highR, unsigned char *highG,
00072 unsigned char *highB,
00073 int w, int h, float thgrad, float thsat);
00074
00075
00076
00077 int filtercolor(unsigned char *inR, unsigned char *inG, unsigned char *inB,
00078 unsigned char *outR, unsigned char *outG, unsigned char *outB,
00079 int w, int h, int type, float eitmax, int r, int rsim);
00080
00081
00082 void mergeimages(unsigned char *in1R, unsigned char *in1G, unsigned char *in1B,
00083 unsigned char *in2R, unsigned char *in2G, unsigned char *in2B,
00084 unsigned char *outR, unsigned char *outG, unsigned char *outB,
00085 int w, int h);
00086
00087 void densityImage(unsigned char *R, unsigned char *G, unsigned char *B,
00088 int w, int h,
00089 unsigned char *I, int rdst, unsigned char logscale);
00090
00091 int RGBviews_sequence(unsigned char *imR, unsigned char *imG,
00092 unsigned char *imB,
00093 int w, int h,
00094 unsigned char ***viewsR, unsigned char ***viewsG,
00095 unsigned char ***viewsB,
00096 int wview, int hview, unsigned char displayDensity);
00097
00098 int RGBviews_sequence_params(const char *paramsfile);
00099
00100 void delete_views_sequence(unsigned char **viewR, unsigned char **viewG,
00101 unsigned char **viewB,
00102 int nviews);
00103
00104 void compute_RGB_PCA(unsigned char *R, unsigned char *G, unsigned char *B,
00105 int npoints,
00106 float &Rcm, float &Gcm, float &Bcm, float &vp1,
00107 float &vp2, float &vp3,
00108 float vc1[3], float vc2[3], float vc3[3]);
00109
00110 void projectRGBcube(unsigned char *R, unsigned char *G, unsigned char *B,
00111 int npoints,
00112 unsigned char *I,
00113 unsigned char *Rout, unsigned char *Gout,
00114 unsigned char *Bout,
00115 int wout, int hout,
00116 float M[3], float u[3], float v[3]);
00117
00118 void projectRGBcubeB(unsigned char *R, unsigned char *G, unsigned char *B,
00119 int npoints,
00120 unsigned char *I,
00121 unsigned char *Rout, unsigned char *Gout,
00122 unsigned char *Bout,
00123 int wout, int hout,
00124 float M[3], float u[3], float v[3]);
00125
00126 void projectRGBdensities(unsigned char *R, unsigned char *G, unsigned char *B,
00127 int npoints,
00128 unsigned char *Rout, unsigned char *Gout,
00129 unsigned char *Bout,
00130 int wout, int hout, float M[3], float u[3],
00131 float v[3],
00132 float ***dsty,
00133 float &maxdsty, unsigned char logscale);
00134
00135 float diffRMSE(unsigned char *R1, unsigned char *G1, unsigned char *B1,
00136 unsigned char *R2, unsigned char *G2, unsigned char *B2,
00137 int w, int h, unsigned char use_voxel, float &dmean);
00138
00139 void RGBcube2PLY(unsigned char *R, unsigned char *G, unsigned char *B,
00140 int npoints,
00141 unsigned char *I, const char *nameout);
00142
00143 void RGBcube2VRML2(unsigned char *R, unsigned char *G, unsigned char *B,
00144 int npoints,
00145 unsigned char *I, const char *nameout);
00146
00147 #endif