mirror of https://github.com/opencv/opencv.git
parent
bd1342c164
commit
a54affeb8d
4 changed files with 58 additions and 23 deletions
@ -0,0 +1,23 @@ |
||||
// 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 |
@ -0,0 +1,30 @@ |
||||
// 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__
|
Loading…
Reference in new issue