First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

why the image is not showing even after coded correctly without any error???

image description

why the image is not showing even after coded correctly without any error???

why the image is not showing even after coded correctly without any error???

why the image is not showing even after coded correctly without any error???

image descriptionimport cv2

def main():

imgpath="C:\\Users\\vivekz\\Desktop\\ip\\database\\standard_test_images\\lena_gray_512.tif"

img=cv2.imread(imgpath,cv2.IMREAD_GRAYSCALE)
cv2.namedWindow('lena',cv2.WINDOW_NORMAL)
cv2.imshow('lena',img)
cv2.waitKey(0)
cv2.destroyAllWindows

if __name__=="__main__":


    main()
click to hide/show revision 5
retagged

why the image is not showing even after coded correctly without any error???

import cv2

def main():

imgpath="C:\\Users\\vivekz\\Desktop\\ip\\database\\standard_test_images\\lena_gray_512.tif"

img=cv2.imread(imgpath,cv2.IMREAD_GRAYSCALE)
cv2.namedWindow('lena',cv2.WINDOW_NORMAL)
cv2.imshow('lena',img)
cv2.waitKey(0)
cv2.destroyAllWindows

if __name__=="__main__":


    main()