AidCV
Introduction
AidCV is a component developed by APLUX for accelerating image processing. It also provides a development experience consistent with OpenCV in the AidLux OS web desktop environment.
In the web desktop environment of AidLux OS, since it is based on web rendering, it cannot directly use rendering functions from OpenCV. Developers can use AidCV to perform rendering tasks (with the same interface as OpenCV), allowing OpenCV-based code to run seamlessly in AidLux.
Additionally, AidCV also provides extended usage for MIPI cameras and AI applications.
Support Matrix
Linux | AidLux OS | |
---|---|---|
C++ | 🚧 | 🚧 |
Python | ✅ | ✅ |
✅: Supported
🚧: Planned
Quick Start
Installation
bash
# 阿加犀提供的 AidLux OS 开发板:AidCV SDK 已预装在 Linux 系统环境中
# 开发者也可以通过以下命令安装和卸载
# Install
sudo aid-pkg install aidcv-sdk
# Uninstall
sudo aid-pkg remove aidcv-sdk
bash
# 阿加犀提供的 Linux Container 开发板:AidCV SDK 已预装于容器镜像中
# 开发者也可以通过以下命令安装和卸载
# Install
sudo aid-pkg install aidcv-sdk
# Uninstall
sudo aid-pkg remove aidcv-sdk
- Third-party dev board:Please contact APLUX to obtain related software and installation instructions
Import Package
python
try: # aidcv-sdk>=1.0.4
import aidcv as cv2
except:
import cv2
API Documentation
Example
An example covering most of the extended interfaces provided by AidCV
python
try: # aidcv-sdk>=1.0.4
import aidcv as cv2
except:
import cv2
def my_mouse_callback(event, x, y, flags, params):
print(event, x, y, flags, params)
cv2.namedWindow("test", port = 9988)
cv2.setMouseCallback("test", my_mouse_callback, "test_params")
cap = cv2.VideoCapture("/dev/video2")
cap.set(3, 640)
cap.set(4, 480)
for i in range(1000):
ret, frame = cap.read()
if not ret:
continue
cv2.imshow("test", frame)
ret = cv2.waitKey(0)
cv2.destroyWindow("test")