Forums - Can not be displayed by imshow of OpenCV.

1 post / 0 new
Can not be displayed by imshow of OpenCV.
souhei.suzuki
Join Date: 21 Jun 23
Posts: 1
Posted: Mon, 2023-07-31 23:17

I want to display an image using OpenCV imshow, but it cannot be displayed properly due to an error.

Could you please tell me how to resolve the error?

The environment is
BSP version:jenkins-QRB5165_OpenQ_1.x_Public-87_v1.3.1
Linux Kernel Version: 4.19.125 
OS Distribution: Ubuntu 18.04.5

procedure:
 Install opencv
apt update
apt install libopencv-dev python3-opencv

 Start weston

export XDG_RUNTIME_DIR=/usr/bin/weston_socket
weston --tty=1 --idle-time=9999 &

 Execute the following code
 opencv_test.py

import cv2
 
img = cv2.imread("image.jpg")
cv2.imshow("Image", img)
 
cv2.waitKey()
python3 opencv_test.py 
 Execution result
[05:33:31.612] libwayland: message too short, object (101), message resize(ouu)
Gdk-Message: 05:33:31.616: Error flushing display: Broken pipe

 

  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.