Read camera events

  • aksyde wrote: 2024-05-29 9:41 Hi,

    I recently start with LuckFox Pico Mini A.
    The camera stream from the buildroot image works well with HA (https://www.home-assistant.io/) out of the box.
    The team really did a great job !

    I was wondering some clues/references/advices regarding advance usage of the camera:
    1. How to properly set the date that appeared on the camera stream ? I succeed with linux command

    Code: Select all

    date -s
    but the date is automatically changed after some times
    2. How to get detection events (colored squares on the camera stream) to further used them in a python program or a shell script ?
    3. How to tune the detection within the luckfox pico, or even deactivate it ?

    Thank U

    Thank you for your support of our work. Below are the responses to your queries:

    1 The time-related issue might be due to a time synchronization problem. You can modify the /oem/usr/share/rkipc-300w.ini file after entering the root filesystem and disable the time synchronization by setting enable to 0 under [network.ntp].
    off_time_sync.jpg
    2 There are many ways to obtain detection events. A more scientific approach is to modify the rkisp source code. For example, occlusion detection is handled in rkipc_ivs_get_results in <SDK>/project/app/rkipc/rkipc/src/rv1106_ipc/video/video.c. You can try modifying this to interact with shell or Python. Based on your description, you might be referring to detecting a human presence and marking it with a bounding box, which falls under regional invasion detection. See point three for details.

    3 If you need to disable the detection, similarly adjust the /oem/usr/share/rkipc-300w.ini file by setting enable to 0 under [event.regional_invasion]. The relevant source code can be found in <SDK>/project/app/rkipc/rkipc/common/rockiva/rockiva.c. Please modify it as needed.
  • Thank U, I succeed with point 1. (set datetime) and 3. (disable box detection on stream).

    I did not recompile the source to solve point 2. but the concerne was about triggering an event (save image with detection) or even sending request to a server. I assume everything lie within

    Code: Select all

    <SDK>/project/app/rkipc/rkipc/src/rv1106_ipc/video/video.c
    . Does I have to recompile the whole Linux, or can I compile the video.c and then scp it ? I will try this soon and give any feedback if needed.

    Does the description of the file

    Code: Select all

    /oem/usr/share/rkipc-300w.ini
    exist within the wiki ? It is really interesting to understand this config file.
    Last edited by aksyde on 2024-06-02 13:18, edited 2 times in total.