Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
FPSfirmware
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dorababu A
FPSfirmware
Commits
6fd87610
Commit
6fd87610
authored
2 years ago
by
Dorababu A
Browse files
Options
Downloads
Patches
Plain Diff
plot single fp sample
parent
dd31d97a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ReadRawData/pyScripts/Merge.py
+41
-17
41 additions, 17 deletions
ReadRawData/pyScripts/Merge.py
with
41 additions
and
17 deletions
ReadRawData/pyScripts/Merge.py
+
41
−
17
View file @
6fd87610
...
...
@@ -40,30 +40,54 @@ def removedot(invertThin):
return
temp2
# Read fp data from the text file
# plot fp sample
def
plot_sample
(
fp_image
):
'''
plot the given sample
'''
fp_enhance_image
=
fingerprint_enhancer
.
enhance_Fingerprint
(
fp_image
)
temps
=
np
.
loadtxt
(
"
fpData/fp_image.txt
"
)
fp_enhance_image
[
fp_enhance_image
==
255
]
=
1
arr1
=
np
.
array
(
temps
[
0
]).
reshape
(
160
,
160
)
arr2
=
np
.
array
(
temps
[
1
]).
reshape
(
160
,
160
)
arr3
=
np
.
array
(
temps
[
2
]).
reshape
(
160
,
160
)
arr4
=
np
.
array
(
temps
[
3
]).
reshape
(
160
,
160
)
skeleton
=
skeletonize
(
fp_enhance_image
)
skeleton
=
np
.
array
(
skeleton
,
dtype
=
np
.
uint8
)
skeleton
=
removedot
(
skeleton
)
fp_array1
=
np
.
concatenate
((
arr1
,
arr2
),
axis
=
1
)
fp_array2
=
np
.
concatenate
((
arr3
,
arr4
),
axis
=
1
)
plt
.
imshow
(
skeleton
,
'
gray
'
)
plt
.
show
(
)
fp_array
=
np
.
concatenate
((
fp_array1
,
fp_array2
),
axis
=
0
)
fp_image
=
np
.
reshape
(
fp_array
,
(
320
,
320
))
# main function
if
__name__
==
"
__main__
"
:
fp_enhance_image
=
fingerprint_enhancer
.
enhance_Fingerprint
(
fp_image
)
# Read fp data from the text file
fp_enhance_image
[
fp_enhance_image
==
255
]
=
1
temps
=
np
.
loadtxt
(
"
fpData/fp_image.txt
"
)
# shaping array as pixels 160x160 i.e, 25600 samples
arr1
=
np
.
array
(
temps
[
0
]).
reshape
(
160
,
160
)
arr2
=
np
.
array
(
temps
[
1
]).
reshape
(
160
,
160
)
arr3
=
np
.
array
(
temps
[
2
]).
reshape
(
160
,
160
)
arr4
=
np
.
array
(
temps
[
3
]).
reshape
(
160
,
160
)
skeleton
=
skeletonize
(
fp_enhance_image
)
skeleton
=
np
.
array
(
skeleton
,
dtype
=
np
.
uint8
)
skeleton
=
removedot
(
skeleton
)
plot_sample
(
arr1
)
'''
fp_array1 = np.concatenate((arr1,arr2), axis=1)
fp_array2 = np.concatenate((arr3,arr4), axis=1)
plt
.
imshow
(
skeleton
,
'
gray
'
)
plt
.
show
()
fp_array = np.concatenate((fp_array1, fp_array2), axis =0)
fp_image = np.reshape(fp_array, (320,320))
fp_enhance_image= fingerprint_enhancer.enhance_Fingerprint(fp_image)
fp_enhance_image[fp_enhance_image == 255] =1
skeleton = skeletonize(fp_enhance_image)
skeleton = np.array(skeleton, dtype=np.uint8)
skeleton = removedot(skeleton)
plt.imshow(skeleton,
'
gray
'
)
plt.show()
'''
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment