Skip to content

feat: add camera module component (CSI, libcamera, photo + video) - #485

Open
sakshar2303 wants to merge 2 commits into
oss-slu:developfrom
sakshar2303:feature/camera-component
Open

feat: add camera module component (CSI, libcamera, photo + video)#485
sakshar2303 wants to merge 2 commits into
oss-slu:developfrom
sakshar2303:feature/camera-component

Conversation

@sakshar2303

Copy link
Copy Markdown
Contributor

Summary

Closes #371

What's Added

Helper Class

  • CameraHelper.java in pi4micronaut-utils/src/main/java/com/opensourcewithslu/inputdevices/
  • Wraps libcamera-still and libcamera-vid via Java ProcessBuilder
  • Supports 1080p@30fps, 720p@60fps, 480p@60/90fps
  • Methods: initialize(), capturePhoto(), startVideoCapture(),
    stopVideoCapture(), setResolution(), setFrameRate(), cleanup()
  • Full SLF4J logging and graceful error handling

Controller Class

  • CameraController.java in components/src/main/java/com/opensourcewithslu/components/controllers/
  • REST endpoints: /camera/capture, /camera/startVideo,
    /camera/stopVideo, /camera/setResolution, /camera/setFrameRate,
    /camera/status

Configuration

  • Added camera: block to application.yml with resolution and
    frame-rate settings

Tests

  • CameraHelperTest.java in pi4micronaut-utils/src/test/java/com/opensourcewithslu/inputdevices/
  • 25 JUnit Jupiter tests covering initialization, configuration,
    error paths, edge cases and state validation

Documentation

  • camera.adoc in pi4micronaut-utils/src/docs/asciidoc/components/inputComponents/
  • Includes component overview, assembly instructions, circuit and
    schematic diagrams, YAML config, API usage examples, troubleshooting
    guide and dynamically linked example controller

@sakshar2303

Copy link
Copy Markdown
Contributor Author

I have implemented the camera module component in here ,

Here's what was done:

  • CameraHelper.java — wraps libcamera-still and libcamera-vid via
    Java ProcessBuilder. Supports 1080p@30fps, 720p@60fps, 480p@60/90fps
    with full error handling and SLF4J logging
  • CameraController.java — REST endpoints for capture, startVideo,
    stopVideo, setResolution, setFrameRate and status
  • application.yml — added camera config block (resolution + frame-rate)
  • CameraHelperTest.java — 25 JUnit Jupiter tests covering all methods,
    error paths and edge cases
  • camera.adoc — full documentation with assembly instructions, circuit
    diagram, YAML config, API examples and troubleshooting guide .

Please review and merge .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Camera Support

2 participants