2

is there any way to access pixels along the specified curve/path in OpenCV?

I've found LineIterator: http://opencv.willowgarage.com/documentation/cpp/core_drawing_functions.html?highlight=lineiterator#LineIterator but it's limited to lines. I would like to find something similar to LineIterator, but working with circles, since I need to read the pixels along the circle, or ellipse.

Yax
  • 436
  • 3
  • 12
  • if the curve/path is parameterizable, you can try my answer to http://stackoverflow.com/questions/16590329/access-to-pixels-along-the-curve-path-using-opencv/20710629 – Micka May 14 '14 at 11:22

1 Answers1

2

It is not builtin to opencv, but you can use http://en.wikipedia.org/wiki/Midpoint_circle_algorithm for circles, the article also mentions a paper that describes an extention to ellipses.

etarion
  • 16,935
  • 4
  • 43
  • 66
  • Thanks. I think I will have to implement it by myself. The Wiki explanation isn't quite good. It's better to use the implementation and explanation from here: http://free.pages.at/easyfilter/bresenham.html – Yax Feb 23 '11 at 20:36