Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lmj01 committed Nov 21, 2023
1 parent a4f3126 commit 39584d7
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 4 deletions.
11 changes: 7 additions & 4 deletions cg/Color.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Color
# [Color](https://www.color.org/index.xalter)
> ICC International Color Consortium
色彩主观就是光线给人眼的感觉,客观地说就是人眼对可见光0.43um到0.78um的波长,不同的波长对人眼产生不同的神经信号,传递大脑的感知就是色彩,非可见光人眼是无法感知的。

Expand Down Expand Up @@ -36,6 +37,10 @@ HSL/HSV解释:L是指从最暗的黑色到色相纯色再到白色,L最大

![](../images/cg/hsl_hsv.png)

### [DCI-p3](https://www.color.org/chardata/rgb/DCIP3.xalter)

js中canvas的颜色getImageData中setting有这个参数

## Gamma Correction

gamma校正,存在的原因有
Expand All @@ -49,14 +54,12 @@ gamma校正,存在的原因有
- gamma meta在不同应用中解释不一致,缺乏标准
- 与RGB应用时,需要转换,否则产生意外的结果

## 其他
## HDR

把场景变成数字化的图片,需要光学信号进行采样sampling和数字化,sampling决定了图片的分辨率,即单位尺度内的单位像素的个数;数字化,在常见色彩空间下,用8bits,共256个阶梯来数字化

HDR高动态范围High dynamic range,就是添加更多的动态范围到图片中,人眼对场景采样是有能自动**变焦频率**的,即在明暗对比度比较强烈的场景下人眼都能看得各个部分的细节,但相机等在拍照时由于变焦固定或频率很低,得到的图片就只有一个焦距上的细节,导致细节上的缺失。通过多次曝光,得到不同亮度不同焦距内的细节组合起来提高清晰度,这就是HDR。



## 术语

- 亮度Lightness、Luminance
Expand Down
25 changes: 25 additions & 0 deletions cg/curve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Curve

## bezier

## Catmull-Rom

- uniform
- chordal
- centripetal

过四个点的曲线(p0,p1,p2,p3)的曲线方程为B(t)=a+b*t+c*t^2+d*t^3
其切线方程为C(t)=b+2c*t+3*d*t^2
满足以下条件
- B(0) = p1 => a = p1
- C(0) = (p2 - p1) / 2, => b = (P2 - p1) / 2
- B(1) = p2 => a + b + c + d = p2
- C(1) = (p3 - p1) / 2 => b + 2c + 3d = (p3 - p1) / 2
由上面的条件得出
- a = p1
- b = (p2 - p1) / 2
- c = (2p0 - 5p1 + 4p2 - p3) / 2
- d = (-p0 + 3p1 - 3p2 + p3) / 2

[On the Parameterization of Catmull-Rom Curves](http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf)

4 changes: 4 additions & 0 deletions cg/image/gif.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# GIF


- [jsgif: A GIF player in JavaScript](https://slbkbs.org/jsgif/)
1 change: 1 addition & 0 deletions index/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
- [diff算法原理](../nodejs/diff.md)
- [electron框架](../nodejs/electron.md)
- [quill富文本编辑器](../nodejs/quill.md)
- [压缩](../nodejs/zip.md)

## 整理总结

Expand Down
1 change: 1 addition & 0 deletions index/computerScience.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
### 网格与CAD
- [HalfEdge半边结构](../cg/half-edge.md)
- [网格划分](../cg/mesh-generation.md)
- [曲线](../cg/curve.md)
- [GMesh]()
- [Triangulate Efficient Triangulation Algorithm Suitable for Terrain Modelling or An Algorithm for Interpolating Irregularly-Spaced Data with Applications in Terrain Modelling](http://paulbourke.net/papers/triangulate/)
- [多边形网格算法](http://paulbourke.net/geometry/polygonmesh/)
Expand Down
1 change: 1 addition & 0 deletions index/standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
- [JPEG](../cg/image//JPEG.md)
- [Image Process](../cg/image/ImageProcessing.md)
- [CT](../cg/ct.md)
- [gif](../cg/image/gif.md)
- [GIMP](../cg/image/gimp.md)
- [ImageMagick](../cg/image/imageMagick.md)

Expand Down
28 changes: 28 additions & 0 deletions nodejs/zip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 压缩
> js压缩
## jszip

```js
new Promise(()=>{

}).then(res=>{
// 字符串
if (res.byteLength < 100) {
const tmp = JSON.parse(new TextDecoder().decode(new Uint8Array(res)));
} else {
const zip = new JSZip();
zip.loadAsync(res).then(zip=>{
let i = 0;
for (const fname in zip.files) {
zip.file(fname).async('arraybuffer').then(img=>{
const blob = new Blob([img]);
i++;
if (i == 4) {
}
});
}
});
}
})
```

0 comments on commit 39584d7

Please sign in to comment.