Open Gfernandezv opened 11 months ago
I checked the image_reader.py script and it appears that there is a problem with the CV2 loader with jpeg files. I say this because I tried with a .tif file and had no problem.
Hi @Gfernandezv,
Thanks for reporting this. I am sorry I have over full schedule this week and Julebord(Christmas dinner) at work on Saturday. Great you found the bug. Since you managed to find the bug, would you like to correct it and make a pull request? Many thanks :-) If not, I will take time to have a look on Sunday.
Hi, I just saved a project, but every time I try to open it, the image layer doesn’t appear. The command window displays the following error:
(512, 1024, 512) (71, 246, 653) bregma Traceback (most recent call last): File "D:\Users\labpf_asus_laptop\anaconda3\envs\HERBS\lib\site-packages\herbs\herbsgui.py", line 7516, in load_project_called self.load_project(p_dict) File "D:\Users\labpf_asus_laptop\anaconda3\envs\HERBS\lib\site-packages\herbs\herbsgui.py", line 7283, in load_project self.load_single_image_file( File "D:\Users\labpf_asus_laptop\anaconda3\envs\HERBS\lib\site-packages\herbs\herbsgui.py", line 6159, in load_single_image_file image_file = ImageReader(image_file_path) File "D:\Users\labpf_asus_laptop\anaconda3\envs\HERBS\lib\site-packages\herbs\image_reader.py", line 39, in init img_data = cv2.cvtColor(img_data, cv2.COLOR_BGR2RGB) cv2.error: OpenCV(4.8.1) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
thanks =)