Additional material and experiments:
Test data Mammography:
learningImage=
,
,
,
,
,
;
Check image dimensions
In[]:=
ImageDimensions/@learningImage
Out[]=
{{583,914},{268,839},{396,836},{495,838},{750,783},{406,776}}
Check the first image properties
In[]:=
Information[First[learningImage]]
Out[]=
Function to detect white spots, using image processing computation:
In[]:=
detectWhiteSpots[image_]:=Module[{threshold,binarized,components,spots,boundingBox},threshold=0.7;binarized=Binarize[image,threshold];components=MorphologicalComponents[binarized];spots=SelectComponents[components,"FilledCircularity",2];Image[spots]]
View original image and the mask created by the function, side by side, it works in most cases...
In[]:=
#->detectWhiteSpots[#]&/@learningImage//Column
Out[]=
Using morphological components to get a square around the white spot area, according the color brightness:
In[]:=
#->Image[MorphologicalComponents[Binarize[Blur[#,10],.7],Method->"BoundingBox"]]&/@learningImage//Column
Out[]=
Again, but now view the image mask, the mammography high white image spots, sometimes it is not what we are looking for:
Exploring function by function:
Another way to do it... we can play around the parameters threshold for refinement, the appropriate values depends at each image data:
Another version with basically the same functions and computation sequence:
New we can extract the centroid with component measurements:
A function to get a Rectangle from the centroid provided:
Dirt cleaning...
Combine for a better visualization with a Rectangle over the white spot area:
Now using the initial function "detectWhiteSpots":
There are false positives and false negatives, pointing to the wrong spot because of areas brightness.
To fix it define a calculation for appropriate threshold functions (parameters) for each image bright data...
To fix it define a calculation for appropriate threshold functions (parameters) for each image bright data...
We are not using AI or ML here, just image processing traditional matrix computation (pure linear algebra)
References
References
CBIS-DDSM: Breast Cancer Image Dataset
Curated Breast Imaging Subset DDSM Dataset (Mammography)
https://www.kaggle.com/datasets/awsaf49/cbis-ddsm-breast-cancer-image-dataset
5.3GB Zip
Curated Breast Imaging Subset DDSM Dataset (Mammography)
https://www.kaggle.com/datasets/awsaf49/cbis-ddsm-breast-cancer-image-dataset
5.3GB Zip
Mammogram Mastery: A Robust Dataset for Breast Cancer Detection and Medical Education
https://data.mendeley.com/datasets/fvjhtskg93/1
978GB Zip
https://data.mendeley.com/datasets/fvjhtskg93/1
978GB Zip
Mammography Screening for Breast Cancer: Decoding Its Effectiveness and Safety
https://integrative-cancer-care.org/mammography-screening-for-breast-cancer-decoding-its-effectiveness-and-safety/
https://integrative-cancer-care.org/mammography-screening-for-breast-cancer-decoding-its-effectiveness-and-safety/
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
Image processing for automated detection of high-brightness spots in digital mammography exams
by Daniel Carvalho
Wolfram Community, STAFF PICKS, October 28, 2025
https://community.wolfram.com/groups/-/m/t/3566959
by Daniel Carvalho
Wolfram Community, STAFF PICKS, October 28, 2025
https://community.wolfram.com/groups/-/m/t/3566959