-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Display support opencv headless #94961
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display support opencv headless #94961
Conversation
hakehuang
commented
Aug 25, 2025
- for test machine without GUI, we need support open-cv-headless mode.
- Enable mimxrt1170_evk@A
- parse environment variable, which is missed in former PR.
|
test log |
96a9f34 to
68c8642
Compare
|
@JarmouniA @danieldegrasse @jfischer-no @nashif Please help to review, this enhance the test for headless(No Graphic) condition, also fix a missing in test path parser. Thanks |
|
Cc @Finomnis |
Not sure if I can help, didn't work with this part of Zephyr yet |
Sorry, I thought the PR was about |
@hakehuang I think the commit message could be improved. I suggest writing about the motivation and why, rather than listing what has actually changed in bullet form. |
68c8642 to
ae888ba
Compare
@jfischer-no I update the commit message, but not sure is it clear enough. |
9f5d197 to
804953a
Compare
|
@JarmouniA @danieldegrasse @jfischer-no @nashif Please help to review |
for test machine without display, need support open-cv-headless mode. 1. support headless mode 2. add parser for environment path Signed-off-by: Hake Huang <[email protected]>
enable mimxrt1170_evk@A add timeout, as for big screen, the fist step takes a long time Signed-off-by: Hake Huang <[email protected]>
a00ea65 to
a5409fa
Compare
|
@josuah please help to take a look, thanks. |
|
Hello! I tried again in a debootstrap environment where display is not available ( This is a known issue when trying to load the Qt libraries when X11 does not work. However, with this small patch, it did not have any issue: diff --git a/scripts/pylib/display-twister-harness/camera_shield/main.py b/scripts/pylib/display-twister-harness/camera_shield/main.py
index b0afd6ec2c6..6bf96ccb4a8 100644
--- a/scripts/pylib/display-twister-harness/camera_shield/main.py
+++ b/scripts/pylib/display-twister-harness/camera_shield/main.py
@@ -94,8 +94,9 @@ class Application:
# Maintain OpenCV event loop
try:
- if cv2.waitKey(1) == 27: # ESC key
- break
+ break
+ #if cv2.waitKey(1) == 27: # ESC key
+ # break
except Exception as e:
error_msg = str(e).lower()
if any(And I could get these results: The problem is that |
@josuah, skip calling the GUI related function can avoid such issue, but the recommend way is to replace is to do below if you server does not have display please do below
|
|
|
How about adding a flag to control whether a GUI is present or not? For instance:
Or do you prefer to always to auto-detection of the GUI? Thank you for the improvement! |
josuah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I must have missed the pip install opencv-python-headless line. Sorry about that. It all works on first try now!
Should be added in the doc. |
sure, update the document 109cc06 @JarmouniA , @josuah |
|
The documentation is not being built, so CI does not trigger any warning. You may see that it is mixing Markdown and RST syntax, and I guess us all developers are too used to Markdown to realize it is invalid syntax in RST: Maybe it can be improved in a different PR as this is not related to documentation. Thanks! |
22488fe to
86b5956
Compare
@JarmouniA. I update the document and check with |
add Installation Guide section Signed-off-by: Hake Huang <[email protected]>
86b5956 to
bb22e13
Compare
|
| - clone code | ||
|
|
||
| :: | ||
|
|
||
| git clone https://github.com/hakehuang/camera_shield |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks wrong? also, this sould be included in the Zephyr documentation proper, not as a separate README that is virtually invisible to anyone browsing the online docs. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kartben , I move the whole https://github.com/hakehuang/camera_shield into the zephyr already, should I remove this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kartben , I move the whole hakehuang/camera_shield into the zephyr already, should I remove this file?
not remove it, we want proper docs for this :)
see #98398


