Ask Your Question
0

Not able to display image/video in ubuntu using OpenCV and Python

asked 2016-08-10 08:04:47 -0600

spectssri gravatar image

cv2.imshow() is not working in Ubuntu 14.04 with OpenCV 3.0.0 and Python 2.7, facing an error saying "(dsp:3071): Gtk-WARNING **: cannot open display:"

I have tried to update libgtk2.0-dev library, but still not able to view/display the image in Ubuntu

Thanks, Sri

edit retag flag offensive close merge delete

Comments

1

Are you working remotely to this machine? If so it means your X11 pipes are configured incorrectly, which has not really something to do with OpenCV.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-08-11 03:19:27 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-10-02 06:58:21 -0600

Hello,

Solve the problem by adding a variable named "DISPLAY" with value ":0.0" in the run configurations section of eclipse for your project as shown in the screenshot.

Adding display variable for displaying image window

edit flag offensive delete link more

Comments

This worked for me.

rschwieb gravatar imagerschwieb ( 2017-04-09 13:21:48 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-08-10 08:04:47 -0600

Seen: 991 times

Last updated: Aug 10 '16