ZBar bar code reader . http://zbar.sourceforge.net/ ZBar is licensed under the GNU LGPL 2.1 to enable development of both open source and commercial projects.

Dependents:   GR-PEACH_Camera_in_barcode levkov_ov7670

LICENSE

The ZBar Bar Code Reader is Copyright (C) 2007-2009 Jeff Brown <spadix@users.sourceforge.net> The QR Code reader is Copyright (C) 1999-2009 Timothy B. Terriberry <tterribe@xiph.org>

You can redistribute this library and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

ISAAC is based on the public domain implementation by Robert J. Jenkins Jr., and is itself public domain.

Portions of the bit stream reader are copyright (C) The Xiph.Org Foundation 1994-2008, and are licensed under a BSD-style license.

The Reed-Solomon decoder is derived from an implementation (C) 1991-1995 Henry Minsky (hqm@ua.com, hqm@ai.mit.edu), and is licensed under the LGPL with permission.

Committer:
RyoheiHagimoto
Date:
Tue Apr 19 02:19:39 2016 +0000
Revision:
1:500d42699c34
Parent:
0:56c5742b9e2b
Add copying.txt and license.txt

Who changed what in which revision?

UserRevisionLine numberNew contents of line
RyoheiHagimoto 0:56c5742b9e2b 1 /*Copyright (C) 2008-2009 Timothy B. Terriberry (tterribe@xiph.org)
RyoheiHagimoto 0:56c5742b9e2b 2 You can redistribute this library and/or modify it under the terms of the
RyoheiHagimoto 0:56c5742b9e2b 3 GNU Lesser General Public License as published by the Free Software
RyoheiHagimoto 0:56c5742b9e2b 4 Foundation; either version 2.1 of the License, or (at your option) any later
RyoheiHagimoto 0:56c5742b9e2b 5 version.*/
RyoheiHagimoto 0:56c5742b9e2b 6 #ifndef _QRCODE_H_
RyoheiHagimoto 0:56c5742b9e2b 7 #define _QRCODE_H_
RyoheiHagimoto 0:56c5742b9e2b 8
RyoheiHagimoto 0:56c5742b9e2b 9 #include <zbar.h>
RyoheiHagimoto 0:56c5742b9e2b 10
RyoheiHagimoto 0:56c5742b9e2b 11 typedef struct qr_reader qr_reader;
RyoheiHagimoto 0:56c5742b9e2b 12
RyoheiHagimoto 0:56c5742b9e2b 13 typedef int qr_point[2];
RyoheiHagimoto 0:56c5742b9e2b 14 typedef struct qr_finder_line qr_finder_line;
RyoheiHagimoto 0:56c5742b9e2b 15
RyoheiHagimoto 0:56c5742b9e2b 16 /*The number of bits of subpel precision to store image coordinates in.
RyoheiHagimoto 0:56c5742b9e2b 17 This helps when estimating positions in low-resolution images, which may have
RyoheiHagimoto 0:56c5742b9e2b 18 a module pitch only a pixel or two wide, making rounding errors matter a
RyoheiHagimoto 0:56c5742b9e2b 19 great deal.*/
RyoheiHagimoto 0:56c5742b9e2b 20 #define QR_FINDER_SUBPREC (2)
RyoheiHagimoto 0:56c5742b9e2b 21
RyoheiHagimoto 0:56c5742b9e2b 22 /*A line crossing a finder pattern.
RyoheiHagimoto 0:56c5742b9e2b 23 Whether the line is horizontal or vertical is determined by context.
RyoheiHagimoto 0:56c5742b9e2b 24 The offsts to various parts of the finder pattern are as follows:
RyoheiHagimoto 0:56c5742b9e2b 25 |*****| |*****|*****|*****| |*****|
RyoheiHagimoto 0:56c5742b9e2b 26 |*****| |*****|*****|*****| |*****|
RyoheiHagimoto 0:56c5742b9e2b 27 ^ ^ ^ ^
RyoheiHagimoto 0:56c5742b9e2b 28 | | | |
RyoheiHagimoto 0:56c5742b9e2b 29 | | | pos[v]+len+eoffs
RyoheiHagimoto 0:56c5742b9e2b 30 | | pos[v]+len
RyoheiHagimoto 0:56c5742b9e2b 31 | pos[v]
RyoheiHagimoto 0:56c5742b9e2b 32 pos[v]-boffs
RyoheiHagimoto 0:56c5742b9e2b 33 Here v is 0 for horizontal and 1 for vertical lines.*/
RyoheiHagimoto 0:56c5742b9e2b 34 struct qr_finder_line {
RyoheiHagimoto 0:56c5742b9e2b 35 /*The location of the upper/left endpoint of the line.
RyoheiHagimoto 0:56c5742b9e2b 36 The left/upper edge of the center section is used, since other lines must
RyoheiHagimoto 0:56c5742b9e2b 37 cross in this region.*/
RyoheiHagimoto 0:56c5742b9e2b 38 qr_point pos;
RyoheiHagimoto 0:56c5742b9e2b 39 /*The length of the center section.
RyoheiHagimoto 0:56c5742b9e2b 40 This extends to the right/bottom of the center section, since other lines
RyoheiHagimoto 0:56c5742b9e2b 41 must cross in this region.*/
RyoheiHagimoto 0:56c5742b9e2b 42 int len;
RyoheiHagimoto 0:56c5742b9e2b 43 /*The offset to the midpoint of the upper/left section (part of the outside
RyoheiHagimoto 0:56c5742b9e2b 44 ring), or 0 if we couldn't identify the edge of the beginning section.
RyoheiHagimoto 0:56c5742b9e2b 45 We use the midpoint instead of the edge because it can be located more
RyoheiHagimoto 0:56c5742b9e2b 46 reliably.*/
RyoheiHagimoto 0:56c5742b9e2b 47 int boffs;
RyoheiHagimoto 0:56c5742b9e2b 48 /*The offset to the midpoint of the end section (part of the outside ring),
RyoheiHagimoto 0:56c5742b9e2b 49 or 0 if we couldn't identify the edge of the end section.
RyoheiHagimoto 0:56c5742b9e2b 50 We use the midpoint instead of the edge because it can be located more
RyoheiHagimoto 0:56c5742b9e2b 51 reliably.*/
RyoheiHagimoto 0:56c5742b9e2b 52 int eoffs;
RyoheiHagimoto 0:56c5742b9e2b 53 };
RyoheiHagimoto 0:56c5742b9e2b 54
RyoheiHagimoto 0:56c5742b9e2b 55 qr_reader *_zbar_qr_create(void);
RyoheiHagimoto 0:56c5742b9e2b 56 void _zbar_qr_destroy(qr_reader *reader);
RyoheiHagimoto 0:56c5742b9e2b 57 void _zbar_qr_reset(qr_reader *reader);
RyoheiHagimoto 0:56c5742b9e2b 58
RyoheiHagimoto 0:56c5742b9e2b 59 int _zbar_qr_found_line(qr_reader *reader,
RyoheiHagimoto 0:56c5742b9e2b 60 int direction,
RyoheiHagimoto 0:56c5742b9e2b 61 const qr_finder_line *line);
RyoheiHagimoto 0:56c5742b9e2b 62 int _zbar_qr_decode(qr_reader *reader,
RyoheiHagimoto 0:56c5742b9e2b 63 zbar_image_scanner_t *iscn,
RyoheiHagimoto 0:56c5742b9e2b 64 zbar_image_t *img);
RyoheiHagimoto 0:56c5742b9e2b 65
RyoheiHagimoto 0:56c5742b9e2b 66 #endif
RyoheiHagimoto 0:56c5742b9e2b 67