-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fab9484
commit e71ff31
Showing
29 changed files
with
632 additions
and
409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
node_modules | ||
|
||
private.typ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#set text(lang: "zh", cjk-latin-spacing: auto, font: "Noto Serif CJK SC") | ||
#set page("iso-b5", numbering: "1", margin: (left: 1.4cm, right: 1.9cm)) | ||
#set par(leading: 1.1em) | ||
#show table: set text(font: "Zhuque Fangsong (technical preview)") | ||
#show figure.caption: set text(font: "Zhuque Fangsong (technical preview)") | ||
#show "。": "." | ||
#show heading: set text(font: "Noto Sans CJK SC", size: 1.15em) | ||
|
||
= 数字图像处理 第10章 形状表示与描述 作业 | ||
|
||
#quote(block: true)[ | ||
1. 教材P509页,第10.7题。第1题图如下。 | ||
] | ||
|
||
// #box(image("media/image2.png", height: 2.7559055118110236in, width: 3.8149606299212597in)) | ||
|
||
假设我们已使用示于如图中的边缘模型代替了图10.10中的斜坡模型。请写出每个剂面的梯度和拉普拉斯算子。(教材P509页,第10.7题。) | ||
|
||
// #box(image("media/image3.png", height: 1.5748031496062993in, width: 1.5669291338582678in)) | ||
2. 右图所示图像中的物体和背景,在标度范围 内具有的平均灰度分别为180和70。该图像被均值为0、标准差为10个灰度级的高斯噪声污染了。请提出一种正确分割率为90%或更高百分比的阈值处理方法。(回忆一下,高斯曲线下99.7%的面积位于均值的 区间内,其中 是标准差。)(教材P512页,第10.36题。) | ||
|
||
3. 提出一个区域生长算法来分割习题10.36中的图像。 | ||
|
||
// #box(image("media/image7.png", height: 1.8503937007874016in, width: 1.8070866141732282in))(教材P512页,第10.38题。) | ||
|
||
4. 使用10.4.2节中讨论过的分裂和聚合过程来分割右图所示的图像。如果 中的所有像素都有相同的灰度,则令 。给出对应于您的分割的四叉树。 | ||
|
||
#include "quadtree.typ" | ||
|
||
(教材P512页,第10.39题。) | ||
|
||
题目解答请写清题号,按照顺序写在如下空白处,页数不限。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// curl "https://gist.githubusercontent.com/oliver-ni/701eec83f6cc0b7e9464c2e67e607faa/raw/abc4f03d36669bb506268a989f1cc2dfdb2ce5dd/tree.typ" -o tree.typ | ||
|
||
#import "tree.typ": tree | ||
|
||
#let im = ( | ||
(0, 0, 0, 0, 0, 0, 0, 0), | ||
(0, 0, 0, 0, 0, 0, 0, 0), | ||
(0, 0, 1, 1, 1, 1, 0, 0), | ||
(0, 0, 1, 1, 1, 1, 0, 0), | ||
(0, 0, 1, 0, 0, 1, 0, 0), | ||
(0, 0, 1, 0, 0, 1, 0, 0), | ||
(0, 0, 0, 0, 0, 0, 0, 0), | ||
(0, 0, 0, 0, 0, 0, 0, 0), | ||
) | ||
|
||
#let same = (arr) => arr.all(x => x == arr.first()) | ||
|
||
#let split(im) = { | ||
let h = int(im.len() / 2) | ||
let w = int(im.at(0).len() / 2) | ||
if h < 1 or w < 1 or same(im.flatten()) { | ||
return im | ||
} | ||
// split into 4 quadrants | ||
let q1 = im.slice(0, h).map(row => row.slice(0, w)) | ||
let q2 = im.slice(0, h).map(row => row.slice(w)) | ||
let q3 = im.slice(h).map(row => row.slice(0, w)) | ||
let q4 = im.slice(h).map(row => row.slice(w)) | ||
(q1, q2, q3, q4).map(split) | ||
} | ||
|
||
|
||
#let showtree(i, subtree) = { | ||
let children = subtree.map(x => tree(i + 1, x)) | ||
|
||
tree($R_#i$, children) | ||
} | ||
|
||
#showtree(1, split(im)) | ||
|
||
// split(im) | ||
|
||
#tree( | ||
"A", | ||
tree( | ||
"B", | ||
tree("D"), | ||
tree("E") | ||
), | ||
tree( | ||
"C", | ||
tree("F"), | ||
tree("G") | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#let tree(label, ..children) = style(styles => block(align(center, { | ||
let label = rect(align(center + horizon)[#label]) | ||
let label_dim = measure(label, styles) | ||
|
||
let children_widths = children.pos().map(x => measure(x, styles).width) | ||
let all_children = stack(dir: ltr, spacing: 1em, ..children.pos()) | ||
let all_children_dim = measure(all_children, styles) | ||
|
||
// If there are no children, stacking will result in excess space | ||
|
||
if children.pos().len() == 0 { | ||
label | ||
} else { | ||
stack(spacing: 1em, label, all_children) | ||
} | ||
|
||
// Draw lines | ||
|
||
let label_bottom = (all_children_dim.width / 2, label_dim.height) | ||
let x = 0em | ||
let y = label_dim.height + 1em | ||
|
||
for (i, child) in children.pos().enumerate() { | ||
let child_dim = measure(child, styles) | ||
let child_top = (x + child_dim.width / 2, y) | ||
place(top + left, line(start: label_bottom, end: child_top)) | ||
x += child_dim.width + 1em | ||
} | ||
}))) |
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
BIN
+61.3 KB
expt01/Images/Fig0327(a)(tungsten_original).png-E 3-K0 0.4-K1 0.02-K2 0.4.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
BIN
+61.5 KB
expt01/Images/Fig0327(a)(tungsten_original).png-E 4-K0 0.37-K1 0.02-K2 0.4 N3.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
BIN
+61.2 KB
expt01/Images/Fig0327(a)(tungsten_original).png-E 4-K0 0.37-K1 0.02-K2 0.4 N5.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
BIN
+61.1 KB
expt01/Images/Fig0327(a)(tungsten_original).png-E 4-K0 0.37-K1 0.02-K2 0.4 N7.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
BIN
+61.3 KB
expt01/Images/Fig0327(a)(tungsten_original).png-E 4-K0 0.4-K1 0.008-K2 0.4.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
BIN
+61.8 KB
expt01/Images/Fig0327(a)(tungsten_original).png-E 4-K0 0.4-K1 0.02-K2 0.05.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
BIN
+62 KB
expt01/Images/Fig0327(a)(tungsten_original).png-E 4-K0 0.4-K1 0.02-K2 0.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
BIN
+61.5 KB
expt01/Images/Fig0327(a)(tungsten_original).png-E 4-K0 0.4-K1 0.02-K2 0.2.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
BIN
+61.7 KB
expt01/Images/Fig0327(a)(tungsten_original).png-E 4-K0 0.4-K1 0.02-K2 0.4.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
BIN
+61.8 KB
expt01/Images/Fig0327(a)(tungsten_original).png-E 4-K0 0.4-K1 0.048-K2 0.4.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
BIN
+61.8 KB
expt01/Images/Fig0327(a)(tungsten_original).png-E 5-K0 0.4-K1 0.02-K2 0.4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
#import "@preview/codelst:2.0.1": sourcecode | ||
#import "@preview/showybox:2.0.1": showybox | ||
|
||
#let bc = (body, filename: "") => { | ||
showybox( | ||
breakable: true, | ||
frame: ( | ||
title-color: black.lighten(25%), | ||
body-color: black.lighten(98%), | ||
border-color: black.lighten(80%), | ||
thickness: 1pt, | ||
radius: 3pt, | ||
), | ||
title: [ | ||
#set text(font: "Roboto Slab", size: .85em) | ||
#filename | ||
], | ||
sourcecode(frame: none)[#body], | ||
) | ||
} | ||
#import "@preview/codelst:2.0.1": sourcecode | ||
#import "@preview/showybox:2.0.1": showybox | ||
|
||
#let bc = (body, filename: "", type: "normal") => { | ||
let color = { | ||
if type == "wrong" { | ||
red.lighten(92%) | ||
} else if type == "right" { | ||
green.lighten(92%) | ||
} else { | ||
black.lighten(98%) | ||
} | ||
} | ||
showybox( | ||
breakable: true, | ||
frame: ( | ||
title-color: black.lighten(25%), | ||
body-color: color, | ||
border-color: black.lighten(80%), | ||
thickness: 1pt, | ||
radius: 3pt, | ||
), | ||
title: [ | ||
#set text(font: "Roboto Slab", size: .85em) | ||
#filename | ||
], | ||
)[ | ||
#show raw: set text(font: "IBM Plex Mono", size: 1.01em) | ||
#sourcecode(frame: none)[#body] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.