I am trying to draw a line using Bresenham line algorithm, given starting (x1,y1) and ending (x2,y2) points. Every time when I try to draw the line, pixels are getting disconnected. I followed the Matlab solutions Matlab Bresenham 8-connected, Bresenham 4-connected, Bresenham any gradient and DDA too.
But every time I try to draw the steep lines, pixels getting disconnected. I am not sure whether it is an issue with Matlab imshow.
Image what I am getting (blue line).
What I want is something exact as:
Please note that I used structuring element (strel function in Matlab to produce binary image).
Can someone please help me on this? I appreciate your time and efforts.