Hough transform based on 2-point combinations. More...
#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-23/HoughTransform/Hough2P.h"
Public Member Functions | |
Hough2P (geo::View_t v, double rhosz, double thetasz, int rhosm, int thetasm, double rsqr, double pco) | |
Construct the 2-point Hough transform. More... | |
~Hough2P () | |
void | Map (const rb::HitList &h) |
Public Attributes | |
geo::View_t | fView |
Which detector view? More... | |
double | fRhoSz |
Size of rho bins (cm) More... | |
double | fThetaSz |
Size of theta bins (degrees) More... | |
int | fXwinSz |
Smoothing size (bins) in x. More... | |
int | fYwinSz |
Smoothing size (bins) in y. More... | |
double | fSigma |
Assumed location error on points (cm) More... | |
double | fRsqr |
Distance^2 cut on points (cm^2) More... | |
double | fPco |
Number of sigma abouve average peak height to use as cutoff. More... | |
TH2F * | fHspaceW |
Hough transform. More... | |
IslandsTH2 * | fHspaceI |
Islands for x view. More... | |
rb::HoughResult | fH |
Results of Hough transformation;. More... | |
Private Member Functions | |
void | BuildMap (double xlo, double xhi, double ylo, double yhi) |
void | RhoTheta (double x1, double y1, double x2, double y2, double *rho, double *theta, double *sigmarho, double *sigmatheta) |
void | SmoothMap () |
void | FindPeaks () |
hough::Hough2P::Hough2P | ( | geo::View_t | v, |
double | rhosz, | ||
double | thetasz, | ||
int | rhosm, | ||
int | thetasm, | ||
double | rsqr, | ||
double | pco | ||
) |
Construct the 2-point Hough transform.
The transform proceeds by considering all paris of points that occur within a cut off distance (rsqr) of each other. For each pair an ellipse is filled in Hough space weighted by the quality of the line fit to the two spatial points. The algorithm is largely derived from
"Real-time line detection through an improved Hough transform voting scheme", L.A.F. Fernandes, M.M. Oliveira / Pattern Recognition 41 (2008) 299-314
v | - Which detector view? geo::kX or geo::kY |
rhosz | - Size of rho bins (cm) |
thetasz | - Size of theta bins (degrees) |
rhosm | - Number of bins to use in smoothing rho |
thetasm | - Number of bins to use in smoothing theta |
rsqr | - Cut on distance between two points |
pco | - Number of sigma above average peak height for threshold (peak cut-off) |
Definition at line 23 of file Hough2P.cxx.
hough::Hough2P::~Hough2P | ( | ) |
|
private |
Definition at line 80 of file Hough2P.cxx.
References fHspaceI, fHspaceW, fPco, fRhoSz, fThetaSz, fView, makeTrainCVSamples::int, geo::kX, geo::kY, M_PI, util::pythag(), and r().
Referenced by Map().
|
private |
Definition at line 210 of file Hough2P.cxx.
References fH, fHspaceI, fHspaceW, rb::HoughResult::fPeak, hough::IslandsTH2::LabelIslands(), hough::IslandsTH2::Nislands(), r(), rb::HoughResult::SortPeaks(), and chisquared::theta.
Referenced by Map().
void hough::Hough2P::Map | ( | const rb::HitList & | h | ) |
Make the Hough map for the hit list h.
h | - The list of hits (can be mixed X and Y view hits) |
Definition at line 119 of file Hough2P.cxx.
References BuildMap(), fH, fHspaceW, FindPeaks(), fRsqr, rb::HoughResult::fTNShi, rb::HoughResult::fTNSlo, fView, fXwinSz, rb::HoughResult::fXY0, fYwinSz, rb::HoughResult::fZ0, Gaus(), MECModelEnuComparisons::i, calib::j, RhoTheta(), SmoothMap(), util::sqr(), chisquared::theta, w, submit_syst::x, xaxis, xhi, make_syst_table_plots::xlo, submit_syst::y, yaxis, yhi, and ylo.
Referenced by hough::HoughT::produce().
|
private |
Definition at line 45 of file Hough2P.cxx.
References std::atan2(), std::cos(), d, fSigma, M_PI, util::pythag(), std::sin(), submit_syst::x2, and submit_syst::y2.
Referenced by Map().
|
private |
Definition at line 274 of file Hough2P.cxx.
References a, b, fHspaceW, fXwinSz, fYwinSz, Gaus(), MECModelEnuComparisons::i, calib::j, m, getGoodRuns4SAM::n, sum, and w.
Referenced by Map().
rb::HoughResult hough::Hough2P::fH |
Results of Hough transformation;.
Definition at line 78 of file Hough2P.h.
Referenced by FindPeaks(), Map(), and hough::HoughT::produce().
IslandsTH2* hough::Hough2P::fHspaceI |
Islands for x view.
Definition at line 77 of file Hough2P.h.
Referenced by BuildMap(), FindPeaks(), hough::HoughT::WriteHoughHistos(), and ~Hough2P().
TH2F* hough::Hough2P::fHspaceW |
Hough transform.
Definition at line 76 of file Hough2P.h.
Referenced by BuildMap(), FindPeaks(), Map(), SmoothMap(), hough::HoughT::WriteHoughHistos(), and ~Hough2P().
double hough::Hough2P::fPco |
Number of sigma abouve average peak height to use as cutoff.
Definition at line 73 of file Hough2P.h.
Referenced by BuildMap().
double hough::Hough2P::fRhoSz |
double hough::Hough2P::fRsqr |
double hough::Hough2P::fSigma |
Assumed location error on points (cm)
Definition at line 71 of file Hough2P.h.
Referenced by RhoTheta().
double hough::Hough2P::fThetaSz |
geo::View_t hough::Hough2P::fView |
int hough::Hough2P::fXwinSz |
Smoothing size (bins) in x.
Definition at line 69 of file Hough2P.h.
Referenced by Map(), and SmoothMap().
int hough::Hough2P::fYwinSz |
Smoothing size (bins) in y.
Definition at line 70 of file Hough2P.h.
Referenced by Map(), and SmoothMap().