aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-10-25 23:34:18 +0800
committerAaron LI <aaronly.me@outlook.com>2016-10-25 23:34:18 +0800
commit9d851a70476667d2790fb5e7a0b25429ac26614e (patch)
treecd424ce6963f258716071d8345db6cbac0289166
parent7fbd15078b3689c2c4ffde9e986a8de5ca6bd29b (diff)
downloadfg21sim-9d851a70476667d2790fb5e7a0b25429ac26614e.tar.bz2
draw.py: Remove the unused "circle()" function
-rw-r--r--fg21sim/utils/draw.py42
1 files changed, 0 insertions, 42 deletions
diff --git a/fg21sim/utils/draw.py b/fg21sim/utils/draw.py
index a80e301..3213fa8 100644
--- a/fg21sim/utils/draw.py
+++ b/fg21sim/utils/draw.py
@@ -154,45 +154,3 @@ def ellipse(r, c, r_radius, c_radius, shape):
rr += upper_left[0]
cc += upper_left[1]
return (rr, cc)
-
-
-def circle(r, c, radius, shape):
- """Generate coordinates of pixels within the circle.
-
- Parameters
- ----------
- r, c : int
- Center coordinate of the circle.
- radius : int
- Radius of the circle.
- shape : tuple
- Image shape which is used to determine the maximum extent of output
- pixel coordinates. This is useful for circles that exceed the image
- size. If None, the full extent of the circle is used.
-
- Returns
- -------
- rr, cc : integer `~numpy.ndarray`
- Pixel coordinates of the circle.
- May be used to directly index into an array, e.g.
- ``img[rr, cc] = 1``.
-
- Examples
- --------
- >>> from fg21sim.utils.draw import circle
- >>> img = np.zeros((10, 10), dtype=np.uint8)
- >>> rr, cc = circle(4, 4, 5)
- >>> img[rr, cc] = 1
- >>> img
- array([[0, 0, 1, 1, 1, 1, 1, 0, 0, 0],
- [0, 1, 1, 1, 1, 1, 1, 1, 0, 0],
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
- [1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
- [0, 1, 1, 1, 1, 1, 1, 1, 0, 0],
- [0, 0, 1, 1, 1, 1, 1, 0, 0, 0],
- [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype=uint8)
- """
- return ellipse(r, c, radius, radius, shape)