- The simplest approach is to apply the fuzzy edge detection and the superpixel clustering separately to the image, and then use the superpixel labels to create a mask to perform whatever processing you wish on fuzzy edges that lie within each of your regions of interest.
- The second approach is to use the superpixel labels to create masks for each of the regions of interest, and then pass the entire image to a separate function to perform fuzzy edge inspection after applying the mask to it. I am not sure what benefits this approach will give you, but the fact that it performs fuzzy edge inspection once for each of your regions of interest means this is by far the longer-running of the two appraoaches.
How to process each labeled ROI separately after super pixel clustering?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hossain Md Shakhawat
il 20 Ott 2017
Commentato: Image Analyst
il 30 Ott 2017
I have applied super pixels clustering on an image. Now I want to process(apply fuzzy edge detection) each labeled ROI separately. The fuzzy edge detection should be applied on original pixels values.
0 Commenti
Risposta accettata
Scott Weidenkopf
il 30 Ott 2017
Two possible approaches come to mind here:
The second approach could look something like this:
numRegions = 20;
[L,N] = superpixels(Irgb,numRegions);
edgesForRegions = zeros([numRegions size(Irgb,1) size(Irgb,2)]);
for i = 1:numRegions
mask = L;
mask(mask ~= i) = 0;
mask(mask == i) = 1;
maskedRgbImage = bsxfun(@times, Irgb, cast(mask, 'like', Irgb));
edgesForRegions(i,:,:) = getEdges(maskedRgbImage);
end
function Ieval = getEdges(Irgb)
% code from https://www.mathworks.com/help/fuzzy/examples/fuzzy-logic-image-processing.html?
end
1 Commento
Image Analyst
il 30 Ott 2017
Or simply use one mask line instead of 3:
mask = L == i;
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Modify Image Colors in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!