#include <pitsync1.h>
Definition at line 34 of file pitsync1.h.
◆ FPSEGPT() [1/4]
tesseract::FPSEGPT::FPSEGPT |
( |
| ) |
|
|
default |
◆ FPSEGPT() [2/4]
tesseract::FPSEGPT::FPSEGPT |
( |
int16_t |
x | ) |
|
◆ FPSEGPT() [3/4]
tesseract::FPSEGPT::FPSEGPT |
( |
int16_t |
x, |
|
|
bool |
faking, |
|
|
int16_t |
offset, |
|
|
int16_t |
region_index, |
|
|
int16_t |
pitch, |
|
|
int16_t |
pitch_error, |
|
|
FPSEGPT_LIST * |
prev_list |
|
) |
| |
Definition at line 77 of file pitsync1.cpp.
86 :
fake_count(0), xpos(x), mean_sum(0.0), sq_sum(0.0) {
94 FPSEGPT_IT pred_it = prev_list;
100 best_fake = INT16_MAX;
102 for (pred_it.mark_cycle_pt(); !pred_it.cycled_list(); pred_it.forward()) {
103 segpt = pred_it.data();
104 if (segpt->fake_count < best_fake) {
105 best_fake = segpt->fake_count;
107 dist = x - segpt->xpos;
108 if (dist >= pitch - pitch_error && dist <= pitch + pitch_error && !segpt->
terminal) {
109 total = segpt->mean_sum + dist;
110 sq_dist = dist * dist + segpt->sq_sum + offset * offset;
112 mean = total / region_index;
113 factor = mean - pitch;
115 factor += sq_dist / (region_index)-mean * mean;
◆ FPSEGPT() [4/4]
tesseract::FPSEGPT::FPSEGPT |
( |
FPCUTPT * |
cutpt | ) |
|
Definition at line 37 of file pitsync1.cpp.
41 mean_sum = cutpt->sum();
42 sq_sum = cutpt->squares();
43 cost = cutpt->cost_function();
47 xpos = cutpt->position();
48 mid_cuts = cutpt->cheap_cuts();
◆ cheap_cuts()
int16_t tesseract::FPSEGPT::cheap_cuts |
( |
| ) |
const |
|
inline |
◆ cost_function()
double tesseract::FPSEGPT::cost_function |
( |
| ) |
|
|
inline |
◆ position()
int32_t tesseract::FPSEGPT::position |
( |
| ) |
|
|
inline |
◆ previous()
FPSEGPT* tesseract::FPSEGPT::previous |
( |
| ) |
|
|
inline |
◆ squares()
double tesseract::FPSEGPT::squares |
( |
| ) |
|
|
inline |
◆ sum()
double tesseract::FPSEGPT::sum |
( |
| ) |
|
|
inline |
◆ fake_count
int16_t tesseract::FPSEGPT::fake_count |
◆ faked
bool tesseract::FPSEGPT::faked |
◆ terminal
bool tesseract::FPSEGPT::terminal |
The documentation for this class was generated from the following files: