You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

thermal-image-extractor.py 1.1 KiB

3 vuotta sitten
12345678910111213141516171819202122232425262728293031323334353637383940414243
  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)