We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cd2aab0 + 99f9984 commit ab1a9e2Copy full SHA for ab1a9e2
src/main.cpp
@@ -145,7 +145,27 @@ int main( int argc, const char** argv )
145
{
146
std::string filename = filenames[i];
147
148
- if (filename == "stdin")
+ if (filename == "-")
149
+ {
150
+ std::vector<uchar> data;
151
+ int c;
152
+
153
+ while ((c = fgetc(stdin)) != EOF)
154
155
+ data.push_back((uchar) c);
156
+ }
157
158
+ frame = cv::imdecode(cv::Mat(data), 1);
159
+ if (!frame.empty())
160
161
+ detectandshow(&alpr, frame, "", outputJson);
162
163
+ else
164
165
+ std::cerr << "Image invalid: " << filename << std::endl;
166
167
168
+ else if (filename == "stdin")
169
170
std::string filename;
171
while (std::getline(std::cin, filename))
0 commit comments