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

后端 未结 6 1047
我寻月下人不归
我寻月下人不归 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:29

    Perhaps this link can help you?

    Edit In response to the second edit of the OP and the comment

    Have you tried

    float value = 0.5

    instead of

    float value = 0x0000001;

    I thought the range for a float color value goes from 0.0 to 1.0, where 1.0 is white.

提交回复
热议问题