what is 3d plot?
Mostra commenti meno recenti

Can anybody help me on how to smooth out edges to make it rounded and fair? i am using MATLAB and i am quite new to this. Thank you.
4 Commenti
Walter Roberson
il 25 Lug 2015
Which edges?
Cas Cas
il 25 Lug 2015
What did you use to plot? If you used surf, try this
surf(peaks)
shading interp
Walter Roberson
il 26 Lug 2015
What is it that you have available to be plotted? Are you working with a rectangular array of data, or do you have a function that you can evaluate to determine additional data points?
Rena Berman
il 12 Gen 2017
(Answers Dev) Restored question.
Risposte (1)
Image Analyst
il 26 Lug 2015
You can blur the whole thing with
blurredImage = conv2(data, ones(15), 'same');
If you want to blur just the edges and leave the rest as-is, first blur the whole thing, then find the edges in the original image and replace them with the blurred version. Something like (untested):
blurredImage = conv2(data, ones(15), 'same');
stdImage = stdfilt(data, ones(9));
edgeImage = stdImage > 5; % Whatever value works.
output = data; % Initialize
% Now replace edge pixels with blurred ones.
output(edgeImage) = blurredImage(edgeImage);
11 Commenti
Rey Kelvin Peralta
il 26 Lug 2015
Modificato: Walter Roberson
il 26 Lug 2015
Rey Kelvin Peralta
il 26 Lug 2015
Image Analyst
il 26 Lug 2015
Why blur? Because blurring smooths the image.
Do you want to smooth the edges only , or smooth everything?
To view the image, which I called output, use [] with imshow
imshow(output, []);
Also, you might try a Fourier filter to get rid of that grid pattern first.
Rey Kelvin Peralta
il 26 Lug 2015
Rey Kelvin Peralta
il 26 Lug 2015
Rey Kelvin Peralta
il 26 Lug 2015
Walter Roberson
il 26 Lug 2015
I think the blur should be
blurredImage = conv2(data, ones(15)/(15*15), 'same');
This would be a moving average blur; without the division by 15*15 you would be doing a moving sum rather than a moving average
Rey Kelvin Peralta
il 27 Lug 2015
Modificato: Rey Kelvin Peralta
il 27 Lug 2015
Image Analyst
il 27 Lug 2015
Thanks Walter for the correction. It DOES smooth it, Rey. If you don't notice it then either the window width of 15 is not large enough, or else you're not displaying the right image. You should notice a definite reduction in noise with displaying it with either imshow() or surf().
Rey Kelvin Peralta
il 28 Lug 2015
Walter Roberson
il 28 Lug 2015
The following discussion refers to the original image, not reduced to .2 of original size. The 2800+ by 4800+ image.
Try using
blurredImage = conv2(data,ones(75,75)./(75*75),'same');
surf(blurredImage, 'edgecolor', 'none')
You might need to play slightly with the 75 to get the best result, but it is more than 70 and less than 80, something pretty close to 75. Maybe 73.
The more obvious texture is approximately 74 pixels apart with a width of about 23 pixels, but there is also a 5-division submesh within each larger square, so roughly every 10 pixels. It appears the coin has been photographed through the mesh, which makes it important to remove the mesh first. I do not know the best way to remove a texture.
Categorie
Scopri di più su Pulsed Waveforms in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!