fextracker:

tracking engine update
rewrite of points2motion code

ui:
now allowing points to stay loaded when generating movement so that you can try multiple times without losing point tracking information

Originally committed to SVN as r151.
This commit is contained in:
tentacle 2006-02-24 20:04:04 +00:00
parent a9a4f5bf24
commit cc4ea8e9ea
6 changed files with 8 additions and 7 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -133,10 +133,6 @@ void FrameMain::OnVideoTrackMovement(wxCommandEvent &event) {
if( curline->Movement ) DeleteMovement( curline->Movement );
curline->Movement = curline->Tracker->GetMovement();
// Remove Tracker
delete curline->Tracker;
curline->Tracker = 0;
videoBox->videoDisplay->RefreshVideo();
}
@ -186,6 +182,10 @@ void FrameMain::OnVideoTrackSplitLine(wxCommandEvent &event) {
DeleteMovement( curline->Movement );
curline->Movement = 0;
// Remove Tracker
delete curline->Tracker;
curline->Tracker = 0;
// Remove this line
SubsBox->DeleteLines(SubsBox->GetRangeArray(EditBox->linen, EditBox->linen));

View file

@ -293,9 +293,9 @@ void VideoDisplay::OnMouseEvent(wxMouseEvent& event) {
)
{
localframe = frame_n - StartFrame;
if( curline->Tracker && localframe < curline->Tracker->GetFrame() )
if( TrackerEdit!=0 && curline->Tracker && localframe < curline->Tracker->GetFrame() )
curline->Tracker->InfluenceFeatures( localframe, float(x)/provider->GetZoom(), float(y)/provider->GetZoom(), TrackerEdit );
else if( curline->Movement && localframe < curline->Movement->Frames.size() )
if( MovementEdit!=0 && curline->Movement && localframe < curline->Movement->Frames.size() )
{// no /provider->GetZoom() to improve precision
if( MovementEdit==1 )
{
@ -494,6 +494,7 @@ double VideoDisplay::GetARFromType(int type) {
if (type == 0) return (double)provider->GetSourceWidth()/(double)provider->GetSourceHeight();
if (type == 1) return 4.0/3.0;
if (type == 2) return 16.0/9.0;
return 1; //error
}
@ -672,7 +673,7 @@ void VideoDisplay::DrawTrackingOverlay( wxDC &dc )
dc.DrawLine( pt.x, pt.y+1, pt.x, pt.y+3 );
}
}
else if( curline->Movement )
if( curline->Movement )
{
if( curline->Movement->Frames.size() <= localframe ) return;