42-AI / Elegant-Elegans

MIT License
3 stars 0 forks source link

parser & checker (images to video conversion): parsing the json to retrieve information about tiff images #18

Closed madvid closed 2 years ago

madvid commented 2 years ago

User Story

I want to convert any .TIFF image to AVI and MP4 types video. so that i can use these data for WF NTP

To do so, I need to parse an argument being supposely the path to the directory containing:

This part is dealed in the issue #17 and is the first step realised by the execution of:

python -m converter --path [path_arg]

Based on path_arg I want that the program converter.py to parse the json file and retrieve the different information to check the validity of the tiff files.

The handle of the variable frame rate is tricky (related issue: #24 ). Thus to level of development is expected:

It may be important for futur analysis to keep a track of the instant frame rate. Two choices are possible:

Acceptance Criteria

Definition of Done

Defined by CICD:

COTHSC commented 2 years ago

I have an good start for all of this except the frame rate. The time between pictures can vary by ~20 ms meaning the frame rate is variable. It is easy to collect exact timestamps for each picture, however writing a variable frame rate video may be a bit trickier (but definitely possible), and the tracking algorithm would need to take the variable frame rate into account. Otherwise we could average out & approximate frame rate.

madvid commented 2 years ago

Nice ! I will update the issue a bit to segment the work into several level of complexity.

madvid commented 2 years ago

@COTHSC user story is updated

madvid commented 2 years ago

@COTHSC and @rcatini, for the tests you can perform some of them to start with the URI:

p-lg-ux commented 2 years ago

Instead of a list of the time intervals between the frames, it could be better to have a dictionary with the format dict = { "filename0.tiff": interval0_ms, "filename1.tiff": interval1_ms, ..., "filenameN.tiff": intervalN_ms } where interval0_ms is equal to 0.

cnstll commented 2 years ago

@COTHSC @rcatini Or we could have the following dict in output from your parsing functions:

dict = {
'frame_names': ['filename0.tiff', 'filename1.tiff', ..., 'filename100.tiff'],
'frame_height': 2048
'frame_length': 2048
'avg_fps': 10
}