Skip to content

FAQ

Q&A

This section collects common questions from users during development and will be updated periodically. If your question is not listed, feel free to ask via the forum, QQ group, or other channels.

Q: Why does calling namedWindow or imshow sometimes fail to open a window on the Web Desktop?

A: The Web Desktop interacts with the host over the network. Occasionally, network issues may cause the window-opening request to fail. This issue was more common in AidCV versions prior to 1.0.1 and has been optimized starting from version 1.0.2. Developers need to update both the APK and AidCV to enable the optimization. In version 1.0.3, if a warning appears saying: "Open window with request failed, attempt to open window through socketio," it indicates that the APK hasn't been updated and the optimization is not in effect.

Q: Why doesn't the window close automatically when the program exits, while the terminal or file manager is closed instead?

A: This bug is triggered when the window is created with winname == "". It has been fixed in version 1.0.2.

Q: Why is the video displayed via imshow not smooth?

A: Data transmission over the network and the required encoding/decoding can cause frame rate fluctuations, depending on CPU and network performance. Also, ensure that imshow is called at stable intervals—graphics are only updated on the window after imshow is called. Irregular imshow calls will result in unstable frame rates.

Q: Why does VideoCapture sometimes fail to open a USB camera?

A: AidCV inherits OpenCV's VideoCapture class. Failures to open USB cameras are usually due to hardware or driver issues. Please refer to OpenCV logs and documentation for further troubleshooting.

Q: Why are only a few of the methods from cv2 mentioned in the documentation?

A: As explained in the SDK introduction, AidCV extends OpenCV and only provides a subset of methods along with custom logs and error codes. Unlisted methods come directly from native OpenCV, and any issues with those should be resolved using OpenCV documentation and resources.

Error Codes

HighGui

Errors triggered by functions such as namedWindow, destroyWindow, destroyAllWindows, imshow, waitKey, setMouseCallBack.

Adjust the input type based on the error message or API documentation.
Adjust the input value based on the error message or API documentation.

VideoIO

Errors triggered by the VideoCapture class.

Adjust the input type based on the error message or API documentation.
Adjust the input value based on the error message or API documentation.
Check if the AidLux app's camera permission is set to "Allow" or "Ask." If it’s in "Ask" mode, make sure to click "Allow" when prompted.
Use `isOpened` to ensure the camera is open before calling `set` to modify parameters.

AI

Errors triggered by functions such as sigmoid, softmax, colormask.

Adjust the input type based on the error message or API documentation.
Adjust the input value based on the error message or API documentation.