00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PITHSYNC_H
00021 #define PITHSYNC_H
00022
00023 #include "blobbox.h"
00024 #include "varable.h"
00025 #include "statistc.h"
00026 #include "notdll.h"
00027
00028 class FPSEGPT_LIST;
00029
00030 class FPCUTPT
00031 {
00032 public:
00033 FPCUTPT() {
00034 }
00035 void setup (
00036 FPCUTPT cutpts[],
00037 inT16 array_origin,
00038 STATS * projection,
00039 inT16 zero_count,
00040 inT16 pitch,
00041 inT16 x,
00042 inT16 offset);
00043
00044 void assign (
00045 FPCUTPT cutpts[],
00046 inT16 array_origin,
00047 inT16 x,
00048 BOOL8 faking,
00049 BOOL8 mid_cut,
00050 inT16 offset,
00051 STATS * projection,
00052 float projection_scale,
00053 inT16 zero_count,
00054 inT16 pitch,
00055 inT16 pitch_error);
00056
00057 void assign_cheap (
00058 FPCUTPT cutpts[],
00059 inT16 array_origin,
00060 inT16 x,
00061 BOOL8 faking,
00062 BOOL8 mid_cut,
00063 inT16 offset,
00064 STATS * projection,
00065 float projection_scale,
00066 inT16 zero_count,
00067 inT16 pitch,
00068 inT16 pitch_error);
00069
00070 inT32 position() {
00071 return xpos;
00072 }
00073 double cost_function() {
00074 return cost;
00075 }
00076 double squares() {
00077 return sq_sum;
00078 }
00079 double sum() {
00080 return mean_sum;
00081 }
00082 FPCUTPT *previous() {
00083 return pred;
00084 }
00085 inT16 cheap_cuts() const {
00086 return mid_cuts;
00087 }
00088 inT16 index() const {
00089 return region_index;
00090 }
00091
00092 BOOL8 faked;
00093 BOOL8 terminal;
00094 inT16 fake_count;
00095
00096 private:
00097 inT16 region_index;
00098 inT16 mid_cuts;
00099 inT32 xpos;
00100 uinT32 back_balance;
00101 uinT32 fwd_balance;
00102 FPCUTPT *pred;
00103 double mean_sum;
00104 double sq_sum;
00105 double cost;
00106 };
00107 double check_pitch_sync2(
00108 BLOBNBOX_IT *blob_it,
00109 inT16 blob_count,
00110 inT16 pitch,
00111 inT16 pitch_error,
00112 STATS *projection,
00113 inT16 projection_left,
00114 inT16 projection_right,
00115 float projection_scale,
00116 inT16 &occupation_count,
00117 FPSEGPT_LIST *seg_list,
00118 inT16 start,
00119 inT16 end
00120 );
00121 double check_pitch_sync3(
00122 inT16 projection_left,
00123 inT16 projection_right,
00124 inT16 zero_count,
00125 inT16 pitch,
00126 inT16 pitch_error,
00127 STATS *projection,
00128 float projection_scale,
00129 inT16 &occupation_count,
00130 FPSEGPT_LIST *seg_list,
00131 inT16 start,
00132 inT16 end
00133 );
00134 #endif