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

k-matrix and intrinsic parameters #26

Open
ZiadMansourM opened this issue May 6, 2023 · 0 comments
Open

k-matrix and intrinsic parameters #26

ZiadMansourM opened this issue May 6, 2023 · 0 comments

Comments

@ZiadMansourM
Copy link
Owner

Parameters like focal length are encoded inside pictures taken from iPhone. The focal length is stored in the EXIF data of the image. To load the EXIF data of an image in Python, you can use the following code:

import exifread

# Open the image file
image = open("image.jpg", "rb")

# Read the EXIF data
exif = exifread.process_file(image)

# Get the focal length
focal_length = exif["Image/FocalLength"]

# Print the focal length
print(focal_length)

This code will print the focal length of the image in millimeters. For example, if the focal length is 28mm, the code will print "28".

Here is a table of some of the EXIF tags that may be present in iPhone images:

Tag Description
Image/FocalLength Focal length of the lens in millimeters
Image/DateTimeOriginal Date and time the image was taken
Image/GPSInfo GPS coordinates of the image
Image/Make Make of the camera
Image/Model Model of the camera

You can find a more complete list of EXIF tags here: https://exiftool.org/TagNames/EXIF.html

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

No branches or pull requests

1 participant