How to convert QImage to opencv Mat

前端 未结 5 1526
一个人的身影
一个人的身影 2020-12-14 12:38

I have searched on the internet but I cannot find a method of converting a QImage(or QPixmap) to a OpenCV Mat. How would I do this?.

5条回答
  •  一生所求
    2020-12-14 13:25

    I'd save the image to disk and reopen it from cv ;)

    @^ I've tried the previous solution. It doesn't seem to working with me. Although I'm getting some image, it looks like some bar code information kind of image. I guess there are some mismatch of parameters.

提交回复
热议问题