Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deciding the range of frame used for the 3D reconstruction #11

Merged
merged 12 commits into from May 11, 2021

Conversation

DenDen047
Copy link
Collaborator

When args.end_frame is set -1, the start_frame and end_frame are automatically defined with the following process:

max_idx = filtered_points_2d_df['frame'].max() + 1
for i in range(max_idx):
    if num_marker(i) == len(target_markers):
        start_frame = i
        break
for i in range(max_idx, 0, -1):
    if num_marker(i) == len(target_markers):
        end_frame = i
        break

line 812 on all_optimizations.py.

parser.add_argument('--plot', action='store_true', help='Show the plots')
parser.add_argument('--data_dir', type=str, help='The file path to the flick/run to be optimized.')
parser.add_argument('--start_frame', type=int, default=1, help='The frame at which the optimized reconstruction will start.')
parser.add_argument('--end_frame', type=int, default=-1, help='The frame at which the optimized reconstruction will end. If it is -1, start_frame and end_frame are automatically set.')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better if we use the start_frame as the trigger for the automatic frame selection. That way we can use end_frame=-1 as an indication to use the entire video. So we have the options to:

  • Manually set start_frame and end_frame to values > 0.
  • Use the entire video segment by setting end_frame = -1.
  • Automatically select the "best" frames based on the first time (and last time) the markers are all visible by setting start_frame = -1.

Just a thought.

@zicodasilva
Copy link

As I understand it, this will select a start frame where all the markers are visible (from any set of camera view points) and do the same from the other side for the end frame. I think this is a good way to select the frames that would produce the best reconstruction.

@DenDen047 DenDen047 merged commit faa034e into develop May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants