I have been trying to get the minimum and maximum data value of some datasets for a particular set of height and width. Suppose I do have a numpy image of (256,256). I want to get the minimum and maximum data value of the following red box:
I tried the following steps so far:
After getting the numpy array with openCV, I did:
r,c = img.shape[0:2] #get the row and columns of the image
for i in range (row): #iterate over all the rows and we are considering all the rows
for j in range (col)[-50:] #trying to consider only the last 50th cols
.......
I am stuck at this point, like how to get the minimum and maximum data values from the particular red box pixels.