White balance 16-bit TIFF

Thanks to you both. I received the script that works on 8-bit, also the one that doesn’t work with 16-bit, but now reading about MRE, I’m thinking I need my support to step in and try to comply with the “M” for minimal. He has sample files and a control group to compare against, will show up here soon. I’ll let him clarify the particulars of the operations being run, am hopeful either of you will be able to determine whether these fall inside the supported arithmetic with OpenCV. Again, many thanks.