Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Images - Lines - PPHoughTransformBodyC
 

  PUBLIC
PPHoughTransformBodyC::PPHoughTransformBodyC(Point2dC,RealT,RealT,RealT,bool,RealT,bool)
PPHoughTransformBodyC::PPHoughTransformBodyC(const PPHoughTransformBodyC &)
PPHoughTransformBodyC::PPHTStep(Index2dC)
PPHoughTransformBodyC::PPHTTest(const Curve2dLineC &,Point2dC,IntT,IntT,IntT,RealT)
PPHoughTransformBodyC::PPHTTest(const Curve2dLineSegmentC &)
PPHoughTransformBodyC::Setup(const DListC &)
PPHoughTransformBodyC::SetCorridor(RealT)
PPHoughTransformBodyC::SetMaxGap(IntT)
PPHoughTransformBodyC::SetMinLineLength(IntT)
PPHoughTransformBodyC::SetDynamicThresh(RealT)
PPHoughTransformBodyC::SetFalseP(RealT)
PPHoughTransformBodyC::SetAngleRange(IntT)
PPHoughTransformBodyC::CalcThresh(IntT)
PPHoughTransformBodyC::CalcThresh2(IntT)
PPHoughTransformBodyC::SetGradEstNeigh(IntT)
PPHoughTransformBodyC::SaveAccum(StringC)
PPHoughTransformBodyC::SetImage(const ImageC &)
PPHoughTransformBodyC::SetFeedback(bool)
PPHoughTransformBodyC::Lines(void)
PPHoughTransformBodyC::WriteGF(ostream &)
PPHoughTransformBodyC::Apply(const DListC &)
PPHoughTransformBodyC::SHT(const DListC &)
PPHoughTransformBodyC::Copy(void) const
PPHoughTransformBodyC::SetMaxTime(RealT)
PPHoughTransformBodyC::SetSFract(RealT)
PPHoughTransformBodyC::SetEarlyOut(const DPOPortC &)
PPHoughTransformBodyC::EarlyOut(void)
PPHoughTransformBodyC::SetMagSort(bool)
PPHoughTransformBodyC::SetDoSHT(bool)
PPHoughTransformBodyC::SetupApply(const DListC &)
PPHoughTransformBodyC::FilterPoints(ImageC &,PCPixelListC &)
PPHoughTransformBodyC::GradFilterPoints(const ImageC &,PCPixelListC &,RealT)
PPHoughTransformBodyC::TrimOutUsed(const ImageC &,PCPixelListC &)
PPHoughTransformBodyC::GradTrimOutUsed(const ImageC &,PCPixelListC &,IntT)
PPHoughTransformBodyC::MaxAccAngle(void) const
PPHoughTransformBodyC::MinAccAngle(void) const
PPHoughTransformBodyC::Vote(Index2dC,Point2dC &,IntT &)
PPHoughTransformBodyC::UnVote(Index2dC)
PPHoughTransformBodyC::Vote(Index2dC,Point2dC &,RealT,RealT,IntT &)
PPHoughTransformBodyC::UnVote(Index2dC,RealT,RealT)
PPHoughTransformBodyC::GetThresh(IntT)
PPHoughTransformBodyC::Precompute(void)
RCBodyVC::Save(ostream &) const
RCBodyVC::Save(BinOStreamC &) const
RCBodyVC::Copy(void) const
RCBodyVC::DeepCopy(UIntT) const
RCBodyC::References(void) const
RCBodyC::Copy(void) const
RCBodyC::DeepCopy(UIntT) const
RCBodyC::IncRefCounter(void)
RCBodyC::DecRefCounter(void)

   PPHoughTransformBodyC   
 
Line segment extraction engine.
 
include "Ravl/Image/PPHT.hh"
Created:07/01/99 
Source file:Ravl/Image/Processing/Lines/PPHT.hh
User Level:Develop
Library:RavlImageProc
In Scope:RavlImageN

Parent Classes: Variables:
bool useMagSort;

RealT cWidth;
Corridor width.

IntT maxGap;

IntT minLength;

IntT tvotes;
Total number of votes currently in accumulator.

IntT allvotes;
Total number of votes done till now.

RealT dynthresh;

IntT gradEstNeigh;
Gradient estimation neighberhood size.

IntT p;

RealT falsep;

RealT AngRange;
Range of angles to consider.

RealT maxTime;
Maximum time to take in line extraction.

bool doSHT;

Point2dC res;

Array2dC accum;
Accumulator.

Array1dC angleCount;
Number of votes in each columb.

Array1dC tCos;
Cos.

Array1dC tSin;
Sin.

ImageC usedMap;
Map of user pixels.

ImageC pixMap;
Pixel map.

ImageC gradimg;
Gradiant image.

ImageC gradacc;
Gradiant accuracy image.

ImageC sobelImg;
Image of sobel numbers.

PCPixMappingC lines;
List of found lines.

bool feedBack;
true= Use feedback processing.

PCPixMappingC lastLines;
List of found lines.

PixelMapC pmap;

int total;
Total pixels in current input.

IntT cachv;

IntT cachr;

IntT accumArrSize;

bool useSobol;
Use sobol sampling.

RealT sFract;

bool fullDir;
Use full direction, not gradient.

DPOPortC earlyOut;
Anyone want line segments early ?

RealT radsPerBin;
Radians per bin. r/nb

SArray1dC threshTab;

Methods:
PPHoughTransformBodyC(Point2dC nRes = Point2dC (0.01),RealT fp = 0.999999,RealT angRange = 90,RealT maxPTime = - 1,bool useSobol = false,RealT nsFract = 1,bool fullDir = false)
Construct new do-da.

PPHoughTransformBodyC(const PPHoughTransformBodyC & oth)
Copy constructor.

bool PPHTStep(Index2dC pix)
Do a single PPHT cycle starting from a pixel.

bool PPHTTest(const Curve2dLineC & seg,Point2dC at,IntT lineAngle,IntT rho,IntT lMinLen = 0,RealT threshData = - 1)
Test this line hypothesis.
if the hypothesis is good, extract the line and return true. 'at' should be a point on the line.

lineAngle, is the expected angle of the line. (in accumulator co-ords) lMinLen must be greater than minLength to have any effect.


bool PPHTTest(const Curve2dLineSegmentC & seg)
Test this line hypothesis.
if the hypothesis is good, extract the line and return true.

bool Setup(const DListC<EdgelC> & dat)
Setup PPHT with the data.

void SetCorridor(RealT width)
Set width of corridor.

void SetMaxGap(IntT maxgap)
Set maximum gap in line.

void SetMinLineLength(IntT Len)
Minimum line length.

void SetDynamicThresh(RealT val)
Set Dynamic threshold.

void SetFalseP(RealT fpth)
Set false positive thres.

void SetAngleRange(IntT range)
0-255. 0-90 degrees.

IntT CalcThresh(IntT votes)
Calculate threshold for accumulator.

IntT CalcThresh2(IntT votes)
Calculate threshold for accumulator.

void SetGradEstNeigh(IntT size)
Gradient estimate neighhood size.

void SaveAccum(StringC filename)
Save accumulator.

void SetImage(const ImageC<ByteT> & apixMap)
Set input image.

void SetFeedback(bool sfb)
Enabled feed back.

PCPixMappingC<Curve2dLineSegmentC> & Lines()
List of found lines.

bool WriteGF(ostream & out)
Write GF file.

PCPixMappingC<Curve2dLineSegmentC> Apply(const DListC<EdgelC> & dat)
Apply operation.

PCPixMappingC<Curve2dLineSegmentC> SHT(const DListC<EdgelC> & dat)
Perform SHT.

RCBodyVC & Copy() const
Creat a copy of this object.

void SetMaxTime(RealT atime)
Set maxium time to run. -1 = Infinite.

void SetSFract(RealT fract)
Set maxium time to run. -1 = Infinite.

void SetEarlyOut(const DPOPortC<Curve2dLineSegmentC> & to)
Set early output of lines.

DPOPortC<Curve2dLineSegmentC> & EarlyOut()
Early output of lines.

void SetMagSort(bool val)
Set magmitude sort.

void SetDoSHT(bool val)
Do SHT, used for performance comparisons.

CollectionC<Index2dC> SetupApply(const DListC<EdgelC> & dat)
Setup everthing ready for procesing.

IntT FilterPoints(ImageC<ByteT> & inimg,PCPixelListC & pnts)
Filter out points that are already used. inimg must have 1 in each place. Return: number of points left.

IntT GradFilterPoints(const ImageC<ByteT> & img,PCPixelListC & pnts,RealT lineAngle)
Gradient filter points.

void TrimOutUsed(const ImageC<ByteT> & img,PCPixelListC & pnts)
Trim out points that have already been used.

void GradTrimOutUsed(const ImageC<ByteT> & img,PCPixelListC & pnts,IntT angle)
Trim out points that have already been used, and those that don't match the gradient constraints.

IntT MaxAccAngle() const
Get max position in accum.

IntT MinAccAngle() const
Get max position in accum.

bool Vote(Index2dC pix,Point2dC & peak,IntT & thresh)
Vote for a pixel, return true if it exceeds the threshold.

bool UnVote(Index2dC pix)
Remove votes for a pixel.

bool Vote(Index2dC pix,Point2dC & peak,RealT grad,RealT rng,IntT & thresh)
Vote for a pixel with an angle.
return true if it exceeds the threshold. grad 1-254 == 0-180 Degree. rnd 0-255 == 0-90 Degree.

bool UnVote(Index2dC pix,RealT grad,RealT rng)
Remove votes for a pixel, with an angle.
grad 1-254 == 0-180 Degree. rnd 0-255 == 0-90 Degree.

IntT GetThresh(IntT votes)
Calculate threshold for accumulator.

void Precompute()
Pre compute sin and cos tables. and thresholds.

#include "Ravl/RCHandleV.hh"
bool Save(ostream & out) const
Save to stream 'out'.

bool Save(BinOStreamC & out) const
Save to binary stream 'out'.

RCBodyVC & Copy() const
Make copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

RCBodyC & DeepCopy(UIntT levels = ((UIntT))) const
Make a deep copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

#include "Ravl/RefCounter.hh"
UIntT References() const
Access count of handles open to this object.

RCBodyC & Copy() const
Make copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

RCBodyC & DeepCopy(UIntT levels = ((UIntT))) const
Make a deep copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

void IncRefCounter()
Increment reference counter.

bool DecRefCounter()
Decrement reference counter.


Maintainer:Charles Galambos, Created: 07/01/99, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002