Classes | |
struct | ContourState |
struct | coorlist |
struct | CornerState |
struct | LineSegment |
struct | point |
struct | rect |
struct | rect_iter |
struct | SymmetryState |
Public Member Functions | |
V2 (OptionManager &mgr, const std::string &descrName="V2", const std::string &tagName="V2") | |
~V2 () | |
Destructor. | |
void | init (Dims numCells) |
void | evolve (Image< PixRGB< byte > > &img) |
void | evolve (Image< float > &img) |
void | evolve (TensorField &tensorField) |
void | evolve (SimEventQueue &q) |
void | evolveLines () |
void | evolveContours () |
void | evolve2 () |
Layout< PixRGB< byte > > | getDebugImage () |
void | findLines (const Image< float > &mag, const Image< float > &ori, Image< float > &retMag, Image< float > &retOri) |
int | findMostProbableLine (const LineSegment &line, float &prob) |
std::vector< LineSegment > | proposeLineSegments (ImageSet< float > &LGNInput) |
std::vector< LineSegment > | proposeLineSegments (V1::EdgesState &edgesState) |
void | trainNFA (V1::EdgesState &edgesState) |
std::vector< ContourState > | proposeContours (std::vector< LineSegment > &lines) |
std::vector< LineSegment > | findNerestLines (std::list< LineSegment > &lines, std::stack< Point2D< float > > &endPoints) |
void | cornerSymetryDetection (std::vector< LineSegment > &lines) |
void | evolveBorderOwner () |
std::vector< V2::ContourState > | proposeContoursBO (std::vector< LineSegment > &lines) |
rect | getRect (const Point2D< int > p1, const Point2D< int > p2, const int width) |
Image< float > | ll_angle (Image< float > &in, float threshold, std::vector< Point2D< int > > &list_p, void **mem_p, Image< float > &modgrad, int n_bins, int max_grad) |
Image< float > | ll_angle (const TensorField &tensorField, float threshold, std::vector< Point2D< int > > &list_p, Image< float > &modgrad, int n_bins, int max_grad) |
bool | isaligned (Point2D< int > loc, const Image< float > &angles, float theta, float prec) |
float | angle_diff (float a, float b) |
double | log_gamma_lanczos (double x) |
double | log_gamma_windschitl (double x) |
double | nfa (int n, int k, double p, double logNT) |
void | rect_copy (struct rect *in, struct rect *out) |
float | inter_low (float x, float x1, float y1, float x2, float y2) |
float | inter_hi (float x, float x1, float y1, float x2, float y2) |
void | ri_del (rect_iter *iter) |
int | ri_end (rect_iter *i) |
void | ri_inc (rect_iter *i) |
rect_iter * | ri_ini (struct rect *r) |
int | ri_end (rect_iter &itr) |
void | ri_inc (rect_iter &itr) |
void | ri_ini (struct rect *r, rect_iter &iter) |
double | rect_nfa (struct rect *rec, Image< float > &angles, double logNT) |
float | get_theta (struct point *reg, int reg_size, float x, float y, Image< float > &modgrad, float reg_angle, float prec, float *elongation) |
float | region2rect (struct point *reg, int reg_size, Image< float > &modgrad, float reg_angle, float prec, double p, struct rect *rec, float *sum_l, float *sum_w, int sum_offset, int sum_res) |
void | region_grow (Point2D< int > loc, Image< float > &angles, struct point *reg, int *reg_size, float *reg_angle, Image< byte > &used, float prec, int radius, Image< float > modgrad, double p, int min_reg_size) |
double | rect_improve (struct rect *rec, Image< float > &angles, double logNT, double eps) |
std::vector< LineSegment > | lineSegmentDetection (Image< float > &img, float q=2.0, float d=8.0, double eps=0.0, int n_bins=16256, int max_grad=260100, float scale=1.0, float sigma_scale=0.6) |
std::vector< LineSegment > | lineSegmentDetection (const TensorField &tensorField, float q=2.0, float d=20, double eps=0.0, int n_bins=16256, int max_grad=260100) |
V2 (Dims size) | |
void | step () |
void | setInput (vector< Image< float > > input) |
float | g_x (float x) |
float | g_y (float y) |
float | psi (float theta) |
float | tau () |
float | I_normalization (Point2D< int > i, int theta_index) |
float | phi (float x, float y) |
float | beta (Point2D< int > i, Point2D< int > j) |
float | sign (float x) |
float | theta_one (Point2D< int > i, int i_theta_index, Point2D< int > j) |
float | theta_two (Point2D< int > i, Point2D< int > j, int j_theta_index) |
float | theta_one_prime (Point2D< int > i, int i_theta_index, Point2D< int > j) |
float | theta_two_prime (Point2D< int > i, Point2D< int > j, int j_theta_index) |
float | theta_plus (float theta_a, float theta_b) |
float | theta_minus (float theta_a, float theta_b) |
void | theta_a_b (float &theta_a, float &theta_b, Point2D< int > i, Point2D< int > j, int i_theta_index, int j_theta_index) |
float | f_1 (float d) |
float | f_2 (float d) |
float | f_T (float d) |
float | W (Point2D< int > i, int i_theta_index, Point2D< int > j, int j_theta_index) |
float | J (Point2D< int > i, int i_theta_index, Point2D< int > j, int j_theta_index) |
float | sumPsiGy (Point2D< int > i, int theta_index) |
float | sumJGx (Point2D< int > i, int theta_index) |
float | sumWGx (Point2D< int > i, int theta_index) |
float | ind2rad (int theta_index) |
Static Public Member Functions | |
static int | double_equal (double a, double b) |
Protected Member Functions | |
SIMCALLBACK_DECLARE (V2, SimEventV1Output) | |
Callback for when a new ganglion output is ready. | |
SIMCALLBACK_DECLARE (V2, SimEventSaveOutput) | |
Callback for every time we should save our outputs. | |
SIMCALLBACK_DECLARE (V2, SimEventUserInput) | |
Callback for every time we have a user event. | |
Protected Attributes | |
OModelParam< bool > | itsShowDebug |
Should we show our debug info. | |
OModelParam< bool > | itsTrainNFA |
Train the NFA. | |
OModelParam< std::string > | itsTrainNFAFile |
std::vector< LineSegment > | itsLines |
std::vector< ContourState > | itsContours |
Definition at line 260 of file V2.H.
static int V2::double_equal | ( | double | a, | |
double | b | |||
) | [inline, static] |
Compare doubles by relative error.
The resulting rounding error after floating point computations depend on the specific operations done. The same number computed by different algorithms could present different rounding errors. For a useful comparison, an estimation of the relative rounding error should be considered and compared to a factor times EPS. The factor should be related to the cumulated rounding error in the chain of computation. Here, as a simplification, a fixed factor is used.
V2::SIMCALLBACK_DECLARE | ( | V2 | , | |
SimEventUserInput | ||||
) | [protected] |
Callback for every time we have a user event.
V2::SIMCALLBACK_DECLARE | ( | V2 | , | |
SimEventSaveOutput | ||||
) | [protected] |
Callback for every time we should save our outputs.
V2::SIMCALLBACK_DECLARE | ( | V2 | , | |
SimEventV1Output | ||||
) | [protected] |
Callback for when a new ganglion output is ready.
OModelParam<bool> V2::itsShowDebug [protected] |
OModelParam<bool> V2::itsTrainNFA [protected] |