Files
SnapOtter/apps/docs/th/tools/image/image-enhancement.md
T
SnapOtterandGitHub 4963ab3bbd feat(docs-i18n): translate all documentation into 20 languages
All 181 docs markdown files translated into 20 languages (apps/docs/<locale>/**). Companion to the i18n code PR; admin-merged because the file count exceeds GitHub's per-PR CI trigger limit. Validated by pnpm i18n:check (all surfaces, 0 stale/missing) and a clean all-locale docs build.
2026-07-11 13:52:47 +08:00

5.8 KiB

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
ปรับปรุงภาพอัตโนมัติในคลิกเดียวที่วิเคราะห์ภาพและแก้ไขค่าแสง คอนทราสต์ ไวต์บาลานซ์ ความอิ่มตัวของสี และความคมชัด 42b6ab956f91 human b05f3760905b

Image Enhancement

ปรับปรุงอัตโนมัติในคลิกเดียวพร้อมการวิเคราะห์อัจฉริยะ วิเคราะห์ภาพและใช้การแก้ไขค่าแสง คอนทราสต์ ไวต์บาลานซ์ ความอิ่มตัวของสี ความคมชัด และการลด noise

API Endpoint

POST /api/v1/tools/image/image-enhancement

การประมวลผล: แบบซิงโครนัส (ใช้ factory createToolRoute คืนค่าผลลัพธ์โดยตรง)

Model bundle: ไม่จำเป็นสำหรับการปรับปรุงพื้นฐาน bundle upscale-enhance (5-6 GB) ใช้เฉพาะเมื่อเปิดใช้งาน deepEnhance (สำหรับการลบ noise ด้วย AI ผ่าน SCUNet)

Parameters

Parameter Type Required Default Description
file file Yes - ไฟล์ภาพ (multipart)
mode string No "auto" โหมดการปรับปรุง: auto, portrait, landscape, low-light, food, document
intensity number No 50 ความเข้มของการปรับปรุงโดยรวม (0-100)
corrections object No all true การแก้ไขแบบเลือกสรรที่จะใช้ (ดูด้านล่าง)
deepEnhance boolean No false เปิดใช้งานการลบ noise ที่ขับเคลื่อนด้วย AI (ต้องติดตั้งเครื่องมือ noise-removal)

Corrections Object

Field Type Default Description
exposure boolean true แก้ไขค่าแสงอัตโนมัติ
contrast boolean true แก้ไขคอนทราสต์อัตโนมัติ
whiteBalance boolean true แก้ไขไวต์บาลานซ์อัตโนมัติ
saturation boolean true แก้ไขความอิ่มตัวของสีอัตโนมัติ
sharpness boolean true เพิ่มความคมชัดอัตโนมัติ
denoise boolean true ลด noise เล็กน้อย

Example Request

curl -X POST http://localhost:1349/api/v1/tools/image/image-enhancement \
  -F "file=@photo.jpg" \
  -F 'settings={"mode":"portrait","intensity":70,"corrections":{"exposure":true,"contrast":true,"sharpness":false}}'

Response (200 OK)

{
  "jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "downloadUrl": "/api/v1/download/{jobId}/photo.jpg",
  "originalSize": 300000,
  "processedSize": 310000
}

Analyze Endpoint

POST /api/v1/tools/image/image-enhancement/analyze

วิเคราะห์ภาพและคืนค่าคำแนะนำการแก้ไขโดยไม่ใช้งานจริง

Parameters

Parameter Type Required Description
file file Yes ไฟล์ภาพ (multipart)

Example Request

curl -X POST http://localhost:1349/api/v1/tools/image/image-enhancement/analyze \
  -F "file=@photo.jpg"

Response (200 OK)

{
  "corrections": {
    "exposure": { "value": 0.3, "direction": "brighten" },
    "contrast": { "value": 0.2, "direction": "increase" },
    "whiteBalance": { "value": 200, "direction": "warmer" },
    "saturation": { "value": 0.1, "direction": "increase" },
    "sharpness": { "value": 0.4, "direction": "sharpen" }
  }
}

Notes

  • เครื่องมือนี้ใช้ factory createToolRoute แบบซิงโครนัส จึงคืนค่าการตอบกลับมาตรฐาน (ไม่ใช่ 202 async)
  • พารามิเตอร์ mode ปรับวิธีการถ่วงน้ำหนักการแก้ไข (เช่น โหมดพอร์ตเทรตอ่อนโยนกว่าต่อโทนสีผิว โหมดแลนด์สเคปเพิ่มความอิ่มตัวของสี)
  • เมื่อเปิดใช้งาน deepEnhance และติดตั้งเครื่องมือ noise-removal (SCUNet) จะมีการใช้การลด noise ด้วย AI เพิ่มเติมหลังจากการแก้ไขมาตรฐาน
  • endpoint การวิเคราะห์มีประโยชน์สำหรับการดูตัวอย่างว่าจะมีการใช้การแก้ไขใดบ้างก่อนที่จะยืนยัน
  • รองรับรูปแบบนำเข้า HEIC/HEIF, RAW, TGA, PSD, EXR และ HDR ผ่านการถอดรหัสอัตโนมัติ