Skip to main content

BNcode

Project description

BNCODE

A BN code (an initialism for Boon code) is a type of data storage as an image that design for low resolution work with low data quality. in this version it can be store 32 bit or 4 bytes that can store number from 0 upto 4,294,967,295

Design

BN code is detected by a 2-dimensuinal digital image sensor and program.

Normal QRcode

BNcode version 1, 8x8 pixel

Storage Capacity with version 1

Input Mode Max. Capacity
Numeric 0 - 4,294,967,295
Character 4 characters (8 bit per char)

Encoding

The format information records two things: bit data and ref bit. bit data is your data and bit ref is bit that the scanner will compare with the bit data.

border section

border section

data section

data section

mirror blocking

mirror blocking

color black and white refer to 0,1 in binary the decoder will read color on image from top-down,left to right

why mirror blocking is important because BNcode store binary directly to image the flipped image with cause a worng data reading

Decoding

read the encoding section ---

Example Code

Read and write

from bncode import create, scan
import cv2

cv2.imwrite("bncode.png",create(123456)) # create image
print(scan(cv2.imread('bncode.png'))) # scan image

Scan from camera

from bncode import create, scan
import cv2

cam = cv2.VideoCapture(0)
while True:
    c,img = cam.read() # read image from camera
    print(scan(img)) # scan image
    cv2.waitKey(1)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bncode-0.0.4.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bncode-0.0.4-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file bncode-0.0.4.tar.gz.

File metadata

  • Download URL: bncode-0.0.4.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for bncode-0.0.4.tar.gz
Algorithm Hash digest
SHA256 cd75150940247a7e7898fe2e7805bdbce09084627053671fba824170208c9516
MD5 d8d064c151521af15ef17b38d7215ded
BLAKE2b-256 c733e4495634500b4dea165221d03b3a8743ec8c4b9fb869a21b16541c1b6f7b

See more details on using hashes here.

File details

Details for the file bncode-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: bncode-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for bncode-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 28b6c6cf253ad3e1b10a85724012143993f091e156e216b2029a2b0ec96b1f2f
MD5 3873b62ccdb2a521cdfc81b17735956d
BLAKE2b-256 3c84c6994e0b979dbc53ee4d047272842ff55837531e58a540be70a4bae51131

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page