Trying to find the lens “VCL-ECF1 fisheye converter” in the database using “FindLenses” fails. The problem is its lens type. Changed to rectilinear in the DB, it is found.
The problem is the default value of the lens type of lfLens: it is LF_RECTILINEAR. FindLenses just instantiates a lens with that type, and when using this to find lenses, it doesn't match any fisheye.
Two options:
Change the default to LF_UNKNOWN. This is conceptionally cleaner (an unintialised lens does not have a type after all) but may introduce problems with backwards-compatibility.
Set the type of the dummy lens used in FindLenses to LF_UNKNOWN.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, because all applications AFAIK used FindLenses() with camera, maker and model name instead of passing it a manually configured lens object. Hence, the search for non-rectilinear lenses always failed in the past.
With the current modifier_api branch searching a lens “VCL-ECF1 fisheye converter” properly returns the correct profile as far as I can see... Other lenses seem to be found, too.
(To be honest I was not aware of this bug report, otherwise I would have commented here earlier after my change. Sorry for that...)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem is the default value of the lens type of lfLens: it is LF_RECTILINEAR. FindLenses just instantiates a lens with that type, and when using this to find lenses, it doesn't match any fisheye.
Two options:
The test is completely gone in the branch modifier_api. Was this intentional?
Yes, because all applications AFAIK used FindLenses() with camera, maker and model name instead of passing it a manually configured lens object. Hence, the search for non-rectilinear lenses always failed in the past.
With the current modifier_api branch searching a lens “VCL-ECF1 fisheye converter” properly returns the correct profile as far as I can see... Other lenses seem to be found, too.
(To be honest I was not aware of this bug report, otherwise I would have commented here earlier after my change. Sorry for that...)
Can this be closed? If I didn't miss soemthing I think this should now be fixed in modifier_api branch...
Now, the lens type is not included at all in the matching. I think it's better to set LF_UNKNOWN as default value for fresh lens objects.