• Welcome to Photrio!
    Registration is fast and free. Join today to unlock search, see fewer ads, and access all forum features.
    Click here to sign up

Tri-Color Narrow Band RGB DSLR scanning

Street photo Nashville

A
Street photo Nashville

  • 2
  • 0
  • 54
Rome

H
Rome

  • 2
  • 2
  • 67

Recent Classifieds

Forum statistics

Threads
202,547
Messages
2,842,184
Members
101,375
Latest member
JoannaG
Recent bookmarks
0
It would be relatively trivial for a programmer with an image processing package to be able to combine the R G B of 3 images. I had Gemini write one real quick for Python.

from PIL import Image
import os

def combine_channels():
# Define filenames
r_path = 'red.tif'
g_path = 'green.tif'
b_path = 'blue.tif'
output_path = 'rgb.tif'

# Check if all files exist to avoid errors
for file in [r_path, g_path, b_path]:
if not os.path.exists(file):
print(f"Error: Could not find {file} in the current folder.")
return

try:
# Open the source images and convert to grayscale (L mode)
# just in case they aren't already formatted correctly
r = Image.open(r_path).convert('L')
g = Image.open(g_path).convert('L')
b = Image.open(b_path).convert('L')

# Merge the three images into one RGB image
rgb_image = Image.merge('RGB', (r, g, b))

# Save the result
rgb_image.save(output_path)
print(f"Success! Saved combined image as {output_path}")

except Exception as e:
print(f"An error occurred: {e}")

if __name__ == "__main__":
combine_channels()
 
Last edited:
Photrio.com contains affiliate links to products. We may receive a commission for purchases made through these links.
To read our full affiliate disclosure statement please click Here.

PHOTRIO PARTNERS EQUALLY FUNDING OUR COMMUNITY:



Ilford ADOX Freestyle Photographic Stearman Press Weldon Color Lab Blue Moon Camera & Machine
Top Bottom