Skip to content

GS1_128 initiative: air, water, and barcodes shall be free #1234

Open

Description

@stonebig

Battle-Plan

  • phase1: the Barcode,
    • Proof-of-Concept Notebook that we can go till there : we can generate a full GS1_128 Barcode on Jupyterlite
    • workaround till 'true' GS1_128: legend and FNC1
    • QRcode basic writer, via qrcode package (works on jupyterlite)
    • QRcode basic camera reader, via opencv-python (but camera capture may need a trick for Jupyterlite)
    • provide said Proof-of-Concept Notebooks in WinPython, with Simple Code
  • phase2: more simple integration
    • QRcode GS1_128: writing
    • Control Key checker,
    • SSCC and GTIN generators
    • API SSCC Generators
  • phase3: more versatility industry 4.0
    • QrCode: reading back GS1
    • Datamatrix: reading back GS1
  • phase4: printing simply a full label
    • simple layout system... how to do it simple... chatGPT and eco-system to the rescue ?
    • WebApp

Activity

  1. stonebig commented on May 28, 2023

    @stonebig
    ContributorAuthor

    hum:

    • a barcode solution can work even in JupyterLite: python-barcode
    • GS1-128 in python-barcode:
      - [x] legend not to the standard, miss the '(00)' Application Identifiers highlight, to workaround
      - [x] legend not as FailSafe as it could: misses the spacing on (00), for when things are to retype by handt, to workaround
      - [ ] toolchain depend of a "file" step ?? documentation not clear on how to avoide this, help appreciated
      - [ ] FNC1 seems pre-fixed in front of the string and sent to Code128, even if it's already pre-fixed... u'\xf1'
      - [ ] propose upstream to provide patches if interested and no-one active on this
    • check python-barcode vs ean128 grand zebu sensei,
    • re-program workaround in a more "readable/universal" way: simple readable Python
  2. stonebig commented on May 28, 2023

    @stonebig
    ContributorAuthor

    Phase1 progress:

    • works on Jupyterlite (even with the file step...)
    import micropip
    await micropip.install("python-barcode")
    import barcode
    barcode.PROVIDED_BARCODES
    from barcode.writer import ImageWriter
    gs1_128 = barcode.get_barcode_class('gs1_128')
    from IPython.display import SVG, display
    gs1_128 = barcode.get_barcode_class('gs1_128')
    my_gs1 = gs1_128('00006141411234567890', writer=ImageWriter)
    fullname = my_gs1.save('gs1_barcode')
    display(SVG(fullname))
    

    image

    • a true GS1_128 legend
      image
  3. changed the title [-]EAN128[/-] [+]GS1_128[/+] on May 28, 2023
  4. changed the title [-]GS1_128[/-] [+]GS1_128 initiative[/+] on May 29, 2023
  5. changed the title [-]GS1_128 initiative[/-] [+]GS1_128 initiative: air, water, and barcodes shall be free[/+] on May 29, 2023
  6. stonebig commented on May 29, 2023

    @stonebig
    ContributorAuthor

    phase1: QRcode , using awesome stupid simple tutorial from https://www.youtube.com/watch?v=iAAKghEiUjY&t=65s

    • QRcode writer: use qrcode
    # writing QRcode "de base"
    
    
    # check jupyterlite ok
    import micropip
    await micropip.install("qrcode")
    
    import qrcode
    from IPython.display import Image, display
    img = qrcode.make('artisou à croûte')
    img.save("test.png")
    display(Image(filename='test.png'))
    

    image

    • QRcode reader: use opencv-python, but camera taking requires massage on Jupyterlite (but panel can do, so there is a way)
    # reading QRcode
    # import the opencv library
    import cv2
    
    # define a video capture object
    vid = cv2.VideoCapture(0)
    
    detector = cv2.QRCodeDetector()
    
    while True:
    
        # Capture the video frame by frame
        ret, frame = vid.read()
    
        data, bbox, straight_qrcode = detector.detectAndDecode(frame)
        if len(data) > 0:
            print(data)
    
        # Display the resulting frame
        cv2.imshow('frame', frame)
    
        # the 'q' button is set as the
        # quitting button you may use any
        # desired button of your choice
        if cv2.waitKey(1) & 0xFF == ord('q'):
            break
    
    # After the loop release the cap object
    vid.release()
    # Destroy all the windows
    cv2.destroyAllWindows()
    
    

    image

  7. stonebig commented on May 29, 2023

    @stonebig
    ContributorAuthor

    phase2:

    • prefixes
      image

    • Datamatrix pre-work:

      • 'xf1' for Code128 is to deplace per ']d2' for Datamatrix

    image

    image

    • QRcode prework:
      • 'xf1' is to replace per ']Q3' for QRcode
        image

    image

    image
    image

    norm QR_standard

    https://www.swisseduc.ch/informatik/theoretische_informatik/qr_codes/docs/qr_standard.pdf
    image

    • QRcode augmented... what is that ?

    image

    image
    image

    image

  8. stonebig commented on May 29, 2023

    @stonebig
    ContributorAuthor

    phase 2:

    image

    shall be (01)00799439956618(200)//https:barcodeaustralia.com

  9. stonebig commented on May 29, 2023

    @stonebig
    ContributorAuthor

    phase3:

    import numpy as np
    import cv2
    from pylibdmtx import pylibdmtx
    
    if __name__ == '__main__':
    
        image = cv2.imread('datamatrix_sample.png', cv2.IMREAD_UNCHANGED);
        gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
        ret,thresh = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY | cv2.THRESH_OTSU)
    
        msg = pylibdmtx.decode(thresh)
        print(msg)
    
  10. stonebig commented on Jun 11, 2023

    @stonebig
    ContributorAuthor

    this blows my mind... can we dream to do it ?

    image

  11. 8 remaining items

  12. stonebig commented on Dec 22, 2025

    @stonebig
    ContributorAuthor

    to recheck, as it may have rusted a bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions