{"action":"created","issue":{"url":"https://api.github.com/repos/IntelRealSense/librealsense/issues/1656","repository_url":"https://api.github.com/repos/IntelRealSense/librealsense","labels_url":"https://api.github.com/repos/IntelRealSense/librealsense/issues/1656/labels{/name}","comments_url":"https://api.github.com/repos/IntelRealSense/librealsense/issues/1656/comments","events_url":"https://api.github.com/repos/IntelRealSense/librealsense/issues/1656/events","html_url":"https://github.com/IntelRealSense/librealsense/issues/1656","id":320089421,"node_id":"MDU6SXNzdWUzMjAwODk0MjE=","number":1656,"title":"Cannot run cv2 imshow with python example","user":{"login":"anshulvj","id":1171507,"node_id":"MDQ6VXNlcjExNzE1MDc=","avatar_url":"https://avatars1.githubusercontent.com/u/1171507?v=4","gravatar_id":"","url":"https://api.github.com/users/anshulvj","html_url":"https://github.com/anshulvj","followers_url":"https://api.github.com/users/anshulvj/followers","following_url":"https://api.github.com/users/anshulvj/following{/other_user}","gists_url":"https://api.github.com/users/anshulvj/gists{/gist_id}","starred_url":"https://api.github.com/users/anshulvj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anshulvj/subscriptions","organizations_url":"https://api.github.com/users/anshulvj/orgs","repos_url":"https://api.github.com/users/anshulvj/repos","events_url":"https://api.github.com/users/anshulvj/events{/privacy}","received_events_url":"https://api.github.com/users/anshulvj/received_events","type":"User","site_admin":false},"labels":[{"id":692642573,"node_id":"MDU6TGFiZWw2OTI2NDI1NzM=","url":"https://api.github.com/repos/IntelRealSense/librealsense/labels/D400%20Series","name":"D400 Series","color":"c5def5","default":false},{"id":737783632,"node_id":"MDU6TGFiZWw3Mzc3ODM2MzI=","url":"https://api.github.com/repos/IntelRealSense/librealsense/labels/python","name":"python","color":"fbca04","default":false},{"id":288064121,"node_id":"MDU6TGFiZWwyODgwNjQxMjE=","url":"https://api.github.com/repos/IntelRealSense/librealsense/labels/question","name":"question","color":"bfe5bf","default":true}],"state":"open","locked":false,"assignee":{"login":"lramati","id":1772278,"node_id":"MDQ6VXNlcjE3NzIyNzg=","avatar_url":"https://avatars2.githubusercontent.com/u/1772278?v=4","gravatar_id":"","url":"https://api.github.com/users/lramati","html_url":"https://github.com/lramati","followers_url":"https://api.github.com/users/lramati/followers","following_url":"https://api.github.com/users/lramati/following{/other_user}","gists_url":"https://api.github.com/users/lramati/gists{/gist_id}","starred_url":"https://api.github.com/users/lramati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lramati/subscriptions","organizations_url":"https://api.github.com/users/lramati/orgs","repos_url":"https://api.github.com/users/lramati/repos","events_url":"https://api.github.com/users/lramati/events{/privacy}","received_events_url":"https://api.github.com/users/lramati/received_events","type":"User","site_admin":false},"assignees":[{"login":"lramati","id":1772278,"node_id":"MDQ6VXNlcjE3NzIyNzg=","avatar_url":"https://avatars2.githubusercontent.com/u/1772278?v=4","gravatar_id":"","url":"https://api.github.com/users/lramati","html_url":"https://github.com/lramati","followers_url":"https://api.github.com/users/lramati/followers","following_url":"https://api.github.com/users/lramati/following{/other_user}","gists_url":"https://api.github.com/users/lramati/gists{/gist_id}","starred_url":"https://api.github.com/users/lramati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lramati/subscriptions","organizations_url":"https://api.github.com/users/lramati/orgs","repos_url":"https://api.github.com/users/lramati/repos","events_url":"https://api.github.com/users/lramati/events{/privacy}","received_events_url":"https://api.github.com/users/lramati/received_events","type":"User","site_admin":false},{"login":"RealSense-Customer-Engineering","id":34384799,"node_id":"MDQ6VXNlcjM0Mzg0Nzk5","avatar_url":"https://avatars0.githubusercontent.com/u/34384799?v=4","gravatar_id":"","url":"https://api.github.com/users/RealSense-Customer-Engineering","html_url":"https://github.com/RealSense-Customer-Engineering","followers_url":"https://api.github.com/users/RealSense-Customer-Engineering/followers","following_url":"https://api.github.com/users/RealSense-Customer-Engineering/following{/other_user}","gists_url":"https://api.github.com/users/RealSense-Customer-Engineering/gists{/gist_id}","starred_url":"https://api.github.com/users/RealSense-Customer-Engineering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RealSense-Customer-Engineering/subscriptions","organizations_url":"https://api.github.com/users/RealSense-Customer-Engineering/orgs","repos_url":"https://api.github.com/users/RealSense-Customer-Engineering/repos","events_url":"https://api.github.com/users/RealSense-Customer-Engineering/events{/privacy}","received_events_url":"https://api.github.com/users/RealSense-Customer-Engineering/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-05-03T21:38:43Z","updated_at":"2018-10-30T21:03:09Z","closed_at":null,"author_association":"NONE","body":"I'm running `python3.6` on Pycharm along with OpenCV 3.4.0 on Ubuntu 16.04 LTS\r\n`cv2.__version__`\r\n`'3.4.0'`\r\n\r\nThe example I'm running on this setup is the one given on https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/opencv_viewer_example.py\r\n\r\nThe code failes on the following lines:\r\n`depth_colormap = cv2.applyColorMap(cv2.convertScaleAbs(depth_image, alpha=0.03), cv2.COLORMAP_JET)`\r\n`cv2.namedWindow('RealSense', cv2.WINDOW_AUTOSIZE)`\r\n`cv2.imshow('RealSense', depth_colormap)`\r\n`cv2.waitKey(1)`\r\n\r\nIf the last three lines are uncommented the code fails with the following error:\r\n\r\n`QObject::moveToThread: Current thread (0x190b000) is not the object's thread (0x195cd10).`\r\n`Cannot move to target thread (0x190b000)`\r\n\r\n`Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)`\r\n\r\nIf the last three lines are commented it works fine (I am able to display the depth image using `toimage(depth_data).show()` where `depth_data` is a numpy array. So the `pyrealsense2` is working as expected. This means the problem is with OpenCV installation not working with pyrealsense. As can be seen above, I have OpenCV 3.4 running with Python 3.6 which should work according to [this post](https://stackoverflow.com/questions/46449850/how-to-fix-the-error-qobjectmovetothread-in-opencv-in-python)\r\n\r\nI installed OpenCV as described [here](https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv#linux)\r\n\r\nHas anyone else faced similar issue or is aware of the solution? Any help is appreciated.\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/IntelRealSense/librealsense/issues/comments/434468582","html_url":"https://github.com/IntelRealSense/librealsense/issues/1656#issuecomment-434468582","issue_url":"https://api.github.com/repos/IntelRealSense/librealsense/issues/1656","id":434468582,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDQ2ODU4Mg==","user":{"login":"RealSense-Customer-Engineering","id":34384799,"node_id":"MDQ6VXNlcjM0Mzg0Nzk5","avatar_url":"https://avatars0.githubusercontent.com/u/34384799?v=4","gravatar_id":"","url":"https://api.github.com/users/RealSense-Customer-Engineering","html_url":"https://github.com/RealSense-Customer-Engineering","followers_url":"https://api.github.com/users/RealSense-Customer-Engineering/followers","following_url":"https://api.github.com/users/RealSense-Customer-Engineering/following{/other_user}","gists_url":"https://api.github.com/users/RealSense-Customer-Engineering/gists{/gist_id}","starred_url":"https://api.github.com/users/RealSense-Customer-Engineering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RealSense-Customer-Engineering/subscriptions","organizations_url":"https://api.github.com/users/RealSense-Customer-Engineering/orgs","repos_url":"https://api.github.com/users/RealSense-Customer-Engineering/repos","events_url":"https://api.github.com/users/RealSense-Customer-Engineering/events{/privacy}","received_events_url":"https://api.github.com/users/RealSense-Customer-Engineering/received_events","type":"User","site_admin":false},"created_at":"2018-10-30T21:03:09Z","updated_at":"2018-10-30T21:03:09Z","author_association":"COLLABORATOR","body":"[Realsense Customer Engineering Team Comment]\nHi anshulvj,\n\nWonder if you still have issue with opencv?\n\nI tested python3.5  (coming with Ubuntu 16.04 off Intel NUC5) with opencv (sudo apt-get install python-opencv).\nAfter created a RealSense SDK 2.15 build w/ python wrapper enabled. I don't have issue when running opencv_viewer_example.py\n\n\nThanks,\nRichard"}}
{"actor":{"display_login":"RealSense-Customer-Engineering"}}