cppcode/rgbcubeIPOL.cpp File Reference

Auxiliary functions for color filtering and visualization. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "rgbcubeIPOL.h"
#include "colorfilteringIPOL.h"
#include "miscIPOL.h"
#include "mdmath.h"
Include dependency graph for rgbcubeIPOL.cpp:

Go to the source code of this file.

Functions

int count_RGBcolors (unsigned char *imR, unsigned char *imG, unsigned char *imB, int w, int h)
 Count the number of different colors in an image.
void PCAviews (unsigned char *imR, unsigned char *imG, unsigned char *imB, int w, int h, unsigned char *refR, unsigned char *refG, unsigned char *refB, int wref, int href, unsigned char *im12R, unsigned char *im12G, unsigned char *im12B, unsigned char *im13R, unsigned char *im13G, unsigned char *im13B, unsigned char *im23R, unsigned char *im23G, unsigned char *im23B, int wout, int hout)
 Create 3 images displaying the projections of the color cube of an image onto the 3 planes defined by the principal components of the color distribution in RGB space.
void PCAviewsB (unsigned char *imR, unsigned char *imG, unsigned char *imB, int w, int h, unsigned char *refR, unsigned char *refG, unsigned char *refB, int wref, int href, unsigned char *im123R, unsigned char *im123G, unsigned char *im123B, int wout, int hout)
 Concatenates into one single output image the 3 projections of the RGB color distribution of an input image onto the 3 planes defined by the principal components of the color distribution of a reference image (eventually, reference and input images may be the same).
void get_densityRGB_PCA (unsigned char *R, unsigned char *G, unsigned char *B, unsigned char *Rref, unsigned char *Gref, unsigned char *Bref, int w, int h, unsigned char *h12r, unsigned char *h12g, unsigned char *h12b, unsigned char *h13r, unsigned char *h13g, unsigned char *h13b, unsigned char *h23r, unsigned char *h23g, unsigned char *h23b, int wout, int hout, int rdst, float hdst, unsigned char cumdsty, unsigned char *Idsty, unsigned char logscale)
 Create 3 images displaying the densities of the colors in the color cube of an image, projected onto the 3 planes defined by the principal components of the color distribution in RGB space.
void PCAviews_density (unsigned char *imR, unsigned char *imG, unsigned char *imB, int w, int h, unsigned char *refR, unsigned char *refG, unsigned char *refB, unsigned char *im12R, unsigned char *im12G, unsigned char *im12B, unsigned char *im13R, unsigned char *im13G, unsigned char *im13B, unsigned char *im23R, unsigned char *im23G, unsigned char *im23B, int wout, int hout, int rdst, unsigned char cumdsty, unsigned char *Idsty)
 Create 3 images displaying the densities of the colors in the color cube of an image, projected onto the 3 planes defined by the principal components of the color distribution in RGB space.
void PCAviews_densityB (unsigned char *imR, unsigned char *imG, unsigned char *imB, int w, int h, unsigned char *refR, unsigned char *refG, unsigned char *refB, unsigned char *im123R, unsigned char *im123G, unsigned char *im123B, int wout, int hout, int rdst, unsigned char cumdsty, unsigned char *Idsty)
 Concatenates into one single output image the 3 projections of the density of the RGB color distribution of an input image onto the 3 planes defined by the principal components of the color distribution of a reference image (eventually, reference and input images may be the same).
int filtercolor (unsigned char *inR, unsigned char *inG, unsigned char *inB, unsigned char *outR, unsigned char *outG, unsigned char *outB, int w, int h, int type, float eitmax, int r, int rsim)
 Filter the cloud of RGB points associated to a color image by iteratively projecting the points to a line (1D projection) or a plane (2D projection) computed using Principal Components Analysis of a local neighborhood of the point in RGB space.
void mergeimages (unsigned char *in1R, unsigned char *in1G, unsigned char *in1B, unsigned char *in2R, unsigned char *in2G, unsigned char *in2B, unsigned char *outR, unsigned char *outG, unsigned char *outB, int w, int h)
 Create a new image identical to the first input image except for pixels with (0, 0, 0) RGB value which are replaced by the pixels of the second input image.
void densityImage (unsigned char *R, unsigned char *G, unsigned char *B, int w, int h, unsigned char *I, int rdst, unsigned char logscale)
 Create an output image where the color of each pixel has been replaced by a brightness value proportional to the density of the color (white: high density, black: low density).
int RGBviews_sequence (unsigned char *imR, unsigned char *imG, unsigned char *imB, int win, int hin, unsigned char ***viewsR, unsigned char ***viewsG, unsigned char ***viewsB, int wview, int hview, unsigned char displayDensity)
 Generate a rotating sequence of views of the RGB cube.
int RGBviews_sequence_params (const char *paramsfile)
 Generate the parameters of the projection planes for a rotating sequence of views of the RGB cube.
void delete_views_sequence (unsigned char **viewR, unsigned char **viewG, unsigned char **viewB, int nviews)
 Delete data structure storing 3D views of the RGB cube.
void compute_RGB_PCA (unsigned char *R, unsigned char *G, unsigned char *B, int npoints, float &Rcm, float &Gcm, float &Bcm, float &vp1, float &vp2, float &vp3, float vc1[3], float vc2[3], float vc3[3])
 Principal Components Analysis (PCA) of the cloud of RGB points associated to a color image.
void cube_edges (float **Rout, float **Gout, float **Bout, int &npoints)
 Create a set of color points along the edges of the RGB color cube.
void project_point (float P[3], float PP[3], float M[3], float u[3], float &d, unsigned char option)
 Find the projection of a R^3 point onto a line or a plane.
void projectRGBcube (unsigned char *R, unsigned char *G, unsigned char *B, int npoints, unsigned char *I, unsigned char *Rout, unsigned char *Gout, unsigned char *Bout, int wout, int hout, float M[3], float u[3], float v[3])
 Create image displaying the projection of the color cube of a color image onto a plane (rescale projected points to fit the output image size).
void projectRGBcubeB (unsigned char *R, unsigned char *G, unsigned char *B, int npoints, unsigned char *I, unsigned char *Rout, unsigned char *Gout, unsigned char *Bout, int wout, int hout, float M[3], float u[3], float v[3])
 Create image displaying the projection of the color cube of a color image onto a plane (in this case the center of projection is located at the center of the output image, which was not necessarily the case in 'projectRGBcube').
void projectRGBdensities (unsigned char *R, unsigned char *G, unsigned char *B, int npoints, unsigned char *Rout, unsigned char *Gout, unsigned char *Bout, int wout, int hout, float M[3], float u[3], float v[3], float ***dsty, float &maxdsty, unsigned char logscale)
 Create image displaying the projection of the color cube of a color image onto a plane. Each output image pixel is displayed with a grey level proportional to the cumulated color density of the points projected onto that pixel (X-rays projection).
float diffRMSE (unsigned char *R1, unsigned char *G1, unsigned char *B1, unsigned char *R2, unsigned char *G2, unsigned char *B2, int w, int h, unsigned char use_voxel, float &dmean)
 Compute Root Mean Square Error between two images.
void RGBcube2PLY (unsigned char *R, unsigned char *G, unsigned char *B, int npoints, unsigned char *I, const char *nameout)
 Create a PLY file storing the RGB color cube (including its edges) (optionally displaying density information).
void RGBcube2VRML2 (unsigned char *R, unsigned char *G, unsigned char *B, int npoints, unsigned char *I, const char *nameout)
 Create a VRML2.0 file storing the RGB color cube (including its edges) (optionally displaying density information).

Detailed Description

Auxiliary functions for color filtering and visualization.

Version:
1.0
Author:
Jose Luis Lisani; <joseluis.lisani@uib.es>

Definition in file rgbcubeIPOL.cpp.


Function Documentation

void compute_RGB_PCA ( unsigned char *  R,
unsigned char *  G,
unsigned char *  B,
int  npoints,
float &  Rcm,
float &  Gcm,
float &  Bcm,
float &  vp1,
float &  vp2,
float &  vp3,
float  vc1[3],
float  vc2[3],
float  vc3[3] 
)

Principal Components Analysis (PCA) of the cloud of RGB points associated to a color image.

Parameters:
[in] R,G,B color channels of the image
[in] npoints number of image pixels=number of color points
[out] Rcm,Gcm,Bcm center of mass of the color distribution in RGB space
[out] vp1,vp2,vp3 eigenvalues associated to the principal components
[out] vc1,vc2,vc3 eigenvectors (unitary) associated to the principal components

Definition at line 1025 of file rgbcubeIPOL.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int count_RGBcolors ( unsigned char *  imR,
unsigned char *  imG,
unsigned char *  imB,
int  w,
int  h 
)

Count the number of different colors in an image.

Parameters:
[in] imR,imG,imB color channels of the imput image
[in] w,h image dimensions
Returns:
number of colors

Definition at line 47 of file rgbcubeIPOL.cpp.

Here is the caller graph for this function:

void cube_edges ( float **  Rout,
float **  Gout,
float **  Bout,
int &  npoints 
)

Create a set of color points along the edges of the RGB color cube.

Parameters:
[out] Rout,Gout,Bout arrays containing the RGB values of the created set of points
[out] npoints number of points in the set

Definition at line 1090 of file rgbcubeIPOL.cpp.

Here is the caller graph for this function:

void delete_views_sequence ( unsigned char **  viewR,
unsigned char **  viewG,
unsigned char **  viewB,
int  nviews 
)

Delete data structure storing 3D views of the RGB cube.

Parameters:
[in] viewR,viewG,viewB arrays of data for R, G and B channels
[in] nviews number of views

Definition at line 998 of file rgbcubeIPOL.cpp.

void densityImage ( unsigned char *  R,
unsigned char *  G,
unsigned char *  B,
int  w,
int  h,
unsigned char *  I,
int  rdst,
unsigned char  logscale 
)

Create an output image where the color of each pixel has been replaced by a brightness value proportional to the density of the color (white: high density, black: low density).

The density of a color C (in RGB space) is defined as

\[ \delta(C)=\sum_{C' \in {\cal S}} e^{-d(C, C')^2/h^2} \]

where $ {\cal S} $ is the set of neighbors of C $ d(C, C') $ is the Euclidean distance between colors C and C' in RGB space and $ h $ is a weighting parameter

The set of neighbors of a color C is composed of all the colors at L1-distance below some threshold $ r $. Each color appears in the set of neighbors as many times as it is present in the image (i.e. the frequency of the color is taken into account in the computations). Tipically the weighting parameter is $ h = r/\sqrt{2} $ so the weight of the furthest neighbors is $ e^{-2}=0.135 $

Parameters:
[in] R,G,B color channels of the first input image
[in] w,h image size
[out] I output gray level image
[in] rdst radius of neighborhood around each color point needed to compute its density
[in] logscale if logscale=1 display values using logarithmic scale, otherwise use linear scale
See also:
RGBdensities

Definition at line 568 of file rgbcubeIPOL.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

float diffRMSE ( unsigned char *  R1,
unsigned char *  G1,
unsigned char *  B1,
unsigned char *  R2,
unsigned char *  G2,
unsigned char *  B2,
int  w,
int  h,
unsigned char  use_voxel,
float &  dmean 
)

Compute Root Mean Square Error between two images.

Parameters:
[in] R1,G1,B1 color channels of the first image
[in] R2,G2,B2 color channels of the first image
[in] w,h size of the images
[in] use_voxel if use_voxel=1 compute differences between color clouds, without taking into account the number of pixels associated to each color
[out] dmean average distance between the colors of both images
Returns:
RMSE

Definition at line 1676 of file rgbcubeIPOL.cpp.

Here is the caller graph for this function:

int filtercolor ( unsigned char *  inR,
unsigned char *  inG,
unsigned char *  inB,
unsigned char *  outR,
unsigned char *  outG,
unsigned char *  outB,
int  w,
int  h,
int  type,
float  eitmax,
int  r,
int  rsim 
)

Filter the cloud of RGB points associated to a color image by iteratively projecting the points to a line (1D projection) or a plane (2D projection) computed using Principal Components Analysis of a local neighborhood of the point in RGB space.

Parameters:
[in] inR,inG,inB color channels of the input image
[out] outR,outG,outB color channels of the output image
[in] w,h image dimensions
[in] type type=1 for 1D projection, type=2 for 2D projection
[in] eitmax stop criterion of the algorithm. The algorithm is iterated until the average difference of corresponding colors in two consecutive iterations is below eitmax
[in] r distance that defines the neighborhood of a color point (neighbors are RGB points at L1-distance below r)
[in] rsim distance defining a small neighborhood around each color point, it is used to speed up the algorithm. It must be much smaller than r, typically rsim=r/3
See also:
colorfiltering
Returns:
number of iterations of the algorithm

Definition at line 487 of file rgbcubeIPOL.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void get_densityRGB_PCA ( unsigned char *  R,
unsigned char *  G,
unsigned char *  B,
unsigned char *  Rref,
unsigned char *  Gref,
unsigned char *  Bref,
int  w,
int  h,
unsigned char *  h12r,
unsigned char *  h12g,
unsigned char *  h12b,
unsigned char *  h13r,
unsigned char *  h13g,
unsigned char *  h13b,
unsigned char *  h23r,
unsigned char *  h23g,
unsigned char *  h23b,
int  wout,
int  hout,
int  rdst,
float  hdst,
unsigned char  cumdsty,
unsigned char *  Idsty,
unsigned char  logscale 
)

Create 3 images displaying the densities of the colors in the color cube of an image, projected onto the 3 planes defined by the principal components of the color distribution in RGB space.

Parameters:
[in] R,G,B color channels of the image whose densities are to be displayed
[in] refR,refG,refB color channels of the image whose color distribution is used to compute Principal Components (reference image)
[in] w,h input image dimensions (= reference image dimensions)
[out] h12r,h12g,h12b color channels of the image displaying the projection onto the plane defined by the first and second principal components
[out] h13r,h13g,h13b color channels of the image displaying the projection onto the plane defined by the first and third principal components
[out] h23r,h23g,h23b color channels of the image displaying the projection onto the plane defined by the second and third principal components
[in] wout,hout dimensions of the output images
[in] rdst radius of neighborhood around each color point needed to compute its density
[in] hdst weighting factor for density computation
[in] cumdsty if cumdsty=1 display cumulated densities (X-rays projection), else display densities of color points
[in] Idsty grey scale image where each pixel is displayed with a grey level proportional to the density of its color in the original image
[in] logscale if logscale=1 display values using logarithmic scale, otherwise use linear scale
See also:
RGBdensities
compute_RGB_PCA
projectRGBdensities
projectRGBcube

Definition at line 247 of file rgbcubeIPOL.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void mergeimages ( unsigned char *  in1R,
unsigned char *  in1G,
unsigned char *  in1B,
unsigned char *  in2R,
unsigned char *  in2G,
unsigned char *  in2B,
unsigned char *  outR,
unsigned char *  outG,
unsigned char *  outB,
int  w,
int  h 
)

Create a new image identical to the first input image except for pixels with (0, 0, 0) RGB value which are replaced by the pixels of the second input image.

Parameters:
[in] in1R,in1G,in1B color channels of the first input image
[in] in2R,in2G,in2B color channels of the second input image
[out] outR,outG,outB color channels of the output image
[in] w,h images size

Definition at line 517 of file rgbcubeIPOL.cpp.

Here is the caller graph for this function:

void PCAviews ( unsigned char *  imR,
unsigned char *  imG,
unsigned char *  imB,
int  w,
int  h,
unsigned char *  refR,
unsigned char *  refG,
unsigned char *  refB,
int  wref,
int  href,
unsigned char *  im12R,
unsigned char *  im12G,
unsigned char *  im12B,
unsigned char *  im13R,
unsigned char *  im13G,
unsigned char *  im13B,
unsigned char *  im23R,
unsigned char *  im23G,
unsigned char *  im23B,
int  wout,
int  hout 
)

Create 3 images displaying the projections of the color cube of an image onto the 3 planes defined by the principal components of the color distribution in RGB space.

Parameters:
[in] imR,imG,imB color channels of the image whose color cube is to be projected
[in] w,h image dimensions
[in] refR,refG,refB color channels of the image whose color distribution is used to compute Principal Components (reference image)
[in] wref,href reference image dimensions
[out] im12R,im12G,im12B color channels of the image displaying the projection onto the plane defined by the first and second principal components
[out] im13R,im13G,im13B color channels of the image displaying the projection onto the plane defined by the first and third principal components
[out] im23R,im23G,im23B color channels of the image displaying the projection onto the plane defined by the second and third principal components
[in] wout,hout dimensions of the output images
See also:
projectRGBcube
compute_RGB_PCA

Definition at line 110 of file rgbcubeIPOL.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void PCAviews_density ( unsigned char *  imR,
unsigned char *  imG,
unsigned char *  imB,
int  w,
int  h,
unsigned char *  refR,
unsigned char *  refG,
unsigned char *  refB,
unsigned char *  im12R,
unsigned char *  im12G,
unsigned char *  im12B,
unsigned char *  im13R,
unsigned char *  im13G,
unsigned char *  im13B,
unsigned char *  im23R,
unsigned char *  im23G,
unsigned char *  im23B,
int  wout,
int  hout,
int  rdst,
unsigned char  cumdsty,
unsigned char *  Idsty 
)

Create 3 images displaying the densities of the colors in the color cube of an image, projected onto the 3 planes defined by the principal components of the color distribution in RGB space.

Parameters:
[in] imR,imG,imB color channels of the image whose densities are to be displayed
[in] refR,refG,refB color channels of the image whose color distribution is used to compute Principal Components (reference image)
[in] w,h input image dimensions (= reference image dimensions)
[out] im12R,im12G,im12B color channels of the image displaying the projection onto the plane defined by the first and second principal components
[out] im13R,im13G,im13B color channels of the image displaying the projection onto the plane defined by the first and third principal components
[out] im23R,im23G,im23B color channels of the image displaying the projection onto the plane defined by the second and third principal components
[in] wout,hout dimensions of the output images
[in] rdst radius of neighborhood around each color point needed to compute its density
[in] cumdsty if cumdsty=1 display cumulated densities (X-rays projection), else display densities of color points
[in] Idsty grey scale image where each pixel is displayed with a grey level proportional to the density of its color in the original image
See also:
get_densityRGB_PCA

Definition at line 355 of file rgbcubeIPOL.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void PCAviews_densityB ( unsigned char *  imR,
unsigned char *  imG,
unsigned char *  imB,
int  w,
int  h,
unsigned char *  refR,
unsigned char *  refG,
unsigned char *  refB,
unsigned char *  im123R,
unsigned char *  im123G,
unsigned char *  im123B,
int  wout,
int  hout,
int  rdst,
unsigned char  cumdsty,
unsigned char *  Idsty 
)

Concatenates into one single output image the 3 projections of the density of the RGB color distribution of an input image onto the 3 planes defined by the principal components of the color distribution of a reference image (eventually, reference and input images may be the same).

Parameters:
[in] imR,imG,imB color channels of the image whose densities are to be displayed
[in] refR,refG,refB color channels of the image whose color distribution is used to compute Principal Components(reference image)
[in] w,h input image dimensions (= reference image dimensions)
[out] im123R,im123G,im123B color channels of the image displaying the projections
[in] wout,hout dimensions of the image projections (output image size= (3 x wout) x hout )
[in] rdst radius of neighborhood around each color point needed to compute its density
[in] cumdsty if cumdsty=1 display cumulated densities (X-rays projection), else display densities of color points
[in] Idsty grey scale image where each pixel is displayed with a grey level proportional to the density of its color in the original image
See also:
get_densityRGB_PCA

Definition at line 409 of file rgbcubeIPOL.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void PCAviewsB ( unsigned char *  imR,
unsigned char *  imG,
unsigned char *  imB,
int  w,
int  h,
unsigned char *  refR,
unsigned char *  refG,
unsigned char *  refB,
int  wref,
int  href,
unsigned char *  im123R,
unsigned char *  im123G,
unsigned char *  im123B,
int  wout,
int  hout 
)

Concatenates into one single output image the 3 projections of the RGB color distribution of an input image onto the 3 planes defined by the principal components of the color distribution of a reference image (eventually, reference and input images may be the same).

Parameters:
[in] imR,imG,imB color channels of the image whose color cube is to be projected (input image)
[in] w,h image dimensions
[in] refR,refG,refB color channels of the image whose color distribution is used to compute Principal Components(reference image)
[in] wref,href reference image dimensions
[out] im123R,im123G,im123B color channels of the output image
[in] wout,hout dimensions of the image projections (output image size= (3 x wout) x hout )
See also:
projectRGBcube
compute_RGB_PCA

Definition at line 163 of file rgbcubeIPOL.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void project_point ( float  P[3],
float  PP[3],
float  M[3],
float  u[3],
float &  d,
unsigned char  option 
)

Find the projection of a R^3 point onto a line or a plane.

Parameters:
[in] P input point
[out] PP projected point
[in] M point belonging to the line or plane
[in] u unitary direction vector of the line or orthonormal vector to the plane
[out] d distance from original point to its projection
[in] option option=1 projection onto line, otherwise projection onto plane

Definition at line 1147 of file rgbcubeIPOL.cpp.

Here is the call graph for this function:

void projectRGBcube ( unsigned char *  R,
unsigned char *  G,
unsigned char *  B,
int  npoints,
unsigned char *  I,
unsigned char *  Rout,
unsigned char *  Gout,
unsigned char *  Bout,
int  wout,
int  hout,
float  M[3],
float  u[3],
float  v[3] 
)

Create image displaying the projection of the color cube of a color image onto a plane (rescale projected points to fit the output image size).

Parameters:
[in] R,G,B color channels of the input image
[in] npoints image size
[in] I if not NULL, draw pixel n with grey level I[n], else use color (R[n], G[n], B[n])
[out] Rout,Gout,Bout color channels of the output image
[in] wout,hout dimensions of the output image
[in] M origin of the plane
[in] u,v unitary vectors defining the coordinates system of the projection plane

Definition at line 1192 of file rgbcubeIPOL.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void projectRGBcubeB ( unsigned char *  R,
unsigned char *  G,
unsigned char *  B,
int  npoints,
unsigned char *  I,
unsigned char *  Rout,
unsigned char *  Gout,
unsigned char *  Bout,
int  wout,
int  hout,
float  M[3],
float  u[3],
float  v[3] 
)

Create image displaying the projection of the color cube of a color image onto a plane (in this case the center of projection is located at the center of the output image, which was not necessarily the case in 'projectRGBcube').

Parameters:
[in] R,G,B color channels of the input image
[in] npoints image size
[in] I if not NULL, draw pixel n with grey level I[n], else use color (R[n], G[n], B[n])
[out] Rout,Gout,Bout color channels of the output image
[in] wout,hout dimensions of the output image
[in] M origin of the plane
[in] u,v unitary vectors defining the coordinates system of the projection plane

Definition at line 1355 of file rgbcubeIPOL.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void projectRGBdensities ( unsigned char *  R,
unsigned char *  G,
unsigned char *  B,
int  npoints,
unsigned char *  Rout,
unsigned char *  Gout,
unsigned char *  Bout,
int  wout,
int  hout,
float  M[3],
float  u[3],
float  v[3],
float ***  dsty,
float &  maxdsty,
unsigned char  logscale 
)

Create image displaying the projection of the color cube of a color image onto a plane. Each output image pixel is displayed with a grey level proportional to the cumulated color density of the points projected onto that pixel (X-rays projection).

Parameters:
[in] R,G,B color channels of the input image
[in] npoints number of image pixels=number of color points
[out] Rout,Gout,Bout color channels of the output image
[in] wout,hout dimensions of the output image
[in] M origin of the plane
[in] u,v unitary vectors defining the coordinates system of the projection plane
[in] dsty densities of the color points
[in] maxdsty maximum density value (if unknown maxdsty=0)
[in] logscale if logscale=1 display values using logarithmic scale, otherwise use linear scale

Definition at line 1515 of file rgbcubeIPOL.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void RGBcube2PLY ( unsigned char *  R,
unsigned char *  G,
unsigned char *  B,
int  npoints,
unsigned char *  I,
const char *  nameout 
)

Create a PLY file storing the RGB color cube (including its edges) (optionally displaying density information).

Parameters:
[in] R,G,B color channels of the input image
[in] npoints image size
[in] I if <> NULL, draw pixel n with grey level I[n], else use color (R[n], G[n], B[n])
[out] nameout output file name (PLY file format)

Definition at line 1739 of file rgbcubeIPOL.cpp.

Here is the call graph for this function:

void RGBcube2VRML2 ( unsigned char *  R,
unsigned char *  G,
unsigned char *  B,
int  npoints,
unsigned char *  I,
const char *  nameout 
)

Create a VRML2.0 file storing the RGB color cube (including its edges) (optionally displaying density information).

Parameters:
[in] R,G,B color channels of the input image
[in] npoints image size
[in] I if <> NULL, draw pixel n with grey level I[n], else use color (R[n], G[n], B[n])
[out] nameout output file name (VRML2.0 file format)

Definition at line 1806 of file rgbcubeIPOL.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int RGBviews_sequence ( unsigned char *  imR,
unsigned char *  imG,
unsigned char *  imB,
int  win,
int  hin,
unsigned char ***  viewsR,
unsigned char ***  viewsG,
unsigned char ***  viewsB,
int  wview,
int  hview,
unsigned char  displayDensity 
)

Generate a rotating sequence of views of the RGB cube.

Parameters:
[in] imR,imG,imB color channels of the input image
[in] win,hin dimensions of the input image
[out] viewR,viewG,viewB color channels of the views
[in] wview,hview dimensions of the views
[in] displayDensity if active display grey levels proportional (logaritmic scale) to the density of the color points, else display actual RGB values
Returns:
number of views in the sequence

Definition at line 604 of file rgbcubeIPOL.cpp.

Here is the call graph for this function:

int RGBviews_sequence_params ( const char *  paramsfile  ) 

Generate the parameters of the projection planes for a rotating sequence of views of the RGB cube.

Parameters:
[out] paramsfile output file name (text file)
Returns:
number of views in the sequence

Definition at line 819 of file rgbcubeIPOL.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

 All Classes Files Functions Variables Defines
Generated on Fri Jul 8 12:55:52 2011 for color dimensional filtering by  doxygen 1.6.3