Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

from image_preprocessing.pipeline import Pipeline 

 

 

class PipelineBuilder: 

""" 

The PipelineBuilder will assemble all the parts of the Pipeline 

""" 

def __init__(self): 

""" 

Initialize Builder 

""" 

self.pipeline = Pipeline() 

 

def set_blur_manager(self, value): 

""" 

This function adds the specified blur manager to the pipeline 

Author(s): 

Nicolai van Niekerk 

Args: 

value (:BlurManager): BlurManager object to be added 

Returns: 

None 

 

""" 

self.pipeline.blur_manager = value 

 

def set_color_manager(self, value): 

""" 

This function adds the specified color manager to the pipeline 

Author(s): 

Nicolai van Niekerk 

Args: 

value (:ColorManager): ColorManager object to be added 

Returns: 

None 

 

""" 

self.pipeline.color_manager = value 

 

def set_threshold_manager(self, value): 

""" 

This function adds the specified threshold manager to the pipeline 

Author(s): 

Nicolai van Niekerk 

Args: 

value (:ThresholdManager): ThresholdManager object to be added 

Returns: 

None 

 

""" 

self.pipeline.threshold_manager = value 

 

def set_face_detector(self, value): 

""" 

This function adds the specified face detector to the pipeline 

Author(s): 

Nicolai van Niekerk 

Args: 

value (:FaceDetector): FaceDetector object to be added 

Returns: 

None 

 

""" 

self.pipeline.face_detector = value 

 

def get_result(self): 

""" 

This function returns the fully-assembled pipeline 

Author(s): 

Nicolai van Niekerk 

Args: 

None 

Returns: 

:Pipeline (Assembled pipeline) 

 

""" 

return self.pipeline