Commit 48bba66df59e1de1dc8094a41232f84d011b6eb9
1 parent
1b075232
Fixed reading in color images from PCSO XML files
Showing
1 changed file
with
1 additions
and
1 deletions
sdk/plugins/format.cpp
| @@ -490,7 +490,7 @@ class xmlFormat : public Format | @@ -490,7 +490,7 @@ class xmlFormat : public Format | ||
| 490 | 490 | ||
| 491 | if (e.tagName() == "FORMAL_IMG") { | 491 | if (e.tagName() == "FORMAL_IMG") { |
| 492 | QByteArray byteArray = QByteArray::fromBase64(qPrintable(e.text())); | 492 | QByteArray byteArray = QByteArray::fromBase64(qPrintable(e.text())); |
| 493 | - Mat m = imdecode(Mat(1, byteArray.size(), CV_8UC1, byteArray.data()), CV_LOAD_IMAGE_ANYDEPTH); | 493 | + Mat m = imdecode(Mat(3, byteArray.size(), CV_8UC3, byteArray.data()), CV_LOAD_IMAGE_COLOR); |
| 494 | if (!m.data) qWarning("xmlFormat::read failed to decode image data."); | 494 | if (!m.data) qWarning("xmlFormat::read failed to decode image data."); |
| 495 | t.append(m); | 495 | t.append(m); |
| 496 | } else if ((e.tagName() == "RELEASE_IMG") || | 496 | } else if ((e.tagName() == "RELEASE_IMG") || |