Skip to content

AidCV Development Documentation

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

LinuxAidLux OS
C++🚧🚧
Python

✅: Supported
🚧: Planned

Installation

bash
# AidCV SDK is pre-installed in the Linux system environment 

# Install
sudo aid-pkg install aidcv-sdk

# Uninstall
sudo aid-pkg remove aidcv-sdk
bash
# AidCV SDK is pre-installed in the container image  

# 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

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")