Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I take a picture through cvdrone? #53

Open
minng90 opened this issue Jul 14, 2016 · 1 comment
Open

How can I take a picture through cvdrone? #53

minng90 opened this issue Jul 14, 2016 · 1 comment

Comments

@minng90
Copy link

minng90 commented Jul 14, 2016

Hello.
I really appreciate you for offering this sdk.
I want to take a picture which saves in my usb through cvdrone by pressing 'o' (on the keyboard).
How can I do that??
Thank you.

@nikovert
Copy link

cv::Mat image = ardrone.getImage();
cv::imwrite("ardronePic.png", image);

thats for taking the picture, and to have it done when 'o' is pressed:

int key = cv::waitKey(33);
if (key == ‘o'){
    cv::Mat image = ardrone.getImage();
    cv::imwrite("ardronePic.png", image);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants