-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
320 lines (280 loc) · 37.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>HDY blog - Everything happens for me not to me. Life is short. Kiss slowly, laugh insanely, love truly and forgive quickly.</title><meta name="keywords" content="blog"><meta name="author" content="HDY"><meta name="copyright" content="HDY"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta property="og:type" content="website">
<meta property="og:title" content="HDY blog">
<meta property="og:url" content="http://hudongyue.com/index.html">
<meta property="og:site_name" content="HDY blog">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://hudongyue.com/img/portrait.png">
<meta property="article:author" content="HDY">
<meta property="article:tag" content="blog">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://hudongyue.com/img/portrait.png"><link rel="shortcut icon" href="/img/signature.png"><link rel="canonical" href="http://hudongyue.com/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
root: '/',
algolia: undefined,
localSearch: undefined,
translate: undefined,
noticeOutdate: undefined,
highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
copy: {
success: '复制成功',
error: '复制错误',
noSupport: '浏览器不支持'
},
relativeDate: {
homepage: false,
post: false
},
runtime: '',
date_suffix: {
just: '刚刚',
min: '分钟前',
hour: '小时前',
day: '天前',
month: '个月前'
},
copyright: undefined,
lightbox: 'fancybox',
Snackbar: undefined,
source: {
justifiedGallery: {
js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.js',
css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.css'
}
},
isPhotoFigcaption: false,
islazyload: true,
isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
title: 'HDY blog',
isPost: false,
isHome: true,
isHighlightShrink: false,
isToc: false,
postUpdate: '2023-02-13 09:52:04'
}</script><noscript><style type="text/css">
#nav {
opacity: 1
}
.justified-gallery img {
opacity: 1
}
#recent-posts time,
#post-meta time {
display: inline !important
}
</style></noscript><script>(win=>{
win.saveToLocal = {
set: function setWithExpiry(key, value, ttl) {
if (ttl === 0) return
const now = new Date()
const expiryDay = ttl * 86400000
const item = {
value: value,
expiry: now.getTime() + expiryDay,
}
localStorage.setItem(key, JSON.stringify(item))
},
get: function getWithExpiry(key) {
const itemStr = localStorage.getItem(key)
if (!itemStr) {
return undefined
}
const item = JSON.parse(itemStr)
const now = new Date()
if (now.getTime() > item.expiry) {
localStorage.removeItem(key)
return undefined
}
return item.value
}
}
win.getScript = url => new Promise((resolve, reject) => {
const script = document.createElement('script')
script.src = url
script.async = true
script.onerror = reject
script.onload = script.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
script.onload = script.onreadystatechange = null
resolve()
}
document.head.appendChild(script)
})
win.activateDarkMode = function () {
document.documentElement.setAttribute('data-theme', 'dark')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
}
}
win.activateLightMode = function () {
document.documentElement.setAttribute('data-theme', 'light')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
}
}
const t = saveToLocal.get('theme')
if (t === 'dark') activateDarkMode()
else if (t === 'light') activateLightMode()
const asideStatus = saveToLocal.get('aside-status')
if (asideStatus !== undefined) {
if (asideStatus === 'hide') {
document.documentElement.classList.add('hide-aside')
} else {
document.documentElement.classList.remove('hide-aside')
}
}
const detectApple = () => {
if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
document.documentElement.classList.add('apple')
}
}
detectApple()
})(window)</script><meta name="generator" content="Hexo 5.4.1"><style>mjx-container[jax="SVG"] {
direction: ltr;
}
mjx-container[jax="SVG"] > svg {
overflow: visible;
}
mjx-container[jax="SVG"][display="true"] {
display: block;
text-align: center;
margin: 1em 0;
}
mjx-container[jax="SVG"][justify="left"] {
text-align: left;
}
mjx-container[jax="SVG"][justify="right"] {
text-align: right;
}
g[data-mml-node="merror"] > g {
fill: red;
stroke: red;
}
g[data-mml-node="merror"] > rect[data-background] {
fill: yellow;
stroke: none;
}
g[data-mml-node="mtable"] > line[data-line] {
stroke-width: 70px;
fill: none;
}
g[data-mml-node="mtable"] > rect[data-frame] {
stroke-width: 70px;
fill: none;
}
g[data-mml-node="mtable"] > .mjx-dashed {
stroke-dasharray: 140;
}
g[data-mml-node="mtable"] > .mjx-dotted {
stroke-linecap: round;
stroke-dasharray: 0,140;
}
g[data-mml-node="mtable"] > svg {
overflow: visible;
}
[jax="SVG"] mjx-tool {
display: inline-block;
position: relative;
width: 0;
height: 0;
}
[jax="SVG"] mjx-tool > mjx-tip {
position: absolute;
top: 0;
left: 0;
}
mjx-tool > mjx-tip {
display: inline-block;
padding: .2em;
border: 1px solid #888;
font-size: 70%;
background-color: #F8F8F8;
color: black;
box-shadow: 2px 2px 5px #AAAAAA;
}
g[data-mml-node="maction"][data-toggle] {
cursor: pointer;
}
mjx-status {
display: block;
position: fixed;
left: 1em;
bottom: 1em;
min-width: 25%;
padding: .2em .4em;
border: 1px solid #888;
font-size: 90%;
background-color: #F8F8F8;
color: black;
}
foreignObject[data-mjx-xml] {
font-family: initial;
line-height: normal;
overflow: visible;
}
.MathJax path {
stroke-width: 3;
}
mjx-container[display="true"] {
overflow: auto hidden;
}
mjx-container[display="true"] + br {
display: none;
}
</style></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-lazy-src="/img/portrait.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data is-center"><div class="data-item"><a href="/archives/"><div class="headline">文章</div><div class="length-num">31</div></a></div><div class="data-item"><a href="/tags/"><div class="headline">标签</div><div class="length-num">20</div></a></div><div class="data-item"><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div></div><hr/></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background-image: url('/img/index.png')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">HDY blog</a></span><div id="menus"><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">HDY blog</h1><div id="site-subtitle"><span id="subtitle"></span></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left"><a href="/2023/02/11/Using-the-headless-Virtual-Box/" title="Using the headless Virtual Box"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-lazy-src="/assets/img/Using-the-headless-Virtual-Box/0-cover.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Using the headless Virtual Box"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/02/11/Using-the-headless-Virtual-Box/" title="Using the headless Virtual Box">Using the headless Virtual Box</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-11T15:58:43.000Z" title="发表于 2023-02-11 23:58:43">2023-02-11</time></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/linux/">linux</a></span></div><div class="content">When we are testing something on the server, it’s convenient and safe to do all the things in the virtual machine to avoid crash. And this blog records the tips to use the headless virtual box.
1. Create a virtual machine
Create the headless server with specific name and ostype
1VBoxManage createvm --name "xxx" --ostype Ubuntu_64 --register
Allocate the memory for the VM
1VBoxManage modifyvm "xxx" --memory 2048 --acpi on --boot1 dvd --nic1 nat
Create a virtual ha ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2023/01/19/Change-the-kernel-for-linux/" title="Change the kernel for Linux"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-lazy-src="/assets/img/Change-the-kernel-for-linux/0-cover.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Change the kernel for Linux"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/01/19/Change-the-kernel-for-linux/" title="Change the kernel for Linux">Change the kernel for Linux</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-01-19T10:00:04.000Z" title="发表于 2023-01-19 18:00:04">2023-01-19</time></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/linux/">linux</a></span></div><div class="content">This post records the procedure to change the kernel for Linux. The main processes are downloading source, configuring, building, installing and booting.
1. Install a default kernel1.1 Download the source codeYou can find the required version of Linux kernel from kernel/git/stable/linux.git - Linux kernel stable tree. And we could clone it, we can specify the version:
1git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --depth 1 --branch v6.1.4
1.2 ConfigurationThere are di ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2022/12/23/Scratchapixel-Light-and-Shading/" title="Scratchapixel: Light and Shading"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-lazy-src="/assets/img/Scratchapixel/Scratchapixel-Light-and-Shading/0-cover.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Scratchapixel: Light and Shading"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/12/23/Scratchapixel-Light-and-Shading/" title="Scratchapixel: Light and Shading">Scratchapixel: Light and Shading</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-12-23T11:11:23.000Z" title="发表于 2022-12-23 19:11:23">2022-12-23</time></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/scratchapixel/">scratchapixel</a><span class="article-meta-link">•</span><a class="article-meta__tags" href="/tags/computer-graphics/">computer graphics</a></span></div><div class="content">In this post, I’ll try to summary the method to realise the effect for direct illumination (diffuse shading, shadow, reflection, refraction, etc.). The codes can be downloaded in hudongyue1/myGL. And these methods are refer to Scratchapixel.
1 Type of Light
In general, there are two kinds of light source. The first kind of lights have their own shape and size (like sun, moon, bulb, etc.), they are somehow expensive to compute. Such lights are called area lights. The second kind of lights do not ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2022/12/15/Scratchapixel-Simple-Ray-Tracing/" title="Scratchapixel: Simple Ray Tracing"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-lazy-src="/assets/img/Scratchapixel/SimpleRayTracing/0-cover.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Scratchapixel: Simple Ray Tracing"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/12/15/Scratchapixel-Simple-Ray-Tracing/" title="Scratchapixel: Simple Ray Tracing">Scratchapixel: Simple Ray Tracing</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-12-15T04:43:56.000Z" title="发表于 2022-12-15 12:43:56">2022-12-15</time></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/algorithm/">algorithm</a><span class="article-meta-link">•</span><a class="article-meta__tags" href="/tags/scratchapixel/">scratchapixel</a><span class="article-meta-link">•</span><a class="article-meta__tags" href="/tags/computer-graphics/">computer graphics</a></span></div><div class="content">In this post, I try to implement a simple Ray-Tracing algorithm which support to render some basic shape (sphere, box, plane, disk). And the corresponding codes can be downloaded in hudongyue1/myGL (github.com) The reference is Scratchapixel.
1. The Whole Pipeline
The picture above shows the whole procedure in my simple ray-tracer.
2. Tool functions and ClassesDegree to radians1234inlinefloat deg2rad(const float &deg) { return deg * M_PI / 180;}
Clamp1234inlinefloat clamp(const float & ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2022/12/12/Scratchapixel-Intersection/" title="Scratchapixel: Intersection"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-lazy-src="/assets/img/Scratchapixel/Scratchapixel-Intersection/0-cover.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Scratchapixel: Intersection"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/12/12/Scratchapixel-Intersection/" title="Scratchapixel: Intersection">Scratchapixel: Intersection</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-12-12T03:30:11.000Z" title="发表于 2022-12-12 11:30:11">2022-12-12</time></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/algorithm/">algorithm</a><span class="article-meta-link">•</span><a class="article-meta__tags" href="/tags/scratchapixel/">scratchapixel</a><span class="article-meta-link">•</span><a class="article-meta__tags" href="/tags/computer-graphics/">computer graphics</a></span></div><div class="content">In Ray-Tracing Rendering Technique, a very common and important method is called . It will be used to judge whether the ray will intersect with a shape (like Triangle, Sphere, Plane, Disk, etc.). Even though, we just need to care about Triangle in actual use (we choose to convert complex object into triangle mesh and compute the intersection of a ray with all these triangle). In this post, I’ll try to summary the algorithm to realise for these different shapes. And these algorithm are learned f ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2022/11/22/Scratchapixel-Perspective-Projection-Matrix/" title="Scratchapixel: Perspective Projection Matrix"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-lazy-src="/assets/img/Scratchapixel/Perspective%20Projection%20Matrix/cover.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Scratchapixel: Perspective Projection Matrix"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/11/22/Scratchapixel-Perspective-Projection-Matrix/" title="Scratchapixel: Perspective Projection Matrix">Scratchapixel: Perspective Projection Matrix</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-11-22T04:43:56.000Z" title="发表于 2022-11-22 12:43:56">2022-11-22</time></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/scratchapixel/">scratchapixel</a><span class="article-meta-link">•</span><a class="article-meta__tags" href="/tags/computer-graphics/">computer graphics</a></span></div><div class="content">Reference to the website of Scratchapixel.
If there is an object with some points in the world coordinate, and we want to project it to the image plane of a camera. What should we do? At first, we need to transfer the object’s world coordinate to the camera coordinate. So that we can do the operation of projection in the same coordinate. And we just need to use the extrinsic matrix (related to camera’s location and posture in the world coordinate) of the camera to finish this transfer. Then, we ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2022/10/15/PaperReading-Events-Can-Make-Sense/" title="PaperReading: Events Can Make Sense"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-lazy-src="/assets/img/EventsCanMakeSense/cover.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="PaperReading: Events Can Make Sense"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/10/15/PaperReading-Events-Can-Make-Sense/" title="PaperReading: Events Can Make Sense">PaperReading: Events Can Make Sense</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-10-15T12:13:11.000Z" title="发表于 2022-10-15 20:13:11">2022-10-15</time></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/server-architecture/">server architecture</a><span class="article-meta-link">•</span><a class="article-meta__tags" href="/tags/paper-reading/">paper reading</a></span></div><div class="content">Paper: Events can make sense | Frans Kaashoek and Maxwell Krohn - Academia.edu
1 IntroductionHow to manage concurrency in network applications? There is much controversy about this issue. Event based system is a kind of method, it’s flexible and robust to load. But it has the problem called “stack ripping” which will complicate the code. As a result, it’s not easy to solve concurrency problems in events because of the property of being unreadable. To free events from the stack-ripping problem an ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2022/03/29/%E8%AE%BA%E6%96%87%E9%98%85%E8%AF%BB%EF%BC%9A%E5%83%8F%E7%B4%A0%E5%AF%B9%E9%BD%90%E7%9A%84%E9%9A%90%E5%BC%8F%E5%87%BD%E6%95%B0%E2%80%94%E2%80%94PIFu/" title="论文阅读:像素对齐的隐式函数——PIFu"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-lazy-src="https://pic3.zhimg.com/v2-211c305463024882e9eb804f3de73ed4_1440w.jpg?source=172ae18b" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="论文阅读:像素对齐的隐式函数——PIFu"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/03/29/%E8%AE%BA%E6%96%87%E9%98%85%E8%AF%BB%EF%BC%9A%E5%83%8F%E7%B4%A0%E5%AF%B9%E9%BD%90%E7%9A%84%E9%9A%90%E5%BC%8F%E5%87%BD%E6%95%B0%E2%80%94%E2%80%94PIFu/" title="论文阅读:像素对齐的隐式函数——PIFu">论文阅读:像素对齐的隐式函数——PIFu</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-03-29T03:35:38.000Z" title="发表于 2022-03-29 11:35:38">2022-03-29</time></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/paper-reading/">paper reading</a><span class="article-meta-link">•</span><a class="article-meta__tags" href="/tags/computer-vision/">computer vision</a></span></div><div class="content">1 PIFu: Pixel-Aligned Implicit Function for High-Resolution Clothed Human Digitization1.1 像素对齐的隐式函数 Pixle-Aligned Implicit Function像素对齐的隐式函数 PIFu 由两个神经网络组合而成:一个全卷积图像编码器 以及一个由多层感知机(Multi-Layer Perceptrons,MLPs)表示的连续隐式函数 ƒ,其数学表达为:
f(F(x), z(X)) = s:s \in \mathbb{R}其中 是空间中的一个 3D 点, 是 的 2D 投影点, 是点 在相机坐标空间的深度值, 是图像中 点处的图像特征。所以,PIFu 的功能即为,对于任意一个 3D 点 ,首先根据相机参数投影得到该点的 2D 点位置 以及在该相机下的深度 ,同时找到该 2D 点位置的图像特征向量 ,PIFu 的输出 就表示该点是否在物体表面。
PIFu 能奏效的关键在于输入的像素对齐的图像特征向量 ,这样学习得到的 可以在重建的模型中很好地保留图片中呈现的一些细节。同 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2022/03/27/%E8%AE%BA%E6%96%87%E9%98%85%E8%AF%BB%EF%BC%9A%E7%A5%9E%E7%BB%8F%E8%BE%90%E5%B0%84%E5%9C%BA%E2%80%94%E2%80%94NeRF/" title="论文阅读:神经辐射场——NeRF"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-lazy-src="/assets/img/paper_reading/NeRF/cover.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="论文阅读:神经辐射场——NeRF"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/03/27/%E8%AE%BA%E6%96%87%E9%98%85%E8%AF%BB%EF%BC%9A%E7%A5%9E%E7%BB%8F%E8%BE%90%E5%B0%84%E5%9C%BA%E2%80%94%E2%80%94NeRF/" title="论文阅读:神经辐射场——NeRF">论文阅读:神经辐射场——NeRF</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-03-27T11:25:27.000Z" title="发表于 2022-03-27 19:25:27">2022-03-27</time></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/paper-reading/">paper reading</a><span class="article-meta-link">•</span><a class="article-meta__tags" href="/tags/computer-vision/">computer vision</a></span></div><div class="content">1 NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis1.1 使用神经辐射场表示场景 Neural Radiance Field Scene RepresentationNeRF 函数是将一个连续的场景表示为一个输入为5维向量的函数,包括一个空间点的 3D 坐标位置 ,以及视角方向 。该神经网络可以写作:
F_{\Theta}: (\mathbf{x}, \mathbf{d}) \rightarrow (\pmb{c}, \sigma)其中, 是对应位置处的密度(可以理解为不透明度), 则是从视角下该点的颜色。
具体流程为:
① 经过一个 8 层的全连接的感知机(ReLU),以 3D 坐标 为输入,得到对应的密度 以及一个256 维度的特征向量作为输出;
② 将这个特征向量以及相机视角 输入另一个全连接的感知机,并得到对应处的 RGB 颜色。
1.2 使用辐射场进行立体渲染 Volume Rendering with Radiance Fields前面,使用 NeRF 得到了 3D ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2022/03/18/PyTorch%E5%AD%A6%E4%B9%A0%EF%BC%882%EF%BC%89%E2%80%94%E2%80%94%E5%8A%A8%E6%80%81%E8%AE%A1%E7%AE%97%E5%9B%BE%E4%B8%8E%E7%BA%BF%E6%80%A7%E5%9B%9E%E5%BD%92/" title="PyTorch学习(2)——动态计算图与线性回归"><img class="post_bg" src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-lazy-src="/assets/img/PyTorch_compute_graph/1.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="PyTorch学习(2)——动态计算图与线性回归"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/03/18/PyTorch%E5%AD%A6%E4%B9%A0%EF%BC%882%EF%BC%89%E2%80%94%E2%80%94%E5%8A%A8%E6%80%81%E8%AE%A1%E7%AE%97%E5%9B%BE%E4%B8%8E%E7%BA%BF%E6%80%A7%E5%9B%9E%E5%BD%92/" title="PyTorch学习(2)——动态计算图与线性回归">PyTorch学习(2)——动态计算图与线性回归</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-03-18T14:15:10.000Z" title="发表于 2022-03-18 22:15:10">2022-03-18</time></span><span class="article-meta tags"><span class="article-meta-separator">|</span><i class="fas fa-tag"></i><a class="article-meta__tags" href="/tags/Pytorch/">Pytorch</a><span class="article-meta-link">•</span><a class="article-meta__tags" href="/tags/computer-vision/">computer vision</a></span></div><div class="content">参考:
PyTorch 学习笔记汇总
PyTorch中backward函数详解
1 动态图PyTorch 采用的是动态图机制(Dynamic Computational Graph),而 Tensorflow 采用的是静态图机制。(Static Computational Graph)
动态图运算和搭建同时进行,也就是可以先计算前面的节点值,再根据这些值搭建后面的计算图。而静态图需要先搭建图,然后再输入数据进行运算。
PyTorch 动态图的优点是灵活,易调节,且使用简单方便。(类似 Python 库)但是其效率相对 Tensorflow 的静态图要低不少。
2.1 计算动态图计算图是用来描述运算的有向无环图,有两个主要元素:节点 (Node) 和边 (Edge)。节点表示数据,如向量、矩阵、张量。边表示运算,如加减乘除卷积等。
一个简单的例子 ,该式子用计算图表示为:
,其中 ,。
2.2 求导对于上式,分别求 在 时,关于 、 的导数:
\frac {\partial y}{\partial m} = \frac {\partial(m^2-n^2)}{\partia ...</div></div></div><nav id="pagination"><div class="pagination"><span class="page-number current">1</span><a class="page-number" href="/page/2/#content-inner">2</a><span class="space">…</span><a class="page-number" href="/page/4/#content-inner">4</a><a class="extend next" rel="next" href="/page/2/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src= "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-lazy-src="/img/portrait.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">HDY</div><div class="author-info__description"></div></div><div class="card-info-data is-center"><div class="card-info-data-item"><a href="/archives/"><div class="headline">文章</div><div class="length-num">31</div></a></div><div class="card-info-data-item"><a href="/tags/"><div class="headline">标签</div><div class="length-num">20</div></a></div><div class="card-info-data-item"><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/hudongyue1"><i class="fab fa-github"></i><span>My GitHub</span></a></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/02/11/Using-the-headless-Virtual-Box/" title="Using the headless Virtual Box">Using the headless Virtual Box</a><time datetime="2023-02-11T15:58:43.000Z" title="发表于 2023-02-11 23:58:43">2023-02-11</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/01/19/Change-the-kernel-for-linux/" title="Change the kernel for Linux">Change the kernel for Linux</a><time datetime="2023-01-19T10:00:04.000Z" title="发表于 2023-01-19 18:00:04">2023-01-19</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2022/12/23/Scratchapixel-Light-and-Shading/" title="Scratchapixel: Light and Shading">Scratchapixel: Light and Shading</a><time datetime="2022-12-23T11:11:23.000Z" title="发表于 2022-12-23 19:11:23">2022-12-23</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2022/12/15/Scratchapixel-Simple-Ray-Tracing/" title="Scratchapixel: Simple Ray Tracing">Scratchapixel: Simple Ray Tracing</a><time datetime="2022-12-15T04:43:56.000Z" title="发表于 2022-12-15 12:43:56">2022-12-15</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2022/12/12/Scratchapixel-Intersection/" title="Scratchapixel: Intersection">Scratchapixel: Intersection</a><time datetime="2022-12-12T03:30:11.000Z" title="发表于 2022-12-12 11:30:11">2022-12-12</time></div></div></div></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/tags/BFS/" style="font-size: 1.1em; color: #999">BFS</a> <a href="/tags/DFS/" style="font-size: 1.18em; color: #999ca1">DFS</a> <a href="/tags/DP/" style="font-size: 1.26em; color: #999fa8">DP</a> <a href="/tags/Pytorch/" style="font-size: 1.18em; color: #999ca1">Pytorch</a> <a href="/tags/Union-Find/" style="font-size: 1.26em; color: #999fa8">Union Find</a> <a href="/tags/algorithm/" style="font-size: 1.5em; color: #99a9bf">algorithm</a> <a href="/tags/binary-tree/" style="font-size: 1.1em; color: #999">binary tree</a> <a href="/tags/blog/" style="font-size: 1.1em; color: #999">blog</a> <a href="/tags/computer-graphics/" style="font-size: 1.42em; color: #99a6b7">computer graphics</a> <a href="/tags/computer-vision/" style="font-size: 1.42em; color: #99a6b7">computer vision</a> <a href="/tags/data-structure/" style="font-size: 1.26em; color: #999fa8">data structure</a> <a href="/tags/graph/" style="font-size: 1.34em; color: #99a3b0">graph</a> <a href="/tags/hash/" style="font-size: 1.26em; color: #999fa8">hash</a> <a href="/tags/linux/" style="font-size: 1.18em; color: #999ca1">linux</a> <a href="/tags/paper-reading/" style="font-size: 1.26em; color: #999fa8">paper reading</a> <a href="/tags/recursion/" style="font-size: 1.1em; color: #999">recursion</a> <a href="/tags/scratchapixel/" style="font-size: 1.34em; color: #99a3b0">scratchapixel</a> <a href="/tags/server-architecture/" style="font-size: 1.1em; color: #999">server architecture</a> <a href="/tags/sort/" style="font-size: 1.1em; color: #999">sort</a> <a href="/tags/stack/" style="font-size: 1.18em; color: #999ca1">stack</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span><a class="card-more-btn" href="/archives/" title="查看更多">
<i class="fas fa-angle-right"></i></a></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/02/"><span class="card-archive-list-date">二月 2023</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/01/"><span class="card-archive-list-date">一月 2023</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/12/"><span class="card-archive-list-date">十二月 2022</span><span class="card-archive-list-count">3</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/11/"><span class="card-archive-list-date">十一月 2022</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/10/"><span class="card-archive-list-date">十月 2022</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/03/"><span class="card-archive-list-date">三月 2022</span><span class="card-archive-list-count">7</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/09/"><span class="card-archive-list-date">九月 2020</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/08/"><span class="card-archive-list-date">八月 2020</span><span class="card-archive-list-count">11</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">31</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2023-02-13T01:52:04.515Z"></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">©2020 - 2023 By HDY</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.js"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><div class="js-pjax"><script>function subtitleType () {
if (true) {
window.typed = new Typed("#subtitle", {
strings: ["Everything happens for me not to me. Life is short. Kiss slowly, laugh insanely, love truly and forgive quickly."],
startDelay: 300,
typeSpeed: 150,
loop: true,
backSpeed: 50
})
} else {
document.getElementById("subtitle").innerHTML = 'Everything happens for me not to me. Life is short. Kiss slowly, laugh insanely, love truly and forgive quickly.'
}
}
if (true) {
if (typeof Typed === 'function') {
subtitleType()
} else {
getScript('https://cdn.jsdelivr.net/npm/typed.js/lib/typed.min.js').then(subtitleType)
}
} else {
subtitleType()
}</script></div><script defer="defer" id="fluttering_ribbon" mobile="true" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-fluttering-ribbon.min.js"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>