three.MF.V3.Settings.Projector
1from MF.V3.Settings.Rectangle import Rectangle as MF_V3_Settings_Rectangle_Rectangle 2from MF.V3.Settings.Video import Video as MF_V3_Settings_Video_Video 3from enum import Enum 4from typing import List 5 6 7class Projector: 8 9 """ 10 Projector settings. 11 """ 12 class Orientation(Enum): 13 14 """ 15 Pattern orientation. 16 """ 17 Horizontal = "Horizontal" # Horizontal pattern. Image columns are identical. 18 Vertical = "Vertical" # Vertical pattern. Image rows are identical. 19 20 class Pattern: 21 22 """ 23 Structured light pattern. 24 """ 25 def __init__(self, orientation: 'Projector.Orientation', frequency: int, phase: int): 26 # Pattern orientation. 27 self.orientation = orientation 28 # Pattern frequency index. [0 - 8] 29 self.frequency = frequency 30 # Pattern phase. [0 - 2] 31 self.phase = phase 32 33 class Image: 34 35 """ 36 Projector image settings 37 """ 38 class Source: 39 40 """ 41 Image source. 42 """ 43 def __init__(self, format: MF_V3_Settings_Video_Video.Format, width: int, height: int, step: int, fixAspectRatio: bool): 44 # Source image format 45 self.format = format 46 # Source image width. 47 self.width = width 48 # Source image height. 49 self.height = height 50 # Source image step in bytes. 51 self.step = step 52 # Fix the source aspect ratio to the target rectangle. 53 self.fixAspectRatio = fixAspectRatio 54 55 def __init__(self, source: 'Source', target: MF_V3_Settings_Rectangle_Rectangle): 56 # Image source. 57 self.source = source 58 # Image target rectangle. 59 self.target = target 60 61 def __init__(self, on: bool = None, brightness: float = None, pattern: 'Pattern' = None, image: 'Image' = None, color: List[float] = None): 62 # Projector on/off. 63 self.on = on 64 # Projector brightness. 65 self.brightness = brightness 66 # Structured light pattern. 67 self.pattern = pattern 68 # Image to project 69 self.image = image 70 # Solid color 71 self.color = color
class
Projector:
8class Projector: 9 10 """ 11 Projector settings. 12 """ 13 class Orientation(Enum): 14 15 """ 16 Pattern orientation. 17 """ 18 Horizontal = "Horizontal" # Horizontal pattern. Image columns are identical. 19 Vertical = "Vertical" # Vertical pattern. Image rows are identical. 20 21 class Pattern: 22 23 """ 24 Structured light pattern. 25 """ 26 def __init__(self, orientation: 'Projector.Orientation', frequency: int, phase: int): 27 # Pattern orientation. 28 self.orientation = orientation 29 # Pattern frequency index. [0 - 8] 30 self.frequency = frequency 31 # Pattern phase. [0 - 2] 32 self.phase = phase 33 34 class Image: 35 36 """ 37 Projector image settings 38 """ 39 class Source: 40 41 """ 42 Image source. 43 """ 44 def __init__(self, format: MF_V3_Settings_Video_Video.Format, width: int, height: int, step: int, fixAspectRatio: bool): 45 # Source image format 46 self.format = format 47 # Source image width. 48 self.width = width 49 # Source image height. 50 self.height = height 51 # Source image step in bytes. 52 self.step = step 53 # Fix the source aspect ratio to the target rectangle. 54 self.fixAspectRatio = fixAspectRatio 55 56 def __init__(self, source: 'Source', target: MF_V3_Settings_Rectangle_Rectangle): 57 # Image source. 58 self.source = source 59 # Image target rectangle. 60 self.target = target 61 62 def __init__(self, on: bool = None, brightness: float = None, pattern: 'Pattern' = None, image: 'Image' = None, color: List[float] = None): 63 # Projector on/off. 64 self.on = on 65 # Projector brightness. 66 self.brightness = brightness 67 # Structured light pattern. 68 self.pattern = pattern 69 # Image to project 70 self.image = image 71 # Solid color 72 self.color = color
Projector settings.
Projector( on: bool = None, brightness: float = None, pattern: Projector.Pattern = None, image: Projector.Image = None, color: List[float] = None)
62 def __init__(self, on: bool = None, brightness: float = None, pattern: 'Pattern' = None, image: 'Image' = None, color: List[float] = None): 63 # Projector on/off. 64 self.on = on 65 # Projector brightness. 66 self.brightness = brightness 67 # Structured light pattern. 68 self.pattern = pattern 69 # Image to project 70 self.image = image 71 # Solid color 72 self.color = color
class
Projector.Orientation(enum.Enum):
13 class Orientation(Enum): 14 15 """ 16 Pattern orientation. 17 """ 18 Horizontal = "Horizontal" # Horizontal pattern. Image columns are identical. 19 Vertical = "Vertical" # Vertical pattern. Image rows are identical.
Pattern orientation.
class
Projector.Pattern:
21 class Pattern: 22 23 """ 24 Structured light pattern. 25 """ 26 def __init__(self, orientation: 'Projector.Orientation', frequency: int, phase: int): 27 # Pattern orientation. 28 self.orientation = orientation 29 # Pattern frequency index. [0 - 8] 30 self.frequency = frequency 31 # Pattern phase. [0 - 2] 32 self.phase = phase
Structured light pattern.
Projector.Pattern( orientation: Projector.Orientation, frequency: int, phase: int)
class
Projector.Image:
34 class Image: 35 36 """ 37 Projector image settings 38 """ 39 class Source: 40 41 """ 42 Image source. 43 """ 44 def __init__(self, format: MF_V3_Settings_Video_Video.Format, width: int, height: int, step: int, fixAspectRatio: bool): 45 # Source image format 46 self.format = format 47 # Source image width. 48 self.width = width 49 # Source image height. 50 self.height = height 51 # Source image step in bytes. 52 self.step = step 53 # Fix the source aspect ratio to the target rectangle. 54 self.fixAspectRatio = fixAspectRatio 55 56 def __init__(self, source: 'Source', target: MF_V3_Settings_Rectangle_Rectangle): 57 # Image source. 58 self.source = source 59 # Image target rectangle. 60 self.target = target
Projector image settings
Projector.Image( source: Projector.Image.Source, target: MF.V3.Settings.Rectangle.Rectangle)
class
Projector.Image.Source:
39 class Source: 40 41 """ 42 Image source. 43 """ 44 def __init__(self, format: MF_V3_Settings_Video_Video.Format, width: int, height: int, step: int, fixAspectRatio: bool): 45 # Source image format 46 self.format = format 47 # Source image width. 48 self.width = width 49 # Source image height. 50 self.height = height 51 # Source image step in bytes. 52 self.step = step 53 # Fix the source aspect ratio to the target rectangle. 54 self.fixAspectRatio = fixAspectRatio
Image source.
Projector.Image.Source( format: MF.V3.Settings.Video.Video.Format, width: int, height: int, step: int, fixAspectRatio: bool)
44 def __init__(self, format: MF_V3_Settings_Video_Video.Format, width: int, height: int, step: int, fixAspectRatio: bool): 45 # Source image format 46 self.format = format 47 # Source image width. 48 self.width = width 49 # Source image height. 50 self.height = height 51 # Source image step in bytes. 52 self.step = step 53 # Fix the source aspect ratio to the target rectangle. 54 self.fixAspectRatio = fixAspectRatio