Permalink
Browse files

Added QZXing. A wrapper library of C++ part of ZXing written in Qt to…

… make it usable in multiple platforms through the same code: Symbian, Windows, Linux. Very simple interface with some basic functions. The library is also accessible through QML. 2 example programs included. Tutorial contained as well.

git-svn-id: http://zxing.googlecode.com/svn/trunk@2089 59b500cc-1b3d-0410-9834-0bbf25fbcc57
  • Loading branch information...
1 parent 3885a7c commit a56e382c8686721c00b947788b1903ae7d75729d ftylitak@gmail.com committed Dec 16, 2011
Showing with 10,313 additions and 3,282 deletions.
  1. BIN symbian/QQrDecoder/QQrDecoder.sis
  2. +0 −91 symbian/QQrDecoder/QQrDecoder.svg
  3. +0 −25 symbian/QQrDecoder/zxing/Exception.cpp
  4. +0 −168 symbian/QQrDecoder/zxing/common/HybridBinarizer.cpp
  5. +0 −404 symbian/QQrDecoder/zxing/datamatrix/decoder/DecodedBitStreamParser.cpp
  6. +0 −315 symbian/QQrDecoder/zxing/datamatrix/detector/Detector.cpp
  7. +0 −79 symbian/QQrDecoder/zxing/datamatrix/detector/Detector.h
  8. +0 −363 symbian/QQrDecoder/zxing/qrcode/decoder/DecodedBitStreamParser.cpp
  9. +0 −73 symbian/QQrDecoder/zxing/qrcode/decoder/Mode.cpp
  10. +12 −0 symbian/QZXing/binary/Harmattan-Maemo5/QZXing_global.h
  11. BIN symbian/QZXing/binary/Harmattan-Maemo5/libQZXing.rar
  12. +74 −0 symbian/QZXing/binary/Harmattan-Maemo5/qzxing.h
  13. +1 −0 symbian/QZXing/binary/Harmattan-Maemo5/readme.txt
  14. BIN symbian/QZXing/binary/Qt_4.6.3_Symbian^1/InstallToDevice/QZXing_S60_FP1_selfsigned.sis
  15. BIN symbian/QZXing/binary/Qt_4.6.3_Symbian^1/InstallToDevice/QZXing_selfsigned.sis
  16. BIN symbian/QZXing/binary/Qt_4.6.3_Symbian^1/InstallToDevice/qzxing.sis
  17. +12 −0 symbian/QZXing/binary/Qt_4.6.3_Symbian^1/include/QZXing_global.h
  18. +74 −0 symbian/QZXing/binary/Qt_4.6.3_Symbian^1/include/qzxing.h
  19. BIN symbian/QZXing/binary/Qt_4.6.3_Symbian^1/release/armv5/lib/QZXing.dso
  20. BIN symbian/QZXing/binary/Qt_4.6.3_Symbian^1/release/armv5/lib/QZXing{000a0000}.dso
  21. BIN symbian/QZXing/binary/Qt_4.7.3_Symbian/InstallToDevice/QZXing.sis
  22. BIN symbian/QZXing/binary/Qt_4.7.3_Symbian/InstallToDevice/QZXing_selfsigned.sis
  23. +74 −0 symbian/QZXing/binary/Qt_4.7.3_Symbian/include/QZXing.h
  24. +12 −0 symbian/QZXing/binary/Qt_4.7.3_Symbian/include/QZXing_global.h
  25. BIN symbian/QZXing/binary/Qt_4.7.3_Symbian/release/armv5/lib/QZXing.dso
  26. BIN symbian/QZXing/binary/Qt_4.7.3_Symbian/release/armv5/lib/QZXing{00010100}.dso
  27. +74 −0 symbian/QZXing/binary/Qt_4.7.4_Desktop_Mingw/QZXing.h
  28. BIN symbian/QZXing/binary/Qt_4.7.4_Desktop_Mingw/QZXing1.rar
  29. +12 −0 symbian/QZXing/binary/Qt_4.7.4_Desktop_Mingw/QZXing_global.h
  30. +1 −0 symbian/QZXing/binary/Qt_4.7.4_Desktop_Mingw/readme.txt
  31. +52 −0 symbian/QZXing/examples/QMLBarcodeScanner/QMLBarcodeScanner.pro
  32. +716 −0 symbian/QZXing/examples/QMLBarcodeScanner/QMLBarcodeScanner.pro.user
  33. BIN symbian/QZXing/examples/QMLBarcodeScanner/QMLBarcodeScanner.sis
  34. +345 −0 symbian/QZXing/examples/QMLBarcodeScanner/QMLBarcodeScanner.svg
  35. BIN symbian/QZXing/examples/QMLBarcodeScanner/QMLBarcodeScanner_installer.sis
  36. +201 −201 symbian/{QQrDecoder → QZXing/examples/QMLBarcodeScanner}/ZXing_Licence.txt
  37. +17 −0 symbian/QZXing/examples/QMLBarcodeScanner/main.cpp
  38. +71 −0 symbian/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/CameraButton.qml
  39. +107 −0 symbian/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/CameraPropertyButton.qml
  40. +122 −0 symbian/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/CameraPropertyPopup.qml
  41. +237 −0 symbian/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/CaptureControls.qml
  42. +85 −0 symbian/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/ExposureCompensationButton.qml
  43. +128 −0 symbian/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/FlickableList.qml
  44. +26 −3 ...oder/Nokia_Licence.txt → QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/FocusButton.qml}
  45. +118 −0 symbian/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/ZoomControl.qml
  46. +144 −0 symbian/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/declarative-camera.qml
  47. BIN symbian/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/images/camera_auto_mode.png
  48. BIN symbian/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/images/camera_camera_setting.png
  49. BIN symbian/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/images/camera_flash_auto.png
  50. BIN symbian/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/images/camera_flash_fill.png
  51. BIN symbian/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/images/camera_flash_off.png
  52. BIN symbian/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/images/camera_flash_redeye.png
  53. BIN ...an/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/images/camera_white_balance_cloudy.png
  54. BIN ...Xing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/images/camera_white_balance_flourescent.png
  55. BIN ...ing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/images/camera_white_balance_incandescent.png
  56. BIN ...ian/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/images/camera_white_balance_sunny.png
  57. BIN symbian/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/images/toolbutton.png
  58. +5 −0 symbian/QZXing/examples/QMLBarcodeScanner/qml/QMLBarcodeScanner/images/toolbutton.sci
  59. +200 −0 symbian/QZXing/examples/QMLBarcodeScanner/qmlapplicationviewer/qmlapplicationviewer.cpp
  60. +47 −0 symbian/QZXing/examples/QMLBarcodeScanner/qmlapplicationviewer/qmlapplicationviewer.h
  61. +146 −0 symbian/QZXing/examples/QMLBarcodeScanner/qmlapplicationviewer/qmlapplicationviewer.pri
  62. 0 symbian/{ → QZXing/examples}/QQrDecoder/CameraImageWrapper.cpp
  63. +1 −0 symbian/{ → QZXing/examples}/QQrDecoder/CameraImageWrapper.h
  64. +5 −3 symbian/{ → QZXing/examples}/QQrDecoder/MyVideoSurface.cpp
  65. +452 −408 symbian/{ → QZXing/examples}/QQrDecoder/QCameraControllerWidget.cpp
  66. +122 −114 symbian/{ → QZXing/examples}/QQrDecoder/QCameraControllerWidget.h
  67. +9 −41 symbian/{ → QZXing/examples}/QQrDecoder/QQrDecoder.cpp
  68. +3 −8 symbian/{ → QZXing/examples}/QQrDecoder/QQrDecoder.h
  69. +53 −0 symbian/QZXing/examples/QQrDecoder/QQrDecoder.pro
  70. BIN symbian/QZXing/examples/QQrDecoder/QQrDecoder.sis
  71. +356 −0 symbian/QZXing/examples/QQrDecoder/QQrDecoder.svg
  72. 0 symbian/{ → QZXing/examples}/QQrDecoder/QQrDecoder.ui
  73. +201 −0 symbian/QZXing/examples/QQrDecoder/ZXing_Licence.txt
  74. +139 −110 symbian/{ → QZXing/examples}/QQrDecoder/button.cpp
  75. +77 −72 symbian/{ → QZXing/examples}/QQrDecoder/button.h
  76. BIN symbian/QZXing/examples/QQrDecoder/icons/camera.png
  77. BIN symbian/QZXing/examples/QQrDecoder/icons/flash.png
  78. BIN symbian/{ → QZXing/examples}/QQrDecoder/icons/zoomIn.png
  79. BIN symbian/{ → QZXing/examples}/QQrDecoder/icons/zoomOut.png
  80. 0 symbian/{ → QZXing/examples}/QQrDecoder/main.cpp
  81. 0 symbian/{ → QZXing/examples}/QQrDecoder/myvideosurface.h
  82. +7 −6 symbian/{ → QZXing/examples}/QQrDecoder/resources.qrc
  83. 0 symbian/{ → QZXing/examples}/QQrDecoder_tutorial.txt
  84. +146 −0 symbian/QZXing/source/CameraImageWrapper.cpp
  85. +47 −0 symbian/QZXing/source/CameraImageWrapper.h
  86. +95 −41 symbian/{QQrDecoder/QQrDecoder.pro → QZXing/source/QZXing.pro}
  87. +12 −0 symbian/QZXing/source/QZXing_global.h
  88. +102 −0 symbian/QZXing/source/eabi/QZXingu.def
  89. +6 −0 symbian/QZXing/source/qtc_packaging/debian_fremantle/README
  90. +5 −0 symbian/QZXing/source/qtc_packaging/debian_fremantle/changelog
  91. +1 −0 symbian/QZXing/source/qtc_packaging/debian_fremantle/compat
  92. +15 −0 symbian/QZXing/source/qtc_packaging/debian_fremantle/control
  93. +40 −0 symbian/QZXing/source/qtc_packaging/debian_fremantle/copyright
  94. +91 −0 symbian/QZXing/source/qtc_packaging/debian_fremantle/rules
  95. +6 −0 symbian/QZXing/source/qtc_packaging/debian_harmattan/README
  96. +5 −0 symbian/QZXing/source/qtc_packaging/debian_harmattan/changelog
  97. +1 −0 symbian/QZXing/source/qtc_packaging/debian_harmattan/compat
  98. +15 −0 symbian/QZXing/source/qtc_packaging/debian_harmattan/control
  99. +40 −0 symbian/QZXing/source/qtc_packaging/debian_harmattan/copyright
  100. 0 symbian/QZXing/source/qtc_packaging/debian_harmattan/manifest.aegis
  101. +91 −0 symbian/QZXing/source/qtc_packaging/debian_harmattan/rules
  102. +86 −0 symbian/QZXing/source/qzxing.cpp
  103. +74 −0 symbian/QZXing/source/qzxing.h
  104. 0 symbian/{QQrDecoder → QZXing/source}/zxing/BarcodeFormat.cpp
  105. 0 symbian/{QQrDecoder → QZXing/source}/zxing/BarcodeFormat.h
  106. +2 −1 symbian/{QQrDecoder → QZXing/source}/zxing/Binarizer.cpp
  107. 0 symbian/{QQrDecoder → QZXing/source}/zxing/Binarizer.h
  108. 0 symbian/{QQrDecoder → QZXing/source}/zxing/BinaryBitmap.cpp
  109. 0 symbian/{QQrDecoder → QZXing/source}/zxing/BinaryBitmap.h
  110. +8 −2 symbian/{QQrDecoder → QZXing/source}/zxing/DecodeHints.cpp
  111. +8 −6 symbian/{QQrDecoder → QZXing/source}/zxing/DecodeHints.h
  112. +40 −0 symbian/QZXing/source/zxing/Exception.cpp
  113. +1 −0 symbian/{QQrDecoder → QZXing/source}/zxing/Exception.h
  114. +11 −3 symbian/{QQrDecoder/zxing/ResultPoint.cpp → QZXing/source/zxing/FormatException.cpp}
  115. +9 −13 symbian/{QQrDecoder/zxing/ResultPoint.h → QZXing/source/zxing/FormatException.h}
  116. +29 −0 symbian/{QQrDecoder → QZXing/source}/zxing/LuminanceSource.cpp
  117. +3 −0 symbian/{QQrDecoder → QZXing/source}/zxing/LuminanceSource.h
  118. +5 −5 symbian/{QQrDecoder → QZXing/source}/zxing/MultiFormatReader.cpp
  119. 0 symbian/{QQrDecoder → QZXing/source}/zxing/MultiFormatReader.h
  120. +28 −0 symbian/QZXing/source/zxing/NotFoundException.cpp
  121. +33 −0 symbian/QZXing/source/zxing/NotFoundException.h
  122. 0 symbian/{QQrDecoder → QZXing/source}/zxing/Reader.cpp
  123. 0 symbian/{QQrDecoder → QZXing/source}/zxing/Reader.h
  124. +4 −1 symbian/{QQrDecoder → QZXing/source}/zxing/ReaderException.cpp
  125. +1 −0 symbian/{QQrDecoder → QZXing/source}/zxing/ReaderException.h
  126. +6 −1 symbian/{QQrDecoder → QZXing/source}/zxing/Result.cpp
  127. +1 −0 symbian/{QQrDecoder → QZXing/source}/zxing/Result.h
  128. +100 −0 symbian/QZXing/source/zxing/ResultPoint.cpp
  129. +54 −0 symbian/QZXing/source/zxing/ResultPoint.h
  130. 0 symbian/{QQrDecoder → QZXing/source}/zxing/ResultPointCallback.cpp
  131. 0 symbian/{QQrDecoder → QZXing/source}/zxing/ResultPointCallback.h
  132. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/Array.cpp
  133. +208 −207 symbian/{QQrDecoder → QZXing/source}/zxing/common/Array.h
  134. +27 −8 symbian/{QQrDecoder → QZXing/source}/zxing/common/BitArray.cpp
  135. +11 −2 symbian/{QQrDecoder → QZXing/source}/zxing/common/BitArray.h
  136. +33 −49 symbian/{QQrDecoder → QZXing/source}/zxing/common/BitMatrix.cpp
  137. +25 −3 symbian/{QQrDecoder → QZXing/source}/zxing/common/BitMatrix.h
  138. +0 −1 symbian/{QQrDecoder → QZXing/source}/zxing/common/BitSource.cpp
  139. +3 −0 symbian/{QQrDecoder → QZXing/source}/zxing/common/BitSource.h
  140. +87 −0 symbian/QZXing/source/zxing/common/CharacterSetECI.cpp
  141. +53 −0 symbian/QZXing/source/zxing/common/CharacterSetECI.h
  142. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/Counted.cpp
  143. +2 −3 symbian/{QQrDecoder → QZXing/source}/zxing/common/Counted.h
  144. +16 −7 symbian/{QQrDecoder → QZXing/source}/zxing/common/DecoderResult.cpp
  145. +8 −0 symbian/{QQrDecoder → QZXing/source}/zxing/common/DecoderResult.h
  146. +2 −1 symbian/{QQrDecoder → QZXing/source}/zxing/common/DetectorResult.cpp
  147. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/DetectorResult.h
  148. +39 −0 symbian/QZXing/source/zxing/common/ECI.cpp
  149. +40 −0 symbian/QZXing/source/zxing/common/ECI.h
  150. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/EdgeDetector.cpp
  151. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/EdgeDetector.h
  152. +5 −5 symbian/{QQrDecoder → QZXing/source}/zxing/common/GlobalHistogramBinarizer.cpp
  153. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/GlobalHistogramBinarizer.h
  154. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/GreyscaleLuminanceSource.cpp
  155. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/GreyscaleLuminanceSource.h
  156. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/GreyscaleRotatedLuminanceSource.cpp
  157. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/GreyscaleRotatedLuminanceSource.h
  158. +21 −0 symbian/{QQrDecoder → QZXing/source}/zxing/common/GridSampler.cpp
  159. +2 −0 symbian/{QQrDecoder → QZXing/source}/zxing/common/GridSampler.h
  160. +211 −0 symbian/QZXing/source/zxing/common/HybridBinarizer.cpp
  161. +23 −10 symbian/{QQrDecoder → QZXing/source}/zxing/common/HybridBinarizer.h
  162. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/IllegalArgumentException.cpp
  163. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/IllegalArgumentException.h
  164. +196 −196 symbian/{QQrDecoder → QZXing/source}/zxing/common/LocalBlockBinarizer.cpp
  165. +47 −47 symbian/{QQrDecoder → QZXing/source}/zxing/common/LocalBlockBinarizer.h
  166. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/PerspectiveTransform.cpp
  167. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/PerspectiveTransform.h
  168. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/Point.h
  169. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/Str.cpp
  170. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/Str.h
  171. +175 −0 symbian/QZXing/source/zxing/common/StringUtils.cpp
  172. +52 −0 symbian/QZXing/source/zxing/common/StringUtils.h
  173. +171 −0 symbian/QZXing/source/zxing/common/detector/MonochromeRectangleDetector.cpp
  174. +60 −0 symbian/QZXing/source/zxing/common/detector/MonochromeRectangleDetector.h
  175. +315 −0 symbian/QZXing/source/zxing/common/detector/WhiteRectangleDetector.cpp
  176. +56 −0 symbian/QZXing/source/zxing/common/detector/WhiteRectangleDetector.h
  177. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/reedsolomon/GF256.cpp
  178. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/reedsolomon/GF256.h
  179. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/reedsolomon/GF256Poly.cpp
  180. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/reedsolomon/GF256Poly.h
  181. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/reedsolomon/ReedSolomonDecoder.cpp
  182. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/reedsolomon/ReedSolomonDecoder.h
  183. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/reedsolomon/ReedSolomonException.cpp
  184. 0 symbian/{QQrDecoder → QZXing/source}/zxing/common/reedsolomon/ReedSolomonException.h
  185. +1 −1 symbian/{QQrDecoder → QZXing/source}/zxing/datamatrix/DataMatrixReader.cpp
  186. +1 −1 symbian/{QQrDecoder → QZXing/source}/zxing/datamatrix/DataMatrixReader.h
  187. +2 −2 symbian/{QQrDecoder/zxing/datamatrix/Version.cpp → QZXing/source/zxing/datamatrix/VersionDM.cpp}
  188. +3 −3 symbian/{QQrDecoder/zxing/datamatrix/Version.h → QZXing/source/zxing/datamatrix/VersionDM.h}
  189. +14 −17 ...atrix/decoder/BitMatrixParser.cpp → QZXing/source/zxing/datamatrix/decoder/BitMatrixParserDM.cpp}
  190. +1 −1 ...atamatrix/decoder/BitMatrixParser.h → QZXing/source/zxing/datamatrix/decoder/BitMatrixParserDM.h}
  191. +1 −1 .../zxing/datamatrix/decoder/DataBlock.cpp → QZXing/source/zxing/datamatrix/decoder/DataBlockDM.cpp}
  192. +1 −1 ...oder/zxing/datamatrix/decoder/DataBlock.h → QZXing/source/zxing/datamatrix/decoder/DataBlockDM.h}
  193. +417 −0 symbian/QZXing/source/zxing/datamatrix/decoder/DecodedBitStreamParserDM.cpp
  194. +4 −3 ...der/DecodedBitStreamParser.h → QZXing/source/zxing/datamatrix/decoder/DecodedBitStreamParserDM.h}
  195. +39 −41 ...oder/zxing/datamatrix/decoder/Decoder.cpp → QZXing/source/zxing/datamatrix/decoder/DecoderDM.cpp}
  196. 0 ...rDecoder/zxing/datamatrix/decoder/Decoder.h → QZXing/source/zxing/datamatrix/decoder/DecoderDM.h}
  197. +1 −9 symbian/{QQrDecoder → QZXing/source}/zxing/datamatrix/detector/CornerPoint.cpp
  198. +0 −4 symbian/{QQrDecoder → QZXing/source}/zxing/datamatrix/detector/CornerPoint.h
  199. +434 −0 symbian/QZXing/source/zxing/datamatrix/detector/DetectorDM.cpp
  200. +94 −0 symbian/QZXing/source/zxing/datamatrix/detector/DetectorDM.h
  201. +23 −0 symbian/QZXing/source/zxing/datamatrix/detector/DetectorException.cpp
  202. +23 −0 symbian/QZXing/source/zxing/datamatrix/detector/DetectorException.h
  203. +3 −3 ...ectangleDetector.cpp → QZXing/source/zxing/datamatrix/detector/MonochromeRectangleDetectorDM.cpp}
  204. +8 −8 ...omeRectangleDetector.h → QZXing/source/zxing/datamatrix/detector/MonochromeRectangleDetectorDM.h}
  205. +71 −0 symbian/QZXing/source/zxing/multi/ByQuadrantReader.cpp
  206. +40 −0 symbian/QZXing/source/zxing/multi/ByQuadrantReader.h
  207. +128 −0 symbian/QZXing/source/zxing/multi/GenericMultipleBarcodeReader.cpp
  208. +47 −0 symbian/QZXing/source/zxing/multi/GenericMultipleBarcodeReader.h
  209. +29 −0 symbian/QZXing/source/zxing/multi/MultipleBarcodeReader.cpp
  210. +39 −0 symbian/QZXing/source/zxing/multi/MultipleBarcodeReader.h
  211. +57 −0 symbian/QZXing/source/zxing/multi/qrcode/QRCodeMultiReader.cpp
  212. +34 −0 symbian/QZXing/source/zxing/multi/qrcode/QRCodeMultiReader.h
  213. +46 −0 symbian/QZXing/source/zxing/multi/qrcode/detector/MultiDetector.cpp
  214. +35 −0 symbian/QZXing/source/zxing/multi/qrcode/detector/MultiDetector.h
  215. +225 −0 symbian/QZXing/source/zxing/multi/qrcode/detector/MultiFinderPatternFinder.cpp
  216. +45 −0 symbian/QZXing/source/zxing/multi/qrcode/detector/MultiFinderPatternFinder.h
  217. +16 −4 symbian/{QQrDecoder → QZXing/source}/zxing/oned/Code128Reader.cpp
  218. 0 symbian/{QQrDecoder → QZXing/source}/zxing/oned/Code128Reader.h
  219. +8 −2 symbian/{QQrDecoder → QZXing/source}/zxing/oned/Code39Reader.cpp
  220. 0 symbian/{QQrDecoder → QZXing/source}/zxing/oned/Code39Reader.h
  221. 0 symbian/{QQrDecoder → QZXing/source}/zxing/oned/EAN13Reader.cpp
  222. 0 symbian/{QQrDecoder → QZXing/source}/zxing/oned/EAN13Reader.h
  223. 0 symbian/{QQrDecoder → QZXing/source}/zxing/oned/EAN8Reader.cpp
  224. 0 symbian/{QQrDecoder → QZXing/source}/zxing/oned/EAN8Reader.h
  225. +3 −3 symbian/{QQrDecoder → QZXing/source}/zxing/oned/ITFReader.cpp
  226. 0 symbian/{QQrDecoder → QZXing/source}/zxing/oned/ITFReader.h
  227. 0 symbian/{QQrDecoder → QZXing/source}/zxing/oned/MultiFormatOneDReader.cpp
  228. 0 symbian/{QQrDecoder → QZXing/source}/zxing/oned/MultiFormatOneDReader.h
  229. 0 symbian/{QQrDecoder → QZXing/source}/zxing/oned/MultiFormatUPCEANReader.cpp
  230. 0 symbian/{QQrDecoder → QZXing/source}/zxing/oned/MultiFormatUPCEANReader.h
  231. +4 −3 symbian/{QQrDecoder → QZXing/source}/zxing/oned/OneDReader.cpp
  232. 0 symbian/{QQrDecoder → QZXing/source}/zxing/oned/OneDReader.h
  233. +1 −9 symbian/{QQrDecoder → QZXing/source}/zxing/oned/OneDResultPoint.cpp
  234. +0 −5 symbian/{QQrDecoder → QZXing/source}/zxing/oned/OneDResultPoint.h
  235. 0 symbian/{QQrDecoder → QZXing/source}/zxing/oned/UPCAReader.cpp
  236. 0 symbian/{QQrDecoder → QZXing/source}/zxing/oned/UPCAReader.h
  237. 0 symbian/{QQrDecoder → QZXing/source}/zxing/oned/UPCEANReader.cpp
  238. 0 symbian/{QQrDecoder → QZXing/source}/zxing/oned/UPCEANReader.h
  239. +1 −1 symbian/{QQrDecoder → QZXing/source}/zxing/oned/UPCEReader.cpp
  240. 0 symbian/{QQrDecoder → QZXing/source}/zxing/oned/UPCEReader.h
  241. +25 −9 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/ErrorCorrectionLevel.cpp
  242. +8 −2 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/ErrorCorrectionLevel.h
  243. 0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/FormatInformation.cpp
  244. 0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/FormatInformation.h
  245. +4 −0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/QRCodeReader.cpp
  246. +4 −0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/QRCodeReader.h
  247. 0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/Version.cpp
  248. 0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/Version.h
  249. 0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/decoder/BitMatrixParser.cpp
  250. 0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/decoder/BitMatrixParser.h
  251. 0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/decoder/DataBlock.cpp
  252. 0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/decoder/DataBlock.h
  253. 0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/decoder/DataMask.cpp
  254. 0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/decoder/DataMask.h
  255. +402 −0 symbian/QZXing/source/zxing/qrcode/decoder/DecodedBitStreamParser.cpp
  256. +25 −12 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/decoder/DecodedBitStreamParser.h
  257. +5 −6 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/decoder/Decoder.cpp
  258. 0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/decoder/Decoder.h
  259. +86 −0 symbian/QZXing/source/zxing/qrcode/decoder/Mode.cpp
  260. +9 −1 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/decoder/Mode.h
  261. +15 −10 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/detector/AlignmentPattern.cpp
  262. +4 −4 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/detector/AlignmentPattern.h
  263. +2 −2 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/detector/AlignmentPatternFinder.cpp
  264. 0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/detector/AlignmentPatternFinder.h
  265. +6 −2 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/detector/Detector.cpp
  266. +3 −1 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/detector/Detector.h
  267. +22 −9 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/detector/FinderPattern.cpp
  268. +4 −5 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/detector/FinderPattern.h
  269. +2 −1 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/detector/FinderPatternFinder.cpp
  270. +2 −0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/detector/FinderPatternFinder.h
  271. 0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/detector/FinderPatternInfo.cpp
  272. 0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/detector/FinderPatternInfo.h
  273. 0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/detector/QREdgeDetector.cpp
  274. 0 symbian/{QQrDecoder → QZXing/source}/zxing/qrcode/detector/QREdgeDetector.h
  275. +139 −0 symbian/QZXing_tutorial.txt
Binary file not shown.
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
-<svg version="1.2" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
- x="0px" y="0px" width="135px" height="135px" viewBox="0 0 135 135" xml:space="preserve">
-<image width="135" height="135" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA
-EAMCAwYAAALJAAAGlAAAErr/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX
-Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa
-JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIAIcAhwMBIgACEQEDEQH/
-xACvAAACAwEBAQAAAAAAAAAAAAAABQMEBgIBBwEBAAAAAAAAAAAAAAAAAAAAABAAAgICAQIFAwMF
-AAAAAAAAAwQCBQEGAAcXERITFDUzFTdgIxZAMSI0NhEAAgECAwQECggDAw0AAAAAAQIDABEhEgQx
-QSITUWEyBXGRQlKSs9MUNHSBobHB0eFyIxBissIzBkDxgqLSg5PDJIQVNRYSAQAAAAAAAAAAAAAA
-AAAAAGD/2gAMAwEAAhEDEQAAANFjdBaMqaC4ZPZY3ZFpWvsGmtZnADXZIGplxg2MyaAGQtACwfJ9
-A9YCL6h8v+oHyG9p6BfW1HAltQ2STDa0MF9QVNQALWR3OSDi90Kb8dgqRTRHXfkhz3UCLlxwKeHa
-01pIFZG7RnttVbJl7CgTc9zlC1bmF0L2oVe/ahVt1rhoDoI0z7MEvXdUl8i9KlyT0tt1j4VxP0ZC
-iZ1T2vbomtJQjy2lQks0HpDVvAtar4TTd0gZU4+yhQbqjxjDwaspBylcpSbtTYOmK2+JvL8BJMru
-E/VCAcLOZyxUlsjsshSo28mMbVAOdX84+uHzdoj+lGXc8ODAt1FUtrWOoMNsEAa0lB8AAAAAAAAA
-AAAAAH//2gAIAQIAAQUA/SP/2gAIAQMAAQUA/SP/2g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KGk
-YubXiOGNPo9G8jxvIZSZSrNmZVTyFXDhrUfKP6yGp9ZEAZNPJp5UDXKlo4onF7EYYV8PpPQk9tWl
-/wAUGSb37VJ73JHmXkiTVIS4VcmbKOYbcXjrT/KJ6yavh9J6EntqfvyRIxqlg1EoRQ3LzQmQLgWL
-W4BfH/Iv/9k=">
-</image>
-</svg>
@@ -1,25 +0,0 @@
-/*
- * Exception.cpp
- * ZXing
- *
- * Created by Christian Brunschen on 03/06/2008.
- * Copyright 2008 ZXing authors All rights reserved.
- *
- */
-
-#include <zxing/Exception.h>
-
-namespace zxing {
-
-Exception::Exception(const char *msg) :
- message(msg) {
-}
-
-const char* Exception::what() const throw() {
- return message.c_str();
-}
-
-Exception::~Exception() throw() {
-}
-
-}
@@ -1,168 +0,0 @@
-/*
- * HybridBinarizer.cpp
- * zxing
- *
- * Copyright 2010 ZXing authors All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <zxing/common/HybridBinarizer.h>
-
-#include <zxing/common/IllegalArgumentException.h>
-
-namespace zxing {
-using namespace std;
-
-static const int MINIMUM_DIMENSION = 40;
-
-static const int LUMINANCE_BITS = 5;
-static const int LUMINANCE_SHIFT = 8 - LUMINANCE_BITS;
-static const int LUMINANCE_BUCKETS = 1 << LUMINANCE_BITS;
-
-HybridBinarizer::HybridBinarizer(Ref<LuminanceSource> source) :
- GlobalHistogramBinarizer(source), cached_matrix_(NULL), cached_row_(NULL), cached_row_num_(-1) {
-
-}
-
-HybridBinarizer::~HybridBinarizer() {
-}
-
-
-Ref<BitMatrix> HybridBinarizer::getBlackMatrix() {
- binarizeEntireImage();
- return cached_matrix_;
-}
-
-Ref<Binarizer> HybridBinarizer::createBinarizer(Ref<LuminanceSource> source) {
- return Ref<Binarizer> (new HybridBinarizer(source));
-}
-
-void HybridBinarizer::binarizeEntireImage() {
- if (cached_matrix_ == NULL) {
- Ref<LuminanceSource> source = getLuminanceSource();
- if (source->getWidth() >= MINIMUM_DIMENSION && source->getHeight() >= MINIMUM_DIMENSION) {
- unsigned char* luminances = source->getMatrix();
- int width = source->getWidth();
- int height = source->getHeight();
- int subWidth = width >> 3;
- if (width & 0x07) {
- subWidth++;
- }
- int subHeight = height >> 3;
- if (height & 0x07) {
- subHeight++;
- }
- int *blackPoints = calculateBlackPoints(luminances, subWidth, subHeight, width, height);
- cached_matrix_.reset(new BitMatrix(width,height));
- calculateThresholdForBlock(luminances, subWidth, subHeight, width, height, blackPoints, cached_matrix_);
- delete [] blackPoints;
- delete [] luminances;
- } else {
- // If the image is too small, fall back to the global histogram approach.
- cached_matrix_.reset(GlobalHistogramBinarizer::getBlackMatrix());
- }
- }
-}
-
-void HybridBinarizer::calculateThresholdForBlock(unsigned char* luminances, int subWidth, int subHeight,
- int width, int height, int blackPoints[], Ref<BitMatrix> matrix) {
- for (int y = 0; y < subHeight; y++) {
- int yoffset = y << 3;
- if (yoffset + 8 >= height) {
- yoffset = height - 8;
- }
- for (int x = 0; x < subWidth; x++) {
- int xoffset = x << 3;
- if (xoffset + 8 >= width) {
- xoffset = width - 8;
- }
- int left = (x > 1) ? x : 2;
- left = (left < subWidth - 2) ? left : subWidth - 3;
- int top = (y > 1) ? y : 2;
- top = (top < subHeight - 2) ? top : subHeight - 3;
- int sum = 0;
- for (int z = -2; z <= 2; z++) {
- int *blackRow = &blackPoints[(top + z) * subWidth];
- sum += blackRow[left - 2];
- sum += blackRow[left - 1];
- sum += blackRow[left];
- sum += blackRow[left + 1];
- sum += blackRow[left + 2];
- }
- int average = sum / 25;
- threshold8x8Block(luminances, xoffset, yoffset, average, width, matrix);
- }
- }
-}
-
-void HybridBinarizer::threshold8x8Block(unsigned char* luminances, int xoffset, int yoffset, int threshold,
- int stride, Ref<BitMatrix> matrix) {
- for (int y = 0; y < 8; y++) {
- int offset = (yoffset + y) * stride + xoffset;
- for (int x = 0; x < 8; x++) {
- int pixel = luminances[offset + x] & 0xff;
- if (pixel < threshold) {
- matrix->set(xoffset + x, yoffset + y);
- }
- }
- }
-}
-
-int* HybridBinarizer::calculateBlackPoints(unsigned char* luminances, int subWidth, int subHeight,
- int width, int height) {
- int *blackPoints = new int[subHeight * subWidth];
- for (int y = 0; y < subHeight; y++) {
- int yoffset = y << 3;
- if (yoffset + 8 >= height) {
- yoffset = height - 8;
- }
- for (int x = 0; x < subWidth; x++) {
- int xoffset = x << 3;
- if (xoffset + 8 >= width) {
- xoffset = width - 8;
- }
- int sum = 0;
- int min = 255;
- int max = 0;
- for (int yy = 0; yy < 8; yy++) {
- int offset = (yoffset + yy) * width + xoffset;
- for (int xx = 0; xx < 8; xx++) {
- int pixel = luminances[offset + xx] & 0xff;
- sum += pixel;
- if (pixel < min) {
- min = pixel;
- }
- if (pixel > max) {
- max = pixel;
- }
- }
- }
-
- // If the contrast is inadequate, use half the minimum, so that this block will be
- // treated as part of the white background, but won't drag down neighboring blocks
- // too much.
- int average;
- if (max - min > 24) {
- average = (sum >> 6);
- } else {
- average = max == 0 ? 1 : (min >> 1);
- }
- blackPoints[y * subWidth + x] = average;
- }
- }
- return blackPoints;
-}
-
-} // namespace zxing
-
Oops, something went wrong.

0 comments on commit a56e382

Please sign in to comment.