(value, frame)
| 131 | |
| 132 | def set_params(name): |
| 133 | def func(value, frame): |
| 134 | global params |
| 135 | global a |
| 136 | params[name] = value |
| 137 | a.set_translations(param2translations(**params)) |
| 138 | if(frame is None): |
| 139 | return None |
| 140 | h, w = frame.shape[:2] |
| 141 | d = int(min(h, w) * cropping) |
| 142 | mh = (h - d) // 2 |
| 143 | mw = (w - d) // 2 |
| 144 | frame = frame[mh:h-mh,mw:w-mw,:] |
| 145 | return a.face_tracker.detect(frame) |
| 146 | |
| 147 | return func |
| 148 |
nothing calls this directly
no test coverage detected