Skip to content

Commit

Permalink
4: start
Browse files Browse the repository at this point in the history
  • Loading branch information
OverflowCat committed Jun 23, 2024
1 parent 04989d4 commit 65e45fd
Show file tree
Hide file tree
Showing 8 changed files with 122 additions and 0 deletions.
1 change: 1 addition & 0 deletions chap02/main.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#import "@preview/unify:0.4.3": num, qty
#import "@preview/gentle-clues:0.7.0": clue
#set text(font: "Noto Serif CJK SC")

#let problem(title: "问题", icon: emoji.quest , ..args) = clue(
accent-color: green,
Expand Down
15 changes: 15 additions & 0 deletions chap04/3.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#import "@preview/unify:0.6.0": qty
#import "helper.typ": Q
#let a = qty(0.5, "mm")

#Q[3、 考虑一幅棋盘图像,其中每一个方格的大小为 #a×#a。假定图像在两个坐标方向上无限扩展,为避免混淆,问最小取样率是多少(样本数/mm)?(教材P192页,第4.12题。)]

记方格边长为 $a = #a $,则其最高频率

$ f_max = 1 / a = #qty(2, "mm^-1"). $

根据 Nyquist 采样定理,取样率至少应为最高频率的两倍,所以

$ f_upright(s) = 2 f_max = #qty(4, "mm^-1"). $

即最小取样率是 4 样本数 / mm。
12 changes: 12 additions & 0 deletions chap04/6.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

#import "helper.typ": Q

#Q[
如图4.59中说明的那样,将高频强调和直方图均衡相结合是实现边缘锐化和对比度增强的有效方法。

+ 说明这种结合方法是否与先用哪种处理有关。
+ 如果与应用顺序有关,请给出先采用某种方法的理由。

(教材P195页,第4.39题。)
]

14 changes: 14 additions & 0 deletions chap04/helper.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#let problemCounter = counter("q")
#let Q = (body) => {
set text(weight: "semibold")
problemCounter.step()

problemCounter.display("1、")
body
}

#let FT = $cal(F)$
#let IFT = $FT^(-1)$
#let CONV = sym.star.filled
#let SUMOO = $sum^(oo)_(n=-oo)$
#let INTOO = $integral^(oo)_(-oo)$
45 changes: 45 additions & 0 deletions chap04/main.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#set text(lang: "zh", cjk-latin-spacing: auto, font: "Noto Serif CJK SC")
#set page(numbering: "1", margin: (left: 1.4cm, right: 1.9cm))
#show figure.caption: set text(font: "Zhuque Fangsong (technical preview)")
#show "": ""
#show heading: set text(font: "Noto Sans CJK SC", size: 1.15em)
#import "helper.typ": *


#Q[完成由式(4.3-11)和式(4.3-12)给出的步骤。(教材P192页,第4.6题。)]

$ f(t) = IFT {F(mu)}
= IFT {H(mu) tilde(F)(mu)}
= h(t) CONV overline(f)(t)
$

$
f(t) = SUMOO f(n Delta T) sinc ((t-n Delta T)/(Delta T))
$

#Q[写出二维连续卷积的表达式(教材P192页,第4.11题。)]

$ f(t, z) CONV h(t, z) = INTOO INTOO f(alpha, beta) h(t - alpha, z - beta) dif alpha dif beta. $

#include "3.typ"

#Q[由4.5.4节中的讨论可知,收缩一幅图像会导致混淆现象。放大一幅图像也会导致混淆现象吗?请解释。(教材P192页,第4.13题。)]

缩小图像时可能会导致混叠是因为采样率降低。放大操作引入了更多的样本,所以不会导致混叠。

#Q[4.6.6节中在讨论频率域滤波时需要对图像进行填充。在该节中给出的图像填充方法是,在图像中行和列的末尾填充0值(见左图)。如果我们把图像放在中心,四周填充0值(见右图而不改变所用0值的总数,会有区别吗?试解释原因。(教材P193页,第4.21题。)]

DFT 将图像视为周期性延拓的,填充零值相当于在图像副本间插入“缓冲区”,减少相互干扰。无论将零填充在图像末尾还是周围,只要填充数量相同,效果就等同。填充后的图像就像棋盘,原始图像或位于方格中心或占据整个方格,但每个方格内容相同,数学上等价。两种填充方式都能有效防止 DFT 周期性延拓,可根据实际需要选择,通常在图像末尾填充零更方便。

#include "6.typ"

#Q[
一种成熟的医学技术被用于检测电子显微镜生成的某类图像。为简化检测任务,技术人员决定采用数字图像增强技术,并在处理结束后,检查了一组具有代表性的图像,发现了如下问题:

+ 明亮且孤立的点是不感兴趣的点;
+ 清晰度不够;
+ 一些图像的对比度不够;
+ 平均灰度值已被改变,而正确地执行某种灰度度量的这个值应是 $V$

技术人员想要纠正这些问题,然后将 $I_1$$I_2$ 波段之间的所有灰度显示为白色,同时保持其余灰度的正常色调。请为技术人员提出达到期望目的的处理步骤。可以使用第3章和第4章的技术。(教材P195页,第4.43题。)
]
Binary file added expt02/Images/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added expt02/Images/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions expt02/main.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#set text(lang: "zh", cjk-latin-spacing: auto, font: "Noto Serif CJK SC")
#set page(numbering: "1", margin: (left: 1.4cm, right: 1.9cm))
#show figure.caption: set text(font: "Zhuque Fangsong (technical preview)")
#show "": ""
#show heading: set text(font: "Noto Sans CJK SC", size: 1.15em)
#import "../expt01/blockcode.typ": bc
#show raw.where(block: true): bc
#show raw.where(): set text(size: 1.15em, font: "JetBrains Mono")

== 1、(P185例4.23)

使用陷波滤波减少莫尔(波纹)模式。@img1 是来自扫描报纸的图像,它显示了突出的莫尔模式,设计一个 Butterworth 陷波带阻滤波器消除图像中的莫尔条纹。

#figure(
caption: "莫尔模式的取样过的报纸图像",
image("Images/1.png"),
)<img1>

Butterworth 带阻滤波器的公式为
$ H(u, v) = 1 / (1 + (display((D(u, v)W) / (D^2(u, v) - D_0^2)))^(2 n)) $


(a) 用零填充图像会增加其大小,但不会改变其灰度级内容。因此,填充后图像的平均灰度级低于原始图像。这意味着填充后图像频谱中的 F(0,0) 小于原始图像中的 F(0,0)(回想一下,F(0,0) 是相应图像的平均值)。因此,我们可以看到右边频谱中的 F(0,0) 较低,远离原点的其他值也较低,并且覆盖的值范围更窄。这就是右边图像整体对比度较低的原因。

(b) 用 0 填充图像会在原始图像的边界处引入明显的间断。这个过程会引入强烈的水平和垂直边缘,图像在这些边缘处突然结束,然后继续为 0 值。这些急剧的过渡对应于频谱中沿水平轴和垂直轴的强度。

== 2、(P186例4.24)

使用陷波滤波增强恶化的卡西尼土星图像。@img2 显示了部分环绕土星的土星环的图像。太空船第一次进入该行星的轨道时由“卡西尼”首次拍摄了这幅图像。垂直的正弦模式是在对图像数字化之前由叠加到摄影机视频信号上的AC信号造成的。这是一个想不到的问题,它污染了来自某些任务的图像。设计一种陷波带阻滤波器,消除干扰信号。


#figure(
caption: "近似周期性干扰的土星环图像,图像大小为674×674像素",
image("Images/2.png", width: 55%),
)<img2>

0 comments on commit 65e45fd

Please sign in to comment.