- Convert 3D mask to 2D by reshaping or grayscaling
- Using regionprops3 to work with 3D Images
How to calculate features of benign images?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
The provided code in 'GehtMitAllenMasks.m' works for images of type 'malignant' but not for images of type 'benign' (function 'calculateFeatures').
I tried doing it like this:
oImageData = ImageData('Path', 'benign')
glcmFeatures = GehtMitAllenMasks(oImageData)
Tfeatures = glcmFeatures.calculateFeatures
Then I get this error:
Unable to perform assignment because the size of the left side is
1-by-1 and the size of the right side is 0-by-0.
Error in GehtMitAllenMasks/calculateFeatures (line 44)
featureData(objIdx,14) = sP(1).Circularity;
This is the used dataset: https://www.kaggle.com/datasets/aryashah2k/breast-ultrasound-images-dataset
Since this is for a schoolproject that's due in a few days I would appreciate fast answers.
Thanks in advance!
0 Commenti
Risposte (1)
Rohit
il 25 Apr 2023
Hi Kevin,
Upon investigating the code that you have shared, it seems that we can get features of images of type 'malignant' but in case of ‘benign’ images, there is some error.
The reason for this error is ‘regionprops’ function which finds features for 2-D images but there is an image in dataset whose mask is 3D and so some features like ‘Circularity’ are empty and thus gives error in assignment.
Some possible ways to solve this error can be:
You can look up this MathWorks documentation links for more reference:
regionprops function:
image conversion to 2D:
For debugging your MATLAB code and see where exactly is error, you can try setting breakpoints.
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!