From 918bdbf9396a1ed93b9433ec02fbef0941da7f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=88=AA=E5=AE=87?= <3364451258@qq.com> Date: Thu, 7 May 2026 08:28:43 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E6=95=99=E7=A8=8B?= =?UTF-8?q?=E6=96=87=E6=A1=A3=EF=BC=8C=E5=8E=BB=E9=99=A4=E4=B8=8D=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E7=9A=84=E8=B7=AF=E5=BE=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ..._simple_tutorial.md => cDNA 微阵列网格划分.md} | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) rename docs/{gridding_simple_tutorial.md => cDNA 微阵列网格划分.md} (97%) diff --git a/docs/gridding_simple_tutorial.md b/docs/cDNA 微阵列网格划分.md similarity index 97% rename from docs/gridding_simple_tutorial.md rename to docs/cDNA 微阵列网格划分.md index cb16872..ce68fa0 100644 --- a/docs/gridding_simple_tutorial.md +++ b/docs/cDNA 微阵列网格划分.md @@ -1,4 +1,4 @@ -# cDNA 微阵列网格划分 —— 简化版逐行代码讲解 +# cDNA 微阵列网格划分 —— 逐行代码讲解 > 作者:刘航宇 | 河南理工大学计算机学院 @@ -7,11 +7,11 @@ ## 写在前面 这篇教程将 **逐行** 讲解 `cDNA_gridding_simple.py` 的每一段代码。 -目标读者是上《图像处理》课的同学,只要求你学过 Python 基础(列表、循环、numpy 数组)。 +目标读者是上《图像处理》课的同学,只要求学过 Python 基础(列表、循环、numpy 数组)。 读完这篇文章,你会彻底理解: - 一张 cDNA 微阵列图像是怎么被自动划分成 22×22 个方格子的 -- 为什么这么简单的算法,结果能和原版完全一致(误差 0 像素) +- 为什么这么简单的算法,结果能和原版老师发的示范MATLAB代码效果完全一致(误差 0 像素) --- @@ -20,8 +20,7 @@ 我们有一张 cDNA 芯片图像(820×820 像素),上面整齐排列着绿色的荧光斑点。 目标:**画一个网格线,让每个斑点都被一个方框圈住**。 - -![整体思路](images/overview_idea.png) +![整体思路](gridding_simple.png) 怎么自动做到?核心思路只有一句话: @@ -305,8 +304,8 @@ is_positive = [False, True, True, True, False, True, True, True] 位置: 0 1 2 3 4 5 6 7 数值: -20 20 30 25 -22 15 40 18 正负: False True True True False True True True - ↑ ↑ ↑ ↑ - 变化(0→1) 变化(3→4) 变化(4→5) + ↑ ↑ ↑ ↑ + 变化(0→1) 变化(3→4) 变化(4→5) ``` `is_positive[i] != is_positive[i-1]` 为 True 时,说明第 `i` 个像素处发生了正负翻转,也就是"跨过了零点"。 @@ -339,7 +338,7 @@ is_positive = [False, True, True, True, False, True, True, True] ``` 减阈值后的信号: ───── + + + + ────── + + + + ────── + + + + ───── - ↑ 斑点 ↑ ↑ 斑点 ↑ ↑ 斑点 ↑ + ↑ 斑点 ↑ ↑ 斑点 ↑ ↑ 斑点 ↑ c1 c2 c3 c4 ... c1: 负→正 (进入第一个斑点) ← 开头是负,跳过它