-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcolor ranges.txt
58 lines (43 loc) · 1.29 KB
/
color ranges.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import numpy as np
# Black
black_min = np.array([0, 0, 0])
black_max = np.array([180, 255, 30])
# White
white_min = np.array([0, 0, 231])
white_max = np.array([180, 18, 255])
# Red1
red1_min = np.array([159, 50, 70])
red1_max = np.array([179, 255, 255])
# Red2
red2_min = np.array([0, 50, 70])
red2_max = np.array([9, 255, 255])
# Green
green_min = np.array([36, 50, 70])
green_max = np.array([89, 255, 255])
# Blue
blue_min = np.array([90, 50, 70])
blue_max = np.array([128, 255, 255])
# Yellow
yellow_min = np.array([25, 50, 70])
yellow_max = np.array([35, 255, 255])
# Purple
purple_min = np.array([129, 50, 70])
purple_max = np.array([158, 255, 255])
# Orange
orange_min = np.array([10, 50, 70])
orange_max = np.array([24, 255, 255])
# Gray
gray_min = np.array([0, 0, 40])
gray_max = np.array([180, 18, 230])
# magenta
magenta_min = np.array([129, 50, 70])
magenta_max = np.array([158, 255, 255])
# Cyan
cyan_min = np.array([90, 50, 70])
cyan_max = np.array([128, 255, 255])
red1=get_pixel_coordinates_by_color(image, red1_min, red1_max)
red2 = get_pixel_coordinates_by_color(image, red2_min, red2_max)
red = np.concatenate((red1,red2), axis=0)
red = np.unique(red, axis=0)
blue=get_pixel_coordinates_by_color(image, blue_min, blue_max)
green = get_pixel_coordinates_by_color(image, green_min, green_max)