Plotting or choosing nth pixel in a binary image
1 回表示 (過去 30 日間)
古いコメントを表示
Hi
I have a binary image and I found the positions of the ones. I have x and y positions. I plotted from variables tables for example plot(1,94, 'g+'). I have selected every 60th pixel. I wonder is it possible to have a command or code to choose every nth pixel by itself instead of writing manually?
Thanks
0 件のコメント
回答 (1 件)
Image Analyst
2017 年 4 月 17 日
Yes, though I don't know why you'd want to do this
[y, x] = find(binaryImage);
hold on;
plot(x(1:60:end), y(1:60:end), 'g+', 'MarkerSize', 8, 'LineWidth', 1);
grid on;
Adapt as needed to suit your tastes.
2 件のコメント
Image Analyst
2017 年 4 月 19 日
Show your image. Is the line a row in your image? Or a column? Or a white blob at some arbitrary angle? Is the line longer than 10 pixels? If so, which do you want - the first 10 pixels, the last 10 pixels, the middle 10 pixels. Have you read this link?
参考
カテゴリ
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!