Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
inovisao
pynovisao
Commits
c2e01b6c
Commit
c2e01b6c
authored
Sep 10, 2020
by
Diego André Sant'Ana
🤞
Browse files
alter
parent
90e7e67f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
src/pynovisao.py
src/pynovisao.py
+1
-1
src/segmentation/skimage_segmenter.py
src/segmentation/skimage_segmenter.py
+3
-2
No files found.
src/pynovisao.py
View file @
c2e01b6c
...
...
@@ -566,7 +566,7 @@ class Act(object):
print
(
"Wait to complete processes all images!"
)
with
tqdm
(
total
=
len
(
list_segments
))
as
pppbar
:
for
idx_segment
in
list_segments
:
segment
,
size_segment
,
idx_segment
=
self
.
segmenter
.
get_segment
(
self
,
idx_segment
=
idx_segment
)[:
-
1
]
segment
,
size_segment
,
xml
,
idx_segment
=
self
.
segmenter
.
get_segment
(
self
,
idx_segment
=
idx_segment
)[:
-
1
]
# Problem here! Dataset removed.
filepath
=
File
.
save_only_class_image
(
segment
,
self
.
dataset
,
tmp
,
self
.
_image_name
,
idx_segment
)
len_segments
[
idx_segment
]
=
size_segment
...
...
src/segmentation/skimage_segmenter.py
View file @
c2e01b6c
...
...
@@ -117,8 +117,9 @@ class SkimageSegmenter(object):
# Get the rectangle that encompasses the countour
x
,
y
,
w
,
h
=
cv2
.
boundingRect
(
max_contour
)
# Create the object for this segment in the .XML file
xml_file
.
addObject
(
name_segment
,
x
,
y
,
x
+
w
,
y
+
h
)
# Create the object for this segment in the .XML file
if
(
xml_file
!=
None
):
xml_file
.
addObject
(
name_segment
,
x
,
y
,
x
+
w
,
y
+
h
)
segment
=
segment
[
y
:
y
+
h
,
x
:
x
+
w
]
end_time
=
TimeUtils
.
get_time
()
...
...
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