I am trying to deconstruct a TIFF image to XY coordinates in Python. The first column in dataframe should be X and second column as Y. A sample file is attached. Would it be done the same way as a JPEG? So far, I have tried the code below.
Sample Tiff Image: https://file-examples.com/index.php/sample-images-download/sample-tiff-download/
Sample Code (can't figure out what I'm missing to get coordinates):
from PIL import Image
import numpy as np
import pandas as pd
image= Image.open(r"file_example_TIFF_1MB.tiff")
mypixels= colourImg.convert("RGB")
colors = np.array(mypixels.getdata()).reshape(image.size + (3,))