Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lepton Camera Video #51

Open
wants to merge 209 commits into
base: master
Choose a base branch
from
Open

Lepton Camera Video #51

wants to merge 209 commits into from

Conversation

Smartgalpj
Copy link

Hi,

I am using python code to record the video from Lepton Camera. In Lepton User App, video is good, while using python code, video is having flairs. I am sending you the code. Video output of this code is also attached in here. Please help me. It is very urgent.

Script below:

from import_clr import *
from moviepy.editor import VideoFileClip, concatenate_videoclips
clr.AddReference("ManagedIR16Filters")
clr.AddReference("TIFFfile")
clr.AddReference("LeptonUVC")
from flirpy.camera.lepton import Lepton
import cv2
from Lepton import CCI
from IR16Filters import IR16Capture, NewIR16FrameEvent, NewBytesFrameEvent
from System.Drawing import ImageConverter
from System import Array, Byte
import matplotlib
from matplotlib import pyplot as plt
from matplotlib import cm
import numpy
import time
from PIL import Image
import matplotlib

frame0 = cv2.VideoCapture(0)
frame0.set(3, 160)
frame0.set(4, 120)

frame1 = cv2.VideoCapture(2)

frame1.set(3, 160)

frame1.set(4, 120)

while 1:

ret0, img0 = frame0.read()
#ret1, img00 = frame1.read()

if ret0:
    cv2.imshow("lepton", cv2.resize(img0, (160, 120)))
#if ret1:
    #cv2.imshow("lepton2", cv2.resize(img00, (160, 120)))
if cv2.waitKey(1) & 0xFF == ord('q'):
    break

frame0.release()
#frame1.release()
cv2.destroyAllWindows()

output__0.mp4

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.

4 participants