我有几条同一路线的视频轨道,全年在不同场合拍摄。所有视频轨道都带有 1Hz GPS 的 GPS 标记,所以我有所有镜头的逐秒 GPS 点。
我想要完成的是将所有这些视频轨道放入例如 After Effects 中,并通过 GPS 位置重新映射时间。我无法按时间同步轨道,因为路线包括红绿灯和其他障碍物。
我已经开始创建两张表格:一张称为summer,它是主要的视频轨道,一张称为shot,它包含所有其他表格。
夏季餐桌是这样的:
Column | Type | Modifiers | Storage | Description
-----------+------------------------+--------------------------------------------------------------------+---------+-------------
id | integer | not null default nextval('summer_id_seq'::regclass) | plain |
timecode | time without time zone | not null | plain |
spring_id | integer | | plain |
autumn_id | integer | | plain |
winter_id | integer | | plain |
point | geometry(Point,4326) | not null | main |
Indexes:
"summer_pkey" PRIMARY KEY, btree (id)
"summer_autumn_id" btree (autumn_id)
"summer_point_id" gist (point)
"summer_spring_id" btree (spring_id)
"summer_winter_id" btree (winter_id)
Foreign-key constraints:
"summer_autumn_id_fkey" FOREIGN KEY (autumn_id) REFERENCES shot(id) DEFERRABLE INITIALLY DEFERRED
"summer_spring_id_fkey" FOREIGN KEY (spring_id) REFERENCES shot(id) DEFERRABLE INITIALLY DEFERRED
"summer_winter_id_fkey" FOREIGN KEY (winter_id) REFERENCES shot(id) DEFERRABLE INITIALLY DEFERRED
Has OIDs: no
虽然镜头表看起来像这样:
Column | Type | Modifiers | Storage | Description
----------+------------------------+-------------------------------------------------------------------+----------+-------------
id | integer | not null default nextval('shot_id_seq'::regclass) | plain |
season | character varying(255) | not null | extended |
timecode | time without time zone | not null | plain |
point | geometry(Point,4326) | not null | main |
Indexes:
"shot_pkey" PRIMARY KEY, btree (id)
"shot_point_id" gist (point)
Referenced by:
TABLE "summer" CONSTRAINT "summer_autumn_id_fkey" FOREIGN KEY (autumn_id) REFERENCES shot(id) DEFERRABLE INITIALLY DEFERRED
TABLE "summer" CONSTRAINT "summer_spring_id_fkey" FOREIGN KEY (spring_id) REFERENCES shot(id) DEFERRABLE INITIALLY DEFERRED
TABLE "summer" CONSTRAINT "summer_winter_id_fkey" FOREIGN KEY (winter_id) REFERENCES shot(id) DEFERRABLE INITIALLY DEFERRED
Has OIDs: no
所以,基本上我想要做的是遍历夏季表中的所有行,为每个不同的拍摄找到最接近每一行的点,并使用此信息更新夏季表。
我整理了一个我个人不明白为什么不起作用的查询,但是输出很奇怪,并且在 After Effects 中进行时间重新映射时根本不起作用:
SELECT DISTINCT ON (summer.id)
summer.id AS summer_id, shot.id AS autumn_id,
ST_Distance_Sphere(summer.point, shot.point) AS distance
FROM shot.summer summer
LEFT JOIN shot.shot.track
ON ST_DFullyWithin (summer.point, shot.point, 0.001)
AND shot.season='autumn'
ORDER BY summer.id ASC;
有人可以指出我正确的方向吗?
谢谢!