How to boot the Raspi CAM at startup

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
sjk
Posts: 2
Joined: Wed Nov 03, 2021 9:41 am

How to boot the Raspi CAM at startup

Post by sjk »

Hi,

Earlier we could start the Raspi CAM during booting for certain specific application. What would be the command in DietPi to do this type of CAM start up during boot.
sjk
Posts: 2
Joined: Wed Nov 03, 2021 9:41 am

Re: Python Script for Raspi cam

Post by sjk »

Hi,

If there is anyone who can send a simple python script to start CAM in Dietpi . I have used ONLY RasPi cam python scripts only.

My original python script were as follows.

Code: Select all

from picamera.array import PiRGBArray
from picamera import PiCamera
import time
import cv2

camera = PiCamera()
camera.resolution =(640, 480)
camera.framerate = 32
rawCapture = PiRGBArray(camera, size = (640,480))

time.sleep(0.1)

for frame in camera.capture_continuous(rawCapture, format="bgr", use_video_port=True):
    image = frame.array

    cv2.imshow("Frame",image)
    key = cv2.waitKey(1) & 0xFF

    rawCapture.truncate(0)

    if key == ord("q"):
        break
The above script does not work on DietPi !!

thank you
Post Reply