PiCamera и непрерывный захват с питоном и малиной пи

сначала вам нужно изменить стерилизацию на сериализацию.

function formSubmit(){
    $.ajax({
      type: 'POST',
      url: '../server/insert_tests.php',
      data: $('#frmBox').sterialize(),
      success: function(response){
        $('#success').html(response);

      }

    });
    var form = document.getElementById('frmBox').reset();
    return false;
  }

-

function formSubmit(){
    $.ajax({
      type: 'POST',
      url: '../server/insert_tests.php',
      data: $('#frmBox').serialize(),
      success: function(response){
        $('#success').html(response);

      }

    });
    var form = document.getElementById('frmBox').reset();
    return false;
  }
0
задан Pang 21 January 2019 в 01:01
поделиться

1 ответ

Я полагаю, вы ищете capture_continuous.

Вот общий процесс:

  • Импорт необходимых пакетов
  • Пауза, чтобы позволить камере прогреться
  • Итерация по кадрам камеры 1111]
  • Захват и отображение кадра
    from picamera.array import PiRGBArray
    from picamera import PiCamera
    import time
    import cv2
    
    # initialize the camera and grab a reference to the raw camera capture
    camera = PiCamera()
    camera.resolution = (640, 480)
    camera.framerate = 32
    rawCapture = PiRGBArray(camera, size=(640, 480))
    
    # allow the camera to warmup
    time.sleep(0.1)
    
    # capture frames from the camera
    for frame in camera.capture_continuous(rawCapture, format="bgr", use_video_port=True):
        image = frame.array
    
        # show the frame
        cv2.imshow("Frame", image)
        key = cv2.waitKey(1) & 0xFF
    
        # clear the stream in preparation for the next frame
        rawCapture.truncate(0)
    
        # if the `q` key was pressed, break from the loop
        if key == ord("q"):
            break
    
0
ответ дан BeardedDork 21 January 2019 в 01:01
поделиться
Другие вопросы по тегам:

Похожие вопросы: