Draw color-coded lines in image.

LINES2IM generates an image with painted lines. The line-hues are the angles of the slopes.
354 Downloads
Updated 29 Jan 2012

View License

Given a set of line coordinates:
X = [startx1 endx1; startx2 endx2;...]
Y = [starty1 endy1; starty2 endy2;...]
and a wanted image resolution, this code will generate the sparse matrix HUE, and the images BW, RGB and HSV, all with the desired resolution.
I made this to simplify edge-analysis of image-edge-lines gained from hough-transformation. (But you could also paint with it, as I did when making the screen-shot.)

Cite As

Jan Heldal (2024). Draw color-coded lines in image. (https://www.mathworks.com/matlabcentral/fileexchange/34834-draw-color-coded-lines-in-image), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0