While trying to learn about modern AI code writing, I used the free version of Claude AI to write a program that uses libraw to read camera raw data, do a Richardson/Lucy deconvolution on the raw data, and write a dng raw file that can be processed by rawtherapee free software.
WARNING: I suggest only running the code produced by Claude if you trust code written by an AI. There are no promises that it works or is safe.
A web page created by Claude describing our chat is at https://www.rsok.com/~jrm/raw_rl_dng/raw_rl_dng.html , but I did not get the last few of my prompts to Claude included on the web page. Later prompts were mostly pointing out errors that Claude had made and asking Claude to fix them.
I also asked Claude to produce source and binary deb files suitable for use in Debian Trixie and compatible with Debian policy.
I made a test image at F/32 handheld so that there would be much diffraction blur. In the links below are examples of that image processed by Canon DPP software, straight out of camera, and from rawtherapee. I used rawtherapee free software to process the raw dng file produced by the program that Claude wrote, saved a 16 but png from rawtherapee, and converted it to JPEG using jpegli. The version processed using Canon DPP software used the DPRAW tool to enhance background detail and has unsharp mask applied while the version processed using rawtherapee does not have unsharp masking. Unsharp masking would improve the image produced by rawtherapee. In the version produced by Canon DPP software, I also increased the amount of "digital lens optimizer". It seems to me that "digital lens optimizer" works best on low ISO images and that is why I did such a low shutter speed with a long focal length.
EDIT: Claude seems to get the Airy disk radius calculation wrong. Running the program once with "-v" and "-n 2" and "-S" will cause the program to print its calculation to stderr. The number printed seems to be the diameter at first zero of Airy disk. divide by 2 to get radius and then divide by 3 to get portion of Airy disk that is nearly Gaussian.
| File:Other | FileName | IMG_5757.CR3 |
| EXIF:Image | ISO | 125 |
| Composite:Image | ShutterSpeed | 1/100 |
| MakerNotes:Camera | LensModel | EF100-400mm f/4.5-5.6L IS II USM +1.4x III |
| EXIF:Image | FNumber | 32.0 |
| MakerNotes:Camera | FocalLength | 560 mm |
| Composite:Image | ImageSize | 8192x5464 |
| File:Other | FileSize | 74 MB |
send email to John Moyer, jrm@rsok.com
Copyright 2026, John Moyer
https://bsky.app/profile/jrm.rsok.com me on Bluesky
https://www.rsok.com/~jrm/index.html my home page on my web server