- Mastering OpenCV 4
- Roy Shilkrot David Millán Escrivá
- 166字
- 2021-07-02 14:47:38
Hiding the mouse cursor
You might notice the mouse cursor is shown on top of your window even though you don't want to use a mouse in your embedded system. To hide the mouse cursor, you can use the xdotool command to move it to the bottom-right corner pixel, so it's not noticeable, but is still available if you want to occasionally plug in your mouse to debug the device. Install xdotool and create a short Linux script to run it with Cartoonifier:
sudo apt-get install -y xdotool
cd ~/Cartoonifier/build
After installing xdotool, now is the time to create the script, create a new file with your favorite editor with the name runCartoonifier.sh and the following content:
#!/bin/sh
# Move the mouse cursor to the screen's bottom-right pixel.
xdotoolmousemove 3000 3000
# Run Cartoonifier with any arguments given.
/home/pi/Cartoonifier/build/Cartoonifier "$@"
Finally, make your script executable:
chmod +x runCartoonifier.sh
Try running your script to make sure it works:
DISPLAY=:0 ./runCartoonifier.sh
推薦閱讀
- Beginning C++ Game Programming
- Docker技術入門與實戰(第3版)
- Microsoft Application Virtualization Cookbook
- 深度學習經典案例解析:基于MATLAB
- Ext JS Data-driven Application Design
- UML 基礎與 Rose 建模案例(第3版)
- Java程序設計入門
- 零基礎Java學習筆記
- Java Fundamentals
- Rust游戲開發實戰
- Python Interviews
- Java程序設計實用教程(第2版)
- Python應用開發技術
- Clojure Web Development Essentials
- 數據結構與算法詳解