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
f02ce905
Commit
f02ce905
authored
Nov 12, 2013
by
huangs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minX1 should be max(-maxD,0) not max(maxD,0), avoid black band at left
parent
a81efdbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
stereosgbm.cpp
modules/calib3d/src/stereosgbm.cpp
+2
-2
No files found.
modules/calib3d/src/stereosgbm.cpp
View file @
f02ce905
...
@@ -114,7 +114,7 @@ static void calcPixelCostBT( const Mat& img1, const Mat& img2, int y,
...
@@ -114,7 +114,7 @@ static void calcPixelCostBT( const Mat& img1, const Mat& img2, int y,
int
tabOfs
,
int
)
int
tabOfs
,
int
)
{
{
int
x
,
c
,
width
=
img1
.
cols
,
cn
=
img1
.
channels
();
int
x
,
c
,
width
=
img1
.
cols
,
cn
=
img1
.
channels
();
int
minX1
=
max
(
maxD
,
0
),
maxX1
=
width
+
min
(
minD
,
0
);
int
minX1
=
max
(
-
maxD
,
0
),
maxX1
=
width
+
min
(
minD
,
0
);
int
minX2
=
max
(
minX1
-
maxD
,
0
),
maxX2
=
min
(
maxX1
-
minD
,
width
);
int
minX2
=
max
(
minX1
-
maxD
,
0
),
maxX2
=
min
(
maxX1
-
minD
,
width
);
int
D
=
maxD
-
minD
,
width1
=
maxX1
-
minX1
,
width2
=
maxX2
-
minX2
;
int
D
=
maxD
-
minD
,
width1
=
maxX1
-
minX1
,
width2
=
maxX2
-
minX2
;
const
PixType
*
row1
=
img1
.
ptr
<
PixType
>
(
y
),
*
row2
=
img2
.
ptr
<
PixType
>
(
y
);
const
PixType
*
row1
=
img1
.
ptr
<
PixType
>
(
y
),
*
row2
=
img2
.
ptr
<
PixType
>
(
y
);
...
@@ -329,7 +329,7 @@ static void computeDisparitySGBM( const Mat& img1, const Mat& img2,
...
@@ -329,7 +329,7 @@ static void computeDisparitySGBM( const Mat& img1, const Mat& img2,
int
disp12MaxDiff
=
params
.
disp12MaxDiff
>
0
?
params
.
disp12MaxDiff
:
1
;
int
disp12MaxDiff
=
params
.
disp12MaxDiff
>
0
?
params
.
disp12MaxDiff
:
1
;
int
P1
=
params
.
P1
>
0
?
params
.
P1
:
2
,
P2
=
max
(
params
.
P2
>
0
?
params
.
P2
:
5
,
P1
+
1
);
int
P1
=
params
.
P1
>
0
?
params
.
P1
:
2
,
P2
=
max
(
params
.
P2
>
0
?
params
.
P2
:
5
,
P1
+
1
);
int
k
,
width
=
disp1
.
cols
,
height
=
disp1
.
rows
;
int
k
,
width
=
disp1
.
cols
,
height
=
disp1
.
rows
;
int
minX1
=
max
(
maxD
,
0
),
maxX1
=
width
+
min
(
minD
,
0
);
int
minX1
=
max
(
-
maxD
,
0
),
maxX1
=
width
+
min
(
minD
,
0
);
int
D
=
maxD
-
minD
,
width1
=
maxX1
-
minX1
;
int
D
=
maxD
-
minD
,
width1
=
maxX1
-
minX1
;
int
INVALID_DISP
=
minD
-
1
,
INVALID_DISP_SCALED
=
INVALID_DISP
*
DISP_SCALE
;
int
INVALID_DISP
=
minD
-
1
,
INVALID_DISP_SCALED
=
INVALID_DISP
*
DISP_SCALE
;
int
SW2
=
SADWindowSize
.
width
/
2
,
SH2
=
SADWindowSize
.
height
/
2
;
int
SW2
=
SADWindowSize
.
width
/
2
,
SH2
=
SADWindowSize
.
height
/
2
;
...
...
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