OutpaintingAI Image GenerationImage Expansionสอน AI

Outpainting: ขยายภาพให้กว้างขึ้นด้วย AI

เรียนรู้การใช้ Outpainting ใน AI เพื่อขยายขอบเขตของภาพให้กว้างขึ้น ทั้งการขยาย aspect ratio เปลี่ยน composition และสร้าง panorama เหมาะสำหรับผู้เรียน สอน AI

AI Unlocked Team
27/02/2568
Outpainting: ขยายภาพให้กว้างขึ้นด้วย AI

Outpainting: ขยายภาพให้กว้างขึ้นด้วย AI

สวัสดีค่ะคนดี! วันนี้มาเรียนรู้เรื่อง Outpainting กันค่ะ ซึ่งเป็นเทคนิคที่ทำให้เราสามารถ "ขยาย" ภาพออกไปได้ โดย AI จะจินตนาการส่วนที่ไม่มีในภาพต้นฉบับให้เราเองเลยนะคะ

Outpainting คืออะไร?

Outpainting (หรือ Image Expansion/Extension) คือการขยายภาพออกไปนอกขอบเดิม โดย AI จะสร้างเนื้อหาใหม่ที่ต่อเนื่องกับภาพเดิมอย่างกลมกลืน

ความแตกต่างจาก Inpainting

InpaintingOutpainting
แก้ไขภายในภาพขยายออกนอกภาพ
ลบ/เพิ่ม/แก้ไขต่อเติมขยาย
ขนาดภาพเท่าเดิมขนาดภาพใหญ่ขึ้น

Use Cases ของ Outpainting

1. เปลี่ยน Aspect Ratio

  • เปลี่ยนภาพ square เป็น wide
  • เปลี่ยน portrait เป็น landscape
  • ปรับให้เข้ากับ platform ต่างๆ

2. เพิ่มพื้นที่ว่าง

  • เพิ่มที่ว่างสำหรับใส่ text
  • สร้าง banner จากภาพเดิม
  • เพิ่ม breathing room

3. เปลี่ยน Composition

  • ขยับ subject ไปด้านข้าง
  • สร้าง rule of thirds ใหม่
  • เพิ่ม foreground/background

4. สร้าง Panorama

  • ขยายภาพเป็น panoramic
  • สร้าง wide landscape
  • ทำ virtual tour images

5. แก้ภาพที่ถูก crop

  • กู้คืนส่วนที่ถูกตัด
  • ขยายภาพเก่าที่มีขนาดเล็ก

เครื่องมือที่รองรับ Outpainting

DALL-E (ChatGPT)

  • มี Outpainting feature
  • ใช้งานง่ายมาก
  • คุณภาพดี

Stable Diffusion

  • รองรับผ่าน Outpainting script
  • ปรับแต่งได้มาก
  • ต้องตั้งค่าเอง

Adobe Firefly/Photoshop

  • Generative Expand
  • ใช้งานง่ายสุด
  • คุณภาพ professional

Leonardo.AI

  • Canvas Outpainting
  • ขยายได้หลายทิศทาง

Midjourney

  • Zoom Out feature
  • Pan Left/Right/Up/Down
  • ใช้งานง่าย

วิธีใช้ Outpainting

ขั้นตอนพื้นฐาน

Step 1: เลือกภาพต้นฉบับ

  • ภาพที่มี context ชัดเจน
  • ไม่ crop แน่นเกินไป
  • คุณภาพดี

Step 2: เลือกทิศทางขยาย

  • Left / Right
  • Up / Down
  • All sides

Step 3: กำหนดขนาด

  • ขยายเท่าไหร่
  • อัตราส่วนใหม่

Step 4: เขียน Prompt (ถ้ามี)

  • บอกสิ่งที่ต้องการในส่วนขยาย
  • หรือให้ AI ต่อเติมเอง

Step 5: Generate และปรับแต่ง

  • ลองหลายครั้ง
  • เลือกที่กลมกลืนที่สุด

เทคนิค Outpainting ให้สวย

1. ขยายทีละนิด

แทนที่จะขยาย 2x ทีเดียว:
1. ขยาย 25% แรก
2. ตรวจสอบความกลมกลืน
3. ขยายต่อทีละ 25%

ทำไม: AI จะต่อเนื่องได้ดีกว่าถ้าขยายทีละน้อย

2. ใช้ Prompt Guide

Prompt ที่ดี:
- "continuation of the scene"
- "same lighting and atmosphere"
- "seamless extension"
- "[specific element] continuing to the [direction]"

3. สนใจ Lighting Direction

ถ้าแสงมาจากซ้าย:
- ขยายไปซ้าย = แสงจะสว่างขึ้น
- ขยายไปขวา = จะเป็นเงามากขึ้น

4. รักษา Perspective

คำนึงถึง vanishing point:
- เส้นต้องต่อเนื่อง
- Perspective ต้องสอดคล้อง

5. Match Style

บอก style ในส่วนที่ขยาย:
- "same photographic style"
- "matching art style"
- "consistent color palette"

ตัวอย่าง Outpainting

ตัวอย่าง 1: Portrait to Wide Banner

Original: Portrait photo ของคน Goal: ขยายเป็น banner สำหรับ website

วิธี:

  1. ขยายไปซ้ายและขวา
  2. Prompt: "office interior background, professional setting, same lighting"
  3. ขนาดสุดท้าย: 16:9

ตัวอย่าง 2: Product to Lifestyle

Original: Product shot บน white background Goal: สร้าง lifestyle context

วิธี:

  1. ขยายทุกทิศทาง
  2. Prompt: "living room setting, modern interior, product on table"
  3. สร้าง lifestyle scene รอบๆ product

ตัวอย่าง 3: Landscape to Panorama

Original: Landscape photo ปกติ Goal: สร้าง panoramic view

วิธี:

  1. ขยายซ้าย-ขวา เป็นหลัก
  2. Prompt: "continuation of landscape, same mountains, same sky"
  3. อัตราส่วน 21:9 หรือ 32:9

ตัวอย่าง 4: Art to Different Ratio

Original: AI art ที่สร้างมา square Goal: ปรับเป็น phone wallpaper

วิธี:

  1. ขยายขึ้นและลง
  2. Prompt: "seamless extension, same artistic style"
  3. อัตราส่วน 9:16

Outpainting ใน Midjourney

Zoom Out

หลัง generate ภาพ:
1. คลิก Zoom Out 2x หรือ 1.5x
2. AI จะขยายภาพออกทุกทิศทาง
3. Custom Zoom สำหรับกำหนดขนาดเอง

Pan

1. คลิก Arrow buttons (←↑↓→)
2. ขยายไปทิศทางที่เลือก
3. ทำซ้ำได้หลายครั้ง

Outpainting ใน DALL-E

วิธีใช้

1. Upload ภาพ
2. คลิก Edit
3. ลาก canvas ให้ใหญ่ขึ้น
4. เลือกบริเวณที่ต้องการเติม
5. พิมพ์ prompt (optional)
6. Generate

Outpainting ใน Photoshop

Generative Expand

1. เปิดภาพใน Photoshop
2. ใช้ Crop tool ขยาย canvas
3. เลือกบริเวณว่าง
4. คลิก Generative Expand
5. พิมพ์ prompt หรือปล่อยว่าง
6. Generate

ปัญหาที่พบบ่อยและวิธีแก้

1. ขอบไม่กลมกลืน

ปัญหา: เห็นรอยต่อชัดเจน

วิธีแก้:

  • ขยายทีละน้อย
  • ใช้ Mask Blur สูงขึ้น
  • Inpaint บริเวณรอยต่อ

2. Style ไม่ตรงกัน

ปัญหา: ส่วนขยายดู style ต่างกัน

วิธีแก้:

  • ระบุ style ใน prompt
  • ใช้ lower denoising
  • ลอง seed เดียวกัน

3. Content ไม่สมเหตุผล

ปัญหา: AI เพิ่มสิ่งแปลกๆ

วิธีแก้:

  • ระบุ prompt ชัดเจน
  • ใช้ negative prompt
  • Generate หลายครั้ง

4. Perspective ผิดพลาด

ปัญหา: เส้นไม่ต่อเนื่อง

วิธีแก้:

  • ขยายทีละน้อย
  • เลือก direction ที่เหมาะสม
  • Manual fix ด้วย inpainting

Best Practices

1. เริ่มจากภาพที่ดี

- ความละเอียดสูง
- ไม่ blur
- มี context ชัดเจน

2. วางแผนก่อนเริ่ม

- กำหนดขนาดสุดท้าย
- คิดว่าจะขยายไปทิศทางไหน
- เตรียม prompt

3. Iterate และ Refine

- ไม่ต้องเอาภาพแรกเสมอ
- ลองหลายครั้ง
- ผสม inpainting ถ้าจำเป็น

4. รักษา Consistency

- Lighting
- Color palette
- Style
- Perspective

Creative Applications

1. Album Artwork

ขยายภาพเป็น album cover ที่มีที่ว่างสำหรับ text

2. Social Media Banners

เปลี่ยน profile pic เป็น cover photo

3. Print Materials

ขยายภาพให้พอดีกับขนาด print ต่างๆ

4. Video Thumbnails

สร้าง thumbnail ที่มีที่ว่างสำหรับ title


อยากเรียนรู้ Outpainting และ AI Image Editing?

เรามี คอร์ส AI ที่สอนเทคนิค Outpainting และการแก้ไขภาพด้วย AI อย่างละเอียด ทั้งออนไลน์และ สอน AI เชียงใหม่ แบบ on-site ดูรายละเอียดที่ หน้าคอร์สเรียน นะคะที่รัก!

เขียนโดย

AI Unlocked Team

บทความอื่นๆ ที่น่าสนใจ