Drawing Lines At Crossover Points with OpenCV

asked 2014-05-11 02:46:25 -0600

zchenkui gravatar image

updated 2020-11-13 04:13:51 -0600

Hello, everyone.

I am now making a program with OpenCV which should have these features: 1.Drawing lines on a white canvas;

2.The color of every line is grayscale, that is, I use CV_8UC1;

3.If a line being drawing is crossing over other lines, the grayscale at the crossover points is calculated as:

grayscaleResult = 0.5 * ( grayscaleOld + grayscaleNew)

where grayscaleOld is the color of lines which have been drawn on canvas and grayscaleNew is the color of line which has been drawing.

4.The thinness of lines may not be 1, sometimes > 1.

I want to know how to draw points at crossover points, and the most difficult for me is the thinness of lines is not the same.

Thank you very much!

edit retag flag offensive close merge delete

Comments

2

the lineiterator might be helpful.

berak gravatar imageberak ( 2014-05-11 03:18:07 -0600 )edit