- pm2d/dxf.py: rasterizzazione DXF -> template (ezdxf, flattening entita', scala/centratura, render edge antialiased) - POST /upload_dxf: carica CAD come modello (size 128..2048) - roi_poly su /match, /match_simple e POST /recipes: train con mask cv2.fillPoly (validazione 400 su poligoni degeneri), cache key inclusa - UI: upload .dxf, modalita' ROI poligonale su canvas (click=vertice, dblclick=chiudi, reset), bottone Esporta JSON dei risultati - .gitea/workflows/ci.yml: uv sync + ruff + pytest su push/PR Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,9 +30,9 @@
|
||||
title="Analizza ROI e derivata parametri ottimali (Halcon-style)">
|
||||
⚙ Auto-tune
|
||||
</button>
|
||||
<label class="btn" title="Carica nuovo file nella cartella immagini">
|
||||
<label class="btn" title="Carica nuovo file nella cartella immagini (immagine o DXF)">
|
||||
⬆ Carica file
|
||||
<input type="file" id="file-upload" accept="image/*" hidden>
|
||||
<input type="file" id="file-upload" accept="image/*,.dxf" hidden>
|
||||
</label>
|
||||
<span id="status">Seleziona modello, disegna ROI, seleziona scena</span>
|
||||
</div>
|
||||
@@ -45,6 +45,15 @@
|
||||
<canvas id="c-model" width="380" height="420"></canvas>
|
||||
</div>
|
||||
<div id="roi-info">ROI: (nessuna)</div>
|
||||
<div id="roi-poly-bar" style="display:flex; gap:6px; align-items:center; margin-top:6px">
|
||||
<label style="display:flex; gap:4px; align-items:center; font-size:12px; cursor:pointer">
|
||||
<input type="checkbox" id="roi-poly-toggle"> ROI poligonale
|
||||
</label>
|
||||
<button class="btn" id="btn-poly-close" type="button" disabled
|
||||
title="Chiude il poligono (equivale al doppio click)">Chiudi</button>
|
||||
<button class="btn" id="btn-poly-reset" type="button" disabled
|
||||
title="Cancella i vertici del poligono">Reset</button>
|
||||
</div>
|
||||
<details id="edge-preview-panel" style="margin-top:10px">
|
||||
<summary>🔬 Anteprima edge / pulizia rumore</summary>
|
||||
<div style="font-size:11px; color:#aaa; margin:4px 0">
|
||||
@@ -248,6 +257,11 @@
|
||||
<div class="kv"><span>find:</span><span id="t-find">-</span></div>
|
||||
<div class="kv"><span>varianti:</span><span id="t-var">-</span></div>
|
||||
<div class="kv"><span>match:</span><span id="t-match">-</span></div>
|
||||
<button class="btn" id="btn-export-json" type="button" disabled
|
||||
style="margin-top:8px; width:100%"
|
||||
title="Scarica i risultati dell'ultimo match in formato JSON">
|
||||
⬇ Esporta JSON
|
||||
</button>
|
||||
|
||||
<details id="diag-panel" style="margin-top:10px">
|
||||
<summary>🔍 Diagnostica (CC)</summary>
|
||||
|
||||
Reference in New Issue
Block a user