Closed RexWzh closed 1 year ago
Base: 100.00% // Head: 100.00% // No change to project coverage :thumbsup:
Coverage data is based on head (
c043ab3
) compared to base (10b5721
). Patch coverage: 100.00% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
where's the source of test image
test/assets/badapple.png
? Is it well-licensed and okay to use?
It is an image capture of the bad apple video.
I think it is ok since there are lots of secondaries of bad apple on the internet. And the old "saying", If there's a screen, there can be Bad Apple.(有屏幕的地方就有烂苹果)
I think it is ready for merge now.
code = QRCode("HELLO WORLD", eclevel=High(), version=40, width=4);
@btime qrcode(code);
# 667.130 μs (12993 allocations: 918.61 KiB)
mat = @btime imageinqrcode(code, img, rate=1);
# 16.706 ms (137533 allocations: 14.23 MiB)
All the steps cost less than 100 μs
except the last for loop.
for mask in 0:7
code.mask = mask
newmat = qrcode(code) # 663.652 μs (12991 allocations: 914.25 KiB)
for (vinds, blockinds) in zip(validmsgecinds, msgecinds) # 81 block
errinds = filter(x -> newmat[x] != targetval(x), vinds)
inds = filter!(isvalid, pickcodewords(errinds, blockinds, destroy))
newmat[inds] = targetval.(inds)
end
...
end
Plot using error correction.
Plot image inside QRCode as mentioned in #38
Example
The image above is generated without using the remainder message bits. For cases like subtitle, the real message bits take only about 10% of the message space. By this, we can reduce noise and enlarge the image in the center. For now, I use
getsegments
to track the message bits, might need a little work after the first stage passed.Related table: characters capacity for
UTF8
mode withHigh
quality.For example, one can store at least 62(250/4) characters in version 16 using
UTF8
mode in the worst case.