trying to make a donut mask to span over images, suggestions?
Ältere Kommentare anzeigen
[x,y] = meshgrid(1:width, 1:height);
centerX = (width + 1) / 2;
centerY = (height + 1) / 2;
dist = sqrt((x - centerX).^2 + (y - centerY).^2);
innerRadius = 50;
outerRadius = 100;
masksign = false(height, width);
masksign(dist >= innerRadius & dist <= outerRadius) = true;
masksign = grayImage >= lowThreshold & grayImage <= highThreshold;
imshow(masksign);
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Biomedical Imaging finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





