Beispiel #1
0
    def __init__(self):
        Thread.__init__(self)
        self.is_dead = "alive"

        self.commande = (1090, 2000)
        self.message = str((-1, -1, -1) + self.commande)
        print('Calibration running...')
        self.newcameramtx, self.roi, self.mtx, self.dist = calibration()
Beispiel #2
0
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 14 10:53:47 2019

@author: Quentin
"""
from calibrate_camera import calibration, undistort
import cv2

if __name__ == "__main__":

    adressCam1 = 'http://*****:*****@169.254.206.22/mjpg/video.mjpg'

    newcameramtx, roi, mtx, dist = calibration()

    cap1 = cv2.VideoCapture()
    cap1.open(adressCam1)

    ret, frame1 = cap1.read()
    if ret:
        frame1 = undistort(frame1, newcameramtx, roi, mtx, dist)
        cv2.imwrite('fondPlot.png', frame1)

    else:
        print("No Cam 1")