Skip to content
Proyectos

Acerca de

Sudoku solver with OCR capability on iOS (edit: developed for iOS 4 before ARC, some memory reference changes may be required to get the app to make a full run.)

Desarrollo web y de aplicaciones

Cómo se miden estas cifras

Crecimiento de estrellas medido

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original
Sudoku Resolv
=============

Photograph a sudoku puzzle, let OpenCV find the board and read the digits,
then solve it. Originally a 2011 iOS 3.2 app; modernized in 2026 to iOS 16+,
SwiftUI, and OpenCV 4.13.

Requirements
------------

- Xcode 16 or newer
- opencv2.xcframework (OpenCV 4.13.0) at the repository root (see below)

Getting opencv2.xcframework
---------------------------

The xcframework is not checked in (it is ~37 MB of build output). Build it
once from the official OpenCV 4.13.0 sources (needs cmake and python3):

    git clone --depth 1 --branch 4.13.0 https://github.com/opencv/opencv.git
    python3 opencv/platforms/apple/build_xcframework.py --out build \
        --iphoneos_archs arm64 --iphonesimulator_archs arm64 \
        --build_only_specified_archs \
        --without objc --without dnn --without gapi --without stitching \
        --without video --without videoio --without objdetect --without photo \
        --without calib3d --without features2d --without flann
    cp -R build/opencv2.xcframework <this repo>/

(The official release asset opencv-4.13.0-ios-framework.zip is a fat
framework without an arm64-simulator slice, so it cannot be used for
simulator builds on Apple Silicon — hence the source build.)

Caching the built xcframework
-----------------------------

Building takes 20+ minutes, so after a successful build we keep a
tarball outside the repo. If opencv2.xcframework/ ever gets wiped
(e.g. by `git clean -fdx`), restore it from the cache instead of
rebuilding:

    # save (run once, after building)
    tar -czf ~/Library/Caches/opencv2.xcframework.tar.gz \
        -C <this repo> opencv2.xcframework

    # restore
    tar -xzf ~/Library/Caches/opencv2.xcframework.tar.gz \
        -C <this repo>

Note: `git clean -fdx` will remove the xcframework because it is
gitignored. Use `git clean -fdx -e opencv2.xcframework` to preserve it.

Building and testing
--------------------

    xcodebuild -project Sudokubot.xcodeproj -scheme Sudokubot \
        -destination 'platform=iOS Simulator,name=iPhone 16' build

    xcodebuild -project Sudokubot.xcodeproj -scheme Sudokubot \
        -destination 'platform=iOS Simulator,name=iPhone 16' test

Architecture
------------

- SwiftUI app (SudokubotApp, HomeView, PreviewView, BoardView, ArchiveView,
  HelpView) with a Swift solver (Solver.swift) and archive layer
  (ArchiveEntry/ArchiveManager.swift — same on-disk format as the 2011 app).
- C++/Objective-C++ vision core on the OpenCV 4 C++ API: boardRecognizer
  (board detection + grid extraction), basicOCR (cv::ml::KNearest digit
  classifier), cvutil (UIImage <-> cv::Mat).
- SudokuBridge is the single thin Objective-C++ bridge Swift calls for
  board recognition.

App Store product page (original release):
http://itunes.apple.com/us/app/sudoku-resolv/id446583583?ls=1&mt=8

Explorar proyectos relacionados

Cargando…