Closed Ricotan-Linus closed 4 years ago
main.rs
let img = image::open("QR.png").unwrap();
let decoder = bardecoder::default_decoder();
let results = decoder.decode(&img);
for result in results {
println!("{}", result.unwrap());
}
}
Cargo.toml
name = "XXX"
version = "0.1.0"
authors = ["Ricotan-Naboon <XXXX>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bardecoder = { version = "0.2.2", features = ["debug-images"] }
image = "0.22.5"```
Hi, this is because the image suffers from compression artifacts and a slight blurriness. My algorithm isn't capable enough to deal with it. I ran it through a simple sharpen filter (for example with the Photos editor in Windows); then it was able to be decoded.
Hey, I'm a Japanese stupid student who has a question. I tried reading this card QR. (This card is "aikatsu" which famous idol anime in Japan) but rust return
thread 'main' panicked at 'called
Result::unwrap()on an
Errvalue: QRError { msg: "Format information corrupted" }', src/main.rs:9:31
. I don't know encoding and other QR technical specifications. Please tell me how to fix can read QR.