INNER CODE UNIT · C++

temporalSmoothFactor

royshil/obs-backgroundremoval · src/background-filter.cpp:607

				float temporalSmoothFactor = tf->temporalSmoothFactor;
				if (tf->enableThreshold) {
					// The temporal smooth factor can't be smaller than the threshold
					temporalSmoothFactor = std::max(temporalSmoothFactor, tf->threshold);
				}

				cv::addWeighted(backgroundMask, temporalSmoothFactor, tf->lastBackgroundMask,
						1.0 - temporalSmoothFactor, 0.0, backgroundMask);
			}

			tf->lastBackgroundMask = backgroundMask.clone();

			// Contour processing
			// Only applicable if we are thresholding (and get a binary image)
			if (tf->enableThreshold) {
				if (tf->contourFilter > 0.0 && tf->contourFilter < 1.0) {
					std::vector<std::vector<cv::Point>> contours;
					findContours(backgroundMask, contours, cv::RETR_EXTERNAL,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…