Description
Adding support for DX film edge barcode
Hello ZXing team,
I'm working on a personal project where I would like to be able to scan DX film edge barcodes.
DX film edge barcodes?
These are the kinds of barcodes we find on the edge of 35mm negative films, like at the bottom of the following image:
They refer to the DX encoding system.
In this barcode, there are two numbers:
- the film model (manufacturer and type of film)
- the current image number (+ a flag to indicate whether we are in the middle or the end of the image)
So... Why would I need to read them?
More and more people are involved in digitizing negatives at home. The film model number is important to know, so we can apply the right color treatment to the pictures.
Some people use dedicated film scanners, which already read this code and can apply the appropriate color treatment automatically.
Other people, including me, use a DSLR to digitize the films. This is done in two main steps:
- Take a picture of the negative with a proper setup (backlight, macro lens...): with a lot of setups, only the picture itself is digitized, not the barcode.
- Apply an appropriate color treatment on the computer to retrieve more or less the original colors, to obtain the "positive". Darktable, Lightroom, Negative Lab Pro, etc. are some tools that can help in this way. Some tools can help in guessing the color treatment but, generally, it's better to know the film model.
This is why I'm interested in adding the support for DX film edge barcode. Some industrial products with closed-source software already do this kind of job to apply a color treatment, but the number itself is not displayed and I didn't find any open-source solution to do it.
How to read them
DX edge barcodes have some characteristics in common with QR codes:
- patterns to indicate the beginning and the end of the barcode,
- a "clock" to help read the signal with the machine,
- the signal itself (2 dimensions in the QR codes, 1 dimension in the DX film edge barcode).
An expired Kodak patent explains how to read them (pdf version).
Here is an image extracted from the patent that explains the pattern. It does not explain exactly how to decode it but it gives an idea. If you are interested, I can post how to decode it step by step.
Does this belong to Zxing-CPP?
So my actual question is: does decoding this kind of barcode belong to this project? I understand this is a "niche" feature and a few people might use it. But, if I worked on this one and I opened a PR, would you consider it? Or do you know another project that would be more appropriate?
Thank you for your attention and sorry for the long post. At least I hope it was instructive!