How to filter/smooth an image that has circular symmetry?

Hello,
I have a set of 2d data with circular symmetry stored as matrices. I wish to use the symmetry in order to smooth my image by using the other points that are at a comparable distance from the center. This would be in contrast to a filter that uses local neighbouring points to smooth the data, which tends to distort this data.
The image presented here is quite smooth but I have many images with noise.
Thanks, Aurélien

 Accepted Answer

One approach would be to use radon and iradon,
noisyImage= (1+sqrt((-100:100).^2 + (-100:100).'.^2));
noisyImage=noisyImage.*(noisyImage<=100) + 5*randn(size(noisyImage));
theta=0:0.25:180;
R=mean( radon(noisyImage,theta) ,2);
smoothImage=iradon( repmat(R,1,numel(theta)) ,theta );
imshowpair(noisyImage,smoothImage,'montage')
colormap hot

4 Comments

Thank you very much this is exactly what I was looking for, I didn't know of this Radon transformation, it is quite useful.
For those that don't understand the code, this is my understanding:
first you should create a theta vector, for example: theta = linspace(0,179,180)
then "radon(yourImage,theta)" creates a 2d matrix by taking "slices" of your image that pass through the center of your image at each theta value. The size of the output is [A,B] where A is the length of the diagonal of your image and B is the length of theta.
Since we want to filter this data we take the average of this 2d matrix with respect to theta.
We then simply reverse the radon transformation.
before
after
@Matt J Do you not have any problems using
theta=0:0.25:180;
R=mean( radon(noisyImage,theta) ,2);
smoothImage=iradon( repmat(R,1,numel(theta)) ,theta );
?
I have artifacts that appear depending on how I select my theta. Documentation says the spacing between theta angles should be constant, this includes between 180 and 0 I believe (they use theta=0:179 in iradon docu for example).
I've been fidling with the values a bit but can't get rid of the artefacts. They appear at the north and south pole of the sphere as sometimes increase or decrease.
For those that don't understand the code, this is my understanding ... then "radon(yourImage,theta)" creates a 2d matrix by taking "slices" of your image that pass through the center of your image at each theta value.
Not slices. Projections.
Basically, what you would see if you took an x-ray image through the object at each angle theta.
Do you not have any problems using theta=0:0.25:180
As you can see from my example output, I do not, but if you attach a.mat file containing your "noisyImage" variable, we can examine it.
Thank you for your answers. Indeed it seems to work fine for you so there must be a subtle difference in our data that creates these issues.
I couldn't find a way to get rid of artifacts at both north and south pole, so I found theta vectors where the North pole didn't have any artifacts, and same thing for south pole, then combined both halves to make an image without artifacts. Not the most elegant method but it works !

Sign in to comment.

More Answers (0)

Products

Release

R2020a

Asked:

on 5 Feb 2021

Edited:

on 5 Feb 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!