Scanner for decks of cards with bar codes printed on card edges

Overview

The Nettle Magic Project

This deck of cards has a bar code printed on the edge of each card. Scanning these bar codes would reveal where every card is (or isn't - if cards are missing.)

Think card magic.

A deck of cards with digital marks printed on the edge of each card.

This wouldn't be a very good magic trick if you could see the marks. We need invisible marks.

One of these decks is unmarked, the other is marked with this special ink that is only visible under specific IR conditions.

Two decks of cards - each viewed from the same end. Both decks appear normal.

This device (a Raspberry Pi Zero W with a NoIR camera) can see these marks. The shiny circle is a special IR filter.

A scanning server runs on this small device.

A small computer module, about the size of a thumb. It has a small camera attached. The lens of the camera is covered with what looks like s small round mirror.

This is Abra, the iOS client application running on my iPad. It shows what the server's camera sees along with the decoded deck. As you can see, the IR marks are quite visible to the camera.

A screenshot of an app containing an array of playing cards in suit and numerical order, with a black-and-white image of a deck of playing cards with edge-marks clearly visible.

Your iDevices can also be a server, but they can't see those infrared marks, even with special filters. However, they can see black ink marks and marks made using a different type of invisible ink - ultraviolet fluorescing ink.

A deck of cards with marks on the edges of cards that are glowing brightly under the light of a UV pen light. Next to the deck is an iPad showing the deck from it's camera's perspective.

For hard core developers, I've included the testbed, which has a bunch of visualization tools to understand how things work.

A screenshot of an app that shows a deck of cards in a viewport with marks outlined digitally, and various statistics listed below.

The testbed only runs on Mac. However, the server app is a generic Linux console app and it includes a text-based GUI mode.

A text-based console app with an image of a deck of cards printed using alphanumeric characters. Statistics appear below this text-based viewport.

Performance is critical.

The statistical model requires a full 30Hz of data. Also, this can be strapped to a person's body during a performance. Efficiency means longer battery, less heat.

It can scan/decode a 1080p image to an ordered deck in as little as 4ms. On a rPI.

Get started

Full documentation is available here.

You might also like...
CHIOTPField is a set of textfields that can be used for One-time passwords, SMS codes, PIN codes, etc. Mady by @ChiliLabs - https://chililabs.io
CHIOTPField is a set of textfields that can be used for One-time passwords, SMS codes, PIN codes, etc. Mady by @ChiliLabs - https://chililabs.io

CHIOTPField CHIOTPField is a set of textfields that can be used for One-time passwords, SMS codes, PIN codes, etc. All fields support insertion of one

A protocol that allows any class to be printed as if it were a struct or a JSON object.

ReflectedStringConvertible A protocol that extends CustomStringConvertible and uses reflection to add a detailed textual representation to any class.

Example of adding marching ants selection to the edges of the image.
Example of adding marching ants selection to the edges of the image.

JMCMarchingAnts Library that lets you add marching ants (animated) selection to the edges of the images. Usage: * Copy the JMCMarchingAnts.swift file

UIView subclass that bends its edges when its position changes.

AHKBendableView BendableView is a UIView subclass that bends its edges when its position change is animated. Internally, BendableView contains CAShape

SharkCardScan is a Credit/Debit Card scanner built using Apple's Vision Framework.
SharkCardScan is a Credit/Debit Card scanner built using Apple's Vision Framework.

iOS Credit/Debit card scanner, built using Apple's Vision Framework.

A credit card scanner for iOS written in Swift
A credit card scanner for iOS written in Swift

DGCardScanner A credit card scanner Requirements iOS 13.0+ Swift 5.5+ Xcode 10.0+ Installation SPM File Add Packages https://github.com/donggyushi

Card-based view controller for apps that display content cards with accompanying maps, similar to Apple Maps.

TripGo Card View Controller This is a repo for providing the card-based design for TripGo as well as the TripKitUI SDK by SkedGo. Specs 1. Basic funct

Cardshark is an iOS card counting App that uses state of the art machine learning (YOLO) to classify and count the cards at real time.

Cardshark The game of Blackjack is one of the most popular casino games in the world. It is also the most winnable using a skill called Card Counting.

Cards - A SharePlay enabled card game for iOS & macOS

Deal ♣️ Overview A simple demo app showing the implementation of a card game acr

With QRKit you can easily create QR or bar codes in Swift.

With QRKit you can easily create QR or bar codes in Swift. You can choose foreground and background colors. The QR code you get simply as UIImage.

card.io provides fast, easy credit card scanning in mobile apps
card.io provides fast, easy credit card scanning in mobile apps

card.io SDK for iOS card.io provides fast, easy credit card scanning in mobile apps. NEW!!! card.io is now an open-source project! As of December 2014

Ios-card-transition - iOS CocoaPod to create beautiful card transitions
Ios-card-transition - iOS CocoaPod to create beautiful card transitions

CSCardTransition CSCardTransition is a small library allowing you to create wond

SwiftUI-Card - Simple card ui designed using SwiftUI
SwiftUI-Card - Simple card ui designed using SwiftUI

SwiftUI - Card Simple card ui designed using SwiftUI Preview

IOS Card Game - A simple card game using SwiftUI
IOS Card Game - A simple card game using SwiftUI

IOS_Card_Game A simple card game using Swift UI.

Appstore card animation transition. UICollectionView and UITableView card expand animated transition
Appstore card animation transition. UICollectionView and UITableView card expand animated transition

Appstore card animation transition. UICollectionView and UITableView card expand animated transition. This library tries to add the appstore transition to your own app. The goal is to be as simple as possible to integrate in an app while keeping the flexibility and customization alive.

:mag_right: A simple and beautiful barcode scanner.
:mag_right: A simple and beautiful barcode scanner.

Description BarcodeScanner is a simple and beautiful wrapper around the camera with barcode capturing functionality and a great user experience. Barco

CarBode : Free & Opensource barcode scanner & generator for SwiftUI
CarBode : Free & Opensource barcode scanner & generator for SwiftUI

CarBode Free and Opensource Barcode scanner & Barcode generator for swiftUI Why you must use CarBode CarBode have both Barcode Scanner and Barcode Gen

:mag_right: A simple and beautiful barcode scanner.
:mag_right: A simple and beautiful barcode scanner.

Description BarcodeScanner is a simple and beautiful wrapper around the camera with barcode capturing functionality and a great user experience. Barco

 QR Blank - QR Code URL scanner
QR Blank - QR Code URL scanner

QR Blank - QR Code URL scanner No Ads, Clean, Simple open source QR Code URL scanner Check URL by Google Safe Browsing before open. Google Safe Browsi

Comments
  • Compilation error

    Compilation error

    I tried to run steve but I encountered a problem. Screenshot 2022-07-01 at 15 32 12 It is written that there are files missing in the directory where there are the demonstration videos. So I manually added fake videos to see if the code compiles and I got this (My fake videos are simply videos that I renamed with the missing file names in the error message ): Screenshot 2022-07-01 at 15 37 25 The code compiles but I still have a problem. Even when I drag and drop a video it does not work, could you help me pls?

    opened by Chtwin 8
  • Pre-built binaries?

    Pre-built binaries?

    I think it would be a good idea to provide some pre-built binaries for people who don't have a Mac. I do have a Mac, but it's old and I can't even fit Xcode on the amount of space I have left. I'm gonna try a macOS VM in a few minutes, but it'd still be nice to have the binaries. Especially for Abra, packaged as an IPA file.

    opened by KoolenDasheppi 5
  • Swift Compile Error

    Swift Compile Error

    I just try to run Steve on my mac in Xcode, it says Swift Compiler Error 'aalib.h' file not found (cheader.h) Could not build Objective-C module 'C_AAlib' (TextUI.swift)

    167501656656913_ pic )

    opened by caichunjian520 1
Releases(whisper-v29@main+video-rpi)
  • whisper-v29@main+video-rpi(Jul 6, 2022)

    Build of whisper for Raspberry Pi devices running Raspbian Bullseye on armv7 or better hardware. This was built/tested on a rPI model 4.

    ✅ This build includes video capture support ✅

    Prerequisites

    In order to run, you will need to install some dependencies and setup a few files. Do this in a terminal on your Raspberry Pi.

    Your best bet is to clone the repo and drop the pre-built whisper binary into the root of that directory.

    Then, from within that directory, do these things:

    # First, install the repository for the Swift language (see https://github.com/futurejones/swift-arm64)
    $ curl -s https://archive.swiftlang.xyz/install.sh | sudo bash
    
    # Next install the dependencies
    $ sudo apt install libpng-dev libncurses5-dev libaa1-dev libavcodec-dev libavformat-dev swiftlang
    
    # Next, setup your config files
    $ ln -s decks.json ~/.decks.json
    $ ln -s whisper.conf ~/.whisper.conf
    
    $ Finally, run a test
    $ ./whisper -6 Sources/Steve/Steve/Reference/inter6.quick-random-movements.mp4
    

    If all goes well, that last command should produce a text-based GUI showing you the playback of the video along with stats of the scanning process.

    Source code(tar.gz)
    Source code(zip)
    whisper.tgz(790.36 KB)
  • v1.0-fixed-deps(Jul 5, 2022)

  • whisper-v29@main-rpi(Jul 5, 2022)

    Build of whisper for Raspberry Pi devices running Raspbian Bullseye on armv7 or better hardware. This was built/tested on a rPI model 4.

    ❌ This build does not include video capture support ❌

    Prerequisites

    In order to run, you will need to install some dependencies and setup a few files. Do this in a terminal on your Raspberry Pi.

    Your best bet is to clone the repo and drop the pre-built whisper binary into the root of that directory.

    Then, from within that directory, do these things:

    # First, install the repository for the Swift language (see https://github.com/futurejones/swift-arm64)
    $ curl -s https://archive.swiftlang.xyz/install.sh | sudo bash
    
    # Next install the dependencies
    $ sudo apt install libpng-dev libncurses5-dev libaa1-dev libavcodec-dev libavformat-dev swiftlang
    
    # Next, setup your config files
    $ ln -s decks.json ~/.decks.json
    $ ln -s whisper.conf ~/.whisper.conf
    
    $ Finally, run a test
    $ ./whisper -6 Sources/Steve/Steve/Reference/inter6.quick-random-movements.mp4
    

    If all goes well, that last command should produce a text-based GUI showing you the playback of the video along with stats of the scanning process.

    Source code(tar.gz)
    Source code(zip)
    whisper.tgz(771.02 KB)
  • v1.0(Jul 4, 2022)

Owner
Paul Nettle
By day I work at Gearbox Software. By night, I work on whatever interests me.
Paul Nettle
SharkCardScan is a Credit/Debit Card scanner built using Apple's Vision Framework.

iOS Credit/Debit card scanner, built using Apple's Vision Framework.

Gymshark 23 Nov 16, 2022
QR Barcode Scanner For Swift

QRBarcodeScanner Example To run the example project, clone the repo, and run pod

null 0 Dec 22, 2021
Swiftly convert country codes and cultural terms to all 269 emoji flags without hassle

Swiftly convert country codes and cultural terms to all 269 emoji flags without hassle

Arnold Rozon 2 May 9, 2022
A custom ImageView that is used to cover the surface of other view like a scratch card, user can swipe the mulch to see the view below.

MCScratchImageView GIF Showcase Requirments iOS 8.0+ Xcode 7.2+ Swift 4.0 Installation CocoaPods pod "MCScratchImageView" Manually Just drag MCScratch

Jaylen Bian 359 Dec 17, 2022
ThreeDCardView - Library that you can see images with a 3D card 🌌

?? ThreeDCardView Usage First you have to import 'ThreeDCardView' import 'ThreeDCardView' Create ThreeDCardView and set the frame let threeDCardView:T

Fomagran 4 Jul 9, 2022
Easy customizable avatar image asynchronously with progress bar animated

JDSwiftAvatarProgress ##Objective-C JDAvatarProgress is available in Objective-C also, JDAvatarProgress Usage To run the example project, clone the re

Jelly Development 86 May 16, 2022
Card Decks is a small utility application for your iPhone, iPod touch and iPad which brings you simple, configurable, colored, multi-line text cards that are grouped into card decks

Card Decks is a small utility application for your iPhone, iPod touch and iPad which brings you simple, configurable, colored, multi-line text cards that are grouped into card decks.

Arne Harren 40 Nov 24, 2022
Swipe able, customizable card stack view, Tinder like card stack view based on UICollectionView. Cards UI

Swipable, customizable card stack view, Tinder like card stack view based on UICollectionView. Cards UI Сocoapods installation Add in your Podfile: po

Indy 850 Nov 17, 2022
A Simple iOS QR code scanner that allows users to enable their camera and local Photo Library accesses to scan the contents of the input QR codes.

iOS QR Code Scanner A Simple iOS QR code scanner using Swift UI. Jump to: ContentView.swift screenshot 1.1.5 NOTE: be aware of the new horizontal line

Krystal Zhang 0 Jan 1, 2023
A customisable view for entering arbitrary length pins, codes or passwords in iOS. Supports iOS 12 one time codes.

CBPinEntryView CBPinEntryView is a view written in Swift to allow easy and slick entry of pins, codes or passwords. It allows backspacing, dismissal o

Chris Byatt 183 Dec 5, 2022