Object extraction from background

Hello, I have so many image that i need to extract object from them(remove the background) i have tested automatic thresholding to estimate the background gray level, also i hae tried Level set , but both method give good result for some images and poor result for other , i'm asking if there is a robust and good way to do this task. Please can anyone put me in the right direction.
here is an example that contain many object:
here is another one that contain one object:
Thank you

回答 (2 件)

Image Analyst
Image Analyst 2017 年 1 月 31 日
編集済み: Image Analyst 2017 年 1 月 31 日

0 投票

I'd probably do a texture filter like stdfilt(), maybe ORed with an edge detector, and then threshold and fill the blobs with imfill. Let me know if you can't figure it out. Attach the images without the red graphical outlines on them.

1 件のコメント

Lafi Raed
Lafi Raed 2017 年 1 月 31 日
編集済み: Lafi Raed 2017 年 1 月 31 日
please can you explain more, also what is ORed with edge detector ?? here is the Original Image you can acces to them

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

Image Analyst
Image Analyst 2017 年 2 月 1 日

0 投票

See attached demo. It could be improved, but for 10 minutes work, it's a start.

10 件のコメント

Lafi Raed
Lafi Raed 2017 年 2 月 1 日
Thank you for such great answer, but can i do it in automatic way to set the thresold value?? i mean how can do automtically??
Image Analyst
Image Analyst 2017 年 2 月 1 日
Have you observed that the best threshold changes for different images? If so you'll have to use some kind of rule to pick the threshold instead of using a fixed one. One I like is the triangle threshold, attached.
Lafi Raed
Lafi Raed 2017 年 2 月 2 日
編集済み: Lafi Raed 2017 年 2 月 2 日
Hello, the problem is the edge is not smooth can get something like this: for single image it cn be done but for images that contain more one object it wil be challenging how can i improve the same result ??
Image Analyst
Image Analyst 2017 年 2 月 2 日
Yes - you can use splines or activecontour(). See attached demos.
Lafi Raed
Lafi Raed 2017 年 2 月 3 日
okay thank you, also there is another problem, i want to remove the shado from images that contain objcts?? how i can do !!
Image Analyst
Image Analyst 2017 年 2 月 3 日
Lafi Raed
Lafi Raed 2017 年 2 月 4 日
編集済み: Lafi Raed 2017 年 2 月 4 日
i need a robust shadow removal!! becuase i want to get a picture for the background then another picture for many object placed in the same background then dubtract those 2 images , it seems to give me those object but i have a problem of shadow and i need a robust shadow removal. can you suggest a robust one. thank you
Image Analyst
Image Analyst 2017 年 2 月 4 日
Sorry, I don't and can't recommend one. The one I saw at the University of Dayton, that they developed, looked pretty good.
Lafi Raed
Lafi Raed 2017 年 2 月 4 日
please can you give me the refernce for the University of Dayton?
Image Analyst
Image Analyst 2017 年 2 月 4 日
One of them is about shadow removal.

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

質問済み:

2017 年 1 月 31 日

コメント済み:

2017 年 2 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by