Variable resizing factor for the Resize Simulink block

조회 수: 5 (최근 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 CenterFile Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by