feat: add contrast/sharpen strength controls, disable binarization
Major improvements to preprocessing controls: Backend: - Add contrast_strength (0.5-3.0) and sharpen_strength (0.5-2.0) to PreprocessingConfig - Auto-detection now calculates optimal strength based on image quality metrics: - Lower contrast → Higher contrast_strength - Lower edge strength → Higher sharpen_strength - Disable binarization in auto mode (rarely beneficial) - CLAHE clipLimit now scales with contrast_strength - Sharpening uses unsharp mask with variable strength Frontend: - Add strength sliders for contrast and sharpen in manual mode - Sliders show current value and strength level (輕微/正常/強/最強) - Move binarize option to collapsible "進階選項" section - Updated i18n translations for strength labels 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -39,7 +39,9 @@ export default function ProcessingPage() {
|
||||
const [preprocessingMode, setPreprocessingMode] = useState<PreprocessingMode>('auto')
|
||||
const [preprocessingConfig, setPreprocessingConfig] = useState<PreprocessingConfig>({
|
||||
contrast: 'clahe',
|
||||
contrast_strength: 1.0,
|
||||
sharpen: true,
|
||||
sharpen_strength: 1.0,
|
||||
binarize: false,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user