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
3eb5d0f7
Commit
3eb5d0f7
authored
5 years ago
by
João Porto
Browse files
Options
Download
Email Patches
Plain Diff
erro de indentacao nos comentarios corrigido
parent
f92e6f7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
36 deletions
+36
-36
src/pynovisao.py
src/pynovisao.py
+36
-36
No files found.
src/pynovisao.py
View file @
3eb5d0f7
...
...
@@ -1078,11 +1078,11 @@ class Act(object):
self
.
tk
.
write_log
(
message
)
def
create_xml
(
self
):
'''
"""
Generate a .XML file, with the file having 'name of the image including its extension'.xml.
This file will take the current xml object from Pascal_Voc_Writer and finalize it,
creating the file in the current directory and moving it towards /pynovisao/data/XML.
'''
"""
self
.
_xml_file
.
save
(
"{}.xml"
.
format
(
self
.
_image_name
))
current_path
=
os
.
getcwd
()
current_path
=
current_path
[
-
1
::
-
1
]
...
...
@@ -1096,10 +1096,10 @@ class Act(object):
def
run_xml_converter
(
self
):
self
.
tk
.
write_log
(
"Started mass annotation process, it may take a while..."
)
def
moveXML
(
file
):
#Move the xml files into the 'data/XML' folder
'''
F
ile: string
Name of the original image.
'''
"""
f
ile: string
Name of the original image.
"""
current_path
=
os
.
getcwd
()
current_path
=
current_path
[
-
1
::
-
1
]
current_path
=
current_path
[
3
::
1
]
...
...
@@ -1110,20 +1110,20 @@ class Act(object):
shutil
.
move
(
os
.
getcwd
()
+
"/{}.xml"
.
format
(
file
),
current_path
+
"/{}.xml"
.
format
(
file
))
def
arrasteSeg
(
imgog
,
imgseg
,
LinhaOg
,
ColunaOg
,
LinhaSeg
,
ColunaSeg
):
'''
imgog: numpy array
Array of the original image.
imseg: numpy array
Array of the segment being searched for.
LinhaOg: int
Current position in the imgog (X axis).
LinhaSeg: int
Current position in the imseg (X axis).
ColunaOg: int
Current position in the imgog (Y axis).
ColunaSeg: int
Current position in the imseg (Y axis).
'''
"""
imgog: numpy array
Array of the original image.
imseg: numpy array
Array of the segment being searched for.
LinhaOg: int
Current position in the imgog (X axis).
LinhaSeg: int
Current position in the imseg (X axis).
ColunaOg: int
Current position in the imgog (Y axis).
ColunaSeg: int
Current position in the imseg (Y axis).
"""
#Drags the segment over the original image
l
=
0
while
(
l
<=
(
LinhaOg
-
LinhaSeg
)):
...
...
@@ -1148,16 +1148,16 @@ class Act(object):
l
=
l
+
1
def
achaSeg
(
self
,
pathS
,
file
,
pog
,
arquivos
):
'''
pathS: string
Filepath to the segments folder.
file: string
Name of the original image.
Pog: string
Filepath to original image (file).
arquivos: string array
Segments alredy found in a image.
'''
"""
pathS: string
Filepath to the segments folder.
file: string
Name of the original image.
Pog: string
Filepath to original image (file).
arquivos: string array
Segments alredy found in a image.
"""
#Reads all segment files in the given folder (pathS)
tottime
=
0
arquivo
=
os
.
path
.
join
(
pog
,
file
)
...
...
@@ -1198,12 +1198,12 @@ class Act(object):
moveXML
(
file
)
def
achaImg
(
self
,
pathS
,
pathIO
):
'''
pathS: string
Filepath to the segments folder.
pathIO: string
Filepath to the Original Images folder.
'''
'''
pathS: string
Filepath to the segments folder.
pathIO: string
Filepath to the Original Images folder.
'''
arquivos
=
[]
#Segments alredy found, starts empty
thread
=
[]
#Threads created, starts empty.
#Verifies all original images (files) under the given folder (pathIO)
...
...
This diff is collapsed.
Click to expand it.
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