projection of circle mask of image
Show older comments
Dear all, I'm trying to make a circular mask of the image (Modified Shepp-logan) by the following code :
I=imread(p.JPG);
while (p.JPG) is the image of Modified Shepped-logan in JPG format
imageSize = size(I);
ci = [128, 128, 118];
[xx,yy] = ndgrid((1:imageSize(1))-ci(1),(1:imageSize(2))-ci(2));
mask = uint8((xx.^2 + yy.^2)<ci(3)^2);
croppedImage = uint8(ones(size(I)));
croppedImage(:,:,1) = I(:,:,1).*mask;
croppedImage(:,:,2) = I(:,:,2).*mask;
croppedImage(:,:,3) = I(:,:,3).*mask;
imshow(croppedImage);
How do I make a projection of the circular mask using radon or fan beam projection??? When I wrote the code using radon, an error occurred.
1 Comment
Image Analyst
on 7 Jan 2015
I fixed your formatting, but please read this for next time. By the way, since p.JPG must be a character string holding a filename, what does while (p.JPG) mean to you?
Answers (0)
Categories
Find more on Image Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!