You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question regarding census transformation when reading your code. Why aren't you comparing the intensity of neighboring pixels with the center?
Best regards.
Here is the code in census_transform.cu
// Compute and storeconstint x = x0 + tid, y = y0 + i;
if(half_kw <= x && x < width - half_kw && half_kh <= y && y < height - half_kh){
constint smem_x = tid;
constint smem_y = (half_kh + i) % SMEM_BUFFER_SIZE;
feature_type f = 0;
for(int dy = -half_kh; dy < 0; ++dy){
constint smem_y1 = (smem_y + dy + SMEM_BUFFER_SIZE) % SMEM_BUFFER_SIZE;
constint smem_y2 = (smem_y - dy + SMEM_BUFFER_SIZE) % SMEM_BUFFER_SIZE;
for(int dx = -half_kw; dx <= half_kw; ++dx){
constint smem_x1 = smem_x + dx;
constint smem_x2 = smem_x - dx;
constauto a = smem_lines[smem_y1][smem_x1];
constauto b = smem_lines[smem_y2][smem_x2];
f = (f << 1) | (a > b);
}
}
for(int dx = -half_kw; dx < 0; ++dx){
constint smem_x1 = smem_x + dx;
constint smem_x2 = smem_x - dx;
constauto a = smem_lines[smem_y][smem_x1];
constauto b = smem_lines[smem_y][smem_x2];
f = (f << 1) | (a > b);
}
dest[x + y * width] = f;
}
The text was updated successfully, but these errors were encountered:
Hello,
I have a question regarding census transformation when reading your code. Why aren't you comparing the intensity of neighboring pixels with the center?
Best regards.
Here is the code in census_transform.cu
The text was updated successfully, but these errors were encountered: