Skip to content

Add inputs for cameraModel and videoType for calculating intrinsics - #281

Open
mattpetrucci wants to merge 4 commits into
opencap-org:devfrom
mattpetrucci:calcIntrinsics_Non_iPhone
Open

Add inputs for cameraModel and videoType for calculating intrinsics#281
mattpetrucci wants to merge 4 commits into
opencap-org:devfrom
mattpetrucci:calcIntrinsics_Non_iPhone

Conversation

@mattpetrucci

Copy link
Copy Markdown
Collaborator

Added inputs to computeAverageIntrinsics for camera model and video type. The code still has the option to calculate new intrinsics for an iPhone if the camera model is set to "None" and the video type is .mov.

Added inputs to computeAverageIntrinsics for camera model and video type.
Comment thread utilsChecker.py
Comment thread utilsChecker.py
Comment on lines +209 to +210
else:
camModels.append(cameraModel)

@csherry04 csherry04 Aug 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry I didn't notice before but I think it may also need a trial_name = trial_id here bc otherwise it doesn't reset in the main case meaning on a second iteration, the if trial_name == 'null' won't trigger @mattpetrucci

Comment thread utilsChecker.py
Comment on lines 220 to 221
if not os.path.exists(video_path):
download_file(trial["videos"][0]["video"], video_path)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Here if the camera model is input and the api request code isn't run this errors out so would have to skip for cases where that is true ie:

if not os.path.exists(video_path):
if cameraModel is not None:
raise FileNotFoundError(video_path)
download_file(trial["videos"][0]["video"], video_path)

but maybe you want the trial to get pulled from api regardless of whether the camera is input? Not sure what the best solution is

@csherry04 csherry04 self-assigned this Aug 27, 2026
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.

3 participants