Skip to content

Commit 976274a

Browse files
committed
add installation for task1
1 parent 03bd02f commit 976274a

File tree

5 files changed

+79
-2
lines changed

5 files changed

+79
-2
lines changed

Notes15.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,21 @@ Radiance 其实是在 Irradiance 基础上增加了方向
3737
或者说 Irradiance 是四面八方的 Radiance 的积分
3838

3939
## BRDF 双向反射分布函数
40-
通俗的说, 有多少能量, 从某个方向进来, 到反射方向上会分布多少能量.
40+
通俗的说, BRDF是在解决光从某个方向打到以个物体上, 光向不同方向去反射的能量分布.
41+
42+
描述了光线和物体如何相互作用
4143

4244
对于反射的理解:
4345

4446
Whitted Style 光线打到某一个物体上, 然后被弹走了(方向改变了).
4547

4648
另一种理解: 光线打到某一个表面, 结果被吸收了, 然后又朝特定的方向发射出去了.
4749

48-
如何把某一个方向收集到的能量反射到其他方向上去? BRDF 定义了如何去分配这些能量.
50+
ωi 表示不同方向的入射光
51+
52+
![image](https://github.com/lumixraku/NotesForGraphics/raw/master/images/brdf.png)
53+
54+
55+
射出的radiance 可能成为其他点的入射radiance (此刻被照亮的物体本身作为光源存在了)
56+
57+
![image](https://github.com/lumixraku/NotesForGraphics/raw/master/images/brdf2.png)

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,63 @@
11
# NotesForGraphics
2+
3+
4+
## Prepare
5+
6+
```
7+
brew install eigen
8+
9+
brew install opencv@2
10+
11+
brew tap brewsci/science
12+
13+
brew install pkg-config
14+
15+
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
16+
17+
ln -s /usr/local/Cellar/opencv@2/2.4.13.7_7/lib/pkgconfig/opencv.pc $PKG_CONFIG_PATH
18+
```
19+
20+
After everything have done , when you run this command `pkg-config --cflags --libs opencv` will see this:
21+
```
22+
-I/usr/local/Cellar/opencv@2/2.4.13.7_7/include/opencv -I/usr/local/Cellar/opencv@2/2.4.13.7_7/include -L/usr/local/Cellar/opencv@2/2.4.13.7_7/lib -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_ocl -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videostab
23+
```
24+
25+
I'm using Xcode as my C++ IDE, create a command line Project for Task1.
26+
27+
Add this to your project.
28+
29+
Add following to Header Search Paths (Eigen requires first dependency.)
30+
```
31+
/usr/local/include
32+
/usr/local/Cellar/opencv@2/2.4.13.7_7/include
33+
```
34+
And make it no-recursive. (Though medium blog says this should set recursive, I found if set recursive would cause fatal error when building)
35+
36+
Then add this to library search path.
37+
```
38+
/usr/local/Cellar/opencv@2/2.4.13.7_7/lib
39+
```
40+
41+
Add `pkg-config --cflags --libs opencv` output to Other Linker Flags
42+
```
43+
-I/usr/local/Cellar/opencv@2/2.4.13.7_7/include/opencv -I/usr/local/Cellar/opencv@2/2.4.13.7_7/include -L/usr/local/Cellar/opencv@2/2.4.13.7_7/lib -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_ocl -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videostab
44+
45+
```
46+
47+
## TroubleShotting
48+
49+
### install opecv2
50+
https://www.learnopencv.com/install-opencv3-on-macos/
51+
52+
https://medium.com/beesightsoft/macos-mojave-10-14-3-setup-environment-for-opencv4-0-1-c-develop-fcae955d6b33
53+
54+
55+
### install eigen for mac
56+
https://stackoverflow.com/questions/35658420/installing-eigen-on-mac-os-x-for-xcode
57+
58+
### Undefined symbols for architecture x86_64: error
59+
https://stackoverflow.com/questions/24985713/opencv-undefined-symbols-for-architecture-x86-64-error
60+
61+
62+
### xcode No member named 'FILE' in the global namespace
63+
https://stackoverflow.com/questions/30638320/xcode-cstdlib-no-member-named-xxx-in-the-global-namespace
Loading

images/brdf.png

446 KB
Loading

install.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
## eigen
3+
https://stackoverflow.com/questions/35658420/installing-eigen-on-mac-os-x-for-xcode
4+
5+
## opencv
6+
https://stackoverflow.com/questions/13953570/opencv2-opencv-hpp-file-not-found

0 commit comments

Comments
 (0)