How can we extract objects from a greyscale image?

So, i got a grayscale image of a box, which contains some objects.. I need to identify if/ not the box is empty or not....
I tried using the otsu thresholding, but doesn't work properly. is it possible to convert all the other parts to black except the image of interest?

3 件のコメント

Walter Roberson
Walter Roberson 2019 年 8 月 8 日
How do you know which part is of interest before you have done the thresholding ?
Nihar Rupareliya
Nihar Rupareliya 2019 年 8 月 8 日
This is the image of bucket which is full. the spatula, etc are the part of interest.
Walter Roberson
Walter Roberson 2019 年 8 月 8 日
I would recommend background subtraction, if you can get a picture of the empty bucket, especially if everything is taken from a fixed viewpoint (if the viewpoint is not fixed then you might need to do image registration before doing the subtraction.)

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

回答 (1 件)

darova
darova 2019 年 8 月 8 日

0 投票

What about bwareaopen()
I = imread('example_filled2.jpg');
I1 = I < 40;
I2 = bwareaopen(I1,3e3);
imshow(I2)
What i've got
img22.png

カテゴリ

ヘルプ センター および File ExchangeImage Processing Toolbox についてさらに検索

質問済み:

2019 年 8 月 8 日

コメント済み:

2019 年 8 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by