How can I do image segmentation without using threshold level number ?

I have a mammogram image . I need to segment tumor from image with exact shape and location.
I tried im2bw(I, 0.7) or imbinarize(I, 'adaptive') or imbinarize(I, 'global')...
im2bw is the best way for result but for every image I need to change level number ( I mean 0.7 )
and I couldn't get exact shape with level number sometimes I give 0,657 .. to get closest tumor shape.
every time giving a number and see result is tiring to get the best exact shape.
I added breast image and tumor is obvious white circle tissue.
How can we segment tumor from image with best method ?
the image is taken from miasdatabase

6 Comments

@Image Analyst is there any way such as finding histogram equation of pixels and background is gray and calculalating average or mean of gray pixels and tumour is white and calculating mean of highest white pixels and subtract this and get tumor ? but I don't know how we do this with codes.
The first step in proper image analysis is to use the actual data, not something with a quality equivalent to a screenshot. Never use JPEG for image analysis if you can avoid it. Your source is an X-ray image, which is probably stored as a DICOM file. Try to use the data directly from that.
Cannot attach this file because:
  • File format is unsupported for file:mdb005.pgm. Use any of these formats:.bmp, .csv, .fig, .gif, .jpg, .jpeg, .m, .mat, .mdl, .mlapp, .mlx, .sfx, .slx, .sbproj, .pdf, .png, .txt, .xls, .xlsx, .zip
The original format is pgm and can not be load on here . So added Jpeg type. For now not important which type. because my aim is different . But @Rik thank you for advice.
You can send me all of your database images on []@gmail.com, I will write a small source code for that adressing your problem of dynamically selecting threshold value for your breast tumor images and share you the same.
@Amit Why do you insist on posting your email address and circumventing the public nature of this forum?
Seeing the variations in 100s of database images and writing code which suits for all database images is the purpose.
I suppose there is limit on number of database images that can be shared on this forum... certainly 100s of database images can not be shared on this forum...
If its possible to share such huge data here then I dont mind to continue discussion on this forum ...

Sign in to comment.

Answers (0)

Asked:

on 21 Apr 2021

Edited:

on 6 Jun 2021

Community Treasure Hunt

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

Start Hunting!