mirror of
https://github.com/opencv/opencv.git
synced 2024-12-14 00:39:13 +08:00
efa4d9176a
Highgui backend on top of Framebuffer #25661 ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [ x] I agree to contribute to the project under Apache 2 License. - [ x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [ x] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ x] The feature is well documented and sample code can be built with the project CMake Environment variables used: OPENCV_UI_BACKEND - you need to add the value “FB” OPENCV_UI_PRIORITY_FB - requires priority indication OPENCV_HIGHGUI_FB_MODE={FB|XVFB|EMU} - mode of using Framebuffer (default "FB") - FB - Linux Framebuffer - XVFB - virtual Framebuffer - EMU - emulation (images are not displayed) OPENCV_HIGHGUI_FB_DEVICE (FRAMEBUFFER) - path to the Framebuffer file (default "/dev/fb0"). Examples of using: sudo OPENCV_UI_BACKEND=FB ./opencv_test_highgui sudo OPENCV_UI_PRIORITY_FB=1111 ./opencv_test_highgui OPENCV_UI_BACKEND=FB OPENCV_HIGHGUI_FB_MODE=EMU ./opencv_test_highgui sudo OPENCV_UI_BACKEND=FB OPENCV_HIGHGUI_FB_MODE=FB ./opencv_test_highgui export DISPLAY=:99 Xvfb $DISPLAY -screen 0 1024x768x24 -fbdir /tmp/ -f /tmp/user.xvfb.auth& sudo -u sipeed XAUTHORITY=/tmp/user.xvfb.auth x11vnc -display $DISPLAY -listen localhost& DISPLAY=:0 gvncviewer localhost& FRAMEBUFFER=/tmp/Xvfb_screen0 OPENCV_UI_BACKEND=FB OPENCV_HIGHGUI_FB_MODE=XVFB ./opencv_test_highgui
15 lines
440 B
CMake
15 lines
440 B
CMake
# --- FB ---
|
|
set(HAVE_FRAMEBUFFER ON)
|
|
if(WITH_FRAMEBUFFER_XVFB)
|
|
try_compile(HAVE_FRAMEBUFFER_XVFB
|
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
|
"${OpenCV_SOURCE_DIR}/cmake/checks/framebuffer.cpp")
|
|
if(HAVE_FRAMEBUFFER_XVFB)
|
|
message(STATUS "Check virtual framebuffer - done")
|
|
else()
|
|
message(STATUS
|
|
"Check virtual framebuffer - failed\n"
|
|
"Please install the xorg-x11-proto-devel or x11proto-dev package\n")
|
|
endif()
|
|
endif()
|