I have to cluster an image (named "Degrad"), and I would like to insert the sub-images associated with different classes into the frame corresponding to the complete image. I used the option PlotRange->{} with the hope that the different sub-images exactly fit in the original frame, but it doesn't work (see the separate representation in the attached notebook)! In addition, when I try to rebuild the original image by superposing these subimages, there are a lot of "holes": It seems that a number of pixels are shifted or ill-dimensioned...
So, here is a 20X14 image I want to cluster:
Five clusters can be obtained from:
TrucMed = ClusteringComponents[Degrad, 5, Method -> "KMedoids"];
Then, I tried to locate these classes in the original image, through the instruction:
Map[Show[#[[2]],
PlotRange -> {{0, First@ ImageDimensions@Degrad - 1}, {0,
Last@ ImageDimensions@Degrad - 1}}, ImageSize -> Automatic,
Frame -> True] &,
ComponentMeasurements[{Degrad, TrucMed}, "MaskedImage"]]
The obtained subimages were:
I used the option PlotRange->{} with the hope that the different "standardized" subimages exactly fit in the original 24X10 frame, but it doesn't work. For instance, the superposition of these "standardized" subimages is full of white holes:
What should I do?
Regards, Claude
Attachments: