How to convert an 8-bit OpenCV IplImage* to a 32-bit IplImage*?

后端 未结 6 1041
我寻月下人不归
我寻月下人不归 2020-12-06 06:25

I need to convert an 8-bit IplImage to a 32-bits IplImage. Using documentation from all over the web I\'ve tried the following things:

// general code
img2 =         


        
6条回答
  •  一向
    一向 (楼主)
    2020-12-06 06:35

    If you do not put the dot (.), some compilers will understand is as an int division, giving you a int result (zero in this case).

提交回复
热议问题