Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
cv_qrcode module

QR code reader using ZBAR library

A telemetry message with the code content is sent when a QR code is detected when qrscan is called.

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

1 <module name="video_thread"/>
2 <module name="cv_qrcode">
3  <define name="QRCODE_CAMERA" value="front_camera|bottom_camera" />
4  <define name="QRCODE_DRAW_RECTANGLE" value="TRUE|FALSE" />
5 </module>

Module configuration options

Define Options

  • name: QRCODE_CAMERA value: front_camera|bottom_camera
    Description: The V4L2 camera device that is used for searching a QR code
  • name: QRCODE_DRAW_RECTANGLE value: TRUE|FALSE
    Description: Whether or not to draw a rectangle around a found QR code

Dependencies

Module functions

Init Functions

These initialization functions are called once on startup.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

  • modules/computer_vision/qrcode/qr_code.c
  • /zbar/qrcode/bch15_5.c
  • /zbar/qrcode/binarize.c
  • /zbar/qrcode/isaac.c
  • /zbar/qrcode/qrdec.c
  • /zbar/qrcode/qrdectxt.c
  • /zbar/qrcode/rs.c
  • /zbar/qrcode/util.c
  • /zbar/decoder/qr_finder.c
  • /zbar/decoder/ean.c
  • /zbar/error.c
  • /zbar/image.c
  • /zbar/scanner.c
  • /zbar/symbol.c
  • /zbar/refcnt.c
  • /zbar/decoder.c
  • /zbar/img_scanner.c

Raw cv_qrcode.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="qrcode" dir="computer_vision/qrcode">
<doc>
<description>
QR code reader using ZBAR library
A telemetry message with the code content is sent when a QR code is detected when qrscan is called.
</description>
<define name="QRCODE_CAMERA" value="front_camera|bottom_camera" description="The V4L2 camera device that is used for searching a QR code"/>
<define name="QRCODE_DRAW_RECTANGLE" value="TRUE|FALSE" description="Whether or not to draw a rectangle around a found QR code"/>
</doc>
<depends>video_thread</depends>
<header>
<file name="qr_code.h"/>
</header>
<init fun="qrcode_init()"/>
<makefile target="ap">
<file name="qr_code.c"/>
<!-- zbar -->
<configure name="EXTSW" value="$(PAPARAZZI_SRC)/sw/ext" />
<configure name="LIBZBAR" value="$(EXTSW)/libzbar/zbar-0.10" />
<file name="bch15_5.c" dir="$(LIBZBAR)/zbar/qrcode"/>
<file name="binarize.c" dir="$(LIBZBAR)/zbar/qrcode"/>
<file name="isaac.c" dir="$(LIBZBAR)/zbar/qrcode"/>
<file name="qrdec.c" dir="$(LIBZBAR)/zbar/qrcode"/>
<file name="qrdectxt.c" dir="$(LIBZBAR)/zbar/qrcode"/>
<file name="rs.c" dir="$(LIBZBAR)/zbar/qrcode"/>
<file name="util.c" dir="$(LIBZBAR)/zbar/qrcode"/>
<file name="qr_finder.c" dir="$(LIBZBAR)/zbar/decoder"/>
<file name="ean.c" dir="$(LIBZBAR)/zbar/decoder"/>
<file name="error.c" dir="$(LIBZBAR)/zbar"/>
<file name="image.c" dir="$(LIBZBAR)/zbar"/>
<file name="scanner.c" dir="$(LIBZBAR)/zbar"/>
<file name="symbol.c" dir="$(LIBZBAR)/zbar"/>
<file name="refcnt.c" dir="$(LIBZBAR)/zbar"/>
<file name="decoder.c" dir="$(LIBZBAR)/zbar"/>
<file name="img_scanner.c" dir="$(LIBZBAR)/zbar"/>
<!-- libexif flags -->
<include name="$(LIBZBAR)/zbar"/>
<include name="$(LIBZBAR)/include"/>
<!--define name="DEBUG_QR_FINDER" value="1"/-->
<flag name="CFLAGS" value="Wno-cast-qual"/>
<flag name="CFLAGS" value="Wno-parentheses"/>
<flag name="CFLAGS" value="Wno-pointer-arith"/>
<flag name="CFLAGS" value="Wno-missing-prototypes"/>
<flag name="CFLAGS" value="Wno-shadow"/>
<flag name="CFLAGS" value="Wno-missing-declarations"/>
</makefile>
</module>