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
c6f790ce
Commit
c6f790ce
authored
Jul 27, 2016
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed using local variable instead of global var.
- Still need to change SSE_2
parent
440ba2e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
stereobm.cpp
modules/calib3d/src/stereobm.cpp
+12
-5
No files found.
modules/calib3d/src/stereobm.cpp
View file @
c6f790ce
...
...
@@ -338,7 +338,7 @@ static void findStereoCorrespondenceBM_SSE2( const Mat& left, const Mat& right,
int
ftzero
=
state
.
preFilterCap
;
int
textureThreshold
=
state
.
textureThreshold
;
int
uniquenessRatio
=
state
.
uniquenessRatio
;
short
FILTERED
=
(
short
)((
mindisp
-
1
)
<<
DISPARITY_SHIFT
);
short
FILTERED
=
(
short
)((
mindisp
-
1
)
<<
DISPARITY_SHIFT
_16S
);
ushort
*
sad
,
*
hsad0
,
*
hsad
,
*
hsad_sub
;
int
*
htext
;
...
...
@@ -1096,7 +1096,14 @@ public:
if
(
params
.
uniquenessRatio
<
0
)
CV_Error
(
Error
::
StsOutOfRange
,
"uniqueness ratio must be non-negative"
);
int
FILTERED
=
(
params
.
minDisparity
-
1
)
<<
DISPARITY_SHIFT
;
int
disp_shift
;
if
(
dtype
==
CV_16SC1
)
disp_shift
=
DISPARITY_SHIFT_16S
;
else
disp_shift
=
DISPARITY_SHIFT_32S
;
int
FILTERED
=
(
params
.
minDisparity
-
1
)
<<
disp_shift
;
#ifdef HAVE_OPENCL
if
(
ocl
::
useOpenCL
()
&&
disparr
.
isUMat
()
&&
params
.
textureThreshold
==
0
)
...
...
@@ -1109,7 +1116,7 @@ public:
if
(
params
.
speckleRange
>=
0
&&
params
.
speckleWindowSize
>
0
)
filterSpeckles
(
disparr
.
getMat
(),
FILTERED
,
params
.
speckleWindowSize
,
params
.
speckleRange
,
slidingSumBuf
);
if
(
dtype
==
CV_32F
)
disparr
.
getUMat
().
convertTo
(
disparr
,
CV_32FC1
,
1.
/
(
1
<<
DISPARITY_SHIFT
),
0
);
disparr
.
getUMat
().
convertTo
(
disparr
,
CV_32FC1
,
1.
/
(
1
<<
disp_shift
),
0
);
CV_IMPL_ADD
(
CV_IMPL_OCL
);
return
;
}
...
...
@@ -1138,7 +1145,7 @@ public:
if
(
lofs
>=
width
||
rofs
>=
width
||
width1
<
1
)
{
disp0
=
Scalar
::
all
(
FILTERED
*
(
disp0
.
type
()
<
CV_32F
?
1
:
1.
/
(
1
<<
DISPARITY_SHIFT
)
)
);
disp0
=
Scalar
::
all
(
FILTERED
*
(
disp0
.
type
()
<
CV_32F
?
1
:
1.
/
(
1
<<
disp_shift
)
)
);
return
;
}
...
...
@@ -1194,7 +1201,7 @@ public:
filterSpeckles
(
disp
,
FILTERED
,
params
.
speckleWindowSize
,
params
.
speckleRange
,
slidingSumBuf
);
if
(
disp0
.
data
!=
disp
.
data
)
disp
.
convertTo
(
disp0
,
disp0
.
type
(),
1.
/
(
1
<<
DISPARITY_SHIFT
),
0
);
disp
.
convertTo
(
disp0
,
disp0
.
type
(),
1.
/
(
1
<<
disp_shift
),
0
);
}
int
getMinDisparity
()
const
{
return
params
.
minDisparity
;
}
...
...
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