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

New Canon Lens Identification + Automatic Test of all Lenses #1692

Merged
merged 17 commits into from Jun 20, 2021

Commits on Jun 2, 2021

  1. Add test for all known Canon lenses

    Generates a test case for every known lens from canonCsLensType, that first
    sets the corresponding lens metadata and then verifies that exiv2 maps it
    to the expected lens description. Only metadata fields that are relevant
    for lens identification are modified.
    webmeister authored and hassec committed Jun 2, 2021
    Configuration menu
    Copy the full SHA
    73efa45 View commit details
    Browse the repository at this point in the history
  2. Execute test commands always with shell

    There is no need to handle tests on Windows and Unix differently here.
    Always using a shell allows for more flexibility when writing tests.
    
    (rebased by hassec)
    webmeister authored and hassec committed Jun 2, 2021
    Configuration menu
    Copy the full SHA
    fa4ce38 View commit details
    Browse the repository at this point in the history
  3. Remove undetectable lenses

    Lenses that have the exact same ID, focal length and aperture as some other
    lens that comes earlier in the list (and thus always wins):
    * 137, "Tamron SP 17-50mm f/2.8 XR Di II VC"
    * 137, "Tamron SP 24-70mm f/2.8 Di VC USD"
    * 161, "Sigma 28-70mm f/2.8 EX"
    * 173, "Sigma 180mm EX HSM Macro f/3.5"
    * 180, "Zeiss Milvus 50mm f/1.4"
    * 183, "Sigma 150-600mm f/5-6.3 DG OS HSM | S"
    * 254, "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1 F004"
    * 254, "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1 F017"
    
    Lenses that share their IDs with other lenses, but have no or an
    unsupported focal length:
    * 33, "Voigtlander or Carl Zeiss Lens"
    * 131, "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye"
    webmeister authored and hassec committed Jun 2, 2021
    Configuration menu
    Copy the full SHA
    0d030ee View commit details
    Browse the repository at this point in the history
  4. Clean up Canon lens list

    Fixes some small inconsistencies, so that all lenses use the same format,
    that is also shared with other lens databases such as lensfun:
    * Always prefix aperture with f/
    * Never add .0 to aperture
    * Always add mm to focal length
    * Always use | A for Sigma Art lenses
    webmeister authored and hassec committed Jun 2, 2021
    Configuration menu
    Copy the full SHA
    d7f613c View commit details
    Browse the repository at this point in the history
  5. Fix rounding error in fnumber calculation

    The mathematical calculation of fnumbers does not always match the expected
    values: For example for f/3.5 the precise mathematical value is 3.564...,
    which gets rounded to 3.6. Fix this special case by returning a value
    closer to the expected value.
    webmeister authored and hassec committed Jun 2, 2021
    Configuration menu
    Copy the full SHA
    477150f View commit details
    Browse the repository at this point in the history
  6. Fix misdetection of Tamron SP AF 300mm as Canon EF 75-300mm

    When searching for the Tamron lens, only the string "300mm" is searched in
    the lens description, which also happens to be present for the Canon lens.
    Since the Canon lens comes first in the list, it wins. Fix this issue by
    prefixing the search string with a single space so it always has to match
    the full focal length specification.
    webmeister authored and hassec committed Jun 2, 2021
    Configuration menu
    Copy the full SHA
    9962b88 View commit details
    Browse the repository at this point in the history
  7. Improve detection of Canon lenses with TC

    Lenses with and without a TC may share the same lens ID. Prefer entries
    that explicitly mention the TC.
    webmeister authored and hassec committed Jun 2, 2021
    Configuration menu
    Copy the full SHA
    56f9979 View commit details
    Browse the repository at this point in the history
  8. refactor: move canon lens tests into new test directory

    This commit does some restructuring to make common utils available
    for future similar test for other brands
    hassec committed Jun 2, 2021
    Configuration menu
    Copy the full SHA
    47d518b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4ee8962 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    a70896c View commit details
    Browse the repository at this point in the history
  11. feat: rework lens test to account for ambiguous lenses

    For each lens, its test target is now defined as the list of all lenses
    which are possible given that lenses exif values.
    hassec committed Jun 2, 2021
    Configuration menu
    Copy the full SHA
    cc89dca View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2021

  1. Configuration menu
    Copy the full SHA
    907fe23 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2021

  1. feat: improve lens recognition of canon makernote

    If multiple choices are possible they are now all reported. This
    behaviour is now the same as it is in exiftool.
    
    All lenses are tested in the new test_canon_lenses.py test
    hassec committed Jun 8, 2021
    Configuration menu
    Copy the full SHA
    bdd8a38 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    20cff55 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7bc9c01 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7867343 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    efb0af8 View commit details
    Browse the repository at this point in the history