Version: stable
FUNCTIONS | |
---|---|
camera.start_capture() | |
camera.stop_capture() | |
camera.get_info() | |
camera.get_frame() |
camera.start_capture()
Start camera capture using the specified camera (front/back) and capture quality. This may trigger a camera usage permission popup. When the popup has been dismissed the callback will be invoked with camera start status.
PARAMETERS
None
EXAMPLES
camera.start_capture(camera.CAMERA_TYPE_BACK, camera.CAPTURE_QUALITY_HIGH, function(self, message)
if message == camera.CAMERA_STARTED then
-- do stuff
end
end)
camera.stop_capture()
Stops a previously started capture session.
PARAMETERS
None
EXAMPLES
camera.stop_capture()
camera.get_info()
Gets the info from the current capture session.
PARAMETERS
None
EXAMPLES
local info = camera.get_info()
print("width", info.width)
print("height", info.height)
camera.get_frame()
Get captured frame.
PARAMETERS
None
EXAMPLES
self.cameraframe = camera.get_frame()