Movement object area information creation apparatus and movement object area information creation processing program
The moving target area information creation device addresses the complexity of conventional methods by using Hough transformation and angle position detection to automate the creation of moving target area information from two-dimensional images, enhancing efficiency and accuracy in movement control systems.
Patent Information
- Application Number
- JP2023150749
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2025-04-01
AI Technical Summary
The conventional method for creating moving target area information is complex and requires manual acquisition of angle coordinates for obstacles, making it difficult to efficiently generate information from a two-dimensional image of the moving target area.
A moving target area information creation device that uses a line detection means, such as Hough transformation processing, to detect straight lines and an angle position detection means to identify the position of obstacle angles based on intersection points and end points, allowing for the easy creation of information from a two-dimensional image.
This solution enables the efficient and automated creation of moving target area information, simplifying the process of generating position information for obstacles and setting prohibited area boundary lines, thereby improving the ease of use and accuracy in movement control systems.
Smart Images

Figure 2025043461000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a movement target area information creating device that creates information on a movement target area in which a moving object is to be moved. [Background technology]
[0002] The applicant has invented a mobile object movement control system, which includes a movement schedule information creation process that creates movement plan information (planned movement route) for a mobile object moving on a movement target surface (movement target area), and a movement control process that moves the mobile object based on the movement plan information and controls the movement of the mobile object by comparing actual movement information of the mobile object acquired by a movement information acquisition means with the movement plan information (see Patent Document 1). In the above-mentioned mobility control system, as a prerequisite for creating a planned movement route for a mobile object, it is necessary for the control means of the mobility control system to recognize information about walls, pillars, and other obstacles that exist in the target movement area. Conventionally, information on obstacles and the like in the target movement area has been generated, for example, by the following method. The worker created the map by drawing the outline of the obstacle on top of a drawing of the area to be traveled, and then using that to determine the coordinates of the obstacle's corners (hereinafter, the coordinates of the corners may be abbreviated to "corner coordinates"). In addition, in cases where information on the target area to be moved could not be obtained from the drawing, or where the drawing could not be obtained, the worker would actually measure the positions of obstacles, etc. in the target area to obtain information on the target area to be moved (the angular coordinates of each obstacle). By having the control means of the above-mentioned mobility control system recognize the information on the target movement area created as described above, the mobility control system can create a planned movement route for the moving body that avoids obstacles in the target movement area, and can control the movement of the moving body based on the planned movement route. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2020-154400 A Summary of the Invention [Problem to be solved by the invention]
[0004] However, in the conventional method of creating target area information, as described above, the angular coordinates of each obstacle, which constitutes the target area information, had to be calculated manually, which was cumbersome and posed a problem of wanting to be able to easily create information about the target area. In view of the above-mentioned problems, the present invention provides a movement target area information creation device and the like that can easily create information on a movement target area from a two-dimensional image of the movement target area. [Means for solving the problem]
[0005] The movement target area information creation device of the present invention is a movement target area information creation device that creates information on a movement target area in which a moving body is moved, and is characterized in that the movement target area information creation device has an obstacle position information acquisition means that acquires position information of an obstacle present in the movement target area, and the obstacle position information acquisition means includes a line detection means that detects lines on a two-dimensional image of the movement target area in which the outline of an obstacle in the movement target area is drawn, and a corner position detection means that detects the position of a corner of an obstacle based on the intersection of lines detected by the line detection means and the end points of the lines detected by the line detection means. The straight line detection means is characterized in that it is a Hough transform processing means which performs straight line detection using normal Hough transform processing and probabilistic Hough transform processing on a two-dimensional image of the target area to be moved, on which an outline showing the position of an obstacle in the target area to be moved is drawn. The corner position detection means detects the position of a corner of an obstacle based on the intersections of straight lines detected by normal Hough transform processing and the end points of straight lines detected by probabilistic Hough transform processing. The vehicle also includes a no-entry area boundary setting means for setting a no-entry area boundary line around the obstacle based on the position of the obstacle corner detected by the corner position detection means. Further, the obstacles in the target area for movement are of multiple types, and in the two-dimensional image, the outlines indicating the positions of the obstacles are shown in different colors for each type of obstacle, the obstacle position information acquisition means has an image creation means which creates multiple images in which the outlines of each obstacle are shown by identifying the colors of the outlines, the straight line detection means performs straight line detection on each image created by the image creation means, and the no-entry area boundary setting means sets a no-entry area boundary line at a position a certain distance away on the target area side from the outline of the obstacle formed by connecting the corners of the obstacle detected by the corner position detection means. Further, the obstacles in the target movement area are walls and pillars, and in the two-dimensional image, the outline indicating the position of the wall and the outline indicating the position of the pillar are shown in different colors, the obstacle position information acquisition means has an image creation means which creates a wall image from which only the outline indicating the position of the wall is extracted and a pillar image from which only the outline indicating the position of the pillar is extracted by identifying the color of the outline, the straight line detection means performs straight line detection on the wall image and the pillar image created by the image creation means, and the no-entry area boundary setting means sets a no-entry area boundary line at the edge of the wall at a fixed distance from the outline of the wall formed by connecting the corners of the wall detected by the corner position detection means, and sets a no-entry area boundary line at the edge of the pillar at a fixed distance from the outline of the pillar formed by connecting the corners of the pillar detected by the corner position detection means. The movement target area information creation processing program of the present invention is a movement target area information creation processing program that creates information on a movement target area in which a moving body is to be moved, and has an obstacle position information acquisition processing program that acquires position information of an obstacle present in the movement target area, and is characterized in that the obstacle position information acquisition processing program causes a computer to function as a line detection means that detects straight lines on a two-dimensional image of the movement target area in which the outline of an obstacle in the movement target area is drawn, and a corner position detection means that detects the position of a corner of an obstacle based on the intersection of the straight lines detected by the line detection means and the end points of the straight lines detected by the line detection means. Furthermore, the program that causes a computer to function as the line detection means is characterized in that it is a program that causes a computer to function as Hough transform processing means that performs line detection using normal Hough transform processing and probabilistic Hough transform processing on a two-dimensional image of the target area to be moved, on which an outline indicating the position of an obstacle in the target area to be moved is drawn. The program for causing a computer to function as the corner position detection means is characterized in that it is a program for causing a computer to function as a means for detecting the position of a corner of an obstacle based on the intersections of straight lines detected by normal Hough transform processing and the end points of straight lines detected by probabilistic Hough transform processing. The vehicle also has a no-entry area boundary setting processing program, which causes the computer to function as no-entry area boundary setting means for setting a no-entry area boundary line near an obstacle based on the position of the corner of the obstacle detected by the corner position detection means. Further, the obstacles in the movement target area are of multiple types, and in the two-dimensional image, the outlines indicating the positions of the obstacles are shown in different colors for each type of obstacle, and the obstacle position information acquisition processing program causes the computer to function as an image creation means for creating multiple images in which the outlines of each obstacle are shown by identifying the colors of the outlines, a straight line detection means for detecting straight lines in each image created by the image creation means, and a no-entry area boundary setting means for setting a no-entry area boundary line at a certain distance on the movement target area side from the outline of the obstacle formed by connecting the corners of the obstacle detected by the corner position detection means. Further, the obstacles in the movement target area are walls and pillars, and in the two-dimensional image, the outline indicating the position of the wall and the outline indicating the position of the pillar are shown in different colors, and the obstacle position information acquisition processing program causes the computer to function as an image creation means for creating a wall image from which only the outline lines indicating the position of the wall are extracted and a pillar image from which only the outline lines indicating the position of the pillar are extracted by identifying the color of the outline lines, a straight line detection means for detecting straight lines in the wall image and the pillar image created by the image creation means, and a no-entry area boundary setting means for setting a no-entry area boundary line at the edge of the wall at a fixed distance from the outline of the wall formed by connecting the corners of the wall detected by the corner position detection means, and setting a no-entry area boundary line at the edge of the pillar at a fixed distance from the outline of the pillar formed by connecting the corners of the pillar detected by the corner position detection means. According to the movement target area information creation device and the movement target area information creation processing program of the present invention, it has become possible to easily create information on the movement target area from a two-dimensional image of the movement target area. [Brief description of the drawings]
[0006] [Figure 1] FIG. 4 is an explanatory diagram of Hough transform processing (phase 1) performed by the obstacle position information acquisition device. [Diagram 2] FIG. 4 is an explanatory diagram of a wall position information detection process (phase 2) performed by the obstacle position information acquisition device. [Diagram 3]FIG. 4 is an explanatory diagram of a wall position information detection process (phase 2) performed by the obstacle position information acquisition device. [Figure 4] FIG. 11 is an explanatory diagram of the pillar position information detection process (phase 3) by the obstacle position information acquisition device. [Diagram 5] FIG. 11 is an explanatory diagram of the pillar position information detection process (phase 3) by the obstacle position information acquisition device. [Figure 6] 4 is a flowchart showing an outline of a process performed by the obstacle position information acquisition device. [Figure 7] 1 is a flowchart showing a Hough transform process (phase 1). [Figure 8] 13 is a flowchart showing a wall position information detection process (phase 2). [Figure 9] 13 is a flowchart showing a wall position information detection process (phase 2). [Figure 10] 13 is a flowchart showing a wall position information detection process (phase 2). [Figure 11] 13 is a flowchart showing a wall position information detection process (phase 2). [Figure 12] 13 is a flowchart showing a wall position information detection process (phase 2). [Figure 13] 13 is a flowchart showing a wall position information detection process (phase 2). [Figure 14] 13 is a flowchart showing a wall position information detection process (phase 2). [Figure 15] 13 is a flowchart showing the pillar position information detection process (phase 3). [Figure 16] 13 is a flowchart showing the pillar position information detection process (phase 3). [Figure 17] 13 is a flowchart showing the pillar position information detection process (phase 3). [Figure 18] 13 is a flowchart showing the pillar position information detection process (phase 3). [Figure 19] 13 is a flowchart showing the pillar position information detection process (phase 3). [Figure 20] 13 is a flowchart showing the pillar position information detection process (phase 3). [Figure 21]13 is a flowchart showing the pillar position information detection process (phase 3). DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0007] A movement target area information creation device according to an embodiment of the present invention is a movement target area information creation device that creates information about a movement target area in which a moving body is to be moved, and the movement target area information creation device includes an obstacle position information acquisition means that acquires position information of an obstacle present in the movement target area, and a no-entry area boundary line setting means. The obstacle position information acquisition means is a means for acquiring obstacle position information from a two-dimensional image of the target area including the obstacles in order to provide the control means of the moving body moving through the target area with obstacle position information for avoiding the obstacles present in the target area. The obstacle position information acquisition means includes a straight line detection means which detects straight lines in a two-dimensional image of the target area to be moved in which the outline of an obstacle in the target area is drawn, and a corner position detection means which detects the position of a corner of an obstacle based on the intersections of the straight lines detected by the straight line detection means and the end points of the straight lines detected by the straight line detection means. The no-entry area boundary setting means is means for setting a no-entry area boundary line around the obstacle based on the position of the corner of the obstacle detected by the corner position detection means. The straight line detection means is, for example, a Hough transform processing means that performs straight line detection using normal Hough transform processing and probabilistic Hough transform processing on a two-dimensional image of the target area to be moved, in which an outline indicating the position of an obstacle in the target area to be moved is drawn. The corner position detection means detects the positions of the corners of an obstacle based on, for example, the intersections of straight lines detected by normal Hough transform processing and the end points of straight lines detected by probabilistic Hough transform processing by the Hough transform processing means. The target area of movement is, for example, a floor of a building that serves as a target surface of movement, and obstacles present on the target area of movement are, for example, walls and pillars positioned on the floor. In the present invention, the movement target area information refers to obstacle position information based on the positions of the obstacle's corners, and position information for setting the no-entry area boundary line. The positions of the corners of an obstacle can be detected by the Hough transform processing means as the line detection means and the corner position detection means described above.
[0008] The Hough transform processing means, corner position detection means, and no-entry area boundary line setting means that constitute the above-mentioned movement target area information creation device are composed of a processing program that indicates the processing procedures executed by each means, and hardware resources such as a computer that realizes information processing by the processing program. In other words, the obstacle position information acquisition processing program according to the present invention is a program that causes a computer to function as the above-mentioned Hough transform processing means, corner position detection means, and no-entry area boundary line setting means. In other words, the target area information creation processing program, which creates information on the target area in which the moving body will be moved, includes an obstacle position information acquisition processing program, which acquires position information of obstacles present in the target area, and a no-entry area boundary line setting processing program. The obstacle position information acquisition processing program causes a computer to function as a line detection means that detects lines in a two-dimensional image of the target area to be moved in which the outline of an obstacle in the target area is drawn, and a corner position detection means that detects the position of a corner of an obstacle based on the intersections of the lines detected by the line detection means and the end points of the lines detected by the line detection means. In addition, the program that causes the computer to function as the line detection means is a program that causes the computer to function as Hough transform processing means that performs line detection by normal Hough transform processing and probabilistic Hough transform processing on a two-dimensional image of a moving target area on which an outline showing the position of an obstacle in the moving target area is drawn. Furthermore, the program that causes the computer to function as a corner position detection means is a program that causes the computer to function as a means for detecting the position of an obstacle corner based on the intersection points of straight lines detected by normal Hough transform processing and the end points of straight lines detected by probabilistic Hough transform processing. The no-entry area boundary setting processing program causes a computer to function as no-entry area boundary setting means that sets a no-entry area boundary line around an obstacle based on the position of the obstacle corner detected by the corner position detection means.
[0009] First, an overview of the process performed by the movement target area information creating device according to the embodiment will be described with reference to the explanatory diagrams shown in FIGS. 1 to 5 and the flowchart shown in FIG. In the embodiment, a case where position information of a wall and a pillar as obstacles is detected will be described as an example. As shown in the flow chart of FIG. 6, first, the input processing means of a computer serving as hardware of the movement target area information creation device inputs a two-dimensional image of a movement target area (step 1). A "two-dimensional image of the target area to be moved" is, for example, a drawn image of the target area to be moved that is created by hand or using a computer, and is a two-dimensional image M (see Figure 1(a)) in which walls W and pillars P as obstacles existing in the target area to be moved A are drawn at a certain scale. In other words, the "two-dimensional image of the area to be moved" used in this invention is, for example, a plan view, and a drawing showing the area to be moved created using 2D CAD or the like is converted into an image in a file format such as .png or .jpg, and this image is input as the two-dimensional image of the area to be moved. In the two-dimensional image of the target area, the outlines showing the positions of the walls and the outlines showing the positions of the pillars are drawn in different colors, for example, the color of the outlines showing the walls is red and the color of the outlines showing the pillars is blue. Next, the input two-dimensional image of the target area to be moved is separated into an image MW of only the wall W (see FIG. 1(b)) and an image MP of only the pillar P (see FIG. 1(c)) (step 2). That is, in the embodiment, the outline indicating the position of the wall in the two-dimensional image and the outline indicating the position of the pillar are shown in different colors, and the obstacle position information acquisition means is equipped with an image creation means which creates a wall image (image MW of only wall W) from which only the outline line indicating the position of the wall has been extracted and a pillar image (image MP of only pillar P) from which only the outline line indicating the position of the pillar has been extracted by identifying the color of the outline line in the input two-dimensional image. Then, line detection is performed on the image MW of only the wall using the normal Hough transform and the probabilistic Hough transform (see Figures 1(d) and 1(f)), and line detection is performed on the image MP of only the pillars using the normal Hough transform and the probabilistic Hough transform (see Figures 1(e) and 1(g)) (Step 3). That is, the Hough transform processing in step 3 described above is executed by the Hough transform processing means. Next, intersections are detected from the transformed image obtained by applying a normal Hough transform to the image of only the wall (see Figure 2(a)), and endpoints are detected from the transformed image obtained by applying a probabilistic Hough transform to the image of only the wall (see Figure 2(b)) (Step 4). In addition, intersections are detected from the transformed image obtained by applying a normal Hough transform to the image of only the pillars (see Figure 4(a)), and endpoints are detected from the transformed image obtained by applying a probabilistic Hough transform to the image of only the pillars (see Figure 4(b)) (Step 4). Then, the coordinates of the wall corners are calculated based on the intersections and end points detected from the transformed image obtained by Hough transforming the image of only the wall (see FIGS. 2(c) to 2(f) and 3(a)) (step 5). Similarly, the coordinates of the corners of the pillars are found based on the intersections and end points detected from an image obtained by Hough transforming an image of only the pillars (see FIG. 4(c) to FIG. 4(f)) (step 5). That is, the angular position detection process of steps 4 and 5 described above is executed by the angular position detection means. Then, based on the coordinates of the wall corners, a no-entry area boundary line at the wall edge is generated, which indicates how close the mobile object may approach the wall (see Figs. 3(b) to 3(e)) (step 6). Similarly, based on the coordinates of the corners of the pillar, a no-entry area boundary line around the pillar is generated, which indicates how close the mobile object may approach the pillar (see Fig. 5(a) to Fig. 5(f)) (step 7). That is, the no-entry area boundary line setting means executes the no-entry area boundary line setting process of steps 7 and 8 described above. In other words, the no-entry area boundary setting means sets a no-entry area boundary line at the edge of a wall at a fixed distance inside the outer shape of the wall formed by connecting the corners of the wall detected by the corner position detection means, and sets a no-entry area boundary line at the edge of a pillar at a fixed distance outside the outer shape of the pillar from the outer shape of the pillar formed by connecting the corners of the pillar detected by the corner position detection means. The inside of the wall outline and the outside of the pillar outline refer to the inside of the movement target area. In other words, the no-entry area boundary line near a wall is a line set within the target movement area, for example, on the inside of the room relative to the wall, and the no-entry area boundary line near a pillar is a line set within the target movement area, for example, on the inside of the room relative to the pillar. The coordinates of the wall corners, the pillar corners, and the no-entry area boundary line corners (the coordinates of the no-entry area boundary line corners at the wall edge, and the coordinates of the no-entry area boundary line corners at the pillar edge) obtained as described above are output as movement target area information (step 8). By having the control means of the mobile object's movement control system recognize this target movement area information, the mobile object's movement control system can realize movement control of the mobile object that avoids no-entry areas in the target movement area. In other words, the obstacles in the movement target area are walls and pillars, and in the two-dimensional image, the outline indicating the position of the wall and the outline indicating the position of the pillar are shown in different colors, and the above-mentioned obstacle position information acquisition processing program is a program that causes a computer to function as: image creation means that creates a wall image from which only the outline lines indicating the position of the wall are extracted and a pillar image from which only the outline lines indicating the position of the pillar are extracted by identifying the color of the outline lines; straight line detection means that detects straight lines in the wall image and the pillar image created by the image creation means; and no-entry area boundary setting means that sets a no-entry area boundary line at the edge of the wall at a fixed distance from the outline of the wall formed by connecting the corners of the wall detected by the corner position detection means, and sets a no-entry area boundary line at the edge of the pillar at a fixed distance from the outline of the pillar formed by connecting the corners of the pillar detected by the corner position detection means.
[0010] Hereinafter, details of the process performed by the movement target area information creating device according to the embodiment will be described with reference to the explanatory diagrams shown in FIGS. 1 to 5 and the flowcharts shown in FIGS. The movement target area information creation device executes a Hough transform process (hereinafter referred to as "phase 1"), a wall position information detection process ((wall corner detection process and no-entry area setting process around the wall), hereinafter referred to as "phase 2"), and a pillar position information detection process ((pillar corner detection process and no-entry area setting process around the pillar), hereinafter referred to as "phase 3"). That is, phase 1 is executed by the above-mentioned Hough transform processing means, and phase 2 and phase 3 are executed by the above-mentioned corner position detection means and no-entry area boundary line setting means.
[0011] The details of phase 1 will be explained with reference to Figs. 1 and 7. In phase 1, a computer serving as hardware for the movement target area information generating device performs Hough transform processing as shown in the flowchart of FIG. 7 in accordance with the procedures of a Hough transform processing program. First, the input processing means of the computer inputs the two-dimensional image M (step S1). That is, the two-dimensional image M (FIG. 1(a)) of the movement target area A, the scale of the two-dimensional image M, and color information of the lines of the wall W and the pillar P in the two-dimensional image M (for example, information that the color of the line of the wall W is red and the color of the line of the pillar P is green) are input to the computer (step S1). Then, the image creation means described above distinguishes between the wall W and the pillar P based on the color information of the two-dimensional image data, and creates an image MW (Figure 1(b)) of only the wall W, and also creates an image MP (Figure 1(c)) of only the pillar P (step S2). Next, line detection is performed by the normal Hough transform based on the image MW of only the wall W, and the result is stored as an image NW (FIG. 1(d)) (step S3). Also, based on the image MP of only the pillar P, straight line detection is performed by the normal Hough transform, and the result is stored as an image NP (FIG. 1(e)) (step S4). Next, line detection is performed using a probabilistic Hough transform based on the image MW of only the wall W, and the result is saved as an image PW (FIG. 1(f)) (step S5). Furthermore, based on the image MP of only the pillar P, line detection is performed using a probabilistic Hough transform, and the result is stored as an image PP (FIG. 1(g)) (step S6).
[0012] In other words, the Hough transform processing means detects straight lines using normal Hough transform processing for the image MW of only the wall W and the image MP of only the pillar P, and saves them as converted images NW and NP, and also detects straight lines as line segments with endpoints (starting point and ending point) using probabilistic Hough transform processing, and saves them as converted images PW and PP.
[0013] Next, phase 2 will be described in detail with reference to FIGS. 2, 3, and 8 to 13. In phase 2, the computer performs wall position information detection processing (wall corner coordinate detection processing and wall edge no-entry area setting processing) as shown in the flowcharts of Figures 8 to 13, in accordance with the procedures of a wall position information detection processing program (wall corner coordinate detection processing program and wall edge no-entry area setting processing program).
[0014] In phase 2, first, the wall corner coordinate detection process is performed. As shown in Fig. 8, first, an intersection Pnw[*] between n straight lines is detected from an image NW (Fig. 1(d)). Note that * is a natural number from 1 to n (Fig. 2(a)) (step S10). Also, m straight line end points Ppw[*] are detected from the image PW (FIG. 1(f)), where * is a natural number from 1 to m (FIG. 2(b)) (step S11). Furthermore, a flag (wall corner flag) is initialized (f[*]=0) (step S11a). Steps S12 to S18 are a loop process that repeats the process while updating the variable i of the intersection Pnw[i] in step S14. Steps S13 to S17 are a loop process that repeats the process while updating the variable j of the end point Ppw[j] in step S14. The loop condition for the loop process in which the process is repeated while updating the variable i is i<=n, and after i is initialized (i←1) in step S12, the loop process starts. The loop condition for the loop process in which the process is repeated while updating the variable j is j<=n, and after j is initialized (j←1) in step S13, the loop process is started.
[0015] In step S12, i is initialized (i←1), and in step S13, j is initialized (j←1). Then, in step S14, it is determined whether or not an end point Ppw[j] exists near the coordinates of the intersection point Pnw[i]. Furthermore, the coordinates of the point are those with the bottom left pixel of the two-dimensional image M of the area to be moved as the origin (0,0), and are the coordinates of the position of the pixel (a pixel on a display managed by a computer) where the intersection or end point of the line is located. The results of the Hough transform and calculations based on the values of the Hough transform are values based on this origin. Furthermore, in order to convert from these pixel-based coordinates to actual coordinates, information on the actual distance per pixel (scale information) is required, so as described above, in step S1, scale information of the two-dimensional image M is input. Therefore, in steps S66, S90, S91, S166, S196, and S199 described below, when data is saved, the coordinate values based on the image are multiplied by the scale value to convert them into actual distances and then saved. Moreover, the value of the coordinate vicinity of the intersection point Pnw[i] in step S14 can be set to any value, for example, about 1 m. In step S14, if the answer is Yes, the corner flag of the wall is set (f[i]←1) (FIG. 2(c)) (step S15), and if the answer is No, the process proceeds to step S17. The wall corner flag f[i] is a flag indicating that the intersection point Pnw[i] has been recognized as a wall corner, and the coordinates of the wall corner that are ultimately determined (see step S66) are determined using the intersection point Pnw[i] recognized as this wall corner (the intersection point Pnw[i] for which the wall corner flag f[i] has been set). In other words, in the Hough transform process, depending on the wall structure, an intersection may occur in empty space, so the wall corner flag f[i] is a flag that indicates that such an intersection should not be recognized as a wall corner. In other words, the intersection point Pnw[i] for which the wall corner flag is not set is not recognized as a wall corner, as shown by dp in FIG. 2(c).
[0016] That is, in step S14, after determining whether or not an end point Ppw[j=1] exists near the coordinates of the intersection point Pnw[1], if the answer is Yes, in step S15, a wall corner flag is set (f[i]←1) indicating that the intersection point Pnw[i] has been recognized as a wall corner, and when step S15 is executed, a forced termination (break processing) of the loop processing of steps S13 to S17 is executed. If the answer is No in step S14, proceed to step S17 to update j to j+1, and then repeat the processes of steps S13 to S17 to determine whether or not another endpoint Ppw exists near the coordinates of the intersection point Pnw[1]. When processing for this point Pnw[1] is completed, update i to i+1 (step S18), and determine whether each of the end points Ppw[1~m] exists near the coordinates of the intersection point Pnw[2]. Thereafter, the same processing is repeated until the i of the intersection point Pnw[i] becomes n. Incidentally, step S16 is a missing step.
[0017] That is, in the loop processing of steps S12 to S18, for each intersection point Pnw[*] (Figure 2(a)) in image MW, a check is made to see whether each of the end points Ppw[*] (Figure 2(b)) of the straight lines in image PW is present in the vicinity, and if there is an end point Ppw[*] of the straight line near the intersection point Pnw[*], the intersection point Pnw[*] is determined to be a candidate intersection point for a wall corner, and a wall corner flag is set. That is, by loop processing (steps S13 to S17 and steps S12 to S18), it is determined whether each end point Ppw[1 to m] exists near the coordinate of each intersection point Pnw[1 to n], and if an end point Ppw[j] exists near the coordinate of the intersection point Pnw[i], a wall corner flag indicating that the intersection point Pnw[i] has been recognized as a wall corner is set (f[i]←1) (step S15), and the intersection point Pnw[i] is recognized as a wall corner. Also, if an end point Ppw[j] does not exist near the coordinate of the intersection point Pnw[i], a wall corner flag is not set for the intersection point Pnw[i], and the intersection point Pnw[i] is recognized as not being a wall corner. In other words, in the processing from step S10 to step S18, the processing is performed to recognize the intersection point Pnw[*] that satisfies the condition that the end point Ppw[*] exists in the vicinity as a wall corner based on the intersection point Pnw[*] and end point Ppw[*] detected from the transformed images MW, PW which are obtained by Hough transforming an image of only the wall.
[0018] When the loop process (steps S12 to S18) is completed, the wall corner count is initialized (q←1) (step S19). At the stage where the loop process (steps S12 to S18) in Fig. 8 is completed, there are multiple intersection points Pnw[i] with wall corner flags set near a position that is one of the corners of the wall. For example, as shown in Fig. 2(c), there are four intersection points Pnw[i] with wall corner flags set, as indicated by a, b, c, and d, at the position that is the upper left corner of the wall. Therefore, in the next loop process (steps S20 to S33), these points are averaged (integrated), but it is necessary to count the number of points remaining after averaging. The "wall corners" in step S19 are the points remaining after this averaging, and in step S19, a counter that counts these "wall corners" is initialized.
[0019] Next, as shown in FIG. 9, the process proceeds to a loop process (steps S20 to S33) in which the process is repeated while updating the variable i of the intersection point Pnw[i] in step S25. Moreover, steps S24 to S29 are a loop process that repeats the process while updating the variable j of the intersection Pnw[j] in step S25. The loop condition for the loop process in which the process is repeated while updating the variable i is i<=n, and after i is initialized (i←1) in step S20, the loop process starts. The loop condition for the loop process in which the process is repeated while updating the variable j is j<=n, and after j is initialized (j←i+1) in step S24, the loop process starts.
[0020] In step S20, i is initialized (i←1), and then in step S21, it is determined whether or not a wall corner flag is set at the intersection point Pnw[i] (whether or not f[i]=1). If the answer is Yes in step S21, initialize the variables for calculating the average value (k←1, Pavr←[0,0]) (step S22), and prepare for calculating the average coordinates of the wall corners (set Pavr←Pavr+Pnw[i]) (step S23). Note that k is a variable indicating the number of intersections Pnw[j] in the vicinity of intersection Pnw[i].
[0021] Then, in step S24, j is initialized (j←i+1), and then in step S25, it is determined whether or not there is a point Pnw[j] with a wall corner flag set (f[j] = 1) near the coordinates of point Pnw[i]. If the result is Yes, preparations are made to calculate the average coordinates of the wall corners (set Pavr←Pavr+Pnw[j]) (step S26), and the wall corner flag set at point Pnw[j] is folded (f[j] = 0) (step S27), and the number of nearby wall corners (point Pnw[j]) is counted up (k←k+1) (step S28). Then, j is set to j+1 (step S29), and the loop process (steps S24 to S29) is repeated. By loop processing (steps S24 to S29) in which the process is repeated while updating the variable j, the coordinates of point Pnw[j] located near the coordinates of any point Pnw[i] (coordinate values based on the initial value Pavr ← [0,0]) and the number of wall corners (points Pnw[j]) located near the coordinates of any point Pnw[i] are determined.
[0022] After the loop process (steps S24 to S29) is completed, in which the variable j of point Pnw[j] is updated for point Pnw[i], the process proceeds to step S30, and the average coordinate of the wall corner (Pcw[q]) is calculated (Pcw[q]←Pavr÷k) (FIG. 2(d)). Then, the number of wall corners (points Pcw[*]) is counted up (q←q+1) (step S31), and the flag of the reference wall corner (intersection point Pnw[*]) is folded (f[i]←0) (step S32). Thereafter, i is set to i+1 (step S33), and the loop process (steps S20 to S33) is repeated. Also, if the answer is No in step S21, the process proceeds to step S33. In addition, q of Pcw[q] in step S30 has a value of 1 to the number of wall angles, and since the count-up of q is performed after step S30, Pcw[q] starts from Pcw[1]. By completing the above loop process (steps S20 to S33), the corners (Pcw[q]) of all walls are determined.
[0023] The processes in steps S20 to S33 will now be described in detail. For example, as shown in the upper left of FIG. 2C, there are four intersection points Pnw[*] located close to each other, and a point Pcw[*] is calculated by averaging these four intersection points Pnw[*]. The four intersections located close to each other in the upper left corner of Figure 2(c) are called intersection a, intersection b, intersection c, and intersection d, respectively, and the coordinate values of each intersection are intersection a = [1,1], intersection b = [2,1], intersection c = [1,2], and intersection d = [2,2]. In step S20, the corner flag of the wall at intersection point a=[1,1] is set, and in step S23 it is set to Pavr[1,1]. In step S25, intersection b exists near intersection a, and is set to Pavr[3,2] in step S26, and is counted up to k=2 in step S28. In step S28, j is updated, and in step S25, intersection c exists near intersection a, and is set to Pavr[4,4] in step S26, and k is counted up to 3 in step S28. Furthermore, j is updated in step S28, intersection d near intersection a exists in step S25, it is set to Pavr[6,6] in step S26, and k is counted up to k=4 in step S28. Then, in step S30, the average of the wall corner coordinates is calculated. In this case, the coordinate of point Pcw[*] obtained by averaging intersection points a, b, b, and d is Pavr[6,6]÷4=[1.5,1.5] (see FIG. 2(d)). That is, the coordinate value is added to the value of Pavr, and the average value obtained by dividing the value by the number of times the addition was performed is calculated as the coordinate value of the averaged point Pcw[*]. For this reason, Pavr←[0,0] is set as the initial value. In other words, in the loop processing (steps S20 to S33), the coordinates of multiple intersections Pnw[i] that have wall corner flags set in the vicinity of a position that will be a corner of the wall are averaged, and this averaged coordinate is recognized as the wall corner.
[0024] When the loop process (steps S20 to S33) ends, set the reference point for sorting Psw[1] ← Pcw[1] (step S34). Note that step S35 is missing. Here, "sorting" refers to the process of rearranging the points Pcw[*] along the outer shape of the wall. That is, at the end stage of Figure 9 (step S34), since there is a high probability that connecting the points Pcw[*] in order will not result in a shape along the outer shape of the wall, a process of rearrangement is performed to make it along the outer shape of the wall. Also, the reference point Psw[1] for sorting is the starting point when going around the corners (points Pcw[*]) of multiple walls. It is determined uniquely, but which point becomes the starting point and the order in which Pcw[*] are arranged before sorting depend on the Hough transform algorithm and the intersection detection algorithm (step S34). Note that the order in which Pcw[*] are arranged cannot be predicted (for example, it changes just by slightly changing the parameters used in the Hough transform).
[0025] Next, as shown in Figure 10, shift to a loop process (steps S36 to S46) that repeats the process while updating the variable i of the point Pcw[i] in step S39. Also, steps S38 to S45 are a loop process that repeats the process while updating the variable j of the point Pcw[j] in step S39. The loop condition for the loop process that repeats the process while updating the variable i is i < q. In step S36, after initializing i (i ← 1), start the loop process. The loop condition for the loop process that repeats the process while updating the variable j is j < q. In step S38, after initializing j (j ← 2), start the loop process. Note that since the value of the first point Pcw is not the target for sorting, set j ← 2 so that it starts from the second point Pcw. Also, although q represents the number of wall corners, since the process of adding 1 is performed in step S31, at this point, the value of q is set to the value of the number of wall corners + 1. Conversely, in step S36, when looking at the condition i < q, this condition will continue to be satisfied until the value of i reaches the number of wall corners. In this way, the repetitive calculation is performed the number of times equal to the number of wall corners. The same applies to j < q. In step S36, after initializing i (i ← 1), the initialization of the flag indicating whether the sorting process has been performed is carried out (f[s] ← 0) (step S37).
[0026] Next, in step S38, after initializing j (j ← 2), it proceeds to step S39. When a straight line is drawn connecting point Psw[i] and point Pcw[j], it is determined whether the lines of the probabilistic Hough transform result recorded in the image Pw almost overlap on that straight line, and whether point Pcw[j] is not included in point Psw[*]. Here, * in point Psw[*] is an integer from 1 to i (Fig. 2(e)). Also, q is a variable indicating the number of wall corners. Here, "whether point Pcw[j] is not included in point Psw[*]" means whether the point that has become a candidate for this sorting is not already included in the sorted array. For example, as shown in Fig. 2(e), when sorting points 2 and 3 with point 1 as the base point, the next point to be sorted from point 3 is searched according to the conditions of step S39. At this time, if the condition "whether point Pcw[j] is not included in point Psw[*]" in step S39 is passed, and if point 2 rises as a sorting candidate before point 4, point 2 will be adopted as the sorting destination. That is, it will go in the reverse direction. Therefore, by determining the condition "whether point Pcw[j] is not included in point Psw[*]" in step S39, the coordinate value of candidate point 2 is found from Psw[*], and by branching to No, the process of excluding point 2 from the candidates is carried out. If it is Yes in step S39, sorting is performed (Fig. 2(f)), and Psw[i + 1] ← Pcw[j] is set (step S40). Then, the loop end process, j←q (break process), and f[s]←1 are performed (step S42). Incidentally, step S41 is a missing step. Next, it is determined whether or not the sort process is not being performed and the loop is about to be exited (f[1]=0 and j>=q-1) (step S43). If the answer is No in step S39, proceed to step S43. If the answer is Yes in step S43, an error is detected (step S44) and the process ends. If No in step S43, j←j+1 (step S45) is set and the loop process (steps S38 to S45) is repeated, and then i←i+1 (step S46) is set and the loop process (steps S36 to S46) is repeated. That is, in the series of processes in step S34 and steps S36 to S46, lines are drawn in a fixed order (early to late) of the points Psw[*] (lines are drawn in the order of the points Psw[*]). That is, in the loop process (steps S36 to S46), a number is assigned to a number of points Psw[*] that are (candidates for) the wall corners, and the corners are connected in one stroke along the straight line determined by the probabilistic Hough transform to determine the outline of the wall. However, at the end of the loop process (steps S36 to S46), there is a high possibility that the outline of the wall will be a slightly inclined line, as shown in Fig. 2(f). That is, in the series of processes in step S34 and steps S36 to S46, the corners of the walls determined in the averaging process in the loop process (steps S20 to S33) are connected to determine the outline of the wall. In the above, a process in which a flag is not used in step S39 has been exemplified, but instead of step S39, a process in which a flag indicating whether or not sorting has already been performed may be performed.
[0027] Next, as shown in FIG. 11, the process proceeds to a loop process (steps S47 to S59) in which the process is repeated while updating the variable i of the point Psw[i] in steps S51 to S58. The loop condition for the loop process that repeats the process while updating the variable i is i < q. In step S47, after initializing i (i ← 1), the loop process starts. In step S47, after initializing i (i ← 1), proceed to step S48 and determine whether i + 1 = q. This determination process of whether i + 1 = q is a process of checking whether it has reached the end of the array. That is, it is a process to enable the expression of the line traced from the "number of wall corners" to the first one. For example, in the captured two-dimensional image M, when there are 6 "numbers of wall corners (q)" as shown in Fig. 1(a), if there is no process of step S48 above, in the sixth round, for the straight line from Psw[6] to Psw[7], calculations after step S51 will be attempted, but since the number of wall corners is only 6 and there is no value in Psw[7], an error will occur or incorrect calculations will be performed. Therefore, by performing the process of step S48, calculations are made for the straight line from Psw[6] to Psw[1]. If Yes in step S48, set j ← 1 (step S49). If No in step S48, set j ← i + 1 (step S50) After step S49 or step S50, determine whether the angle formed by the straight line connecting Psw[i] and Psw[j] and the x-axis is -22.5° or more and less than 22.5° or 157.5° or more and less than 202.5° (step S51). In step S51, if Yes, define a straight line Lw[i] with a slope of 0 passing through the midpoint of Psw[i] and Psw[j] (Fig. 3(a)) (step S52), and proceed to step S54. In step S51, if No, determine whether the angle formed by the straight line connecting Psw[i] and Psw[j] and the x-axis is 22.5° or more and less than 67.5° or 202.5° or more and less than 247.5° (step S53). In step S53, if Yes, define a straight line Lw[i] with a slope of 1 passing through the midpoint of Psw[i] and Psw[j] (Fig. 3(a)) (step S54). If the answer is No in step S53, it is determined whether the angle between the line connecting Psw[i] and Psw[j] and the x-axis is 67.5° or more and less than 112.5°, or 247.5° or more and less than 292.5° (step S55). If the answer is Yes in step S55, a straight line Lw[i] that passes through the midpoint between Psw[i] and Psw[j] and is parallel to the y-axis is defined (FIG. 3(a)) (step S56). If the answer is No in step S55, it is determined whether the angle between the line connecting Psw[i] and Psw[j] and the x-axis is 112.5° or more and less than 157.5°, or 292.5° or more and less than 337.5° (step S57). If the answer is YES in step S57, a straight line Lw[i] that passes through the midpoint between Psw[i] and Psw[j] and has a slope of -1 is defined (FIG. 3(a)) (step S58). If the result is No in step S57, or after steps S52, S54, S56, and S58, the process proceeds to step S59, where i is set to i+1, and the loop process (steps S47 to S59) is repeated. That is, the above loop processing (steps S47 to S59) is a process for adjusting the tilted lines so that, when the outline of a wall is slightly tilted as shown in FIG. 2(f), the outline of the wall becomes a line parallel to the x-axis (a line at 0° (or 180°) with respect to the x-axis) or a line parallel to the y-axis on a two-dimensional plane, as shown in FIG. 3(a), or a line with an inclination of "1" with respect to the x-axis (a line with an inclination of 45° (or 225°) with respect to the x-axis) or a line with an inclination of "-1" with respect to the x-axis (a line with an inclination of 135° (or 315°) with respect to the x-axis). In this case, the angle with respect to the x-axis is an angle that increases counterclockwise from the origin. In other words, this is a step in which the outline of the wall is adjusted to be an outline composed of a line parallel to the x-axis and a line parallel to the y-axis, as shown in Figure 3(a), or the outline of the wall is adjusted to be an outline composed of a line with a slope of "1" relative to the x-axis (a line with a slope of 45° (or 225°) relative to the x-axis) and a line with a slope of "-1" relative to the x-axis (a line with a slope of 135° (or 315°) relative to the x-axis). That is, steps S51, S53, S55, and S57 are processes for adjusting the angle of the straight line to one of 0°, 45°, 90°, and 135° with respect to the x-axis (and 180°, 225°, 270°, and 315°, although these angles cannot be distinguished for straight lines). That is, in steps S51 and S52, if the angle of the line connecting Psw[i] and Psw[j] is, for example, in the range of -22.5° (an intermediate angle between 315° and 0°) or more and less than 22.5° (an intermediate angle between 0° and 45°), it can be determined that the angle closest to the target angle is 0°. Therefore, in this case, the line connecting Psw[i] and Psw[j] is corrected to a line (with a gradient of 0) that passes through the midpoint of the line connecting Psw[i] and Psw[j] and is parallel to the X-axis. Furthermore, in steps S53 and S54, if the angle of the line connecting Psw[i] and Psw[j] is within a range of, for example, 22.5° (an intermediate angle between 0° and 45°) or more and less than 67.5° (an intermediate angle between 45° and 90°), it can be determined that the angle closest to the target angle is 45°. Therefore, in this case, the line connecting Psw[i] and Psw[j] is corrected to a line with an angle of 45° (=slope 1) that passes through the midpoint of the line connecting Psw[i] and Psw[j]. Furthermore, in steps S55 and S56, if the angle of the line connecting Psw[i] and Psw[j] is within a range of, for example, 67.5° (an intermediate angle between 45° and 90°) or more and less than 112.5° (an intermediate angle between 90° and 135°), it can be determined that the angle closest to the target angle is 90°. Therefore, in this case, the line connecting Psw[i] and Psw[j] is corrected to a line parallel to the Y-axis that passes through the midpoint of the line connecting Psw[i] and Psw[j]. Also, in steps S57 and S58, if the angle of the straight line connecting Psw[i] and Psw[j] falls within the range of, for example, 112.5° (the intermediate angle between 90° and 135°) or more and 157.5° (the intermediate angle between 135° and 180°), it can be determined that the angle closest to the target angle is 135°. Therefore, in this case, the straight line connecting Psw[i] and Psw[j] is corrected to a straight line with an angle of 135° (= slope -1) passing through the midpoint of the straight line connecting Psw[i] and Psw[j]). That is, in the loop process (steps S47 to S59), as the straight line connecting adjacent angles of the walls that make up the outer contour line of the wall, a process of defining four types of straight lines Lw[i] (a straight line with a slope of 0 (a straight line parallel to the x-axis), a straight line with a slope of 1, a straight line parallel to the y-axis, and a straight line with a slope of -1) passing through the midpoint of Psw[i] and Psw[j]) is performed. Therefore, according to the loop process (steps S47 to S59), the outer contour line of the wall can be detected from the two-dimensional image M in which a wall having an oblique outer contour line (a straight line Lw[i] with a slope of 1 or -1), a straight line parallel to the x-axis (a straight line with a slope of 0), and a straight line parallel to the y-axis is drawn.
[0028] After the loop process (steps S47 to S59) ends, as shown in FIG. 12, the process proceeds to a loop process (steps S60 to S65) that repeats the process while updating the variable i in step S61. The loop condition of the loop process that repeats the process while updating the variable i is i < q. In step S60, after initializing i (i ← 1), the loop process is started. In step S60, after initializing i (i ← 1), the process proceeds to step S61 to determine whether i + 1 = q. In step S61, if Yes, set j = i + 1 (step S62). In step S61, if No, set j ← 1 (step S63). After step S63 or step S63, the intersection point of the straight line Lw[i] and the straight line Lw[j] is re-assigned to Psw[i] (FIG. 3(a)) (step S64). After that, it proceeds to step S65, sets i←i + 1, and repeats the loop process (steps S60 to S65). Then, each point Psw[*] detected in the loop process (steps S60 to S65) is saved as wall map data (step S66). That is, the coordinates of each of these points Psw[*] are detected as the coordinates of the final wall corners. That is, in the loop process (steps S60 to S65), the outer contour line of the wall is corrected using the straight line Lw[*] defined in the loop process (steps S47 to S59), and the coordinates of the intersection point Psw[*] of the corrected outer contour line are detected as the coordinates of the wall corners. That is, the final process of obtaining the wall corners is being performed.
[0029] Next, a process of setting a prohibited entry area along the wall is performed. As shown in FIG. 12, steps S67 to S72 are a loop process that repeats the process while updating the variable i in step S68. The loop condition of the loop process that repeats the process while updating the variable i is i < q. In step S67, after initializing i (i←1), the loop process is started. In step S67, after initializing i (i←1), it proceeds to step S68 and determines whether i + 1 = q. In step S68, if Yes, after setting j←1 (step S69), it proceeds to step S70. If No, after setting j←i + 1 (step S70), it proceeds to step S71. In step S71, two straight lines parallel to the straight line connecting the point Psw[i] and the point Psw[j] and separated by a distance of α, that is, the straight line Liw_1[i] and the straight line Liw_2[i], are defined (FIG. 3(b)). Incidentally, the value of the distance α can be set to an arbitrary value, and for example, it is set to about 1 m. After step S71, it proceeds to step S72, sets i←i + 1, and repeats the loop process (steps S67 to S72). That is, in the loop process (steps S67 to S72), a process of defining a line located outside or inside the wall at a predetermined distance α from the outer contour line of the wall is performed. However, at this point, it is not possible to recognize whether the straight lines Liw_1[i] and Liw_2[i] are lines located outside the wall or lines located inside the wall.
[0030] After the loop process (steps S67 to S72) ends, as shown in FIG. 13, the process proceeds to a loop process (steps S73 to S79) that repeats the process while updating the variable i in step S74. The loop condition of the loop process that repeats the process while updating the variable i is i < q. In step S73, after initializing i (i ← 1), the loop process is started. In step S73, after initializing i (i ← 1), the process proceeds to step S74 to determine whether i + 1 = q. In step S74, if Yes, after setting j ← 1 (step S75), the process proceeds to step S77. If No, after setting j ← i + 1 (step S76), the process proceeds to step S77. In step S77, an angle formed by each of the vector v1 along the straight line Lw[i] starting from the point Psw[i] and the vector v2 along the straight line Lw[j] starting from the point Psw[i] is equal, and a straight line Liw_3[i] on the vector V3 starting from the point Psw[i] is defined (FIG. 3(c)). Thereafter, the process proceeds to step S78 to define the intersection points of the straight line Liw_1[i] and the straight line Liw_3[i] and the straight line Liw_2[i] and the straight line Liw_3[i] as the points Piw_1[i] and Piw_2[i], respectively (FIG. 3(c)). Thereafter, the process proceeds to step S79, sets i ← i + 1, and repeats the loop process (steps S73 to S79). That is, in the loop process (steps S73 to S79), a process of obtaining the intersection point Piw_1[i] of the straight line Liw_1[i] parallel to the outer contour line of the wall and the intersection point Piw_2[i] of the straight line Liw_2[i] is performed. After the loop process (steps S73 to S79) ends, set sum_1 ← 0 and sum_2 ← 0 (step S80). Note that sum_1 and sum_2 are the total lengths of the lines.
[0031] Next, as shown in FIG. 14, proceed to a loop process (steps S81 to S88) that repeats the process while updating the variable i in step S85. The loop condition for the loop process that repeats the process while updating the variable i is i < q. In step S81, after initializing i (i ← 1), start the loop process. In step S81, after initializing i (i ← 1), proceed to step S82 and determine whether i + 1 = q. In step S82, if Yes, after setting j ← 1 (step S83), if No, after setting j ← i + 1 (step S84), proceed to step S85. In step S85, determine whether the straight line connecting point Piw_1[i] and point Piw_1[j] is parallel to the straight line connecting point Psw[i] and point Psw[j] (FIG. 3(d)). In step S85, if No, exchange the coordinate data of point Piw_1[j] and point Piw_2[j] (FIG. 3(e)) (step S86). That is, there may be a case where the "line segment" connecting point Piw_1[i] and point Piw_1[j] and the "line segment" connecting point Piw_2[i] and point Piw_2[j] are not parallel to the straight line connecting point Psw[i] and point Psw[j]. That is, whether the straight lines Liw_1[i] and Liw_2[i] are located on which side with respect to the straight line Lw[*] connecting point Psw[i] and point Psw[j] depends on the process in step S71. For example, in step S71, as shown in FIG. 3(b), a straight line located above or to the left of the straight line Lw[*] connecting points Psw[i] and Psw[j] is defined as a straight line Liw_1[i], and a straight line located below or to the right of the straight line Lw[*] connecting points Psw[i] and Psw[j] is defined as a straight line Liw_2[i] (note that the computer determines whether a straight line is located above or to the left, or below or to the right, for example, by looking at the positive or negative value of a numerical value). That is, in step S71, it is not known whether the straight lines Liw_1[i] and Liw_2[i] are located inside or outside the straight line connecting the points Psw[i] and Psw[j] (the outline of the wall). In step S78, when points Piw_1[*] and points Piw_2[*] are defined as shown in Figure 3(c), the "line segment" connecting points Piw_1[i] and points Piw_1[j] and the "line segment" connecting points Piw_2[i] and points Piw_2[j] may not be parallel to the straight line connecting points Psw[i] and points Psw[j], as shown in Figure 3(d). In other words, if we simply connect the points created using only the information from Liw_1 and Liw_3, there will be cases where the "line segment" connecting points Piw_1[i] and Piw_1[j], or the "line segment" connecting points Piw_2[i] and Piw_2[j], intersects with the straight line connecting points Psw[i] and Psw[j] (the outline of the wall). Therefore, in step S86, the coordinate data of points Piw_1[j] and Piw_2[j] is exchanged, so that the "line segment" connecting points Piw_1[i] and Piw_1[j], the "line segment" connecting points Piw_2[i] and Piw_2[j], and the straight line connecting points Psw[i] and Psw[j] become parallel line segments as shown in Figure 3(e). Thereafter, the length of the straight line connecting points Piw_1[i] and Piw_1[j] is added to sum_1, and the length of the straight line connecting points Piw_2[i] and Piw_2[j] is added to sum_2 (step S87). If the answer is Yes in step S85, the process proceeds to step S87. After step S87, proceed to step S88, set i←i + 1, and repeat the loop process (steps S81 to S88). That is, in the loop process (steps S81 to S88), a process of obtaining the total length of the outer lines parallel to the outer line of the wall is performed. After the loop process (steps S81 to S88) ends, proceed to step S89 and determine whether sum_1 < sum_2 (Fig. 3(e)). In step S89, if Yes, after saving the point Piw_1[*] which is the endpoint of the shorter sum_1 line as the robot's operable range (wall) (step S90), proceed to phase3. Also, in step S89, if No, after saving the point Piw_2[*] which is the endpoint of the shorter sum_2 line as the robot's operable range (wall) (step S91), proceed to phase3. That is, among the total lengths sum_1 and sum_2 of the outer lines parallel to the outer line of the wall, the shorter one becomes the inner outer line of the outer line of the wall. Therefore, when sum1 is shorter, the point Piw_1[*] which is the corner of the inner outer line obtained by sum_1 becomes the corner of the boundary line of the prohibited entry area near the wall, and the straight line connecting this corner is set as the boundary line of the prohibited entry area near the wall. Also, when sum2 is shorter, the point Piw_2[*] which is the corner of the inner outer line obtained by sum_2 becomes the corner of the boundary line of the prohibited entry area near the wall, and the straight line connecting this corner is set as the boundary line of the prohibited entry area near the wall. That is, the prohibited entry area boundary line setting means sets the boundary line of the prohibited entry area near the wall at a position a certain distance away from the inside of the outer shape of the wall by connecting the corners of the wall detected by the corner position detection means.
[0032] Next, the details of phase3 will be described based on Figs. 4, 5, 15 to 21. In phase 3, the computer performs pillar position information detection processing (pillar corner coordinate detection processing and pillar edge no-entry area setting processing) as shown in the flowcharts of Figures 15 to 21, in accordance with the procedures of the pillar position information detection processing program (pillar corner coordinate detection processing and pillar edge no-entry area setting processing program).
[0033] In phase 3, first, the process of detecting the corner coordinates of the pillars is performed. As shown in Fig. 15, first, an intersection Pnp[*] between n straight lines is detected from an image NP (Fig. 1(e)). Note that * is a natural number from 1 to n (Fig. 4(a)) (step S100). Also, m straight line end points Ppp[*] are detected from the image PP (FIG. 1(g)), where * is a natural number from 1 to m (FIG. 4(b)) (step S101). Furthermore, the corner flag of the pillar is initialized (f[*]=0) (step S101a). Steps S102 to S108 are a loop process that repeats the process while updating the variable i of the point Pnp[i] in step S104. Steps S103 to S107 are a loop process that repeats the process while updating the variable j of the intersection Ppp[j] in step S104. The loop condition for the loop process in which the process is repeated while updating the variable i is i<=n, and after i is initialized (i←1) in step S102, the loop process starts. The loop condition for the loop process in which the process is repeated while updating the variable j is j<=m, and after j is initialized (j←1) in step S103, the loop process starts.
[0034] In step S102, i is initialized (i←1), and in step S103, j is initialized (j←1), after which the process proceeds to step S104 to determine whether or not an end point Ppp[j] exists near the coordinates of the intersection point Pnp[i]. If Yes in step S104, a corner flag of the pillar is set for the intersection point Pnp[i] (f[i]←1) (FIG. 4(c)) (step S105), and if No, the process proceeds to step S107. Incidentally, step S106 is a missing step. That is, in step S104, for example, after determining whether or not an end point Ppp[j] exists near the coordinates of the intersection point Pnp[1], if the answer is Yes, in step S105, a pillar corner flag is set indicating that the intersection point Pnp[1] has been recognized as a pillar corner (f[i]←1), and when step S105 is executed, a forced termination of the loop processing of steps S103 to S107 (j→m (break processing)) is executed. If the answer is No in step S104, proceed to step S107 to update j to j+1, and then repeat the processes of steps S103 to S107 to determine whether or not another endpoint Ppp exists near the coordinates of the intersection point Pnp[i]. When processing for this point Pnp[1] is completed, update i to i+1 (step S18), and determine whether each of the end points Ppp[1~m] is present near the coordinates of the intersection point Pnp[2]. Thereafter, the same processing is repeated until the i of the intersection point Pnp[i] becomes n. In this manner, a process of determining whether or not the corner of a pillar has an end point Ppp[j] in the vicinity of each intersection point Pnp[i] is performed. That is, in the process from step S100 to step S108, the same process as in step S10 to step S18 in phase 2 is performed. In other words, in the processing from steps S100 to S188, the processing is performed to recognize the intersection point Pnp[*] that satisfies the condition that the end point Ppp[*] exists nearby as the corner of the pillar based on the intersection point Pnp[*] and end point Ppp[*] detected from the transformed images NP and PP obtained by Hough transforming an image of only the pillar. When the loop process is completed, the corner count of the pillar is initialized (q←1) (step S109).
[0035] Next, as shown in FIG. 16, the process proceeds to a loop process (steps S110 to S123) in which the process is repeated while updating the variable i of the intersection point Pnp[i] in step S115. Moreover, steps S114 to S119 are a loop process that repeats the process while updating the variable j of the intersection Pnp[j] in step S115. The loop condition for the loop process in which the process is repeated while updating the variable i is i<=n, and after i is initialized (i←1) in step S110, the loop process starts. The loop condition for the loop process in which the process is repeated while updating the variable j is j<=n, and after j is initialized (j←i+1) in step S114, the loop process starts.
[0036] In step S110, after initializing i (i←1), the process proceeds to step 111 to determine whether or not the pillar corner flag is set at the intersection Pnp[i] (whether f[i]=1), and if Yes, initialize the variables for calculating the average value (k←1, Pavr←[0,0]) (step S112) to prepare for calculating the average of the pillar corner coordinates (set Pavr←Pavr+Pnp[i]) (step S113). Here, k is a variable indicating the number of intersections Pnp[j] in the vicinity of the intersection Pnp[i]. Then, in step S114, j is initialized (j←i+1), and then the process proceeds to step S115 to determine whether or not there is a point Pnp[j] with a pillar corner flag set (f[i] = 1) near the coordinates of point Pnp[i]. If the result is Yes, preparations are made to calculate the average coordinates of the pillar corners (set Pavr←Pavr+Pnp[j]) (step S116), and the pillar corner flag is set to f[j] = 0 (step S117). Then, the number of corners (points Pnp[j]) of nearby pillars is counted up (k←k+1) (step S118), and j is set to j+1 (step S119), and the loop process (steps S114 to S119) is repeated. Also, in step S115, if the result is No, the process proceeds to step S119. As described above, by performing the loop process (steps S114 to S119) in which the process is repeated while updating the variable j, the coordinates of point Pnp[j] located near the coordinates of any point Pnp[i] (coordinate values based on the initial value Pavr ← [0,0]) and the number of wall corners (points Pnp[j]) located near the coordinates of any point Pnp[i] are determined.
[0037] After the loop process (steps S114 to S119) in which the process is repeated while updating the variable j is completed, the average coordinate of the pillar corner (Pcp[q]) is calculated (Pcp[q]←Pavr÷k) (step S120). Then, the number of pillar corners (points Pcp[*]) is counted up (q←q+1) (step S121), and the flag of the reference pillar corner (intersection point Pnw[*]) is folded (f[i]←0) (step S122). Thereafter, i is set to i+1 (step S123), and the loop process (steps S110 to S123) is repeated. Also, in step S111, if the result is No, the process proceeds to step S123. That is, in the loop process (steps S110 to S123), the same processes as those in phase 2 (steps S20 to S33) are performed. In other words, in the loop processing (steps S110 to S123), the coordinates of multiple intersections Pnp[i] for which the column corner flag is set in the vicinity of a position that will be one of the column corners are averaged, and this averaged coordinate is recognized as the column corner. When the loop process (steps S110 to S123) is completed, the count of the number of pillars is initialized (k←1) (step S124).
[0038] Next, as shown in FIG. 17, the process proceeds to a loop process (steps S125 to S139) in which the process is repeated while updating the variable i of the intersection point Pnp[i] in steps S126 and S130. Moreover, steps S129 to S135 are a loop process that repeats the process while updating the variable j of the intersection Pnp[j] in step S130. The loop condition for the loop process that repeats the process while updating the variable i is i < q. In step S125, after initializing i (i ← 1), the loop process is started. The loop condition for the loop process that repeats the process while updating the variable j is j <= n. In step S129, after initializing j (j ← i + 1), the loop process is started.
[0039] In step S125, after initializing i (i ← 1), proceed to step 126 and determine whether the point Pcp[i] is not included in the point Pgp[*][**]. Here, * is an integer from 1 to k, and ** is an integer from 1 to 4. In the determination of step S126, if Yes, initialize the count of the corners of the pillar (l ← 2) (step S127), and after setting the first pillar as a reference (Pgp[k][1] ← Pcp[1]) (step S128), in step S129, initialize j (j ← i + 1) and start the loop process (steps S129 to S135). First, in step S130, determine whether there is a point Pcp[j] in the vicinity of the coordinates of the point Pcp[i] and whether the point Pcp[j] is not included in the point Pgp[*][**]. Here, * is an integer from 1 to k, and ** is an integer from 1 to 4 (Figure 4(d)). In the determination of step S130, if Yes, determine that the neighboring point is a corner of the k-th pillar (Pgp[k][l] ← Pcp[j]) (step S131). Then, move to the next corner (l ← l + 1) (step S132) and proceed to step S133. In the determination of step S130, if No, proceed to step S133. In step S133, determine whether the number of corners of the k-th pillar has reached 4 (l > 4). If Yes, perform loop termination processing (j ← q (break processing)) (step S134). If No, continue the loop process with j ← j + 1 (step S135). When the loop process (steps S129 to S135) ends, proceed to step S136 and determine whether it is a rectangular pillar (l = 4?). If it is determined in step S136 that the object is a rectangular pillar, increment the pillar count (k ← k + 1) and (step S137), set i ← i + 1 (step S139), and perform loop processing until i < q If it is determined in step S136 that the object is not a rectangular pillar, end with an error (step S138). Also, in step S126, if it is No, proceed to step S139 That is, in the loop processing (steps S125 to S139), as shown in FIG. 4(d), the four corners (points Pgp[*][**]) are grouped to find a rectangular pillar
[0040] Next, as shown in FIG. 18, shift to loop processing (steps S140 to S142) that repeats the process while updating the variable i of the intersection point Pgp[i] in step S141 In step S140, after initializing i (i ← 1), proceed to step S141 In step S141, sort Pgp[i][**] according to the following conditions and substitute the result into Psp[i][**]. However, ** is an integer from 1 to 4 (FIG. 4(e)). 1. Substitute the Pgp[i][**] with the smallest x-axis coordinate into Psp[i][1]. If there are multiple candidates, give priority to the Pgp[i][**] with the largest y-axis coordinate 2. Substitute the Pgp[i][**] with the largest x-axis coordinate into Psp[i][2]. If there are multiple candidates, give priority to the Pgp[i][**] with the largest y-axis coordinate 3. Substitute the Pgp[i][**] with the largest x-axis coordinate into Psp[i][3]. If there are multiple candidates, give priority to the Pgp[i][**] with the smallest y-axis coordinate 4. Substitute the Pgp[i][**] with the smallest x-axis coordinate into Psp[i][4]. If there are multiple candidates, give priority to the Pgp[i][**] with the smallest y-axis coordinate Then, set i ← i + 1 (step S142) and perform loop processing until i < q That is, in the loop process (steps S140 to S142), the process of sorting and connecting the four grouped corners (points Pgp[*][**]) is performed.
[0041] Steps S143 to S157 are loop processes that repeat the process while updating the variable i of the point Psp[i][j] in steps S148 to S155. Steps S144 to S156 are loop processes that repeat the process while updating the variable j of the point Psp[i][j] in steps S148 to S155. The loop condition of the loop process that repeats the process while updating the variable i is i < k. In step S143, after initializing i (i ← 1), the loop process starts. The loop condition of the loop process that repeats the process while updating the variable j is j < 5. In step S144, after initializing j (j ← 1), the loop process starts.
[0042] In step S143, after initializing i (i ← 1) and in step S144, after initializing j (j ← 1), it proceeds to step S145 to determine whether j = 4. If j = 4, after setting l ← 1 (step S146), it proceeds to step S148. If j ≠ 4, after setting l ← j + 1 (step S147), it proceeds to step S148. In step S148, it is determined whether the angle formed by the straight line connecting Psp[i][j] and Psp[i][l] and the x-axis is -22.5° or more and less than 22.5° or 157.5° or more and less than 202.5°. If the determination in step S148 is Yes, it proceeds to step S149. After defining a straight line Lp[i][j] with a slope of 0 passing through the midpoint of Psp[i][j] and Psp[i][l] (Figure 4(f)), it proceeds to step S150. If the determination in step S148 is No, it proceeds to step S150. In step S150, it is determined whether the angle formed by the straight line connecting Psp[i][j] and Psp[i][l] and the x-axis is 22.5° or more and less than 67.5° or 202.5° or more and less than 247.5°. If the determination in step S150 is Yes, proceed to step S151. After defining a straight line Lp[i][j] with a slope of 1 passing through the midpoint of Psp[i][j] and Psp[i][l] (Fig. 4(f)), proceed to step S152. If the determination in step S150 is No, proceed to step S152. In step S152, determine whether the angle formed by the straight line connecting Psp[i][j] and Psp[i][l] and the x-axis is 67.5° or more and less than 112.5° or 247.5° or more and less than 292.5°. If the determination in step S152 is Yes, proceed to step S153. After defining a straight line Lp[i][j] parallel to the y-axis passing through the midpoint of Psp[i][j] and Psp[i][l] (Fig. 4(f)), proceed to step S154. If the determination in step S152 is No, proceed to step S154. In step S154, determine whether the angle formed by the straight line connecting Psp[i][j] and Psp[i][l] and the x-axis is 112.5° or more and less than 157.5° or 292.5° or more and less than 337.5°. If the determination in step S154 is Yes, proceed to step S155. After defining a straight line Lp[i][j] with a slope of -1 passing through the midpoint of Psp[i][j] and Psp[i][l] (Fig. 4(f)), proceed to step S156. If the determination in step S154 is No, proceed to step S156. Set j←j + 1 (step S156), perform loop processing until i < 5 is satisfied, set i←i + 1 (step S157), and perform loop processing until i < k is satisfied. That is, in the loop processing (steps S143 to S157), as the straight lines connecting adjacent angles of the columns that make up the outer contour line of the column, a process of defining four types of straight lines Lp[i][j] (a straight line with a slope of 0 (a straight line parallel to the x-axis), a straight line with a slope of 1, a straight line parallel to the y-axis, and a straight line with a slope of -1) passing through the midpoint of Psp[i][j] and Psp[i][l] is performed. That is, in the loop process (steps S143 to S157), the same process as the loop process in phase2 (steps S47 to S59) is performed.
[0043] Next, as shown in FIG. 19, the process proceeds to a loop process (steps S158 to S165) that repeats the process while updating the variable i of the straight lines Lp[i][j] and Psp[i][j] in step S163. Steps S159 to S164 are loop processes that repeat the process while updating the variable j of the straight lines Lp[i][j] and Psp[i][j] in step S163. The loop condition of the loop process that repeats the process while updating the variable i is i < k. In step S158, after initializing i (i ← 1), the loop process is started. The loop condition of the loop process that repeats the process while updating the variable j is j < 5. In step S159, after initializing j (j ← 1), the loop process is started.
[0044] In step S158, after initializing i (i ← 1) and in step S159, after initializing j (j ← 1), the process proceeds to step S160 to determine whether j = 4. If j = 4, after setting l ← 1 (step S161), the process proceeds to step S163. If j ≠ 4, after setting l ← j + 1 (step S162), the process proceeds to step S163. In step S163, the intersection point of the straight line Lp[i][j] and the straight line Lp[i][l] is reassigned to Psp[i][j] (FIG. 4(f)). Set j ← j + 1 (step S164), and perform the loop process (steps S158 to S164) until j < 5 is satisfied. Set i ← i + 1 (step S165), and perform the loop process (steps S158 to S165) until i < k is satisfied. Then, the point Psp[*][**] detected in steps S158 to S165 is stored as pillar map data (step S166). That is, the coordinates of each point Psp[*][**] are detected as the coordinates of the corners of the final pillar. That is, in the loop process (steps S158 to S165), the outer contour line of the pillar is corrected using the straight line Lp[*][*] defined in the loop process (steps S143 to S157), and the coordinates of the intersection point Psp[*][**] of the corrected outer contour line are detected as the coordinates of the corner of the pillar. That is, the final process of obtaining the corners of the pillar is being performed.
[0045] Next, the process proceeds to the setting process of the entry prohibited area at the edge of the pillar. As shown in FIG. 19, steps S167 to S174 are loop processes that repeat the process while updating the variable i of the point Psp[i][j] and the straight line Lp[i][j] in step S172. Also, steps S168 to S173 are loop processes that repeat the process while updating the variable j of the point Psp[i][j] and the straight line Lp[i][j] in step S172. The loop condition of the loop process that repeats the process while updating the variable i is i < k. In step S167, after initializing i (i ← 1), the loop process is started. The loop condition of the loop process that repeats the process while updating the variable j is j < 5. In step S168, after initializing j (j ← 1), the loop process is started.
[0046] In step S167, after initializing i (i ← 1) and in step S168, after initializing j (j ← 1), the process proceeds to step S169 to determine whether j = 4. If j = 4, after setting l ← 1 (step S170), the process proceeds to step S172. If j ≠ 4, after setting l ← j + 1 (step S171), the process proceeds to step S172. In step S172, straight lines Lip_1[i][j] and Lip_2[i][j] that are parallel to the straight line connecting the point Psp[i][j] and the point Psp[i][l] and are separated by a distance of α are defined (FIG. 5(a)). Set \(j\leftarrow j + 1\) (step S173), perform loop processing (steps S168 to S173) until \(j\lt5\) is satisfied, and set \(i\leftarrow i + 1\) (step S174), perform loop processing (steps S167 to S174) until \(i\lt k\) is satisfied.
[0047] Next, as shown in FIG. 20, shift to loop processing (steps S175 to S183) that repeats the process while updating the variable \(i\) of the straight lines \(Lp[i][j]\) and \(Psp[i][j]\) in steps S180 and S181. Also, steps S176 to S182 are loop processing that repeats the process while updating the variable \(i\) of the straight lines \(Lp[i][j]\) and \(Psp[i][j]\) in steps S180 and S181. The loop condition for the loop processing that repeats the process while updating the variable \(i\) is \(i\lt k\). In step S175, after initializing \(i\) (\(i\leftarrow1\)), start the loop processing. The loop condition for the loop processing that repeats the process while updating the variable \(j\) is \(j\lt5\). In step S176, after initializing \(j\) (\(j\leftarrow1\)), start the loop processing.
[0048] In step S175, after initializing \(i\) (\(i\leftarrow1\)) and in step S176, after initializing \(j\) (\(j\leftarrow1\)), proceed to step S177, determine whether \(j = 4\). If \(j = 4\), after setting \(l\leftarrow1\) (step S178), proceed to step S180. If \(j\neq4\), after setting \(l\leftarrow j + 1\) (step S179), proceed to step S180. In step S180, generate a vector \(v1\) starting from the point \(Psp[i][j]\) along the straight line \(Lp[i][j]\) and a vector \(v2\) starting from the point \(Psp[i][j]\) along the straight line \(Lp[i][l]\), and define a straight line \(Lip\_3[i][j]\) on the vector \(V3\) starting from the point \(Psp[i][j]\) such that the angles formed by the vector \(v1\) and the vector \(v2\) are equal (FIG. 5(b)). Further, proceed to step S181, and define the intersection points of the straight line Lip_1[i][j] and the straight line Lip_3[i][j], and the straight line Lip_2[i][j] and the straight line Lip_3[i][j] as the point Pip_1[i][j] and the point Pip_2[i][j] respectively (Fig. 5(b)). Set j←j + 1 (step S182), perform loop processing (steps S176 to S182) until j < 5 is satisfied, and set i←i + 1 (step S183), and perform loop processing (steps S175 to S183) until i < k is satisfied. That is, in the loop processing (steps S175 to S183), the process of obtaining the point Pip_1[i][j] of the straight line Lip_1[i][j] parallel to the outer contour line of the pillar and the point Pip_2[i][j] of the straight line Lip_2[i][j] is performed. That is, in the loop processing steps S175 to S183), the same processing as the loop processing (steps S73 to S79) in phase2 is performed.
[0049] Next, as shown in FIGS. 20 and 21, shift to loop processing (steps S184 to S197) that repeats the process while updating the variable i in the steps during the loop processing. Also, the loop processing (steps S186 to S193) is a loop processing that repeats the process while updating the variable j in the steps during the loop processing. The loop condition of the loop processing that repeats the process while updating the variable i is i < k. In step S184, after initializing i (i←1), start the loop processing. The loop condition of the loop processing that repeats the process while updating the variable j is j < 5. In step S186, after initializing j (j←1), start the loop processing.
[0050] In step S184, after initializing i (i←1), proceed to step S185, and set sum_1←0 and sum_2←0. Then, in step S186, j is initialized (j←1), and the process proceeds to step S187 to determine whether j=4 or not. If j=4, l is set to 1 (step S188) and the process proceeds to step S190; if j=4 is not, l is set to j+1 (step S189) and the process proceeds to step S190.
[0051] In step S190, it is determined whether the line connecting points Pip_1[i][j] and Pip_1[i][l] is parallel to the line connecting points Psp[i][j] and Psp[i][l] (Figure 5(c)). If they are not parallel (No in step S190), the coordinate data of points Pip_1[i][l] and Pip_2[i][l] are exchanged (Figure 5(c)) (step S191), and then the process proceeds to step S192. If they are parallel (Yes in step S190), the process proceeds directly to step S192. In step S192, the length of the straight line connecting points Pip_1[i][j] and Pip_1[i][l] is added to sum_1, and the length of the straight line connecting points Pip_2[i][j] and Pip_2[i][l] is added to sum_2. The process proceeds to step S193, where j←j+1, and loop processing is performed (steps S186 to S193). That is, in this loop process (steps S186 to S193), the same processes as in the loop process in phase 2 (steps S81 to S88) are performed.
[0052] Next, the process proceeds to step S194 to determine whether sum_1>sum_2 (FIG. 5(d)). If it is determined in step S194 that sum_1 is long (Yes in step S194), proceed to step S195 to determine whether the line connecting points Pip_1[i][**] and the line connecting point Piw_※[*] (the actionable range of the saved wall) intersect (Figure 5(e)). If it is determined in step S195 that there is no intersection (No in step S195), the process proceeds to step S196, where point Pip_1[i][**] is saved as the robot's possible range (pillar), and then i←i+1 is set (step S197), and loop processing (steps S184 to S197) is performed. In other words, of the total lengths sum_1, sum_2 of the outline lines parallel to the outline line of the column, the longer one becomes the outer outline line of the column outline line, so the corner of this outer outline line, point Pip_1[i][**], becomes the corner of the no-entry area boundary line around the pillar, and the straight line connecting these corners is set as the no-entry area boundary line around the pillar. Then, this no-entry area boundary line around the pillars is set for all pillars. In other words, the no-entry area boundary setting means sets a no-entry area boundary line at the edge of the pillar at a position a certain distance outside the outer shape of the pillar formed by connecting the corners of the pillar detected by the corner position detection means.
[0053] If it is determined in step S194 that sum_2 is long (No in step S194), proceed to step S198 and determine whether the line connecting points Pip_2[i][**] and the line connecting point Piw_※[*] (the actionable range of the saved wall) intersect (Figure 5(e)). If it is determined in step S198 that there is no intersection (No in step S198), the process proceeds to step S199, where point Pip_2[i][**] is saved as the robot's possible range (pillar), and then i←i+1 is set (step S197), and loop processing (steps S184 to S197) is performed.
[0054] If it is determined in step S195 that an intersection occurs (Yes in step S195), the process proceeds to step S200, where the coordinates of point Pip_1[i][**], which is the end point of the line connecting points Pip_1[i][**] where an intersection exists, and which is in the direction of the actual wall as viewed from the intersection, are replaced with the coordinates of the intersection. At this time, the coordinates of the other end of the other line sharing point Pip_1[i][**] are also replaced so that it has the same slope as the line in the actionable range of the wall that has the intersection. This process is performed for all lines connecting points Pip_1[i][**] (Figure 5(f)). Thereafter, the process proceeds to step S196, where point Pip_1[i][**] is saved as the robot's actionable range (pillar), and then i←i+1 is set (step S197), and loop processing (steps S184 to S197) is performed. In other words, if the answer to step S195 is Yes, i.e., if the boundary line of the no-entry area near the pillar overlaps with the boundary line of the no-entry area near the wall, as shown in Figure 5(e), the process proceeds to step S200, and the boundary line of the no-entry area near the pillar is re-set so that the boundary line of the no-entry area near the pillar does not overlap with the boundary line of the no-entry area near the wall, as shown in Figure 5(f).
[0055] If it is determined in step S198 that an intersection occurs (Yes in step S198), the process proceeds to step S201, where the coordinates of point Pip_2[i][**], which is one of the end points of the line connecting points Pip_2[i][**] where an intersection exists, and which is in the direction of the actual wall as viewed from the intersection, are replaced with the coordinates of the intersection. At this time, the coordinates of the other end of the other line sharing point Pip_2[i][**] are also replaced so that it has the same slope as the line in the actionable range of the wall that has the intersection. This process is performed for all lines connecting points Pip_2[i][**] (Figure 5(f)). Thereafter, the process proceeds to step S199, where point Pip_2[i][**] is saved as the robot's actionable range (pillar), and then i←i+1 is set (step S197), and loop processing (steps S184 to S197) is performed. Then, loop processing (Steps S184 to S197) is performed until i < k is satisfied, and phase 3 ends.
[0056] As described above, according to the moving target area information creation device and the moving target area information creation processing program according to the embodiment of the present invention, from the two-dimensional image of the moving target area, the corner coordinates of the wall, the corner coordinates of the pillar, the corner coordinates of the boundary line of the area where entry to the wall side is prohibited, and the corner coordinates of the boundary line of the area where entry to the pillar side is prohibited can be easily created as the moving target area information. Therefore, by causing the control means of the moving body's movement control system to recognize the moving target area information, the moving body's movement control system can realize the movement control of the moving body that avoids the prohibited entry area on the moving target area.
[0057] Note that in the above, a wall and a pillar are exemplified as obstacles. However, in the present invention, according to the characteristics of obstacles other than the wall and the pillar, it is also possible to create the corners of the obstacles and the information on the boundary lines of the prohibited entry areas, that is, the moving target area information. For example, when the obstacles on the moving target area are multiple types of obstacles, a two-dimensional image in which the outline lines indicating the positions of the obstacles are shown in different colors for each type of obstacle is created, and the obstacle position information acquisition means has an image creation means for creating a plurality of images in which the outline lines of the obstacles are shown for each obstacle by identifying the colors of the outline lines of the obstacles in the two-dimensional image. Then, the straight line detection means performs straight line detection on each image created by the image creation means, the corner position detection means detects the positions of the corners of the obstacles based on the intersections of the straight lines detected by the straight line detection means and the end points of the straight lines detected by the straight line detection means, and the prohibited entry area boundary line setting means sets the prohibited entry area boundary line at a position a certain distance away from the outer shape of the obstacle formed by connecting the corners of the obstacles detected by the corner position detection means. By adopting such a configuration, it is also possible to create the corners of obstacles other than the wall and the pillar and the information on the prohibited entry area boundary lines, that is, the moving target area information. Note that examples of obstacles other than the wall and the pillar include stairs and other attachments. In this case, the obstacles in the target area of movement may be of multiple types, and in the two-dimensional image, the outlines indicating the positions of the obstacles may be shown in different colors for each type of obstacle, and the obstacle position information acquisition processing program may be a program that causes the computer to function as an image creation means that creates multiple images in which the outlines of each obstacle are shown by identifying the colors of the outlines, a straight line detection means that detects straight lines in each image created by the image creation means, and a no-entry area boundary line setting means that sets a no-entry area boundary line at a certain distance on the target area side from the outline of the obstacle formed by connecting the corners of the obstacle detected by the above-mentioned corner position detection means.
[0058] In addition, in the present invention, by configuring the system to include at least a Hough transform processing means and a corner position detection means, it is possible to generate corner coordinates of walls as obstacles and corner coordinates of pillars as obstacles. In other words, the no-entry area boundary setting means does not necessarily have to be provided. For example, a no-entry area boundary line around the edge of the obstacle may be set separately based on the created positions of the corners of the obstacle.
[0059] In addition, in the above, a Hough transform processing means is exemplified as the straight line detection means, which detects straight lines using normal Hough transform processing and probabilistic Hough transform processing on a two-dimensional image of the target area to be moved, on which outlines indicating the position of obstacles in the target area are drawn, but the straight line detection means may be means other than a Hough transform processing means. That is, the line detection means may be any means that detects lines in a two-dimensional image of the target area in which the outline of an obstacle in the target area is depicted. [Explanation of symbols]
[0060] A: moving target area, M: two-dimensional image, P: pillar, W: wall.
Claims
1. A movement target area information creation device that creates information on a movement target area in which a moving object is moved, comprising: The movement target area information creation device comprises: an obstacle position information acquisition means for acquiring position information of an obstacle present in the movement target area; The obstacle position information acquisition means includes: a line detection means for detecting a line on a two-dimensional image of the target area on which an outline of an obstacle in the target area is drawn; a corner position detection means for detecting a position of a corner of an obstacle based on an intersection point between the straight lines detected by the straight line detection means and an end point of the straight line detected by the straight line detection means; A movement target area information creating device comprising:
2. The moving target area information creation device according to claim 1, characterized in that the straight line detection means is a Hough transform processing means which performs straight line detection by normal Hough transform processing and probabilistic Hough transform processing on a two-dimensional image of the moving target area on which an outline indicating the position of an obstacle in the moving target area is drawn.
3. 3. The movement target area information creation device according to claim 2, wherein the corner position detection means detects the position of a corner of an obstacle based on the intersections of straight lines detected by normal Hough transform processing and the end points of straight lines detected by probabilistic Hough transform processing.
4. 4. The movement target area information creation device according to claim 1, further comprising a no-entry area boundary setting means for setting a no-entry area boundary line around the obstacle based on the position of a corner of the obstacle detected by the corner position detection means.
5. the obstacles in the movement target area are of a plurality of types; In the two-dimensional image, the outlines indicating the positions of the obstacles are shown in different colors depending on the type of obstacle, the obstacle position information acquisition means has an image creation means for creating a plurality of images showing the outline of each obstacle by identifying the color of the outline, The straight line detection means performs straight line detection on each image created by the image creation means, 5. The movement target area information creation device according to claim 4, characterized in that the no-entry area boundary line setting means sets a no-entry area boundary line at a position on the movement target area side that is a certain distance away from the outline of the obstacle formed by connecting the corners of the obstacle detected by the corner position detection means.
6. the obstacles in the movement target area are walls and pillars; In the two-dimensional image, a contour line indicating a position of a wall and a contour line indicating a position of a pillar are shown in different colors; the obstacle position information acquisition means has an image creation means for creating a wall image from which only the outline lines indicating the positions of walls are extracted and a pillar image from which only the outline lines indicating the positions of pillars are extracted by identifying the colors of the outline lines, the straight line detection means performs straight line detection on the wall image and the pillar image created by the image creation means, The movement target area information creation device according to claim 4, characterized in that the no-entry area boundary setting means sets a no-entry area boundary line at a wall edge at a position a certain distance away from the outer shape of a wall formed by connecting the wall corners detected by the corner position detection means, and sets a no-entry area boundary line at a pillar edge at a position a certain distance away from the outer shape of a pillar formed by connecting the corners of the pillar detected by the corner position detection means.
7. A movement target area information creation processing program for creating information on a movement target area in which a moving object is moved, comprising: an obstacle position information acquisition processing program for acquiring position information of an obstacle present in the movement target area; The obstacle position information acquisition processing program Computer, a line detection means for detecting a line on a two-dimensional image of the target area on which an outline of an obstacle in the target area is drawn; a corner position detection means for detecting a position of a corner of an obstacle based on an intersection point between the straight lines detected by the straight line detection means and an end point of the straight line detected by the straight line detection means; A movement target area information creation processing program that functions as
8. A program for causing a computer to function as the straight line detection means includes: The moving target area information creation processing program according to claim 7, characterized in that it is a program that functions as a Hough transform processing means that performs straight line detection using normal Hough transform processing and probabilistic Hough transform processing on a two-dimensional image of the moving target area in which an outline indicating the position of an obstacle in the moving target area is drawn.
9. A program for causing a computer to function as the angular position detection means includes: The movement target area information creation processing program according to claim 8, characterized in that it is a program that functions as a means for detecting the positions of obstacle corners based on the intersections between straight lines detected by normal Hough transform processing and the end points of straight lines detected by probabilistic Hough transform processing.
10. A no-entry area boundary setting processing program is provided, The no-entry area boundary setting processing program is 10. The movement target area information creation processing program according to claim 7, characterized in that the computer is made to function as a no-entry area boundary line setting means for setting a no-entry area boundary line around an obstacle based on the position of a corner of the obstacle detected by the corner position detection means.
11. the obstacles in the movement target area are of a plurality of types, and in the two-dimensional image, outlines indicating the positions of the obstacles are shown in different colors for each type of obstacle; The obstacle position information acquisition processing program includes: Computer, an image creating means for creating a plurality of images showing the outline of each obstacle by identifying the color of the outline; a straight line detection means for detecting straight lines in each image created by the image creation means; The movement target area information creation processing program according to claim 7, characterized in that the program functions as a no-entry area boundary setting means for setting a no-entry area boundary line at a position a certain distance away on the movement target area side from the outline of the obstacle formed by connecting the corners of the obstacle detected by the corner position detection means.
12. the obstacles in the movement target area are a wall and a pillar, and in the two-dimensional image, a contour line indicating the position of the wall and a contour line indicating the position of the pillar are shown in different colors; The obstacle position information acquisition processing program includes: Computer, an image creating means for creating a wall image from which only the outline lines indicating the positions of walls are extracted and a pillar image from which only the outline lines indicating the positions of pillars are extracted by identifying the colors of the outline lines; a line detection means for detecting a line in the wall image and the pillar image created by the image creation means; The movement target area information creation processing program according to claim 7, characterized in that the program functions as the no-entry area boundary setting means for setting a no-entry area boundary line at the edge of a wall at a position a certain distance away from the outline of a wall formed by connecting the wall corners detected by the corner position detection means, and for setting a no-entry area boundary line at the edge of a pillar at a position a certain distance away from the outline of a pillar formed by connecting the corners of the pillar detected by the corner position detection means.
Citation Information
Patent Citations
Movement control method of moving body and movement control system of moving body
JP2020154400A