Ask Your Question

shubham_geo's profile - activity

2017-01-20 01:05:11 -0600 asked a question gdal and opencv with python 3.5

I want to open graysclae geotiff image in opencv with gdal and use functions in opencv such as otsu thresholding ,mean shift filtering e.t.c.But when I open the grayscale geotiff image,cv2.imread reads the image but when I display the image it gives a totally black image :

image = cv2.imread('abc.tif')
shifted = cv2.pyrMeanShiftFiltering(image, 30,40)
cv2.imshow("Input", shifted)

The above code shows a completely black image. Therefore,is it possible to display a geotiff image correctly. Kindly help.