Repository navigation
Add resident GPU Canny edge extraction - #180
Merged
Merged
Conversation
This was referenced Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CPU Canny required returning resident image data to the host before gradient, suppression and weak/strong edge connectivity.
Add
canny_gpuand its optional profiled variant undergpu-image. Signed integer Sobel gradients support 3/5/7 apertures; exact threshold conversion, L1/squared-L2 comparisons, aperture-7 ties-to-even scaling and directional NMS ties match CPU semantics. Weak candidates form complete eight-neighbor components using monotone atomic union/path halving. Each weak component is flagged when it touches a strong pixel; strong pixels survive directly. This preserves full hysteresis without a propagation cutoff or host convergence/readback.Five/six passes share one submission and return an owned binary
GpuImagewith preserved dimensions/metadata. Input remains borrowed; grayscale conversion and blur remain explicit caller stages. Source/output/runtime ownership, private submitted scratch, buffer/binding/workgroup and profiler checks are validated before resource/cache allocation. Uniform controls are 96 bytes; no image/label readback, repeated image upload, CPU fallback or automatic placement occurs. Receipt documentation clarifies per-stage destination footprints versus repeated atomic byte traffic.Validation:
Private scratch is 28N+8 bytes (3) or 36N (5/7), with a largest 16*N binding. Memory/device limits remain explicit; no production dependency, core model, CPU algorithm or unsafe boundary changes. Existing Vision-chain defaults remain.
Evidence:
C:/Users/rsasa/Workspace/SpatialRust/notes/2026-10-13_gpu_canny.md. Architecture, ROADMAP and CHANGELOG describe the final weak-component algorithm, output/transfer contract and measured tradeoffs. Follows merged PR #179.