Commit 1d511278 authored by Гульев Алексей Витальевич's avatar Гульев Алексей Витальевич
Browse files

Update file main.py

parent 0bd8c51c
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment