Variable resizing factor for the Resize Simulink block

4 ビュー (過去 30 日間)
Adam Nemes
Adam Nemes 2022 年 12 月 13 日
回答済み: Dhruv 2023 年 3 月 27 日
Hello,
I am quite new to the Computer Vision Toolbox and I´d need help with the Resize Block. For my project I want to zoom in and out on an image (using ROI). In the block parameters one can set the magnification factor, but there´s no way to treat it as an input for the block. I want this factor to change during my simulation. Does anyone know a way to work around this?
Any answers are appreciated.

回答 (1 件)

Dhruv
Dhruv 2023 年 3 月 27 日
To change the magnification factor of the Resize Simulink block during simulation, one can use a variable resizing factor. Instead of directly setting the magnification factor in the block parameters, try creating a MATLAB variable that stores the magnification factor and use that variable as an input to the Resize block.
To change the magnification factor during simulation, update the MATLAB variable accordingly. One way is to use a MATLAB Function block to calculate the variable resizing factor based on the simulation inputs or other factors that are defined.
Then, connect the output of the MATLAB Function block to the input of the Resize block to update the magnification factor during simulation. By doing this, one can zoom in and out on an image based on the variable resizing factor that changes during simulation.

カテゴリ

Help Center および File ExchangeComputer Vision with Simulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by