Open JoelTomyGeorge opened 8 months ago
datainfo.pdf Code:
import os import cv2
folder_path = '/content/sample_data/leaf data'
for filename in os.listdir(folder_path): print(filename) if filename.endswith(".JPG"):
image_path = os.path.join(folder_path, filename) image = cv2.imread(image_path) if image is not None: height, width, channels = image.shape image_type = image.dtype print(f"Image: {filename}") print(f"Dimensions: {width} x {height}") print(f"Number of Channels: {channels}") print(f"Data Type: {image_type}") print("----------------------") else: print(f"Error: Unable to load image {filename}")
datainfo.pdf Code:
import os import cv2
folder_path = '/content/sample_data/leaf data'
for filename in os.listdir(folder_path): print(filename) if filename.endswith(".JPG"):