Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Гульев Алексей Витальевич
Agulev Kg23
Commits
1d511278
Commit
1d511278
authored
1 year ago
by
Гульев Алексей Витальевич
Browse files
Options
Download
Patches
Plain Diff
Update file main.py
parent
0bd8c51c
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
phs/main.py
+1
-1
phs/main.py
with
1 addition
and
1 deletion
+1
-1
phs/main.py
+
1
−
1
View file @
1d511278
...
...
@@ -23,7 +23,7 @@ def hue2rgb_abs(hue):
# and calculate average, prevailing hue and its percentage
# if whole image is gray, image doesn't participate in sorting and plotting
def
get_image_info
(
image_path
):
bgr_sequence
=
cv2
.
imdecode
(
np
.
fromfile
(
image_path
,
dtype
=
np
.
uint8
),
cv2
.
IMREAD_UNCHANGED
).
reshape
(
-
1
,
3
)
bgr_sequence
=
cv2
.
imdecode
(
np
.
fromfile
(
image_path
,
dtype
=
np
.
uint8
),
cv2
.
IMREAD_UNCHANGED
)
[:,
:,
0
:
3
]
.
reshape
(
-
1
,
3
)
rgb_average_color
,
hsv_average_color
=
seq2mean
(
bgr_sequence
)
gray_indices
=
np
.
all
(
bgr_sequence
==
bgr_sequence
[:,
0
][:,
np
.
newaxis
],
axis
=
1
)
...
...
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!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets