leafqycc / rknn-cpp-Multithreading

A simple demo of yolov5s running on rk3588/3588s using c++ (about 142 frames). / 一个使用c++在rk3588/3588s上运行的yolov5s简单demo(142帧/s)。
Apache License 2.0
476 stars 88 forks source link

Fix: Handle 2-digit video device index correctly #54

Open as-jackson opened 2 months ago

as-jackson commented 2 months ago

When the input for video device is a 2-digit number, the program failed to open the correct video capture device. This commit fixes the issue by properly handling 1-digit and 2-digit device indices using atoi() to convert them to integers, and ensures the video file path is used correctly when the input is not a number.

Tested with both video device indices and file paths to ensure proper functionality.

Testing the ArmSoM-Sige7 device