Closed drombas closed 1 year ago
Hey,
I've realised the reason I hadn't noticed the bug was because cv2 assumes BGR channel order, instead of the more conventional RGB. So when you save the fundus as an image to disk it looks ok.
So along with this change we need to add
# change channel order from RGB to BGR and save with cv2
image = cv2.cvtColor(self.image, cv2.COLOR_RGB2BGR)
cv2.imwrite(filepath, image)
to here
Thanks @marksgraham. Just to check: fundus images from other file formats were in RGB and were saved correctly by cv2 before?
Hi @drombas
I've just updated fds to store as RGB, thanks for the reminder. .e2e fundus is grayscale in the examples I have. The other reader that extracts fundus is zeissdicom, but I don't have any data with fundus I can use to check.
Closes #104
Sets fundus R and B channels to the right order.