This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Code or library for LM optimization of homography matrix

Other Parts Discussed in Thread: TDA4VM, TDA2PXEVM, MATHLIB

Hi Team,

Our customer is working on calculating homography matrix and would like to know if we have any code or library for LM optimization of homography matrix?

Currently, he is using cminpack for this, but in DSP the performance is low. Do we have any alternative for this? 

For your reference, this is the current implementation he is using.

https://github.com/jinchenglee/zhang2d_cam_calib/blob/master/src/cminpack.c

Regards,

Danilo

  • Hi Danilo,

    Please find out what processor/DSP is being used.  This is always important so we can determine the correct Product Group.  I'm guessing it is for TDA4VM, but need to be sure - thanks!

    ~Leonard   

  • Hi Leonard,

    According to our customer he is using c66x DSP processor (TDA2PXEVM evaluation module).

    Regards,

    Danilo

  • Hi Leonard,

    We have received additional information from our customer below.

    Thankyou for the response, for more information I'm attaching a link of code which explains the need for this.

    www.netlib.org/.../lmdif.f

    this is the exact use case for us, which is written in fortran, we are using the C converted one which takes a function as input and do LM optimization. But this CMINPACK affecting the performance of whole module in DSP. Please provide any alternate solution which can give better performance on DSP if possible.

    /*
    *the purpose of lmdif is to minimize the sum of the squares of m nonlinear functions in n variables by a modification of *the levenberg-marquardt algorithm. the user must provide a subroutine which calculates the functions. the jacobian is *then calculated by a forward-difference approximation.
    */

    Regards,

    Danilo

  • Hi,

    Also, Is there any libraries or code reference for Calculating Homography matrix?

    If so, please provide that links also

    Thankyou,

    Bala

  • You can download Vision SDK at https://www.ti.com/tool/PROCESSOR-SDK-TDAX

    Once installed, you can find C66x optimized kernels under ~/ti_components/algorithms/.

    You can check dsplib/mathlib/vlib/vxlib to see if there is any reference for what you are looking for.