MedAI / channel.py
samreenhabib's picture
app
c3b7cfb
raw
history blame contribute delete
195 Bytes
from PIL import Image
# Open the image
image = Image.open('uploads/B0001_rgb.jpg')
# Get the number of channels
num_channels = len(image.getbands())
print("Number of channels:", num_channels)