Firefly C40PL, an Open-Source AI Smart Camera, is equipped with the powerful AI visual processor RV1126. Compared to ordinary network bullet cameras, its robust VPU video encoding/decoding, NPU inference, and ISP video processing capabilities enable C40PL to be used in a wider range of applications scenarios. These include license plate recognition, facial recognition, people counting, and more.
This solution will introduce the application of C40PL for license plate recognition.
What do you need?
Software: git clone https://gitlab.com/firefly-linux/app/xinhuo_car.git
Hardware: C40PL, computer
Environment Setup
1. Power on the device
C40PL comes with only one external Ethernet cable and supports POE (Power over Ethernet).Please use a POE switch/router for power supply or use the provided POE power adapter.
2. Network connection
The computer needs to be connected to the same local network as C40PL.
3. Find the device IP address
Refer to the wiki tutorial and use RK_IPCamera_Tool-Vx.x.zip to obtain the IP address of the device.
4. Software Deployment
The device supports network adb. You can use adb on your computer to control the device and transfer files to it.
adb connect [ip]
adb push xinhuo_car /userdata/
5. Run the application
adb shell
cd /oem
./Rklaunch-stop.sh
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/userdata/xinhuo_car/lib/
./sample_car -a /oem/etc/iqfiles/ -u http://168.168.109.22:5000/license_plate
#这里的 -u 是自己 http 服务器的地址
Demonstration
With RTSP, you can view the RTSP stream by using VLC or any other RTSP media player. Playback URL: rtsp://168.168.106.154:8554/H264_stream_0
Please make sure to replace the IP address in the URL with the corresponding IP address of your own system configuration.
FAQ
1. Algorithm Initialization Failure
If there is an algorithm initialization failure, it indicates that the algorithm requires an authorization. To use the algorithm, please contact us to obtain an authorization code. Alternatively, you can use your own algorithm or other third-party algorithms.
2. What is the small window in the demonstration?
The small window displayed in the demonstration shows a specific feature of the application. It implements RTSP overlay and sends the license plate recognition information to a server specified with the "-u". On the computer side, we capture the recognition information and display it in the window for a more intuitive visual representation of the results.
To receive the recognition results, you can set up a server on your PC using the following Python code:
import flask
server=flask.Flask(__name__)
@server.route('/license_plate',methods=['get','post'])
def loadfile():
count = flask.request.values.get('count')
num = flask.request.values.get('num')
color = flask.request.values.get('color')
print("count=" + count + ";" + "num=" + num + ";" + "color=" + color)
# port可以指定端口,默认端口是5000
# host默认是服务器,默认是127.0.0.1
# debug=True 修改时不关闭服务
if __name__ == '__main__':
server.run(debug=True,host="168.168.109.22",port="5000"
For more information, please contact sales@t-firefly.com