Matplotlib imshow low quality compared to OpenCV -
i doing computer vision python using both opencv , matplotlib. want switch matplotlib viewing images found image quality low compared opencv imshow
images not shown right size on screen same size.
this how use
img = cv2.imread('a.png',0) f = plt.figure(figsize=(img.shape[1],img.shape[0]), dpi=1) plt.axes([0,0,1,1]) plt.axis('false') plt.imshow(img,cmap="gray",interpolation=none)
i tried different values interpolation still quality low compared opencv there show image better quality?
also when printing same low quality not opencv write method.
you making figure size large. img.shape returns number of rows , columns in img figsize uses inches.
also, want figure have different resolution dpi = 1. dots per inch should more 80 , may need higher depending on how you'll display image.
Comments
Post a Comment