The error is generated because the input image to the drawLine function is not provided. As it is stated in the comment at the beginning of the function file the call has to be of this form:
drawLine(img, [p1x p1y], [p2x p2y],[r g b], line_width);
drawLine(img, [10 20], [19 90], [255 0 0], 3);
will draw a red line of 3 pixels in width between the points [10 20] to [19 90].
In order to have something to draw on, the input image has to be provided as well.
I really need to know about this code and how its gonna work..please anyone describe how to run this . I have tried to run, but it produce :
Error in ==> line at 10
??? Input argument "img" is undefined.
really appreciate for the assistance