1
I have a problem and I need your help.
I have a series of thermographic images, which I need to detect the hot spot (shown in the bar to the right of the image) in the area where the analysis is being made. In the case of these example images, the hot spot is in the focus of the aim, however, the goal is to imagine that I do not know where this point is and that the algorithm itself finds it, based on the right bar. I leave below one of these images as an example:
In this example, the sidebar indicates a temperature range between 33.2 and 97.7 °C. I would like to identify in the image where is the point of 97.7 °C. Initially I created a code where I read the BGR value in the highest point of the bar and I look for this combination in the rest of the image, this did not return me anything. Unconvinced, I created a code that identifies the RGB code throughout the bar and looks in the image, which also returned nothing, the code follows below:
# Find one of temperature bar colors in the image
import cv2
image_path = r"C:\Users\bruno\PycharmProjects\TCC\Imagens\IR_1544.jpg"
img = cv2.imread(image_path)
crop1 = img[69:171, 309:310]
for i in range(70, 172):
crop = img[i-1:i, 309:310]
num1, num2, num3 = cv2.split(crop)
for i in range(0, crop.shape[0]):
for j in range(0, crop.shape[1]):
if img[i][j][0] == num1:
if img[i][j][1] == num2:
if img[i][j][2] == num3:
print("I found")
cv2.imshow("img1", img)
cv2.imshow("img2", crop1)
cv2.waitKey(0)
cv2.destroyAllWindows()
I wonder if there’s another way I can identify these colors in the image. I thank all who can help!!
Have the image without this information from FLIR software?
– danieltakeshi
I do not possess, at first the images I will have to process will always have this information :(
– Bruno Marques