Skip to content
Snippets Groups Projects
Commit 15e157bd authored by Nattapon Jaroenchai's avatar Nattapon Jaroenchai
Browse files

Update test_h5image.py

parent 712b9450
No related branches found
No related tags found
1 merge request!1updated main for release
from h5Image import H5Image
import cv2
h5_image = H5Image("/projects/bbym/shared/data/commonPatchData/256/OK_250K.hdf5", mode='r', patch_border=0)
......@@ -6,4 +7,8 @@ h5_image = H5Image("/projects/bbym/shared/data/commonPatchData/256/OK_250K.hdf5"
map_name = h5_image.get_maps()[0]
map_array = h5_image.get_map(map_name)
print("map_array.shape", map_array.shape)
\ No newline at end of file
print("map_array.shape", map_array.shape)
# Convert the map array to a grayscale image
gray = cv2.cvtColor(map_array, cv2.COLOR_BGR2GRAY) # greyscale image
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment