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

Add support for Lens Camera Profiles (LCP) #1215

Merged
merged 29 commits into from
Mar 13, 2023
Merged

Conversation

demoulinv
Copy link
Contributor

@demoulinv demoulinv commented Sep 9, 2022

Description

Add Adobe LCP file management.

Features list

  • Load a lcp file indicated by the user (cameraInit) and extract geometry and vignetting models corresponding to camera setting (focal length, focus distance and aperture).
  • Automatic search of an appropriate lcp file in a database based on camera maker and model (optional) and lens model (cameraInit).
  • Apply correction model for geometry and vignetting (imageProcessing).

Implementation remarks

  • expat library has been used to read and load a lcp file.
  • For geometry correction, only radial models with 3 parameters can be applied. All models made available in Adobe database are like that but using the Adobe LCP creator to generate a model, up to 5 parameters can be used.
  • Geometry model parameters are stored using intrinsics.
  • Vignetting model parameters are stored as image metadata.

alicevision/Meshroom#1771

@demoulinv demoulinv force-pushed the LCPManagement branch 2 times, most recently from 34f7cdb to 6c0fc68 Compare December 23, 2022 10:11
demoulinv and others added 23 commits March 10, 2023 07:55
ADD LCP as initialization mode for intrinsics.
Remove enableAutomaticLCPSearch parameter and code cleaning
Set intrinsics using lcp info (distortion model)
Parse LCP database default value True + Add Fisheye model
Rename lensCorrectionProfileSearchByLensNameAndCameraMakerOnly in lensCorrectionProfileSearchIgnoreCameraModel
Sort profiles by name before parsing them.
Update doc, adding expat.
Add comments in search algorithm code.
Bug fix: do not search in the LCP database if camera maker or lens model is missing.
Add empty filepath in the database if a LCP is not found in order to speed up next searches with the same key.
Avoid DCP warning when loading jpg images.
Add log info on DCP number
Add lensType as possible name for lensID metadata.
Search "lensModel" inside "lensPrettyNameLCP" instead of checking equality. In some cases, lensPrettyNameLCP is the lensModel prefixed by the lens maker.
generateSample: Do not write distortionInitMode.
Add distortionInitMode Enum in all pinhole models.
}

/**
* @brief Get the intrinsic disto initialization mode
Copy link
Member

Choose a reason for hiding this comment

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

distortion (instead of disto)

@fabiencastan fabiencastan merged commit 7ad51ed into develop Mar 13, 2023
@fabiencastan fabiencastan deleted the LCPManagement branch March 13, 2023 13:03
@fabiencastan fabiencastan changed the title Lcp management Add support for Lens Camera Profiles (LCP) Mar 13, 2023
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.

5 participants