Version: stable
FUNCTION | |
---|---|
start_capture() | |
stop_capture() | |
get_info() | |
get_frame() |
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)
stop_capture()
Stops a previously started capture session.
PARAMETERS
None
EXAMPLES
camera.stop_capture()
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)
get_frame()
Get captured frame.
PARAMETERS
None
EXAMPLES
self.cameraframe = camera.get_frame()