Workflow_FrameSource_CameraDevice sample details
Workflow_FrameSource_CameraDevice is a sample scene focused on low-level control of the frame input source (Frame Source). It shows how to use CameraDeviceFrameSource to obtain the raw camera image stream and perform some basic controls.
Usage
1. Open the scene
In Unity Editor, open the Workflow_FrameSource_CameraDevice scene located in the Assets/ directory.
2. Build and run
- Click Play in the editor to view the effect on PC (some features are limited).
- You must build to a real device to fully experience the basic camera control capabilities.
After the app starts, the rear camera is opened automatically.
Expected effect
When the camera points at the surrounding environment:
- The real-time camera image is displayed on the screen.
- A 3D animated panda model is rendered at this time.
- The UI displays the current camera status (such as resolution and FPS).
- Click the
Loop Sizebutton to switch the output frame resolution supported by the current camera. - Click the
Flash Torchbutton to turn off/on the flash. - Click
HorizontalFlipto switch the mirrored display of the current image. - Click
CaptureIamgeto switch whether the model captures the current environment image as its own texture. - Click
CameraImageto switch whether the current camera image is displayed. - Click
Camerato turn off/on the current camera. After it is turned off, the image remains in the state before it was turned off. - Dynamically switch between the front/rear camera with the
NextCamerabutton.
Tip
For more FrameSource details, see:
Through Workflow_FrameSource_CameraDevice, you can gain a deeper understanding of EasyAR's ability to control low-level camera resources, laying a solid foundation for building high-performance and highly customized AR applications.