Skip to content

new feature: tracking with display #4

Description

@alexlib

In the old version Tcl/Tk we had

		/* ******** Draw links now ******** */
		if (display)
			for (h=0;h<m[1];h++)
		{
			if(mega[1][h].next != -2 ) {

				strcpy(buf,"");
				sprintf(buf ,"green");

				for (j=0;j<n_img;j++)
				{
					if(c4[1][h].p[j]>0 && c4[2][mega[1][h].next].p[j]>0) {
						xp[j]=t4[1][j][c4[1][h].p[j]].x;
						yp[j]=t4[1][j][c4[1][h].p[j]].y;
						xc[j]=t4[2][j][c4[2][mega[1][h].next].p[j]].x;
						yc[j]=t4[2][j][c4[2][mega[1][h].next].p[j]].y;
						predict (xp[j], yp[j], xc[j], yc[j], &xn[j], &yn[j]);

						if ( ( fabs(xp[j]-zoom_x[j]) < imx/(2*zoom_f[j]))
							&& (fabs(yp[j]-zoom_y[j]) < imy/(2*zoom_f[j])))
						{
							strcpy(val,"");
							sprintf(val ,"orange");

							intx0 = (int)(imx/2+zoom_f[j]*(xp[j]-zoom_x[j]));
							inty0 = (int)(imy/2+zoom_f[j]*(yp[j]-zoom_y[j]));
							intx1 = (int)(imx/2+zoom_f[j]*(xc[j]-zoom_x[j]));
							inty1 = (int)(imy/2+zoom_f[j]*(yc[j]-zoom_y[j]));
							intx2 = (int)(imx/2+zoom_f[j]*(xn[j]-zoom_x[j]));
							inty2 = (int)(imy/2+zoom_f[j]*(yn[j]-zoom_y[j]));

							drawcross(interp,intx0,inty0,cr_sz,j,"green");
							drawcross(interp,intx1,inty1,cr_sz+1,j,"yellow");
							drawcross(interp,intx2,inty2,cr_sz+1,j,"white");
							drawvector (interp, intx0, inty0, intx1, inty1, 2, j, buf);
							drawvector (interp, intx1, inty1, intx2, inty2, 1, j, "white");

							if (mega[1][h].finaldecis> 0.2) {
								draw_pnr ( interp, intx0, inty0, h, j, "white");
								draw_pnr ( interp, intx0, inty0+10, mega[1][h].next, j, val);
								draw_value (interp, intx0, inty0 + 20,mega[1][h].finaldecis, j, val);
							}
						}
					}
				}
			}
		}

write at the end of the track loop. Please add it. Think how to manage it with openptv-python and pyptv

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions