VISION
คู่มือ · อ่านเองทีละบทHandbook · read it on your own

The Vision handbook · คู่มือ Vision

อ่านเองได้ทีละบท ทุกบทมาพร้อมแบบฝึกหัดให้ลองทำเองและคำถามท้ายบท เมื่ออยากรู้ให้ลึกกว่านี้ กลับไปที่ห้องเรียนบนเว็บเพื่อทดลองของจริง

Read a chapter at a time. Each comes with an exercise you can try on your own and questions to check yourself. When you want to go deeper, go back to the room on this site and run it for real.

ในหน้านี้On this page
  1. The course · บทเรียน
  2. The system · ระบบ
  3. Reference · อ้างอิง
  4. How to use the examples

How a computer sees — explained with the code that runs vision.nonarkara.org. คอมพิวเตอร์มองเห็นอย่างไร อธิบายด้วยโค้ดจริงที่ทำงานอยู่บนเว็บไซต์

From light to label: six stages

This handbook is for three kinds of reader:

If you are…Start hereThen
Curious — no code, just want to understand01 Pictures are numbersread in order; skip the code blocks
A student or developer learning computer vision01 + examples/run each lesson's example beside its chapter
Building something like this (a city, an agency, a company)System architecturerelay → runtime → CV-as-a-service blueprint

Every number in these pages was produced by code in this repository. Every PNG figure was drawn by it too — run node examples/build-figures.mjs and they are rebuilt from scratch (the six docs/img/*.svg diagrams are hand-drawn). Nothing here is a screenshot of a real camera: the scenes are synthetic, so they have an answer key and contain no people.

The course · บทเรียน

Each chapter matches a room on the site. Seven of the eight have a runnable example (chapter 05's lesson is /learn itself); each ends with a Thai summary and a few questions to check yourself.

#ChapterWhat you will be able to explainSiteRun
01Pictures are numbers · ภาพคือตัวเลขpixels, resolution, RGB, why a computer "sees" nothing at first/learn ch. 1node examples/01-pixels.mjs
02Light, colour and thresholds · สี ความสว่าง และเกณฑ์grayscale, histograms, Otsu's method, why grayscale can erase a red car/learn ch. 2–3node examples/02-threshold.mjs
03Convolution and edges · หน้าต่างเลื่อนและขอบthe 3×3 window that every neural network is built from; Sobel/learn ch. 4–5node examples/03-convolution.mjs
04Motion · การเคลื่อนไหวframe differencing, thresholds against noise, connected regions/learn ch. 6 · /storynode examples/04-motion.mjs
05Neural networks · โครงข่ายประสาทเทียมlearned kernels, layers, MobileNetV2, what "1,280 numbers" means/learn ch. 7—
06Object detection · การหาวัตถุSSD, class scores, IoU, non-maximum suppression, precision vs recall/learn ch. 7–8 · /gamesnode examples/05-detection-nms.mjs · node examples/06-precision-recall.mjs
07Teaching a machine · สอนเครื่องด้วยตัวเองtransfer learning, k-NN, a trained layer, loss, PCA, shortcut learning/trainnode examples/07-transfer-learning.mjs
08Limits and ethics · ข้อจำกัดและจริยธรรมwhy "not detected" ≠ "not there", bias, privacy, Thai PDPA/learn ch. 8 · /legalnode examples/08-catalogue.mjs

The system · ระบบ

PageFor
Architecturethe whole design on one page: sources → catalogue (the list of cameras) → relay → browser; every decision and its reason
The frame relaythe one server component that touches imagery: threat model, rules, the code that enforces them
The browser runtimeTF.js, WebGL, CSP without eval, model hosting and caching, how frames reach a model
Operationslaunchd, the Cloudflare tunnel, deploy, health checks, a runbook for when things break
CV as a service — blueprintproposed, not built: what a commercial version would need, and what it must never become

Reference · อ้างอิง

Page
Modelsmodel cards: what each network is, what it was trained on, what it gets wrong, licences
APIevery endpoint (one web address you may ask for data) with real requests and responses
Glossary · อภิธานศัพท์about 100 terms in Thai and English, with the chapter that explains each
Reading listthe papers behind each chapter, every link checked
Browser actions · เบราว์เซอร์ยอมให้ทำอะไรwhat a web page may do and refuse — and why it can never open an app or sleep your Mac

How to use the examples

git clone https://github.com/Nonarkara/vision.git
cd vision
node examples/01-pixels.mjs          # Node 22+, no install, no packages

Each example prints its working in the terminal (as text art, tables and charts) and writes pictures to examples/out/. Six of the eight import the same functions the website runs — public/js/cv/ops.js and public/js/ml/learner.js — so what you learn here is what runs there; 05 and 06 simulate detection on synthetic scenes and 08 reads the live catalogue. See examples/README.md.


Part of vision.nonarkara.org. Diagrams use Sanzo Wada's Plate 303 as converted in Palette. Corrections welcome as issues.