Comments on: Making a line visible over an image in MATLAB https://blogs.mathworks.com/videos/2013/06/10/making-a-line-visible-over-an-image-in-matlab/?s_tid=feedtopost Stuart uses video to share his experiences solving problems with MATLAB day-to-day, interesting new features, plus tips and tricks he has picked up along the way. Mon, 17 Jun 2013 15:04:22 +0000 hourly 1 https://wordpress.org/?v=6.2.2 By: Doug https://blogs.mathworks.com/videos/2013/06/10/making-a-line-visible-over-an-image-in-matlab/#comment-24725 Mon, 17 Jun 2013 15:04:22 +0000 https://blogs.mathworks.com/videos/?p=1123#comment-24725 @Anand

Look like good changes to me.

Doug

]]>
By: Anand P https://blogs.mathworks.com/videos/2013/06/10/making-a-line-visible-over-an-image-in-matlab/#comment-24723 Mon, 17 Jun 2013 14:49:31 +0000 https://blogs.mathworks.com/videos/?p=1123#comment-24723 Thanks for the share, Doug

Just did small tweaks and added some comments. Just wanted to have your suggestions too…

function cursorLine(x,y,innerThickness, outerThickness)
% Making a line visible over an image in MATLAB
% x : X axis co-ordinates of the points on the line
% y : Y axis co-ordinates of the points on the line
% innerThickness : Thickness of the black line (inner line)
% outerThickness : Thickness of the white line (outer line)

% Setting default values if no. of inputs are less than specified
if nargin == 2
innerThickness = 2;
outerThickness = 4;
else
if nargin innerThickness
h.thick = line(x,y);
set(h.thick, ‘color’, [1 1 1]);
set(h.thick, ‘linewidth’, outerThickness);
end

% Display black line only if inner line width is more than zero
if innerThickness > 0
h.thin = line(x,y);
set(h.thin , ‘color’, [0 0 0]);
set(h.thin , ‘linewidth’, innerThickness);
end
end

]]>
By: Doug https://blogs.mathworks.com/videos/2013/06/10/making-a-line-visible-over-an-image-in-matlab/#comment-24457 Wed, 12 Jun 2013 13:07:21 +0000 https://blogs.mathworks.com/videos/?p=1123#comment-24457 @Dan,

That is the great thing here. You have the code, give it a try!

Doug

]]>
By: Dan https://blogs.mathworks.com/videos/2013/06/10/making-a-line-visible-over-an-image-in-matlab/#comment-24451 Tue, 11 Jun 2013 22:23:31 +0000 https://blogs.mathworks.com/videos/?p=1123#comment-24451 I think it would be more useful to have two lines sharing a common thickness (which the user could adjust) and use different lifestyles. One line would be solid, the other dashed.

]]>
By: Jonathan https://blogs.mathworks.com/videos/2013/06/10/making-a-line-visible-over-an-image-in-matlab/#comment-24447 Tue, 11 Jun 2013 14:18:00 +0000 https://blogs.mathworks.com/videos/?p=1123#comment-24447 Doug,

This is a nice tip. Thank you. I especially like that you made the code available outside the video. Now I can see the tip at a glance.

~Jonathan

]]>