opencv常用API

详见官方文档https://docs.opencv.org/4.x/ 配置方法

  1. namedWindow()

    • create a window with the name you gave.

    • params:
      • window name: a string. In c, it's a char *.In Python, it's a normal string, like "examples",'examples'
      • window flags: this parameter is used to set the window's size. the default value is cv::WINDOW_AUTOSIZE, when the flag is set as this, the window's size is set automatically depending on the size of the image. other values like WINDOW_NORMAL,WINDOW_FULLSCREEN,WINDOW_FREERATIO,WINDOW_KEEPRATIO are also frequently used.
  2. imshow()

    • been used to show an image.

    • params:
      • window name
      • input array: a mat object
  3. destoryAllWindows()

    • no params.
  4. resizeWindow()

    • params:
      • window name
      • width
      • height
  5. waitKey()

    • params:

      delay: int. default value is zero, and the window is always waiting for the pushing of any key.

    • return the key's ASCII code you push.

评论区 0