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
zxing_lib/zxing/LuminanceSource.h@1:67f8b5cfde75, 2016-11-10 (annotated)
- Committer:
- Osamu Nakamura
- Date:
- Thu Nov 10 20:23:55 2016 +0900
- Revision:
- 1:67f8b5cfde75
- Parent:
- 0:7d720671e6dc
Revised the initial value of /888/0/7700
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Osamu Nakamura |
0:7d720671e6dc | 1 | // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- |
Osamu Nakamura |
0:7d720671e6dc | 2 | #ifndef __LUMINANCESOURCE_H__ |
Osamu Nakamura |
0:7d720671e6dc | 3 | #define __LUMINANCESOURCE_H__ |
Osamu Nakamura |
0:7d720671e6dc | 4 | /* |
Osamu Nakamura |
0:7d720671e6dc | 5 | * LuminanceSource.h |
Osamu Nakamura |
0:7d720671e6dc | 6 | * zxing |
Osamu Nakamura |
0:7d720671e6dc | 7 | * |
Osamu Nakamura |
0:7d720671e6dc | 8 | * Copyright 2010 ZXing authors All rights reserved. |
Osamu Nakamura |
0:7d720671e6dc | 9 | * |
Osamu Nakamura |
0:7d720671e6dc | 10 | * Licensed under the Apache License, Version 2.0 (the "License"); |
Osamu Nakamura |
0:7d720671e6dc | 11 | * you may not use this file except in compliance with the License. |
Osamu Nakamura |
0:7d720671e6dc | 12 | * You may obtain a copy of the License at |
Osamu Nakamura |
0:7d720671e6dc | 13 | * |
Osamu Nakamura |
0:7d720671e6dc | 14 | * http://www.apache.org/licenses/LICENSE-2.0 |
Osamu Nakamura |
0:7d720671e6dc | 15 | * |
Osamu Nakamura |
0:7d720671e6dc | 16 | * Unless required by applicable law or agreed to in writing, software |
Osamu Nakamura |
0:7d720671e6dc | 17 | * distributed under the License is distributed on an "AS IS" BASIS, |
Osamu Nakamura |
0:7d720671e6dc | 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Osamu Nakamura |
0:7d720671e6dc | 19 | * See the License for the specific language governing permissions and |
Osamu Nakamura |
0:7d720671e6dc | 20 | * limitations under the License. |
Osamu Nakamura |
0:7d720671e6dc | 21 | */ |
Osamu Nakamura |
0:7d720671e6dc | 22 | |
Osamu Nakamura |
0:7d720671e6dc | 23 | #include <zxing/common/Counted.h> |
Osamu Nakamura |
0:7d720671e6dc | 24 | #include <zxing/common/Array.h> |
Osamu Nakamura |
0:7d720671e6dc | 25 | #include <string.h> |
Osamu Nakamura |
0:7d720671e6dc | 26 | |
Osamu Nakamura |
0:7d720671e6dc | 27 | namespace zxing { |
Osamu Nakamura |
0:7d720671e6dc | 28 | |
Osamu Nakamura |
0:7d720671e6dc | 29 | class LuminanceSource : public Counted { |
Osamu Nakamura |
0:7d720671e6dc | 30 | private: |
Osamu Nakamura |
0:7d720671e6dc | 31 | const int width; |
Osamu Nakamura |
0:7d720671e6dc | 32 | const int height; |
Osamu Nakamura |
0:7d720671e6dc | 33 | |
Osamu Nakamura |
0:7d720671e6dc | 34 | public: |
Osamu Nakamura |
0:7d720671e6dc | 35 | LuminanceSource(int width, int height); |
Osamu Nakamura |
0:7d720671e6dc | 36 | virtual ~LuminanceSource(); |
Osamu Nakamura |
0:7d720671e6dc | 37 | |
Osamu Nakamura |
0:7d720671e6dc | 38 | int getWidth() const { return width; } |
Osamu Nakamura |
0:7d720671e6dc | 39 | int getHeight() const { return height; } |
Osamu Nakamura |
0:7d720671e6dc | 40 | |
Osamu Nakamura |
0:7d720671e6dc | 41 | // Callers take ownership of the returned memory and must call delete [] on it themselves. |
Osamu Nakamura |
0:7d720671e6dc | 42 | virtual ArrayRef<char> getRow(int y, ArrayRef<char> row) const = 0; |
Osamu Nakamura |
0:7d720671e6dc | 43 | virtual ArrayRef<char> getMatrix() const = 0; |
Osamu Nakamura |
0:7d720671e6dc | 44 | |
Osamu Nakamura |
0:7d720671e6dc | 45 | virtual bool isCropSupported() const; |
Osamu Nakamura |
0:7d720671e6dc | 46 | virtual Ref<LuminanceSource> crop(int left, int top, int width, int height) const; |
Osamu Nakamura |
0:7d720671e6dc | 47 | |
Osamu Nakamura |
0:7d720671e6dc | 48 | virtual bool isRotateSupported() const; |
Osamu Nakamura |
0:7d720671e6dc | 49 | |
Osamu Nakamura |
0:7d720671e6dc | 50 | virtual Ref<LuminanceSource> invert() const; |
Osamu Nakamura |
0:7d720671e6dc | 51 | |
Osamu Nakamura |
0:7d720671e6dc | 52 | virtual Ref<LuminanceSource> rotateCounterClockwise() const; |
Osamu Nakamura |
0:7d720671e6dc | 53 | |
Osamu Nakamura |
0:7d720671e6dc | 54 | operator std::string () const; |
Osamu Nakamura |
0:7d720671e6dc | 55 | }; |
Osamu Nakamura |
0:7d720671e6dc | 56 | |
Osamu Nakamura |
0:7d720671e6dc | 57 | } |
Osamu Nakamura |
0:7d720671e6dc | 58 | |
Osamu Nakamura |
0:7d720671e6dc | 59 | #endif /* LUMINANCESOURCE_H_ */ |