Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
af9368d3
Commit
af9368d3
authored
Feb 18, 2014
by
Roman Donchenko
Committed by
OpenCV Buildbot
Feb 18, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2370 from ilya-lavrenov:cuda_nlm_typo
parents
c35dab90
da9bdf9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
nlm.cu
modules/gpu/src/cuda/nlm.cu
+7
-7
No files found.
modules/gpu/src/cuda/nlm.cu
View file @
af9368d3
...
...
@@ -266,7 +266,7 @@ namespace cv { namespace gpu { namespace device
__device__ __forceinline__ int calcDist(const uchar2& a, const uchar2& b) { return (a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y); }
__device__ __forceinline__ int calcDist(const uchar3& a, const uchar3& b) { return (a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y) + (a.z-b.z)*(a.z-b.z); }
template <class T> struct FastNonLocalMe
na
s
template <class T> struct FastNonLocalMe
an
s
{
enum
{
...
...
@@ -290,7 +290,7 @@ namespace cv { namespace gpu { namespace device
int block_window;
float minus_h2_inv;
FastNonLocalMe
na
s(int search_window_, int block_window_, float h) : search_radius(search_window_/2), block_radius(block_window_/2),
FastNonLocalMe
an
s(int search_window_, int block_window_, float h) : search_radius(search_window_/2), block_radius(block_window_/2),
search_window(search_window_), block_window(block_window_), minus_h2_inv(-1.f/(h * h * VecTraits<T>::cn)) {}
PtrStep<T> src;
...
...
@@ -394,7 +394,7 @@ namespace cv { namespace gpu { namespace device
}
}
__device__ __forceinline__ void convolve_window(int i, int j, const int* dist_sums,
PtrStepi& col_sums, PtrStepi& up_col_sums,
T& dst) const
__device__ __forceinline__ void convolve_window(int i, int j, const int* dist_sums, T& dst) const
{
typedef typename TypeVec<float, VecTraits<T>::cn>::vec_type sum_type;
...
...
@@ -471,18 +471,18 @@ namespace cv { namespace gpu { namespace device
__syncthreads();
convolve_window(i, j, dist_sums,
col_sums, up_col_sums,
dst(i, j));
convolve_window(i, j, dist_sums, dst(i, j));
}
}
};
template<typename T>
__global__ void fast_nlm_kernel(const FastNonLocalMe
na
s<T> fnlm, PtrStepSz<T> dst) { fnlm(dst); }
__global__ void fast_nlm_kernel(const FastNonLocalMe
an
s<T> fnlm, PtrStepSz<T> dst) { fnlm(dst); }
void nln_fast_get_buffer_size(const PtrStepSzb& src, int search_window, int block_window, int& buffer_cols, int& buffer_rows)
{
typedef FastNonLocalMe
na
s<uchar> FNLM;
typedef FastNonLocalMe
an
s<uchar> FNLM;
dim3 grid(divUp(src.cols, FNLM::TILE_COLS), divUp(src.rows, FNLM::TILE_ROWS));
buffer_cols = search_window * search_window * grid.y;
...
...
@@ -493,7 +493,7 @@ namespace cv { namespace gpu { namespace device
void nlm_fast_gpu(const PtrStepSzb& src, PtrStepSzb dst, PtrStepi buffer,
int search_window, int block_window, float h, cudaStream_t stream)
{
typedef FastNonLocalMe
na
s<T> FNLM;
typedef FastNonLocalMe
an
s<T> FNLM;
FNLM fnlm(search_window, block_window, h);
fnlm.src = (PtrStepSz<T>)src;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment