def _runMetrics(self): height, width = self.cvImage.shape[:2] maxSize = Config.asQSize("imageLoaderThread", "processingSize", QSize(1920, 1080)) scale = 1.0 / max(width / maxSize.width(), height / maxSize.height()) self.cvImage = cv2.resize(self.cvImage, None, fx=scale, fy=scale, interpolation=cv2.INTER_CUBIC) metrics = ImageProcessing.Metrics() #self.cvImage = cv2.cvtColor(self.cvImage, cv2.COLOR_BGR2HSV) #metrics.hist = ImageOperations.normalizedHistogram(self.cvImage[:, :, 2]) self.cvImage = cv2.cvtColor(self.cvImage, cv2.COLOR_BGR2GRAY) metrics.hist, metrics.contrast = ImageOperations.normalizedHistogramAndContrast(self.cvImage) metrics.noise = ImageOperations.noiseMeasure(self.cvImage, Config.get_or("imageLoaderThread", "noiseMedianSize", 3)) metrics.blurSobel = ImageOperations.blurrinessSobel(self.cvImage) metrics.blurLaplace = ImageOperations.blurrinessLaplace(self.cvImage) metrics.blurLaplaceMod = ImageOperations.blurinessLaplaceMod(self.cvImage) self.cvImage = None self.signals.metricsReady.emit(metrics)