No Description
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.

visualize_raw_data.py 626B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import os
  2. import cv2
  3. import numpy as np
  4. import time
  5. '''
  6. original data
  7. width : 256
  8. height : 141
  9. '''
  10. file_list = os.listdir('/raw_data/bad_data')
  11. #print(data_list)
  12. for file in file_list:
  13. if file.endswith('.npy'):
  14. print(file)
  15. file_location = "/raw_data/bad_data/" + file
  16. loaded_data = np.load(file_location)
  17. number = 0
  18. for data in loaded_data:
  19. tmp = cv2.flip(data[0],0)
  20. tmp = cv2.flip(tmp,1)
  21. frame = tmp[70:-5,::]
  22. cv2.imshow('frame', frame)
  23. print(frame.shape, data[1], number)
  24. number += 1
  25. if cv2.waitKey(1) & 0xFF == ord('q'):
  26. break
  27. '''
  28. data after resize
  29. width : 256
  30. height : 66
  31. '''