Skip to content

Commit

Permalink
modified parking
Browse files Browse the repository at this point in the history
  • Loading branch information
kijongGil committed Jun 29, 2018
1 parent 78049af commit ba6b314
Showing 1 changed file with 1 addition and 32 deletions.
33 changes: 1 addition & 32 deletions turtlebot3_autorace_detect/nodes/detect_parking
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class DetectParking():

det = cv2.SimpleBlobDetector_create(params)
keypts = det.detect(self.cv_bitn_img)
frame = cv2.drawKeypoints(self.cv_bitn_img, keypts, np.array([]), (0, 0, 255), cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)
# frame = cv2.drawKeypoints(self.cv_bitn_img, keypts, np.array([]), (0, 0, 255), cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)

count = 0
for i in range(len(keypts)):
Expand All @@ -231,37 +231,6 @@ class DetectParking():
if self.blink_count % 8 == 0:
self.blink_trigger = 1 - self.blink_trigger
self.blink_count = 0
'''
if self.is_parking_allowed == False:
if self.blink_trigger == 1:
x_offset = 874
y_offset = 0
y1, y2 = y_offset, y_offset + self.img1.shape[0]
x1, x2 = x_offset, x_offset + self.img1.shape[1]
alpha_s = self.img1[:, :, 3] / 255.0
alpha_l = 1.0 - alpha_s
for c in range(0, 3):
self.cv_image[y1:y2, x1:x2, c] = (alpha_s * self.img1[:, :, c] +
alpha_l * self.cv_image[y1:y2, x1:x2, c])
else:
if self.blink_trigger == 1:
x_offset = 874
y_offset = 0
y1, y2 = y_offset, y_offset + self.img2.shape[0]
x1, x2 = x_offset, x_offset + self.img2.shape[1]
alpha_s = self.img2[:, :, 3] / 255.0
alpha_l = 1.0 - alpha_s
for c in range(0, 3):
self.cv_image[y1:y2, x1:x2, c] = (alpha_s * self.img2[:, :, c] +
alpha_l * self.cv_image[y1:y2, x1:x2, c])
'''

def main(self):
rospy.spin()
Expand Down

0 comments on commit ba6b314

Please sign in to comment.