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
25d2ab8a
Commit
25d2ab8a
authored
Jan 31, 2014
by
Andrey Pavlenko
Committed by
OpenCV Buildbot
Jan 31, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2218 from alalek:fix_defects_code_coverity
parents
6925dbd9
6fa49f6e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
6 deletions
+33
-6
ocl.hpp
modules/core/include/opencv2/core/ocl.hpp
+3
-0
ocl.cpp
modules/core/src/ocl.cpp
+22
-1
gen_java.py
modules/java/generator/gen_java.py
+2
-2
Mat.cpp
modules/java/generator/src/cpp/Mat.cpp
+1
-1
utils.cpp
modules/java/generator/src/cpp/utils.cpp
+2
-2
lkpyramid.cpp
modules/video/src/lkpyramid.cpp
+3
-0
No files found.
modules/core/include/opencv2/core/ocl.hpp
View file @
25d2ab8a
...
...
@@ -561,6 +561,9 @@ public:
explicit
PlatformInfo2
(
void
*
id
);
~
PlatformInfo2
();
PlatformInfo2
(
const
PlatformInfo2
&
i
);
PlatformInfo2
&
operator
=
(
const
PlatformInfo2
&
i
);
String
name
()
const
;
String
vendor
()
const
;
String
version
()
const
;
...
...
modules/core/src/ocl.cpp
View file @
25d2ab8a
...
...
@@ -3691,6 +3691,7 @@ struct PlatformInfo2::Impl
{
Impl
(
void
*
id
)
{
refcount
=
1
;
handle
=
*
(
cl_platform_id
*
)
id
;
getDevices
(
devices
,
handle
);
}
...
...
@@ -3724,6 +3725,26 @@ PlatformInfo2::~PlatformInfo2()
p
->
release
();
}
PlatformInfo2
::
PlatformInfo2
(
const
PlatformInfo2
&
i
)
{
if
(
i
.
p
)
i
.
p
->
addref
();
this
->
p
=
i
.
p
;
}
PlatformInfo2
&
PlatformInfo2
::
operator
=
(
const
PlatformInfo2
&
i
)
{
if
(
i
.
p
!=
this
->
p
)
{
if
(
i
.
p
)
i
.
p
->
addref
();
if
(
this
->
p
)
this
->
p
->
release
();
this
->
p
=
i
.
p
;
}
return
*
this
;
}
int
PlatformInfo2
::
deviceNumber
()
const
{
return
p
?
(
int
)
p
->
devices
.
size
()
:
0
;
...
...
@@ -3731,7 +3752,7 @@ int PlatformInfo2::deviceNumber() const
void
PlatformInfo2
::
getDevice
(
Device
&
device
,
int
d
)
const
{
CV_Assert
(
d
<
(
int
)
p
->
devices
.
size
()
);
CV_Assert
(
p
&&
d
<
(
int
)
p
->
devices
.
size
()
);
if
(
p
)
device
.
set
(
p
->
devices
[
d
]);
}
...
...
modules/java/generator/gen_java.py
View file @
25d2ab8a
...
...
@@ -398,7 +398,7 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1minMaxLocManual
return result;
} catch(c
v::Exception
e) {
} catch(c
onst cv::Exception&
e) {
LOGD("Core::n_1minMaxLoc() catched cv::Exception:
%
s", e.what());
jclass je = env->FindClass("org/opencv/core/CvException");
if(!je) je = env->FindClass("java/lang/Exception");
...
...
@@ -471,7 +471,7 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Core_n_1getTextSize
return result;
} catch(c
v::Exception
e) {
} catch(c
onst cv::Exception&
e) {
LOGD("Core::n_1getTextSize() catched cv::Exception:
%
s", e.what());
jclass je = env->FindClass("org/opencv/core/CvException");
if(!je) je = env->FindClass("java/lang/Exception");
...
...
modules/java/generator/src/cpp/Mat.cpp
View file @
25d2ab8a
...
...
@@ -467,7 +467,7 @@ JNIEXPORT jint JNICALL Java_org_opencv_core_Mat_n_1dims
LOGD
(
"%s"
,
method_name
);
Mat
*
me
=
(
Mat
*
)
self
;
//TODO: check for NULL
return
me
->
dims
;
}
catch
(
c
v
::
Exception
e
)
{
}
catch
(
c
onst
cv
::
Exception
&
e
)
{
throwJavaException
(
env
,
&
e
,
method_name
);
}
catch
(...)
{
throwJavaException
(
env
,
0
,
method_name
);
...
...
modules/java/generator/src/cpp/utils.cpp
View file @
25d2ab8a
...
...
@@ -48,7 +48,7 @@ JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nBitmapToMat2
}
AndroidBitmap_unlockPixels
(
env
,
bitmap
);
return
;
}
catch
(
c
v
::
Exception
e
)
{
}
catch
(
c
onst
cv
::
Exception
&
e
)
{
AndroidBitmap_unlockPixels
(
env
,
bitmap
);
LOGE
(
"nBitmapToMat catched cv::Exception: %s"
,
e
.
what
());
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
...
...
@@ -130,7 +130,7 @@ JNIEXPORT void JNICALL Java_org_opencv_android_Utils_nMatToBitmap2
}
AndroidBitmap_unlockPixels
(
env
,
bitmap
);
return
;
}
catch
(
c
v
::
Exception
e
)
{
}
catch
(
c
onst
cv
::
Exception
&
e
)
{
AndroidBitmap_unlockPixels
(
env
,
bitmap
);
LOGE
(
"nMatToBitmap catched cv::Exception: %s"
,
e
.
what
());
jclass
je
=
env
->
FindClass
(
"org/opencv/core/CvException"
);
...
...
modules/video/src/lkpyramid.cpp
View file @
25d2ab8a
...
...
@@ -598,6 +598,7 @@ namespace cv
struct
dim3
{
unsigned
int
x
,
y
,
z
;
dim3
()
:
x
(
0
),
y
(
0
),
z
(
0
)
{
}
};
public
:
PyrLKOpticalFlow
()
...
...
@@ -607,6 +608,8 @@ namespace cv
iters
=
30
;
derivLambda
=
0.5
;
useInitialFlow
=
false
;
waveSize
=
0
;
}
bool
checkParam
()
...
...
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