Skip to content
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ graph LR
生成车辆
开启自动驾驶
生成行人(默认开启自由移动)
切换视角
切换第三人称视角ID
切换第一人称视角ID
切换旁观者视角
开启录制
结束录制
```


Expand Down
21 changes: 21 additions & 0 deletions llm/check_opencv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import sys
import subprocess

def check_and_install_opencv():
try:
import cv2
print(f"OpenCV version: {cv2.__version__}")
print("OpenCV is already installed.")
return 0
except ImportError:
print("OpenCV (cv2) not found, installing...")
try:
subprocess.check_call([sys.executable, "-m", "pip", "install", "opencv-python"])
print("OpenCV installed successfully.")
return 0
except subprocess.CalledProcessError:
print("Error: Failed to install OpenCV")
return 1

if __name__ == "__main__":
sys.exit(check_and_install_opencv())
Loading
Loading