I had this thought a while ago and I'll be brief about the key question: Is it at all possible to replace the image data captured by the sensor with "artificial data" prior to JPEG generation by the regular Canon FW, either pre or post interpolation.
The question I have thus is along the lines of: Could we feed a synthesized gridwork into the JPEG engine (which will distort it like it would distort the sensor data in creating a camera JPEG)?
A JPEG of each focal length would be easy to make.
These could then be used to analyze what the Canon FW does and enabling the same in the post processing chain. Thus getting to a point where RAW pixels can be made to match JPEG pixels once more. As it is raw data is much less useful out of the box on any modern camera that does not natively shoot raw as it used to be when CHDK was conceived.
The DNG spec has some distortion correction options, but I suspect many raw programs will ignore them anyway.
I don't know how to turn that into lens correction in a useful format.
The CHDK part is pretty trivial, but I don't know how to turn that into lens correction in a useful format. If someone wants to write a tool that does that, I'd be very happy to do the CHDK part.
The patent protects nothing but establishes Adobe's leading role in the field and maybe looks nice on the vita of the folks involved with this project. the software was released in 2012 and has not been altered thereafter.
Quote from: reyalp on 21 / June / 2018, 23:02:38I don't know how to turn that into lens correction in a useful format.Adobe has done some work on this and it is in a peculiar state. I'll detail some of what I know about this and will attach a curious patent of theirs. The wording of the below may be a bit strange as I'll pull this from previous correspondence. I dug and was lucky enough to find a solid definition of all Adobe is doing in a patent of theirs."METHODS AND APPARATUS FOR CAMERA CALIBRATION BASED ON MULTI VIEW IMAGE GEOMETRY"It is not as bad. the lcp file is redundant as each node stands for itself but it amounts to:- finding the right lcp file to use (based on maker and lens information available as meta data)- picking the right focal length/aperture combination entry from that file (aperture only if vignetting info is provided)The details on geometric distortions in the PDF start in column 18 line 57In the lcp files three parameters are provided for each focal length of the lens like:Code: [Select]stCamera:FocalLength="50"[...]stCamera:ScaleFactor="0.958189"stCamera:RadialDistortParam1="0.187032"stCamera:RadialDistortParam2="0.165785"stCamera:RadialDistortParam3="0.40021"There also is the scale factor presumably to deal with differences in sensor size if such exist. Maybe also to deal with a difference in crop. Then the details on vignetting in the PDF start in column 21 line 30The vignetting of course depends on the aperture as well as on the focal length and makes for even more value sets in lcp like:Code: [Select]stCamera:FocalLength="50"stCamera:FocusDistance="3"stCamera:ApertureValue="8"[...]stCamera:VignetteModelParam1="-2.3844"stCamera:VignetteModelParam2="4.041297"stCamera:VignetteModelParam3="-6.086613"Enough meta data is available to provide what would be needed to dig out the correct *.lcp file to use.Normally the parameters of pincushion and other distortion are accurately determined as part of the process of designing a lens and so there is no need to estimate them after the fact.I don't suppose there are other open source implementations?
My "wild guess" is Adobe's intermediate "linear" DNG and the "lcp profile generation" is generated by Adobe's PostScript.
With the point being that even if there are raw programs that don't support the DNG feature, DNGs can be converted to a state where they can be used with such programs.
With the use of such DNG features becoming more wide spread software will adapt. Not using them because little but Adobe's stuff supports the feature gets this backwards.
I would be surprised if linear DNGs were better supported than the other features. In any case, I tested converting some native G7X CR2 images and they do not appear to have distortion applied.
Started by kdeal
Started by gvanhau
General Help and Assistance on using CHDK stable releases
Started by davecool
RAW Shooting and Processing
Started by vit40
DSLR Hack development
Started by studuatiga
General Discussion and Assistance