How do you plot a line between two coordinates on a binary and color image?
1 回表示 (過去 30 日間)
古いコメントを表示
new to matlab
0 件のコメント
回答 (1 件)
Image Analyst
2015 年 9 月 16 日
The image type does not matter. Just put hold on and then call line()
hold on;
line([x1,x2], [y1,y2], 'Color', 'r', 'LineWidth', 3);
Or you can call plot() if you want
hold on;
plot([x1,x2], [y1,y2], 'r-', 'LineWidth', 3);
Or in terms of rows and columns
hold on;
line([col1,col2], [row1,row2], 'Color', 'r', 'LineWidth', 3);
2 件のコメント
Image Analyst
2015 年 10 月 5 日
I don't know why either. How could I possibly know? You haven't shared anything helpful. If you want help, post your code and the full error message (everything in red).
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!