|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
|
PUBLIC |
FloatRangeC::FloatRangeC(void)
FloatRangeC::FloatRangeC(char *)
FloatRangeC::FloatRangeC(int,int)
FloatRangeC::FloatRangeC(const FloatRangeC &)
FloatRangeC::FloatRangeC(const ByteRangeC &)
FloatRangeC::FloatRangeC(const VectRangeC &)
FloatRangeC::operator=(const FloatRangeC &)
FloatRangeC::~FloatRangeC(void)
FloatRangeC::Copy(void) const
FloatRangeC::ImageHandle(void)
FloatRangeC::operator[](const PixelC &)
FloatRangeC::GetByteZ(const PixelC &) const
FloatRangeC::GetFloatZ(const PixelC &) const
FloatRangeC::GetVect(const PixelC &) const
FloatRangeC::PutByteZ(const PixelC &,ByteGreyValueT)
FloatRangeC::PutFloatZ(const PixelC &,float)
FloatRangeC::PutVect(const PixelC &,Vector3dC)
FloatRangeC::IsValid(const PixelC &) const
FloatRangeC::SoftLoad(char *)
FloatRangeC::Load(char *)
FloatRangeC::SoftSave(char *)
FloatRangeC::Save(char *)
FloatRangeC::LoadDep(char *)
FloatRangeC::LoadNrcc(char *)
FloatRangeC::LoadRis(char *)
FloatRangeC::LoadZim(char *)
FloatRangeC::SaveDep(char *)
FloatRangeC::SaveRis(char *)
FloatRangeC::CalculateExtremes(void)
FloatRangeC::SubImage(const ImageRectangleC &) const
FloatRangeC::ScaleImage(double,int,int) const
FloatRangeC::ExportZasByte(int)
FloatRangeC::ExportDXasByte(void)
FloatRangeC::ExportDYasByte(void)
FloatRangeC::operator<<(ostream &,const FloatRangeC &)
BaseRangeC::ExtremesForSubImage(const ImageRectangleC &)
BaseRangeC::TestFace(const Vector3dC &,const Vector3dC &,const Vector3dC &,const RealT)
BaseRangeC::InsertFace(IntT &,ImageC &,DListC &,DListC &,const PixelC,const PixelC,const PixelC)
BaseRangeC::operator=(const BaseRangeC &)
BaseRangeC::NRows(void) const
BaseRangeC::NCols(void) const
BaseRangeC::Min(void) const
BaseRangeC::Max(void) const
BaseRangeC::GridMin(void) const
BaseRangeC::GridMax(void) const
BaseRangeC::GridSize(void) const
BaseRangeC::GetByteZ(const PixelC &) const
BaseRangeC::GetFloatZ(const PixelC &) const
BaseRangeC::GetVect(const PixelC &) const
BaseRangeC::PutByteZ(const PixelC &,ByteGreyValueT)
BaseRangeC::PutFloatZ(const PixelC &,float)
BaseRangeC::PutVect(const PixelC &,Vector3dC)
BaseRangeC::PutVect(const Vector3dC)
BaseRangeC::IsValid(const PixelC &) const
BaseRangeC::IsInside(const Vector3dC) const
BaseRangeC::IsInsideXY(const Vector3dC) const
BaseRangeC::OfVect(const Vector3dC) const
BaseRangeC::SetXGridExtremes(double,double)
BaseRangeC::SetYGridExtremes(double,double)
BaseRangeC::SetZGridExtremes(double,double)
BaseRangeC::SoftLoad(char *)
BaseRangeC::Load(char *)
BaseRangeC::SoftSave(char *)
BaseRangeC::Save(char *)
BaseRangeC::CalculateExtremes(void)
BaseRangeC::ExportZasByte(int)
BaseRangeC::ExportDXasByte(void)
BaseRangeC::ExportDYasByte(void)
BaseRangeC::ExportValidasByte(void)
BaseRangeC::ExportPol(double)
BaseRangeC::ExportPol2(double)
BaseRangeC::operator<<(ostream &,const BaseRangeC &)
|
Comments:
FloatRangeC is a BIG object.
The i/o routines do have basic error checks.
A valid image point is one in which a range measurement is available.
How it is stored is dependent on the data structure but can be checked
by calling the function IsValid(). In byte format, 0 is invalid and
in vector format, z=-1e38 is invalid.
With each range image, the minimum and maximum x, y and z values are
stored. In each case, the values are obtained by scanning all of the
valid image points and finding the extremes in each dimension. These
values are kept in xmin,xmax,ymin,ymax,zmin,zmax.
In addition, the minimum and maximum x and y values of the sample grid
are obtained if available from the input data file. This is required
for converting between vector and byte format and mapping the range
image onto a grid. gridxmin,gridxmax,gridymin,gridymax are defined to
have the same values as those stored in the .dep file format. This is
assumed to be that the min and max are both the rounded down corners of
the extreme bins.
Any conversion from a vector representation will result in a rounding
down of the x and y values to the grid positions. To compensate for this
conversion from byte to vector will round up the positions to the centre
of the grid boxes.
All loads are soft except Load, soft means no exit on error.
Files that can be read .pgm .dep .ris
written .pgm .dep
Parent Classes:
Variables:
- ImageC f_data;
-
- const float InvalidZ;
-
- const float InvalidZ = -1e38;
-
Methods:
- FloatRangeC()
-
Constructs an empty Range image
- FloatRangeC(char * fname)
-
Constructs and use .Load
- FloatRangeC(int rows,int cols)
-
Constructs a Range with space allocated
- FloatRangeC(const FloatRangeC & range)
-
Copy constructor
- FloatRangeC(const ByteRangeC & range)
-
Construct a float range image from a byte one
- FloatRangeC(const VectRangeC & range)
-
Construct a float range image from a vector one
This will round down positions of points to the lower left grid
position by storing in float image.
- FloatRangeC & operator=(const FloatRangeC & range)
-
Assignment
- ~FloatRangeC()
-
Destructor
- FloatRangeC Copy(void) const
-
Returns a new copy (big object!)
Access to parameters
- ImageC<float> & ImageHandle()
-
Access to the internal image, use sparingly!
- float & operator[](const PixelC & pxl)
-
Access operator with reference
- ByteGreyValueT GetByteZ(const PixelC & pxl) const
-
Access depth given position
- float GetFloatZ(const PixelC & pxl) const
-
Access depth given position
- Vector3dC GetVect(const PixelC & pxl) const
-
Access vector given grid position
- void PutByteZ(const PixelC & pxl,ByteGreyValueT z)
-
Set depth at given position
- void PutFloatZ(const PixelC & pxl,float z)
-
Set depth at given position
- void PutVect(const PixelC & pxl,Vector3dC vect)
-
Set vector at given position
- int IsValid(const PixelC & pixel) const
-
Determine whether given pixel is valid
Saving and Loading
- int SoftLoad(char * fname)
-
load from any file, if error then return 0 else 1
- void Load(char * fname)
-
load from any file, if error then exit
- int SoftSave(char * fname)
-
save to file, if error then return 0 else 1
- void Save(char * fname)
-
save to file
- int LoadDep(char * fname)
-
load .dep bae file, if error then return 0 else 1
BUG: Warning: Does not consider Endian of machine so problems arise when
saving on one architecture and loading on another.
- int LoadNrcc(char * fname)
-
load .nrcc file, if error then return 0 else 1
- int LoadRis(char * fname)
-
load .ris file, if error then return 0 else 1
- int LoadZim(char * fname)
-
load .XYZim file, if error then return 0 else 1
- void SaveDep(char * fname)
-
save .dep bae file
BUG: Warning: Does not consider Endian of machine so problems arise when
saving on one architecture and loading on another.
- void SaveRis(char * fname)
-
save .ris file
Image manipulation
- void CalculateExtremes()
-
Determines extreme values of x,y and z
- FloatRangeC SubImage(const ImageRectangleC & rect) const
-
extract and create a new subimage
- FloatRangeC ScaleImage(double f,int dx = 0,int dy = 0) const
-
change scale by factor f using resampling with an offset of (dx,dy)
Conversion to other representations
- ByteImageC ExportZasByte(int reversevideo = 0)
-
generate a byteimage of the z data
- ByteImageC ExportDXasByte()
-
generate a byteimage of the x data
- ByteImageC ExportDYasByte()
-
generate a byteimage of the y data
- ostream & operator<<(ostream & s,const FloatRangeC & range)
-
- void ExtremesForSubImage(const ImageRectangleC & rect)
-
Calculates new grid extreme values
Determined using the spacing and ratios of the overall size
- BooleanT TestFace(const Vector3dC & v0,const Vector3dC & v1,const Vector3dC & v2,const RealT min_cos_angle)
-
Test if cos angle of face normal to z-axis is > min_cos_angle
- void InsertFace(IntT & counter,ImageC<int> & countimage,DListC<Vector3dC> & v_list,DListC<FaceT> & f_list,const PixelC p0,const PixelC p1,const PixelC p2)
-
function used in ExportPol2 to insert a triangle in the mesh
- BaseRangeC & operator=(const BaseRangeC & range)
-
Assignment
- int NRows() const
-
Access number of rows
- int NCols() const
-
Access number of cols
- Vector3dC Min() const
-
Access minimum corner of bounding box
- Vector3dC Max() const
-
Access maximum corner of bounding box
- Vector3dC GridMin() const
-
Access minimum corner of grid bounding box
- Vector3dC GridMax() const
-
Access maximum corner of grid bounding box
- Vector3dC GridSize() const
-
Access spacing of the grid
- ByteGreyValueT GetByteZ(const PixelC & pxl) const
-
Access depth given position
- float GetFloatZ(const PixelC & pxl) const
-
Access depth given position
- Vector3dC GetVect(const PixelC & pxl) const
-
Access vector given grid position
- void PutByteZ(const PixelC & pxl,ByteGreyValueT z)
-
Set depth at given position
- void PutFloatZ(const PixelC & pxl,float z)
-
Set depth at a given position
- void PutVect(const PixelC & pxl,Vector3dC vect)
-
Set vector at given position
- void PutVect(const Vector3dC vect)
-
Determines position in array and inserts vector. Must pass IsInside()
- int IsValid(const PixelC & pixel) const
-
Determine whether given pixel is valid
- int IsInside(const Vector3dC vect) const
-
Determines whether a vector is within the grid extremes
- int IsInsideXY(const Vector3dC vect) const
-
Determines whether x,y of vect is within the grid extremes
- PixelC OfVect(const Vector3dC vect) const
-
Determines pixel position in array of a vector
- void SetXGridExtremes(double xmin,double xmax)
-
Sets extremes and determines spacing
- void SetYGridExtremes(double ymin,double ymax)
-
Sets extremes and determines spacing
- void SetZGridExtremes(double zmin,double zmax)
-
Sets extremes and determines spacing
Loading and Saving
- int SoftLoad(char * fname)
-
load from any file, if error then return 0 else 1
- void Load(char * fname)
-
load from any file, if error then exit
- int SoftSave(char * fname)
-
save to file, if error then return 0 else 1
- void Save(char * fname)
-
save to file
- void CalculateExtremes()
-
Determines extreme values of x,y and z
This determines the max and min x,y,z values for the valid image points.
If the image is not gridded then grid min and max values are
extrapolated to give result that would be achieved if the invalid
points had been included in the calculation.
Conversion to other representations
- ByteImageC ExportZasByte(int reversevideo = 0)
-
generate a byteimage of the z data
- ByteImageC ExportDXasByte()
-
generate a byteimage of the x data
- ByteImageC ExportDYasByte()
-
generate a byteimage of the y data
- ByteImageC ExportValidasByte()
-
generate a byte image of the valid points
- PolopsC ExportPol(double steepestslope = 100.0)
-
generate a polops class of the data.
Steepest slope is a ratio of dz/sqrt(dx^2+dy*2)
- PolopsC ExportPol2(double steepestslope = 100.0)
-
generate a triangulation mesh.
steepest slope is max angle of triangle to z-axis.
NB: Trianglation indexed without using Polops().Purify() for effieciency
- ostream & operator<<(ostream & s,const BaseRangeC & range)
-
|
Programmer:Robert Crida lib=Range, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|