Skip to content
Snippets Groups Projects
Commit 2307d668 authored by johni's avatar johni
Browse files

saved image shows name

parent 214161d8
No related branches found
No related tags found
1 merge request!4Saving features
...@@ -58,7 +58,7 @@ int main() { ...@@ -58,7 +58,7 @@ int main() {
while (true) { while (true) {
Mat picture_with_text = picture.clone(); Mat picture_with_text = picture.clone();
putText(picture_with_text, "Press 's' to save", Point2f(375,100), FONT_HERSHEY_SIMPLEX, 2.0, Scalar(255,0,0,0), 3); putText(picture_with_text, "Press 's' to save", Point2f(375,100), FONT_HERSHEY_SIMPLEX, 2.0, Scalar(255,0,0,0), 3);
putText(picture_with_text, "Press ESC/Spacebar to return", Point2f(160,600), FONT_HERSHEY_SIMPLEX, 2.0, Scalar(0,0,255,255), 3); putText(picture_with_text, "Press ESC/Spacebar to return", Point2f(160,600), FONT_HERSHEY_SIMPLEX, 2.0, Scalar(0,0,255), 3);
imshow("Webcam", picture_with_text); imshow("Webcam", picture_with_text);
...@@ -77,7 +77,7 @@ int main() { ...@@ -77,7 +77,7 @@ int main() {
Point org; Point org;
org.x = 15; org.x = 15;
org.y = 100; org.y = 100;
putText(picture, name, org, FONT_HERSHEY_SIMPLEX, 2, Scalar(0, 0, 255), 3, 8); putText(picture, name, org, FONT_HERSHEY_SIMPLEX, 2, Scalar(0, 0, 255), 3);
bool maybe = imwrite(directory, picture); bool maybe = imwrite(directory, picture);
cout << "s was pressed. saving image, success: " << maybe << endl; cout << "s was pressed. saving image, success: " << maybe << endl;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment