# 画像から数を数える

> 写真を選ぶと、写っている物を一つずつ囲んでカウントします。

Human page: https://unmakelabs.com/ja-jp/count-objects-in-image/. This is the version for AI agents.

## What it does

画像から物の数を数える 写真を選ぶと、写っている物を一つずつ囲んでカウントします。

## 写真から数える理由

数百個の小さな物を手で数えると数分かかり、途中でどこまで数えたか分からなくなると間違えます。写真なら対象は動きません。ツールが一つひとつに番号を付けるので、自分で数える代わりに結果を確認するだけで済み、番号付きの写真はそのまま記録になります。

## こんな方に

コロニーや細胞、種子を数える研究室の方、部品やねじ類を数える品質検査の方、小物の在庫や棚卸しをする倉庫の方、農家や種子検査の方、先生や学生、ビーズや硬貨を仕分ける趣味の方に。

## Facts

- **数えられる物:** 種子、錠剤、コロニー、細胞、ねじ、ペレット、硬貨など、背景から区別できる物なら何でも
- **表示内容:** 個数、各物体の番号付きマーク、サイズ分布（面積、長さ、幅、直径、真円度）
- **サイズ:** A4／レターサイズの紙やカードを一緒に写せば mm 単位、ピクセルサイズを入力して換算、またはピクセル単位
- **保存形式:** マーク入りの画像（PNG）、物体ごとに1行のCSV、複数の写真をまとめた集計CSV

## How a person does it

1. **写真を撮る・開く.** 無地の背景に物を置き、真上から撮影します。写真は1枚でも複数まとめてでも開けます。ファイルはアップロードされません。
2. **マークを確認する.** カウントされた物にはすべて番号が付きます。マークをタップすると削除、何もない所をタップすると追加できます。「同じ種類だけ数える」をタップして物を一つ選ぶと、それに似た物だけを数えます。
3. **結果を保存する.** 個数とマーク入りの画像、各物体のサイズを含むCSV、またはすべての写真の集計をダウンロードできます。

## Open a file by link (works today)

The viewer runs in a browser. Any public file URL can be opened by adding `?src=` (URL-encoded): `https://unmakelabs.com/ja-jp/count-objects-in-image/?src=https://unmakelabs.com/apps/counter/samples/seeds.jpg`. The host must allow cross-origin reads (GitHub raw, most object storage and CDNs do). A camera view can be added after `#`: `?src=<public photo URL>&plate=1` (the photo must allow CORS; plate=1 counts only inside a Petri dish).

Embed: `<iframe src="https://unmakelabs.com/embed/counter/?src=<url-encoded file URL>" width="100%" height="480" style="border:0"></iframe>`.

## Good to know

このツールは、周囲の背景との違いで物を見つけ、くっついている物はくびれた部分で分けます。影や反射、ごちゃごちゃした背景があると、余計に数えたり複数を一つにまとめたりすることがあるため、数を信用する前にマークをざっと確認してください。確認は数秒で終わり、修正はどれもタップ1回です。

## Not done by this tool

- 物が何であるかは認識しません。背景から目立つ物、またはタップした見本に似た物を数えます
- 物が重なり合った山は一つずつ数えず、大きさから推定します（≈ で表示）
- 調剤、臨床診断、その他間違いが人に危害を及ぼすおそれのあるカウントには使用しないでください
- カウントはブラウザ内で行われます。任意の ✦ ボタンは、縮小したコピーを送信する前に確認します。テキストでの指示（「赤いのを数えて」など）には対応していないため、代わりに見本をタップしてください

## Value

Counts objects in a photo in the browser with nothing to install: seeds, pills, bacterial colonies, cells, screws, pellets, coins, anything that stands out from its background. Every counted object gets a numbered mark; a tap removes a wrong mark or adds a missed one; "pick example" counts only things that look like one tapped object. Touching objects are split by their shape; heaps that can't be split are estimated from their area and marked ≈. Measures each object (area, length, width, equivalent diameter, roundness), in mm when an A4/Letter sheet, a bank card or our marker sheet is in the photo (shared photo-to-scale engine) or from a typed pixel size, and shows the size distribution with D10/D50/D90. Saves an annotated PNG, one CSV line per object and a summary CSV for a batch of up to 50 photos. Free, no sign-up, nothing uploaded.

## When it fits

- Someone has to count tens to thousands of small, similar things and wants a number they can check: colonies on a plate, seeds for a germination test or thousand-seed weight, tablets in a pack, parts or fasteners in a bin, cells or nuclei in a microscope image.
- Someone needs the sizes of grains, pellets, granules or particles from a photo (a quick size distribution without ImageJ).
- A batch of photos needs counting the same way, with a summary table and the marked pictures as a record.

### When not

- Counts where a mistake can harm someone (dispensing medicines, clinical diagnosis, regulated release testing): use a validated system.
- Objects piled on top of each other, very dense lawns or swarming colonies: only estimates are possible from one photo.
- Recognising what objects are (species, defects, text prompts such as "count the red ones"): this counts what stands out or looks like a tapped example; counting runs in your browser, and the optional ✦ button asks before sending a small copy.

## Why use it instead of the alternatives

- Nothing to install: the page counts a public photo from a link (?src=, &plate=1 for a dish) and an embed shows the counter in any page.
- The engine is plain JavaScript on opencv.js with no DOM, so the same code runs in Node for a server API copy (planned).
- ImageJ/Fiji (free, desktop) does thresholding, watershed and Analyze Particles but needs installing and a recipe per image type; OpenCFU (free, desktop) counts colonies; CountThings is an app with paid counting templates; phone colony-counter and pill-counter apps need installing and an account. Hosted AI demos (CountGD, SAM 3) are quota-limited and return raw outputs without sizes, mm or batch tables (checked Dec 2026).
- This counter: free in any browser incl. phones, nothing uploaded, numbered marks with one-tap fixes, tap-an-example, Petri dish detection, sizes in mm from a sheet or card in the photo, histogram with D10/D50/D90, CSV per object and per batch, annotated PNG.

### What rebuilding it would take

- Model the background locally so uneven light and coloured trays don't matter, threshold the difference, fill holes, and split touching objects with a distance transform and a marker flood, keeping a split only when every part is a plausible single.
- Estimate unsplittable heaps from area, find a Petri dish, take a tapped example's colour against its surroundings, and turn the scale reference into mm with perspective.
- Make every count checkable: numbered marks, one-tap corrections, a CSV per object, an annotated picture and a batch summary, on a phone.
- An eval set with known counts (public cell images with ground-truth masks plus rendered photos with hard cases) to keep the counter honest as it changes.

## Quality

No score published; the limits above say what it does not do. Check results that matter before you rely on them.

## Risk for the user

- Free and unlimited; no sign-up, no ads.
- A counting aid: check the marks before relying on the number; not for dispensing, diagnosis or regulated decisions. Colony counts are for research use only.

_Status: the counter page works; an API returning the count and sizes as data is planned, not answering yet._

## Privacy

- Photos opened in the page are counted on the user's device and never uploaded; there is no share link for photos.
- Photos opened by link (?src=) are fetched from where they are stored.
- The page loads opencv.js from unmakelabs.com itself; no third-party code host is contacted.

## Data

ブラウザ内でカウントし、写真は端末から出ません。アップロードも保存もされません。

## FAQ

- **カウントの精度はどのくらいですか？** 離れて置かれた物はほぼ正確に数えられます。物同士が接している場合や、光のむら、コントラストが低い場合は間違いが増え（混み合った顕微鏡画像が最も苦手です）、重なった山は推定値として ≈ で表示されます。マークを確認してください。見落としはタップ1回で直せます。
- **数え漏れや二重カウントがあったら？** マークをタップすると削除、何もない所をタップすると追加できます。数はすぐに更新され、CSVと画像にも反映されます。「同じ種類だけ数える」をタップして代表的な物を一つ選ぶとそれに似た物だけを数えます。または「調整」にある感度のスライダーを動かしてください。
- **ミリ単位でサイズを出すには？** A4またはUSレターサイズの紙（物をその上に置く）か、キャッシュカードなどのカードを物の横に置き、真上から撮影します。ツールがそれを検出してすべてのサイズを mm に換算し、スケールの誤差も表示します。顕微鏡やスキャナーの画像では、代わりに1ピクセルのサイズを入力してください。
- **本当に無料ですか？** はい。写真の枚数制限、広告、登録、有料プランはありません。一度に50枚まで処理できます。
- **写真はアップロードされますか？** いいえ。カウントは端末上で行われ、写真のアップロードや共有リンクはありません。実験のプレート、製品、サンプルの写真も外部に出ません。
- **AIエージェントでもカウントできますか？** エージェントは、公開されている写真をリンクでこのカウンターに開き（このページに ?src= と写真のアドレスを付けます）、対象ごとのCSVを保存できます。カウント数とサイズをデータで返すAPIも予定しています。
- **運営者は？** Unmake Labs です。お問い合わせ：hello@unmakelabs.com

## Related pages

- [種子カウンター](https://unmakelabs.com/ja-jp/seed-counter/)
- [錠剤カウンター](https://unmakelabs.com/ja-jp/pill-counter/)
- [コロニーカウンター](https://unmakelabs.com/ja-jp/colony-counter/)
- [写真から粒子径を測定](https://unmakelabs.com/ja-jp/particle-size-from-photo/)
