Package openfoodfacts.github.scrachx.openfood.camera

Types

Link copied to clipboard
class CameraReticleAnimator(graphicOverlay: GraphicOverlay)

Custom animator for the object or barcode reticle in live camera.

Link copied to clipboard
data class CameraSizePair(val previewSize: Camera.Size, val pictureSize: Camera.Size?)

Stores a preview size and a corresponding same-aspect-ratio picture size. To avoid distorted preview images on some devices, the picture size must be set to a size that is the same aspect ratio as the preview size or the preview may end up being distorted. If the picture size is null, then there is no picture size with the same aspect ratio as the preview size.

Link copied to clipboard
class CameraSource(graphicOverlay: GraphicOverlay)

Manages the camera and allows UI updates on top of it (e.g. overlaying extra Graphics). This receives preview frames from the camera at a specified rate, sends those frames to detector as fast as it is able to process.

Link copied to clipboard
class CameraSourcePreview(context: Context, attrs: AttributeSet) : FrameLayout

Preview the camera image in the screen.

Link copied to clipboard
data class FrameMetadata(    val width: Int,     val height: Int,     val rotation: Int)

Metadata info of a camera frame.

Link copied to clipboard
interface FrameProcessor

An interface to process the input camera frame and perform detection on it.

Link copied to clipboard
abstract class FrameProcessorBase<T> : FrameProcessor

Abstract base class of FrameProcessor.

Link copied to clipboard
class GraphicOverlay(context: Context, attrs: AttributeSet) : View

A view which renders custom graphics overlaid on top of an associated preview (i.e., the camera preview).

Link copied to clipboard
class WorkflowModel(application: Application) : AndroidViewModel

View model for handling application workflow based on camera preview.