Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
Mario Andres Serruya
REDIS_TESTS
Commits
c884e198
Commit
c884e198
authored
3 years ago
by
Mario Andres Serruya
Browse files
Options
Download
Email Patches
Plain Diff
test
parent
4a4041e7
master
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/imss_cli.py
+13
-12
python/imss_cli.py
python/metadata
+0
-0
python/metadata
with
13 additions
and
12 deletions
+13
-12
python/imss_cli.py
+
13
-
12
View file @
c884e198
...
...
@@ -53,27 +53,28 @@ covid_pic = io.imread(covid_pic)
covid_pic
=
pickle
.
dumps
(
covid_pic
)
covid_pic_
=
b
"
\0
"
*
(
100
*
1024
-
len
(
covid_pic
))
covid_pic
=
covid_pic
+
covid_pic_
covid_pic
=
covid_pic
.
decode
(
"latin-1"
)
print
(
"COVID pic size: "
+
str
(
len
(
covid_pic
)))
print
(
"COVID pic type: "
+
str
(
type
(
covid_pic
)))
##SET DATA.
#pyimss.set_data(datasetd, 0, covid_pic);
##GET DATA.
#covid_pic_ret = pyimss.get_data(datasetd, 0);
covid_p
lat
=
pickle
.
loads
(
covid_pic
)
covid_p
ic_ret
=
covid_pic
#Retrieve the image.
covid_pic_ret
=
pickle
.
loads
(
covid_pic_ret
.
encode
(
"latin-1"
))
#Turn it to grayscale.
covid_p
la
t
=
rgb2gray
(
covid_p
la
t
)
covid_p
ic_re
t
=
rgb2gray
(
covid_p
ic_re
t
)
#Determine a simple threshold.
threshold
=
filters
.
threshold_otsu
(
covid_p
la
t
)
threshold
=
filters
.
threshold_otsu
(
covid_p
ic_re
t
)
#Apply the former. SEGMENTATION.
image_thesholded
=
covid_p
la
t
>
threshold
image_thesholded
=
covid_p
ic_re
t
>
threshold
#Save the files.
io
.
imsave
(
"COVID_TEST/covid_test_1.png"
,
image_thesholded
)
##SET DATA.
#pyimss.set_data(datasetd, 0, set_data);
##GET DATA.
#return_buffer = pyimss.get_data(datasetd, 0);
##Release the used dataset.
#pyimss.release_dataset(datasetd);
#Release the used dataset.
pyimss
.
release_dataset
(
datasetd
);
##############################################
########### RELEASE ENV RESOURCES ############
...
...
This diff is collapsed.
Click to expand it.
python/metadata
+
0
-
0
View file @
c884e198
No preview for this file type
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets