Is there a way to input direction in matlab UI

Hi, I would like to let users to click on an image and input the normal vector of the pixel. Is there a way to let the users input the direction elegantly? For example a sphere for users to rotate or something like that?
Thank you very much.

6 comentarios

Rik
Rik el 11 de Ag. de 2020
I'm not sure I understand what you mean.
As long as you can make it in Matlab at all, you can put it in a GUI.
xiaojuezi
xiaojuezi el 11 de Ag. de 2020
Hi, for example if I plot an arrow in the 3d space, would it be possible to rotate it in the UI intuitively (similar as rotating the view direction of the plot)?
Walter Roberson
Walter Roberson el 11 de Ag. de 2020
So it would be an input method to select a 3d angle? I suspect that you are hoping for something that is not very large.
In theory you could create an axes with a small plot that had just an arrow in it, and enable the rotation tool, and read off the axes view() to determine the rotation.
xiaojuezi
xiaojuezi el 11 de Ag. de 2020
Thank you for your reply. What rotation tool do you mean? When turning rotate3d on, I can only rotate the view instead of the exact arrow.
Rik
Rik el 11 de Ag. de 2020
Those two are the inverse of eachother, so if you have a separate axes with the arrow, you can rotate that view until it is correct and translate the camera postition back to the rotation you would need to apply to the arrow.
Walter Roberson
Walter Roberson el 11 de Ag. de 2020
When you put up an axes (possibly in a separate figure) with just an arrow, then adjusting the view is the same thing as adjusting the arrow angle. Eventually you read off the view() of that axes and use it as the data you wanted about the normal vector of pixel.
I would not say that this is a great way, but it has the advantage of being intuitive to anyone who has used the existing rotate3d tool, and should be easy to code.

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Preguntada:

el 10 de Ag. de 2020

Comentada:

el 11 de Ag. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by