IMAGE PROCESSING DEVICE, STEREO CAMERA DEVICE, MOBILE BODY, AND IM

By employing fitting functions to adjust for contours near boundaries and using pixel and half-pixel displacements, the system effectively reduces sub-pixel errors in stereo image processing, improving the accuracy of real-space position calculations and object detection.

JP7569173B2Active Publication Date: 2024-10-17KYOCERA CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2020127696
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-07-28
Publication Date
2024-10-17
Estimated Expiration
2040-07-28

AI Technical Summary

Technical Problem

Existing image processing systems using stereo cameras suffer from sub-pixel errors due to systematic errors like pixel locking, especially when comparing small images around the search area, which affect the accuracy of real-space position calculations.

Method used

The system employs a method to reduce sub-pixel errors by creating first and second fitting functions that account for the relationship between the search and comparison areas, adjusting for contours near boundaries, and using pixel-by-pixel and half-pixel displacements to calculate parallax accurately.

Benefits of technology

This approach significantly reduces sub-pixel errors in stereo image processing, enhancing the accuracy of real-space position calculations and improving the precision of systems like automatic cruise control and object detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007569173000001
    Figure 0007569173000001
  • Figure 0007569173000002
    Figure 0007569173000002
  • Figure 0007569173000003
    Figure 0007569173000003
Patent Text Reader

Abstract

To reduce subpixel errors.SOLUTION: An image processing device 10 includes an acquisition unit 17 and a control unit 20. The acquisition unit 17 acquires a standard image and a reference image. The control unit 20 creates a first fitting function based on a plurality of dissimilarities between a search area and a comparison area. The control unit 20 creates a second fitting function based on the plurality of dissimilarities between the search area and the comparison area in a state where either the standard image or the reference image is displaced by 0.5 pixel in a baseline length direction. The control unit 20 calculates the parallax of a subject image based on the first fitting function and the second fitting function. When a contour exists near a boundary of the search area on the baseline length direction side, the first fitting function is created by excluding the dissimilarity of a movement amount to the position where the contour exists relative to the comparison area. When a contour exists near the boundary of the search area, the second fitting function is created by excluding the dissimilarity of the movement amount to the position where the contour exists relative to the comparison area.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an image processing device, a stereo camera device, a moving object, and an image processing method. [Background technology]

[0002] It is known that the position of an object in real space can be calculated based on the difference in position (parallax) of the same object in each stereo image captured by a stereo camera. In a digital stereo camera, the position in an image is recognized in pixel units, so it is not possible to calculate a position in real space that corresponds to a parallax of less than one pixel. It is known that sub-pixel estimation is performed to estimate a parallax of less than one pixel, but a systematic error called pixel locking can occur in sub-pixel estimation. Therefore, methods for reducing systematic errors have been proposed, such as the EEC method, which uses an interpolated image in which one of a pair of images is displaced by a distance of 0.5 pixels (see Patent Document 1). [Prior art documents] [Patent documents]

[0003] [Patent Document 1] International Publication No. 2004 / 063991 Summary of the Invention [Problem to be solved by the invention]

[0004] However, even if the systematic errors are reduced, sub-pixel errors may occur depending on small images around the search area of ​​the pair of images being compared.

[0005] Therefore, an object of the present disclosure, made in consideration of the problems with the conventional techniques as described above, is to provide an image processing device, a stereo camera device, a moving object, and an image processing method that reduce sub-pixel errors. [Means for solving the problem]

[0006] In order to solve the above-mentioned problems, an image processing apparatus according to a first aspect comprises: An acquisition unit that acquires a standard image and a reference image captured by a stereo camera; a control unit that creates a first fitting function indicating a relationship between the degree of difference between the search area and the comparison area with respect to an amount of movement of the comparison area in the baseline length direction, based on a plurality of degrees of difference between the search area in the baseline image and a comparison area displaced in the reference image by pixel units along the baseline length direction of the stereo camera, creates a second fitting function indicating a relationship between the degree of difference between the search area and the comparison area with respect to an amount of movement of the comparison area in the baseline length direction, based on a plurality of degrees of difference between the search area in the baseline image and a comparison area displaced in the reference image by pixel units along the baseline length direction, with one of the baseline image and the reference image displaced by 0.5 pixels in the baseline length direction, and calculates a parallax of a subject image in the search area based on the first fitting function and the second fitting function, The control unit is when a contour of a subject image intersecting the baseline length direction is present near a boundary of the search area in the reference image on the side of the baseline length direction, a difference between a movement amount to a position where the contour exists and a comparison area is excluded to create the first fitting function; When one of the standard image and the reference image is displaced by 0.5 pixels in the baseline length direction and a contour of a subject image that intersects with the baseline length direction is present near the boundary of the search area in the standard image on the baseline length direction side, the second fitting function is created by excluding the degree of difference between the amount of movement to the position where the contour exists and the comparison area.

[0007] Moreover, a stereo camera device according to a second aspect of the present invention comprises: A stereo camera that captures a standard image and a reference image; an image processing device that creates a first fitting function indicating a relationship between the degree of difference between the search area and the comparison area with respect to an amount of movement of the comparison area in the baseline length direction, based on a plurality of degrees of difference between the search area in the baseline image and a comparison area displaced in the reference image by pixel units along the baseline length direction of the stereo camera, creates a second fitting function indicating a relationship between the degree of difference between the search area and the comparison area with respect to an amount of movement of the comparison area in the baseline length direction, based on a plurality of degrees of difference between the search area in the baseline image and a comparison area displaced in the reference image by pixel units along the baseline length direction, with one of the baseline image and the reference image displaced by 0.5 pixels in the baseline length direction, and calculates a parallax of a subject image in the search area based on the first fitting function and the second fitting function, The image processing device includes: when a contour of a subject image intersecting the baseline length direction is present near a boundary of the search area in the reference image on the side of the baseline length direction, a difference between a movement amount to a position where the contour exists and a comparison area is excluded to create the first fitting function; When one of the standard image and the reference image is displaced by 0.5 pixels in the baseline length direction and a contour of a subject image that intersects with the baseline length direction is present near the boundary of the search area in the standard image on the baseline length direction side, the second fitting function is created by excluding the degree of difference between the amount of movement to the position where the contour exists and the comparison area.

[0008] Moreover, a moving body according to a third aspect of the present invention is a stereo camera device including: a stereo camera which captures a standard image and a reference image; and an image processing device which creates a first fitting function indicating a relationship of a degree of dissimilarity between the search area and the comparison area with respect to an amount of movement of the comparison area in the baseline length direction based on a plurality of degrees of dissimilarity between a search area in the standard image and a comparison area displaced in the reference image by pixel units along a baseline length direction of the stereo camera; creates a second fitting function indicating a relationship of a degree of dissimilarity between the search area and the comparison area with respect to an amount of movement of the comparison area in the baseline length direction based on a plurality of degrees of dissimilarity between the search area in the standard image and a comparison area displaced in the reference image by pixel units along the baseline length direction while one of the standard image and the reference image is displaced by 0.5 pixels in the baseline length direction; and calculates a parallax of a subject image in the search area based on the first fitting function and the second fitting function, The image processing device includes: when a contour of a subject image intersecting the baseline length direction is present near a boundary of the search area in the reference image on the side of the baseline length direction, a difference between a movement amount to a position where the contour exists and a comparison area is excluded to create the first fitting function; When one of the standard image and the reference image is displaced by 0.5 pixels in the baseline length direction and a contour of a subject image that intersects with the baseline length direction is present near the boundary of the search area in the standard image on the baseline length direction side, the second fitting function is created by excluding the degree of difference between the amount of movement to the position where the contour exists and the comparison area.

[0009] Further, an image processing method according to a fourth aspect comprises: A step of capturing a standard image and a reference image by a stereo camera; a step of excluding a degree of difference between the search area in the standard image and a comparison area displaced in pixel units along a baseline length direction of the stereo camera in a case where a contour of a subject image intersecting the baseline length direction is present near a boundary of the search area in the standard image on the baseline length direction side, the degree of difference between the search area in the standard image and the comparison area of ​​a movement amount to a position where the contour exists; creating a first fitting function that indicates a relationship between the dissimilarity of the search region and the comparison region with respect to an amount of movement of the comparison region in the baseline length direction, based on the excluded dissimilarity; a step of excluding a degree of difference between the search area of ​​the standard image and a comparison area displaced in pixel units along the baseline length direction in the reference image while displacing one of the standard image and the reference image by 0.5 pixels in the baseline length direction, when a contour of a subject image intersecting the baseline length direction exists near a boundary of the search area in the standard image on the baseline length direction side, from a plurality of degrees of difference between the search area of ​​the standard image and a comparison area displaced in pixel units along the baseline length direction in the reference image, the degree of difference between the comparison area and a movement amount to a position where the contour exists; creating a second fitting function that indicates a relationship between the dissimilarity of the search region and the comparison region with respect to an amount of movement of the comparison region in the baseline length direction, based on the excluded dissimilarity; and calculating a disparity of the subject image within the search area based on the first fitting function and the second fitting function. Effect of the Invention

[0010] According to the image processing device, stereo camera device, moving object, and image processing method according to the present disclosure configured as described above, sub-pixel errors can be reduced. [Brief description of the drawings]

[0011] [Figure 1] 1 is a block diagram showing a schematic configuration of a stereo camera device including an image processing device according to an embodiment of the present invention. [Diagram 2] 2 is a side view conceptually illustrating the position of the stereo camera in FIG. 1 on the moving object. [Diagram 3] 2 is a front view conceptually illustrating the position of the stereo camera in FIG. 1 on the moving object. [Figure 4] 10 is a diagram illustrating an example of a search area in a reference image and the contour of a subject image existing in the vicinity of the search area; [Diagram 5] FIG. 13 is a diagram illustrating a specific position near the boundary. [Figure 6]FIG. 13 is a diagram showing an example of a search region in which a vertical contour exists near a boundary on the base line length direction side; [Figure 7] 7 is a graph plotting the degree of dissimilarity between the search region in FIG. 6 and a comparison region moved to the vicinity of the amount of movement at which the degree of dissimilarity is minimal. [Figure 8] 13 is a diagram showing an example of a search region in which a vertical contour exists near the boundary on the baseline length side in an image displaced by 0.5 pixels in the baseline length direction from a reference image. FIG. [Figure 9] 9 is a graph plotting the degree of dissimilarity between the search region in FIG. 8 and a comparison region moved to the vicinity of the amount of movement at which the degree of dissimilarity is minimal. [Figure 10] 4 is a flowchart for explaining a position calculation process executed by a control unit in FIG. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] Hereinafter, an embodiment of an image processing device to which the present disclosure is applied will be described with reference to the drawings.

[0013] As shown in Fig. 1, a stereo camera device 11 including an image processing device 10 to which the present disclosure is applied includes a stereo camera 12 and the image processing device 10. As shown in Fig. 2, the stereo camera device 11 calculates the position of a subject corresponding to the subject image included in a stereo image in a world coordinate system based on a moving object 13, based on a captured stereo image. As shown in Fig. 1, the stereo camera device 11 notifies an external device 14 of the position of the subject in the world coordinate system. The external device 14 includes a driving support device such as an auto cruise control, a driving support device such as an automatic braking device, a notification device that notifies the distance to the subject, and a warning device that issues a warning.

[0014] The moving body 13 may include, for example, vehicles, ships, aircraft, etc. The vehicles may include, for example, automobiles, industrial vehicles, railroad vehicles, lifestyle vehicles, fixed-wing aircraft running on runways, etc. The automobiles may include, for example, passenger cars, trucks, buses, motorcycles, trolley buses, etc. The industrial vehicles may include, for example, industrial vehicles for agriculture and construction. The industrial vehicles may include, for example, forklifts, golf carts, etc. The industrial vehicles for agriculture may include, for example, tractors, cultivators, transplanters, binders, combines, lawnmowers, etc. The industrial vehicles for construction may include, for example, bulldozers, scrapers, excavators, cranes, dump trucks, road rollers, etc. The vehicles may include those that run by human power. The classification of vehicles is not limited to the above examples. For example, automobiles may include industrial vehicles that can run on roads. The same vehicle may be included in multiple classifications. The ships may include, for example, marine jets, boats, and tankers. Aircraft may include, for example, fixed wing aircraft, rotorcraft, etc.

[0015] The stereo camera 12 and the image processing device 10 can communicate with each other by wired or wireless communication. The stereo camera 12 and the image processing device 10 may communicate with each other via a network. The network may include, for example, a wired or wireless LAN (Local Area Network) or CAN (Controller Area Network). The stereo camera 12 and the image processing device 10 may be housed in the same housing and configured as an integrated unit. The stereo camera 12 and the image processing device 10 may be located in a moving object 13 and configured to be able to communicate with an ECU (Electronic Control Unit) in the moving object 13.

[0016] 2, the stereo camera device 11 is mounted on, for example, a moving body 13. The stereo camera 12 is installed, for example, so as to capture an image in front of the moving body 13. The stereo camera 12 is disposed, for example, so that an optical axis OX of at least one of a plurality of cameras included in the stereo camera 12, which will be described later, is approximately parallel to the front-rear direction of the moving body 13.

[0017] The stereo camera 12 may be mounted in various locations on the moving body 13. For example, the stereo camera 12 is mounted inside the moving body 13 and captures an image of the outside of the moving body 13 through the windshield. The stereo camera 12 is disposed in front of the rearview mirror or on the dashboard. The stereo camera 12 may be fixed to any of the front bumper, fender grille, side fender, light module, and bonnet of the moving body 13.

[0018] The stereo camera 12 includes a plurality of cameras having a parallax with respect to each other. As shown in FIG. 1, the stereo camera 12 includes, for example, a first camera 15 and a second camera 16. The stereo camera 12 can capture an image of an object from a plurality of directions by using a plurality of cameras in cooperation with each other. The stereo camera 12 may include a plurality of cameras in a single housing. The stereo camera 12 may include two or more cameras that are independent of each other and positioned apart from each other. The stereo camera 12 is not limited to a plurality of cameras that are independent of each other. In the present disclosure, for example, a camera having an optical mechanism that guides light incident at two separate points to one light receiving element may be adopted as the stereo camera 12.

[0019] In the stereo camera 12, the first camera 15 and the second camera 16 are positioned so that their optical axes OX face in directions that allow them to capture the same subject. The optical axes OX and positions of the first camera 15 and the second camera 16 are determined so that the captured images include at least the same subject image. The optical axes OX of the first camera 15 and the second camera 16 are, for example, parallel to each other. The optical axes OX being parallel is not limited to being strictly parallel, and may allow for misalignment in assembly, misalignment in installation, and misalignment over time. The optical axes OX of the first camera 15 and the second camera 16 are not limited to being parallel, and may face in different directions.

[0020] The first camera 15 and the second camera 16 are positioned apart in a direction intersecting the optical axis OX. As shown in FIG. 3, the first camera 15 and the second camera 16 are positioned along the left-right direction in a posture determined when they are attached to the moving body 13. Due to the difference in the positions of the first camera 15 and the second camera 16, the positions of the objects corresponding to each other are different in two images captured by each camera. The base image generated by the first camera 15 and the reference image generated by the second camera 16 are stereo images captured from different viewpoints. The first camera 15 and the second camera 16 capture images of the object at a predetermined frame rate (e.g., 30 fps).

[0021] The first camera 15 and the second camera 16 each include an optical system that defines an optical axis OX and an imaging element. The first camera 15 and the second camera 16 each have a different optical axis OX. The optical system includes a lens or a mirror, and forms an image of a subject on a light receiving surface of the imaging element. The imaging element is, for example, a charge-coupled device image sensor (CCD image sensor) or a complementary MOS image sensor (CMOS image sensor). The imaging elements of the first camera 15 and the second camera 16 may be present in the same plane perpendicular to the optical axis OX of each camera. The imaging elements of the first camera 15 and the second camera 16 each have a plurality of pixels arranged in a matrix. In the imaging elements of the first camera 15 and the second camera 16, the row direction in which the pixels are arranged may be parallel to the base length direction of the stereo camera 12. The base line length direction is the direction of a straight line passing through an intersection of an optical axis OX of the first camera 15 to the light receiving surface of the imaging element and an intersection of an optical axis OX of the second camera 16 to the light receiving surface of the imaging element. The first camera 15 and the second camera 16 generate an image formed on the imaging element as a signal. The first camera 15 and the second camera 16 may perform any image processing such as distortion correction, brightness adjustment, contrast adjustment, gamma correction, etc. on the captured image.

[0022] 1, the image processing device 10 includes an acquisition unit 17, an output unit 18, a memory 19, and a control unit 20. The image processing device 10 may be disposed at any position within a mobile object 13. The image processing device 10 is disposed, for example, within the dashboard of the mobile object 13.

[0023] The acquisition unit 17 is an input interface of the image processing device 10 that acquires information from the stereo camera 12 and an external device. The acquisition unit 17 employs a physical connector and a wireless communication device. The physical connector includes an electrical connector compatible with transmission by electrical signals, an optical connector compatible with transmission by optical signals, and an electromagnetic connector compatible with transmission by electromagnetic waves. The electrical connector includes a connector conforming to IEC60603, a connector conforming to the USB standard, a connector compatible with an RCA terminal, a connector compatible with an S terminal defined in EIAJ CP-1211A, a connector compatible with a D terminal defined in EIAJ RC-5237, a connector conforming to the HDMI (registered trademark) standard, and a connector compatible with a coaxial cable including BNC. The optical connector includes various connectors conforming to IEC 61754. The wireless communication device includes a wireless communication device conforming to each standard including Bluetooth (registered trademark) and IEEE802.11. The wireless communication device includes at least one antenna.

[0024] The acquisition unit 17 acquires, as signals, the standard image and the reference image generated by the stereo camera 12 through imaging. The acquisition unit 17 passes the acquired standard image and reference image to the control unit 20. The acquisition unit 17 may be compatible with a transmission method for the imaging signal of the stereo camera 12. The acquisition unit 17 may be connected to an output interface of the stereo camera 12 via a network.

[0025] The output unit 18 is an output interface of the image processing device 10 that can output the position of the subject in the world coordinate system calculated by the image processing device 10 to another device in the mobile object 13 or another mobile object, an external device 14 outside the mobile object 13 such as a roadside unit. The output unit 18 includes various interfaces corresponding to wired and wireless communication, similar to the acquisition unit 17. The output unit 18 has, for example, a CAN interface and communicates with other devices in the mobile object 13.

[0026] The memory 19 includes any storage device, such as a random access memory (RAM) and a read only memory (ROM), etc. The memory 19 stores various programs that cause the control unit 20 to function and various information that the control unit 20 uses.

[0027] The control unit 20 includes one or more processors and a memory. The processor may include a general-purpose processor that loads a specific program to execute a specific function, and a dedicated processor specialized for a specific process. The dedicated processor may include an application specific integrated circuit (ASIC). The processor may include a programmable logic device (PLD). The PLD may include a field-programmable gate array (FPGA). The control unit 20 may be either a system-on-a-chip (SoC) or a system in a package (SiP) in which one or more processors work together.

[0028] The control unit 20 creates the first fitting function and the second fitting function as described below.

[0029] A method for creating the first fitting function will be described below. The control unit 20 designates an arbitrary region in the reference image as a search region. For example, the control unit 20 designates an arbitrary pixel as a pixel of interest and designates an area of ​​a predetermined size including the pixel of interest as the search region. The search region may be, for example, an area of ​​m rows and n columns (m and n are natural numbers) centered on the pixel of interest.

[0030] The control unit 20 designates, as a comparison region, a region in the reference image that is displaced in pixel units from the position of the search region along the baseline length direction. The control unit 20 designates a plurality of comparison regions by displacing the search region by one pixel in both directions along the baseline length direction.

[0031] The control unit 20 calculates the degree of difference between the partial images included in the search area and the comparison area. The degree of difference is an index that changes according to the difference in pixel values ​​of the pixels that make up the partial images, such as SAD (Sum of Absolute Difference) or SSD (Sum of Squared Difference). The control unit 20 calculates multiple degrees of difference for each displaced position.

[0032] As shown in FIG. 4, the control unit 20 determines whether or not a contour CT intersecting in the baseline length direction exists near the boundary on the baseline length direction side of the search area SR in the reference image SI. The control unit 20 may determine whether or not a contour CT intersecting in the baseline length direction exists using, for example, a Sobel filter. In FIG. 4, the search area SR is drawn large with respect to the reference image SI for ease of understanding, but in reality, it may be small. As shown in FIG. 5, the vicinity of the boundary refers to, for example, the position of an adjacent pixel outside the boundary and an adjacent pixel separated by one pixel with respect to the boundary on the baseline length direction side of the search area SR. The contour CT intersecting in the baseline length direction may be, for example, a contour CT perpendicular to the baseline length direction.

[0033] When a contour CT that crosses the base line direction is present near the boundary on the base line direction side of the search area SR, the control unit 20 calculates a movement amount to bring the contour CT to the boundary in the reference image. The presence of the contour CT at the boundary means, for example, that the contour CT is present at a pixel adjacent to the boundary inside the boundary on the side where the contour CT is present in the search area SR.

[0034] In general, the comparison region in which the dissimilarity is an extreme value is the most similar to the search region SR among the comparison regions in which the dissimilarity is calculated. The extreme value of the dissimilarity is a minimum value in a configuration in which the dissimilarity increases as the difference between the search region SR and the comparison region increases, such as SAD and SSD. The extreme value of the dissimilarity is a maximum value in a configuration in which the dissimilarity decreases as the difference between the search region SR and the comparison region increases. Therefore, in the comparison region in which the dissimilarity is an extreme value, the contour CT of the subject image that crosses the baseline length direction is present near the boundary on the baseline length side. Therefore, the control unit 20 calculates the amount of movement that causes the contour CT to exist at the boundary in the reference image by adding the distance between the contour CT detected near the boundary on the baseline length side of the comparison region and the boundary to the amount of movement of the comparison region in which the dissimilarity is an extreme value.

[0035] The control unit 20 creates a first fitting function by excluding the dissimilarity of the comparison region, which is the amount of movement that causes the contour CT to exist at the boundary in the reference image, from among the dissimilarity calculated for each of the above-mentioned multiple comparison regions. The first fitting function is a function that indicates the relationship of the dissimilarity to the amount of movement of the comparison region in the base line length direction relative to the search region SR. The first fitting function is created by performing parabolic fitting or the like so that it passes through the dissimilarity corresponding to the amount of movement.

[0036] For example, as shown in Fig. 6, the creation of the first fitting function for a search area SR in which a contour CT exists vertically in an adjacent pixel separated by one pixel from the boundary on one side of the baseline length direction (the right side in the drawing) will be described. If the dissimilarity of a comparison area to the search area SR, which is moved by x pixels in the baseline length direction with respect to a comparison area where the dissimilarity is a minimum value as a reference, is S(x), the dissimilarity s(x) for discrete amounts of movement of the comparison area CR is plotted on a graph as shown in Fig. 7. Compared to the dissimilarity of a comparison area CR with a movement amount of -2 to 1 in which the contour CT does not exist on the boundary, the dissimilarity of a comparison area CR with a movement amount of 2 in which the contour CT exists on the boundary is larger. The first fitting function is created by finding a curve passing through S(-2) to S(1) excluding S(2).

[0037] When the contour CT exists near the boundary only on one side of the base line length direction, the control unit 20 may create the first fitting function without excluding the dissimilarity. However, when creating the first fitting function without excluding the dissimilarity, the control unit 20 may determine the displacement direction in creating the second fitting function described later to be the opposite side to the one direction.

[0038] A method for creating the second fitting function will be described below. The control unit 20 displaces one of the standard image SI and the reference image by 0.5 pixels in the base line length direction. Displacing by 0.5 pixels means, for example, performing pixel interpolation by averaging pixel values ​​of pixels constituting the image adjacent to each other along the displacement direction to calculate a pixel value at a position displaced by 0.5 pixels. When a contour CT exists near the boundary only on one side of the base line length direction as described above, the displacement of 0.5 pixels may be in the opposite direction to the one direction. The displacement of one of the standard image SI and the reference image may not be the entire image, but may be the periphery of the search area SR and the comparison area CR for calculating the parallax.

[0039] The control unit 20 designates a search region SR that is the same size and at the same position in the entire image as when the first fitting function was created, with one of the standard image SI and the reference image displaced by 0.5 pixels in the baseline length direction. The size of the search region SR is the same as that of the search region SR when the first fitting function is created.

[0040] The control unit 20 designates an area in the reference image displaced by pixels from the position of the search area SR along the baseline length direction as a comparison area CR, with one of the standard image SI and the reference image displaced by 0.5 pixels in the baseline length direction. The control unit 20 calculates the degree of difference between the partial images included in the search area SR and the comparison area CR, with one of the standard image SI and the reference image displaced by 0.5 pixels in the baseline length direction.

[0041] The control unit 20 determines whether or not a contour CT that crosses the baseline length direction exists near the boundary of the search area SR in the baseline length direction in the base image SI, with one of the base image SI and the reference image displaced by 0.5 pixels in the base length direction. If a contour CT that crosses the baseline length direction exists near the boundary of the search area SR in the baseline length direction in the base image SI, with one of the base image SI and the reference image displaced by 0.5 pixels in the base length direction, the control unit 20 calculates a movement amount that causes the contour CT to exist at the boundary in the reference image.

[0042] The control unit 20 creates a second fitting function by excluding the dissimilarity of the comparison region CR, which is the amount of movement that causes the contour CT to exist at the boundary in the reference image, from the dissimilarity calculated for each of the above-mentioned multiple comparison regions CR while displacing one of the standard image SI and the reference image by 0.5 pixels in the baseline length direction. The second fitting function is a function that indicates the relationship of the dissimilarity to the amount of movement of the comparison region CR in the baseline length direction relative to the search region SR. The control unit 20 creates the second fitting function by the same method as that adopted to calculate the first fitting function, for example, among methods such as parabolic fitting.

[0043] For example, the creation of a second fitting function for a search area SR in which a contour CT exists vertically at a pixel adjacent to the boundary on one side of the above-mentioned base line length direction (the right side in the drawing) and separated by one pixel will be described. When the reference image SI is displaced by 0.5 pixels in the direction in which the contour CT exists, as shown in Fig. 8, the contour CT may exist at the position of a pixel adjacent to the boundary on the base line length direction side of the search area SR outside and at the position of a pixel adjacent to the boundary separated by one pixel. As described above, the pixel value resulting from the displacement of 0.5 pixels is calculated by averaging the values ​​of adjacent pixels. Therefore, the contour CT may exist in a pixel adjacent to a pixel in which the contour CT is detected before the displacement.

[0044] If the dissimilarity S(x) of a comparison region CR moved x pixels in the baseline length direction from a comparison region CR where the dissimilarity is at a minimum to a search region SR is taken as the reference, then the dissimilarity s(x) for discrete amounts of movement of the comparison region CR is plotted on a graph as shown in Fig. 9. Compared to the dissimilarity of comparison regions CR with movement amounts of -2 to 0 where no contour CT is present at the boundary, the dissimilarity of comparison regions CR with movement amounts of 1 and 2 where contour CT is present at the boundary is greater. The second fitting function is created by excluding S(1) and S(2) and finding a curve that passes through S(-2) to S(0).

[0045] The control unit 20 calculates the parallax of the subject image in the search region SR based on the first fitting function and the second fitting function. More specifically, the control unit 20 calculates, as the parallax, the movement amount at which the degree of difference is minimum in a fitting function obtained by summing or averaging the degrees of difference at the same movement amount between the first fitting function and the second fitting function.

[0046] The control unit 20 may calculate the position of the subject in the world coordinate system corresponding to the subject image in the search region SR based on the calculated parallax, exterior orientation parameters, and interior orientation parameters. The control unit 20 may control the output unit 18 to output the calculated position of the subject in the world coordinate system to the external device 14. The control unit 20 may sequentially designate a part of the reference image SI or the entire reference image SI as a comparison region CR and calculate the position of the subject for each pixel.

[0047] Next, the position calculation process executed by the control unit 20 in this embodiment will be described with reference to the flowchart of Fig. 10. The parallax calculation process starts every time the stereo camera 12 acquires one frame of the standard image SI and the reference image.

[0048] In step S100, the control unit 20 designates a search region SR from among undesignated regions among regions to be designated in the standard image SI. The control unit 20 also designates a plurality of comparison regions CR in the reference image. After designation, the process proceeds to step S101.

[0049] In step S101, the control unit 20 determines whether or not a contour CT exists near the boundary on the base line length direction side of the search region SR specified in step S100. If the contour CT does not exist, the process proceeds to step S102. If the contour CT exists, the process proceeds to step S105.

[0050] In step S102, the control unit 20 determines one of the base line length directions as the displacement direction. After the determination, the process proceeds to step S103.

[0051] In step S103, the control unit 20 displaces one of the standard image SI and the reference image by a movement amount of 0.5 pixels in the displacement direction determined in step S102. After the displacement, the process proceeds to step S104.

[0052] In step S104, the control unit 20 designates a search region SR in the standard image SI in the state displaced in step S103, and designates a plurality of comparison regions CR in the reference image. After designation, the process proceeds to step S112.

[0053] In step S105, the control unit 20 determines whether the contour CT, the presence of which was determined in step S101, exists only in one direction in the base line length direction. If the contour CT exists only in one direction, the process proceeds to step S106. If the contour CT exists in both directions, the process proceeds to step S107.

[0054] In step S106, the control unit 20 determines the direction of displacement to be the opposite direction to the direction in which the presence of the contour CT was determined in step S105. After the determination, the process proceeds to step S108.

[0055] In step S107, the control unit 20 determines one of the base line length directions as the displacement direction. After the determination, the process proceeds to step S108.

[0056] In step S108, the control unit 20 displaces one of the standard image SI and the reference image by a movement amount of 0.5 pixels in the displacement direction determined in step S106 or S107. After the displacement, the process proceeds to step S109.

[0057] In step S109, the control unit 20 designates a search region SR in the standard image SI in the state displaced in step S108, and designates a plurality of comparison regions CR in the reference image. After designation, the process proceeds to step S110.

[0058] In step S110, the control unit 20 calculates a shift amount for causing a contour CT in the reference image that is the same as the contour CT located near the boundary of the search area SR specified in step S100 to exist on the boundary. In addition, the control unit 20 calculates a shift amount for causing a contour CT in the reference image that is the same as the contour CT located near the boundary of the search area SR specified in step S109 to exist on the boundary, while the image is displaced in step S108. After the calculation, the process proceeds to step S111.

[0059] In step S111, the control unit 20 excludes the comparison region CR corresponding to the amount of movement calculated in step S110 from the comparison region CR used in calculating the dissimilarity. After the exclusion, the process proceeds to step S112.

[0060] In step S112, the control unit 20 calculates the degree of difference between the search area SR specified in step S100 and the comparison area CR specified in step S100 or the comparison area CR excluded in step S111 if there is a comparison area CR. In addition, the control unit 20 calculates the degree of difference between the search area SR specified in step S106 or step S109 and the comparison area CR specified in step S106 or step S109 or the comparison area CR excluded in step S111 if there is a comparison area CR. After the calculation, the process proceeds to step S113.

[0061] In step S113, the control unit 20 creates a first fitting function and a second fitting function based on the degree of dissimilarity calculated in step S112. After the first fitting function and the second fitting function are created, the process proceeds to step S114.

[0062] In step S114, the control unit 20 calculates the disparity based on the first fitting function and the second fitting function created in step S113. After calculating the disparity, the process proceeds to step S115.

[0063] In step S115, the control unit 20 calculates the position of the subject corresponding to the subject image included in the search area SR specified in step S100 based on the parallax, exterior orientation parameters, and interior orientation parameters calculated in step S114. After the calculation, the process proceeds to step S116.

[0064] In step S116, the control unit 20 controls the output unit 18 to output the position calculated in step S115 to the external device 14. After the output, the process proceeds to step S117.

[0065] In step S117, the control unit 20 determines whether all of the areas to be specified in the reference image SI have been specified as the search area SR. If some areas have not been specified, the process returns to step S100. If all of the areas to be specified have been specified, the parallax calculation process ends.

[0066] The image processing device 10 of the present disclosure having the above configuration calculates the disparity of the subject image in the search region SR based on a first fitting function based on multiple dissimilarities between the search region SR in the standard image SI and the comparison region CR in the reference image displaced in pixel units, and a second fitting function based on multiple dissimilarities between the search region SR in the standard image SI and the comparison region CR displaced in pixel units in a state in which one of the standard image SI and the reference image is displaced by 0.5 pixels in the baseline length direction. With such a configuration, in other words the EEC method, the image processing device 10 can reduce systematic errors in sub-pixel estimation.

[0067] In the image processing device 10 of the present disclosure, when a contour CT intersecting in the baseline length direction exists near the boundary on the baseline length side of the search area SR, the image processing device 10 creates a first fitting function by excluding the dissimilarity with the comparison area CR, which is the amount of movement to the position where the contour CT exists, and when a contour CT intersecting in the baseline length direction exists near the boundary on the baseline length side of the search area SR in a state in which one of the standard image SI and the reference image is displaced by 0.5 pixels in the baseline length direction, the image processing device 10 creates a second fitting function by excluding the dissimilarity of the comparison area CR, which is the amount of movement to the position where the contour CT exists. In a state in which the contour CT intersecting in the baseline length direction is located at the boundary of the comparison area CR, the dissimilarity generally deviates from the visual dissimilarity. Therefore, in a configuration in which a dissimilarity is calculated based on the relationship of the dissimilarity to the amount of movement of the comparison area CR relative to the search area SR, if a dissimilarity deviating from the visual dissimilarity is used to create the relationship, an error tends to occur. In particular, since the amount of movement where the dissimilarity becomes an extreme value corresponds to the dissimilarity, when the dissimilarity around the extreme value among the multiple discrete dissimilarity values ​​corresponding to the amount of movement displaced in pixel units deviates from the actual dissimilarity, the dissimilarity error becomes large. In response to such an event, the image processing device 10 having the above-mentioned configuration creates the first fitting function and the second fitting function by excluding the dissimilarity of the comparison region CR, which is the amount of movement to the position where the contour CT exists. Therefore, the image processing device 10 can further reduce the subpixel error because the first fitting function and the second fitting function are in line with the visual dissimilarity.

[0068] In addition, when a contour CT exists near the boundary on one side of the base line length direction of the search area SR in a state where one of the base image SI and the reference image is displaced by 0.5 pixels in the base line length direction, the image processing device 10 of the present disclosure creates a second fitting function based on the degree of difference between the search area SR of the base image SI in a state where one of the base image SI and the reference image is displaced in the opposite direction to the one direction, and the comparison area CR displaced in pixel units along the base line length direction in the reference image. With this configuration, the image processing device 10 sets the side opposite to the side where the contour CT exists along the base line length direction as the displacement direction, so that the degree of difference to be excluded for creating the second fitting function can be reduced. Therefore, the image processing device 10 can use many degrees of difference to create the second fitting function, so that the accuracy of creating the second fitting function can be improved. As a result, the image processing device 10 can further improve the subpixel error of the parallax.

[0069] Although the embodiments according to the present disclosure have been described based on the drawings and examples, it should be noted that those skilled in the art can easily make various modifications or corrections based on the present disclosure. Therefore, it should be noted that these modifications or corrections are included in the scope of the present disclosure. For example, the functions included in each component or each step can be rearranged so as not to be logically contradictory, and multiple components or steps can be combined into one or divided. Although the embodiments according to the present disclosure have been described mainly with respect to the device, the embodiments according to the present disclosure can also be realized as a method including steps executed by each component of the device. The embodiments according to the present disclosure can also be realized as a method, a program, or a storage medium on which a program is recorded, executed by a processor included in the device. It should be understood that these are also included in the scope of the present disclosure.

[0070] In this disclosure, descriptions such as "first" and "second" are identifiers for distinguishing the configuration. Configurations distinguished by descriptions such as "first" and "second" in this disclosure may exchange numbers in the configuration. For example, a first camera may exchange identifiers "first" and "second" with a second camera. The exchange of identifiers is performed simultaneously. The configurations remain distinguished even after the exchange of identifiers. Identifiers may be deleted. A configuration from which an identifier has been deleted is distinguished by a code. Descriptions of identifiers such as "first" and "second" in this disclosure should not be used solely to interpret the order of the configuration or to justify the existence of an identifier with a smaller number. [Explanation of symbols]

[0071] 10 Image processing device 11 Stereo camera device 12 Stereo Camera 13 Mobile 14 External device 15 First Camera 16 Second Camera 17 Acquisition Department 18 Output section 19. Memory 20 Control section CR comparison area CT Contour SR search area SI Reference Images

Claims

1. An acquisition unit that acquires a standard image and a reference image captured by a stereo camera; a control unit that creates a first fitting function indicating a relationship between the degree of difference between the search area and the comparison area with respect to an amount of movement of the comparison area in the baseline length direction, based on a plurality of degrees of difference between the search area in the baseline image and a comparison area displaced in the reference image by pixel units along the baseline length direction of the stereo camera, creates a second fitting function indicating a relationship between the degree of difference between the search area and the comparison area with respect to an amount of movement of the comparison area in the baseline length direction, based on a plurality of degrees of difference between the search area in the baseline image and a comparison area displaced in the reference image by pixel units along the baseline length direction, with one of the baseline image and the reference image displaced by 0.5 pixels in the baseline length direction, and calculates a parallax of a subject image in the search area based on the first fitting function and the second fitting function, The control unit is creating the first fitting function by excluding a difference between an amount of movement of the subject image to a position where the contour exists and a comparison area when the contour exists in the vicinity of a boundary of the search area in the reference image on the side of the baseline length direction; When a contour of a subject image intersecting the baseline length direction is present near a boundary in the baseline length direction of a search area in the standard image in a state in which one of the standard image and the reference image is displaced by 0.5 pixels in the baseline length direction, the second fitting function is created by excluding a degree of difference between a movement amount to a position where the contour exists and a comparison area. Image processing device.

2. 2. The image processing device according to claim 1, When the contour is present near a boundary in one direction in the baseline length direction of a search area in the standard image in a state in which one of the standard image and the reference image is displaced by 0.5 pixels in the baseline length direction, the control unit creates the second fitting function based on a degree of difference between the search area in the standard image in a state in which one of the standard image and the reference image is displaced by 0.5 pixels in the direction opposite to the one direction, and a comparison area displaced in pixel units along the baseline length direction in the reference image. Image processing device.

3. 3. The image processing device according to claim 1, The vicinity of the boundary is a position of a pixel adjacent to the boundary of the search area in the base line length direction and a pixel adjacent thereto with an interval of one pixel. Image processing device.

4. A stereo camera that captures a standard image and a reference image; an image processing device that creates a first fitting function indicating a relationship between the degree of difference between the search area and the comparison area with respect to an amount of movement of the comparison area in the baseline length direction, based on a plurality of degrees of difference between the search area in the baseline image and a comparison area displaced in the reference image by pixel units along the baseline length direction of the stereo camera, creates a second fitting function indicating a relationship between the degree of difference between the search area and the comparison area with respect to an amount of movement of the comparison area in the baseline length direction, based on a plurality of degrees of difference between the search area in the baseline image and a comparison area displaced in the reference image by pixel units along the baseline length direction, with one of the baseline image and the reference image displaced by 0.5 pixels in the baseline length direction, and calculates a parallax of a subject image in the search area based on the first fitting function and the second fitting function, The image processing device includes: creating the first fitting function by excluding a difference between an amount of movement of the subject image to a position where the contour exists and a comparison area when the contour exists in the vicinity of a boundary of the search area in the reference image on the side of the baseline length direction; When a contour of a subject image intersecting the baseline length direction is present near a boundary in the baseline length direction of a search area in the standard image in a state in which one of the standard image and the reference image is displaced by 0.5 pixels in the baseline length direction, the second fitting function is created by excluding a degree of difference between a movement amount to a position where the contour exists and a comparison area. Stereo camera device.

5. a stereo camera device including: a stereo camera which captures a standard image and a reference image; and an image processing device which creates a first fitting function indicating a relationship of the degree of difference between the search area and the comparison area with respect to an amount of movement of the comparison area in the baseline length direction based on a plurality of degrees of difference between a search area in the standard image and a comparison area which is displaced in the reference image by pixel units along a baseline length direction of the stereo camera; creates a second fitting function indicating a relationship of the degree of difference between the search area and the comparison area with respect to an amount of movement of the comparison area in the baseline length direction based on a plurality of degrees of difference between the search area of ​​the standard image and a comparison area which is displaced in the reference image by pixel units along the baseline length direction while one of the standard image and the reference image is displaced by 0.5 pixels in the baseline length direction; and calculates a parallax of a subject image in the search area based on the first fitting function and the second fitting function, The image processing device includes: creating the first fitting function by excluding a difference between an amount of movement of the subject image to a position where the contour exists and a comparison area when the contour exists in the vicinity of a boundary of the search area in the reference image on the side of the baseline length direction; When a contour of a subject image intersecting the baseline length direction is present near a boundary in the baseline length direction of a search area in the standard image in a state in which one of the standard image and the reference image is displaced by 0.5 pixels in the baseline length direction, the second fitting function is created by excluding a degree of difference between a movement amount to a position where the contour exists and a comparison area. Mobile body.

6. A step of capturing a standard image and a reference image by a stereo camera; a step of excluding a degree of difference between the search area in the standard image and a comparison area displaced in pixel units along a baseline length direction of the stereo camera in a case where a contour of a subject image intersecting the baseline length direction is present near a boundary of the search area in the standard image on the baseline length direction side, the degree of difference between the search area in the standard image and the comparison area of ​​a movement amount to a position where the contour exists; creating a first fitting function that indicates a relationship between the dissimilarity of the search region and the comparison region with respect to an amount of movement of the comparison region in the baseline length direction, based on the excluded dissimilarity; a step of excluding a degree of difference between the search area of ​​the standard image and a comparison area displaced in pixel units along the baseline length direction in the reference image while displacing one of the standard image and the reference image by 0.5 pixels in the baseline length direction, when a contour of a subject image intersecting the baseline length direction exists near a boundary of the search area in the standard image on the baseline length direction side, from a plurality of degrees of difference between the search area of ​​the standard image and a comparison area displaced in pixel units along the baseline length direction in the reference image; creating a second fitting function that indicates a relationship between the dissimilarity of the search region and the comparison region with respect to an amount of movement of the comparison region in the baseline length direction, based on the excluded dissimilarity; calculating a parallax of a subject image within the search area based on the first fitting function and the second fitting function. Image processing methods.

Citation Information

Patent Citations

  • Image processing device and control method thereof, distance detection device, imaging device, program

    JP2020021126A

  • Multi-parameter highly-accurate simultaneous estimation method in image sub-pixel matching and multi-parameter highly-accurate simultaneous estimation program

    WO2004063991A1