Create new camera class which contains each input camera N times. Args: N: number of new copies of each camera. Returns: MMCamerasBase object.
(self, N)
| 219 | device=self.device) |
| 220 | |
| 221 | def extend(self, N) -> 'MMCamerasBase': |
| 222 | """Create new camera class which contains each input camera N times. |
| 223 | |
| 224 | Args: |
| 225 | N: number of new copies of each camera. |
| 226 | |
| 227 | Returns: |
| 228 | MMCamerasBase object. |
| 229 | """ |
| 230 | return self.__class__(K=self.K.repeat(N, 1, 1), |
| 231 | R=self.R.repeat(N, 1, 1), |
| 232 | T=self.T.repeat(N, 1), |
| 233 | image_size=self.get_image_size(), |
| 234 | in_ndc=self.in_ndc(), |
| 235 | convention='pytorch3d', |
| 236 | device=self.device) |
| 237 | |
| 238 | def extend_(self, N): |
| 239 | """extend camera inplace.""" |