python - Capture frame with Opencv using BlackMagic card (intensity shuttle) -


i want process videos using blackmagic card. first step capturing frame don't know how it. tried use usual opencv code detect cam , display frames didn't work. know it?

thank you

this code:

i'm recording there, it's ok, that's not main thing want created class able set properties of webcam, don't think right way bmcc

from capture import capture import cv2 import os src import improcess   # video recorder   capture = cv2.videocapture(1)  cap = capture(capture) fourcc = cv2.cv.cv_fourcc(*'msvc')  # cv2.videowriter_fourcc() not exist video_writer = cv2.videowriter("c:\users\syllia\videos\output3.avi", fourcc, 30.0, (640, 480))  = 0 cap.set_brightness(25)  while(capture.isopened()):     # capture frame-by-frame      ret, frame = cap.cap.read()     gray = cv2.cvtcolor(frame, cv2.color_bgr2gray)     if(i==120):           cap.adjust_brightness(100, frame)     if >= 240 , i<360:         frame = improcess.binarize(170, frame)      if i>360:         frame = gray       video_writer.write(frame)     cv2.imshow('frame',frame)     = i+1      if cv2.waitkey(1) & 0xff == ord('q'):         break  # when done, release capture video_writer.release() capture.release() cv2.destroyallwindows() 

the opencv video capture functionality not support blackmagic devices (probably). use blackmagic decklink sdk capturing blackmagic cameras. can find , download @ blackmagic support site: blackmagic design support.

please note not support python nor opencv interfacing there c++ cross-platform examples including windows mfc ones. further note (color) pixel formats not same opencv if recall correctly: need convert them yourselves if want further image processing.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -