Skip to content

Commit

Permalink
change draw_text to draw_string
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutree committed Mar 30, 2024
1 parent 2fc5c95 commit 4f587aa
Show file tree
Hide file tree
Showing 20 changed files with 87 additions and 87 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ while 1:
res = classifier.classify(img)
max_idx, max_prob = res[0]
msg = f"{max_prob:5.2f}: {classifier.labels[max_idx]}"
img.draw_text(10, 10, msg, image.COLOR_RED)
img.draw_string(10, 10, msg, image.COLOR_RED)
dis.show(img)
```

Expand Down
2 changes: 1 addition & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ while 1:
res = classifier.classify(img)
max_idx, max_prob = res[0]
msg = f"{max_prob:5.2f}: {classifier.labels[max_idx]}"
img.draw_text(10, 10, msg, image.COLOR_RED)
img.draw_string(10, 10, msg, image.COLOR_RED)
dis.show(img)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/index/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ while 1:
res = classifier.classify(img)
max_idx, max_prob = res[0]
msg = f"{max_prob:5.2f}: {classifier.labels[max_idx]}"
img.draw_text(10, 10, msg, image.COLOR_RED)
img.draw_string(10, 10, msg, image.COLOR_RED)
dis.show(img)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/index_en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ while 1:
res = classifier.classify(img)
max_idx, max_prob = res[0]
msg = f"{max_prob:5.2f}: {classifier.labels[max_idx]}"
img.draw_text(10, 10, msg, image.COLOR_RED)
img.draw_string(10, 10, msg, image.COLOR_RED)
dis.show(img)
```

Expand Down
2 changes: 1 addition & 1 deletion examples/vision/ai_classify/nn_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
res = classifier.classify(img)
max_idx, max_prob = res[0]
msg = f"{max_prob:5.2f}: {classifier.labels[max_idx]}"
img.draw_text(10, 10, msg, image.COLOR_RED)
img.draw_string(10, 10, msg, image.COLOR_RED)
img = img.resize(disp.width(), disp.height(), image.Fit.FIT_CONTAIN)
disp.show(img)
2 changes: 1 addition & 1 deletion examples/vision/ai_detect/nn_yolov5.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
for obj in objs:
img.draw_rect(obj.x, obj.y, obj.w, obj.h, color = image.COLOR_RED)
msg = f'{detector.labels[obj.class_id]}: {obj.score:.2f}'
img.draw_text(obj.x, obj.y, msg, color = image.COLOR_RED)
img.draw_string(obj.x, obj.y, msg, color = image.COLOR_RED)
dis.show(img)
4 changes: 2 additions & 2 deletions examples/vision/display/display_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
text = "Hello, MaixPy!"
while not app.need_exit():
img = image.Image(disp.width(), disp.height(), image.Format.FMT_RGB888)
img.draw_rect(0, y, image.text_size(text, scale=2).width + 10, 80, color=image.Color.from_rgb(255, 0, 0), thickness=-1)
img.draw_text(4, y + 4, text, color=image.Color.from_rgb(255, 255, 255), scale=2)
img.draw_rect(0, y, image.string_size(text, scale=2).width + 10, 80, color=image.Color.from_rgb(255, 0, 0), thickness=-1)
img.draw_string(4, y + 4, text, color=image.Color.from_rgb(255, 255, 255), scale=2)

disp.show(img)

Expand Down
10 changes: 5 additions & 5 deletions test/test_image_font.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@

img_show = image.Image(screen.width(), screen.height(), image.Format.FMT_RGBA8888)

size = image.text_size("Hello, world!", font = "hershey_simplex")
size = image.string_size("Hello, world!", font = "hershey_simplex")
img_show.draw_rect(0, 0, size[0], size[1], image.Color.from_rgba(255, 255, 0, 0.5))
img_show.draw_text(0, 0, "Hello, world!", image.Color.from_rgba(255, 255, 255, 1), font = "hershey_simplex")
size = image.text_size("你好!Hello, world!")
x_start = image.text_size("Hello, world!", font = "hershey_simplex")[0]
img_show.draw_string(0, 0, "Hello, world!", image.Color.from_rgba(255, 255, 255, 1), font = "hershey_simplex")
size = image.string_size("你好!Hello, world!")
x_start = image.string_size("Hello, world!", font = "hershey_simplex")[0]
img_show.draw_rect(x_start, 0, size[0], size[1], image.Color.from_rgba(255, 255, 0, 0.5))
img_show.draw_text(x_start, 0, "你好!Hello, world!", image.Color.from_rgba(255, 0, 0, 1))
img_show.draw_string(x_start, 0, "你好!Hello, world!", image.Color.from_rgba(255, 0, 0, 1))

screen.show(img_show, fit = image.Fit.FIT_NONE)

Expand Down
14 changes: 7 additions & 7 deletions test/test_image_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@
img_show.draw_image(0, img.height() + 10, img_rgba_jpg)
img_show.draw_image(0, img.height() + 20, img_rgba_png)
half_w = screen_size[0] // 2
font_h0 = img.height() + 150 + image.text_size("H", scale = 0.5)[1]
font_h0 = img.height() + 150 + image.string_size("H", scale = 0.5)[1]
font_h = font_h0
img_show.draw_rect(half_w + 100, font_h, 40, 80, image.Color.from_rgb(255, 255, 255))
img_show.draw_rect(half_w + 110, font_h + 10, 40, 80, image.Color.from_rgba(255, 255, 255, 0.5))
img_show.draw_line(half_w + 100, font_h - 10, half_w + 140, font_h + 10, image.COLOR_RED)
img_show.draw_circle(half_w + 100, font_h - 20, 5, image.COLOR_GREEN)
img_show.draw_text(0, font_h, "Hello, world!", image.Color.from_rgba(255, 255, 255, 1), scale = 0.5)
font_h += image.text_size("H", scale = 1)[1]
img_show.draw_text(0, font_h, "Hello, world!", image.Color.from_rgba(255, 255, 255, 1), scale = 1, thickness = 2)
font_h += image.text_size("H", scale = 2)[1]
img_show.draw_text(0, font_h, "Hello, world!", image.Color.from_rgba(255, 255, 255, 1), scale = 2)
img_show.draw_text(half_w, font_h0 - 100, "Hello, world! ABCDEFGHIJKLMNOPQRSTUVWXYZ", image.Color.from_rgba(255, 255, 255, 1))
img_show.draw_string(0, font_h, "Hello, world!", image.Color.from_rgba(255, 255, 255, 1), scale = 0.5)
font_h += image.string_size("H", scale = 1)[1]
img_show.draw_string(0, font_h, "Hello, world!", image.Color.from_rgba(255, 255, 255, 1), scale = 1, thickness = 2)
font_h += image.string_size("H", scale = 2)[1]
img_show.draw_string(0, font_h, "Hello, world!", image.Color.from_rgba(255, 255, 255, 1), scale = 2)
img_show.draw_string(half_w, font_h0 - 100, "Hello, world! ABCDEFGHIJKLMNOPQRSTUVWXYZ", image.Color.from_rgba(255, 255, 255, 1))

screen.show(img_show, fit = image.Fit.FIT_NONE)

Expand Down
20 changes: 10 additions & 10 deletions test/test_image_method/test_find_apriltags.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,32 @@
# rect
rect = a.rect()
img.draw_rect(rect[0], rect[1], rect[2], rect[3], image.COLOR_BLUE, 2)
img.draw_text(rect[0] + 5, rect[1] + 5, "rect", image.COLOR_BLUE)
img.draw_string(rect[0] + 5, rect[1] + 5, "rect", image.COLOR_BLUE)

# apriltag
img.draw_text(a.x() + a.w() + 5, rect[1] + 20, "id: " + str(a.id()), image.COLOR_RED)
img.draw_string(a.x() + a.w() + 5, rect[1] + 20, "id: " + str(a.id()), image.COLOR_RED)

# family
img.draw_text(a.x() + a.w() + 5, rect[1] + 35, "family: " + str(a.family()), image.COLOR_RED)
img.draw_string(a.x() + a.w() + 5, rect[1] + 35, "family: " + str(a.family()), image.COLOR_RED)

# center coordinate
img.draw_text(a.cx(), a.cy(), "(" + str(a.cx()) + "," + str(a.cy()) + ")", image.COLOR_RED)
img.draw_string(a.cx(), a.cy(), "(" + str(a.cx()) + "," + str(a.cy()) + ")", image.COLOR_RED)

# rotation
img.draw_text(a.cx(), a.cy() + 15, "rot: " + str(a.rotation()), image.COLOR_RED)
img.draw_string(a.cx(), a.cy() + 15, "rot: " + str(a.rotation()), image.COLOR_RED)

# hamming
img.draw_text(a.cx(), a.cy() + 30, "hamming: " + str(a.hamming()), image.COLOR_RED)
img.draw_string(a.cx(), a.cy() + 30, "hamming: " + str(a.hamming()), image.COLOR_RED)

# goodness
img.draw_text(a.cx(), a.cy() + 45, "goodness: " + str(a.goodness()), image.COLOR_RED)
img.draw_string(a.cx(), a.cy() + 45, "goodness: " + str(a.goodness()), image.COLOR_RED)

# translation
img.draw_text(a.cx(), a.cy() + 60, "translation: (" + str(round(a.x_translation(), 2)) + "," + str(round(a.y_translation(), 2)) + "," + str(round(a.z_translation(), 2)) + ")", image.COLOR_RED)
img.draw_string(a.cx(), a.cy() + 60, "translation: (" + str(round(a.x_translation(), 2)) + "," + str(round(a.y_translation(), 2)) + "," + str(round(a.z_translation(), 2)) + ")", image.COLOR_RED)

# rotation
img.draw_text(a.cx(), a.cy() + 75, "rotation: (" + str(round(a.x_rotation(), 2)) + "," + str(round(a.y_rotation(), 2)) + "," + str(round(a.z_rotation(), 2)) + ")", image.COLOR_RED)
img.draw_string(a.cx(), a.cy() + 75, "rotation: (" + str(round(a.x_rotation(), 2)) + "," + str(round(a.y_rotation(), 2)) + "," + str(round(a.z_rotation(), 2)) + ")", image.COLOR_RED)

img.draw_rect(roi[0], roi[1], roi[2], roi[3], image.COLOR_GREEN)
img.draw_text(roi[0] + 5, roi[1] + 5, "ROI", image.COLOR_GREEN)
img.draw_string(roi[0] + 5, roi[1] + 5, "ROI", image.COLOR_GREEN)
screen.show(img)
12 changes: 6 additions & 6 deletions test/test_image_method/test_find_barcodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@
# rect
rect = a.rect()
img.draw_rect(rect[0], rect[1], rect[2], rect[3], image.COLOR_BLUE, 2)
img.draw_text(rect[0] + 5, rect[1] + 5, "rect", image.COLOR_BLUE)
img.draw_string(rect[0] + 5, rect[1] + 5, "rect", image.COLOR_BLUE)

# payload
img.draw_text(a.x() + a.w() + 5, rect[1] + 20, "payload: " + a.payload(), image.COLOR_RED)
img.draw_string(a.x() + a.w() + 5, rect[1] + 20, "payload: " + a.payload(), image.COLOR_RED)

# type
img.draw_text(a.x() + a.w() + 5, rect[1] + 35, "type: " + str(a.type()), image.COLOR_RED)
img.draw_string(a.x() + a.w() + 5, rect[1] + 35, "type: " + str(a.type()), image.COLOR_RED)

# rotation
img.draw_text(a.x(), a.y() + 15, "rot: " + str(a.rotation()), image.COLOR_RED)
img.draw_string(a.x(), a.y() + 15, "rot: " + str(a.rotation()), image.COLOR_RED)

# quality
img.draw_text(a.x(), a.y() + 30, "quality: " + str(a.quality()), image.COLOR_RED)
img.draw_string(a.x(), a.y() + 30, "quality: " + str(a.quality()), image.COLOR_RED)

img.draw_rect(roi[0], roi[1], roi[2], roi[3], image.COLOR_GREEN)
img.draw_text(roi[0] + 5, roi[1] + 5, "ROI", image.COLOR_GREEN)
img.draw_string(roi[0] + 5, roi[1] + 5, "ROI", image.COLOR_GREEN)
screen.show(img)
38 changes: 19 additions & 19 deletions test/test_image_method/test_find_blobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,35 +35,35 @@
corners = a.corners()
for i in range(4):
img.draw_line(corners[i][0], corners[i][1], corners[(i + 1) % 4][0], corners[(i + 1) % 4][1], image.COLOR_RED)
img.draw_text(corners[0][0] + 5, corners[0][1] + 5, "corners area: " + str(a.area()), image.COLOR_RED)
img.draw_string(corners[0][0] + 5, corners[0][1] + 5, "corners area: " + str(a.area()), image.COLOR_RED)

# mini_corners
mini_corners = a.mini_corners()
for i in range(4):
img.draw_line(mini_corners[i][0], mini_corners[i][1], mini_corners[(i + 1) % 4][0], mini_corners[(i + 1) % 4][1], image.COLOR_GREEN)
img.draw_text(mini_corners[0][0] + 5, mini_corners[0][1] + 5, "mini_corners", image.COLOR_GREEN)
img.draw_string(mini_corners[0][0] + 5, mini_corners[0][1] + 5, "mini_corners", image.COLOR_GREEN)

# rect
rect = a.rect()
img.draw_rect(rect[0], rect[1], rect[2], rect[3], image.COLOR_BLUE)
img.draw_text(rect[0] + 5, rect[1] + 5, "rect", image.COLOR_BLUE)
img.draw_string(rect[0] + 5, rect[1] + 5, "rect", image.COLOR_BLUE)

# ...
img.draw_text(a.x() + a.w() + 5, a.y(), "(" + str(a.x()) + "," + str(a.y()) + ")", image.COLOR_GREEN)
img.draw_text(a.cx(), a.cy(), "(" + str(a.cx()) + "," + str(a.cy()) + ")", image.COLOR_GREEN)
img.draw_text(a.x() + a.w() // 2, a.y(), str(a.w()), image.COLOR_GREEN)
img.draw_text(a.x(), a.y() + a.h() // 2, str(a.h()), image.COLOR_GREEN)
img.draw_text(a.x() + a.w() + 5, a.y() + 15, str(a.rotation_deg()), image.COLOR_GREEN)
img.draw_text(a.x() + a.w() + 5, a.y() + 30, "code:" + str(a.code()) + ", count:" + str(a.count()), image.COLOR_GREEN)
img.draw_text(a.x() + a.w() + 5, a.y() + 45, "perimeter:" + str(a.perimeter()), image.COLOR_GREEN)
img.draw_text(a.x() + a.w() + 5, a.y() + 60, "roundness:" + str(a.roundness()), image.COLOR_GREEN)
img.draw_text(a.x() + a.w() + 5, a.y() + 75, "elongation:" + str(a.elongation()), image.COLOR_GREEN)
img.draw_text(a.x() + a.w() + 5, a.y() + 90, "area:" + str(a.area()), image.COLOR_GREEN)
img.draw_text(a.x() + a.w() + 5, a.y() + 105, "density:" + str(round(a.density(), 2)), image.COLOR_GREEN)
img.draw_text(a.x() + a.w() + 5, a.y() + 120, "extent:" + str(round(a.extent(), 2)), image.COLOR_GREEN)
img.draw_text(a.x() + a.w() + 5, a.y() + 135, "compactness:" + str(round(a.compactness(), 2)), image.COLOR_GREEN)
img.draw_text(a.x() + a.w() + 5, a.y() + 150, "solidity:" + str(a.solidity()), image.COLOR_GREEN)
img.draw_text(a.x() + a.w() + 5, a.y() + 165, "convexity:" + str(a.convexity()), image.COLOR_GREEN)
img.draw_string(a.x() + a.w() + 5, a.y(), "(" + str(a.x()) + "," + str(a.y()) + ")", image.COLOR_GREEN)
img.draw_string(a.cx(), a.cy(), "(" + str(a.cx()) + "," + str(a.cy()) + ")", image.COLOR_GREEN)
img.draw_string(a.x() + a.w() // 2, a.y(), str(a.w()), image.COLOR_GREEN)
img.draw_string(a.x(), a.y() + a.h() // 2, str(a.h()), image.COLOR_GREEN)
img.draw_string(a.x() + a.w() + 5, a.y() + 15, str(a.rotation_deg()), image.COLOR_GREEN)
img.draw_string(a.x() + a.w() + 5, a.y() + 30, "code:" + str(a.code()) + ", count:" + str(a.count()), image.COLOR_GREEN)
img.draw_string(a.x() + a.w() + 5, a.y() + 45, "perimeter:" + str(a.perimeter()), image.COLOR_GREEN)
img.draw_string(a.x() + a.w() + 5, a.y() + 60, "roundness:" + str(a.roundness()), image.COLOR_GREEN)
img.draw_string(a.x() + a.w() + 5, a.y() + 75, "elongation:" + str(a.elongation()), image.COLOR_GREEN)
img.draw_string(a.x() + a.w() + 5, a.y() + 90, "area:" + str(a.area()), image.COLOR_GREEN)
img.draw_string(a.x() + a.w() + 5, a.y() + 105, "density:" + str(round(a.density(), 2)), image.COLOR_GREEN)
img.draw_string(a.x() + a.w() + 5, a.y() + 120, "extent:" + str(round(a.extent(), 2)), image.COLOR_GREEN)
img.draw_string(a.x() + a.w() + 5, a.y() + 135, "compactness:" + str(round(a.compactness(), 2)), image.COLOR_GREEN)
img.draw_string(a.x() + a.w() + 5, a.y() + 150, "solidity:" + str(a.solidity()), image.COLOR_GREEN)
img.draw_string(a.x() + a.w() + 5, a.y() + 165, "convexity:" + str(a.convexity()), image.COLOR_GREEN)

# major axis line
major_axis_line = a.major_axis_line()
Expand All @@ -86,5 +86,5 @@
y_hist_bins = a.y_hist_bins()

img.draw_rect(roi[0], roi[1], roi[2], roi[3], image.COLOR_GREEN)
img.draw_text(roi[0] + 5, roi[1] + 5, "ROI", image.COLOR_GREEN)
img.draw_string(roi[0] + 5, roi[1] + 5, "ROI", image.COLOR_GREEN)
screen.show(img)
4 changes: 2 additions & 2 deletions test/test_image_method/test_find_circles.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
circles = img.find_circles(roi, x_stride, y_stride, threshold, x_margin, y_margin, r_margin, r_min, r_max, r_step)
for a in circles:
img.draw_circle(a.x(), a.y(), a.r(), image.COLOR_RED, 2)
img.draw_text(a.x() + a.r() + 5, a.y() + a.r() + 5, "r: " + str(a.r()) + "magnitude: " + str(a.magnitude()), image.COLOR_RED)
img.draw_string(a.x() + a.r() + 5, a.y() + a.r() + 5, "r: " + str(a.r()) + "magnitude: " + str(a.magnitude()), image.COLOR_RED)

img.draw_rect(roi[0], roi[1], roi[2], roi[3], image.COLOR_GREEN)
img.draw_text(roi[0] + 5, roi[1] + 5, "ROI", image.COLOR_GREEN)
img.draw_string(roi[0] + 5, roi[1] + 5, "ROI", image.COLOR_GREEN)
screen.show(img)
14 changes: 7 additions & 7 deletions test/test_image_method/test_find_datamatrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@
# rect
rect = a.rect()
img.draw_rect(rect[0], rect[1], rect[2], rect[3], image.COLOR_BLUE, 2)
img.draw_text(rect[0] + 5, rect[1] + 5, "rect", image.COLOR_BLUE)
img.draw_string(rect[0] + 5, rect[1] + 5, "rect", image.COLOR_BLUE)

# payload
img.draw_text(a.x() + a.w() + 5, rect[1] + 20, "payload: " + a.payload(), image.COLOR_RED)
img.draw_string(a.x() + a.w() + 5, rect[1] + 20, "payload: " + a.payload(), image.COLOR_RED)

# rotation
img.draw_text(a.x(), a.y() + 15, "rot: " + str(a.rotation()), image.COLOR_RED)
img.draw_string(a.x(), a.y() + 15, "rot: " + str(a.rotation()), image.COLOR_RED)

# rows and columns
img.draw_text(a.x(), a.y() + 30, "rows: " + str(a.rows()) + ", columns: " + str(a.columns()), image.COLOR_RED)
img.draw_string(a.x(), a.y() + 30, "rows: " + str(a.rows()) + ", columns: " + str(a.columns()), image.COLOR_RED)

# capacity
img.draw_text(a.x(), a.y() + 45, "capacity: " + str(a.capacity()), image.COLOR_RED)
img.draw_string(a.x(), a.y() + 45, "capacity: " + str(a.capacity()), image.COLOR_RED)

# padding
img.draw_text(a.x(), a.y() + 60, "padding: " + str(a.padding()), image.COLOR_RED)
img.draw_string(a.x(), a.y() + 60, "padding: " + str(a.padding()), image.COLOR_RED)

img.draw_rect(roi[0], roi[1], roi[2], roi[3], image.COLOR_GREEN)
img.draw_text(roi[0] + 5, roi[1] + 5, "ROI", image.COLOR_GREEN)
img.draw_string(roi[0] + 5, roi[1] + 5, "ROI", image.COLOR_GREEN)
screen.show(img)
2 changes: 1 addition & 1 deletion test/test_image_method/test_find_edges.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@

img.find_edges(type, roi, threshold)
img.draw_rect(roi[0], roi[1], roi[2], roi[3], image.COLOR_GREEN)
img.draw_text(roi[0] + 5, roi[1] + 5, "ROI", image.COLOR_GREEN)
img.draw_string(roi[0] + 5, roi[1] + 5, "ROI", image.COLOR_GREEN)

screen.show(img)
6 changes: 3 additions & 3 deletions test/test_image_method/test_find_line_segments.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
lines = img.find_line_segments(roi, merge_distance, max_theta_diff)
for a in lines:
img.draw_line(a.x1(), a.y1(), a.x2(), a.y2(), image.COLOR_RED, 2)
img.draw_text(a.x2() + 5, a.y2() + 5, "len: " + str(a.length()), image.COLOR_RED)
img.draw_string(a.x2() + 5, a.y2() + 5, "len: " + str(a.length()), image.COLOR_RED)

theta = a.theta()
rho = a.rho()
angle_in_radians = math.radians(theta)
x = int(math.cos(angle_in_radians) * rho)
y = int(math.sin(angle_in_radians) * rho)
img.draw_line(0, 0, x, y, image.COLOR_GREEN, 2)
img.draw_text(x, y, "theta: " + str(theta) + "," + "rho: " + str(rho), image.COLOR_GREEN)
img.draw_string(x, y, "theta: " + str(theta) + "," + "rho: " + str(rho), image.COLOR_GREEN)

img.draw_rect(roi[0], roi[1], roi[2], roi[3], image.COLOR_GREEN)
img.draw_text(roi[0] + 5, roi[1] + 5, "ROI", image.COLOR_GREEN)
img.draw_string(roi[0] + 5, roi[1] + 5, "ROI", image.COLOR_GREEN)
screen.show(img)
4 changes: 2 additions & 2 deletions test/test_image_method/test_find_lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
x = int(math.cos(angle_in_radians) * rho)
y = int(math.sin(angle_in_radians) * rho)
img.draw_line(0, 0, x, y, image.COLOR_GREEN, 2)
img.draw_text(x, y, "theta: " + str(theta) + "," + "rho: " + str(rho), image.COLOR_GREEN)
img.draw_string(x, y, "theta: " + str(theta) + "," + "rho: " + str(rho), image.COLOR_GREEN)

img.draw_rect(roi[0], roi[1], roi[2], roi[3], image.COLOR_GREEN)
img.draw_text(roi[0] + 5, roi[1] + 5, "ROI", image.COLOR_GREEN)
img.draw_string(roi[0] + 5, roi[1] + 5, "ROI", image.COLOR_GREEN)
screen.show(img)
Loading

0 comments on commit 4f587aa

Please sign in to comment.