Images in Digital micrograph
古いコメントを表示
Hi,
I would like to extract the dark pixels of an DM3 image. For that I thought to get the line profile and set a threshold. Each pixel below the certain threshold would be identified as a "dark" pixel. Now my question: How can I draw such line profiles atomatically?
回答 (2 件)
Image Analyst
2017 年 3 月 5 日
You can use line() to draw lines in the overlay above an image. You might like to look at improfile(). What is your definition of "automatically"?
To get the dark pixels, you can mask bright pixels to 0
brightPixels = grayImage > someValue;
grayImage(brightPixels) = 0;
imshow(grayImage, []);
Antonio Sereira
2017 年 3 月 6 日
0 投票
6 件のコメント
Image Analyst
2017 年 3 月 6 日
Is this an "Answer" to your original question up top?
What is the "data"? And how did you "plot" it?
Antonio Sereira
2017 年 3 月 6 日
Image Analyst
2017 年 3 月 6 日
What does that mean? What if some values in the row are above and some below. What do you want to save? What is row 1 has 48 values above, row 2 has 183 values above, and row 3 has 935 values above, so the number is different for each row. What do you want to save, and how do you want it saved?
Antonio Sereira
2017 年 3 月 7 日
Image Analyst
2017 年 3 月 7 日
Not quite sure I understand. You lost me when you said that you took an average vertical profile (1-D of 1000 elements) and turned it into a 100x100 2-D array and then called that a "data cube" which, to me, means a 3-D array, not a 2-D array. Did you subsample and replicate? Just reshape()? Is this something like meshgrid() produces? I have no idea what went on.
A small 4 by 4 by 3 slice example might help.
In general to extract values according to their value, try thresholding:
indexesToExtract = z >= lowValue & z <= highValue;
extractedZ = z(indexesToExtract);
where z is a 1-d vector.
Antonio Sereira
2017 年 3 月 19 日
カテゴリ
ヘルプ センター および File Exchange で Display Image についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!