How to display an image on any computer using Opencv

后端 未结 1 1383
难免孤独
难免孤独 2021-01-29 01:48

I want to display the image on any computer that opens the program .. But the software shows the picture only that the image and the software are in the same place (I want the i

1条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-29 02:20

    One way is to write a program that converts the image to a string of the form std::vector image{ 0x01, 0x02 ... }; list each byte. Then save that string in a file.

    Then #include that file into your program and read the image data from the image variable.

    This way the image will be embedded in your executable by the compiler.

    0 讨论(0)
提交回复
热议问题