00001
00002
00003
00004
00005 template <class SRC, class FEATURE>
00006 typename FEATURE::STATE XVTracker<SRC, FEATURE>::nextState() throw (XVTrackerException) {
00007
00008 source.next_frame_continuous();
00009 return feature.step(source.current_frame());
00010 };
00011
00012 template <class SRC, class FEATURE>
00013 void XVTracker<SRC, FEATURE>::track() throw(XVTrackerException) {
00014
00015 while(1){
00016
00017 source.next_frame_continuous();
00018 feature.step(source.current_frame());
00019 }
00020 };
00021
00022 template <class SRC, class WIN, class FEATURE>
00023 typename FEATURE::STATE XVDisplayTracker<SRC, WIN, FEATURE>::init(){
00024
00025 window.map();
00026
00027 source.next_frame_continuous();
00028
00029 window.CopySubImage(&(source.current_frame()));
00030 window.swap_buffers();
00031 window.flush();
00032
00033 STATE s = feature.interactiveInit(window, source.current_frame());
00034 window.setCOPY();
00035 return s;
00036 };
00037
00038 template <class SRC, class WIN, class FEATURE>
00039 void XVDisplayTracker<SRC, WIN, FEATURE>::track() throw(XVTrackerException) {
00040
00041 while(1){
00042
00043 source.next_frame_continuous();
00044
00045 for(int i = 0; i < stepsPerFrame; ++i){
00046 feature.step(source.current_frame());
00047 }
00048
00049 window.CopySubImage(&source.current_frame());
00050
00051 if(feature.inView()) feature.show(window);
00052
00053 window.swap_buffers();
00054 window.flush();
00055 }
00056 };
00057
00058 template <class SRC, class WIN, class FEATURE>
00059 typename FEATURE::STATE XVDisplayTracker<SRC, WIN, FEATURE>::nextState() throw (XVTrackerException) {
00060
00061 source.next_frame_continuous();
00062
00063 typename FEATURE::STATE st;
00064 for(int i = 0; i < stepsPerFrame; ++i){
00065 st = feature.step(source.current_frame());
00066 }
00067
00068 window.CopySubImage(&source.current_frame());
00069
00070 if(feature.inView()) feature.show(window);
00071
00072 window.swap_buffers();
00073 window.flush();
00074
00075 return st;
00076 };