Borrar filtros
Borrar filtros

Simulink model: how to get cameraParams?

20 visualizaciones (últimos 30 días)
Georg Folwerk
Georg Folwerk el 26 de Jun. de 2024 a las 9:24
Respondida: Abhinaya Kennedy el 27 de Jun. de 2024 a las 8:05
Hello,
so im building this simulink model in which I need the cameraParameters for computation. I tried the constant block to load the cameraParams in, but sadly the structure of the cameraParams is so convoluted, that It doesnt work.
Can Someone show me an easy way to get the cameraParams into the simulink model?
Thank you for any help!

Respuestas (1)

Abhinaya Kennedy
Abhinaya Kennedy el 27 de Jun. de 2024 a las 8:05
  1. Ensure that your "cameraParameters" object is available in the MATLAB workspace.
  2. Open your Simulink model and add a MATLAB Function block. Double-click the block to open the editor. Define the function to output the required parts of the "cameraParameters".
  3. Configure the Output Ports of the MATLAB Function block correspond to the outputs of your function (e.g., "focalLength", "principalPoint", "imageSize").
  4. Connect the outputs of the MATLAB Function block to the rest of your Simulink model as needed.
  5. When you run your Simulink model, the MATLAB Function block will fetch the "cameraParameters" from the MATLAB workspace and output the necessary parts.
You can look into this link for more info on Function Blocks: https://www.mathworks.com/help/simulink/ug/what-is-a-matlab-function-block.html

Categorías

Más información sobre Interactive Model Editing en Help Center y File Exchange.

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by