Was ist der 199
in imread(..., 199)
bedeuten soll?
Valid values are:
- IMREAD_UNCHANGED If set, return the loaded image as is (with alpha channel, otherwise it gets cropped).
- IMREAD_GRAYSCALE If set, always convert image to the single channel grayscale image.
- IMREAD_COLOR If set, always convert image to the 3 channel BGR color image.
- IMREAD_ANYDEPTH If set, return 16-bit/32-bit image when the input has the corresponding depth, otherwise convert it to 8-bit.
- IMREAD_ANYCOLOR If set, the image is read in any possible color format.
- IMREAD_LOAD_GDAL If set, use the gdal driver for loading the image.
- a few other options for reduced grayscale images.
Normalerweise möchten Sie das Bild in der BGR laden:
Mat img = imread("/path/to/img.png"); // IMREAD_COLOR is default value
oder in Graustufen
Mat img = imread("/path/to/img.png", IMREAD_GRAYSCALE);
Paste Code und Fehler in Frage als Text. Kein Screenshot – Chichi
Sind Sie sicher, dass das Logobild vorhanden ist? Sie haben nach einem Bild mit dem Namen 'dota_log.png' gefragt. Sollte es "dota_logo.png" sein? – user1118321
Dieser Fehler tritt häufig auf, wenn auf das von Ihnen angegebene Eingabebild nicht zugegriffen werden kann. Überprüfen Sie, ob die Mat, die Sie an imshow übergeben, nicht null ist –