by Simon Perovnik
Last Updated August 14, 2019 09:20 AM - source

I am trying implement a function that could fit an elliptic fourier curve on a set of border points of a detected object. I am using cv2.findContours to acquire border points from a binary image. Next I would like to calculate the elliptic Fourier coefficients via equation:

(for sake of simplicity I will only address the x axis)

here is the equation :

$$ a_n = \frac{1}{n^2 \pi} \sum_{p = 1}^q \frac{\Delta x_p}{\Delta t_p} \left[ \cos{n t_p} - \cos{nt_{p-1}} \right] $$ and $$ b_n = \frac{1}{n^2 \pi} \sum_{p = 1}^q \frac{\Delta x_p}{\Delta t_p} \left[ \sin{n t_p} - \sin{nt_{p-1}} \right] $$

And here comes my question: The idea is to parametrise the x coordinates from 0 to 2*π. My question is, if Δt should be a constant or should it be dependant to the Δx (the bigger the change in x coordinate, the bigger Δt).

- Serverfault Help
- Superuser Help
- Ubuntu Help
- Webapps Help
- Webmasters Help
- Programmers Help
- Dba Help
- Drupal Help
- Wordpress Help
- Magento Help
- Joomla Help
- Android Help
- Apple Help
- Game Help
- Gaming Help
- Blender Help
- Ux Help
- Cooking Help
- Photo Help
- Stats Help
- Math Help
- Diy Help
- Gis Help
- Tex Help
- Meta Help
- Electronics Help
- Stackoverflow Help
- Bitcoin Help
- Ethereum Help