# Is there any doc about the algorithm implemention of SVD in OpenCV?

**URL:** <https://forum.opencv.org/t/is-there-any-doc-about-the-algorithm-implemention-of-svd-in-opencv/10039>\
**Category:** Uncategorized\
**Created:** [September 1, 2022, 3:47am UTC](https://forum.opencv.org/t/is-there-any-doc-about-the-algorithm-implemention-of-svd-in-opencv/10039 "2022-09-01T03:47:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Honglin](https://avatars.discourse-cdn.com/v4/letter/h/e99b99/32.png) [@Honglin](https://forum.opencv.org/u/Honglin)\
**Post date:** [September 1, 2022, 3:47am UTC](https://forum.opencv.org/t/is-there-any-doc-about-the-algorithm-implemention-of-svd-in-opencv/10039/1 "2022-09-01T03:47:57Z")

</div>

I am learning the SVD in OpenCV, hope to get some doc about the jacobi SVD algorithm, thanks much!

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [September 1, 2022, 7:29am UTC](https://forum.opencv.org/t/is-there-any-doc-about-the-algorithm-implemention-of-svd-in-opencv/10039/2 "2022-09-01T07:29:51Z")

</div>

well, the [API docs are here](https://docs.opencv.org/4.x/df/df7/classcv_1_1SVD.html)

---

<div class="post-metadata">

**Author:** ![Honglin](https://avatars.discourse-cdn.com/v4/letter/h/e99b99/32.png) [@Honglin](https://forum.opencv.org/u/Honglin)\
**Post date:** [September 1, 2022, 8:19am UTC](https://forum.opencv.org/t/is-there-any-doc-about-the-algorithm-implemention-of-svd-in-opencv/10039/3 "2022-09-01T08:19:26Z")

</div>

Thanks for your reply!  
I hope I can know the algorithm of SVD in OpenCV, so hope to get some doc or paper about it. I have learned some knowledge about the two-side jacobi SVD and one-side jacobi SVD. But when I read the SVD source code in OpenCV, I’m still very confused that how does it implemented.

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [September 1, 2022, 9:06am UTC](https://forum.opencv.org/t/is-there-any-doc-about-the-algorithm-implemention-of-svd-in-opencv/10039/4 "2022-09-01T09:06:55Z")

</div>

this?

yeah it’s _code_. someone meant for it to be unreadable. no comments at all, typical engineer’s/mathematician’s code.

I see some “Givens” stuff. Givens and Householder are numerical operations I remember vaguely from undergrad.

just google “svd givens” and see where it leads you. or take a university-level class on numerics.

> <https://github.com/opencv/opencv/blob/8b4fa2605e1155bbef0d906bb1f272ec06d7796e/modules/core/src/lapack.cpp#L413>

---

<div class="post-metadata">

**Author:** ![Honglin](https://avatars.discourse-cdn.com/v4/letter/h/e99b99/32.png) [@Honglin](https://forum.opencv.org/u/Honglin)\
**Post date:** [September 1, 2022, 1:54pm UTC](https://forum.opencv.org/t/is-there-any-doc-about-the-algorithm-implemention-of-svd-in-opencv/10039/5 "2022-09-01T13:54:44Z")

</div>

Thanks for your help! I go back to read the JacobiSVD soruce code again. It seems use one-side jacobi rotations. Maybe I need to study it more, so some details in the code can be figured out.

---

<div class="post-metadata">

**Author:** ![Eduardo](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@Eduardo](https://forum.opencv.org/u/Eduardo)\
**Post date:** [September 5, 2022, 6:31pm UTC](https://forum.opencv.org/t/is-there-any-doc-about-the-algorithm-implemention-of-svd-in-opencv/10039/6 "2022-09-05T18:31:23Z")

</div>

I would suggest to look at a high performance computing (HPC) course (from [Google search?](http://www.math.pitt.edu/~sussmanm/2071Spring08/lab09/index.html)) and maybe to the [LAPACK Users’ Guide](https://netlib.org/lapack/lug/) rather than directly looking at the source code.

---

<div class="post-metadata">

**Author:** ![Honglin](https://avatars.discourse-cdn.com/v4/letter/h/e99b99/32.png) [@Honglin](https://forum.opencv.org/u/Honglin)\
**Post date:** [September 14, 2022, 6:41am UTC](https://forum.opencv.org/t/is-there-any-doc-about-the-algorithm-implemention-of-svd-in-opencv/10039/7 "2022-09-14T06:41:22Z")

</div>

Thanks for your suggestion! 😀
