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
5a43c7a2
Commit
5a43c7a2
authored
Dec 11, 2014
by
Sync-my-L2P
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update segmentation.cpp
removed trailing whitespaces
parent
f14b8b43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
segmentation.cpp
modules/imgproc/src/segmentation.cpp
+6
-6
No files found.
modules/imgproc/src/segmentation.cpp
View file @
5a43c7a2
...
...
@@ -90,7 +90,7 @@ void cv::watershed( InputArray _src, InputOutputArray _markers )
// Labels for pixels
const
int
IN_QUEUE
=
-
2
;
// Pixel visited
const
int
WSHED
=
-
1
;
// Pixel belongs to watershed
// possible bit values = 2^8
const
int
NQ
=
256
;
...
...
@@ -163,7 +163,7 @@ void cv::watershed( InputArray _src, InputOutputArray _markers )
const
uchar
*
img
=
src
.
ptr
();
// Step size to next row in input image
int
istep
=
int
(
src
.
step
/
sizeof
(
img
[
0
]));
// Current pixel in mask image
int
*
mask
=
dst
.
ptr
<
int
>
();
// Step size to next row in mask image
...
...
@@ -211,7 +211,7 @@ void cv::watershed( InputArray _src, InputOutputArray _markers )
c_diff
(
ptr
,
ptr
+
istep
,
t
);
idx
=
ws_min
(
idx
,
t
);
}
// Add to according queue
assert
(
0
<=
idx
&&
idx
<=
255
);
ws_push
(
idx
,
i
*
mstep
+
j
,
i
*
istep
+
j
*
3
);
...
...
@@ -259,7 +259,7 @@ void cv::watershed( InputArray _src, InputOutputArray _markers )
// Calculate pointer to current pixel in input and marker image
m
=
mask
+
mofs
;
ptr
=
img
+
iofs
;
// Check surrounding pixels for labels
// to determine label for current pixel
t
=
m
[
-
1
];
// Left
...
...
@@ -282,11 +282,11 @@ void cv::watershed( InputArray _src, InputOutputArray _markers )
if
(
lab
==
0
)
lab
=
t
;
else
if
(
t
!=
lab
)
lab
=
WSHED
;
}
// Set label to current pixel in marker image
assert
(
lab
!=
0
);
m
[
0
]
=
lab
;
if
(
lab
==
WSHED
)
continue
;
...
...
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