Fine Aggregate Sieve Analysis Tool
拍照範圍建議 / Shooting range planner
開發人員分析 / Developer analysis
使用說明書 / User Manual
1. 工具用途
本工具以一張俯拍的粒料照片(照片中放置一枚圓形標準物,預設為新台幣 10 元硬幣),由影像量測各顆粒的尺寸,依 CNS 486 / ASTM C136 的篩號由大至小「虛擬套篩」,計算停留量、停留百分率、累積停留百分率、累積通過百分率、細度模數 (FM) 與標稱最大粒徑,並依 CNS 1240 / ASTM C33 的級配界限判定。也可改用「手動輸入」直接輸入實際篩分析的各篩停留重量(g)。
2. 原理
- 比例尺:實際像素尺寸 μm/px = 標準物直徑 (mm) × 1000 ÷ 硬幣直徑 (px)。修改標準物尺寸時立即重算,不需重新上傳。
- 面積與質量:照片量到的是投影面積(∝ d²),篩分析用的是質量(∝ 體積 ∝ d³)。若直接用面積當停留量(面積法),粗顆粒會被低估、細顆粒高估,FM 會系統性偏低。可改用「估算體積 V ≈ A × 短軸寬」或「V ∝ A1.5(等效橢球)」以修正。所有方法均假設顆粒比重一致。
- 通過判定(方格網,預設):將邊長等於篩孔的方格網覆蓋於顆粒上,若顆粒輪廓(凸包)在方格網兩個方向上的投影寬度都 ≤ 篩孔邊長,代表顆粒可移動到某一方格內完全落入,判定通過。為模擬搖晃,每一篩以 0°、30°、45° 三個方向判定;顆粒停留機率 = 停留的角度數 ÷ 3,以該權重計入本篩,其餘權重帶到下一篩繼續判定(每一篩三個角度平均後才往下傳)。
- 通過判定(最小 Feret 寬度):以顆粒輪廓的凸包,從 0° 到 175° 每 5° 旋轉一次(共 36 個角度)量測卡尺寬度,取最小值;最小寬度 ≤ 篩孔邊長即通過。動畫中每一篩會以間距等於篩孔的平行線(卡尺)逐 5° 旋轉:仍為篩色的顆粒表示到目前角度都還卡住,變為白色表示已在某個角度通過;轉完 175° 時剩下的篩色顆粒即停留在該篩。
- 可信的最小篩號:由硬幣邊緣 10–90% 亮度上升距離估算影像模糊量 σ (px),N = max(8, ⌈2·max(0.5, σ)/0.2⌉)。篩孔換算像素 ≥ N 的篩為可信。預設所有篩號(9.5 mm 至 75 µm 及底盤)都照常計算,低於解析度的篩在報告中以「⚠ 解析度不足」標示、僅供參考;也可選擇「併入底盤」。低於解析度的極細顆粒可能未被偵測,pan 的量可能偏低。使用者可自訂 N。v1.1 起 σ 只在硬幣邊緣最陡處 ±6 px 內量測並取 25 百分位,避免把硬幣邊緣的斜面、浮雕與陰影誤當成模糊。
- 接觸顆粒:預設以距離轉換 + watershed 分離相接觸的顆粒(鞍點高於較低峰值 70% 者合併,以避免長條顆粒被過度切割)。也可選「凹點分割」:追蹤輪廓、找出低於凸包的凹點,在兩凹點形成的頸部切開,較不易切斷長條顆粒。
- 二值化方法:Otsu 全域閾值(預設);Sauvola 局部閾值(依局部平均與標準差,可應付照明不均);多級 Otsu(分成暗、中、亮 3 類,背景為邊框最多的類別,深色與淺色顆粒分開計算,適合深淺顆粒混合);色彩分群(以灰階與色度做 k-means 分 3 群)。閾值自設與閾值掃描只適用於 Otsu。
- 梯度式 watershed(不需閾值):以平滑後的亮度梯度找出低梯度標記,用分水嶺擴張到邊緣,再合併邊界微弱且亮度相近的相鄰區域,保留「邊界明顯強於內部」的區域為顆粒。適合顆粒緊靠、沒有明確背景的照片,但紋理粗糙的大顆粒仍可能被切成數塊。
- 二值化:預設 Otsu 法自動決定閾值,背景明暗由影像邊框自動判斷,也可自設閾值與顆粒亮暗。小於影像面積一定比例的內部孔洞會被填補(顆粒反光)。
3. 計算與捨入規則
- 停留百分率、累積停留百分率、累積通過百分率報到整數;累積停留百分率以各篩整數停留百分率累加(同範例表)。
- 底盤 = 100 − 其他各篩整數之和;若有 No.200 數據,底盤與 No.200 通過率以未捨入值計算並報到 0.1%(No.200 通過率 ≥ 10% 時報整數)。
- 細度模數 = (No.4、No.8、No.16、No.30、No.50、No.100 累積停留百分率之和) ÷ 100,報到 0.01;若 9.5 mm 篩上有停留,依定義一併計入。
- 標稱最大粒徑 = 累積停留百分率 ≤ 10% 的最小篩號。
- 報告判定:各篩累積通過百分率是否在 CNS 1240 / ASTM C33 界限內(9.5 mm:100;4.75 mm:95–100;2.36 mm:80–100;1.18 mm:50–85;600 μm:25–60;300 μm:5–30;150 μm:0–10)、4.75 mm 至 150 μm 間相鄰兩篩之間的停留量 ≤ 45%、FM 在 2.3–3.1 之間。
- 手動輸入時,欄位留空表示該篩未使用(不列入表格,其材料視為落到下一個有填的篩或底盤);填 0 表示有使用但停留量為 0(仍列入表格)。比最大使用篩更大的篩視為 100% 通過並畫在圖上。
4. 拍攝與鋪樣建議
- 本工具分析的是單層鋪開的小樣本,不是 CNS 486 / ASTM C136 規定的 500 g 全量試樣,結果代表性受取樣影響。
- 背景:最建議使用背光燈板(A4 LED 描圖燈板,上面可放一片透明壓克力或玻璃),所有顆粒都會變成黑色剪影,不受顆粒顏色深淺影響,並開啟「背光照片模式」。沒有燈板時,用與多數顆粒對比最大的單色無紋理背景;顆粒同時有深色與淺色時,會有一部分顆粒漏測。不要拍砂堆表面。
- 顆粒單層、不重疊,盡量互不接觸;建議至少數百顆(愈多愈好),鋪樣面積約為 A4 的一部分即可,但需確保細顆粒在照片中仍有足夠像素。
- 相機垂直俯拍、對焦清晰、光線均勻;硬幣放在畫面中央附近,以減少鏡頭邊緣變形;硬幣邊緣不要被顆粒遮住。
- 欲評估到 150 μm (No.100),像素尺寸需約 ≤ 15–19 μm/px(視 N 而定),一般需以微距或近拍分區拍攝。資訊面板會顯示可信的最小篩號。
- 支援 JPG、PNG 與 iPhone 的 HEIC/HEIF:Safari 可直接讀取;其他瀏覽器會自動以 heic-to 1.6.6(支援新款 iPhone HEIC;失敗時改用 heic2any 0.0.4,皆由 jsDelivr CDN 載入)在瀏覽器端轉檔;可直接把 HEIC 檔拖進工具任何位置。照片以原始解析度處理(最長邊至 6000 px),影像只在瀏覽器端處理,不會上傳伺服器。
4a. 拍攝比例示意圖:分辨 75 µm (No. 200) 的最低要求
以 iPhone 17 Pro 輸出圖檔 5712 × 4284 px 為例。75 µm 篩孔在影像上至少要有 N = 8 個像素(模糊量 σ ≤ 0.8 px 時的最小值),所以像素尺寸必須 ≤ 75 ÷ 8 = 9.38 µm/px;也就是整張照片的實際範圍不得大於 53.6 × 40.2 mm,10 元硬幣(Ø 26.0 mm)在照片上至少要有 2773 px,約佔畫面寬度的一半。一般手機照片 σ 約 1 px(N = 10),建議再拍近一點,範圍約 42.8 × 32.1 mm(7.50 µm/px)。
| 欲分辨的最小篩號 | N = 8:µm/px | 最大拍攝範圍 (mm) | 硬幣直徑 (px) | 硬幣佔畫面寬 | N = 10:µm/px | 拍攝範圍 (mm) | 硬幣直徑 (px) |
|---|---|---|---|---|---|---|---|
| 75 µm (No. 200) | 9.38 | 53.6 × 40.2 | 2773 | 48.6 % | 7.50 | 42.8 × 32.1 | 3467 |
| 150 µm (No. 100) | 18.75 | 107.1 × 80.3 | 1387 | 24.3 % | 15.0 | 85.7 × 64.3 | 1733 |
| 300 µm (No. 50) | 37.5 | 214.2 × 160.7 | 693 | 12.1 % | 30.0 | 171.4 × 128.5 | 867 |
| 600 µm (No. 30) | 75.0 | 428.4 × 321.3 | 347 | 6.1 % | 60.0 | 342.7 × 257.0 | 433 |
- 這個倍率需使用 iPhone 的微距模式近拍(鏡頭距離數公分),並確認對焦清晰;照片要用原始解析度(5712 × 4284),不可裁切後放大,也不要用「縮小檔案」的分享方式。
- 此範圍內扣除硬幣後可鋪樣的面積有限,適合只拍細顆粒部分;若同時要量 4.75 mm 的粗顆粒,請注意粗顆粒數量會太少。
- 工具在電腦瀏覽器上以原始解析度(最長邊至 6000 px、約 25 MP)處理;iPhone / iPad 的 Safari 受畫布 16 MP 限制,會縮小約 0.81 倍,此時需再拍近約 20%(建議用電腦分析)。
- 實際可信的最小篩號仍以工具量到的 σ 與 N 為準(資訊面板會顯示)。
提示:可展開上方「拍照範圍建議」,依自己的相機、標準物與欲分辨的篩號計算拍攝範圍,並列印實際尺寸取景卡。
5. 操作步驟
- 選擇適用標準、計算假設與判定準則;選擇標準物尺寸。
- 上傳照片。工具會自動偵測硬幣(Hough circle),可拖曳圓框內部移動、拖曳圓周調整大小,或按「重新圈選標準物」自行拖曳指定(由圓心拖到邊緣)。
- 檢查「分類結果」圖層:顆粒依停留篩著色,灰色為被排除的邊界顆粒。可切換「二值化」圖層檢查閾值。
- 開啟「動畫」可逐篩、逐角度觀看判定過程(可暫停)。
- 按影像上方「✂ 裁切」後在影像上拖曳矩形,可只分析選定範圍(例如排除托盤邊緣);按「↺ 取消裁切」恢復全圖。
- 動畫可播放、暫停、往前/往後格放,並調整每步速率,方便上課展示。
- 標題下方「⛶ 全螢幕顯示」讓整個工具佈滿螢幕;影像工具列的「⛶ 全螢幕」只放大影像(Esc 或再按一次結束)。
- 使用背光燈板拍攝時,開啟「背光照片模式」:顆粒自動視為暗色剪影、背景為亮色,會先把燈板亮度不均的情形平坦化,再以剪影亮暗兩峰的中點作為閾值(模糊邊緣的 50% 位置),量到的輪廓最準。半透明顆粒中央的亮點會被自動填補。
- 若照片中顆粒佔分析面積超過 40%,或出現寬度大於 9.5 mm 的連成一片的區塊,工具會判定為「砂堆照片」,並提醒「照片中顆粒互相堆疊、沒有背景,結果不可信」。
- 查看報告並輸出 PDF。級配曲線與粒徑分布直方圖下方各有「⬇ 下載 PNG」(高解析度,可直接放入投影片或報告)。
- 「匯出 Excel」產生兩個工作表:Grading(基本資料、計算假設與級配表)與 Particles(每顆顆粒的位置、面積、最小 Feret 寬度、方格網寬度、停留篩號與各篩停留比例);「匯出 CSV」為同樣內容的單一 CSV 檔(UTF-8)。Excel 需由 cdnjs 載入 SheetJS 0.18.5,失敗時自動改存 CSV。
- 「儲存設定」把所有選項、手動輸入值、標準物位置、裁切範圍與結果摘要存成 JSON 檔;「載入設定」可還原,若照片尺寸相同,會自動套用標準物與裁切範圍,方便重現結果或批改作業。
- 影像分析在背景執行緒(Web Worker)進行,處理時畫面不會凍結,並顯示進度;瀏覽器不支援時自動改在主執行緒執行。
- 工具以硬幣邊緣配適橢圓檢查俯拍角度:長短軸比 > 1.02(相機傾斜約 11° 以上)時會警告。
- 電腦版瀏覽器可直接以原始解析度處理 6000 萬像素以上的照片(最長邊 16384 px、上限約 1.2 億像素),約每 1000 萬像素需 0.2 GB 記憶體;手機 Safari 受畫布限制仍會縮小至約 1600 萬像素。
- 「繪圖方式」預設為 WebGPU 硬體加速,用於影像的縮放、平移與動畫顯示,大型照片會更流暢;瀏覽器不支援時自動改用軟體繪圖。繪圖方式只影響顯示,不影響分析結果。
- 按基本設定最下方的「⟲ 重新開始」會清除影像、裁切範圍與所有計算結果(設定保留)。
6. PDF 輸出
- jsPDF + html2canvas:把報告畫面轉成圖片再放進 PDF,中文不需嵌入字型,但PDF 內文字無法選取。函式庫由 CDN 載入(jsPDF 2.5.1、html2canvas 1.4.1,cdnjs)。
- 列印 (window.print):使用瀏覽器的列印功能,可選「另存為 PDF」,文字可選取。
- 自動:優先使用 jsPDF + html2canvas,CDN 載入失敗時改用列印。
6b. AI 實例分割(StarDist,實驗性)
- 「分割 / 接觸顆粒分離」選「AI:StarDist」時,工具在瀏覽器內以 onnxruntime-web 1.29.0(WebGPU,不支援時改用 WASM)執行 StarDist 2D_versatile_fluo 預訓練模型,逐塊推論(1024 px、重疊 160 px),以星狀凸多邊形描述每顆顆粒,再以非極大值抑制(NMS 0.3)去除重複,最後以原始解析度描繪顆粒輪廓。影像仍只在瀏覽器處理,不會上傳。
- 模型檔(約 5.7 MB)需由網址(建議放在 GitHub,經 jsDelivr 提供)或本機檔案載入。模型原為螢光細胞核訓練,未針對細粒料訓練;顆粒清楚、互相接觸的情況效果良好,但紋理粗糙的大顆粒與細料基質常會漏測。長條或稜角明顯的顆粒會被近似為星狀凸多邊形。
- 推論縮放「自動」會把影像縮到約 24 µm/px(模型擅長約 10–40 px 大小的物件);低於此尺度的細顆粒無法偵測。
- StarDist © Uwe Schmidt, Martin Weigert 等,BSD-3-Clause 授權(Schmidt et al., MICCAI 2018; Weigert et al., WACV 2020)。
6c. AI:SAM 自動分割與合併(實驗性)
- 「AI:SAM 自動分割」使用 Segment Anything 系列模型(預設 MobileSAM,可改用 SAM 2),在每個 1024 px 小塊上撒 n × n 個提示點,每點產生 3 個候選遮罩,保留預測品質(IoU)與穩定度都高於閾值者,以框重疊 0.7 去除重複,再以原始解析度描繪輪廓(小顆粒優先,與既有顆粒重疊超過 30% 者捨棄)。SAM 能完整抓到紋理粗糙的大顆粒與稜角輪廓,但小顆粒較少。
- 「AI:StarDist + SAM 合併」:粒徑大於設定值(預設 1.0 mm)的顆粒採用 SAM,其餘以 StarDist 為主,最後以 SAM 補足空隙。
- SAM 模型包由 manifest.json 與分割檔組成(每檔小於 20 MB,以便由 GitHub / jsDelivr 提供),也可一次選取全部檔案由本機載入。「SAM 模型」選單:MobileSAM(v1,預設,較快)、SAM 2.1 tiny(v2,較準,建議使用 GPU),或「自訂網址/本機檔」。SAM 計算量大,在一般電腦上每張照片可能需要數分鐘;建議使用支援 WebGPU 的瀏覽器。
- MobileSAM © Chaoning Zhang 等(Apache-2.0);SAM 2 © Meta Platforms(Apache-2.0)。
6a. 細料修正
- 照片無法看到小於 75 µm 的細料(甚至 150 µm 以下也常低於解析度),細料漏掉後總量變小,各篩累積停留百分率被高估,FM 會系統性偏高。以本研究室一組實測為例:實驗 FM = 2.57,No.200 通過率 11.3%;若影像完美但看不到小於 75 µm 的細料,FM 會變成 2.89。
- 開啟「細料修正」並輸入水洗試驗(CNS 491 / ASTM C117)的 No.200 通過率 P(%),工具會令底盤 = 其他各篩影像量總和 × P / (100 − P),使底盤占總量 P%,其餘各篩維持影像比例。開啟時,低於解析度的篩一律照常計算(不併入底盤),以免被取代。
- 修正只補回小於 75 µm 的部分;75–150 µm 若低於解析度,仍會偏少。
7. 限制
- 影像只能量到二維投影,無法得知顆粒厚度;扁平或長條顆粒的通過判定與體積估算有誤差。
- 低於解析度的極細顆粒可能未被偵測,底盤的量可能偏低;顆粒重疊、陰影、反光或背景不均會影響分割結果。
- 本工具為影像估算,不能取代 CNS 486 / ASTM C136 實際試驗。
1. Purpose
This tool takes a top-down photograph of a fine-aggregate sample with a circular reference object (default: a NT$10 coin), measures every particle, "virtually sieves" them through the CNS 486 / ASTM C136 sieve stack from coarse to fine, and reports the amount retained, percentages retained, cumulative percentages retained and passing, fineness modulus (FM) and nominal maximum size, checked against the CNS 1240 / ASTM C33 grading limits. A "manual input" mode accepts measured masses (g) retained on each sieve.
2. Principle
- Scale: pixel size (µm/px) = reference diameter (mm) × 1000 ÷ coin diameter (px). Changing the reference size recalculates immediately; no re-upload is needed.
- Area vs. mass: a photo measures projected area (∝ d²), whereas a sieve analysis uses mass (∝ volume ∝ d³). Using area as the retained amount (area method) under-weights coarse particles and over-weights fine ones, so the FM is systematically low. "Estimated volume V ≈ A × minor width" or "V ∝ A1.5 (equivalent ellipsoid)" compensate for this. All methods assume a uniform specific gravity.
- Passing criterion – square grid (default): a grid with the sieve opening as its cell size is laid over the particle; if the projected widths of the particle outline (convex hull) along both grid directions are ≤ the opening, the particle can be moved to fall completely within one cell and passes. To simulate shaking, each sieve is evaluated at 0°, 30° and 45°; the retention probability equals the number of retaining angles ÷ 3. That weight is retained on the sieve and the remainder is passed to the next sieve (angles are averaged before passing material down).
- Passing criterion – minimum Feret width: the caliper width of the particle outline (convex hull) is measured every 5° from 0° to 175° (36 angles) and the minimum is taken; the particle passes if it is ≤ the opening. In the animation, parallel caliper lines spaced at the opening rotate in 5° steps for each sieve: particles still in the sieve colour are blocked at every angle so far, white ones have already passed at some angle; those still coloured after 175° are retained.
- Smallest trusted sieve: the image blur σ (px) is estimated from the 10–90 % intensity rise across the coin rim, N = max(8, ⌈2·max(0.5, σ)/0.2⌉). Sieves whose opening is ≥ N px are trusted. By default all sieves (9.5 mm to 75 µm and the pan) are evaluated; sieves below the resolution are marked "⚠ low resolution" in the report (for reference only). Alternatively their material can be merged into the pan. Very fine particles below the resolution may be missed, so the pan may be under-estimated. N can be set by the user. Since v1.1, σ is measured only within ±6 px of the steepest point of the coin rim and the 25th percentile is used, so the bevel, relief and shadow of a real coin are not mistaken for blur.
- Touching particles: separated by default with a distance-transform watershed (peaks whose saddle exceeds 70 % of the lower peak are merged to avoid over-splitting elongated grains). "Concave-point splitting" traces the outline, finds points lying deep below the convex hull and cuts across the neck between two of them; it splits elongated grains less often.
- Binarization: Otsu global threshold (default); Sauvola local threshold (local mean and standard deviation, robust to uneven lighting); multi-level Otsu (dark / mid / bright classes; the background is the class most common on the border, dark and light grains are kept apart – for mixed-colour sands); colour clustering (k-means with 3 clusters on grey level and chroma). User thresholds and the threshold sweep apply to Otsu only.
- Gradient watershed (no threshold): low-gradient markers of the smoothed image are flooded up to the edges; neighbouring regions with weak shared boundaries and similar brightness are merged, and regions whose boundary is clearly stronger than their interior are kept as particles. Suited to tightly packed grains without a clear background, although large textured grains may still be split.
- Binarization: Otsu threshold by default; the background polarity is detected from the image border. Threshold and particle polarity can be set manually. Small interior holes (specular highlights) are filled.
3. Calculation and rounding
- Percentages are reported to the nearest whole number; cumulative retained percentages are the running sum of the rounded individual percentages (as in the worked example).
- Pan = 100 − sum of the rounded values of the other sieves; when No.200 data exist, the pan and the No.200 passing are computed from unrounded values and reported to 0.1 % (to the whole number if the No.200 passing is ≥ 10 %).
- FM = (sum of cumulative % retained on No.4, No.8, No.16, No.30, No.50, No.100) ÷ 100, reported to 0.01; the 9.5-mm sieve is added by definition only if material is retained on it.
- Nominal maximum size = the smallest sieve with cumulative retained ≤ 10 %.
- Judgment: cumulative passing within the CNS 1240 / ASTM C33 limits (9.5 mm: 100; 4.75 mm: 95–100; 2.36 mm: 80–100; 1.18 mm: 50–85; 600 µm: 25–60; 300 µm: 5–30; 150 µm: 0–10); not more than 45 % retained between any two consecutive sieves from 4.75 mm to 150 µm; FM within 2.3–3.1.
- Manual input: a blank field means the sieve was not used (not listed; its material is counted on the next filled sieve or pan); 0 means the sieve was used with nothing retained (listed). Sieves larger than the largest sieve used are plotted as 100 % passing.
4. Photography and sample spreading
- The tool analyses a small single-layer sample, not the 500-g test portion required by CNS 486 / ASTM C136; representativeness depends on sampling.
- Background: a light box is strongly recommended (A4 LED tracing pad, optionally with a clear acrylic or glass sheet on top) – every particle becomes a dark silhouette regardless of its colour; enable "Backlit photo". Without a light box, use a uniform background with the best contrast to most particles; with mixed dark and light grains some will be missed. Do not photograph the surface of a pile.
- Spread particles in a single, non-overlapping layer, ideally not touching; use at least several hundred particles, while keeping enough pixels for the fine fractions.
- Shoot perpendicular to the surface, in focus, with even lighting; place the coin near the centre of the frame to minimise lens distortion, and keep its rim unobstructed.
- To evaluate down to 150 µm (No.100) the pixel size must be about ≤ 15–19 µm/px (depending on N), which usually requires close-up or macro photos. The information panel shows the smallest trusted sieve.
- JPG, PNG and iPhone HEIC/HEIF are supported: Safari decodes HEIC natively; other browsers convert it in the browser with heic-to 1.6.6 (supports recent iPhone HEIC; heic2any 0.0.4 as fallback, both from jsDelivr CDN). Files can be dropped anywhere on the tool. Photos are processed at original resolution (up to 6000 px on the long side) and never uploaded.
4a. Framing diagram: minimum requirement to resolve 75 µm (No. 200)
Example: iPhone 17 Pro output image of 5712 × 4284 px. A 75-µm opening must span at least N = 8 pixels (the minimum, valid when the blur σ ≤ 0.8 px), so the pixel size must be ≤ 75 ÷ 8 = 9.38 µm/px. The whole photo may therefore cover no more than 53.6 × 40.2 mm, and the NT$10 coin (Ø 26.0 mm) must measure at least 2773 px — about half the frame width. Phone photos typically have σ ≈ 1 px (N = 10), so shooting slightly closer (≈ 42.8 × 32.1 mm, 7.50 µm/px) is recommended.
| Smallest sieve to resolve | N = 8: µm/px | Max. field of view (mm) | Coin diameter (px) | Coin / frame width | N = 10: µm/px | Field of view (mm) | Coin diameter (px) |
|---|---|---|---|---|---|---|---|
| 75 µm (No. 200) | 9.38 | 53.6 × 40.2 | 2773 | 48.6 % | 7.50 | 42.8 × 32.1 | 3467 |
| 150 µm (No. 100) | 18.75 | 107.1 × 80.3 | 1387 | 24.3 % | 15.0 | 85.7 × 64.3 | 1733 |
| 300 µm (No. 50) | 37.5 | 214.2 × 160.7 | 693 | 12.1 % | 30.0 | 171.4 × 128.5 | 867 |
| 600 µm (No. 30) | 75.0 | 428.4 × 321.3 | 347 | 6.1 % | 60.0 | 342.7 × 257.0 | 433 |
- This magnification requires the iPhone macro mode (a few cm from the sample) with sharp focus. Use the original resolution (5712 × 4284); do not crop and enlarge, and do not share a reduced-size copy.
- After the coin, little area is left for particles, so this framing suits the fine fraction; coarse 4.75-mm particles will be too few in such a small field.
- Desktop browsers process the photo at full resolution (up to 6000 px on the long side, ~25 MP). Safari on iPhone / iPad is limited to 16 MP canvases and scales the image by ~0.81, so shoot ~20 % closer there (a computer is recommended).
- The actual smallest trusted sieve is still determined from the measured σ and N (shown in the information panel).
Tip: expand the "Shooting range planner" above to compute the field of view for your own camera, reference and target sieve, and to print a true-scale framing card.
5. Steps
- Choose the standard, calculation assumption, passing criterion and reference size.
- Upload the photo. The coin is detected automatically (Hough circle). Drag inside the circle to move it, drag its rim to resize, or press "Redraw reference" and drag from the centre to the rim.
- Check the "Classified" layer: particles are coloured by the sieve on which they are retained; grey particles are excluded (touching the border). Use the "Binary" layer to check the threshold.
- Enable "Animation" to watch the sieve-by-sieve, angle-by-angle evaluation (can be paused).
- Press "✂ Crop" above the image and drag a rectangle to analyse only that region (e.g. to exclude a tray edge); "↺ Reset crop" restores the full image.
- The animation can be played, paused, stepped backward / forward, and its speed per step adjusted for teaching.
- "⛶ Full screen (whole tool)" below the title fills the screen with the whole tool; "⛶ Full screen" in the image toolbar enlarges only the image (Esc or press again to exit).
- With a light box, enable "Backlit photo": particles are treated as dark silhouettes on a bright background, uneven light-box brightness is flattened, and the threshold is set at the midpoint of the silhouette and background peaks (the 50 % position of a blurred edge) for accurate outlines. Bright spots inside translucent grains are filled.
- If particles cover more than 40 % of the analysed area, or merged blobs wider than 9.5 mm appear, the photo is flagged as a pile: "Particles are piled up with no visible background; the results are not reliable."
- Review the report and export a PDF. The grading curve and the size histogram each have "⬇ Download PNG" (high resolution, for slides or reports).
- "Export Excel" creates two sheets: Grading (metadata, assumptions and the grading table) and Particles (position, area, min. Feret width, grid widths, retaining sieve and fractions per sieve for every particle); "Export CSV" writes the same content to one UTF-8 CSV file. Excel uses SheetJS 0.18.5 from cdnjs and falls back to CSV.
- "Save settings" stores all options, manual inputs, reference circle, crop and a result summary as JSON; "Load settings" restores them and re-applies the reference and crop when the photo size matches, so results can be reproduced or checked.
- Image analysis runs in a background thread (Web Worker) with a progress bar, so the page does not freeze; it falls back to the main thread when Workers are unavailable.
- The coin rim is fitted with an ellipse to check the camera angle: an axis ratio > 1.02 (tilt ≳ 11°) raises a warning.
- Desktop browsers process photos of 60 MP and more at full resolution (up to 16384 px on the long side, ~120 MP), needing about 0.2 GB of memory per 10 MP; mobile Safari is still limited to ~16 MP by its canvas size.
- "Rendering" defaults to WebGPU hardware acceleration for zooming, panning and animation, which is smoother for large photos; it falls back to software rendering when unsupported. Rendering affects display only, not the results.
- "⟲ Start over" at the bottom of the General panel clears the image, crop and all results (settings are kept).
6. PDF export
- jsPDF + html2canvas: the report is rendered as an image inside the PDF, so Chinese text needs no embedded font, but the text in the PDF is not selectable. Libraries are loaded from CDN (jsPDF 2.5.1, html2canvas 1.4.1, cdnjs).
- Print (window.print): uses the browser print dialog (choose "Save as PDF"); text remains selectable.
- Auto: jsPDF + html2canvas first, falling back to print if the CDN cannot be loaded.
6b. AI instance segmentation (StarDist, experimental)
- With "AI: StarDist" the StarDist 2D_versatile_fluo pretrained model runs in the browser with onnxruntime-web 1.29.0 (WebGPU, or WASM when unavailable) in 1024-px tiles with 160-px overlap; each particle is described by a star-convex polygon, duplicates are removed by non-maximum suppression (0.3) and outlines are rendered at full resolution. Images never leave the browser.
- The model file (~5.7 MB) is loaded from a URL (GitHub via jsDelivr recommended) or a local file. It was trained on fluorescent nuclei, not aggregates: distinct touching grains are separated well, but large textured grains and the fine matrix are often missed, and elongated or angular grains are approximated by star-convex shapes.
- "Auto" scale resizes the image to about 24 µm/px (the model prefers objects of about 10–40 px); finer grains cannot be detected.
- StarDist © Uwe Schmidt, Martin Weigert et al., BSD-3-Clause (Schmidt et al., MICCAI 2018; Weigert et al., WACV 2020).
6c. AI: SAM automatic masks and fusion (experimental)
- "AI: SAM automatic masks" uses a Segment Anything model (MobileSAM by default, SAM 2 optional). Each 1024-px tile is prompted with an n × n point grid; each point yields 3 candidate masks, which are kept when the predicted IoU and the stability exceed the thresholds, de-duplicated by box overlap (0.7) and rendered at full resolution (small first; masks overlapping existing particles by more than 30 % are dropped). SAM captures large textured grains and angular outlines well but finds fewer small grains.
- "AI: StarDist + SAM fusion": particles larger than the set size (default 1.0 mm) come from SAM; the rest mainly from StarDist, with SAM filling remaining gaps.
- A SAM model pack consists of manifest.json and part files (each < 20 MB so that GitHub / jsDelivr can serve them); all files can also be selected locally at once. The "SAM model" menu offers MobileSAM (v1, default, faster), SAM 2.1 tiny (v2, more accurate, GPU advised) or "Custom URL / local file". SAM is computationally heavy and may take minutes per photo on an ordinary computer; a WebGPU-capable browser is recommended.
- MobileSAM © Chaoning Zhang et al. (Apache-2.0); SAM 2 © Meta Platforms (Apache-2.0).
6a. Fines correction
- Photos cannot see material finer than 75 µm (and often not below 150 µm). Missing fines shrink the total, inflate the cumulative % retained and bias the FM high. Example from our laboratory: lab FM = 2.57 with 11.3 % passing No. 200; a perfect image analysis that cannot see the < 75 µm fraction would give FM = 2.89.
- Enable "Fines correction" and enter the % passing No. 200, P, from washing (CNS 491 / ASTM C117). The pan becomes (sum of the image amounts on all sieves) × P / (100 − P), so that the pan is P % of the total; the other sieves keep the image proportions. While enabled, sieves below the resolution are always evaluated (not merged into the pan).
- Only the < 75 µm fraction is restored; the 75–150 µm fraction is still under-estimated when it is below the resolution.
7. Limitations
- Only 2-D projections are measured; particle thickness is unknown, so flat or elongated particles introduce errors in passing decisions and volume estimates.
- Very fine particles below the resolution may be missed, so the pan may be under-estimated; overlaps, shadows, glare or uneven backgrounds affect segmentation.
- This is an image-based estimate and does not replace an actual CNS 486 / ASTM C136 test.
Advanced Engineering Materials Laboratory (AEML), Department of Civil and Construction Engineering, National Taiwan University of Science and Technology (NTUST)