b***m 发帖数: 22 | 1 i have to draw a segment between two points(x1,y1;x2,y2) on a natural
image(.raw or .bmp, etc). so, what i wanna do is to highlight all the points
on the segment(change the intensities of those points to brightest). the
question is how to figure out the coordinates of the points on the segment,
given the coordinates of the start and end points.
maybe, first work out the formula y=ax+b with x1,y1,x2,y2, and, try every
possible X between x1 and x2, and figure out the according Y, and get all the
p | T******r 发帖数: 2937 | 2 u can find solution at any graphics textbook
【在 b***m 的大作中提到】 : i have to draw a segment between two points(x1,y1;x2,y2) on a natural : image(.raw or .bmp, etc). so, what i wanna do is to highlight all the points : on the segment(change the intensities of those points to brightest). the : question is how to figure out the coordinates of the points on the segment, : given the coordinates of the start and end points. : maybe, first work out the formula y=ax+b with x1,y1,x2,y2, and, try every : possible X between x1 and x2, and figure out the according Y, and get all the : p
|
|