There are currently two modes – taking single shot photographs; and using the camera app.
The single shot photo mode is perfect for a quick selfie or photograph. It shows a live view of the camera feed, counts down from 5, takes the photo, and saves it in your device’s Pictures directory.
The Camera app gives you more time to frame your photo, and adds a zoom slider so you can get a nice close up shot. When you’re ready, tell Mycroft to take the photo or tap the shutter button on screen.
The camera module in the Mark II Dev Kit is a 5MP camera capable of 2592 x 1944 pixel static images, and video at 1080p30, 720p60 and 640x480p60/90. Currently, it is software limited to low-resolution while we ensure that higher resolution images won’t cause issues with memory allocations.
Imagine: for your next Skill you want to let the user add a profile picture by taking a selfie. Rather than implementing your own camera functionality, you can let the Camera Skill take care of that for you through it’s publicly declared API.
There are currently two methods exposed on the Camera Skill’s API.
To use either of these in a new Skill requires just 3 lines of code.
First we import the SkillApi class:
from mycroft.skills.api import SkillApi
Then we get the correct API based off the Skill ID:
camera = SkillApi.get(‘skill-camera.mycroftai’)
Finally, we can call any method that is made available by that Skill:
We’ll cover the new Skill API in more detail in an upcoming post, but if you want to try it out today checkout the Skill API documentation.
Gez is the Director of Developer Relations at Mycroft. He comes from the land down under, has a strange love of crocodiles, and one day hopes to play the ukulele. If he’s not hanging out in our Community Chat and Forums, he is probably getting lost in the bush.