
# https://www.globalsino.com/ICs/
# Pixel values on specific pixel in an image


from PIL import Image
import numpy as np
import matplotlib.pyplot as plt
import cv2
from skimage.color import rgb2gray
import pyautogui as pg

image = cv2.imread(r"C:\GlobalSino2\ICs\images\4500k_theRed.png")
GrayImage = rgb2gray(image)
height = GrayImage.shape[0]
width = GrayImage.shape[1]

print(height, width)


red_image = Image.open(r"C:\GlobalSino2\ICs\images\4500k_theRed.png")

red_image_rgb = red_image.convert("RGB")
red_image_rgb.show()
rgb_pixel_value = red_image_rgb.getpixel((157,89))
print(rgb_pixel_value)
print(rgb_pixel_value[0])
if rgb_pixel_value[0] == 214:
    print("Yes, the number is correct!")

