Commit 4c9533be7bb05a54858b3a99eb59ac6b6e8de08b
1 parent
e74469ab
tweaks for extracting metadata
Showing
2 changed files
with
2 additions
and
0 deletions
openbr/plugins/misc.cpp
| @@ -106,6 +106,7 @@ private: | @@ -106,6 +106,7 @@ private: | ||
| 106 | { | 106 | { |
| 107 | dst.file = src.file; | 107 | dst.file = src.file; |
| 108 | QString url = src.file.get<QString>("URL", src.file.name).simplified(); | 108 | QString url = src.file.get<QString>("URL", src.file.name).simplified(); |
| 109 | + dst.file.set("URL", url); | ||
| 109 | if (url.startsWith("file://")) | 110 | if (url.startsWith("file://")) |
| 110 | url = url.mid(7); | 111 | url = url.mid(7); |
| 111 | 112 |
openbr/plugins/template.cpp
| @@ -109,6 +109,7 @@ class JSONTransform : public UntrainableMetaTransform | @@ -109,6 +109,7 @@ class JSONTransform : public UntrainableMetaTransform | ||
| 109 | dst.file = src.file; | 109 | dst.file = src.file; |
| 110 | const QByteArray json = QJsonDocument(QJsonObject::fromVariantMap(src.file.localMetadata())).toJson(); | 110 | const QByteArray json = QJsonDocument(QJsonObject::fromVariantMap(src.file.localMetadata())).toJson(); |
| 111 | dst += cv::Mat(1, json.size(), CV_8UC1, (void*) json.data()); | 111 | dst += cv::Mat(1, json.size(), CV_8UC1, (void*) json.data()); |
| 112 | + dst.file.set("AlgorithmID", 2); | ||
| 112 | } | 113 | } |
| 113 | }; | 114 | }; |
| 114 | 115 |