From acdcf203927d51db04cb2a14328725fa678fe073 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Tue, 16 Mar 2021 16:39:02 +0300 Subject: [PATCH] docs: remove unneeded trailing spaces and fix a typo --- docs/en/agriculture.md | 6 +++--- docs/ru/agriculture.md | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/en/agriculture.md b/docs/en/agriculture.md index ae331024..43ea5dd1 100644 --- a/docs/en/agriculture.md +++ b/docs/en/agriculture.md @@ -40,7 +40,7 @@ def image_colback_color(data): global color, shape cv_image = bridge.imgmsg_to_cv2(data, 'bgr8') # OpenCV image - img_hsv = cv2.cvtColor(cv_image, cv2.COLOR_BGR2HSV) #[118:119,158:159] + img_hsv = cv2.cvtColor(cv_image, cv2.COLOR_BGR2HSV) #[118:119,158:159] #detected color #print(img_hsv[0][0]) @@ -80,7 +80,7 @@ if shape = 'brown': if shape = 'yellow_orange': culture = "pshenitsa" -image_sub = rospy.Subscriber('main_camera/image_raw', Image, image_colback_color) +image_sub = rospy.Subscriber('main_camera/image_raw', Image, image_colback_color) ``` The script will take up to 100% CPU capacity. To slow down the script artificially, you can use throttling of frames from the camera, for example, at 5 Hz (`main_camera.launch`): @@ -141,7 +141,7 @@ violet_low = (143, 150, 150) violet_high = (157, 255, 255) red_violet_low = (158, 150, 150) -red_violet_hugh = (171, 255, 255) +red_violet_hugh = (171, 255, 255) ``` Note that there are two ranges for red because red is at the edges of the HSV color space. diff --git a/docs/ru/agriculture.md b/docs/ru/agriculture.md index cd97981a..74f4f0f5 100644 --- a/docs/ru/agriculture.md +++ b/docs/ru/agriculture.md @@ -73,7 +73,7 @@ elif brown_mask[119][159] == 255: else: shape = 'undefined' - color = 'undefined' + color = 'undefined' if shape = 'brown': culture = "greshiha" @@ -96,10 +96,10 @@ print (culture) while not rospy.is_shutdown(): print("color: {}".format(color)) print("shape: {}".format(shape)) - rospy.sleep(0.2) + rospy.sleep(0.2) ``` -Данная программа будет определять культуру по её оттенку. Для повышения точности определения можно использовать больше цветовых диапазонов и дрон сможет распознавать большее колличество культур. +Данная программа будет определять культуру по её оттенку. Для повышения точности определения можно использовать больше цветовых диапазонов и дрон сможет распознавать большее количество культур. Вот примеры цветовых диапазонов: @@ -141,7 +141,7 @@ violet_low = (143, 150, 150) violet_high = (157, 255, 255) red_violet_low = (158, 150, 150) -red_violet_hugh = (171, 255, 255) +red_violet_hugh = (171, 255, 255) ``` Обратите внимание, что для красного цвета используется два диапазона т. к. красный цвет находится на границах цветового пространства HSV.