MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / to_screen_

Method to_screen_

detrsmpl/core/cameras/cameras.py:260–272  ·  view source on GitHub ↗

Convert to screen inplace.

(self, **kwargs)

Source from the content-addressed store, hash-verified

258 raise NotImplementedError()
259
260 def to_screen_(self, **kwargs) -> 'MMCamerasBase':
261 """Convert to screen inplace."""
262 if self.in_ndc():
263 if self.get_image_size() is None:
264 self.image_size = kwargs.get('image_size')
265 else:
266 self.image_size = self.get_image_size()
267 self.K = convert_ndc_to_screen(K=self.K,
268 resolution=self.image_size,
269 is_perspective=self._is_perspective)
270 self._in_ndc = False
271 else:
272 print('Redundant operation, already in screen.')
273
274 def to_ndc_(self, **kwargs) -> 'MMCamerasBase':
275 """Convert to ndc inplace."""

Callers

nothing calls this directly

Calls 5

get_image_sizeMethod · 0.95
convert_ndc_to_screenFunction · 0.90
in_ndcMethod · 0.80
printFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected