This is the sample program that can see the decode result of barcode data on Watson IoT.

Dependencies:   AsciiFont DisplayApp GR-PEACH_video LCD_shield_config LWIPBP3595Interface_STA_for_mbed-os USBDevice

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers GenericMultipleBarcodeReader.h Source File

GenericMultipleBarcodeReader.h

00001 // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*-
00002 #ifndef __GENERIC_MULTIPLE_BARCODE_READER_H__
00003 #define __GENERIC_MULTIPLE_BARCODE_READER_H__
00004 
00005 /*
00006  *  Copyright 2011 ZXing authors All rights reserved.
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *      http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  */
00020 
00021 #include <zxing/multi/MultipleBarcodeReader.h>
00022 #include <zxing/Reader.h>
00023 
00024 namespace zxing {
00025 namespace multi {
00026 
00027 class GenericMultipleBarcodeReader : public MultipleBarcodeReader {
00028  private:
00029   static Ref<Result> translateResultPoints(Ref<Result> result, 
00030                                            int xOffset, 
00031                                            int yOffset);
00032   void doDecodeMultiple(Ref<BinaryBitmap> image, 
00033                         DecodeHints hints, 
00034                         std::vector<Ref<Result> >& results, 
00035                         int xOffset, 
00036                         int yOffset,
00037                         int currentDepth);
00038   Reader& delegate_;
00039   static const int MIN_DIMENSION_TO_RECUR = 100;
00040   static const int MAX_DEPTH = 4;
00041 
00042  public:
00043   GenericMultipleBarcodeReader(Reader& delegate);
00044   virtual ~GenericMultipleBarcodeReader();
00045   virtual std::vector<Ref<Result> > decodeMultiple(Ref<BinaryBitmap> image, DecodeHints hints);
00046 };
00047 
00048 }
00049 }
00050 
00051 #endif // __GENERIC_MULTIPLE_BARCODE_READER_H__