MATLAB Answers

opticalFlow components to complex vector field

조회 수: 6(최근 30일)
Pheadrus
Pheadrus 6 Sep 2018
I am trying to update legacy code that uses the no longer supported call to
opticalFlowClass = vision.OpticalFlow('OutputValue', ...
'Horizontal and vertical components in complex form', 'Method', method);
which as the call indicates, outputs a M x N matrix in complex form. The current call, for example
opticalFlowClass = opticalFlowHS;
flow = estimateFlow(opticalFlowClass, video);
outputs a flow object with the components
flow.Vx
flow.Vy
flow.Magnitude
flow.Orientation
Due to dependencies elsewhere in the code and to avoid a complete rewrite, I would like to use the components from the new call to form the matrix in the complex form of the old call. However, I was unable to find any documentation how the complex form was created. My question is
What is the structure of the complex form and how was it created from the components and orientation?
Any links to old documentation that explain this would be much appreciated.
Edit: I should add that I speculate that
Flow = complex(Vx,Vy),
but I have no support for this

  댓글 수: 0

댓글을 달려면 로그인하십시오.

답변(1개)

Vishnu Sreekumar
Vishnu Sreekumar 18 Jun 2019
Field = Vx+1i.*Vy should give you the complex vector field. Then later, real(Field) and imag(Field) can be used to get the velocity components.

  댓글 수: 0

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by