ellipse

Remove border from opencv generated ellipse in pygame

Remove border from opencv generated ellipse in pygame Question: I’ve set up this window where I blit an ellipse to the screen. I would like to have the ellipse fully white with a smooth border. It looks acceptable, but when I add the ellipse to a white background, the border of the ellipse shows up. …

Total answers: 2

Python: fit 3D ellipsoid (oblate/prolate) to 3D points

Python: fit 3D ellipsoid (oblate/prolate) to 3D points Question: Dear fellow stackoverflow users, I face a problem as follows: I would like to fit a 3D ellipsoid to 3D data points within my python script. The starting data are a set of x, y and z coordinates (cartesian coordinates). What I would like to get …

Total answers: 1

cv2.fitEllipse creates an ellipse totally different from what it should be

cv2.fitEllipse creates an ellipse totally different from what it should be Question: I want to fit ellipses around different clusters. Until now, I used cv2.fitEllipse and it worked fine. But I discovered a problem with one ellipse (out of more than 100). Here is a sample of code that reproduces the unexpected behavior. import numpy …

Total answers: 1

How to calculate the perimeter of an ellipse

How to calculate the perimeter of an ellipse Question: I want to calculate the perimeter of an ellipse with given values for minor and major axis. I’m currently using Python. I have calculated the minor axis and major axis lengths for the ellipse i.e. a and b. It’s easy to calculate the area but I …

Total answers: 6

Plot Ellipse with matplotlib.pyplot (Python)

Plot Ellipse with matplotlib.pyplot (Python) Question: Sorry if this is a stupid question, but is there an easy way to plot an ellipse with matplotlib.pyplot in Python? I was hoping there would be something similar to matplotlib.pyplot.arrow, but I can’t find anything. Is the only way to do it using matplotlib.patches with draw_artist or something …

Total answers: 3

Python PIL: How to draw an ellipse in the middle of an image?

Python PIL: How to draw an ellipse in the middle of an image? Question: I seem to be having some trouble getting this code to work: import Image, ImageDraw im = Image.open(“1.jpg”) draw = ImageDraw.Draw(im) draw.ellipse((60, 60, 40, 40), fill=128) del draw im.save(‘output.png’) im.show() This should draw an ellipse at (60,60) which is 40 by …

Total answers: 2