Pedestrian detection

The Pedestrian detection application demonstrates how to use InfoADAS to detect pedestrians in an image buffer.

You can run this application with a camera connected to the board or run it with a file camera. On the reference image, there's a video that you can use for the file camera. When you run the application, you can put a picture in front of the camera and you should see red boxes surround any pedestrians in the video as show in the following illustration:


Figure 1. Application showing pedestrians detected.

The Pedestrian detection application (infoadas-demo-pd) takes the following parameters:

Follow the instructions below based on the type of camera that you are using for your system:

Run application using a file camera

To run the application as a file camera, complete these steps:
  1. Connect to the target board using a serial connection, terminal via a network connection (telnet or ssh), or via a terminal in the QNX Momentics IDE.
  2. Configure a file camera. For information about how to configure a file camera, see Configuration for using a file camera.
  3. Restart the target board (reset the power or run the shutdown command).
  4. Restart the IPC and load additional firmware. To do this, run the ipc command as show here:
    # slay ipc
    # ipc IPU2 /lib/firmware/dra7xx-m4-ipu2.xem4 IPU1 /lib/firmware/dra7-ipu1-fw.xem4
      DSP1 /lib/firmware/dra7-dsp1-fw.xe66 DSP2 /lib/firmware/dra7-dsp2-fw.xe66       
  5. Start the mqueue service.
    # mqueue 
  6. Run the Pedestrian detection application (infoadas-demo-pd) specifying -p as qnx_demo, the -c as pedestrian_detection, and -s to match the dimensions of the video. For example:
    # infoadas-demo-pd -p qnx_demo –r 180 -c pedestrian_detection -s 640x360
You should see a video play. Pedestrians that are detected are surrounded by a red box.

Run application using a camera connected via USB

To run the application as a file camera, complete these steps:
  1. Connect to the target board using a serial connection, terminal via a network connection (telnet or ssh), or via a terminal in the QNX Momentics IDE.
  2. Configure a USB camera. For information about how to configure a USB camera, see Configuration for using a USB camera.
  3. Restart the target board (reset the power or run the shutdown command).
  4. Restart the IPC and load additional firmware. To do this, run ipc command as shown here:
    # slay ipc
    # ipc IPU2 /lib/firmware/dra7xx-m4-ipu2.xem4 IPU1 /lib/firmware/dra7-ipu1-fw.xem4
      DSP1 /lib/firmware/dra7-dsp1-fw.xe66 DSP2 /lib/firmware/dra7-dsp2-fw.xe66
                    
  5. Start the mqueue service.
    # mqueue 
  6. Run the Pedestrian detection application (infoadas-demo-pd) specifying -p as qnx-demo, the -c as pedestrian_detection, and -s to match the dimensions of the video. For example:
    # infoadas-demo-pd -p qnx_demo -c pedestrian_detection -s 640x480
If you point the camera at people, you should see red boxes surround them to indicate that they are detected.

Run application using a camera connected by a parallel interface

To run the application with a camera connected via a parallel interface, complete these steps:
  1. Connect to the target board using a serial connection, terminal via a network connection (telnet or ssh), or via a terminal in the QNX Momentics IDE.
  2. Configure a camera connected via the parallel port. For information about how to configure a parallel interface-connected camera, see Configuration for cameras connected via a parallel interface.
  3. Restart the target board (reset the power or run the shutdown command).
  4. Restart the IPC and load additional firmware. To do this, run ipc command as shown here:
    # slay ipc
    # ipc IPU2 /lib/firmware/dra7xx-m4-ipu2.xem4 IPU1 /lib/firmware/dra7-ipu1-fw.xem4
          DSP1 /lib/firmware/dra7-dsp1-fw.xe66 DSP2 /lib/firmware/dra7-dsp2-fw.xe66
                    
  5. Start the mqueue service.
    # mqueue 
  6. Run the Pedestrian detection application (infoadas-demo-pd), specifying -p as qnx_demo, the -c as pedestrian_detection, and -s to match the dimensions of the video. You must include the -r parameter to rotate the image, otherwise it appears upside-down on the display. For example:
    # infoadas-demo-pd -p qnx_demo –r 180 -c pedestrian_detection -s
                        640x360
If you point the camera at people, you should see red boxes surround them to indicate that they are detected.

Run application one camera connected with a FPD-Link III interface

To run the application with a camera connected via a FPD-Link III interface, complete these steps:
  1. Connect to the target board using a serial connection, terminal via a network connection (telnet or ssh), or via a terminal in the QNX Momentics IDE
  2. Configure one camera connected via a FPD-Link III interface. For information about how to configure one camera camera, see Configuration for using one camera connected via an FPD-Link III interface.
  3. Restart the target board (reset the power or run the shutdown command).
  4. Restart the IPC and load additional firmware. To do this, run ipc command as shown here:
    # slay ipc
    # ipc IPU2 /lib/firmware/dra7xx-m4-ipu2.xem4 IPU1 /lib/firmware/dra7-ipu1-fw.xem4
          DSP1 /lib/firmware/dra7-dsp1-fw.xe66 DSP2 /lib/firmware/dra7-dsp2-fw.xe66
                    
  5. Start the mqueue service.
    # mqueue 
  6. On the target, run the Pedestrian detection application (infoadas-demo-pd) specifying -p as qnx_demo, the -c as pedestrian_detection, and -s to match the dimensions of the video. For example:
    # infoadas-demo-pd -p qnx_demo -c pedestrian_detection -s 640x360
If you point the camera at people, you should see red boxes surround them to indicate that they are detected.

Build the Pedestrian detection application

Your can download the source code from the QNX website. It's available in a separate package. The instructions to build and deploy the application are available in the Installation Notes for the package.