|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
|
PUBLIC |
DisplacementImageC::DisplacementImageC(void)
DisplacementImageC::DisplacementImageC(SizeT,SizeT)
DisplacementImageC::DisplacementImageC(const ImageC &)
DisplacementImageC::SetOptions(BooleanT,BooleanT,BooleanT,BooleanT)
DisplacementImageC::SetCanvas(GUICanvasC *)
DisplacementImageC::MapDetailLayerPoints(DetailLayerC &)
DisplacementImageC::MapDetailLayer(DetailLayerC &,DrawMode)
DisplacementImageC::GetDistance(DetailPointC &,const CTriSetC &) const
DisplacementImageC::PrepareForSave(void)
DisplacementImageC::SetDisplacement(IndexT,IndexT,DoubleT)
DisplacementImageC::MapSingleTriangle(CTriSetC &,TriEdgeSetC &,PointMapperC &,const DetailPointC &,const DetailPointC &,const DetailPointC &,DrawMode)
DisplacementImageC::DrawEdgeTriangle(CTriSetC &,TriEdgeSetC &,PointMapperC &,const DetailPointC &,const DetailPointC &,const DetailPointC &,DrawMode)
DisplacementImageC::WalkDrawEdgeTriangle(CTriSetC &,TriEdgeSetC &,PointMapperC &,const DetailPointC &,const DetailPointC &,const DetailPointC &)
DisplacementImageC::RemapDrawEdgeTriangle(CTriSetC &,TriEdgeSetC &,PointMapperC &,const DetailPointC &,const DetailPointC &,const DetailPointC &)
DisplacementImageC::DrawMappedTriangle(CTriSetC &,const DetailPointC &,const DetailPointC &,const DetailPointC &,BooleanT)
DisplacementImageC::Draw2DTriangle(Polygon2dC &,TriangleDistances,Polygon2dC *)
DisplacementImageC::CreatePolygon(Point2dListC &,TriangleDistances)
DisplacementImageC::IsPointInTriangle(Point2dC,Polygon2dC)
DoubleImageC::DoubleImage(void) const
DoubleImageC::DoubleImage(void)
DoubleImageC::Copy(void) const
DoubleImageC::Copy(const DoubleImageC &)
DoubleImageC::operator=(const DoubleImageC &)
DoubleImageC::ACopy(void) const
DoubleImageC::AnotherImage(void) const
DoubleImageC::CnvToByte(void) const
DoubleImageC::ScaleCnvToByte(void) const
DoubleImageC::VarScaleCnvToByte(RealT) const
DoubleImageC::Y(void) const
DoubleImageC::Red(void) const
DoubleImageC::Green(void) const
DoubleImageC::Blue(void) const
DoubleImageC::RealY(void) const
DoubleImageC::RealRed(void) const
DoubleImageC::RealGreen(void) const
DoubleImageC::RealBlue(void) const
DoubleImageC::Rgb(void) const
DoubleImageC::RealRgb(void) const
DoubleImageC::Yuv(void) const
DoubleImageC::RealYuv(void) const
DoubleImageC::Fill(RealT)
DoubleImageC::Frame(RealT)
DoubleImageC::Max(void) const
DoubleImageC::Min(void) const
DoubleImageC::Mean(void) const
DoubleImageC::MeanExBack(void) const
DoubleImageC::Sum(void) const
DoubleImageC::BasicStatistics(RealT &,RealT &,RealT &,RealT &)
DoubleImageC::BasicStatisticsExBackground(RealT &,RealT &,RealT &,RealT &)
DoubleImageC::LocalAverage(MaskSizeT) const
DoubleImageC::operator+=(const RealT)
DoubleImageC::operator-=(const RealT)
DoubleImageC::operator*=(const RealT)
DoubleImageC::operator/=(const RealT)
DoubleImageC::operator+=(const DoubleImageC &)
DoubleImageC::operator-=(const DoubleImageC &)
DoubleImageC::operator*=(const DoubleImageC &)
DoubleImageC::operator/=(const DoubleImageC &)
DoubleImageC::ScaleBy(const DoubleImageC &,MaskSizeT)
DoubleImageC::Map(const RealT &,const RealT &,const RealT &,const RealT &)
DoubleImageC::AddToColumns(const RealArray1dC &)
DoubleImageC::AddToRows(const RealArray1dC &)
DoubleImageC::YZoom(const RealT &,const RealT &,const RealT &)
DoubleImageC::DiffRow(DoubleImageC &) const
DoubleImageC::DiffRow(void)
DoubleImageC::DiffCol(DoubleImageC &) const
DoubleImageC::DiffCol(void)
DoubleImageC::Diff(DoubleImageC &,DoubleImageC &) const
DoubleImageC::Sobel(DoubleImageC &,DoubleImageC &) const
DoubleImageC::MSobel(DoubleImageC &,DoubleImageC &) const
DoubleImageC::Gauss(DoubleImageC &,DoubleImageC &,MaskSizeT,RealT) const
DoubleImageC::Deriche(DoubleImageC &,DoubleImageC &,RealT,RealT) const
DoubleImageC::SqrComposition(const DoubleImageC &) const
DoubleImageC::Threshold(const RealT,const RealT,const RealT)
DoubleImageC::LowThreshold(const RealT,const RealT)
DoubleImageC::DetectLevel(const RealT,const RealT,const RealT)
DoubleImageC::HorConvolution(const RealArray1dC &)
DoubleImageC::VerConvolution(const RealArray1dC &)
DoubleImageC::Convolution45(const RealArray1dC &)
DoubleImageC::ConvolutionM45(const RealArray1dC &)
DoubleImageC::Convolution2d(const RealArray2dC &)
DoubleImageC::VerifyVerticalLineResponse(const RealT,const RealArray1dC &)
DoubleImageC::VerifyDiagonalLineResponse(const RealT,const RealArray1dC &)
DoubleImageC::Verify2DiagonalLineResponse(const RealT,const RealArray1dC &)
DoubleImageC::VerifyHorizontalLineResponse(const RealT,const RealArray1dC &)
DoubleImageC::WideDeltaEdgeDetection(const RealArray1dC &,const RealArray1dC &,const RealArray1dC &,const RealT,const RealT,const RealT,const IntT,const char,const BooleanT)
DoubleImageC::WideDeltaEdgeDetection(const RealT,const RealT,const RealT,const RealT,const RealT,const IntT,const char,const BooleanT)
DoubleImageC::SpotDetection(const RealT,const RealT,const RealT,const RealT,const RealT)
DoubleImageC::SpacekThinning(void)
DoubleImageC::VerNonMaxSuppression(void)
DoubleImageC::HorNonMaxSuppression(void)
DoubleImageC::LinNonMaxSuppression(const DoubleImageC &,const DoubleImageC &,const DoubleImageC &,RealT,BooleanT)
DoubleImageC::HysteresisThresh(const RealT,const RealT)
DoubleImageC::GenerateBall(const PixelC,const RealT,const RealT,const RealT,const RealT)
DoubleImageC::GenerateBall(const PixelC,const RealT)
DoubleImageC::Reflectance(const RealT,const RealT,const RealT) const
DoubleImageC::TsaiShahShapeFromShading(DoubleImageC &,DoubleImageC &,const Vector3dC &,IndexT)
DoubleImageC::PreciseTsaiShahShapeFromShading(DoubleImageC &,DoubleImageC &,RealT,RealT)
ImageC::Copy(void) const
ImageC::Copy(const ImageC &)
ImageC::Copy(const ImageRectangleC &,const PixelC &)
ImageC::ACopy(void) const
ImageC::AnotherImage(void) const
ImageC::operator=(const ImageC &)
ImageC::ReflectUp(const ImageRectangleC &)
ImageC::ReflectDown(const ImageRectangleC &)
ImageC::ReflectLeft(const ImageRectangleC &)
ImageC::ReflectRight(const ImageRectangleC &)
ImageC::ReflectFrom(const ImageRectangleC &)
ImageC::Rotate90(const ImageC &)
ImageC::Rotate180(const ImageC &)
ImageC::Rotate270(const ImageC &)
ImageC::Rotate(const Point2dC &,RealT,PValueT) const
ImageC::Rotate(const ImageC &,const Point2dC &,RealT,PValueT)
ImageC::ShiftRowIndexes(const IndexT)
ImageC::ShiftColIndexes(const IndexT)
ImageC::Subsample(IntT) const
ImageC::SetOrigin(const PixelC &)
ImageC::Fill(PValueT)
ImageC::Frame(PValueT)
ImageC::Frame(PValueT,const ImageRectangleC &)
ImageC::Pad(const ImageRectangleC &) const
ImageC::IsValid(void) const
ImageC::operator[](IndexT) const
ImageC::operator[](IndexT)
ImageC::operator[](const Index2dC &)
ImageC::operator[](const Index2dC &) const
ImageC::operator[](const PixelC &)
ImageC::operator[](const PixelC &) const
ImageC::CRow(PixelIndexT) const
ImageC::Row(PixelIndexT)
ImageC::Save(ostream &,BooleanT) const
ImageC::Load(istream &,BooleanT)
ImageC::StartAddress(void) const
ImageC::Buffer(void)
ImageC::Buffer(void) const
ImageC::CMemRow(PixelIndexT) const
ImageC::MemRow(PixelIndexT)
ImageC::ErrNotValid(char *) const
ImageC::AllocData(void)
ImageC::AllocData(PValueT *,BooleanT)
ImageC::DeallocAccess(void)
ImageC::DeallocData(void)
ImageC::operator[](PixelIndexT)
ImageC::operator[](PixelIndexT) const
BaseImageC::Rectangle(void) const
BaseImageC::Origin(void) const
BaseImageC::End(void) const
BaseImageC::ImageFileInfo(void) const
BaseImageC::BaseImage(void) const
BaseImageC::BaseImage(void)
BaseImageC::SetRowSubRange(const IndexT,const IndexT)
BaseImageC::SetColSubRange(const IndexT,const IndexT)
BaseImageC::SetSubRange(const ImageRectangleC &)
BaseImageC::SetFullRectangle(void)
BaseImageC::SetImageFileInfo(ImageFileInfoC *)
BaseImageC::IsEmpty(void) const
BaseImageC::ErrDifferentSize(const BaseImageC &,char *) const
BaseImageC::Rnum(void) const
BaseImageC::Cnum(void) const
BaseImageC::TRow(void) const
BaseImageC::LCol(void) const
BaseImageC::BRow(void) const
BaseImageC::RCol(void) const
BaseImageC::Area(void) const
BaseImageC::Count(void) const
BaseImageC::AllocatedRect(void) const
BaseImageC::IsBlock(void) const
BaseImageC::operator=(const BaseImageC &)
BaseImageC::ChangeInfo(ImageFileInfoC *)
BaseImageC::ShiftRows(const IndexT)
BaseImageC::ShiftCols(const IndexT)
BaseImageC::ErrNotInRange(Index2dC,char *) const
BaseImageC::ErrNotInRange(IndexT,char *) const
BaseImageC::ErrNotInAllocRange(IndexT,char *) const
BaseImageC::LoadImageRect(istream &)
RefCounterC::ToBeDeleted(void) const
RefCounterC::Count(void) const
RefCounterC::IsSingleReference(void)
RefCounterC::operator=(const RefCounterC &)
RefCounterC::ToBeDeletedUpdate(const RefCounterC &)
RefCounterC::ReportInvalidObject(char *)
ImageAC::ACopy(void) const
ImageAC::AnotherImage(void) const
ImageAC::Rectangle(void) const
ImageAC::ShiftRowIndexes(const IndexT)
ImageAC::ShiftColIndexes(const IndexT)
ImageAC::SetRowSubRange(const IndexT,const IndexT)
ImageAC::SetColSubRange(const IndexT,const IndexT)
ImageAC::ImageFileInfo(void) const
RefCounterBaseC::Label(void) const
|
Comments:
This class represents a displacement map. It is basically a DoubleImage,
but adds a few extra functions for creating displacement maps.
Parent Classes:
Enumerated types:
- enum DrawMode { DRAW_WALK, DRAW_REMAP } ;
-
Drawing Modes
- DRAW_WALK is an algorithm that uses a walking method to draw edge triangles.
- DRAW_REMAP attempts to remap edge triangles in order to draw them.
Typedefs:
- typedef DoubleT TriangleDistances;
-
Variables:
- BooleanT m_bShowFolds;
-
- BooleanT m_bColourTriangles;
-
- BooleanT m_bNoEdges;
-
- BooleanT m_bNoEnclosed;
-
Canvas pointer
- GUICanvasC * m_pCanvas;
-
Temporary colour variable
- IntT m_iColour;
-
Methods:
- DisplacementImageC()
-
Default constructor
- DisplacementImageC(SizeT iRows,SizeT iCols)
-
Construct a DisplacementImageC with the specified dimensions.
- DisplacementImageC(const ImageC<RealT> & oRealImage)
-
Construct a DisplacementImageC from a ImageC
- void SetOptions(BooleanT bShowFolds,BooleanT bColourTriangles,BooleanT bNoEdges,BooleanT bNoEnclosed)
-
Sets drawing options for the Displacement Image
- void SetCanvas(GUICanvasC * pCanvas)
-
Sets the canvas to draw graphical output into
- void MapDetailLayerPoints(DetailLayerC & dlDetailLayer)
-
Maps the points in the detail layer onto the displacement map.
- void MapDetailLayer(DetailLayerC & dlDetailLayer,DrawMode eMode = DRAW_WALK)
-
Maps all of the detail layer onto the displacement map.
The mapping will use the specified edge-drawing elgorithm. The default is DRAW_WALK.
- void GetDistance(DetailPointC & dpPoint,const CTriSetC & triControl) const
-
Get the distance of a point
The distance member of dpPoint is filled in with the value obtained from the displacement image.
Texture coordinates are obtained from triControl.
BUG: Not so much a bug, but there may be rounding errors in this function, giving broken results.
- void PrepareForSave(void)
-
Fixes ranges ready for saving to image.
CALL THIS BEFORE SAVING! Otherwise, the ranges will be broken.
This may (and should) be removed in a future version.
- DoubleT SetDisplacement(IndexT iRow,IndexT iCol,DoubleT dDisplacement)
-
Sets the displacement of the pixel at (iRow, iCol) to .
Returns the value that the pixel is set to.
- void MapSingleTriangle(CTriSetC & triControlMesh,TriEdgeSetC & esTriEdgeSet,PointMapperC & pmMapper,const DetailPointC & dpVertex0,const DetailPointC & dpVertex1,const DetailPointC & dpVertex2,DrawMode eMode = DRAW_WALK)
-
Maps a single triangle to the displacement map.
- void DrawEdgeTriangle(CTriSetC & triControlMesh,TriEdgeSetC & esTriEdgeSet,PointMapperC & pmMapper,const DetailPointC & dpVertex0,const DetailPointC & dpVertex1,const DetailPointC & dpVertex2,DrawMode eMode = DRAW_WALK)
-
Draw an edge triangle.
Fills a triangle that overlaps edges - this is just a wrapper around the next two functions
- void WalkDrawEdgeTriangle(CTriSetC & triControlMesh,TriEdgeSetC & esTriEdgeSet,PointMapperC & pmMapper,const DetailPointC & dpVertex0,const DetailPointC & dpVertex1,const DetailPointC & dpVertex2)
-
Implementation of the DRAW_WALK edge drawing mode
Fills a triangle that overlaps edges by an edge-walking process
- void RemapDrawEdgeTriangle(CTriSetC & triControlMesh,TriEdgeSetC & esTriEdgeSet,PointMapperC & pmMapper,const DetailPointC & dpVertex0,const DetailPointC & dpVertex1,const DetailPointC & dpVertex2)
-
Implementation of the DRAW_REMAP edge drawing mode
Fills a triangle that overlaps edges by a remapping process
- IntT DrawMappedTriangle(CTriSetC & triControlMesh,const DetailPointC & dpVertex0,const DetailPointC & dpVertex1,const DetailPointC & dpVertex2,BooleanT bClip = false)
-
Draw a mapped triangle into the image
All DetailPoints must map to the same triangle.
if bClip is true, the drawing is clipped to edges of the appropriate control triangle
It returns an integer value that encodes the edges that have been crossed
- void Draw2DTriangle(Polygon2dC & plyTriangle,TriangleDistances tdDistances,Polygon2dC * plyClipper)
-
Draw a clipped triangle.
If plyClipper is NULL, the triangle is not clipped.
- Polygon2dC CreatePolygon(Point2dListC & pntList,TriangleDistances tdDistances = NULL)
-
Creates a polygon from a list of points.
This function ensures that the points are in the right order.
- BooleanT IsPointInTriangle(Point2dC pntPoint,Polygon2dC plyTriangle)
-
Test if the point is inside the polygon.
The polygon must have three vertices which are in an anticlockwise order.
Drawing options
- const DoubleImageC & DoubleImage() const
-
The access to the constant double image.
- DoubleImageC & DoubleImage()
-
The access to the double image.
- DoubleImageC Copy() const
-
Creates a physical copy of the image
- void Copy(const DoubleImageC & image)
-
Copies the image copy into this image.
- const DoubleImageC & operator=(const DoubleImageC & im)
-
Assigment.
- ImageAC * ACopy() const
-
A physical copy of this image.
- ImageAC * AnotherImage() const
-
Creates a new empty image of the same type and size as this image is.
Conversions between color images.
- ByteImageC CnvToByte() const
-
Converts all values of this image into value of ByteImageC.
Values outside range of ByteImageC are cut.
- ByteImageC ScaleCnvToByte() const
-
Converts all values of this image into value of ByteImageC.
All values are linearly scaled to fit values of ByteImageC.
- ByteImageC VarScaleCnvToByte(RealT alpha = 3) const
-
Converts all values of this image into value of ByteImageC.
All values are linearly scaled to fit the range .
- ByteImageC Y() const
-
Returns the grey level image of Y component
- ByteImageC Red() const
-
Returns the red component of the color image
- ByteImageC Green() const
-
Returns the green component of the color image
- ByteImageC Blue() const
-
Returns the blue component of the color image
- DoubleImageC RealY() const
-
Returns the intensity double image.
- DoubleImageC RealRed() const
-
Returns the intensity double image of the red component.
- DoubleImageC RealGreen() const
-
Returns the intensity double image of the green component.
- DoubleImageC RealBlue() const
-
Returns the intensity double image of the blue component.
- RGBImageC Rgb() const
-
Creates a new identifier for the image.
- RealRGBImageC RealRgb() const
-
Returns the image of real RGB values.
- YUVImageC Yuv() const
-
This image is treated as the intensity image. The function creates
color image represented in Yuv color system. Y component is set
according to this intensity image and cut. U and V component are zero.
- RealYUVImageC RealYuv() const
-
This image is treated as the intensity image. The function creates
color image represented in Yuv color system. Y component is set
according to this intensity image. U and V component are zero.
Setting values in an image.
- DoubleImageC & Fill(RealT value)
-
Fill the image with this value.
- DoubleImageC & Frame(RealT value)
-
Draws a 1-pixel wide frame of this value round the image
Image statistics
- RealT Max() const
-
Returns the maximal value in the image.
- RealT Min() const
-
Returns the minimal value in the image.
- RealT Mean() const
-
Returns the mean value in the image.
- RealT MeanExBack() const
-
Returns the mean value in the image, the values BACKGROUND
are not involved.
- RealT Sum() const
-
Returns the sum of all values in the image.
- DoubleImageC & BasicStatistics(RealT & minValue,RealT & maxValue,RealT & meanValue,RealT & sigma)
-
Estimates the image statistics, i.e. mean & standard deviation
- DoubleImageC & BasicStatisticsExBackground(RealT & minValue,RealT & maxValue,RealT & meanValue,RealT & sigma)
-
Estimates the image statistics, i.e. mean & standard deviation
ignoring pixels with BACKGROUND value
- DoubleImageC LocalAverage(MaskSizeT len) const
-
Creates the image which values are averages.
in neighborhood `len' x `len'.
Arithmetical operations
- const DoubleImageC & operator+=(const RealT alpha)
-
Adds `alpha' to all pixel values.
- const DoubleImageC & operator-=(const RealT alpha)
-
Subtracts `alpha' from all pixel values.
- const DoubleImageC & operator*=(const RealT alpha)
-
Multiplies all pixel values by `alpha'.
- const DoubleImageC & operator/=(const RealT alpha)
-
Divides all pixel values by `alpha'.
- const DoubleImageC & operator+=(const DoubleImageC & image)
-
Adds `image' values pixel by pixel to `this' image.
- const DoubleImageC & operator-=(const DoubleImageC & image)
-
Subtracts `image' values pixel by pixel from `this' image.
- const DoubleImageC & operator*=(const DoubleImageC & image)
-
Multiplies all values of `this' image pixel-by-pixel.
- const DoubleImageC & operator/=(const DoubleImageC & image)
-
Divides all values of `this' image pixel-by-pixel.
Grey level transformations
- DoubleImageC & ScaleBy(const DoubleImageC & im,MaskSizeT len)
-
Scales this image by the image `im'. The image `im'
is smoothed by local average using a mask of the size `len'.
If this image is gradient image,
this is equivalent to taking the log of the image
before performing any operation.
- DoubleImageC & Map(const RealT & aLow,const RealT & aHigh,const RealT & bLow,const RealT & bHigh)
-
Changes linearly all pixel values so that the interval of grey values
is mapped onto interval .
- DoubleImageC & AddToColumns(const RealArray1dC & r)
-
Every pixel values is added by the value from the corresponding
column of the row `r'.
- DoubleImageC & AddToRows(const RealArray1dC & c)
-
Every pixel values is added by the value from the corresponding
column of the row `c'.
- DoubleImageC & YZoom(const RealT & oldL,const RealT & newL,const RealT & gain)
-
All pixel values are changed using the linear transformation
newValue = (oldValue - `oldL') * `gain' + `newL'.
Differential operators
- const DoubleImageC & DiffRow(DoubleImageC & diffR) const
-
Differentiates the image along row, using central difference; returns
result in diffR.
- DoubleImageC & DiffRow()
-
Differentiates the image along row, using central difference; overwrites
original image; result is shifted up one row.
- const DoubleImageC & DiffCol(DoubleImageC & diffC) const
-
Differentiates the image along column, using central difference; returns
result in diffC.
- DoubleImageC & DiffCol()
-
Differentiate the image along column, using central difference; overwrites
original image; result is shifted left one column.
- const DoubleImageC & Diff(DoubleImageC & diffRow,DoubleImageC & diffCol) const
-
Differentiate the image along row and column, using central difference.
- void Sobel(DoubleImageC & dr,DoubleImageC & dc) const
-
A more sensible version can be found within the Image Processing Operators classes
- void MSobel(DoubleImageC & dr,DoubleImageC & dc) const
-
BUG: A failed attempt to provide a more efficient version of Sobel()
- void Gauss(DoubleImageC & dr,DoubleImageC & dc,MaskSizeT len,RealT tau) const
-
For each direction (horizontally and vertically), convolved with 1D
Gaussian (Array1dC::Gauss(...)) and differentiated (using DiffRow() and
DiffCol()). The results are saved in the images `dr' and `dc'
respectively. For Gaussian mask:
- "len" is array size, rounded
down to nearest odd no.
- "tau" is ratio of cutoff to peak values
(hence must be <= 1)
- void Deriche(DoubleImageC & dr,DoubleImageC & dc,RealT alpha = 2.0,RealT omega = 0.001) const
-
The results of the application of Deriche's operator are
saved in the images `dr' and `dc'.
- DoubleImageC SqrComposition(const DoubleImageC & im2) const
-
Creates the image which values are ::Sqrt(sqr(*this)+sqr(im2)).
Thresholding
- DoubleImageC & Threshold(const RealT thr,const RealT lowLabel,const RealT upLabel)
-
thresholding, if an image value >= thr, the output value is upLabel,
otherwise lowLabel
- DoubleImageC & LowThreshold(const RealT thr,const RealT lowLabel = 0.0)
-
thresholding, if an image value < `thr', the output value is lowLabel,
otherwise the output value has the same value as the input one
- DoubleImageC & DetectLevel(const RealT level,const RealT levelLabel,const RealT backgroundLabel)
-
if an image value == `level', then the output value is levelLabel,
otherwise backgroundLabel
Convolutions
- DoubleImageC & HorConvolution(const RealArray1dC & mask)
-
Convolves an image horizontally with a given mask
- DoubleImageC & VerConvolution(const RealArray1dC & mask)
-
Convolves an image vertically with a given mask
- DoubleImageC & Convolution45(const RealArray1dC & mask)
-
Convolves an image with a given mask in PI/4 direction. The mask
elements must correspond to the inter-pixel distance ::Sqrt(2).
- DoubleImageC & ConvolutionM45(const RealArray1dC & mask)
-
Convolves an image with a given mask in -PI/4 direction. The mask
elements must correspond to the inter-pixel distance ::Sqrt(2).
- DoubleImageC & Convolution2d(const RealArray2dC & mask)
-
2 dimensional convolution of an image with a given mask
Special operations
- DoubleImageC & VerifyVerticalLineResponse(const RealT chiSqrThr,const RealArray1dC & idealResponse)
-
- DoubleImageC & VerifyDiagonalLineResponse(const RealT chiSqrThr,const RealArray1dC & idealResponse)
-
- DoubleImageC & Verify2DiagonalLineResponse(const RealT chiSqrThr,const RealArray1dC & idealResponse)
-
- DoubleImageC & VerifyHorizontalLineResponse(const RealT chiSqrThr,const RealArray1dC & idealResponse)
-
- ByteImageC WideDeltaEdgeDetection(const RealArray1dC & filter,const RealArray1dC & idealResponse,const RealArray1dC & smooth,const RealT chiSqrThr,const RealT mjuSmall,const RealT mjuBig,const IntT minLengthThr,const char lineKind,const BooleanT info = FALSE)
-
This subroutine detects ridge profiles. It first convolves
the image by a filter optimized for ridge profile.
The ridge peaks are extracted from
the enhanced image by means of hysteresis thresholding.
If `info' is TRUE the intermediate results are saved during
processing.
- ByteImageC WideDeltaEdgeDetection(const RealT d,const RealT l,const RealT chiSqrThr,const RealT mjuSmall,const RealT mjuBig,const IntT minLengthThr,const char lineKind,const BooleanT info = FALSE)
-
This subroutine detects ridge profiles. It first convolves
the image by a filter optimized for ridge profile described
by parameters `d' and `l'. The ridge peaks are extracted from
the enhanced image by means of hysteresis thresholding.
If `info' is TRUE the intermediate results are saved during
processing.
- ByteImageC SpotDetection(const RealT d,const RealT l,const RealT chiSqrThr,const RealT mjuSmall,const RealT mjuBig)
-
This subroutine detects spots. It first convolves
the image by a filter optimized for spot profile described
by parameters `d' and `l'. The spot peaks are extracted from
the enhanced image by means of hysteresis thresholding.
- IntT SpacekThinning()
-
Spacek's thinning of an edge image
returns the number of edges deleted
- DoubleImageC & VerNonMaxSuppression()
-
assign 0 to the pixel, if it is not a maximum from the 3 neighbouring
pixels
- DoubleImageC & HorNonMaxSuppression()
-
assign 0 to the pixel, if it is not a maximum from the 3 neighbouring
pixels
- RealT LinNonMaxSuppression(const DoubleImageC & drIm,const DoubleImageC & dcIm,const DoubleImageC & grad,RealT mean,BooleanT eightConnectivity = FALSE)
-
This image will be the result of linear non-maximum suppression
method. The function returns the mean of maximum values.
- ByteImageC HysteresisThresh(const RealT upThr,const RealT downThr)
-
Returns the image which pixels have different states.
The state PROC_PXL means the pixel is not above the threshold `downThr'.
The state UNPROC_PXL means the pixel does not belong to a string
of pixels containing at least one pixel above the threshold `upThr'.
The state IN_STRING means the pixel belongs to a string of edge
pixels and it is a single pixel or it is inside of the string.
The state JUNCT means the pixel belongs to at least three
strings of edge pixels or it is the end pixel of a string.
Generating of synthetic images.
- void GenerateBall(const PixelC center,const RealT radius,const RealT azimut,const RealT elevation,const RealT albedo)
-
Generates the ball with around the pixel `center' with the `radius'.
The illumination direction is determined by the angles `azimut' [rad]
and `elevation' [rad]. The surface of the ball is Lambertian
with `albedo' in the range <0,1>.
- void GenerateBall(const PixelC center,const RealT radius)
-
Generates the ball with around the pixel `center' with the `radius'.
Shape from shading.
- DoubleImageC Reflectance(const RealT azimut,const RealT elevation,const RealT albedo) const
-
Returns the reflectance map of the image taken as a depth map.
The reflectance map is generated for the illumination direction
determined by the angles `azimuth' and `elevation' [rad].
The surface is supposed to be Lambertian with the `albedo'.
- void TsaiShahShapeFromShading(DoubleImageC & snIm,DoubleImageC & znIm,const Vector3dC & illDirection,IndexT iterNumber)
-
A Simple Shape From Shading Algorithm by P.Tsai and M. Shah:
CS-TR-92-24, Department of Computer Science, Technical Report,
University of Central Florida, Orlando, FL 32816
- void PreciseTsaiShahShapeFromShading(DoubleImageC & snIm,DoubleImageC & znIm,RealT ps,RealT qs)
-
One iteration of a simple shape from shading algorithm
by P.Tsai and M. Shah:
CS-TR-92-24, Department of Computer Science, Technical Report,
University of Central Florida, Orlando, FL 32816
- ImageC<DoubleImageValueT> Copy() const
-
Creates another physical copy of this image.
- void Copy(const ImageC<DoubleImageValueT> & image)
-
Copies the contents of image "img" into this image.
- void Copy(const ImageRectangleC & rect,const PixelC & newOrigin)
-
Copies the region of the image defined by rectangle "rect" into the region whose origin is "newOrigin".
- ImageAC * ACopy() const
-
A physical copy of this image.
- ImageAC * AnotherImage() const
-
Creates a new empty image of the same type and size as this image is.
- const ImageC<DoubleImageValueT> & operator=(const ImageC<DoubleImageValueT> & image)
-
Assigment of a big object.
- void ReflectUp(const ImageRectangleC & rect)
-
Mirrors the image rectangle along its top edge.
- void ReflectDown(const ImageRectangleC & rect)
-
Mirrors the image rectangle along its bottom edge.
- void ReflectLeft(const ImageRectangleC & rect)
-
Mirrors the image rectangle along its left edge.
- void ReflectRight(const ImageRectangleC & rect)
-
Mirrors the image rectangle along its right edge.
- void ReflectFrom(const ImageRectangleC & rect)
-
Mirrors the image rectangle "rect" along its sides to fill the whole image.
- void Rotate90(const ImageC<DoubleImageValueT> & originalImage)
-
The values of image "originalImage" rotated about PI/2 rad and shifted to have the original upper-left corner and are saved into this image.
- void Rotate180(const ImageC<DoubleImageValueT> & originalImage)
-
The values of image "originalImage" rotated about PI rad and shifted to have the original upper-left corner and are saved into this image.
- void Rotate270(const ImageC<DoubleImageValueT> & originalImage)
-
The values of image "originalImage" rotated about 3/2*PI rad and shifted to have the original upper-left corner and are saved into this image.
- ImageC<DoubleImageValueT> Rotate(const Point2dC & center,RealT angle,DoubleImageValueT background) const
-
The values of this image are rotated about "angle" (in rad) and saved to the result image.
Note the AMMA convention that the 1st or "x" coordinate of Point2dC is
associated with the image row no., and the 2nd or "y" coordinate
with the image column no.
- void Rotate(const ImageC<DoubleImageValueT> & originalImage,const Point2dC & center,RealT angle,DoubleImageValueT background)
-
The values of image "originalImage" rotated about "angle" rad are saved into this image.
Note the AMMA convention that the 1st or "x" coordinate of Point2dC is
associated with the image row no., and the 2nd or "y" coordinate
with the image column no.
- void ShiftRowIndexes(const IndexT offset)
-
Row indices of the items will be shifted by "offset".
There must be only one reference to this image.
For +ve "offset", the image is shifted down, or the coordinate
system is shifted up.
- void ShiftColIndexes(const IndexT offset)
-
Column indices of the items will be shifted by "offset".
There must be only one reference to this image.
For +ve "offset", the image is shifted down, or the coordinate
system is shifted up.
- ImageC<DoubleImageValueT> Subsample(IntT factor = 2) const
-
returns an image subsampled by a factor of "factor"
- void SetOrigin(const PixelC & newOrigin)
-
The image coordinates are changed so that the top left pixel will have coordinates of "newOrigin".
There must be only one reference to this image.
Grey level operations.
- ImageC<DoubleImageValueT> & Fill(DoubleImageValueT value)
-
Fills the image with "value"
- ImageC<DoubleImageValueT> & Frame(DoubleImageValueT value)
-
Fills a 1-pixel-wide border around the image with "value"
- ImageC<DoubleImageValueT> & Frame(DoubleImageValueT v,const ImageRectangleC & rect)
-
Fills a 1-pixel-wide rectangle with "v";
the rectangle is the intersection of "this" with "rect".
- ImageC<DoubleImageValueT> Pad(const ImageRectangleC & rect) const
-
Creates a new image whose frame is from "rect", with pixels copied from "this".
Where the new image lies outside "this", it is padded out with the nearest
value from "this".
Logical conditions.
- BooleanT IsValid() const
-
Returns FALSE if the image does not have a valid data area allocated
Access to pixels values.
- const RangeBufferAccessC<DoubleImageValueT> operator[](IndexT r) const
-
Access to the row of the row of pixels.
- RangeBufferAccessC<DoubleImageValueT> operator[](IndexT r)
-
Access to the row of the row of pixels.
- DoubleImageValueT & operator[](const Index2dC & pxl)
-
Returns the content of the pixel.
- const DoubleImageValueT & operator[](const Index2dC & pxl) const
-
Returns the content of the pixel.
- DoubleImageValueT & operator[](const PixelC & pxl)
-
Returns the content of the pixel.
- const DoubleImageValueT & operator[](const PixelC & pxl) const
-
Returns the content of the pixel.
- const DoubleImageValueT * CRow(PixelIndexT row) const
-
Access to the beginning of the row, eg. t
The returned pointer points to the first pixel of the "row".
- DoubleImageValueT * Row(PixelIndexT row)
-
Access to the beginning of the constant "row"
I.e. the returned pointer points to the first pixel of "row".
- void Save(ostream & outS,BooleanT useHeader = TRUE) const
-
Saves templated image to stream.
For byte images it will save them in either PGM or PPM binary format. For
other types it will save them in ascii if a suitable stream operator has
been written for the templated class.
NB. These treat images of ByteGreyValueT specialy, the image values
are read as numbers not as charactors.
- void Load(istream & outS,BooleanT useHeader = TRUE)
-
Loads templated image type from ascii stream.
Should not be used for binary PGM/PPM files, but should work on most
templated types.
NB. These treat images of ByteGreyValueT specialy, the image values
are written as numbers not as charactors.
- DoubleImageValueT ** StartAddress() const
-
Returns the pointer to the table of pointers to image.
This being public is really only a hack!
EXPERTS ONLY!
- BufferRC<DoubleImageValueT> & Buffer()
-
Access buffer where data is stored.
- const BufferRC<DoubleImageValueT> & Buffer() const
-
Access buffer where data is stored.
- const DoubleImageValueT * CMemRow(PixelIndexT row) const
-
Access to the beginning of the constant allocated row
I.e. the returned pointer points to the first pixel of "row".
- DoubleImageValueT * MemRow(PixelIndexT row)
-
Access to the beginning of the allocated row
I.e. the returned pointer points to the first pixel of "row".
Error checking.
- void ErrNotValid(char * functionName) const
-
Triggers the error event if this image does not contain any data.
- void AllocData()
-
Allocates a memory for image.
- void AllocData(DoubleImageValueT * value,BooleanT rowInv = false)
-
Allocates a access vector to the memory with data
- void DeallocAccess()
-
Deallocates the access vector to the memory with data.
- void DeallocData()
-
Deallocates the access vector and the memory containing data.
- RangeBufferAccessC<DoubleImageValueT> operator[](PixelIndexT row)
-
- const RangeBufferAccessC<DoubleImageValueT> operator[](PixelIndexT row) const
-
- const ImageRectangleC & Rectangle() const
-
Returns the image rectangle.
- const Index2dC & Origin() const
-
Returns the upper-left pixel coordinates of the image rectangle.
- const Index2dC & End() const
-
Returns the lower right pixel coordinates of the image rectangle.
- const ImageFileInfoC & ImageFileInfo() const
-
Access to the origin.
- const BaseImageC & BaseImage() const
-
access to the constant object
- BaseImageC & BaseImage()
-
access to the object
Modification of the object
--------------------------
- void SetRowSubRange(const IndexT newMin,const IndexT newMax)
-
The range of indexes of the array will be constrained
- void SetColSubRange(const IndexT newMin,const IndexT newMax)
-
The range of indexes of the array will be constrained.
- void SetSubRange(const ImageRectangleC & range)
-
Constrains the domain of the image.
- void SetFullRectangle()
-
Sets the working rectangle to be allocated rectangle of the image.
- void SetImageFileInfo(ImageFileInfoC * newInfo)
-
Sets a new image file information respecting the current size of the image.
- BooleanT IsEmpty() const
-
Returns TRUE if the image has zero size
- void ErrDifferentSize(const BaseImageC & image,char * functionName) const
-
Triggers an error event if this image has different size from `image'.
The functionName should be the name of the function that triggers
the error event.
- SizeT Rnum() const
-
Returns number of rows.
- SizeT Cnum() const
-
Returns number of columns.
- IndexT TRow() const
-
Returns the top row index.
- IndexT LCol() const
-
Returns the left side column index.
- IndexT BRow() const
-
Returns the bottom row index.
- IndexT RCol() const
-
Returns the right side column index.
- LongIntT Area() const
-
Returns the area of the image rectangle expressed in number of indexs.
- UIntT Count() const
-
Returns the number of refrences to this object.
NB. The following definition is now obsolete,
The value 0 means there is no other reference to this object.
- const ImageRectangleC & AllocatedRect() const
-
Access allocated rectangle.
- BooleanT IsBlock() const
-
Returns TRUE if the image is allocated as one block of memory.
- const BaseImageC & operator=(const BaseImageC & image)
-
Assigment (as a big object).
- ImageFileInfoC * ChangeInfo(ImageFileInfoC * newInfo)
-
Changes the information about the origin of the image.
The function returns the old information.
- void ShiftRows(const IndexT offset)
-
All indexes of the items will be shift by 'offset'.
- void ShiftCols(const IndexT offset)
-
All indexes of the items will be shift by 'offset'.
Error checking.
---------------
- void ErrNotInRange(Index2dC i,char * functionName) const
-
Triggers the error event if the index 'i' is out of the image range.
- void ErrNotInRange(IndexT r,char * functionName) const
-
Triggers the error event if the row 'r' is out of the image range.
- void ErrNotInAllocRange(IndexT r,char * functionName) const
-
Triggers the error event if the row 'r' is out of the allocated image range.
- ImageRectangleC LoadImageRect(istream &)
-
Load image rectangle from stream.
This contains a hack to load the old coloumb/row stream
correctly.
- BooleanT ToBeDeleted() const
-
Returns TRUE if the content should be deleted.
- RCCountT Count() const
-
Returns the number of refrences to this object.
NB. The following definition is now obsolete,
The value 0 means there is no other reference to this object.
- BooleanT IsSingleReference()
-
Tests is there is only one reference to this object.
- const RefCounterC & operator=(const RefCounterC & rC)
-
- BooleanT ToBeDeletedUpdate(const RefCounterC & rC)
-
This function is the condition and the assigment together.
It returns TRUE if the content should be deleted before
assigning of the new object. The function automatically solves
the reference counter of this object as well as the other object
reference counter 'rC'.
- void ReportInvalidObject(char * Msg = 0)
-
This function reports an error to the user if a problem is detected
in the refrence counting mechanism.
- ImageAC * ACopy() const
-
A physical copy of the image.
- ImageAC * AnotherImage() const
-
Creates a new empty image of the same type and size as this image is.
- const ImageRectangleC & Rectangle() const
-
Returns the working image rectangle.
- void ShiftRowIndexes(const IndexT offset)
-
all indexes of the items will be shift by 'offset'
- void ShiftColIndexes(const IndexT offset)
-
all indexes of the items will be shift by 'offset'
- void SetRowSubRange(const IndexT newMin,const IndexT newMax)
-
the range of indexes of the array will be constrained
- void SetColSubRange(const IndexT newMin,const IndexT newMax)
-
the range of indexes of the array will be constrained
- const ImageFileInfoC & ImageFileInfo() const
-
access to the const origin
- LabelT Label() const
-
Returns the label of this reference counter.
The member function
is useful mainly to recognize objects during debugging.
The value of the label is uniquely defined pointer.
|
Programmer: James Smith, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|