INNER CODE UNIT · C++
threshold_value
royshil/obs-backgroundremoval · src/background-filter.cpp:512
const uint8_t threshold_value = (uint8_t)(tf->threshold * 255.0f);
backgroundMask = outputImage < threshold_value;
} else {
backgroundMask = 255 - outputImage;
}
}
void background_filter_video_tick(void *data, float seconds)
{
UNUSED_PARAMETER(seconds);
// Cast to shared_ptr pointer and create a local shared_ptr
auto *ptr = static_cast<std::shared_ptr<background_removal_filter> *>(data);
if (!ptr) {
return;
}
// Create a local shared_ptr