• mjb over 2 years ago

    mjb edited over 2 years ago
    In the 1990s, WEA Mfg. and WME put Code 39 barcodes in their CD matrix areas.

    Bong identified this fact for WME a while back, and I just confirmed it is the same on a few of my SRC discs (click for list). Bong also mentioned a way of manually reproducing the barcode which can then be scanned on-screen.

    Well, I figured out a way to get barcode scan from my screen after manipulating a scan of the original disc in Photoshop.

    You can test it with this scan: https://www.discogs.com/release/2083622#images/25358975

    1. Make sure the center of the image is the center of the disc. Optionally, you can save some time if you rotate the image so that the barcode perfectly occupies the bottom half of the mirror band—e.g., mark a line with the ruler, click Straighten to rotate and crop, then Undo the crop.

    [The order of the next steps doesn't really matter]

    2. Make sure the thinnest bars are at least a few pixels wide on your monitor. I recommend a 400 dpi scan of the disc, i.e. so the diameter of the mirror band is roughly 710 pixels. (The test image I linked to will be slightly smaller than this, but still works.) Sometimes you can just zoom in on a lower-res scan, if it's clear enough.

    3. If needed by your barcode scanner, invert the colors, so there are dark bars against a light background. In Photoshop on Windows, this is Ctrl+I, or Image > Adjustments > Invert.

    4. Adjust levels as needed to get the barcode to be high-contrast. In Photoshop, you might first try Image > Adjustments > Threshold, and play with the slider.

    5. Do this: Filters > Distort > Polar Coordinates > Polar to Rectangular ... the barcode should be somewhat flat now.

    6. If the barcode is in two pieces, one on each side of the screen (e.g. because you didn't rotate it to a good position in step 1), then use Filters > Other > Offset > and do a horizontal shift with undefined areas set to Wrap Around. Alternatively, you can cut and paste the two sections together. Either way, the barcode should now be scannable on your monitor with a Code 39-capable scanner.

    This method does not seem to work with the Sony DADC barcodes; they are too narrow and seem to be in a custom format, albeit a simple one. I'd also like to figure out the JVC block codes.
  • mjb over 2 years ago

    In BAOI fields, I have been entering the scanned codes as, for example,

    Barcode (Matrix area, Code 39): 17056A

    This is more-or-less what Bong was doing as well.

    Bong also enters the scanned codes with the start and stop bars represented by asterisks, which is apparently traditional for Code 39. My phone's barcode scanning app does not report these bars as part of the scanned code, and the more I think about it, the less important it seems to be; the bars at the beginning and end aren't really representing asterisks, per se; they are just there for the benefit of the scanner. Although I entered a few with the asterisks anyway, I decided to stop doing that.
  • Bong over 2 years ago

    I'm happy to see someone else taking interest in matrix barcodes.
    Good work!
    I will have to try that myself.
  • JT_X over 2 years ago

    JT_X edited over 2 years ago
    Oh, great. More info for me to enter. ;)

    I just tried this with the suggested image, and it works. Very handy.

    I grabbed the images I submitted with Andy Hunter°* - Presence and tried this, and see that the barcodes on the CD and DVD are 407427 and 407428, respectively. My scanner identifies these as Code 39.
  • zevulon over 2 years ago

    ...I'm not even going there.. HaHa! Good job, you two!! :)
  • mjb over 2 years ago

    The part that will really drive you up the wall is that now the discs that don't have the barcode probably are may be separate pressings, by our standards.
  • mjb over 2 years ago

    mjb edited over 2 years ago
    In fact, here we go:

    Time to decide if barcode in matrix area = separate submission

    I had to post about this in the main forums since we're just discussing scanning here.
  • JT_X over 2 years ago

    JT_X edited over 2 years ago
    I've been annoyed how the Polar Coordinates filter squashes the barcode horizontally, sometimes making it unreadable. The image's original width is used for the final image.

    What I wanted was to roll out the barcode without distorting it, so I needed the width of the image to be the same as the circumference of the circle. Circumference is pi times diameter (C = πd). The diameter is the width of the image, if the image is cropped correctly.

    If the scan is 600 pixels wide, then π multiplied by 600 ≅ 1885 pixels. If you change the Image Size in Photoshop from 600px to 1885px wide, non-proportionally, and then do the Polar Coordinates filter, you'll get a barcode where the bars are pretty close to their original width, and it should be easier to scan.

    I tried this on Diana Damrau, Royal Liverpool Philharmonic Orchestra, David Charles Abell* - Forever (Unforgettable Songs From Vienna, Broadway And Hollywood), and found a code 128 barcode. It probably would have worked without this trick, but I'm going to keep using it to see if it helps with other codes that have been impossible to read. I tried it on Information Society = インフォメーション・ソサエティ* - 1,000,000 Watts Of Love = ミリオン・ワッツ・オブ・ラヴ C/W Peace And Love, Inc., and got a clear code, but my scanner was unable to read it.

    Update: It worked on First Baptist Church Sanctuary Choir & Orchestra, Jackson, MS - My Faith Still Holds and Moby - Honey And Run On, whereas it wasn't readable without the stretching trick.
  • mjb over 2 years ago

    JT_X
    I needed the width of the image to be the same as the circumference of the circle

    Ah, so that's how it works!

    I ran across the same issue yesterday on a Canadian disc pressed by Cinram. The barcode was very short, and ended up impossibly narrow when straightened; there just wasn't enough space between the bars to make them distinguishable to the scanner. So I just tried adjusting the image size to a larger amount before doing the polar coordinates filter. I randomly chose about 3 times the original size, and it worked. But I was just shooting in the dark.

    That Japanese InSoc CD is made by Sony DADC. I'm glad you could get it to be scannable. I have not figured out the format of those barcodes. It does not seem to be any of the common standards. It is a very simple binary code, just alternating wide and narrow bars, always with several wide ones on one end, and no variations in spacing... but whatever it represents is a mystery.
  • JT_X over 2 years ago

    mjb
    That Japanese InSoc CD is made by Sony DADC. I'm glad you could get it to be scannable. I have not figured out the format of those barcodes. It does not seem to be any of the common standards. It is a very simple binary code, just alternating wide and narrow bars, always with several wide ones on one end, and no variations in spacing... but whatever it represents is a mystery.

    Yeah, it was crystal clear, but my scanner was mystified. I have an old iPod running 6.1.6, and my app is called Universal Scanner. My options are limited.

    As you've noted, the JVC barcodes are also strange, but I've been unable to even get a clean image of one. They don't show up unless the CD is held at an angle.
  • JT_X over 2 years ago

    A wiki article should be written up on this topic.
  • mjb over 2 years ago

    Well, it did not take long to find a matrix barcode that was screwed up. This one is a Code 39 one on a WME disc:
    https://www.discogs.com/Yes-Owner-Of-A-Lonely-Heart/release/508467#images/25479102

    Starting from the right side it's *03H5RPK8 ... there's no stop character on the end, so both of my scanning apps won't read it. I had to resort to manual decoding, and then verifying my work with an online barcode generator.

    I have not checked any other WME discs, so if you run across more like this, I'd like to know, so we know whether this is a common problem.
  • Bong over 2 years ago

    I haven't got Photoshop but I found a filter for Paint.NET (freeware) that worked really well. It's the Polar transformations plugin that can be downloaded from http://forums.getpaint.net/index.php?showtopic=7186

    These are the steps I used:
    Scan at 600dpi. Sometimes I put the CD in a PVC sleeve to avoid it being to dark, described here: https://www.discogs.com/group/thread/510798
    Adjust brightness/contrast
    Convert to Black/White (greyscale actually)
    Invert Colors
    Posterize
    Polar transformation, set the angle so that the barcode is continuous.
    Rectangular selection so that only the barcode is selected.
    Stretch the barcode so that it covers the whole canvas.
    Crop as needed.
    Scan with Accusoft Barcode Scanner
    Double check the result by entering the digits in Notepad and change the font to Free 3 of 9.

    Tried it on Vernon's Wonderland using mjb's wording for description which I think is a good example.
  • JT_X over 2 years ago

    I've found that I don't always need to convert to grayscale. Inverting the colors is necessary for my scanner. I've saved time by holding my iPod up to the screen while I adjust levels until it recognizes the barcode. Today I had to stretch a code to make it taller to get it to be recognizable.
  • mjb over 2 years ago

    JT_X
    A wiki article should be written up on this topic.

    I started one: https://reference.discogslabs.com/wiki/CD-matrix-barcodes
  • JT_X over 2 years ago

    It'd be great to flesh that out with graphic examples of different barcodes and the scanning process.
  • Bong over 2 years ago

    I just found out how I can skip a few steps from the method that I use. By scanning black/white (text) instead of colour.
  • mjb 5 months ago

    I created a guide for the scanning technique:
    https://reference.discogslabs.com/wiki/cd-matrix-barcode-scanning

Log In You must be logged in to post.