Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/junaire/brief
https://github.com/junaire/brief
Last synced: about 22 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/junaire/brief
- Owner: junaire
- Created: 2024-03-25T10:18:05.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-04-24T13:42:35.000Z (7 months ago)
- Last Synced: 2024-10-11T23:38:06.216Z (27 days ago)
- Language: C++
- Size: 5.53 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## 算法步骤
1. 对图像进行灰度处理
2. 求图像的积分
3. 对关键点进行筛选,剔除边界之外的点
4. 测试像素点,得到描述子,伪代码如下:
```
def pixelTest:
descriptor = []
for pt in keypoints:
arr = []
for 8pp in pps: [[8] x 32]
byte = 0
for pp in 8pp:
byte <<= 1
left, right = pp
img_y1 = pt.y + left.y + 0.5
img_x1 = pt.x + left.x + 0.5img_y2 = pt.y + right.y + 0.5
img_x2 = pt.x + right.x + 0.5bit = soothed_sum(img_y1, img_x1) < soothed_sum(img_y2, img_x2)
byte += bit
arr.append(byte)
descriptor.append(arr)
return descriptor
```并行点:
第一层循环中,由于对每一个关键点的操作都是独立的,不存在数据依赖,所以可将其并行。每一个 CUDA 线程完成以下操作:
```
idx = threadIdx.x + blockIdx.x * blockDim.x
pt = keypoints[idx]
arr = []
for 8pp in pps: [[8] x 32]
byte = 0
for pp in 8pp:
byte <<= 1
left, right = pp
img_y1 = pt.y + left.y + 0.5
img_x1 = pt.x + left.x + 0.5img_y2 = pt.y + right.y + 0.5
img_x2 = pt.x + right.x + 0.5bit = soothed_sum(img_y1, img_x1) < soothed_sum(img_y2, img_x2)
byte += bit
arr[idx] = byte
```