YAMAMOTO Takashi
eadbc2caca
flood_fill_seed: Move flood_fill_line to the "caller"
...
This restructure allows us to unify "call" and "return_from_call".
2021-05-11 14:09:24 +09:00
YAMAMOTO Takashi
0b69940876
flood_fill_line: call user callback as well
2021-05-11 14:05:02 +09:00
YAMAMOTO Takashi
38f882b3d6
flood_fill_seed: Simplify the flow by having a single "return point".
2021-05-11 13:46:31 +09:00
YAMAMOTO Takashi
1fa9b0c109
flood_fill_seed: Add assertions
2021-05-11 13:26:59 +09:00
YAMAMOTO Takashi
dd6c64cafe
Add QUIRC_ASSERT
2021-05-11 13:26:47 +09:00
YAMAMOTO Takashi
40def012e7
flood_fill_seed: Unify "left" and "x" vars
...
This reduces the memory usage a bit.
2021-05-11 13:04:02 +09:00
YAMAMOTO Takashi
aad3fc63b6
flood_fill_seed: separate a logic to fill a line
2021-05-11 12:55:44 +09:00
YAMAMOTO Takashi
f1dd37fbdb
quirc_resize: Make this a bit more careful about integer overflows
...
Also, avoid malloc(0), which is not too portable.
2021-05-11 11:05:58 +09:00
YAMAMOTO Takashi
772cd3e73f
Improve stack usage for flood filling
...
* Make flood filling logic iterative (vs recursive)
I basically tried one-to-one conversions here to avoid mistakes.
probably it has a room for later optimizations.
* Use explicit malloc (vs variables on stack) to allocate the work area.
* Estimate the amount of memory for the work area dynamically
from the image size, instead of using a constant FLOOD_FILL_MAX_DEPTH,
which is too big in the most cases.
2021-05-11 11:05:58 +09:00
Daniel Beer
c6fc67088a
Merge pull request #103 from yamt/otsu
...
Fix possible overflows in otsu()
2021-05-11 13:24:56 +12:00
Daniel Beer
e43a33bbc4
Add name of license to LICENSE file.
2021-05-11 10:34:42 +12:00
Daniel Beer
db49540f36
Merge pull request #107 from yamt/shrink-datastream
...
Shrink struct datastream by borrowing the user buffer
2021-05-11 10:30:58 +12:00
Daniel Beer
fd7792177e
Merge pull request #106 from yamt/finder_scan
...
finder_scan: Improve capstone detection on small images
2021-05-11 10:28:03 +12:00
Alexandre Perrin
121d685617
Merge pull request #101 from yamt/doc-make
...
README.md: document requirement on make command
2021-05-02 21:53:32 +02:00
YAMAMOTO Takashi
21b7581b04
Shrink struct datastream by borrowing the user buffer
2021-04-23 13:40:37 +09:00
YAMAMOTO Takashi
65379a7c39
finder_scan: Improve capstone detection on small images
...
When using small captured images, I somehow frequently see failures
to recognize a capstone due to rounding errors.
eg. when pb[] = {2 3 8 3 2}.
This commit tries to improve it by using fixed-point arithmetics.
The scaling factor was chosen somehow arbitrary. A moderate scaling
should be enough.
2021-04-23 10:36:22 +09:00
YAMAMOTO Takashi
734258c775
finder_scan: constify the "check" array
2021-04-23 10:36:22 +09:00
YAMAMOTO Takashi
02ed1066ba
test_grouping: use unsigned variables where it makes more sense
2021-04-23 10:36:22 +09:00
YAMAMOTO Takashi
6fb24d26c8
README.md: document requirement on make command
2021-04-17 22:35:46 +09:00
Alexandre Perrin
ed455904f3
Merge pull request #102 from yamt/readme-quirc-demo-opencv
...
Update for quirc-demo-opencv and dependencies
2021-04-16 20:38:38 +02:00
YAMAMOTO Takashi
ea9b6ee5ef
otsu: Use unsigned for the pixel numbers
...
Because singed numbers don't make sense here.
2021-04-08 13:38:30 +09:00
YAMAMOTO Takashi
de68db7b69
otsu: Use double for weighted sums
...
My phone camera produces 12M-pixel images.
They can easily overflow an int.
2021-04-08 13:38:30 +09:00
YAMAMOTO Takashi
a3623ea4f4
README.md: Update extra dependencies for each programs
2021-04-08 09:49:14 +09:00
YAMAMOTO Takashi
ef1b97015e
Makefile: quirc-demo-opencv doesn't use libjpeg
2021-04-08 09:49:14 +09:00
YAMAMOTO Takashi
a2b1358580
README.md: Update for quirc-demo-opencv
2021-04-08 09:49:11 +09:00
Alexandre Perrin
9c0f555acb
Merge pull request #94 from yamt/demo-opencv
...
quirc-demo-opencv: Add OpenCV version of the demo
2021-03-28 21:00:08 +02:00
Alexandre Perrin
7ef51ee6e7
Merge pull request #97 from yamt/readme-demo
...
README.md: mention requirements of each test/demo
2021-03-28 20:59:30 +02:00
YAMAMOTO Takashi
f10e7dc39a
README.md: mention requirements of each test/demo
2021-03-23 09:08:51 +09:00
YAMAMOTO Takashi
679e43f144
quirc-demo-opencv: Add OpenCV version of the demo
...
My motivation is to experiment quirc on macOS, where
neither of SDL1 or V4L2 work.
```
% brew install opencv
% brew install pkg-config
% brew install bsdmake
% bsdmake quirc-demo-opencv
% ./quirc-demo-opencv
```
Note: the macOS version of GNU make (/usr/bin/make) is a bit old
for quirc's Makefile.
2021-03-22 10:13:33 +09:00
Alexandre Perrin
7e7ab596e4
Merge pull request #89 from claudiofelber/master
...
Support horizontally flipped QR-codes according to ISO 18004:2015
2020-09-23 22:09:39 +02:00
Claudio Felber
8e8a638a5f
Update README.md with how to use quirc_flip()
2020-09-22 12:23:17 +02:00
Claudio Felber
2fd06df8de
Add support for flipped QR-codes in inspect and qrtest tools
2020-09-22 12:18:23 +02:00
Claudio Felber
4bc17cf8c6
Optimize quirc_flip()
2020-09-22 12:14:09 +02:00
Claudio Felber
5beb59e3b4
Support horizontally flipped QR-codes according to ISO 18004:2015
2020-09-21 16:54:55 +02:00
Daniel Beer
92026d26bd
Merge pull request #87 from claudiofelber/master
...
Fix stack corruption and bus errors while scanning oversized QR codes
2020-09-21 11:13:11 +12:00
Claudio Felber
963d6ed126
Fix stack corruption and bus errors while scanning oversized QR codes
2020-09-15 00:51:41 +02:00
Alexandre Perrin
744372e551
Merge pull request #77 from JaapHaitsma/warning-fix
...
Fix compiler warning
2020-05-20 09:02:14 +02:00
Jaap Haitsma
013a8922bb
Fix compiler warning
2020-05-19 19:01:38 -04:00
Alexandre Perrin
cbf911edf0
Merge pull request #69 from dlbeer/fix/c99
...
Refactored some c99 features
2020-03-13 21:51:35 +01:00
Alexandre Perrin
a0b41121e4
Refactored some c99 features
...
Fixes #68
2020-02-27 20:40:23 +01:00
Alexandre Perrin
2e8c4ce7bc
Add a README note about building with DQUIRC_MAX_REGIONS
...
Question about decoding large images has come up several times, let's
document it better.
2019-10-23 09:37:24 +02:00
Alexandre Perrin
026485bdc6
missing <limits.h> header
2019-09-25 11:10:43 +02:00
Alexandre Perrin
b77da026c9
README.md formatting tweaks
2019-09-25 11:07:20 +02:00
Alexandre Perrin
db4046f997
Merge pull request #61 from roger-wetzel/patch-1
...
Rename README to README.md
2019-09-25 10:59:47 +02:00
Alexandre Perrin
bf397f0794
Merge pull request #57 from kAworu/cosmetic
...
define a QUIRC_PIXEL_ALIAS_IMAGE constant to explicit conditional path
2019-09-25 10:59:08 +02:00
Alexandre Perrin
74459b9f59
Don't assume that sizeof(int) == sizeof(int32_t)
...
See https://github.com/dlbeer/quirc/pull/59#discussion_r320307589
2019-09-25 10:57:38 +02:00
Daniel Beer
f27a7c2c75
Merge pull request #62 from sushshring/master
...
Fixes issue #60
2019-09-10 15:33:52 +12:00
Sushrut Shringarputale
26d2402655
Fixes issue #60
2019-09-09 23:09:20 -04:00
Roger Wetzel
3046f4c710
Rename README to README.md
...
So this Readme gets rendered nicely.
2019-09-03 19:41:56 +02:00
Daniel Beer
c89d949371
Merge pull request #59 from sushshring/master
...
Fix some compile-time issues for better production usability
2019-08-22 11:43:05 +12:00