mirror of
https://github.com/sipeed/MaixCDK.git
synced 2026-11-09 17:04:38 -06:00
* fix png bug
This commit is contained in:
@@ -142,6 +142,10 @@ namespace maix::image
|
||||
else
|
||||
{
|
||||
mat = cv::imread(path, cv::IMREAD_UNCHANGED);
|
||||
if (mat.depth() != 0) {
|
||||
mat.convertTo(mat, CV_8UC(mat.channels()), 1.0 / 256.0);
|
||||
}
|
||||
|
||||
if (mat.empty())
|
||||
return nullptr;
|
||||
if (mat.channels() == 1)
|
||||
|
||||
Reference in New Issue
Block a user