When I enter the following code:
mask_path_wsi = wsi_json_path + 'mask/' + wsi_basename + '.png'
thumb_path_wsi = wsi_json_path + 'thumb/' + wsi_basename + '.png'
thumb = cv2.cvtColor(cv2.imread(thumb_path_wsi), cv2.COLOR_BGR2RGB)
mask = cv2.cvtColor(cv2.imread(mask_path_wsi), cv2.COLOR_BGR2RGB)
the result outputs this:
error Traceback (most recent call last)
in
5 thumb_path_wsi = wsi_json_path + 'thumb/' + wsi_basename + '.png'
6
----> 7 thumb = cv2.cvtColor(cv2.imread(thumb_path_wsi), cv2.COLOR_BGR2RGB)
8 mask = cv2.cvtColor(cv2.imread(mask_path_wsi), cv2.COLOR_BGR2RGB)
9
error: OpenCV(4.3.0) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'
Should I input the thumbnail image and mask of the whole slide image (WSI)? In which part of your project's code are the thumbnail and mask implemented? I would greatly appreciate your help.