(self)
| 128 | return edges |
| 129 | |
| 130 | def discern(self): |
| 131 | img1 = self.clear_white(self.gap) |
| 132 | img1 = cv2.cvtColor(img1, cv2.COLOR_RGB2GRAY) |
| 133 | slide = self.image_edge_detection(img1) |
| 134 | |
| 135 | back = cv2.imread(self.bg, cv2.COLOR_RGB2GRAY) |
| 136 | back = self.image_edge_detection(back) |
| 137 | |
| 138 | slide_pic = cv2.cvtColor(slide, cv2.COLOR_GRAY2RGB) |
| 139 | back_pic = cv2.cvtColor(back, cv2.COLOR_GRAY2RGB) |
| 140 | x = self.template_match(slide_pic, back_pic) |
| 141 | # Output x-coordinate, i.e., slider position on image |
| 142 | return x |
| 143 | |
| 144 | |
| 145 | def get_track_simple(distance) -> List[int]: |
no test coverage detected