Jafar
Classes | Functions
Module stereo

Detailed Description

Version:
0.1
Author:
ayman.zureiki@laas.fr

This module implements the Stereo Correlation Algorithm. Originally, it was in calife StereoCorrelation module, but it is heavilly rewritten.

History

Macro

Stereo.tcl defines a macro that uses tow stereo images to produce an image of 3D points

Tcl interface (generated by swig)

The interface of the module is generated from the following files:

Classes

class  jafar::stereo::CorrelationParams
 Contains all parameters needed for Rectification. More...
class  jafar::stereo::CorrelationResults
 Contains the result of Correlation. More...
class  jafar::stereo::ImagesSizes
 In this class we save all the values of the sizes of differents images. More...
class  jafar::stereo::ImagesTemporary
 Contains temporary buffers and variable needed in different algorithm. More...
class  jafar::stereo::ReconstructionParams
 Contains all parameters needed for Reconstruction 3D. More...
class  jafar::stereo::RectificationParams
 Contains all parameters needed for Rectification. More...
class  jafar::stereo::StereoException
 Base class for all exceptions defined in the module stereo. More...

Functions

jafar::image::Imagejafar::stereo::CorrelationResults::getImageForDisparity ()
 convert the disparity image in the CorrelationResult into a Image (for display purposes)
jafar::image::Imagejafar::stereo::CorrelationResults::getImageOfCorrelatedPixels (jafar::image::Image &rectifiedImage)
 Get a JarImage as a copy of the rectified image and in which the value of not correlated pixels (disparity == 0) are set to 0 (for display purposes)
::jafar::image::Imagejafar::stereo::getImageForDisparity (CorrelationResults &correlationResults)
 convert the disparity image in the CorrelationResult into a Image (for display purposes)
void jafar::stereo::GraphCutFULL (jafar::image::Image &rectifiedImage_g, jafar::image::Image &rectifiedImage_d, int nMaxDisparity, int Upq_max, char *disparityFile)
 Stereo matching using graph cut.
jafar::image::Imagejafar::stereo::ImagesTemporary::getImageForMoyennes ()
 convert the moyenne image in the CorrelationResult into a Image (for display purposes)
void jafar::stereo::jfrBlobFilterDisparites (CorrelationResults &correlationResults, int sizeMin, float diffMax)
 Blob_Filter.
void jafar::stereo::jfrCorrelationCensus (::jafar::image::Image &srcImage_gauche,::jafar::image::Image &srcImage_droite, ImagesSizes &imagesSizes, CorrelationParams &correlationParams, CorrelationResults &correlationResults)
 Correlation_Census.
void jafar::stereo::jfrCorrelationZncc (::jafar::image::Image &srcImage_gauche,::jafar::image::Image &srcImage_droite, ImagesTemporary &images_tmp_gauches, ImagesTemporary &images_tmp_droites, CorrelationParams &correlationParams, CorrelationResults &correlationResults)
 Correlation_Census.
void jafar::stereo::jfrTransform_census_8bits (::jafar::image::Image &srcImage, ImagesTemporary &imagesTmp, CorrelationParams::CENSUS_TYPE type_census,::jafar::image::Image &imCensus)
 Transform_census.
void jafar::stereo::jfrMoyennes (::jafar::image::Image &srcImage, int win_nb_lig, int win_nb_col, ImagesTemporary &imagesTmp)
 calculates the Mean Image using a window of given size.
void jafar::stereo::jfrMoyennesSigmas (::jafar::image::Image &srcImage, ImagesTemporary &imagesTmp, CorrelationParams &correlationParams)
 calculates the Mean Image and covariance using given correlation parameters.
void jafar::stereo::jfrReconstruction3D (CorrelationResults &correlationResults, ImagesSizes &imagesSizes, ReconstructionParams::RECONSTRUCTION_REPERE type_repere, ReconstructionParams::RECONSTRUCTION_TYPE type_recontruction, ReconstructionParams &reconstructionParams, RectificationParams &rectificationParamsGauche, model3d::Image3DTemplate< model3d::Point3D > &im3D)
 implements the Reconstruction algorithm.
void jafar::stereo::jfrReconstruction3DVar (CorrelationResults &correlationResults, ImagesSizes &imagesSizes, ReconstructionParams::RECONSTRUCTION_REPERE type_repere, ReconstructionParams::RECONSTRUCTION_TYPE type_recontruction, ReconstructionParams &reconstructionParams, RectificationParams &rectificationParamsGauche, model3d::Image3DTemplate< model3d::Point3DVar > &im3DVar)
 implements the Reconstruction algorithm and calculates errors.
void jafar::stereo::jfrRectification (::jafar::image::Image &srcImage,::jafar::image::Image &destImage, ImagesSizes &imagesSizes, RectificationParams &rectifParams, int reduction, RectificationParams::RECTIFICATION_TYPE type_rectification, RectificationParams::DISTORTION_TYPE type_distortion, RectificationParams::DO_INTERPOLATION do_interpolation)
 implements the Rectifiction algorithm

Function Documentation

::jafar::image::Image* jafar::stereo::getImageForDisparity ( CorrelationResults &  correlationResults)

convert the disparity image in the CorrelationResult into a Image (for display purposes)

Returns:
Image: an image for the disparity

convert the disparity image in the CorrelationResult into a Image (for display purposes)

Returns:
Image: an image for the disparity

convert the moyenne image in the CorrelationResult into a Image (for display purposes)

Returns:
Image: an image for the moyonne image

Get a JarImage as a copy of the rectified image and in which the value of not correlated pixels (disparity == 0) are set to 0 (for display purposes)

Returns:
Image: an image for the disparity
void jafar::stereo::GraphCutFULL ( jafar::image::Image rectifiedImage_g,
jafar::image::Image rectifiedImage_d,
int  nMaxDisparity,
int  Upq_max,
char *  disparityFile 
)

Stereo matching using graph cut.

The graph is a complete one, each node has six neibghours, and the the graph has nMaxDisparity layers. The images must be rectified.

Parameters:
rectifiedImage_g,rectifiedImage_g: the rectified left and right images.
nMaxDisparity: the maximum value of disparity. It must be positive. we suppose the range of disparity [0, nMaxDisparity(
Upq_max: This is a smoothing parameter. It defines the maximum value of the smoothin function u(p,q), where p and q are tow adjacent pixels. the value 100 may be a good start point for tuning.
disparityFile: a file name where the resulting disparity image will be saved. you must give the extension of the file also, for example, "disparity.ppm".
Note:
: This is algorithm is very hungry for memory. It is recommanded to not use it with image bigger than 128*128 with MaxMisparity bigger than 20.
void jafar::stereo::jfrBlobFilterDisparites ( CorrelationResults &  correlationResults,
int  sizeMin,
float  diffMax 
)

Blob_Filter.

Note:
All parameters must be reserved before calling this function
void jafar::stereo::jfrCorrelationCensus ( ::jafar::image::Image srcImage_gauche,
::jafar::image::Image srcImage_droite,
ImagesSizes &  imagesSizes,
CorrelationParams &  correlationParams,
CorrelationResults &  correlationResults 
)

Correlation_Census.

Note:
All parameters must be reserved before calling this function
void jafar::stereo::jfrCorrelationZncc ( ::jafar::image::Image srcImage_gauche,
::jafar::image::Image srcImage_droite,
ImagesTemporary &  images_tmp_gauches,
ImagesTemporary &  images_tmp_droites,
CorrelationParams &  correlationParams,
CorrelationResults &  correlationResults 
)

Correlation_Census.

Note:
All parameters must be reserved before calling this function
void jafar::stereo::jfrMoyennes ( ::jafar::image::Image srcImage,
int  win_nb_lig,
int  win_nb_col,
ImagesTemporary &  imagesTmp 
)

calculates the Mean Image using a window of given size.

Note:
The distination image must be reserved before calling this function
void jafar::stereo::jfrMoyennesSigmas ( ::jafar::image::Image srcImage,
ImagesTemporary &  imagesTmp,
CorrelationParams &  correlationParams 
)

calculates the Mean Image and covariance using given correlation parameters.

Note:
The distination image must be reserved before calling this function
void jafar::stereo::jfrReconstruction3D ( CorrelationResults &  correlationResults,
ImagesSizes &  imagesSizes,
ReconstructionParams::RECONSTRUCTION_REPERE  type_repere,
ReconstructionParams::RECONSTRUCTION_TYPE  type_recontruction,
ReconstructionParams &  reconstructionParams,
RectificationParams &  rectificationParamsGauche,
model3d::Image3DTemplate< model3d::Point3D > &  im3D 
)

implements the Reconstruction algorithm.

Note:
All parameters must be reserved and initialized before passing into this function
Returns:
Image3D: an image of 3D points
void jafar::stereo::jfrReconstruction3DVar ( CorrelationResults &  correlationResults,
ImagesSizes &  imagesSizes,
ReconstructionParams::RECONSTRUCTION_REPERE  type_repere,
ReconstructionParams::RECONSTRUCTION_TYPE  type_recontruction,
ReconstructionParams &  reconstructionParams,
RectificationParams &  rectificationParamsGauche,
model3d::Image3DTemplate< model3d::Point3DVar > &  im3DVar 
)

implements the Reconstruction algorithm and calculates errors.

Note:
All parameters must be reserved and initialized before passing into this function
Returns:
Image3DVar: an image of 3D points with covariance matrix
void jafar::stereo::jfrRectification ( ::jafar::image::Image srcImage,
::jafar::image::Image destImage,
ImagesSizes &  imagesSizes,
RectificationParams &  rectifParams,
int  reduction,
RectificationParams::RECTIFICATION_TYPE  type_rectification,
RectificationParams::DISTORTION_TYPE  type_distortion,
RectificationParams::DO_INTERPOLATION  do_interpolation 
)

implements the Rectifiction algorithm

Note:
the destination image must be reserved before calling this function
Do Attention: here we do the rectification and the reduction in one step
void jafar::stereo::jfrTransform_census_8bits ( ::jafar::image::Image srcImage,
ImagesTemporary &  imagesTmp,
CorrelationParams::CENSUS_TYPE  type_census,
::jafar::image::Image imCensus 
)

Transform_census.

Note:
All parameters must be reserved before calling this function
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:30 for Jafar by doxygen 1.7.6.1
LAAS-CNRS