Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Okan DÜZYEL
Image Similarity
Commits
c5893e65
Commit
c5893e65
authored
2 years ago
by
Okan DÜZYEL
Browse files
Options
Download
Email Patches
Plain Diff
Upload New File
parent
ed3e57e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
image_similarity_test.py
+37
-0
image_similarity_test.py
with
37 additions
and
0 deletions
+37
-0
image_similarity_test.py
0 → 100644
+
37
-
0
View file @
c5893e65
"""
Created on Sat May 30 12:00:11 2023
@author: okanduzyel
"""
import
time
from
image_similarity
import
image_similarity
import
cv2
import
numpy
as
np
from
PIL
import
Image
import
imagehash
model
=
image_similarity
()
pil_image
=
Image
.
open
(
'./images/IMG_1416_25.jpeg'
).
convert
(
'RGB'
)
open_cv_image
=
np
.
array
(
pil_image
)
first
=
open_cv_image
[:,
:,
::
-
1
].
copy
()
pil_image
=
Image
.
open
(
'./images/IMG_1416_75.jpeg'
).
convert
(
'RGB'
)
open_cv_image
=
np
.
array
(
pil_image
)
second
=
open_cv_image
[:,
:,
::
-
1
].
copy
()
print
(
model
.
duplication_checker
(
first
,
second
))
first
=
cv2
.
imread
(
'./images/IMG_1416_25.jpeg'
)
second
=
cv2
.
imread
(
'./images/IMG_1416_75.jpeg'
)
print
(
model
.
similarity_checker
(
first
,
second
))
first
=
Image
.
open
(
'./images/IMG_1416.jpeg'
)
second
=
Image
.
open
(
'./images/IMG_1416.png'
)
model
.
duplication_checker_PIL
(
first
,
second
)
image
=
cv2
.
imread
(
'./images/IMG_0990.jpeg'
)
print
(
model
.
blur_detector
(
image
))
\ No newline at end of file
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