Processing IR RAW files

Processing IR RAW files
Unprocessed photos with an IR filter will look something like this

This whole idea about processing photos on the phone began when I came across this description of an android based RAW photo processing pipeline. You will probably recognise some fragments of the scripts that will come later have their origins in this article. I've added a bit to the concepts, but the original genius move comes from here.

A full Android FOSS raw imageing pipeline (tutorial)
As an Android user, amateur photographer, and FOSS advocate, I’ve long wished for a fully FOSS imaging pipeline on Android. I often use my Android phone for photography. It’s always on me and the camera hardware in them keeps getting better and better. There’s been some great FOSS Android software improvements recently too. I’ve finally figured out a fully FOSS pipeline that can go from raw image capture right through to a final, processed image. This post is meant to share the pipeline I’ve dis…

To start with, install the F-Droid app & use that to install Termux, Termux:API, Termux:Widget & if you have Tasker & want to do more complex automated things then install Termux:Tasker (I'm not going to cover that here though).

Open Termux & enter each of these lines, & press the enter key after each one.

Make sure that things are up to date. I think that I ended up needing the extra packages in the tur-repo for the photo processing, but I'm not totally sure
pkg install tur-repo
apt update && apt upgrade
Install dcraw & imagemagick (needed to process the RAW files) There was a problem for me with the libexpat library, so the code to reinstall it is here too.
apt install dcraw imagemagick
pkg rei libexpat

Enable access to the file storage on your phone for termux to be able to read/write files (agree to the request that the access permission is granted!)
termux-setup-storage
Add the termux api & core-utils
pkg install termux-api
pkg install core-utils

We'll also need exiftool in order to be able to copy the shooting data from the RAW file to the processed one
pkg install exiftool
Lastly, we'll want a directory for the scripts to be run from the Termux widget
mkdir -p $HOME/.shortcuts
chmod 700 -R /data/data/com.termux/files/home/.shortcuts

We now have termux installed, with access to the the photos on your phone & with dcraw to convert the photo to something that imagemagick can process (after changing the white balance for us, if needed).

The next section is about how to set up the options & which ones do what