How to blur a figure without blurring the axis?

6 visualizaciones (últimos 30 días)
Guy Nir
Guy Nir el 13 de Nov. de 2016
Comentada: Guy Nir el 13 de Nov. de 2016
Hi,
I'm trying to add a blur (for instance with imfilter) to a 3D scatter plot (i.e. scatter3). To do so, I save the figure as jpg, load it, and use imfilter. However that blurs then entire image, including the axis and labels. Anyone has an idea of how to prevent of blurring the axis?

Respuesta aceptada

Walter Roberson
Walter Roberson el 13 de Nov. de 2016
save it with those items turned off, apply the blur, display the result with those items turned on.
  3 comentarios
Walter Roberson
Walter Roberson el 13 de Nov. de 2016
Editada: Walter Roberson el 13 de Nov. de 2016
You would save the information separately, if you were not going to use it immediately.
Losing the 3D perspective is a problem you already have with the approach you are taking. If you are concerned about preserving 3D then you should not be considering using imfilter as that applies only to a particular 2D extract of a 3D perpective .
Note: when I say to turn off those items, I just mean set them to not be visible, not to change anything else about your scatter3().
Your mention of 3D suggests that you should not be using scatter3 at all.
If your points are far enough apart that they will never blur together, then you could consider converting each point into a patch representing a sphere, and then applying blur to the data represented by the patch objects to create new patches that you would then display.
If your points are not far enough apart, if they can blur together, then you should consider rendering your points into voxels, and then applying blurring to the voxels to produce a new voxel data array, and then rendering the voxel data array.
Guy Nir
Guy Nir el 13 de Nov. de 2016
Dear Walter,
Thanks for your suggestions, I will give it a tray. I agree that saving, and reloading is not the most elegant way to do what I'm trying to. To make the axis not visible, I've used axis off, but I guess there are other ways. By rendering my points into voxels I guess you mean 3D array. The problem is that the matrix will be too big. Maybe I should try a sparse matrix, but am not sure whether a sparse matrix works well with filtering, and other functionalities. I'll try that patch idea! Thanks

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by