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
623c7da7
Commit
623c7da7
authored
Apr 17, 2013
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed obsolete source files from gpu module
parent
a981dc93
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
413 deletions
+0
-413
internal_shared.hpp
modules/gpu/src/cuda/internal_shared.hpp
+0
-58
safe_call.hpp
modules/gpu/src/cuda/safe_call.hpp
+0
-50
texture_binder.hpp
modules/gpu/src/cuda/texture_binder.hpp
+0
-92
error.cpp
modules/gpu/src/error.cpp
+0
-45
speckle_filtering.cpp
modules/gpu/src/speckle_filtering.cpp
+0
-168
No files found.
modules/gpu/src/cuda/internal_shared.hpp
deleted
100644 → 0
View file @
a981dc93
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#ifndef __OPENCV_internal_shared_HPP__
#define __OPENCV_internal_shared_HPP__
#include <cuda_runtime.h>
#include <npp.h>
#include "opencv2/core/cuda_devptrs.hpp"
#include "opencv2/core/cuda/common.hpp"
#include "opencv2/gpunvidia/private.hpp"
#include "safe_call.hpp"
#endif
/* __OPENCV_internal_shared_HPP__ */
modules/gpu/src/cuda/safe_call.hpp
deleted
100644 → 0
View file @
a981dc93
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#ifndef __OPENCV_CUDA_SAFE_CALL_HPP__
#define __OPENCV_CUDA_SAFE_CALL_HPP__
#include <cufft.h>
#endif
/* __OPENCV_CUDA_SAFE_CALL_HPP__ */
modules/gpu/src/cuda/texture_binder.hpp
deleted
100644 → 0
View file @
a981dc93
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#ifndef OPENCV_GPU_TEXTURE_BINDER_HPP_
#define OPENCV_GPU_TEXTURE_BINDER_HPP_
#include "opencv2/gpu/devmem2d.hpp"
#include <safe_call.hpp>
namespace
cv
{
namespace
gpu
{
class
TextureBinder
{
public
:
template
<
class
T
,
enum
cudaTextureReadMode
readMode
>
TextureBinder
(
const
PtrStepSz
<
T
>&
arr
,
const
struct
texture
<
T
,
2
,
readMode
>&
tex
)
:
texref
(
&
tex
)
{
cudaChannelFormatDesc
desc
=
cudaCreateChannelDesc
<
T
>
();
cudaSafeCall
(
cudaBindTexture2D
(
0
,
tex
,
arr
.
data
,
desc
,
arr
.
cols
,
arr
.
rows
,
arr
.
step
)
);
}
template
<
class
T
,
enum
cudaTextureReadMode
readMode
>
TextureBinder
(
const
PtrSz
<
T
>&
arr
,
const
struct
texture
<
T
,
1
,
readMode
>
&
tex
)
:
texref
(
&
tex
)
{
cudaChannelFormatDesc
desc
=
cudaCreateChannelDesc
<
T
>
();
cudaSafeCall
(
cudaBindTexture
(
0
,
tex
,
arr
.
data
,
desc
,
arr
.
size
*
arr
.
elemSize
())
);
}
template
<
class
A
,
class
T
,
enum
cudaTextureReadMode
readMode
>
TextureBinder
(
const
A
&
arr
,
const
struct
texture
<
T
,
2
,
readMode
>&
tex
,
const
cudaChannelFormatDesc
&
desc
)
:
texref
(
&
tex
)
{
cudaSafeCall
(
cudaBindTexture2D
(
0
,
tex
,
arr
.
data
,
desc
,
arr
.
cols
,
arr
.
rows
,
arr
.
step
)
);
}
~
TextureBinder
()
{
cudaSafeCall
(
cudaUnbindTexture
(
texref
)
);
}
private
:
const
struct
textureReference
*
texref
;
};
}
namespace
cuda
{
using
cv
::
gpu
::
TextureBinder
;
}
}
#endif
/* OPENCV_GPU_TEXTURE_BINDER_HPP_*/
modules/gpu/src/error.cpp
deleted
100644 → 0
View file @
a981dc93
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#include "precomp.hpp"
using
namespace
cv
;
using
namespace
cv
::
gpu
;
modules/gpu/src/speckle_filtering.cpp
deleted
100644 → 0
View file @
a981dc93
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#include "precomp.hpp"
using
namespace
cv
;
namespace
cv
{
// TODO: conflicts with calib3d.hpp : filterSpeckles, should be removed ?
//! Speckle filtering - filters small connected components on diparity image.
//! It sets pixel (x,y) to newVal if it coresponds to small CC with size < maxSpeckleSize.
//! Threshold for border between CC is diffThreshold;
CV_EXPORTS
void
filterSpeckles
(
Mat
&
img
,
uchar
newVal
,
int
maxSpeckleSize
,
uchar
diffThreshold
,
Mat
&
buf
);
}
typedef
Point_
<
short
>
Point2s
;
void
cv
::
filterSpeckles
(
Mat
&
img
,
uchar
newVal
,
int
maxSpeckleSize
,
uchar
maxDiff
,
Mat
&
_buf
)
{
int
MaxD
=
1024
;
int
WinSz
=
64
;
int
bufSize0
=
(
MaxD
+
2
)
*
sizeof
(
int
)
+
(
img
.
rows
+
WinSz
+
2
)
*
MaxD
*
sizeof
(
int
)
+
(
img
.
rows
+
WinSz
+
2
)
*
sizeof
(
int
)
+
(
img
.
rows
+
WinSz
+
2
)
*
MaxD
*
(
WinSz
+
1
)
*
sizeof
(
uchar
)
+
256
;
int
bufSize1
=
(
img
.
cols
+
9
+
2
)
*
sizeof
(
int
)
+
256
;
int
bufSz
=
std
::
max
(
bufSize0
*
1
,
bufSize1
*
2
);
_buf
.
create
(
1
,
bufSz
,
CV_8U
);
CV_Assert
(
img
.
type
()
==
CV_8U
);
int
width
=
img
.
cols
,
height
=
img
.
rows
,
npixels
=
width
*
height
;
size_t
bufSize
=
npixels
*
(
int
)(
sizeof
(
Point2s
)
+
sizeof
(
int
)
+
sizeof
(
uchar
));
if
(
!
_buf
.
isContinuous
()
||
!
_buf
.
data
||
_buf
.
cols
*
_buf
.
rows
*
_buf
.
elemSize
()
<
bufSize
)
_buf
.
create
(
1
,
(
int
)
bufSize
,
CV_8U
);
uchar
*
buf
=
_buf
.
data
;
int
i
,
j
,
dstep
=
(
int
)(
img
.
step
/
sizeof
(
uchar
));
int
*
labels
=
(
int
*
)
buf
;
buf
+=
npixels
*
sizeof
(
labels
[
0
]);
Point2s
*
wbuf
=
(
Point2s
*
)
buf
;
buf
+=
npixels
*
sizeof
(
wbuf
[
0
]);
uchar
*
rtype
=
(
uchar
*
)
buf
;
int
curlabel
=
0
;
// clear out label assignments
memset
(
labels
,
0
,
npixels
*
sizeof
(
labels
[
0
]));
for
(
i
=
0
;
i
<
height
;
i
++
)
{
uchar
*
ds
=
img
.
ptr
<
uchar
>
(
i
);
int
*
ls
=
labels
+
width
*
i
;
for
(
j
=
0
;
j
<
width
;
j
++
)
{
if
(
ds
[
j
]
!=
newVal
)
// not a bad disparity
{
if
(
ls
[
j
]
)
// has a label, check for bad label
{
if
(
rtype
[
ls
[
j
]]
)
// small region, zero out disparity
ds
[
j
]
=
(
uchar
)
newVal
;
}
// no label, assign and propagate
else
{
Point2s
*
ws
=
wbuf
;
// initialize wavefront
Point2s
p
((
short
)
j
,
(
short
)
i
);
// current pixel
curlabel
++
;
// next label
int
count
=
0
;
// current region size
ls
[
j
]
=
curlabel
;
// wavefront propagation
while
(
ws
>=
wbuf
)
// wavefront not empty
{
count
++
;
// put neighbors onto wavefront
uchar
*
dpp
=
&
img
.
at
<
uchar
>
(
p
.
y
,
p
.
x
);
uchar
dp
=
*
dpp
;
int
*
lpp
=
labels
+
width
*
p
.
y
+
p
.
x
;
if
(
p
.
x
<
width
-
1
&&
!
lpp
[
+
1
]
&&
dpp
[
+
1
]
!=
newVal
&&
std
::
abs
(
dp
-
dpp
[
+
1
])
<=
maxDiff
)
{
lpp
[
+
1
]
=
curlabel
;
*
ws
++
=
Point2s
(
p
.
x
+
1
,
p
.
y
);
}
if
(
p
.
x
>
0
&&
!
lpp
[
-
1
]
&&
dpp
[
-
1
]
!=
newVal
&&
std
::
abs
(
dp
-
dpp
[
-
1
])
<=
maxDiff
)
{
lpp
[
-
1
]
=
curlabel
;
*
ws
++
=
Point2s
(
p
.
x
-
1
,
p
.
y
);
}
if
(
p
.
y
<
height
-
1
&&
!
lpp
[
+
width
]
&&
dpp
[
+
dstep
]
!=
newVal
&&
std
::
abs
(
dp
-
dpp
[
+
dstep
])
<=
maxDiff
)
{
lpp
[
+
width
]
=
curlabel
;
*
ws
++
=
Point2s
(
p
.
x
,
p
.
y
+
1
);
}
if
(
p
.
y
>
0
&&
!
lpp
[
-
width
]
&&
dpp
[
-
dstep
]
!=
newVal
&&
std
::
abs
(
dp
-
dpp
[
-
dstep
])
<=
maxDiff
)
{
lpp
[
-
width
]
=
curlabel
;
*
ws
++
=
Point2s
(
p
.
x
,
p
.
y
-
1
);
}
// pop most recent and propagate
// NB: could try least recent, maybe better convergence
p
=
*--
ws
;
}
// assign label type
if
(
count
<=
maxSpeckleSize
)
// speckle region
{
//printf("count = %d\n", count);
rtype
[
ls
[
j
]]
=
1
;
// small region label
ds
[
j
]
=
(
uchar
)
newVal
;
}
else
{
//printf("count = %d\n", count);
rtype
[
ls
[
j
]]
=
0
;
// large region label
}
}
}
}
}
}
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