質問編集履歴

1

情報更新

2020/03/17 07:42

投稿

raspypy
raspypy

スコア247

test CHANGED
File without changes
test CHANGED
@@ -10,78 +10,6 @@
10
10
 
11
11
 
12
12
 
13
- ##今のプログラム①
14
-
15
- **matplotlib**
16
-
17
- ```python
18
-
19
- # データ取得
20
-
21
- sensordata = np.array(linedata)
22
-
23
- im = axes.imshow(sensordata, cmap="plasma",
24
-
25
- extent=[0,sensordata.shape[0],0,sensordata.shape[1]],
26
-
27
- interpolation="bicubic",
28
-
29
- aspect='auto',
30
-
31
- origin='lower')
32
-
33
- ```
34
-
35
- ![イメージ説明](81a67ff859cdfe2ae0506332ef06986a.png)
36
-
37
-
38
-
39
- ```data
40
-
41
- [[20.75, 21.25, 22.25, 22.5, 21.25, 21.25, 22.75, 23.25], [20.5, 21.0, 22.25, 22.25, 23.25, 23.25, 24.0, 24.75], [20.0, 21.25, 21.75, 22.0, 22.5, 23.75, 25.5, 25.25], [20.0, 19.75, 20.75, 22.5, 24.25, 24.75, 25.25, 26.0], [20.25, 22.25, 23.25, 24.25, 24.0, 24.5, 25.5, 25.75], [21.0, 20.75, 21.0, 20.75, 21.5, 24.75, 26.0, 23.5], [21.0, 20.0, 20.25, 22.5, 24.0, 24.75, 22.25, 23.75], [21.25, 18.5, 20.5, 22.5, 21.0, 20.5, 20.25, 21.75]]
42
-
43
- ```
44
-
45
-
46
-
47
- **opencv**
48
-
49
- ```python
50
-
51
- pixel = np.array(linedata)
52
-
53
- pixel.resize((8, 8))
54
-
55
- temp_min = pixel.min()
56
-
57
- temp_max = pixel.max()
58
-
59
- pixel = pixel.clip(temp_min, temp_max)
60
-
61
- pixel = (pixel - temp_min) / (temp_max - temp_min) * 255.0
62
-
63
- pixel = pixel.astype(np.uint8)
64
-
65
- size = (256, 256)
66
-
67
- pixel = cv2.applyColorMap(pixel, cv2.COLORMAP_JET)
68
-
69
- CubicImg = cv2.resize(pixel, size, interpolation = cv2.INTER_CUBIC)
70
-
71
- ```
72
-
73
-
74
-
75
- ![イメージ説明](590e59cae175abc7ffe9a973879d41f6.png)
76
-
77
-
78
-
79
- ```data
80
-
81
- [[22.0, 21.5, 22.0, 22.25, 21.5, 22.0, 23.75, 24.25], [21.0, 21.25, 22.0, 22.5, 23.25, 23.75, 24.5, 24.5], [20.0, 22.25, 22.0, 22.5, 23.0, 24.0, 25.5, 26.0], [19.75, 20.5, 21.25, 23.0, 24.75, 24.75, 25.5, 26.25], [21.0, 22.5, 24.0, 24.25, 24.0, 24.75, 26.25, 26.25], [21.5, 21.5, 21.5, 21.25, 22.0, 24.75, 25.75, 23.75], [21.75, 19.75, 20.5, 23.0, 24.5, 24.75, 22.5, 23.0], [22.25, 19.75, 21.0, 22.5, 21.25, 20.75, 21.0, 21.5]]
82
-
83
- ```
84
-
85
13
 
86
14
 
87
15
  ##困っていること