OpenCV - 访问沿曲线/路径的像素 [英] OpenCV - Access to pixels along the curve/path
问题描述
有什么方法可以访问OpenCV中指定曲线/路径的像素?
is there any way to access pixels along the specified curve/path in OpenCV?
我找到了LineIterator:
http://opencv.willowgarage.com/documentation/cpp/core_drawing_functions.html?highlight=lineiterator #LineIterator
,但它仅限于行。我想找到类似于LineIterator的东西,但是使用圆,因为我需要读取沿着圆圈的像素,或椭圆。
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.
推荐答案
它不是内建于opencv,但您可以使用 http://en.wikipedia.org/wiki/Midpoint_circle_algorithm 的圈子,文章还提到了一个论文,描述延伸到椭圆。
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.
这篇关于OpenCV - 访问沿曲线/路径的像素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!