Hacker News new | ask | show | jobs
by TheJoeMan 889 days ago
I’m confused why you’d need to deskew 1D barcode. 2D have the fiducials meant for image warp corrections. 1D is meant for a laser to sweep across at any odd angle up to diagonal across all the bars. Why not read the pixels in 1 horizontal row of the image and use an algorithm more like the laser does? You’re looking for alternating black/white with unknown period.
1 comments

This is in fact how ZBar works, see zbar/scanner.c (source: I am the original author of the ZBar QR code support, and I was pretty envious of how easy 1D codes are, conceptually).