OpenCV imshow shows very grainy image. How to fix this?

76 views Asked by At

I have a CT image that look like this when I plot it using dicom: Image in pydicom

But when I try to use opencv, it appears like this:

Image in OpenCV

Array is dtype=uint16. My code to visualize in OpenCV:

img = np.array(ct_img * 255, dtype = np.uint16)
cv2.imshow('Annotated',img)
cv2.waitKey(0)

Please help fix the image. Image quality gets worse when I convert to np.uint32 or np.unint8

1

There are 1 answers

2
AudioBubble On

exposure.equalize_adapthist() solved the issue.