OpenCV Pipeline für Scan Korrekturen ergänzen

This commit is contained in:
2026-06-02 16:37:38 +02:00
parent 0ea4efdc43
commit 0ecdff4d7d
12 changed files with 429 additions and 5 deletions

View File

@@ -27,6 +27,8 @@ const editState = reactive({
resolution: 300,
mode: "Color",
source: "",
postprocess: false,
postprocessProfile: "document",
})
const selectedAgent = computed(() =>
@@ -62,6 +64,8 @@ const applyAgentToForm = (agent: InstanceAgent | null) => {
editState.resolution = Number(agent.scanDefaults?.resolution || 300)
editState.mode = agent.scanDefaults?.mode || "Color"
editState.source = agent.scanDefaults?.source || ""
editState.postprocess = Boolean(agent.scanDefaults?.postprocess)
editState.postprocessProfile = agent.scanDefaults?.postprocessProfile || "document"
}
watch(selectedAgent, (agent) => applyAgentToForm(agent), { immediate: true })
@@ -140,6 +144,8 @@ const saveAgent = async () => {
resolution: Number(editState.resolution || 300),
mode: editState.mode,
source: editState.source || null,
postprocess: editState.postprocess,
postprocessProfile: editState.postprocessProfile,
},
})
@@ -335,6 +341,23 @@ onMounted(async () => {
<UInput v-model="editState.source" placeholder="ADF Duplex" />
</UFormField>
</div>
<div class="grid gap-3 sm:grid-cols-[auto_minmax(0,1fr)]">
<UCheckbox v-model="editState.postprocess" label="OpenCV-Nachbearbeitung" />
<UFormField label="Profil">
<USelectMenu
v-model="editState.postprocessProfile"
:items="[
{ label: 'Dokument', value: 'document' },
{ label: 'Bon', value: 'receipt' },
{ label: 'Rohscan', value: 'raw' },
]"
value-key="value"
label-key="label"
:disabled="!editState.postprocess"
/>
</UFormField>
</div>
</div>
</div>