# Bug when doing matrix multiplication in opencv

**URL:** <https://forum.opencv.org/t/bug-when-doing-matrix-multiplication-in-opencv/14633>\
**Category:** Uncategorized\
**Tags:** programming\
**Created:** [September 23, 2023, 12:32am UTC](https://forum.opencv.org/t/bug-when-doing-matrix-multiplication-in-opencv/14633 "2023-09-23T00:32:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yongsu\_Huang](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/yongsu_huang/32/8757_2.png) [@Yongsu\_Huang](https://forum.opencv.org/u/Yongsu_Huang)\
**Post date:** [September 23, 2023, 12:32am UTC](https://forum.opencv.org/t/bug-when-doing-matrix-multiplication-in-opencv/14633/1 "2023-09-23T00:32:11Z")

</div>

I was trying to implement an gaussian 5\*5 kernel by using \<1,2,4,2,1\> multiply by its transpose.  
and it throws a weird bug

 ![屏幕截图2](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/a/a57a822977e8297fea048af933e970b22b10ba7f.png)  
Please offer some help.

---

<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 23, 2023, 5:05am UTC](https://forum.opencv.org/t/bug-when-doing-matrix-multiplication-in-opencv/14633/2 "2023-09-23T05:05:20Z")

</div>

hello, your screenshot is useless here.

please post **your code** (as TEXT!) and the complete error msg ([MRE](https://stackoverflow.com/help/minimal-reproducible-example) required here), thank you.

---

<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 23, 2023, 7:17am UTC](https://forum.opencv.org/t/bug-when-doing-matrix-multiplication-in-opencv/14633/3 "2023-09-23T07:17:39Z")

</div>

catch the exception, inspect it.
