Hi, I am using IMX93-EVK and implemented a sample live image capturing program using opencv .with the help of IMX-MIPI-HDMI, I connected to Monitor. while powering the board the monitor display "Wayland Terminal". and i the terminal i executed the sample program.but getting errors. I am posting my simple program and the error i am facing.
I am using the Latest Linux image:Linux 6.6.3_1.0.0
Program:
import cv2
# Create a VideoCapture object
cap = cv2.VideoCapture(0)
# Check if the camera opened successfully
if not cap.isOpened():
print("Error: Could not open camera.")
exit()
# Loop to continuously capture frames from the camera
while True:
# Capture frame-by-frame
ret, frame = cap.read()
# Check if frame is successfully captured
if not ret:
print("Error: Failed to capture frame.")
break
# Display the captured frame
cv2.imshow('Live Camera', frame)
# Check for the 'q' key press to exit the loop
if cv2.waitKey(1) & 0xFF == ord('q'
break
# Release the VideoCapture object and close all OpenCV windows
cap.release()
cv2.destroyAllWindows()
Error:
Traceback (most recent call last):
File "/home/root/ml-object-detection-examples-for-imx93-main/detectnet_v2/simple.py", line 22, in <module>
cv2.imshow('Live Camera', frame)
cv2.error: OpenCV(4.9.0) /io/opencv/modules/highgui/src/window.cpp:1272: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'
Note: How to access GUI in imx93 board,and how to display the images.