Matlab的:根据时间戳天宝套准系统 [英] Matlab: Tempo-Alignment according to Timestamps

查看:139
本文介绍了Matlab的:根据时间戳天宝套准系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许它是如此简单,但我是新来的Matlab和时间戳中的问题不是一般的好。对不起!

May be it is so simple but I'm new to Matlab and not good in Timestamps issues in general. Sorry!

我有两个不同的相机均含有帧的时间戳。我看了他们两个数组TimestampsCam1和TimestampsCam2:

I have two different cameras each contains timestamps of frames. I read them to two arrays TimestampsCam1 and TimestampsCam2:

TimestampsCam1包含1500记录和时间戳的微秒如下:

TimestampsCam1 contains 1500 records and the timestamps are in Microseconds as follows:

1 20931160389
2 20931180407
3 20931200603
4 20931220273
5 20931240360 ...

和TimestampsCam2包含1000条记录和时间戳的毫秒如下:

and TimestampsCam2 contains 1000 records and the timestamps are in Milliseconds as follows:

1 28275280  
2 28315443  
3 28355607  
4 28395771  
5 28435935 ...

第一摄像机开始拍摄第一和结尾有点晚于第二个摄像头。因此,我需要做的是确切地知道,从第一个镜头一帧被捕获的同时(或几乎同时)由其他相机。换句话说,我想根据时间戳来对准两个阵列(照相机)的时间。我想要得到在末端大小相同,其中每个记录被其他阵列中的拍子对准于相应的记录的两个阵列

The first camera starts capturing first and ends a bit later than the second camera. So what I need to do is to know exactly where a frame from first camera is captured at the same time (or nearly the same time) by the other camera. In other words, I want to align the two arrays(cameras) in time according to the timestamps. I want to get at the end two arrays of same size where each record is tempo-aligned to the corresponding record in the other array.

非常感谢大家!

山姆

推荐答案

确认他们是在相同的测量单位,例如:微秒

Make sure they are in the same unit of measurement, e.g. microseconds

创建索引,它包含了所有值,除了重复,假设这个2400的记录长

Create an index which contains all values, except duplicates, suppose this one is 2400 records long

通过在其中索引时间戳相匹配的地方把值(例如在帧序号)创建长度2400两个NaN的载体

Create two NaN vectors of length 2400 by putting the value (for example the framenumber) at the place where the index matches the timestamp

现在你有一个NaN的垫两个对齐的载体他们在需要。

Now you have two aligned vectors with NaNs to pad them where required.

这篇关于Matlab的:根据时间戳天宝套准系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆