MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / Load

Method Load

plugins/video/parameter-wrappers.cpp:22–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22bool PatternMatchParameters::Load(obs_data_t *obj)
23{
24 // TODO: Remove this fallback in a future version
25 if (!obs_data_has_user_value(obj, "patternMatchData")) {
26 useForChangedCheck =
27 obs_data_get_bool(obj, "usePatternForChangedCheck");
28 threshold = obs_data_get_double(obj, "threshold");
29 useAlphaAsMask = obs_data_get_bool(obj, "useAlphaAsMask");
30 return true;
31 }
32 auto data = obs_data_get_obj(obj, "patternMatchData");
33 useForChangedCheck = obs_data_get_bool(data, "useForChangedCheck");
34 threshold.Load(data, "threshold");
35 // TODO: Remove this fallback in a future version
36 if (!obs_data_has_user_value(data, "version")) {
37 threshold = obs_data_get_double(data, "threshold");
38 }
39 useAlphaAsMask = obs_data_get_bool(data, "useAlphaAsMask");
40 // TODO: Remove this fallback in a future version
41 if (!obs_data_has_user_value(data, "matchMode")) {
42 matchMode = cv::TM_CCORR_NORMED;
43 } else {
44 matchMode = static_cast<cv::TemplateMatchModes>(
45 obs_data_get_int(data, "matchMode"));
46 }
47 obs_data_release(data);
48 return true;
49}
50
51static std::shared_ptr<cv::CascadeClassifier>
52initObjectCascade(std::string &path)

Callers

nothing calls this directly

Calls 8

isScaleFactorValidFunction · 0.85
isMinNeighborsValidFunction · 0.85
obs_current_moduleFunction · 0.85
GetWeakSourceByNameFunction · 0.85
substrMethod · 0.80
sizeMethod · 0.80
IsFixedTypeMethod · 0.80
SetSourceMethod · 0.45

Tested by

no test coverage detected