We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0570570 commit 7501eeaCopy full SHA for 7501eea
examples/computer_vision/fast.py
@@ -25,8 +25,8 @@ def draw_corners(img, x, y, draw_len):
25
26
# Draw vertical line of (draw_len * 2 + 1) pixels centered on the corner
27
# Set only the first channel to 1 (green lines)
28
- ymin = max(0, y - draw_len)
29
- ymax = min(img.dims()[0], y + draw_len)
+ ymin = int(max(0, y - draw_len))
+ ymax = int(min(img.dims()[0], y + draw_len))
30
31
img[ymin : ymax, x, 0] = 0.0
32
img[ymin : ymax, x, 1] = 1.0
@@ -40,13 +40,13 @@ def fast_demo(console):
40
else:
41
img_color = af.load_image("../../assets/examples/images/man.jpg", True);
42
43
- img_color /= 255.0
44
img = af.color_space(img_color, af.CSPACE.GRAY, af.CSPACE.RGB)
+ img_color /= 255.0
45
46
features = af.fast(img)
47
48
- xs = features.get_xpos()
49
- ys = features.get_ypos()
+ xs = features.get_xpos().to_list()
+ ys = features.get_ypos().to_list()
50
51
draw_len = 3;
52
num_features = features.num_features().value
examples/computer_vision/harris.py
@@ -40,8 +40,8 @@ def harris_demo(console):
ix, iy = af.gradient(img)
ixx = ix * ix
@@ -100,8 +100,8 @@ def harris_demo(console):
100
101
idx = af.where(corners)
102
103
- corners_x = idx / corners.dims()[0]
104
- corners_y = idx % corners.dims()[0]
+ corners_x = idx / float(corners.dims()[0])
+ corners_y = idx % float(corners.dims()[0])
105
106
print(corners_x)
107
print(corners_y)
examples/computer_vision/susan.py
@@ -40,13 +40,13 @@ def susan_demo(console):
features = af.susan(img)
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments