This problem occurred when I ran C + + opencv code. I realized that the mask format I entered was incorrect, not the. PNG or. JPG problem I wrote. The source of the problem may be that CV2. Imread() is loading an empty matrix. Instead of delving into this problem, I will check your input image and mask name and format again. I think this error is a sign that the image cannot be loaded correctly. You need to check your code imread read read problem, whether the file name is correct and whether there is a problem with the file input path. Finally, I changed the way the file path was read
My modification: change the input path in the program parameters to:
The above is my solution to this problem, the correct operation of the modified code.
Read More:
- How to Solve Error: Missing type map configuration or unsupported mapping
- SpringBoot IntegratenRedis Annotations and access error: EL1008E: Property or field ‘getListMember‘ cannot be found on object of type
- [Solved] Opencv3. X fatal error: opencv2/nonfree/nonfree.hpp: there is no such file or directory
- C++ Opencv+BaiDu OCR“error“: “unsupported_grant_type“, “error_description“: “The authorization grant
- How to Solve Error: Unsupported field: HourOfDay
- [Solved] SHELL Run Error: “-BASH: ./TEST.SH: /BIN/BASH^M: BAD INTERPRETER: NO SUCH FILE OR DIRECTORY”
- [Solved] Postman Error: Unsupported Media Type
- [Solved] TypeError: super(type, obj): obj must be an instance or subtype of type
- [Solved] OpenCV Train the class Error: Bad argument & Error: Insufficient memory
- [Solved] VScode Run C++ File Error: fatal error:opencv2\core.hpp:No such file or diretory
- [Solved] The type or namespace name ‘Service’ does not exist Error
- [Solved] Cmake compile opencv open-source project Error: but it set OpenCV_FOUND to FALSE so package “OpenCV” is considered to be…
- [Solved] MindSpore Error: Data type conversion of ‘Parameter’ is not supporte
- .NETproject compilation error. Type or namespace name could not be found. Visual studio automatically introduces dependency package (shortcut key)
- [Solved] Hive 2.3.9 Error: Error: Unrecognized column type: UNIONTYPE (state=,code=0)
- [619]libgtk-3.so.0 or libXt.so.6: cannot open shared object file: No such file or directory
- Abnormal [System.InvalidOperationException: custom type mapping for ‘xxx’ is not specified or is not a solution
- [Solved] sending const NSString * to parameter of type NSString * discards qualifiers
- [Solved] Loadrunner Error: with parameter delimiters is not a parameter.
- flask init-db Error: Error: Could not locate a Flask application. Use the ‘flask –app’ option, ‘FLASK_APP’ environment variable, or a ‘wsgi.py’ or ‘app.py’ file in the current directory.