r/computervision • u/iekmuby • 21d ago
Discussion Am I the only one who hates Bézier curves for polygon annotation? Looking for UX feedback on a Flash-style approach
Hi everyone,
I’ve been annotating some images for a personal project using standard tools, and I’m honestly losing my mind wrestling with Bézier curves. Pulling those handles back and forth to fit a complex shape becomes incredibly tedious when you have to do it hundreds of times.
I’m an old-school guy, and it made me miss the old Macromedia Flash days. Flash had a brilliant, fluid vector engine: you could just grab any part of a line between two points and bend it naturally. No handles, no vector madness—just direct, plastic manipulation.
To see if I was just crazy or if this actually feels better, I spent an evening putting together a quick interactive prototype using Paper.js and Catmull-Rom spline smoothing to mimic that Flash-like logic.
How it works in my canvas experiment:
- Press "P" with your mouse over the line to add a point.
- Drag any point to bend the line (the neighboring curves adjust smoothly automatically without any handles).
- Press "D" to delete a selected point.
I wanted to share this logic to get some honest feedback from people who do CV and data labeling daily. You can test how it feels live here (just paste the JS code into the editor):
👉 paperjs.org
Here is the exact code if you want to drop it into the link above and try it:
javascript
// 1. Create initial path
var path = new Path.Circle({
center: view.center,
radius: 120,
strokeColor: '#008557',
strokeWidth: 3,
fillColor: new Color(0.05, 0.72, 0.38, 0.15)
});
var selectedSegment = null;
var activeSegment = null;
var mousePosition = new Point(0, 0);
var dotsGroup = new Group();
function drawVisibleDots() {
dotsGroup.removeChildren();
path.segments.forEach(function(segment) {
var isSelected = (activeSegment && activeSegment === segment);
var circle = new Path.Circle({
center: segment.point,
radius: 4.5,
fillColor: isSelected ? '#ff3b30' : '#ffffff',
strokeColor: isSelected ? '#ffffff' : '#000000',
strokeWidth: 1.5
});
dotsGroup.addChild(circle);
});
}
drawVisibleDots();
function onMouseMove(event) {
mousePosition = event.point;
}
// 2. KEYBOARD CONTROLS (P — add, D — delete)
function onKeyDown(event) {
if (event.key === 'p') {
var hit = path.hitTest(mousePosition, { stroke: true, tolerance: 20 });
if (hit && hit.type === 'stroke') {
var newSeg = path.divideAt(hit.location);
activeSegment = newSeg;
drawVisibleDots();
}
}
if (event.key === 'd') {
if (activeSegment && path.segments.length > 3) {
var prev = activeSegment.previous;
var next = activeSegment.next;
activeSegment.remove();
activeSegment = null;
if (prev) {
prev.handleIn = null; prev.handleOut = null;
prev.smooth({ type: 'catmull-rom', factor: 0.5 });
}
if (next) {
next.handleIn = null; next.handleOut = null;
next.smooth({ type: 'catmull-rom', factor: 0.5 });
}
drawVisibleDots();
}
}
}
// 3. SELECTION & DRAGGING
function onMouseDown(event) {
var hitSegment = path.hitTest(event.point, { segments: true, tolerance: 15 });
if (hitSegment && hitSegment.type === 'segment') {
selectedSegment = hitSegment.segment;
activeSegment = hitSegment.segment;
drawVisibleDots();
} else {
activeSegment = null;
drawVisibleDots();
}
}
// 4. FLUID BENDING
function onMouseDrag(event) {
if (selectedSegment) {
selectedSegment.point = event.point;
selectedSegment.handleIn = null;
selectedSegment.handleOut = null;
if (selectedSegment.previous) {
selectedSegment.previous.handleIn = null;
selectedSegment.previous.handleOut = null;
}
if (selectedSegment.next) {
selectedSegment.next.handleIn = null;
selectedSegment.next.handleOut = null;
}
selectedSegment.smooth({ type: 'catmull-rom', factor: 0.5 });
if (selectedSegment.previous) {
selectedSegment.previous.smooth({ type: 'catmull-rom', factor: 0.5 });
}
if (selectedSegment.next) {
selectedSegment.next.smooth({ type: 'catmull-rom', factor: 0.5 });
}
drawVisibleDots();
}
}
function onMouseUp(event) {
selectedSegment = null;
}My questions to you guys:
- Does this feel faster and more intuitive to you than Bézier handles, or am I just biased because of Flash nostalgia?
- Are there any hidden flaws to this spline-bending approach in actual production data labeling that I might be overlooking?
- Do you know of any existing tool that already uses something similar?
Let me know what you think!




