image_edge_detection_command-code
image_edge_detection_command-code
1. ! lsblk
3. import os
usb_path = "/mnt/sdcard"
files = os.listdir(usb_path)
print ("Files on USB:", files)
4. import cv2
import numpy as np
import matplotlib.pyplot as plt
import os
usb_path = "/mnt/sdcard"
img_filename = "lena_gray.bmp"
if img is None:
print ("Error: Image not found. Check the file name and USB path.")
else:
# Display the grayscale image
plt.imshow(img, cmap="gray")
plt.axis("off")
plt.show()
5. import cv2
import numpy as np
plt.imshow(sobel_combined, cmap='gray')
plt.title("Sobel Edge Detection")
plt.axis("off")
plt.show()