databrary / datavyu

Desktop video coding/annotation tool
http://datavyu.org/
GNU General Public License v3.0
27 stars 18 forks source link

Consistently treat cells as closed intervals #154

Open sh0sh1n opened 5 years ago

sh0sh1n commented 5 years ago

Current API functions do not specify whether cells are treated as closed intervals or half-closed intervals. Some functions, like merge_columns(), morph cell timestamps to simplify dealing with time intervals. In merge_columns()'s case, it changes point cells with equivalent onsets and offsets to cells with offsets one millisecond greater than its onset.

There ought to be a consensus or some way to specify how to treat time intervals.

sh0sh1n commented 5 years ago

A practical reason why Datavyu on the Java side uses closed intervals for continuous coding (offset of a cell is 1 millisecond less than the onset of the following cell) is to seek to the appropriate frames when seeking to offsets. If the same timestamp were shared between the offset and onset of adjacent cells, seeking to the offset of the earlier cell would seek to the same frame as seeking to the onset of the later cell.

sh0sh1n commented 5 years ago

I think it makes more sense to re-work the API functions so they treat cells as closed intervals since the Spreadsheet treats it as such.