You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.3 KiB
Markdown

1 year ago
---
layout: default
title: 02. Gabor Filter
1 year ago
subtitle: Image Processing
1 year ago
---
-----
[PINBlog Gitea Repository](https://gitea.pinblog.codes/CBNU/02_GaborFilter)
-----
# Gabor Filter
- <20><><EFBFBD><EFBFBD><EFBFBD>ΰ<EFBFBD><CEB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>а<EFBFBD> <20><><EFBFBD>п<EFBFBD>
2022254026
<20><>ȫ<EFBFBD><C8AB>
---
# **Gabor Filter<65><72>?**
Gabor Filter<65><72> <20><><EFBFBD><EFBFBD>ó<EFBFBD><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Bio-inspired<65><64><EFBFBD><EFBFBD> Ű<><C5B0><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
<EFBFBD>ܰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD>ͷ<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ð<EFBFBD>ü<EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴٴ<CFB4> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>θ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD> <20>ִ<EFBFBD>.
Gabor Fiter<65><72> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>Լ<EFBFBD><D4BC><EFBFBD> <20><><EFBFBD><EFBFBD>̼<EFBFBD> <20><> Gaussian Filter<65><72><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD>.
<EFBFBD>Ķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>͸<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Կ<EFBFBD> <20><><EFBFBD><EFBFBD> Edge<67><65> ũ<><20><><EFBFBD><EFBFBD><E2BCBA> <20>ٲ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> Bio-inspired <20><><EFBFBD><EFBFBD>ó<EFBFBD><C3B3> <20>˰<EFBFBD><CBB0><EFBFBD><EFBFBD>򿡼<EFBFBD> Ư¡<C6AF><C2A1> <20><><EFBFBD><EFBFBD> <20>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٽ<EFBFBD><D9BD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϰ<EFBFBD> <20>ִ<EFBFBD>.
2D Gabor Filter<65><72> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ʒ<EFBFBD><C6B7><EFBFBD> <20><><EFBFBD><EFBFBD>.
![gaborfilter](./images/gaborfilter.png)
![gaborfilter](./images/gaborfilter2.png)
![gaborfilter](./images/gaborfilter3.png)
```cpp
cv::Mat cv::getGaborKernel(cv::Size ksize, double sigma, double theta, double lambd, double gamma, double psi = CV_PI*0.5, int ktype = CV_64F)
```
cv::getGaborKernel <20>Լ<EFBFBD><D4BC><EFBFBD> OpenCV<43><56><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Gabor filter)<29><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ȴ<EFBFBD>.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD> <20>̹<EFBFBD><CCB9><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20><>ǻ<EFBFBD><C7BB> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ư<><C6AF> <20><><EFBFBD><EFBFBD><E2BCBA> <20><><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD> Ư¡<C6AF><C2A1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̴<EFBFBD>.
### **Parameters**
* ksize: Ŀ<><C4BF><EFBFBD><EFBFBD> ũ<><C5A9><EFBFBD><EFBFBD>, cv::Size Ÿ<><C5B8>. Ŀ<><C4BF><EFBFBD><EFBFBD> <20>ʺ<EFBFBD><CABA><EFBFBD> <20><><EFBFBD≯<EFBFBD> <20><><EFBFBD><EFBFBD>.
* sigma: <20><><EFBFBD><EFBFBD><EFBFBD>þ<EFBFBD> <20>Լ<EFBFBD><D4BC><EFBFBD> ǥ<><C7A5> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD> Ŀ<><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ŀ<><C4BF><EFBFBD><EFBFBD> ũ<>Ⱑ Ŀ<><C4BF><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
* theta: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>. 0<><30> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, CV_PI/2<><32> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ǹ<EFBFBD><C7B9>Ѵ<EFBFBD>.
* lambd: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>. <20>̹<EFBFBD><CCB9><EFBFBD><EFBFBD><EFBFBD> Ư<><C6AF> <20><><EFBFBD>ϰ<EFBFBD> <20>󸶳<EFBFBD> <20><> <20><>ġ<EFBFBD><C4A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
* gamma: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱦ<EFBFBD><C8BE>(Spatial aspect ratio)<29><>, Ÿ<><C5B8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Լ<EFBFBD><D4BC><EFBFBD> Ÿ<><C5B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>. (gamma=1<><31> <20><><EFBFBD><EFBFBD>, gamma<1<EFBFBD><EFBFBD> Ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
* psi: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Phase offset)<29><>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>. (<28>Ϲ<EFBFBD><CFB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CV_PI*0.5<EFBFBD><EFBFBD> <20><EFBFBD><E2BABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
* ktype: Ŀ<><C4BF> Ÿ<><C5B8>. (<28><><EFBFBD><EFBFBD> CV_64F (64-<2D><>Ʈ <20>ε<EFBFBD><CEB5>Ҽ<EFBFBD><D2BC><EFBFBD>)<29><> <20><><EFBFBD><EFBFBD>)
---
1 year ago
### <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>[<5B><>]()
1 year ago
1 year ago
[Gabor Filter WebPage](https://gaborfilter.pinblog.codes/)
1 year ago
1 year ago
* Blazor-OpenCVSharp<72><70> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD> NAS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>
* OpenCVSharp-WASM<53><4D> <20>Ҿ<EFBFBD><D2BE><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
* Local<61><6C><EFBFBD><EFBFBD> Debug/Release<73><65> <20><><EFBFBD><EFBFBD> <20><>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
1 year ago
1 year ago
![output1](./images/output1.png)
![output2](./images/output2.png)
1 year ago
---
### <20><><EFBFBD><EFBFBD>[<5B><>]()
- Gabor Filter - Google
- ChatGPT
- [Blog](https://thinkpiece.tistory.com/304)