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
5baa60fe
Commit
5baa60fe
authored
Aug 26, 2016
by
Alessandro dos Santos Ferreira
Browse files
Atualizando README
parent
ff317b60
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
5 deletions
+17
-5
README.md
README.md
+4
-3
data/pynovisao.png
data/pynovisao.png
+0
-0
src/Pynovisao.py
src/Pynovisao.py
+8
-2
src/util/File.py
src/util/File.py
+5
-0
No files found.
README.md
View file @
5baa60fe
...
...
@@ -19,6 +19,7 @@ Pacote de Visão Computacional do Inovisão.
```
-
Uma imagem como a mostrada abaixo deve ser apresentada:

## Outras Opções
...
...
@@ -26,17 +27,17 @@ Pacote de Visão Computacional do Inovisão.
-
Mostra todas as opções disponíveis
```
$ python
slicParametros
.py --help
$ python
main
.py --help
```
-
Executa o programa inicializando o banco de imagens em
*../data/soja*
```
$ python
slicParametros
.py --dataset ../data/
digits
$ python
main
.py --dataset ../data/
soja
```
-
Executa o programa definindo as classes e suas respectivas cores (X11 color names)
```
$ python
slicParametros
.py --classes "Solo Soja Gramineas FolhasLargas" --colors "Orange SpringGreen RebeccaPurple Snow"
$ python
main
.py --classes "Solo Soja Gramineas FolhasLargas" --colors "Orange SpringGreen RebeccaPurple Snow"
```
...
...
data/pynovisao.png
View replaced file @
ff317b60
View file @
5baa60fe
27.2 KB
|
W:
|
H:
32.6 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/Pynovisao.py
View file @
5baa60fe
...
...
@@ -37,9 +37,15 @@ class Act(object):
self
.
tk
=
tk
self
.
segmenter
=
Slic
.
Slic
()
self
.
dataset
=
args
[
"dataset"
]
self
.
__init_
dataset
(
args
[
"dataset"
]
)
self
.
__init_classes
(
args
[
"classes"
],
args
[
"colors"
])
def
__init_dataset
(
self
,
directory
):
if
(
directory
[
-
1
]
==
'/'
):
directory
=
directory
[:
-
1
]
self
.
dataset
=
directory
f
.
create_dir
(
self
.
dataset
)
def
__init_classes
(
self
,
classes
=
None
,
colors
=
None
):
self
.
classes
=
[]
...
...
@@ -159,7 +165,7 @@ class Act(object):
def
set_dataset_path
(
self
):
directory
=
self
.
tk
.
utils
.
ask_directory
(
default_dir
=
self
.
dataset
)
if
directory
:
self
.
dataset
=
directory
self
.
__init_
dataset
(
directory
)
self
.
tk
.
write_log
(
"Image dataset defined: %s"
,
self
.
dataset
)
self
.
__init_classes
()
...
...
src/util/File.py
View file @
5baa60fe
...
...
@@ -59,3 +59,8 @@ class File(object):
def
list_dirs
(
dataset
):
return
[
name
for
name
in
os
.
listdir
(
dataset
)
if
os
.
path
.
isdir
(
os
.
path
.
join
(
dataset
,
name
))]
@
staticmethod
def
create_dir
(
directory
):
if
not
os
.
path
.
exists
(
directory
):
os
.
makedirs
(
directory
)
\ No newline at end of file
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