SHARE
TWEET

Untitled

a guest Jun 16th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. self.VideoSignal2.emit(qt_image2)
  2.      
  3. def paintEvent(self, event):
  4.     painter = QtGui.QPainter(self)
  5.     painter.drawImage(0, 0, self.image)
  6.     self.image = QtGui.QImage()
  7.  
  8. def initUI(self):
  9.     self.setWindowTitle('viwer')
  10.  
  11. @QtCore.pyqtSlot(QtGui.QImage)
  12. def setImage(self, image):
  13.     if image.isNull():
  14.         print("no comera!")
  15.  
  16.     self.image = image
  17.     if image.size() != self.size():        
  18.         self.setFixedSize(image.size())
  19.     self.update()
  20.      
  21. thread = QtCore.QThread()
  22. thread.start()
  23. vid = ShowVideo()
  24. vid.moveToThread(thread)
  25.  
  26. image_viewer1 = ImageViewer()
  27. image_viewer2 = ImageViewer()
  28. vid.VideoSignal1.connect(image_viewer1.setImage)
  29. vid.VideoSignal2.connect(image_viewer2.setImage)
  30.  
  31. push_button1 = QtWidgets.QPushButton('Start')
  32. push_button1.clicked.connect(vid.startVideo)
  33.      
  34. temp = cv2.accumulateWeighted(input_vid,output_vid,1/(power+1))
  35. run_avg_video = cv2.convertScaleAbs(temp)
  36. return run_avg_video
  37.      
  38. cv2.imshow('gray',raw_out)
  39.             cv2.imshow('color_lsci_image',color_lsci)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top