- Hardware & Machines
- CNC Machines
- Plasma & Laser
- FabScan - LinuxCNC Camera-Assisted Tracing / Scanning Project
FabScan - LinuxCNC Camera-Assisted Tracing / Scanning Project
- FabLabRacing
- Away
- New Member
-
Less
More
- Posts: 9
- Thank you received: 4
05 Jul 2026 14:07 #347531
by FabLabRacing
FabScan - LinuxCNC Camera-Assisted Tracing / Scanning Project was created by FabLabRacing
I have been working on a small LinuxCNC companion project called **FabScan**. The basic idea is to create a LinuxCNC-friendly camera tracing utility that can help capture outlines, edges, holes, and reference points from real-world parts, then export usable DXF geometry for cleanup/CAM.
The project was inspired by the general workflow of SheetCam Scanything, to be clear it is not based on Scanything code, reverse engineering, or proprietary information. It is a from-scratch MIT open-source project aimed at LinuxCNC users.
The project can be found here: github.com/FabLabRacing/FabScan
The documentation is lacking at this point, it is mostly build notes.
The intended workflow is:
1. Mount a USB camera on the Z-Axis.
2. Use LinuxCNC for the actual machine position reference.
3. Use FabScan to view the camera, detect edges/lines, capture points, and build geometry.
4. Export DXF.
5. Use SheetCam or another CAM program for cleanup, tooling, and cutting.
## Current Status
The current working milestone is around **v0.5.10**.
At this point, FabScan can:
* Load an image and detect contours.
* Adjust threshold, blur, minimum area, and simplify settings.
* Select/classify/sort detected contours.
* Export DXF geometry.
* Capture from a USB camera.
* Rotate/flip camera view as needed.
* Calibrate camera scale.
* Capture manual points from LinuxCNC position.
* Continue native DXF geometry using lines, arcs, and circles.
* Perform controlled X/Y motion through LinuxCNC.
* Jog X/Y from inside the app when enabled.
* Use camera center-dot calibration.
* Preview line/edge detection from the live camera.
* Take single-step and multi-step line/edge following moves.
* Export traced/captured geometry to DXF.
The newest work has been focused on camera robustness and line/edge following.
The line-following proof of concept is working well enough to be useful in testing. One important recent improvement was latching the follow direction during multi-step tracing. Before that, the detected edge tangent could occasionally flip direction and cause the machine to step backward. The current logic uses the selected Forward/Reverse direction for the first move, then chooses the next tangent direction closest to the previous successful move. In testing, this fixed the forward/backward flip.
A recent test captured 50 points along a Sharpie line without the direction flipping. The average step was about 0.050", with the largest observed deviation roughly in the .006"-.009" range. That was with the line slightly out of square with machine travel, so I was pretty happy with the result for an early proof of concept.
## Safety Philosophy
FabScan is intentionally limited.
It only moves X and Y.
It does not control:
* Z axis
* Torch firing
* Plasma start
* Cycle start
* Spindle
* Cutting output
* THC
* Any actual machining/cutting process
LinuxCNC still owns the machine. FabScan only talks to LinuxCNC for position/status and controlled X/Y motion. Motion functions require LinuxCNC to be in a safe state, such as machine on, homed, idle, and in manual mode.
The idea is that FabScan should behave more like a camera-assisted measuring/tracing pendant than a machine controller.
## Hardware / Test Setup
My current known-good test setup is:
* Dell OptiPlex 7060
* LinuxCNC / QtPlasmaC
* Mesa Ethernet hardware
* USB microscope/camera
* Camera resolution currently set to 800x600
* LinuxCNC servo period set to 2,000,000 ns
One important lesson from testing: my microscope camera does not support 1280x720. Asking for that resolution caused OpenCV/V4L2 timeouts and made the GUI sluggish. The current version defaults to 800x600 and is being improved to handle unsupported camera modes more gracefully.
## Recent v0.5.10 Camera Work
The latest camera robustness work includes:
* Default camera resolution changed to 800x600.
* Resolution presets added.
* Requested vs actual camera resolution display.
* Explicit V4L2 camera opening on Linux.
* MJPG request where supported.
* Camera frame reads moved off the Tkinter UI thread.
* Better handling of bad camera devices or unsupported modes.
* Safer preview window close handling.
## Current Line / Edge Follow Settings
The current settings that seem reasonable for testing are approximately:
* Mode: line center
* Step: 0.050"
* Max correction: 0.010" to 0.015"
* Minimum confidence: 55-60
* Count: 10-50
* Camera: 800x600
For tight curves or 180-degree bends, the plan is to reduce step size and search area, while keeping correction conservative.
A future safety improvement I am considering is stopping multi-step follow automatically if the heading changes too much in one step, maybe somewhere around 60-75 degrees. That would help prevent the trace from trying to chase a wrong edge or doubling back unexpectedly.
## What It Is Useful For
The project is aimed at things like:
* Tracing a physical part or cardboard template on the table.
* Picking up edges or holes from an existing part.
* Capturing a rough outline for SheetCam cleanup.
* Following a drawn Sharpie/scribe line.
* Getting usable geometry from shop-floor parts without turning the project into a full CAD system.
## Project Direction
The near-term direction is:
1. Keep improving camera reliability.
2. Make camera selection/resolution handling more user friendly.
3. Improve line/edge following confidence and stop conditions.
4. Continue improving DXF export quality.
5. Keep the project focused and safe.
Long term, I would like FabScan to become a practical open-source tracing/scanning helper for LinuxCNC users, especially for plasma/router-style machines where a camera-assisted part tracing workflow can save time.
It is still experimental, but it has reached the point where the core idea is working and the project feels worth continuing.
The project was inspired by the general workflow of SheetCam Scanything, to be clear it is not based on Scanything code, reverse engineering, or proprietary information. It is a from-scratch MIT open-source project aimed at LinuxCNC users.
The project can be found here: github.com/FabLabRacing/FabScan
The documentation is lacking at this point, it is mostly build notes.
The intended workflow is:
1. Mount a USB camera on the Z-Axis.
2. Use LinuxCNC for the actual machine position reference.
3. Use FabScan to view the camera, detect edges/lines, capture points, and build geometry.
4. Export DXF.
5. Use SheetCam or another CAM program for cleanup, tooling, and cutting.
## Current Status
The current working milestone is around **v0.5.10**.
At this point, FabScan can:
* Load an image and detect contours.
* Adjust threshold, blur, minimum area, and simplify settings.
* Select/classify/sort detected contours.
* Export DXF geometry.
* Capture from a USB camera.
* Rotate/flip camera view as needed.
* Calibrate camera scale.
* Capture manual points from LinuxCNC position.
* Continue native DXF geometry using lines, arcs, and circles.
* Perform controlled X/Y motion through LinuxCNC.
* Jog X/Y from inside the app when enabled.
* Use camera center-dot calibration.
* Preview line/edge detection from the live camera.
* Take single-step and multi-step line/edge following moves.
* Export traced/captured geometry to DXF.
The newest work has been focused on camera robustness and line/edge following.
The line-following proof of concept is working well enough to be useful in testing. One important recent improvement was latching the follow direction during multi-step tracing. Before that, the detected edge tangent could occasionally flip direction and cause the machine to step backward. The current logic uses the selected Forward/Reverse direction for the first move, then chooses the next tangent direction closest to the previous successful move. In testing, this fixed the forward/backward flip.
A recent test captured 50 points along a Sharpie line without the direction flipping. The average step was about 0.050", with the largest observed deviation roughly in the .006"-.009" range. That was with the line slightly out of square with machine travel, so I was pretty happy with the result for an early proof of concept.
## Safety Philosophy
FabScan is intentionally limited.
It only moves X and Y.
It does not control:
* Z axis
* Torch firing
* Plasma start
* Cycle start
* Spindle
* Cutting output
* THC
* Any actual machining/cutting process
LinuxCNC still owns the machine. FabScan only talks to LinuxCNC for position/status and controlled X/Y motion. Motion functions require LinuxCNC to be in a safe state, such as machine on, homed, idle, and in manual mode.
The idea is that FabScan should behave more like a camera-assisted measuring/tracing pendant than a machine controller.
## Hardware / Test Setup
My current known-good test setup is:
* Dell OptiPlex 7060
* LinuxCNC / QtPlasmaC
* Mesa Ethernet hardware
* USB microscope/camera
* Camera resolution currently set to 800x600
* LinuxCNC servo period set to 2,000,000 ns
One important lesson from testing: my microscope camera does not support 1280x720. Asking for that resolution caused OpenCV/V4L2 timeouts and made the GUI sluggish. The current version defaults to 800x600 and is being improved to handle unsupported camera modes more gracefully.
## Recent v0.5.10 Camera Work
The latest camera robustness work includes:
* Default camera resolution changed to 800x600.
* Resolution presets added.
* Requested vs actual camera resolution display.
* Explicit V4L2 camera opening on Linux.
* MJPG request where supported.
* Camera frame reads moved off the Tkinter UI thread.
* Better handling of bad camera devices or unsupported modes.
* Safer preview window close handling.
## Current Line / Edge Follow Settings
The current settings that seem reasonable for testing are approximately:
* Mode: line center
* Step: 0.050"
* Max correction: 0.010" to 0.015"
* Minimum confidence: 55-60
* Count: 10-50
* Camera: 800x600
For tight curves or 180-degree bends, the plan is to reduce step size and search area, while keeping correction conservative.
A future safety improvement I am considering is stopping multi-step follow automatically if the heading changes too much in one step, maybe somewhere around 60-75 degrees. That would help prevent the trace from trying to chase a wrong edge or doubling back unexpectedly.
## What It Is Useful For
The project is aimed at things like:
* Tracing a physical part or cardboard template on the table.
* Picking up edges or holes from an existing part.
* Capturing a rough outline for SheetCam cleanup.
* Following a drawn Sharpie/scribe line.
* Getting usable geometry from shop-floor parts without turning the project into a full CAD system.
## Project Direction
The near-term direction is:
1. Keep improving camera reliability.
2. Make camera selection/resolution handling more user friendly.
3. Improve line/edge following confidence and stop conditions.
4. Continue improving DXF export quality.
5. Keep the project focused and safe.
Long term, I would like FabScan to become a practical open-source tracing/scanning helper for LinuxCNC users, especially for plasma/router-style machines where a camera-assisted part tracing workflow can save time.
It is still experimental, but it has reached the point where the core idea is working and the project feels worth continuing.
The following user(s) said Thank You: tommylight, arcsynapse89
Please Log in or Create an account to join the conversation.
- arcsynapse89
-
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 2
05 Jul 2026 14:28 #347533
by arcsynapse89
Replied by arcsynapse89 on topic FabScan - LinuxCNC Camera-Assisted Tracing / Scanning Project
Sounds like a great little project, keep up the good work and keep us posted.
Please Log in or Create an account to join the conversation.
Moderators: snowgoer540
- Hardware & Machines
- CNC Machines
- Plasma & Laser
- FabScan - LinuxCNC Camera-Assisted Tracing / Scanning Project
Time to create page: 0.106 seconds