Coder Social home page Coder Social logo

ellipsefittinggradient's Introduction

Source code for algebraic (non-iterative) ellipse fitting using positional and 
tangential constraints
================================================================================

ellipse_fit_with_gradients.c
  Given as input a sequence of points in the form [x_i, y_i], and their 
  gradients [gx_i, gy_i], this file outputs the parameters of the ellipse 
  [cx, cy, a, b, orientation] that approximates the input data; (cx,cy) denotes
  the centre of the ellipse, (a,b) the major and minor axes, and orientation is 
  the angle between the major axis and Ox. The function expects also a buffer 
  that is used internally to compute the coefficients of a linear system.
  This code requires lapack library. The version 3.3.1 was used.

test_ellipse_fit_with_gradients.c
  This code reads some test data from a text file, and calls the ellipse fitting
  function, allocating and deallocating the buffer needed by this function. 
  The text file has the form:
  
  pts_size
  x0 y0 gx0 gy0 
  x1 y1 gx1 gy1
  ...
  
  The first line contains the number of points, and each of the next lines 
  contains the Cartesian coordinates and gradient of each point.

  The code prints in console the parameters of the ellipse.

To compile the test code type 'make'. Make sure you have lapack library 
installed.

To run, type ./test_fit file_name.txt 

================================================================================

Additional files:

draw_ellipse.m 
  Matlab function to draw an ellipse [cx,cy,a,b,orientation].

sample_data.txt, sample_data_arc1.txt, sample_data_arc2.txt
  Examples of input files to run the ellipse fitting test; the first one 
  contains points sampled along the entire contour of an ellipse, and the other
  two contain points sampled on incomplete contours. 

sample.pgm
  Image from which the points contained in the sample text files above were 
  extracted.

================================================================================

For details about this ellipse fitting technique, see

  A Parameterless Line Segment and Elliptical Arc Detector with Enhanced Ellipse
  Fitting, V. Patraucean, P. Gurdjos, R. Grompone von Gioi, ECCV2012.

If you use this code in your work, please cite the above paper.

================================================================================

Contact:
  Viorica Patraucean
  University of Cambridge, Department of Engineering 
  [email protected]

ellipsefittinggradient's People

Contributors

viorik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ds-dev spartajet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.