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
a54affeb
Commit
a54affeb
authored
Mar 13, 2019
by
Namgoo Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move Ptr-related code from lut.cu to lut.cpp
parent
bd1342c1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
23 deletions
+58
-23
core.cpp
modules/cudaarithm/src/core.cpp
+0
-2
lut.cu
modules/cudaarithm/src/cuda/lut.cu
+5
-21
lut.cpp
modules/cudaarithm/src/lut.cpp
+23
-0
lut.hpp
modules/cudaarithm/src/lut.hpp
+30
-0
No files found.
modules/cudaarithm/src/core.cpp
View file @
a54affeb
...
...
@@ -57,8 +57,6 @@ void cv::cuda::transpose(InputArray, OutputArray, Stream&) { throw_no_cuda(); }
void
cv
::
cuda
::
flip
(
InputArray
,
OutputArray
,
int
,
Stream
&
)
{
throw_no_cuda
();
}
Ptr
<
LookUpTable
>
cv
::
cuda
::
createLookUpTable
(
InputArray
)
{
throw_no_cuda
();
return
Ptr
<
LookUpTable
>
();
}
void
cv
::
cuda
::
copyMakeBorder
(
InputArray
,
OutputArray
,
int
,
int
,
int
,
int
,
int
,
Scalar
,
Stream
&
)
{
throw_no_cuda
();
}
#else
/* !defined (HAVE_CUDA) */
...
...
modules/cudaarithm/src/cuda/lut.cu
View file @
a54affeb
...
...
@@ -48,6 +48,8 @@
#else
#include "../lut.hpp"
#include "opencv2/cudaarithm.hpp"
#include "opencv2/cudev.hpp"
#include "opencv2/core/private.cuda.hpp"
...
...
@@ -56,23 +58,9 @@ using namespace cv;
using namespace cv::cuda;
using namespace cv::cudev;
namespace
{
texture<uchar, cudaTextureType1D, cudaReadModeElementType> texLutTable;
class LookUpTableImpl : public LookUpTable
{
public:
LookUpTableImpl(InputArray lut);
~LookUpTableImpl();
void transform(InputArray src, OutputArray dst, Stream& stream = Stream::Null()) CV_OVERRIDE;
namespace cv { namespace cuda {
private:
GpuMat d_lut;
cudaTextureObject_t texLutTableObj;
bool cc30;
};
texture<uchar, cudaTextureType1D, cudaReadModeElementType> texLutTable;
LookUpTableImpl::LookUpTableImpl(InputArray _lut)
{
...
...
@@ -200,11 +188,7 @@ namespace
syncOutput(dst, _dst, stream);
}
}
Ptr<LookUpTable> cv::cuda::createLookUpTable(InputArray lut)
{
return makePtr<LookUpTableImpl>(lut);
}
} }
#endif
modules/cudaarithm/src/lut.cpp
0 → 100644
View file @
a54affeb
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#include "precomp.hpp"
#include "lut.hpp"
using
namespace
cv
;
using
namespace
cv
::
cuda
;
#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER)
Ptr
<
LookUpTable
>
cv
::
cuda
::
createLookUpTable
(
InputArray
)
{
throw_no_cuda
();
return
Ptr
<
LookUpTable
>
();
}
#else
/* !defined (HAVE_CUDA) || defined (CUDA_DISABLER) */
Ptr
<
LookUpTable
>
cv
::
cuda
::
createLookUpTable
(
InputArray
lut
)
{
return
makePtr
<
LookUpTableImpl
>
(
lut
);
}
#endif
modules/cudaarithm/src/lut.hpp
0 → 100644
View file @
a54affeb
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#ifndef __CUDAARITHM_LUT_HPP__
#define __CUDAARITHM_LUT_HPP__
#include "opencv2/cudaarithm.hpp"
#include <cuda_runtime.h>
namespace
cv
{
namespace
cuda
{
class
LookUpTableImpl
:
public
LookUpTable
{
public
:
LookUpTableImpl
(
InputArray
lut
);
~
LookUpTableImpl
();
void
transform
(
InputArray
src
,
OutputArray
dst
,
Stream
&
stream
=
Stream
::
Null
())
CV_OVERRIDE
;
private
:
GpuMat
d_lut
;
cudaTextureObject_t
texLutTableObj
;
bool
cc30
;
};
}
}
#endif // __CUDAARITHM_LUT_HPP__
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