Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

44 righe
1.1 KiB

  1. import cv2
  2. # import flirimageextractor
  3. # flir = flirimageextractor.FlirImageExtractor()
  4. # flir.process_image('source_images_full/20200621_125936_R.jpg',RGB=True)
  5. # c = flir.get_metadata('source_images_full/20200621_125936_R.jpg')
  6. # img = flir.extract_embedded_image()
  7. import flirimageextractor
  8. from matplotlib import cm
  9. import numpy as np
  10. # flir = flirimageextractor.FlirImageExtractor()
  11. # flir.process_image('source_images_full/20200621_125936_R.jpg')
  12. # flir.save_images()
  13. # flir.plot()
  14. flir = flirimageextractor.FlirImageExtractor()
  15. flir.process_image('source_images_full/20200621_125936_R.jpg')
  16. # img = flir.save_images() #min=0,max=64,
  17. # print(dir(img))
  18. # print(img)
  19. thermal_img_np = flir.thermal_image_np
  20. h,w = thermal_img_np.shape
  21. # print(flir.flir_img_bytes())
  22. print(thermal_img_np)
  23. print(type(thermal_img_np[0][0]))
  24. print(h)
  25. print(w)
  26. # cv2.imdecode(thermal_img_np)
  27. multiplied_image = cv2.multiply(thermal_img_np, 1000)
  28. cv2.imwrite('color_img.png', multiplied_image.astype(np.uint16))
  29. # img.astype('uint8')
  30. # image = cv2.imdecode(thermal_img_np,4)
  31. # print('Image Dimensions :', image.shape)