Engine: - preprocess() accepts conversion_mode (bw/grayscale/color), invert, mask_regions - B&W: full pipeline → binary; Grayscale: skip threshold → 8-bit; Color: skip grayscale → BGR - routes.py forces VTracer for non-binary modes, sets colormode appropriately - potrace_trace() accepts turnpolicy param mapped to potrace constants - 27 new tests in test_modes.py (modes, invert, masks, params, vectorization) App: - Mode selector tabs (B&W | Grayscale | Color) in ImportConvert - Invert toggle (B&W only) - ParameterSliders rewritten: grouped sections, 10+ mode-aware controls - Debounce reduced from 300ms to 100ms - Preview background changed to white - Preset JSONs updated with turnpolicy, color_precision, layer_difference defaults Tests: 126 app + 234 engine = 360 total, all pass. Zero TypeScript errors.
46 lines
1 KiB
JSON
46 lines
1 KiB
JSON
{
|
|
"name": "sign",
|
|
"description": "Metal signage, bold text cutouts",
|
|
"preprocessing": {
|
|
"denoise_d": 9,
|
|
"denoise_sigma_color": 90.0,
|
|
"denoise_sigma_space": 90.0,
|
|
"clahe_clip_limit": 3.0,
|
|
"clahe_tile_grid_size": [
|
|
8,
|
|
8
|
|
],
|
|
"threshold_manual": null,
|
|
"edge_detect": false,
|
|
"morph_kernel_size": 5,
|
|
"morph_dilate_iterations": 2,
|
|
"morph_erode_iterations": 2
|
|
},
|
|
"vectorization": {
|
|
"mode": "potrace",
|
|
"potrace": {
|
|
"turdsize": 10,
|
|
"alphamax": 1.0,
|
|
"opticurve": true,
|
|
"opttolerance": 0.2,
|
|
"turnpolicy": "minority"
|
|
},
|
|
"vtracer": {
|
|
"colormode": "binary",
|
|
"hierarchical": "stacked",
|
|
"filter_speckle": 20,
|
|
"corner_threshold": 60,
|
|
"length_threshold": 6.0,
|
|
"splice_threshold": 45,
|
|
"mode": "spline",
|
|
"color_precision": 6,
|
|
"layer_difference": 16,
|
|
"max_iterations": 10
|
|
}
|
|
},
|
|
"postprocessing": {
|
|
"epsilon": 2.5,
|
|
"close_tolerance": 2.0,
|
|
"auto_close": true
|
|
}
|
|
}
|