Mobile body and guiding line detection apparatus
The induction line detection device enhances guiding line detection stability by converting captured images into grayscale with parameters set for the guiding line's reference color, addressing issues with lighting changes and luminance differences.
Patent Information
- Application Number
- JP2023196719
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-11-20
- Publication Date
- 2025-05-30
AI Technical Summary
Existing guiding line detection systems struggle to stably detect guiding lines on floor surfaces due to changes in lighting conditions, especially during transitions from indoors to outdoors, and when the luminance difference between the guiding line and its surroundings is small.
An induction line detection device that includes an image acquisition unit, an image conversion unit, a setting unit, and a grayscale conversion unit. The device converts captured images into grayscale, enhancing the difference between the guiding line and its surroundings by setting parameters related to the reference color of the guiding line, allowing for more stable detection.
The system achieves more stable detection of guiding lines at the start and during movement, effectively coping with changes in lighting and appearance of the guiding line, ensuring reliable movement control.
Smart Images

Figure 2025083055000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a guiding line detection device that detects a visually recognizable guiding line provided on a floor surface, and a moving body that moves using the detected guiding line.
Background Art
[0002] Conventionally, in factories and the like, it has been practiced to detect a guiding line provided on the floor surface and move a moving body along the detected guiding line. As a related technique, it has been practiced to calculate the luminance gradient vector of a photographed image of a road and detect a lane line on the road using the luminance gradient vector (see, for example, Patent Document 1).
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] However, when using luminance, it becomes difficult to stably detect the target guiding line in a photographed image when the lighting changes in the morning and evening, or when the difference in luminance between the guiding line and its surroundings is small. Also, when the light state changes significantly during the movement of the moving body, such as when moving from indoors to outdoors, it becomes difficult to stably detect the target guiding line in the photographed image.
[0005] The present invention has been made to solve the above problems, and an object thereof is to provide a guiding line detection device that can more stably detect a guiding line at the start and during the movement of a moving body, and a moving body that moves using the detected guiding line.
Means for Solving the Problems
[0006] To achieve the above object, an induction line detection device according to an aspect of the present invention includes an image acquisition unit that acquires a captured image by photographing the front of a moving body that moves according to a visually recognizable induction line provided on the floor surface, an image conversion unit that converts the captured image into a captured image viewed from above, a setting unit that sets a plurality of parameters related to a reference color that is the color of the induction line and is used when converting the captured image into grayscale, and a grayscale conversion unit that converts the captured image into grayscale such that the difference from a reference value that is the value of a pixel corresponding to the reference color becomes larger as the color difference from the reference color that is the color of the induction line becomes larger, using the plurality of parameters set by the setting unit. The detection unit detects the induction line in the captured image that has been subjected to the image conversion by the image conversion unit and the grayscale conversion by the grayscale conversion unit. The setting unit optimizes an objective function according to the difference between the value of a pixel on the captured image that has been subjected to the image conversion by the image conversion unit and the grayscale conversion by the grayscale conversion unit, corresponding to the induction line detected based on the plurality of parameters, and the reference value, thereby setting the plurality of parameters at the start and during the movement of the moving body.
Effects of the Invention
[0007] According to an induction line detection device or the like according to an aspect of the present invention, by setting parameters related to the color of the induction line when the moving body moves, the induction line can be detected more stably. Further, by setting the parameters also during the movement of the moving body, it becomes possible to cope with changes in the appearance of the induction line in the captured image corresponding to the movement.
Brief Description of the Drawings
[0008]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Embodiments for Carrying Out the Invention
[0009] Hereinafter, a moving body and a guiding line detection device according to the present invention will be described using embodiments. In the following embodiments, components and steps denoted by the same reference numerals are the same or corresponding, and repeated descriptions may be omitted. The guiding line detection device according to the present embodiment sets a plurality of parameters when performing grayscale conversion so as to more appropriately detect a guiding line at the start and during the movement of the moving body.
[0010] FIG. 1 is a block diagram showing the configuration of a moving body 1 according to the present embodiment. The moving body 1 according to the present embodiment moves in accordance with a visually recognizable guiding line provided on the floor surface, and includes a guiding line detection device 2, a moving mechanism 18 that moves the moving body 1, and a movement control unit 19 that controls the moving mechanism 18 using the detection result of the guiding line by the guiding line detection device 2. The guiding line detection device 2 includes an image acquisition unit 11, an image conversion unit 12, a storage unit 13, a setting unit 14, a grayscale conversion unit 15, a detection unit 16, and a determination unit 17. The use of the moving body 1 is not particularly limited, but the moving body 1 may be, for example, a moving body that performs transportation, or a moving body for other uses such as security and cleaning.
[0011] It is assumed that a guiding line is provided on the floor surface of the moving environment of the mobile body 1. The floor surface of the moving environment is preferably horizontal usually. The guiding line may be provided, for example, for guiding the mobile body 1, or may be a partition line or the like for partitioning other uses, such as a passage for people or a traveling area for a forklift. The guiding line may be, for example, a tape-like one such as vinyl tape attached to the floor surface, or may be provided by applying paint to the floor surface. The guiding line is preferably a line with a certain width, for example. The guiding line is visually recognizable. That is, the guiding line can be detected in the image. Since the guiding line is visually recognizable, it is preferably a color different from that of the floor surface. The guiding line may be, for example, a line of a specific color determined in advance. Also, the guiding line may be, for example, a straight line or a curve. In the present embodiment, the case where the guiding line is a straight line will be mainly described.
[0012] FIG. 2 is a plan view showing an example of the situation inside a factory where a guiding line 5 is provided on the floor surface. In FIG. 2, it is assumed that the guiding line 5 is a partition line for partitioning the passage for people near the arrangement 7 in the factory and the traveling area for the forklift.
[0013] The image acquisition unit 11 acquires a captured image of the front of the mobile body 1. The image acquisition unit 11 may be, for example, an optical device such as a camera that captures an image, or may be one that acquires an image captured by an optical device such as a camera. In the present embodiment, the case where the image acquisition unit 11 is a camera will be mainly described. The captured image is preferably a color image. The image acquisition unit 11 preferably repeats the acquisition of the captured image. The image acquisition unit 11 may, for example, repeatedly acquire the captured image regularly or irregularly. Also, the image acquisition unit 11 may, for example, acquire a video. In this case, one frame constituting the video may be considered as the captured image.
[0014] The optical axis of the camera for taking the captured image is preferably normally directed forward in the traveling direction of the moving body 1. The optical axis may, for example, extend in the horizontal direction, or may be directed toward the floor side so that the depression angle has a positive value. Even in the latter case, it is preferable that a region far in the traveling direction is also included in the captured image. Also, for example, the captured image may be taken so that the left-right direction of the captured image is the horizontal direction of the real space. FIG. 3 is a diagram showing an example of a captured image taken when the moving body 1 exists at the position shown in FIG. 2. As shown in FIG. 3, the captured image becomes an image with a perspective.
[0015] The image conversion unit 12 converts the captured image acquired by the image acquisition unit 11 into a captured image viewed from above. Note that the converted captured image may also be referred to as a planar image. The planar image, which is a captured image viewed from above, may be, for example, an image viewed from a direction perpendicular to the floor surface, for example, the vertical direction. The image conversion unit 12 may, for example, convert the captured image into a planar image by a homography transformation. Note that a method for converting a captured image into a planar image is known, and a detailed description thereof is omitted. FIG. 4 is a diagram showing an example of a planar image obtained by converting the captured image shown in FIG. 3. As shown in FIG. 4, the planar image becomes an image without a perspective. The image conversion unit 12 may, for example, repeatedly convert each of the acquired captured images into a planar image, which is a captured image viewed from above.
[0016] In the storage unit 13, a plurality of parameters regarding the reference color, which is the color of the guiding line used when converting the captured image to grayscale, are stored. This reference color is the color of the guiding line in the captured image. As described above, the color of the guiding line provided on the floor surface of the moving environment of the moving body 1 is usually a predetermined color, but in the captured image of it, depending on changes in lighting, etc., the color of the guiding line will be different. Therefore, the reference color changes according to the light conditions at the time of photographing the guiding line, etc. The plurality of parameters may include, for example, a parameter indicating the reference color. These plurality of parameters will be described later. The storage unit 13 is preferably realized by a non-volatile recording medium, but may also be realized by a volatile recording medium. The recording medium may be, for example, a semiconductor memory or a magnetic disk, etc. The plurality of parameters stored in the storage unit 13 may be, for example, those accumulated by the setting unit 14.
[0017] The setting unit 14 sets a plurality of parameters. The setting unit 14 may set a plurality of parameters at the start of the movement of the moving body 1 and during the movement of the moving body 1. The setting of the plurality of parameters during movement may be, for example, an update of the plurality of parameters that have already been set. In this way, appropriate parameters according to the lighting, etc. at the start of movement can be set, and appropriate parameters according to changes in lighting, etc. during movement can be set, enabling more appropriate detection of the guiding line from the start to the end of the movement. Note that the setting of the plurality of parameters will be described later.
[0018] The grayscale conversion unit 15 uses a plurality of parameters set by the setting unit 14 to perform grayscale conversion on the captured image such that the difference from the reference value, which is the value of the pixel corresponding to the reference color, which is the color of the guiding line, becomes larger as the color difference from the reference color becomes larger. That is, when converting a pixel of a certain color to grayscale, the closer the color is to the reference color, the closer the value of the pixel after grayscale conversion is to the value of the pixel of the reference color, and the farther the color is from the reference color, the farther the value of the pixel after grayscale conversion is from the value of the pixel of the reference color, and the grayscale conversion may be performed. For example, when converting to 8-bit grayscale, the value of the pixel of the reference color may be set to 255, and the grayscale conversion may be performed such that the value becomes closer to 0 as the color difference from the reference color becomes larger. By doing so, the guiding line can be detected more stably in the converted grayscale planar image. In this case, as an example, the grayscale conversion may be performed such that pixels closer to the reference color have larger luminance values. For example, the guiding line of the reference color may be converted to white by grayscale conversion. A more specific method of grayscale conversion will be described later. Note that the grayscale conversion unit 15 may, as an example, perform grayscale conversion on the captured image after conversion by the image conversion unit 12. In the present embodiment, this case will be mainly described. FIG. 5 is a diagram showing an example of a captured image obtained by performing grayscale conversion on the planar image shown in FIG. 4. For example, as shown in FIG. 5, in the captured image after grayscale conversion, the luminance value of the guiding line 5 may be the largest value. The grayscale conversion unit 15 may, for example, convert each of the repeatedly acquired planar images into a grayscale image.
[0019] Note that the order of performing the image conversion by the image conversion unit 12 and the grayscale conversion by the grayscale conversion unit 15 on the captured image is not limited. For example, grayscale conversion may be performed after converting the captured image into a planar image, or the captured image may be converted into a planar image after performing grayscale conversion. In the present embodiment, the former case will be mainly described.
[0020] The detection unit 16 detects the guiding line in the captured image that has been subjected to image conversion by the image conversion unit 12 and grayscale conversion by the grayscale conversion unit 15. As an example, the detection unit 16 may detect the guiding line by a Hough transform in the captured image after conversion by the image conversion unit 12 and the grayscale conversion unit 15. For example, when the guiding line is a straight line, the detection unit 16 may perform a Hough transform to detect the straight line. The detection unit 16 may also detect the guiding line by template matching or feature point extraction. As an example, when the guiding line is a straight line, the detection unit 16 may detect the guiding line by using a straight-line template image. In addition, when the feature point extraction is performed, the detection unit 16 may extract feature points such as SIFT key points or SURF key points, and detect the guiding line including the feature points. The detection result by the detection unit 16 may be, for example, information indicating the position of the guiding line in the image.
[0021] In addition, when the width of the guiding line is large in the captured image after conversion by the image conversion unit 12 and the grayscale conversion unit 15, the detection unit 16 may detect the guiding line after performing, for example, thinning processing. This is because thinner lines are more suitable for detection. The thinning processing may be, for example, image processing in which a line having a width is thinned by narrowing the line width, or edge detection. As the former thinning processing, for example, Tamura, Hilditch, Zhang-Suen, and other algorithms that thin an image after binarizing it are known. In the latter edge detection, edges on both sides of the width direction of the guiding line are usually detected, but, for example, edge detection may be performed so that only one edge is left. In order to leave only one edge, for example, when detecting an edge using a differential value such as a brightness value, only pixels whose differential value is greater than a positive threshold value may be detected as edges, and pixels whose differential value is less than a negative threshold value may not be detected as edges.
[0022] Also, when a plurality of guiding lines are included in a planar image, the moving body 1 may also detect guiding lines other than the guiding line currently used for movement. As a result, when the moving body 1 is moving according to a certain guiding line, there is a possibility that it may erroneously move according to a different guiding line. To avoid such inappropriate movement, the detection unit 16 may be configured to detect guiding lines only in the vicinity of the guiding line used in the current movement. In this case, for example, the detection unit 16 may detect new guiding lines within a range obtained by rotating the detected guiding line by a predetermined angle around the moving body 1 and within a range obtained by translating the detected guiding line parallel by a predetermined distance. Note that the detected guiding line may be, for example, the guiding line detected immediately before. More precisely, the center around the moving body 1 may be, for example, the center of gravity of the moving body 1 or the center of rotation of the moving body 1.
[0023] FIG. 6 is a diagram for explaining the range in which the guide line is detected. In FIG. 6, it is assumed that the xy orthogonal coordinate system is the local coordinate system of the moving body 1. Also, it is assumed that the origin of the local coordinate system is the center of gravity of the moving body 1. In this case, when the detection unit 16 newly detects the guide line, in the grayscale image 30, the last detected guide line 31 is rotated around the origin of the local coordinate system of the moving body 1, that is, the moving body 1, within a predetermined angular range, for example, from -α (deg) to +α (deg), and the range 32 is merged with the range 33 obtained by moving the last detected guide line 31 by -β to +β in the y-axis direction, which is perpendicular to the traveling direction (x-axis direction). The detection of the guide line may be performed within the merged range. α and β are, for example, positive real numbers that are not too large and may be set in advance. Note that the ranges 32 and 33 may be the ranges of the regions through which the guide line 31 passes when the detected guide line 31 is rotated or moved within a predetermined range. In this way, the range in which the guide line is detected can be limited, and it is possible to prevent the detection of guide lines other than the guide line used for the current movement. For example, when the detection of the guide line is performed within the range obtained by rotating the detected guide line by a predetermined angle around the center of gravity of the grayscale image 30, it is necessary to increase the angle by which the guide line is rotated to some extent. However, by performing the detection of the guide line within the range obtained by rotating the detected guide line by a predetermined angle around the moving body 1, the angle by which the guide line is rotated can be made smaller, and the detection range of the guide line can be more limited.
[0024] The determination unit 17 may determine whether the situation is suitable for setting a plurality of parameters. This determination is mainly made while the moving body 1 is moving. As an example, the determination unit 17 may determine that the situation is suitable for setting a plurality of parameters from when the moving body 1 starts moving until the moving distance exceeds a predetermined distance. Note that the setting unit 14 may not set the plurality of parameters when the determination unit 17 determines that the situation is not suitable for setting the plurality of parameters, and may set the plurality of parameters when the determination unit 17 determines that the situation is suitable for setting the plurality of parameters. The determination by this determination unit 17 will be described later.
[0025] The movement mechanism 18 moves the moving body 1. In the present embodiment, the case where the movement mechanism 18 is a mechanism for causing the moving body 1 to travel on the floor surface will be mainly described. The movement mechanism 18 may, for example, be capable of moving the moving body 1 in all directions, or may not be. Being able to move in all directions means being able to move in an arbitrary direction. The movement mechanism 18 may, for example, include a traveling unit (such as wheels) and driving means (such as a motor or an engine) for driving the traveling unit. Note that when the movement mechanism 18 is capable of moving the moving body 1 in all directions, the traveling unit may be an omnidirectional wheel (such as an omni wheel or a mecanum wheel). Since a known movement mechanism 18 can be used, a detailed description thereof will be omitted.
[0026] The movement control unit 19 controls the movement mechanism 18 so that the moving body 1 moves according to the detected guiding line. For the moving body 1 to move according to the guiding line means, for example, that the moving body 1 may move along the guiding line. When the position of the guiding line in the image is specified by the detection unit 16, the position of the guiding line in the local coordinate system of the moving body 1 can be specified using the specification result. Therefore, the movement control unit 19 may control the movement mechanism 18 so that movement according to the guiding line is performed using the position of the guiding line in the local coordinate system of the moving body 1.
[0027] How the moving body 1 moves along the guiding line may be set in advance. Then, the movement control unit 19 may control the movement according to the guiding line by using, for example, the movement distance obtained by using an encoder or the like provided in the movement mechanism 18 according to the setting. For example, the movement control unit 19 may move the moving body 1 along the guiding line by a predetermined distance, change the traveling direction of the moving body 1 to a predetermined direction at the branching point of the guiding line after the movement, and then repeat the process of moving the moving body 1 along the guiding line by a predetermined distance again. Further, the movement control unit 19 may stop the moving body 1 at a predetermined position. And at that position, for example, loading and unloading of the object to be conveyed may be performed.
[0028] Also, when a marker is arranged in the movement area of the moving body 1, the movement control unit 19 may perform movement control using the marker. The marker may indicate, for example, the stop position of the moving body 1 or the traveling direction of the moving body 1 at the branching point of the guiding line. In this case, for example, the movement control unit 19 may detect the marker by using template matching or the like in the captured image which is a planar image before grayscale conversion, and perform movement control using the detected marker. As an example, the marker may be arranged on the guiding line.
[0029] Movement along the guiding line may be, for example, moving along the guiding line on the guiding line. Further, movement along the guiding line may be moving along a virtual line parallel to the guiding line on that virtual line. The virtual line does not exist in the moving area of the moving body 1, that is, it is a line that cannot be visually observed in the real environment. In this case, the moving body 1 can move parallel to the guiding line at a position different from the guiding line. For example, even when using, as the guiding line, a partition line provided near an arrangement in a factory or the like, by making the moving body 1 move on a virtual line parallelly moved in a direction away from the arrangement along the guiding line, the possibility of the moving body 1 contacting the arrangement can be reduced. As an example, the distance between the guiding line and the virtual line may be set in advance.
[0030] Next, a plurality of parameters used in grayscale conversion will be described. As an example, the plurality of parameters may each include a color reference value that is the coordinate value of a reference color, a reference range that is a range related to the color reference value, and a lower limit score that is a score of a coordinate value that is more than the reference range away from the color reference value, for each coordinate axis of the color space. The color space may be, for example, an RGB color space, a CMY color space, an HSV color space, an xyz color space, or the like. For example, the coordinate axes in the RGB color space may be the R (red) axis, the G (green) axis, and the B (blue) axis. For example, the coordinate axes in the HSV color space may be the H (hue) axis, the S (saturation) axis, and the V (brightness) axis. Here, the case where the color space is the RGB color space will be mainly described.
[0031] The plurality of parameters in the RGB color space may be, for example, the following nine parameters. That is, these parameters may be stored in the storage unit 13. R base : Color reference value of red R range : Reference range related to the color reference value of red V r base : Lower limit score that is the score of red that is more than the reference range away from the color reference value G base: Green color reference value G range : Reference range for the green color reference value V g base : Lower limit score, which is the score of green that is more than the reference range away from the color reference value B base : Blue color reference value B range : Reference range for the blue color reference value V b base : Lower limit score, which is the score of blue that is more than the reference range away from the color reference value
[0032] Also, let the values of the R-axis, G-axis, and B-axis in the RGB color space of each pixel of the image be R image 、G image 、B image respectively, and let the scores of red, green, and blue be V r 、V g 、V b respectively. Then, V r is as follows. V r =V r base (│R base -R image │>R range in the case of) V r =(1-|R base -R image | / R range )(1-V r base )+V r base (in other cases)
[0033] Figure 7 is a graph showing the change of the red score V r with respect to the value R image of the R-axis. Note that in Figure 7, the red score V r is shown, but it is assumed that the green score V g and the blue score V b are the same. As shown in Figure 7, the red score V r is such that when the red value R image is the color reference value R baseIn the case of, it becomes the maximum value "1", and the color reference value R base From the color reference value R base ± reference range R range To the range up to, the red value R image Is the color reference value R base The farther away from, the smaller the value becomes. In the above formula, the color reference value R base From the color reference value R base ± reference range R range In the range up to, the red score V r Is shown for the case of changing linearly, but it doesn't have to be so. In this way, from the value of each axis in the RGB color space from the color reference value to the color reference value ± reference range, the score of each axis monotonically decreases from "1" to the lower limit score. Also, the absolute value of the difference between the red value R image And the color reference value R base Is the reference range R range When it becomes or more, the red score V r Becomes the lower limit score V r base Becomes. Note that the reference color, which is the color of the guiding line, is indicated by the three color reference values. Also, the reference range indicates the range from "1", which is the score corresponding to the color reference value, to the lower limit score.
[0034] The score V of each pixel of the 8-bit grayscale is as follows. This score V may be the value of each pixel in the 8-bit grayscale image after grayscale conversion. Note that when the image after grayscale conversion is an N-bit grayscale image, the coefficient "255" in the following formula should be replaced with "2 N -1". V = 255V r V g V b
[0035] The grayscale conversion unit 15 uses the above nine parameters stored in the storage unit 13 and the formula for calculating the scores V r , V g , V b To calculate the values R image , Gimage and B image to calculate score V r V g V b are calculated, and by substituting them into the formula for calculating score V, the value V of each pixel in the captured image after grayscale conversion may be calculated. In this way, the greater the color difference from the reference color, which is the color of the guiding line, the greater the difference from the reference value, which is the value of the pixel corresponding to the reference color, so that the captured image can be grayscale-converted. In the captured image after grayscale conversion, the guiding line can be more easily detected. The reference value may be, for example, the value of the pixel after the pixel of the reference color is grayscale-converted. Here, performing grayscale conversion so that the greater the color difference from the reference color, the greater the difference from the reference value means that, as an example, in at least a part of the color space, such a relationship may exist. For example, for each pixel included in the color plane image, as shown in FIG. 7, the scores of each coordinate axis in the RGB color space are calculated, and when the score V, that is, the value of the pixel in the captured image after grayscale conversion, is calculated as in the above formula using the scores of each coordinate axis, in the region within the reference range from the color reference value for each axis value, grayscale conversion is performed so that the greater the color difference from the reference color, the greater the difference from the reference value. Since the score V is usually an integer value of 0 or more, in the above formula, for the decimal part of the real value on the right side, rounding processing may be performed so that the value of V becomes an integer. The rounding processing may be, for example, rounding, truncation, or ceiling.
[0036] Next, the setting of a plurality of parameters will be described. By using a plurality of parameters, the captured image can be converted to grayscale as described above, and by using the grayscale-converted captured image, the guiding line can be detected. The setting unit 14 can evaluate the plurality of parameters, for example, by using the value V of the pixel on the planar image after grayscale conversion corresponding to the guiding line detected based on the plurality of parameters in this way. Ideally, the value V of the pixel on the planar image after grayscale conversion corresponding to the detected guiding line is the reference value (in the above-mentioned 8-bit grayscale image, "255") which is the value of the pixel corresponding to the reference color. On the other hand, in reality, the value V may be different from the reference value, and it can be seen that the smaller the difference between the two, the more appropriate the plurality of set parameters are, and the larger the difference between the two, the less appropriate the plurality of set parameters are. Therefore, the setting unit 14 may set a plurality of parameters, for example, by optimizing an objective function according to the difference between the value V of the pixel on the planar image after grayscale conversion corresponding to the detected guiding line and the reference value which is the value of the pixel corresponding to the reference color.
[0037] The pixel corresponding to the detected guiding line may be, for example, a pixel on the guiding line or a pixel that at least partially includes the guiding line. The objective function may be, for example, the sum of the absolute values of the differences between the score V and the reference value for a plurality of pixels on the planar image after grayscale conversion corresponding to the detected guiding line. For example, in FIG. 6, the sum of the absolute values of the differences between the value of each pixel of the grayscale image 30 on the detected guiding line 31 and the reference value may be the objective function. Note that, for example, instead of the absolute value of the difference, the square of the difference may be calculated. Also, for example, instead of the sum, an average value may be calculated. As an example, when the reference value is the maximum value of the pixel values, the objective function may be the sum of the results of subtracting the pixel value V from the reference value (for example, 255, etc.) for a plurality of pixels on the planar image after grayscale conversion corresponding to the detected guiding line. By doing so, for one set of a plurality of parameters, a value of one objective function can be obtained.
[0038] The objective function may be such that, for example, the greater the difference between the pixel value V and the reference value for the pixels on the planar image after grayscale conversion corresponding to the detected guiding line, the larger the value, or the greater the difference, the smaller the value. In the former case, the optimization of the objective function is the minimization of the objective function, and in the latter case, the optimization of the objective function is the maximization of the objective function. As an example, when the objective function is the sum of the results of subtracting the pixel value V from the reference value for a plurality of pixels on the planar image after grayscale conversion corresponding to the detected guiding line, the smaller the value of the objective function, the more appropriately the guiding line is detected. Therefore, the optimization of the objective function may be the minimization of the objective function.
[0039] For example, when the score V is calculated as described above, the larger the value of the evaluation score S, which is the sum of the scores V for a plurality of pixels on the grayscale-converted planar image corresponding to the detected guiding line, the more optimized the objective function is. Therefore, the optimization of the objective function may be, for example, the maximization of the evaluation score S. Also, the optimization of the objective function may be, for example, the minimization of the value obtained by substituting the evaluation score S into a decreasing function. The value obtained by substituting the evaluation score S into a decreasing function may be, as an example, the reciprocal of the evaluation score S (1 / S).
[0040] When the objective function corresponding to the difference between the value V of the pixel on the grayscale-converted planar image corresponding to the detected guiding line and the reference value is optimized, when calculating the value of the objective function corresponding to a plurality of parameters, for example, in the image obtained by grayscale-converting the planar image before grayscale conversion using the plurality of parameters, the guiding line is detected, and the values of a plurality of pixels on the grayscale-converted planar image corresponding to the detected guiding line are used. Therefore, the shooting image before grayscale conversion and the shooting image, which is the planar image after grayscale conversion, are used to set a plurality of parameters. Also, in this way, a plurality of parameters can be set so that it becomes easier to detect the guiding line.
[0041] The setting unit 14 may perform optimization using, for example, the Nelder-Mead method, a genetic algorithm, or the like. Initial values of a plurality of parameters when performing optimization may be set in advance, for example, or may be set using the color of the guiding line included in the captured image before grayscale conversion. The latter case will be described later. Note that the initial values of the plurality of parameters set in advance may be, for example, the initial values of the plurality of parameters corresponding to the color of the guiding line provided on the floor surface. For example, when the guiding line is green, the initial values of the plurality of parameters related to the green color may be set in advance. As an example, the initial value of the color reference value may be set to a value corresponding to the color of the guiding line, and the initial values of the reference range and the lower limit score may be set to default values determined in advance. In this optimization, for each set of a plurality of parameters, grayscale conversion, detection of the guiding line, and calculation of the value of the objective function using the values of the pixels on the planar image after grayscale conversion corresponding to the detected guiding line are performed, and optimization regarding the value of the objective function may be performed. Also, as described above, instead of the value of the objective function, for example, the evaluation score S, or a value obtained by substituting the evaluation score S into a decreasing function may be used.
[0042] When performing optimization by the Nelder-Mead method, as described above, when the number of parameters is 9, 10 sets of 9 parameters are prepared by adding random values to the initial values of the 9 parameters respectively. In a nine-dimensional space with the 9 parameters as each axis, optimization may be performed by deforming the simplex consisting of 10 vertices corresponding to the 10 sets by inflation, reflection, contraction, etc. The setting unit 14 may, for example, identify new sets of a plurality of parameters by inflation or the like, and calculate values such as the value of the objective function corresponding to the new sets of the plurality of parameters using grayscale conversion using the new sets of the plurality of parameters or the result of detecting induction lines. Then, the setting unit 14 may sequentially update the sets of a plurality of parameters so that the value is minimized. The set of a plurality of parameters corresponding to the minimum value of the objective function after the update becomes the plurality of parameters finally set by the setting unit 14. Here, the random value may be a value close to 0 that does not change the parameters significantly. When performing optimization by a genetic algorithm, the setting unit 14 may perform optimization, for example, by crossing 9 parameters or changing them by mutation.
[0043] The termination condition of the optimization may be, for example, when the change in the value to be optimized, such as the value of the objective function, the evaluation score S, the value obtained by substituting the evaluation score S into a decreasing function, etc., becomes below a certain level, or when parameter updates have been performed more than a predetermined number of times. Also, for example, when the optimization is maximization, the optimization may be terminated when the value of the objective function or the value of the evaluation score S becomes larger than a threshold value, and when the optimization is minimization, the optimization may be terminated when the value of the objective function or the value obtained by substituting the evaluation score S into a decreasing function becomes smaller than a threshold value. The plurality of parameters for which the optimization has ended may be stored in the storage unit 13 and used for grayscale conversion by the grayscale conversion unit 15.
[0044] Next, the setting of the initial values of a plurality of parameters using the color of the guiding line included in the captured image before grayscale conversion will be described. When the moving body 1 is moving according to the guiding line, usually, the relative positional relationship between the moving body 1 and the guiding line becomes constant. Therefore, the position where the guiding line is included in the captured image is also determined. Accordingly, the setting unit 14 may obtain the value of each pixel in the region of the guiding line from the color captured image and use it to set the initial values of the plurality of parameters.
[0045] For example, in the color planar image shown in FIG. 4, the guiding line 5 usually becomes a line extending in the vertical direction. Therefore, the offset amount, which is the distance from the center line extending in the vertical direction at the center in the left - right direction of the planar image to the guiding line 5, may be stored in advance in the storage unit 13 or the like. In addition to the offset amount, information such as the width of the guiding line 5 may also be stored in the storage unit 13. Then, the setting unit 14 uses the offset amount or the like to specify the position of the guiding line 5 in the planar image, and from the position of the guiding line 5, it may obtain the information of each pixel of the guiding line 5, for example, the value for each coordinate axis of a predetermined color space. As an example, the setting unit 14 may set the initial values of the plurality of parameters using the information of each pixel in the region 3 of the guiding line 5 in the planar image shown in FIG. 4.
[0046] In this case, for example, the average value of the values of each pixel included in the region 3 (for example, the average value of R image ) may be the initial value of the color reference value (for example, R base ). Also, the greater the variance of the values of each pixel included in the region 3 (for example, the variance of R image ), the greater the initial value of the reference range (for example, R range ) may be, and the greater the initial value of the lower limit score (for example, V r base ) may be. Note that even when the initial values of the parameters are set manually, similarly, the initial value of the color reference value, the initial value of the reference range, and the initial value of the lower limit score may be set.
[0047] Next, an example of the determination process by the determination unit 17 will be described. For example, when the value of the objective function after optimization by the setting unit 14 is a value on the side where the difference between the pixel value and the reference value is larger to satisfy a predetermined condition with respect to the values of the objective function corresponding to a plurality of parameters set in the past, the determination unit 17 may determine that the situation is not suitable for setting the plurality of parameters. The values of the objective function corresponding to the plurality of parameters set in the past may be, for example, the average value of the values of the objective function at a position or in a movement section a predetermined distance ahead in the movement path of the moving body 1. In this case, for example, information associating the movement distance of the moving body 1 with the values of the objective function corresponding to the plurality of set parameters may be accumulated. The setting unit 14 may accumulate such information using, for example, the movement distance of the moving body 1 acquired from the movement control unit 19. Then, the setting unit 14 may specify the value of the objective function at a position or in a movement section a predetermined distance ahead in the movement path of the moving body 1 using the information accumulated in this way. The movement section may be, for example, a section for each predetermined distance.
[0048] When the value of the optimized objective function is a value on the side where the difference between the pixel value and the reference value is larger to satisfy a predetermined condition with respect to the values of the objective functions corresponding to a plurality of parameters set in the past, for example, when the optimization of the objective function is maximization of the objective function, the result of dividing the value of the optimized objective function by the values of the objective functions corresponding to a plurality of parameters set in the past may be smaller than a threshold value (for example, 1 / 3 or 1 / 5) which is a positive real number smaller than 1, or the result of subtracting the value of the optimized objective function from the values of the objective functions corresponding to a plurality of parameters set in the past may be larger than a threshold value which is a positive real number. When the optimization of the objective function is minimization of the objective function, the result of dividing the value of the optimized objective function by the values of the objective functions corresponding to a plurality of parameters set in the past may be larger than a threshold value (for example, 3 or 5) which is a real number larger than 1, or the result of subtracting the value of the optimized objective function from the values of the objective functions corresponding to a plurality of parameters set in the past may be smaller than a threshold value which is a negative real number.
[0049] By making such a determination, in a case where the guiding line does not extend in the vertical direction in the planar image, for example, in a case where the guiding line is bent in an L shape, etc., in a situation where the value of the objective function temporarily decreases, it is possible to avoid a situation where a plurality of parameters are updated. Also, for example, in a case where a line different from the guiding line is erroneously detected as the guiding line, it becomes possible to avoid a situation where a plurality of parameters are updated according to such a line different from the guiding line.
[0050] Further, for example, when the value of the objective function after optimization by the setting unit 14 is a value on the side where the difference between the pixel value and the reference value is larger than the threshold value, the determination unit 17 may determine that the situation is not suitable for setting a plurality of parameters. This threshold value may be set to a value on the side where the difference between the pixel value and the reference value is larger than the value of the objective function when performing normal optimization of the objective function. The value of the objective function when performing optimization of the objective function may be, for example, the value of the objective function when the end condition of optimization is satisfied. When the value of the objective function after optimization is a value on the side where the difference between the pixel value and the reference value is larger than the threshold value, for example, when the optimization of the objective function is maximization of the objective function, the value of the objective function after optimization may be less than the threshold value, and when the optimization of the objective function is minimization of the objective function, the value of the objective function after optimization may exceed the threshold value.
[0051] By making such a determination, in a situation where the guiding line does not extend in the vertical direction in the planar image, for example, when the guiding line is bent in an L shape, etc., a situation where the value of the objective function temporarily decreases can be avoided, and a situation where a plurality of parameters are updated can be avoided.
[0052] In addition, in the determination as to whether the situation is not suitable for setting a plurality of parameters by the determination unit 17, for example, instead of the value of the objective function, the value of the evaluation score S, the value obtained by substituting the evaluation score S into the decreasing function, etc. may be used.
[0053] Next, the operation of the moving body 1 will be described using the flowchart of FIG. 8. (Step S101) The image acquisition unit 11 acquires a captured image. The image acquisition unit 11 may acquire a captured image, for example, by capturing an image, or may acquire a captured image by receiving a captured image. The captured image may be stored in a recording medium (not shown) or the like. The same applies to step S107 described later.
[0054] (Step S102) The image conversion unit 12 converts the captured image into a planar image, which is the captured image viewed from above. The planar image may be stored in a recording medium (not shown) or the like.
[0055] (Step S103) The setting unit 14 sets a plurality of parameters by optimizing the objective function as described above. That is, a plurality of parameters corresponding to the value of the optimized objective function will be set. The setting unit 14 may optimize the objective function, for example, by calculating the value of the objective function using the guiding lines detected in the captured image after the grayscale conversion is performed on the planar image obtained in Step S102 for various sets of the plurality of parameters. Note that the grayscale conversion and the detection of the guiding lines may be performed by the grayscale conversion unit 15 and the detection unit 16. The plurality of set parameters may be stored in the storage unit 13. The details of the processing in this Step S103 will be described later with reference to the flowchart of FIG. 9.
[0056] (Step S104) The grayscale conversion unit 15 performs grayscale conversion on the planar image using the plurality of parameters after the latest setting. The grayscale-converted planar image may be stored in a recording medium (not shown) or the like.
[0057] (Step S105) The detection unit 16 detects the guiding lines in the captured image after the grayscale conversion.
[0058] (Step S106) The movement control unit 19 controls the movement mechanism 18 to move along the guiding lines detected in Step S105.
[0059] Note that when the setting unit 14 sets a plurality of parameters by optimizing the objective function, grayscale conversion of the planar image and detection of the guiding lines in the planar image after the grayscale conversion are performed to obtain the value of the objective function. Therefore, without performing Steps S104 and S105, the guiding lines corresponding to the set plurality of parameters may be used for movement control.
[0060] (Step S107) The image acquisition unit 11 acquires a captured image. Note that the image acquisition unit 11 may acquire the captured image periodically, for example.
[0061] (Step S108) The image conversion unit 12 converts the captured image into a planar image which is the captured image viewed from above. The planar image may be stored in a recording medium (not shown) or the like.
[0062] (Step S109) The grayscale conversion unit 15 converts the planar image into grayscale using a plurality of parameters after the latest setting. The grayscale-converted planar image may be stored in a recording medium (not shown) or the like.
[0063] (Step S110) The detection unit 16 detects a guiding line in the captured image after grayscale conversion. Information indicating the position of the detected guiding line may be passed to the movement control unit 19, for example.
[0064] (Step S111) The movement control unit 19 controls the movement mechanism 18 to move along the guiding line detected in Step S110.
[0065] (Step S112) The movement control unit 19 determines whether the moving body 1 has reached the destination. If the destination has been reached, the series of processes ends; otherwise, the process returns to Step S107.
[0066] (Step S113) The setting unit 14 obtains a plurality of parameters by optimizing the objective function as described above. That is, a plurality of parameters corresponding to the value of the optimized objective function are to be obtained. The setting unit 14 may optimize the objective function, for example, by calculating the value of the objective function using the guiding lines detected in the captured image after grayscale conversion is performed on the latest planar image for various sets of the plurality of parameters. Note that the grayscale conversion and the detection of the guiding lines may be performed by the grayscale conversion unit 15 and the detection unit 16. Further, the setting unit 14 may, for example, periodically obtain the plurality of parameters.
[0067] (Step S114) The determination unit 17 determines whether the situation is suitable for setting the plurality of parameters. If the situation is suitable for setting the plurality of parameters, the process proceeds to Step S115; otherwise, the process returns to Step S113.
[0068] (Step S115) The setting unit 14 sets the plurality of parameters obtained in Step S113 as the plurality of parameters to be used in the grayscale conversion. This setting may be, for example, the accumulation of the plurality of parameters obtained in Step S113 in the storage unit 13.
[0069] (Step S116) The movement control unit 19 determines whether the mobile body 1 has reached the destination. If the destination has been reached, the series of processes ends; otherwise, the process returns to Step S113.
[0070] Incidentally, it is preferable that the processes from step S107 to step S112 and the processes from step S113 to step S116 be performed in parallel. As an example, both processes may be processed in parallel. By repeatedly performing the processes from step S113 to step S116 even while they are in progress, for example, real-time parameter updates can be realized. Incidentally, for example, the priority of the processes from step S113 to step S116 may be lowered compared to the processes from step S107 to step S112. As an example, when movement control and setting of a plurality of parameters are performed by a processing unit such as a CPU or MPU, movement control may be preferentially executed. By doing so, it is possible to avoid a situation in which movement control is hindered by the update process of a plurality of parameters. Also, the order of the processes in the flowchart of FIG. 8 is an example, and if the same result can be obtained, the order of each step may be changed.
[0071] Next, the process of setting a plurality of parameters (step S103) in the flowchart of FIG. 8 will be described with reference to the flowchart of FIG. 9. The flowchart of FIG. 9 describes the case of optimizing an objective function by the Nelder-Mead method.
[0072] (Step S201) The setting unit 14 generates a predetermined number of sets of a plurality of parameters from a set of initial values of the plurality of parameters. As described above, the setting unit 14 may generate a predetermined number of sets of a plurality of parameters, for example, by adding random values to each of the parameters included in the set of initial values of the plurality of parameters. For example, when the set of initial values includes M parameters, the setting unit 14 may newly generate M sets based on it and perform optimization of the objective function using a total of M + 1 sets. M is an integer of 2 or more. For example, when M = 9 as described above, optimization of the objective function may be performed using 10 sets of a plurality of parameters.
[0073] (Step S202) The grayscale conversion unit 15 performs grayscale conversion on the plane image to be converted for each of the plurality of sets. For example, the grayscale conversion unit 15 may generate M + 1 grayscale-converted plane images by generating a grayscale-converted plane image for each of the M + 1 sets of a plurality of parameters.
[0074] (Step S203) The detection unit 16 detects the guiding lines in each of the plurality of plane images after grayscale conversion. For example, the detection unit 16 may detect M + 1 guiding lines by detecting the guiding lines for each of the M + 1 plane images after grayscale conversion.
[0075] (Step S204) The setting unit 14 calculates the value of the objective function according to the difference between the value V of the pixel on the grayscale-converted plane image corresponding to the detected guiding line and the reference value which is the value of the pixel corresponding to the reference color for each of the detected guiding lines. For example, the setting unit 14 may calculate M + 1 values of the objective function by calculating the value of the objective function for each of the M + 1 detected guiding lines.
[0076] (Step S205) The setting unit 14 updates the sets of a plurality of parameters for which the value of the objective function is the worst. In the Nelder-Mead method, the largest value of the objective function becomes the worst value of the objective function. The setting unit 14 may update the sets of a plurality of parameters for which the value of the objective function is the worst, for example, by performing reflection, expansion, etc. on the simplex corresponding to each of the plurality of sets. At this time, grayscale conversion using the new sets of a plurality of parameters, detection of the guiding lines in the plane image after the grayscale conversion, calculation of the value of the objective function using the detected guiding lines, etc. may be performed.
[0077] (Step S206) The setting unit 14 determines whether to finish updating a set of a plurality of parameters. If so, it proceeds to step S207; otherwise, it returns to step S205. The setting unit 14 may determine to finish updating the set of a plurality of parameters, for example, when an optimization termination condition is satisfied.
[0078] (Step S207) The setting unit 14 sets a set of a plurality of parameters corresponding to the value of the objective function after optimization as a plurality of parameters to be used in grayscale conversion. When the optimization is minimization, such as in the Nelder-Mead method, among the plurality of values of the objective function respectively corresponding to the plurality of sets, the plurality of parameters included in the set corresponding to the smallest value are set as the plurality of parameters to be used in grayscale conversion. Then, it returns to the flowchart of FIG. 8.
[0079] Note that in step S113 in the flowchart of FIG. 8, the same processing as in the flowchart of FIG. 9 may also be performed. However, in this case, in step S207 in the flowchart of FIG. 9, the setting unit 14 may only acquire the plurality of parameters without setting the plurality of parameters corresponding to the value of the objective function after optimization.
[0080] Next, the operation of the mobile body 1 according to the present embodiment will be described using a specific example. In this specific example, it is assumed that the mobile body 1 moves according to the guiding line 5 in the factory shown in FIG. 2. Also, the movement control unit 19 performs movement control according to a route along each guiding line from the starting point to the destination, which is stored in a recording medium (not shown in the figure) in advance. In this specific example, it is assumed that the setting of a plurality of parameters is performed at the start of movement and during movement.
[0081] First, assume that the moving body 1 is at the starting position of movement. The moving body 1 may move to its starting position, for example, by a manual operation of the user or the like. At the starting position of movement, it is assumed that the moving body 1 and the guiding line have a predetermined positional relationship. Then, upon receiving an instruction to start moving, the moving body 1 starts the process of detecting the guiding line. Specifically, the image acquisition unit 11 acquires a captured image and passes the acquired captured image to the image conversion unit 12 (step S101). Assume that the captured image is, for example, the one shown in FIG. 3. Upon receiving the captured image, the image conversion unit 12 converts the captured image into a planar image viewed from above and passes it to the setting unit 14 and the grayscale conversion unit 15 (step S102). The planar image is, for example, the one shown in FIG. 4.
[0082] Upon receiving the planar image, the setting unit 14 sets initial values of a plurality of parameters using the values of each pixel in the region 3 of the guiding line 5 included in the planar image. Further, the setting unit 14 acquires a plurality of parameters so as to optimize the objective function using the initial values of the plurality of parameters and stores them in the storage unit 13 (steps S103, S201 to S207).
[0083] Thereafter, the grayscale conversion unit 15 performs grayscale conversion on the planar image received from the image conversion unit 12 using the plurality of parameters stored in the storage unit 13, and passes the captured image after the grayscale conversion to the detection unit 16 (step S104). In this grayscale conversion, since the grayscale conversion is performed such that the difference from the reference value, which is the value of the pixel of the reference color, becomes larger as the color difference from the reference color, which is the color of the guiding line, becomes larger, it becomes easier to detect the guiding line. The captured image after the grayscale conversion is, for example, the one shown in FIG. 5.
[0084] Upon receiving the captured image after the grayscale conversion, the detection unit 16 detects the guiding line and passes the detection result of the guiding line to the movement control unit 19 (step S105). Upon receiving the detection result of the guiding line, the movement control unit 19 controls the movement mechanism 18 so that the moving body 1 moves according to the detected guiding line (step S106).
[0085] After that, until the moving body 1 reaches the destination, acquisition of a captured image, conversion into a planar image, grayscale conversion using a plurality of latest parameters, detection of a guiding line using the planar image after grayscale conversion, and movement control according to the detected guiding line are repeated, whereby movement of the moving body 1 according to the guiding line, change of the moving direction, stop, etc. are performed, and the moving body 1 will reach the destination (Steps S107 to S112).
[0086] Also, while such movement control is being performed, in parallel, acquisition of a plurality of parameters using the latest planar image before grayscale conversion, determination as to whether it is a situation suitable for setting the plurality of parameters, and setting of the plurality of parameters when it is a situation suitable for setting are repeated, whereby the plurality of parameters will be updated (Steps S113 to S116). Therefore, according to the lighting state of the location where the moving body 1 is moving, etc., the plurality of parameters will be adjusted, and it will be possible to more reliably detect the guiding line. In this way, the moving body 1 can move to the destination along the guiding line.
[0087] As described above, according to the moving body 1 according to the present embodiment, even if the color of the guiding line in the captured image changes according to changes in lighting, etc., the guiding line can be stably detected by setting a plurality of parameters accordingly. Also, for example, by setting a plurality of parameters each time movement starts, appropriate parameters can be used for each movement, and the guiding line can be more reliably detected. Also, by setting a plurality of parameters even during movement, for example, when the moving body 1 goes from indoors to outdoors or vice versa, when the moving body 1 moves from an area without windows to an area with windows or vice versa, or when the moving body 1 moves between areas with different lighting colors, etc., it will also be possible to cope with situations where the appearance of the guiding line changes during movement.
[0088] In addition, when the determination unit 17 determines that the situation is suitable for setting a plurality of parameters, setting the plurality of parameters can avoid inappropriate setting of the plurality of parameters. As a result, for example, it is possible to avoid a situation where a line that is not a guiding line is detected as a guiding line.
[0089] In the present embodiment, for example, when the moving body 1 starts moving, the setting unit 14 may set a plurality of parameters when the value of the objective function becomes a value on the side where the difference between the pixel value and the reference value is smaller than the threshold value. This threshold value may be set to a value on the side where the difference between the pixel value and the reference value is larger than the value of the objective function when normal optimization of the objective function is performed. That is, for example, when the objective function is maximized, this threshold value may be set to a value smaller than the value of the objective function after optimization, and when the objective function is minimized, this threshold value may be set to a value larger than the value of the objective function after optimization. The value of the objective function when the objective function is optimized may be, for example, the value of the objective function when the end condition of the optimization is satisfied. By doing so, at the start of movement, a plurality of parameters can be set earlier, and the moving body 1 can start moving in a shorter time. Even if a plurality of parameters are set before such optimization is completed, since the plurality of parameters are updated during movement, appropriate plurality of parameters after the completion of optimization are set during movement.
[0090] In the present embodiment, the setting unit 14 may not set a plurality of parameters whose difference from the initial values of the plurality of parameters exceeds the threshold value. That is, for example, when the setting unit 14 acquires candidates for a plurality of parameters, if the difference between the candidates for the plurality of parameters and the initial values of the plurality of parameters exceeds the threshold value, the setting unit 14 may not set the candidates for the plurality of parameters as the plurality of parameters used in the grayscale conversion. The initial values of the plurality of parameters may be stored in the storage unit 13, for example.
[0091] That the difference between the candidates of a plurality of parameters and the initial values of the plurality of parameters exceeds a threshold means that, for example, for at least any one of the plurality of parameters, the difference between the candidate of the parameter and the initial value of the parameter may exceed the threshold, or for one or more specific parameters among the plurality of parameters, the difference between the candidate of the parameter and the initial value of the parameter may exceed the threshold, or for each of the plurality of parameters, the difference between the candidate of the parameter and the initial value of the parameter may exceed the threshold. The specific parameter is, as an example, the red color reference value R base , the green color reference value G base , and the blue color reference value B base may be. The threshold may be set, for example, for each type of parameter. The type of parameter may be, for example, a color reference value, a reference range, a lower limit score, etc. The difference between the candidate of the parameter and the initial value of the parameter may be, for example, the absolute value of the difference between the two.
[0092] In this way, by not setting the plurality of parameters whose differences from the initial values of the plurality of parameters exceed the threshold, it is possible to prevent a line of a color different from the guiding line from being detected as the guiding line. Also, the threshold is preferably set to a value such that, for example, a line of a color different from the guiding line can be prevented from being detected as the guiding line. The threshold may be, for example, a positive real number. The threshold related to the color reference value may be set to a value corresponding to the reference range, for example.
[0093] Also, in the present embodiment, the detection unit 16 does not necessarily detect a guiding line whose position and / or direction changes beyond a threshold value with respect to the guiding line detected immediately before. When at least one of the position and direction of the detected guiding line changes significantly, it is considered that a guiding line different from the guiding line used for the previous movement has been detected. Therefore, since it is considered that inappropriate movement will occur if such a guiding line is detected, it is preferable that the detection unit 16 does not detect such a guiding line. Note that the threshold value regarding the position and direction of the guiding line is preferably set to a value that can prevent detection of discontinuous guiding lines, for example, by processing such as that of the detection unit 16. For example, the threshold value regarding the position of the guiding line may be set to a value corresponding to 20 cm or 30 cm in the real space, and the threshold value regarding the direction of the guiding line may be set to 25 degrees or 30 degrees. Note that when the detection unit 16 does not detect a guiding line whose position and / or direction changes beyond a threshold value with respect to the guiding line detected immediately before, movement control according to the guiding line cannot be performed. Therefore, the movement control unit 19 may stop the moving body 1 assuming that an abnormality has occurred, for example.
[0094] In addition, in the present embodiment, the case where the setting unit 14 sets the sum of the pixel values on the captured image after grayscale conversion corresponding to the detected guiding line as the evaluation score S has been described, but this is not essential. The setting unit 14 may, for example, set as the evaluation score S the result obtained by dividing the sum of the pixel values on the captured image after grayscale conversion corresponding to the detected guiding line by the sum of all the pixel values on the captured image after grayscale conversion. In this case, for example, even if the value of each pixel on the captured image after grayscale conversion is close to the maximum value (for example, "255" in an 8-bit grayscale image), appropriate optimization can be performed.
[0095] In addition, in the present embodiment, when calculating the value of the objective function or the evaluation score S, the case where the values of the pixels on the planar image after grayscale conversion corresponding to the detected guiding line are mainly described. However, the values of the pixels in the vicinity thereof may also be used to calculate the value of the objective function or the evaluation score S. For example, the objective function may be the weighted sum of the absolute values of the differences between the values of the pixels on the planar image after grayscale conversion corresponding to a predetermined range from the detected guiding line and a reference value. Also, for example, the evaluation score S may be the weighted sum of the values of the pixels on the planar image after grayscale conversion corresponding to a predetermined range from the detected guiding line. The weight becomes larger as it is closer to the detected guiding line and smaller as it is farther from the detected guiding line, and may be 0 when it is separated from the detected guiding line by a predetermined distance or more. By doing so, it becomes possible to set a plurality of parameters in consideration of the values of the pixels in the vicinity of the detected guiding line.
[0096] In addition, in the present embodiment, the case where the guiding line detection device 2 includes the determination unit 17 is mainly described. However, it may not be so. The guiding line detection device 2 may not include the determination unit 17. In this case, for example, a plurality of parameters may be set periodically.
[0097] In addition, in the present embodiment, as shown in FIG. 7, the case where scores regarding each coordinate axis of the color space are calculated is described. However, it may not be so. In FIG. 7, the situation where the score (for example, V image ) becomes 1 only when the value of the coordinate axis (for example, R base ) is the color reference value (for example, R r ) is described. However, the score may become 1 when the value of the coordinate axis is within a predetermined value range centered on the color reference value. In this case, the shape of the graph in the range of ± reference range centered on the color reference value may not be triangular as shown in FIG. 7, but may be trapezoidal, for example.
[0098] In addition, when the captured image includes two or more guiding lines, the setting unit 14 may set a plurality of parameters, for example, by optimizing the value of the objective function related to the two or more guiding lines detected based on a plurality of parameters.
[0099] In this embodiment, although the case where the plurality of parameters related to the reference color of the guiding line used when converting the captured image into grayscale is nine parameters has been mainly described, it may not be the case. The plurality of parameters may be color reference values for each coordinate axis in the color space, for example, the color reference value R of red base , the color reference value G of green base , and the color reference value B of blue base . In this case, for example, in the RGB color space, the distance from the reference color (R base , G base , B base ) of the guiding line may be specified, and the value after conversion may be determined according to the specified distance. That is, the grayscale conversion may be performed such that the larger the specified distance is, the larger the difference from the reference value, which is the value of the pixel corresponding to the reference color, becomes.
[0100] In addition, in this embodiment, the case where the guiding line is a straight line has been mainly described, but the guiding line may be a curve. The curved guiding line may be, for example, a guiding line of a curve with a constant curvature. Also in this case, the detection unit 16 can detect, for example, a guiding line of a curve with a constant curvature by means of the Hough transform.
[0101] In addition, when detecting the guiding line using the Hough transform, the result of the Hough transform may be blurred. In order to avoid such a situation, a process for stabilizing the result may be performed. The process for stabilizing the result of the Hough transform may be, for example, filtering using a Kalman filter or the like, or may be performing weighted addition or the like for excluding outliers or reducing the influence of outliers.
[0102] Also, when the moving body 1 is movable in a plurality of directions like an omnidirectional mobile cart, for example, the image acquisition unit 11 may be able to acquire a captured image in front of the moving direction for each of the plurality of moving directions. In this case, for example, in the moving body 1, a camera for capturing a captured image for each of the plurality of directions may be provided. Then, the image acquisition unit 11 may acquire a captured image in front of the moving direction corresponding to the current moving direction.
[0103] Also, in the above embodiment, the case where the guide line detection device 2 is a stand-alone device has been described. However, the guide line detection device 2 may be a stand-alone device or may be a server device in a server-client system. In the latter case, the image acquisition unit 11 may receive a captured image captured in the moving body 1 from the moving body 1. Further, information regarding the guide line detected by the detection unit 16 may be transmitted to the moving body 1 by a transmission unit (not shown) included in the guide line detection device 2. In this case, the moving body 1 may move according to the guide line detected by the guide line detection device 2 which is a server device.
[0104] Also, in the above embodiment, each process or each function may be realized by being centrally processed by a single device or a single system, or may be realized by being distributively processed by a plurality of devices or a plurality of systems.
[0105] In the above-described embodiment, each component may be configured by dedicated hardware, or components that can be realized by software may be realized by executing a program. For example, each component can be realized by a program execution unit such as a CPU reading and executing a software program recorded on a recording medium such as a hard disk or a semiconductor memory. At the time of its execution, the program execution unit may execute the program while accessing a storage unit or a recording medium. Further, the program may be executed by being downloaded from a server or the like, or may be executed by reading a program recorded on a predetermined recording medium (for example, an optical disk, a magnetic disk, a semiconductor memory, etc.). Also, this program may be used as a program constituting a program product. Further, the computer that executes the program may be singular or plural. That is, centralized processing may be performed, or distributed processing may be performed.
[0106] In addition, the above embodiments are examples for specifically implementing the present invention and do not limit the technical scope of the present invention. The technical scope of the present invention is indicated by the claims, not the description of the embodiments, and is intended to include changes within the literal scope of the claims and the scope of equivalent meaning.
Explanation of Reference Numerals
[0107] 1 Moving body, 2 Inductive line detection device, 11 Image acquisition unit, 12 Image conversion unit, 13 Storage unit, 14 Setting unit, 15 Grayscale conversion unit, 16 Detection unit, 17 Judgment unit, 18 Moving mechanism, 19 Movement control unit
Claims
Claim 1 An image acquisition unit that acquires a captured image obtained by photographing the front of a moving body that moves according to a visually recognizable guiding line provided on a floor surface; An image conversion unit that converts the captured image into a captured image viewed from above; A setting unit that sets a plurality of parameters regarding a reference color that is the color of the guiding line, which is used when converting the captured image into grayscale; Using the plurality of parameters set by the setting unit, the captured image is converted into grayscale so that the difference from a reference value, which is the value of a pixel corresponding to the reference color, becomes larger as the color difference from the reference color, which is the color of the guiding line, becomes larger. A grayscale conversion unit; A detection unit that detects a guiding line in the captured image that has been subjected to the image conversion by the image conversion unit and the grayscale conversion by the grayscale conversion unit; and The setting unit optimizes an objective function according to the difference between the value of a pixel on the captured image that has been subjected to the image conversion by the image conversion unit and the grayscale conversion by the grayscale conversion unit, corresponding to the guiding line detected based on the plurality of parameters, and the reference value. By doing so, a guiding line detection device that sets a plurality of parameters at the start and during the movement of the moving body is provided. Claim 2 The plurality of parameters each include, for each coordinate axis of a color space, a color reference value that is the coordinate value of the reference color, a reference range that is a range regarding the color reference value, and a lower limit score that is a score of a coordinate value that is more than the reference range away from the color reference value. The guiding line detection device according to claim 1. Claim 3 The setting unit sets a plurality of parameters when, at the start of the movement of the moving body, the value of the objective function becomes a value on the side where the difference between the value of the pixel and the reference value is smaller than a threshold value. The guiding line detection device according to claim 1. Claim 4 Further provided with a determination unit that determines whether it is a situation suitable for setting a plurality of parameters, The setting unit does not set a plurality of parameters when it is determined by the determination unit that it is a situation not suitable for setting a plurality of parameters. The guiding line detection device according to claim 1. Claim 5 The determination unit determines that the situation is not suitable for setting a plurality of parameters when the value of the objective function after optimization by the setting unit is a value on the side where the difference between the pixel value and the reference value is larger so as to satisfy a predetermined condition with respect to the values of the objective function corresponding to a plurality of parameters set in the past. The guiding line detection device according to claim 4.
6. The determination unit determines that the situation is not suitable for setting a plurality of parameters when the value of the objective function after optimization by the setting unit is a value on the side where the difference between the pixel value and the reference value is larger than a threshold value. The guiding line detection device according to claim 4.
7. A guiding line detection device according to any one of claims 1 to 6, a moving mechanism that moves the moving body, and a movement control unit that controls the moving mechanism so that the moving body moves according to the guiding line detected by the detection unit. A moving body comprising:
Citation Information
Patent Citations
Division line detection unit and vehicle lane detection unit
JP2008021102A