A modern C++20 computer vision node editor with an intuitive visual programming interface. VisionCraft allows users to create complex computer vision pipelines through a drag-and-drop node-based editor. ๐
- Visual Node Editor: Intuitive drag-and-drop interface for building computer vision pipelines
- Layered Architecture: Clean, modular design
- Real-time Processing: Execute and preview computer vision operations in real-time
- Docking Interface: Flexible workspace with dockable panels
- Cross-platform: Supports Windows and Linux
VisionCraft is built using a domain-driven architecture with clear separation of concerns:
- kappa-core: Foundation framework (as git submodule) providing Application, Window, and Layer abstractions
- Nodes: Core node system abstractions (Node, NodeEditor, Slot, NodeData)
- Vision: Computer vision domain (algorithms, I/O nodes, node factory)
- Editor: Editor domain (commands, state management, persistence)
- UI: Presentation layer (rendering, canvas, widgets, application layers)
- App: Application composition and entry point
VisionCraft uses a hybrid execution model that separates control flow from data flow:
- Defines the order of operations (what executes when).
- Represented by white arrow pins and connections.
- Enforces a strict 1:1 connection rule (one output to one input) to prevent ambiguity.
- Supports branching and linear sequences.
- Entry Points: Nodes with execution outputs but no execution inputs (e.g.,
Image Input) start the flow.
- Defines data dependencies (what data goes where).
- Represented by colored pins (Green=Image, Cyan=Int, etc.).
- Allows 1:N connections (one output can feed multiple inputs).
- Data is passed automatically before a node executes.
- Compilation Phase: The graph is compiled into a linear
ExecutionPlanvia topological sort of the execution flow. - Optimization: Connection lookups are precomputed into indices for O(1) access during execution.
- Lookahead Advancement: The instruction pointer advances before node execution, enabling robust error handling and cancellation.
- Thread Safety: The execution engine is fully thread-safe, supporting async background execution with cancellation and progress reporting.
- C++20 compatible compiler
- CMake 3.26 or higher
- vcpkg package manager
- Visual Studio 2022 (or Visual Studio Build Tools)
- Git for Windows
- GCC 11+ or Clang 13+
- Git
- Build essentials (
build-essentialon Ubuntu/Debian)
-
Clone the repository with submodules
git clone --recursive https://github.com/Konstantysz/vision-craft.git cd vision-craft -
Configure and build
cmake -B build cmake --build build --config Release
-
Run VisionCraft
.\build\src\App\Release\VisionCraft.exe
-
Install dependencies
# Ubuntu/Debian sudo apt update sudo apt install build-essential cmake libgl1-mesa-dev libglu1-mesa-dev # Fedora/RHEL sudo dnf install gcc-c++ cmake mesa-libGL-devel mesa-libGLU-devel
-
Clone and build
git clone --recursive https://github.com/Konstantysz/vision-craft.git cd vision-craft cmake -B build cmake --build build --config Release -j$(nproc)
-
Run VisionCraft
./build/src/App/VisionCraft
For development with code quality tools:
# Configure with static analysis
cmake -B build -DENABLE_CLANG_TIDY=ON -DENABLE_COMPILE_COMMANDS=ON
cmake --build build --config Release
# Run code quality checks
python scripts/run-code-quality.pyVisionCraft automatically manages its dependencies through vcpkg:
- GLFW: Window management and input handling
- GLAD: OpenGL function loading
- ImGui: Immediate mode GUI framework
- GLM: Mathematics library for graphics
- spdlog: Fast C++ logging library
- OpenCV: Computer vision processing library
- Google Test: Unit testing framework
vision-craft/
โโโ external/
โ โโโ kappa-core/ # Core GUI application framework (git submodule)
โ โโโ ImGuiFileDialog/ # File dialog library
โโโ src/
โ โโโ Nodes/ # Core node system abstractions
โ โ โโโ Core/ # Node, NodeEditor, Slot, NodeData
โ โโโ Vision/ # Computer vision domain
โ โ โโโ Algorithms/ # CV processing nodes (Grayscale, Threshold, CannyEdge)
โ โ โโโ IO/ # Image I/O nodes (ImageInput, ImageOutput, Preview)
โ โ โโโ Factory/ # Node factory for registration
โ โโโ Editor/ # Editor domain
โ โ โโโ Commands/ # Command pattern for undo/redo
โ โ โโโ State/ # Selection and clipboard managers
โ โ โโโ Persistence/ # Recent files, serialization
โ โโโ UI/ # Presentation layer
โ โ โโโ Layers/ # Application layers (NodeEditor, DockSpace, etc.)
โ โ โโโ Rendering/ # Node rendering and strategies
โ โ โโโ Canvas/ # Canvas controller, connections, input handling
โ โ โโโ Widgets/ # UI components, dialogs, constants
โ โ โโโ Events/ # Application events
โ โโโ App/ # Application entry point
โ โโโ VisionCraftApplication # Main executable
โโโ tests/ # Unit tests
โโโ cmake/ # Build system extensions
โ โโโ CodeQuality.cmake # Code quality integration
โโโ scripts/ # Development tools
โ โโโ run-code-quality.py # Code quality runner
โโโ .pre-commit-config.yaml # Pre-commit hooks configuration
โโโ .clang-format # Code formatting rules
โโโ .clang-tidy # Static analysis configuration
โโโ CMakeLists.txt # Main build configuration
โโโ vcpkg.json # Package dependencies
- Launch VisionCraft using the executable from the build process
- Create nodes by right-clicking in the canvas area
- Connect nodes by dragging from output pins to input pins
- Edit properties using the property panel when a node is selected
- Execute the graph using the Run button in the menu bar
- View results in the results panel
VisionCraft includes integrated code quality tools:
# Install pre-commit hooks (one-time setup)
pip install pre-commit
pre-commit install
# Run all code quality checks
python scripts/run-code-quality.py
# Format code only
python scripts/run-code-quality.py --format-only
# Static analysis only
python scripts/run-code-quality.py --tidy-only
# CMake targets for individual checks
cmake --build build --target format-all # Apply formatting
cmake --build build --target tidy-all # Run static analysis
cmake --build build --target code-quality # All checkscd build
ctest --output-on-failure- Language: C++20
- Formatting: clang-format (automatically applied via pre-commit hooks)
- Static Analysis: clang-tidy integration for modern C++ practices
- Line Width: 120 characters
- Indentation: 4 spaces
-
Setup development environment:
cmake -B build -DENABLE_CLANG_TIDY=ON pip install pre-commit && pre-commit install -
Make changes: Edit code following project standards
-
Test locally:
cmake --build build python scripts/run-code-quality.py
-
Commit: Pre-commit hooks automatically run formatting and checks
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes following the code standards
- Add tests for new functionality
- Ensure all code quality checks pass (
python scripts/run-code-quality.py) - Commit your changes (pre-commit hooks will run automatically)
- Push to your branch (
git push origin feature/amazing-feature) - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Core framework architecture inspired by The Cherno's Application Layer tutorial
- Built with ImGui for the user interface
- Uses OpenCV for computer vision operations
- Powered by GLFW for window management
- Logging provided by spdlog