Skip to content
Advertisement

Tag: qpixmap

PyQt5: Python crashes with SIGSEGV *sometimes* when sending pixmap via a signal from another thread

Background and Issue I am trying to process streaming data from a camera. Python keeps crashing with this message though: The crash happens sometimes while emitting the signal containing an image. My code, shown below, follows this process: A QObject named CameraThread is instantiated within the GUI and is run by a QThread. CameraThread instantiates a class IngestManager and gives

Display an image in a label without saving it

The following lines are in my script: from PyQt5 import QtGui, QtWidgets, QtCore from PyQt5.QtGui import QIcon, QPixmap from PyQt5.Widgets import * import cv2 def positioningCross(Dy, Dx, center, imgCross): if(center[1,0]>=center[0,0]): Dy2 = center[0,0] + np.absolute(Dy) else: Dy2 = center[1,0] + np.absolute(Dy) if(center[0,1]>=center[1,1]): Dx2 = center[1,1] + np.absolute(Dx)/2 else: Dx2 = center[0,1] + np.absolute(Dx)/2 P1 = (center[0,1]/2,center[0,0]/2) P2 = (center[1,1]/2,center[1,0]/2) P3

Advertisement