フィルターのクリア

How to remove specified part in image and count number of objects in the image

2 ビュー (過去 30 日間)
Jialin Men
Jialin Men 2022 年 12 月 29 日
コメント済み: Jialin Men 2022 年 12 月 30 日
Hello guys,
I would like to remove the part which is at the bottom right.
After that I need to caculate the number of objects in the image.
Thanks so much for your help in advance

採用された回答

Image Analyst
Image Analyst 2022 年 12 月 29 日
You can erase the lower right corner of the image like this:
rgbImage(end-50 : end, end-100 : end, :) = 0;
There are more general ways to erase anything outside of the circle, but you don't need that if all you want to do is erase the micron bar and it's in the same location for all your images -- you can simply set that portion to zero like I did above.
However if you want to see the more general way, even though you don't need it, let me know. It probably involves imclose, imclearborder, and bwareafilt
  7 件のコメント
Image Analyst
Image Analyst 2022 年 12 月 30 日
Yes it's easier because we don't have the zeros penetrating into the circle area, so it's easier to get the background mask. See attached.
You can get my interactive thresholding app here:
or else just segment the masked gray scale image however you were doing it instead of thresholding.
Jialin Men
Jialin Men 2022 年 12 月 30 日
Hallo Image Analyst.
That is very nice of you.
I sincerely appreciate your so kindly help. That really helps me a lot.
Best regards
JL.

サインインしてコメントする。

その他の回答 (1 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2022 年 12 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by