WO2021179772A1 - 标定方法、位置确定方法、装置、电子设备及存储介质 - Google Patents

标定方法、位置确定方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2021179772A1
WO2021179772A1 PCT/CN2020/142509 CN2020142509W WO2021179772A1 WO 2021179772 A1 WO2021179772 A1 WO 2021179772A1 CN 2020142509 W CN2020142509 W CN 2020142509W WO 2021179772 A1 WO2021179772 A1 WO 2021179772A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel coordinates
image
coordinate system
sample reference
reference object
Prior art date
Application number
PCT/CN2020/142509
Other languages
English (en)
French (fr)
Inventor
马政
黄瑞
闫国行
石建萍
Original Assignee
商汤集团有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 商汤集团有限公司 filed Critical 商汤集团有限公司
Priority to KR1020217024741A priority Critical patent/KR20210116507A/ko
Priority to SG11202111469TA priority patent/SG11202111469TA/en
Priority to JP2021546384A priority patent/JP2022528301A/ja
Publication of WO2021179772A1 publication Critical patent/WO2021179772A1/zh
Priority to US17/502,387 priority patent/US20220036587A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C25/00Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C3/00Measuring distances in line of sight; Optical rangefinders
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/002Measuring arrangements characterised by the use of optical techniques for measuring two or more coordinates
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • G01B11/03Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness by measuring coordinates of points
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying
    • G01C11/04Interpretation of pictures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30204Marker
    • G06T2207/30208Marker matrix

Definitions

  • the present disclosure relates to the field of computer vision technology, and in particular, to a calibration method, a position determination method, a device, an electronic device, and a storage medium.
  • the combination of traditional industry and information technology has brought convenience to people’s lives.
  • the combination of the automotive industry and information technology can produce smart cars that can drive autonomously. Ranging is a very important link.
  • visual sensors can obtain richer road structure environmental information, and the price is relatively low.
  • monocular visual ranging technology In visual ranging, monocular visual ranging technology has the characteristics of low cost, simple system installation, and good stability compared with multi-eye visual ranging technology, so it is widely used.
  • monocular vision ranging a homography matrix is needed. Based on the pixel coordinates of the photographed target in the image coordinate system and the homography matrix, the target in the world coordinate system can be obtained Based on the world coordinates of, the distance information between the target object and the preset location point can be obtained based on the world coordinates. Therefore, the accuracy of the homography matrix directly affects the accuracy of the ranging result.
  • the homography matrix is obtained by pre-calibration.
  • the world coordinates of the reference object in the world coordinate system are known, and the reference object needs to be selected from the image containing the reference object taken by the image acquisition device. To get its pixel coordinates in the image coordinate system.
  • manual selection is required. Due to visual errors, the selection result in the image is not accurate, which leads to inaccurate calibration results.
  • the present disclosure provides at least one calibration solution to improve the accuracy of the calibration of the image acquisition device.
  • an embodiment of the present disclosure provides a calibration method, including:
  • a straight line fitting is performed on the sample reference objects located on the same straight line, and the initial pixel coordinates participating in the fitting are performed based on the fitted straight line Correct to get the corrected pixel coordinates;
  • the homography matrix of the image acquisition device is determined.
  • the initial pixel coordinates of the sample reference object in the captured sample image in the image coordinate system can be corrected to obtain each sample.
  • the more accurate corrected pixel coordinates of the reference object in the image coordinate system so that the image acquisition device is calibrated based on the corrected pixel coordinates, and an accurate homography matrix can be obtained, that is, the accuracy of the calibration of the image acquisition device is improved.
  • a straight line fitting is performed on the sample reference objects located on the same straight line, and based on the fitted The straight line corrects the initial pixel coordinates participating in the fitting to obtain the corrected pixel coordinates, including:
  • the initial pixel coordinates of each sample reference object in the image coordinate system are corrected to obtain the intermediate pixel coordinates; and based on the intermediate pixel coordinates of each sample reference object, the alignment is located in the second direction
  • the sample reference objects on the straight line of are respectively fitted with a straight line to obtain a plurality of second straight lines, wherein the straight line along the first direction intersects the straight line along the second direction;
  • the corrected pixel coordinates are obtained.
  • the initial pixel coordinates of the sample reference object can be corrected based on the different straight lines to which the sample reference object belongs, such as selecting two different directions
  • the straight line gradually corrects the initial pixel coordinates of multiple sample reference objects to obtain more accurate corrected pixel coordinates.
  • the initial pixel coordinates include an initial first coordinate value and an initial second coordinate value, and the first coordinate axis corresponding to the initial first coordinate value and the first coordinate axis corresponding to the initial second coordinate value
  • the two coordinate axes are perpendicular to each other;
  • the initial pixel coordinates of each sample reference object in the image coordinate system are corrected to obtain the intermediate pixel coordinates, including:
  • linear fitting is performed on the sample reference objects located on the straight line along the second direction to obtain multiple second straight lines, including:
  • a straight line fitting is performed on the sample reference object located on a straight line along the second direction to obtain a plurality of second straight lines .
  • the obtaining the corrected pixel coordinates based on a plurality of the first straight lines and a plurality of the second straight lines includes:
  • the pixel coordinates corresponding to the intersections of the plurality of first straight lines and the plurality of second straight lines are used as the corrected pixel coordinates.
  • the embodiment of the present disclosure proposes a process of how to specifically correct the initial pixel coordinates of multiple sample reference objects, that is, first correct one of the initial pixel coordinates, and then perform the other coordinate value. Correction, and gradually get corrected coordinates with higher accuracy.
  • the first coordinate axis is an abscissa axis in an image coordinate system
  • the second coordinate axis is an ordinate axis in an image coordinate system
  • the first coordinate axis is an image
  • the second coordinate axis is the abscissa axis in the image coordinate system.
  • the method further includes:
  • test image For each test image, determine the test pixel coordinates of each test reference object in the test image in the image coordinate system;
  • the accuracy of the homography matrix is determined based on the real world coordinates of the test reference object and the test world coordinates in the plurality of test images.
  • the homography matrix can be corrected in time, for example, a new sample reference object can be selected for recalibration.
  • the embodiments of the present disclosure provide a location determination method, including:
  • the homography matrix of the image acquisition device Based on the pixel coordinates and the homography matrix of the image acquisition device, the world coordinates of the target object in the world coordinate system are determined, and the homography matrix of the image acquisition device adopts the calibration method described in the first aspect Sure.
  • the homography matrix can be used to accurately determine the world coordinates of the target in the world coordinate system.
  • the method further includes:
  • the distance between the target object and the preset position point is determined.
  • the homography matrix can be used to accurately determine the world coordinates of the target in the world coordinate system, and then determine the preset position point and The distance between the targets.
  • a calibration device including:
  • the image acquisition module is used to acquire the sample image taken by the image acquisition device
  • a first determining module configured to determine the initial pixel coordinates of a plurality of sample reference objects in the sample image in the image coordinate system based on the sample image;
  • the coordinate correction module is used to perform a straight-line fitting on the sample reference objects located on the same straight line based on the determined initial pixel coordinates of each sample reference object in the image coordinate system, and to perform a straight-line fitting for the sample reference objects on the
  • the combined initial pixel coordinates are corrected to obtain the corrected pixel coordinates
  • the second determining module is configured to determine the homography matrix of the image acquisition device based on the world coordinates of each sample reference object in the sample image in the world coordinate system and the obtained corrected pixel coordinates.
  • the coordinate correction module is used for:
  • the initial pixel coordinates of each sample reference object in the image coordinate system are corrected to obtain the intermediate pixel coordinates; and based on the intermediate pixel coordinates of each sample reference object, the alignment is located in the second direction
  • the sample reference objects on the straight line of are respectively fitted with a straight line to obtain a plurality of second straight lines, wherein the straight line along the first direction intersects the straight line along the second direction;
  • the corrected pixel coordinates are obtained.
  • the initial pixel coordinates include an initial first coordinate value and an initial second coordinate value, and the first coordinate axis corresponding to the initial first coordinate value and the first coordinate axis corresponding to the initial second coordinate value
  • the two coordinate axes are perpendicular to each other;
  • the coordinate correction module When the coordinate correction module is used to correct the initial pixel coordinates of each sample reference object in the image coordinate system based on a plurality of first straight lines to obtain intermediate pixel coordinates, it includes:
  • the coordinate correction module When the coordinate correction module is used to perform straight line fitting on the sample reference objects located on the straight line along the second direction based on the intermediate pixel coordinates of each sample reference object to obtain a plurality of second straight lines, it includes
  • a first straight line fitting is performed on the sample reference object located on a straight line along the second direction to obtain a plurality of second straight line.
  • the method when the coordinate correction module is used to obtain the corrected pixel coordinates based on a plurality of the first straight lines and a plurality of the second straight lines, the method includes:
  • the pixel coordinates corresponding to the intersections of the plurality of first straight lines and the plurality of second straight lines are used as the corrected pixel coordinates.
  • the first coordinate axis is an abscissa axis in an image coordinate system
  • the second coordinate axis is an ordinate axis in an image coordinate system
  • the first coordinate axis is an image
  • the second coordinate axis is the abscissa axis in the image coordinate system.
  • the second determining module is further configured to:
  • test image For each test image, determine the test pixel coordinates of each test reference object in the test image in the image coordinate system;
  • the accuracy of the homography matrix is determined.
  • embodiments of the present disclosure provide a location determining device, including:
  • the image acquisition module is used to acquire the target image obtained after the image acquisition device shoots the target object;
  • the first determining module is configured to determine the pixel coordinates of the target object in the image coordinate system based on the target image
  • the second determining module is configured to determine the world coordinates of the target in the world coordinate system based on the pixel coordinates and the homography matrix of the image acquisition device, and the homography matrix of the image acquisition device adopts the original Any calibration method provided in the disclosed embodiment is determined.
  • the second determining module is further configured to:
  • the distance between the target object and the preset position point is determined.
  • the present disclosure provides an electronic device, including a processor, a storage medium, and a bus.
  • the storage medium stores machine-readable instructions executable by the processor.
  • the processing The processor communicates with the storage medium through a bus, and the processor executes the machine-readable instructions to execute the steps of the calibration method described in the first aspect or the position determination method described in the second aspect.
  • the present disclosure provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and when the computer program is run by a processor, it executes the calibration method or the second The steps of the position determination method described in the second aspect.
  • the present disclosure provides a computer program product, which includes program instructions that, when executed by a processor, cause the processor to execute the calibration method described in the first aspect or the second The steps of the position determination method described in the aspect.
  • Fig. 1 shows a flow chart of a calibration method provided by an embodiment of the present disclosure
  • FIG. 2 shows a schematic diagram of a sample reference object array provided by an embodiment of the present disclosure in a world coordinate system
  • Fig. 3 shows a sample image corresponding to a sample reference object array provided by an embodiment of the present disclosure
  • FIG. 4 shows a flowchart of a method for correcting the initial pixel coordinates of a sample reference object provided by an embodiment of the present disclosure
  • FIG. 5 shows a flow chart of a method for testing the accuracy of a homography matrix provided by an embodiment of the present disclosure
  • Fig. 6 shows a flow chart of a method for determining a position provided by an embodiment of the present disclosure
  • FIG. 7 shows a schematic structural diagram of a calibration device provided by an embodiment of the present disclosure
  • FIG. 8 shows a schematic structural diagram of a position determining device provided by an embodiment of the present disclosure
  • FIG. 9 shows a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • FIG. 10 shows a schematic structural diagram of another electronic device provided by an embodiment of the present disclosure.
  • the principle of relying on image acquisition equipment for visual ranging is to determine the pixel coordinates of the target captured by the image acquisition device in the image coordinate system, and then Based on the homography matrix of the image acquisition device, determine the world coordinates of the target in the world coordinate system, and then determine the distance between the preset location point and the target according to the world coordinates of the preset location point and the world coordinates of the target object.
  • the preset position point here can be the origin of the set world coordinate system. Therefore, the accuracy of the homography matrix directly affects the accuracy of the ranging result.
  • the homography matrix is obtained by pre-calibration.
  • the world coordinates of the reference object in the world coordinate system are known, and the reference object needs to be selected from the image containing the reference object taken by the image acquisition device.
  • the reference object needs to be selected from the image containing the reference object taken by the image acquisition device.
  • To get its pixel coordinates in the image coordinate system When selecting the reference object in the image, it is usually selected manually. Due to the visual error, the selection result in the image is not accurate, which will cause the calibration result to be inaccurate.
  • the following embodiments of the present disclosure provide a method for correcting the pixel coordinates of a selected reference object.
  • the present disclosure provides a calibration method. After acquiring the sample image obtained by the image acquisition device shooting the sample reference object, first determine the initial pixel coordinates of the multiple sample reference objects in the image coordinate system, and then based on each The initial pixel coordinates of the sample reference object in the image coordinate system, a straight line fit is performed on the sample reference object located on a uniform straight line in the sample image, and the initial pixel coordinates participating in the fitting are corrected based on the fitted straight line to obtain the participation The corrected pixel coordinates of the fitted sample reference object in the image coordinate system.
  • the sample reference objects can be placed in advance, for example, the sample reference objects can be arranged in an array, so that the sample reference objects belonging to the same row or the sample reference objects belonging to the same column are located on a straight line in the world coordinate system , And then by fitting a straight line to the initial pixel coordinates of the sample reference object in the image coordinate system, that is, the initial pixel coordinates of each sample reference object in the image coordinate system can be corrected, and each sample reference object can be obtained in the image coordinate system.
  • the more accurate corrected pixel coordinates in the sample reference object the world coordinates of each sample reference object in the world coordinate system and the corrected pixel coordinates of each sample reference object in the image coordinate system are used to obtain accurate image acquisition equipment.
  • the homography matrix improves the accuracy of the calibration of image acquisition equipment.
  • the execution subject of the calibration method provided in the embodiment of the present disclosure is generally a computer device with data processing capability.
  • FIG. 1 is a schematic flowchart of a calibration method provided by an embodiment of the present disclosure, including the following steps S101 to S104:
  • S101 Acquire a sample image taken by an image acquisition device
  • S104 Determine the homography matrix of the image acquisition device based on the world coordinates of each sample reference object in the sample image in the world coordinate system and the obtained corrected pixel coordinates.
  • the sample image captured by the image acquisition device may be the sample image obtained after the sample reference object array is captured.
  • the image collection environment and the world coordinate system where the sample reference object is located can be set in advance, such as drawing multiple images on the ground. Or look for a place with multiple lane lines to form multiple straight lines L, and place multiple sample reference objects with the same shape on each straight line L.
  • the sample reference object here can be a cone reference object.
  • a sample reference object can be divided into multiple groups, and each group is located on the same straight line L.
  • multiple straight lines H need to be drawn so that each straight line H and each straight line L intersect, and the sample reference object is placed on the straight line L and the straight line.
  • a sample reference object array is obtained.
  • the sample reference object array includes sample reference objects that are collinear on multiple straight lines L, and at the same time, these sample reference objects are also collinear on multiple straight lines H.
  • the embodiment of the present disclosure proposes to establish a world coordinate system with the center point of the front axle of the vehicle or the mapping point of the center of the vehicle body on the ground as the origin, where the origin is the set position point, and the image acquisition device is located at the set position of the vehicle,
  • the world coordinate system as shown in Figure 2 is obtained.
  • each straight line L is parallel to the Y axis in the world coordinate system
  • each straight line H is parallel to the X axis in the world coordinate system.
  • the camera of the image acquisition device on the vehicle is adjusted to be parallel to the ground.
  • the image acquisition device shoots the sample reference object array in the Y-axis direction, the sample image as shown in FIG. 3 can be obtained.
  • the sample image can be placed in the image coordinate system, and the position of the vertebral reference object manually selected by the user in the image coordinate system tangent to the ground is determined.
  • the initial pixel coordinates of the sample reference object in the image coordinate system; or, the sample image can also be input into a pixel coordinate determination model trained in advance to determine the initial pixel coordinates of each sample reference object.
  • the pixel coordinate determination model can first perform image recognition based on the sample image, determine the position of the vertebral body reference object tangent to the ground, and then determine the position of each sample reference object in the image based on the determined position of the sample reference object in the image.
  • the initial pixel coordinates in the coordinate system can be performed.
  • the line segment between the sample reference objects in each first straight line does not intersect with the line segments between the sample reference objects in the other first straight lines.
  • multiple first straight lines may be parallel to each other, or , Multiple first straight lines intersect along the distance, but do not intersect at the position where the sample reference object is located.
  • the initial pixel coordinates obtained above are inaccurate due to human eye error or the error of the pixel coordinate determination model.
  • the initial pixel coordinates that should be on the same straight line may not be on the same straight line, so here you can First, perform straight line fitting on these initial pixel coordinates to obtain multiple first straight lines.
  • the line segments between the sample reference objects in the obtained multiple first straight lines are compared with the other first straight lines located in each sample.
  • the line segments between the reference objects do not intersect.
  • multiple first straight lines corresponding to the straight line L in Fig. 3 can be obtained, or the line corresponding to the straight line H in Fig. 3 can be obtained The multiple first straight lines.
  • the sample reference objects in the sample image can be grouped first to obtain multiple sets of sample reference objects, and each group of sample reference objects is in the world.
  • the coordinate system belongs to the same straight line.
  • the embodiment of the present disclosure divides the sample reference objects that belong to the same straight line L in the world coordinate system into a group, for example, the sample as shown in FIG. 3
  • the sample reference objects in the sample reference object array are divided into 4 groups, and the initial pixel coordinates corresponding to the 4 groups of sample reference objects are respectively fitted with straight lines to obtain 4 first straight lines.
  • a straight line can be fitted according to the least squares method. Specifically, the following formula (1), formula (2) and formula (3) can be used to obtain multiple first straight line corresponding The first straight line equation:
  • (x i , y i ) represents the initial pixel coordinates of the i-th sample reference object belonging to the same group of sample reference objects; n represents the sample reference object belonging to the same group includes n; x represents the corresponding reference object belonging to the same group of sample reference objects
  • the average value of the initial abscissa value Represents the average value of the initial ordinate values corresponding to the same group of sample reference objects; b, b 0 and b 1 represent the unknown parameters in the first straight line equation.
  • the unknown parameters b 0 and b 1 in the first straight line equation corresponding to the initial pixel coordinates of each set of parameters are obtained, namely
  • the straight line along the first direction intersects the straight line along the second direction.
  • the initial pixel coordinates include an initial first coordinate value and an initial second coordinate value, wherein the first coordinate axis corresponding to the initial first coordinate value and the second coordinate axis corresponding to the initial second coordinate value are perpendicular to each other.
  • the intermediate pixel coordinates when correcting the initial pixel coordinates of each sample reference object in the image coordinate system based on the multiple first straight lines to obtain the intermediate pixel coordinates, it may include:
  • the intermediate pixel coordinates of one of the sample reference objects include the initial first coordinate value and the intermediate second coordinate value of the sample reference object, that is, the initial correction of the initial pixel coordinates to obtain the intermediate pixel coordinates is actually the process of the sample reference object The process of correcting the initial second coordinate value.
  • the first coordinate axis may be the abscissa axis or the ordinate axis, and when the first coordinate axis is the abscissa axis in the image coordinate system, the second coordinate axis is the ordinate axis in the image coordinate system. Axis; or, when the first coordinate axis is the ordinate axis in the image coordinate system, the second coordinate axis is the abscissa axis in the image coordinate system.
  • the sample image in Figure 3 above includes a total of 20 sample reference objects.
  • the initial pixel coordinates of these 20 sample reference objects are (x 1 , y 1 ) ⁇ (x 20 , y 20 ), where each sample reference
  • the initial first coordinate value of the object can be x 1 ⁇ x 20
  • the initial second coordinate value can be y 1 ⁇ y 20
  • the first coordinate axis corresponding to the initial first coordinate value can be the abscissa axis in the image coordinate system
  • the second coordinate axis corresponding to the initial second coordinate value may be the ordinate axis in the image coordinate system
  • the initial first coordinate value of each sample reference object may be y 1 to y 20
  • the initial second coordinate value may be Is x 1 ⁇ x 20 , where the first coordinate axis corresponding to the initial first coordinate value can be the ordinate axis in the image coordinate system, and the second coordinate axis corresponding to the initial second coordinate value can be the abscissa in the image coordinate system
  • the initial first coordinate value substituted into the linear equation of the first straight line can be the initial abscissa value corresponding to the abscissa axis, or the initial ordinate value corresponding to the ordinate axis.
  • the accuracy of the horizontal coordinate value in the determined initial pixel coordinate is greater than that of the vertical coordinate value. Therefore, the embodiment of the present disclosure can first correct the ordinate value with lower accuracy, that is, substitute the initial abscissa value in the initial pixel coordinates of each sample reference object into the first straight line where the sample reference object is located.
  • the linear equation of obtains the intermediate second coordinate value, where the intermediate second coordinate value is the first corrected ordinate value corresponding to the initial ordinate value of the initial pixel coordinate of the sample reference object.
  • the initial first coordinate value and the intermediate second coordinate value of each sample reference object constitute the intermediate pixel coordinates.
  • the initial pixel coordinates for the above 20 sample reference objects are: (x 1 ,y 1 ) ⁇ (x 20 ,y 20 ).
  • the intermediate pixel coordinates of the corresponding 20 sample reference objects are obtained: (x 1 , y 1 ′) ⁇ (x 20 , y 20 ′).
  • a straight line fitting is performed on the sample reference object located on a straight line along the second direction to obtain a plurality of second straight lines.
  • each second straight line does not intersect with the line segment between each sample reference object in other second straight lines, and each second straight line is located between each sample reference object The line segment of intersects with the line segment located between the reference objects of each sample among the first straight lines.
  • the line segments between the sample reference objects in the obtained multiple second straight lines are compared with other first straight lines.
  • the line segments between the sample reference objects in the two straight lines do not intersect. For example, if the sample reference object is fitted with a straight line, multiple first straight line fittings are obtained corresponding to the straight line L in Fig. 3.
  • Straight line the sample reference object is fitted with a straight line, and the obtained multiple second straight lines corresponding to the straight line H in Fig. 3;
  • a straight line fitting is performed on the sample reference object, and multiple second straight lines corresponding to the straight line L in FIG. 3 are obtained.
  • the sample reference objects in the sample reference object array can be grouped according to the order to obtain multiple sets of sample reference objects, and each group of sample reference objects is in the world coordinate
  • the system belongs to the same straight line.
  • the grouping method of the sample reference objects is based on whether they belong to the same straight line H in the world coordinate system; on the contrary, if the first straight line fitting is performed, the grouping method of the sample reference objects is based on the world coordinate system. Whether they belong to the same straight line H in the coordinate system for grouping, when performing the second straight line fitting, the grouping method of the sample reference objects is grouped according to whether they belong to the same straight line L in the world coordinate system.
  • the sample reference objects when multiple first straight lines are obtained, the sample reference objects are grouped according to whether they belong to the same straight line L in the world coordinate system.
  • the sample reference objects are grouped.
  • the grouping method of is based on whether they belong to the same straight line H in the world coordinate system, that is, the sample reference objects that belong to the same straight line H in the world coordinate system are divided into a group, for example, for the sample image shown in Figure 3
  • the sample reference objects are divided into 5 groups, and the straight line fitting is performed for each group of sample reference objects to obtain 5 straight lines.
  • the second straight line fitting can be performed according to the least squares method. Specifically, multiple straight lines can be obtained according to the following formula (4), formula (5) and formula (6) The corresponding second straight line equation:
  • (x i , y i ') represents the intermediate pixel coordinates of the i-th sample reference object belonging to the same group of sample reference objects, and the intermediate pixel coordinates are composed of the initial abscissa value and the intermediate ordinate value; n represents belonging to the same group
  • the sample reference objects include n; x represents the average value of the initial abscissa values corresponding to the same group of sample reference objects; y'represents the average value of the intermediate ordinate values corresponding to the same group of sample reference objects, and the intermediate ordinate value is In order to perform the first straight line fitting to the sample reference object, the initial ordinate value is corrected to obtain the intermediate ordinate value; b, b 2 and b 3 represent the unknown parameters in the first straight line equation.
  • S403 Obtain corrected pixel coordinates based on the multiple first straight lines and the multiple second straight lines.
  • the pixel coordinates corresponding to the intersections of the multiple first straight lines and the multiple second straight lines may be used as the corrected pixel coordinates.
  • the corrected pixel coordinates of each sample reference object in the sample reference object array are obtained.
  • the intermediate pixel coordinates of the above 20 sample reference objects are: ( x 1 ,y 1 ') ⁇ (x 20 ,y 20 ')
  • the corrected pixel coordinates of the corresponding 20 sample reference objects are obtained: (x 1 ”, y 1 ”) ⁇ (x 20 ” ,y 20 ”).
  • the initial pixel coordinates of the sample reference object can be corrected based on the different straight lines to which the sample reference object belongs, such as selecting Two straight lines in different directions gradually correct the initial pixel coordinates of multiple sample reference objects to obtain more accurate corrected pixel coordinates. Specifically, it can be used in the process of correcting the initial pixel coordinates of multiple sample reference objects. In the initial pixel coordinates, one of the coordinate values can be corrected first, and then the other coordinate value can be corrected, so as to gradually obtain a corrected coordinate with higher accuracy.
  • step S104 after the corrected pixel coordinates of each sample reference object in the image coordinate system are obtained, it can be based on the world coordinates of each sample reference object in the world coordinate system and the image coordinate system of each sample reference object.
  • the world coordinates of each sample reference object in the array of recorded sample reference objects in the world coordinate system are: (X 1 , Y 1 ) ⁇ (X n , Y n ), and the world coordinate matrix is recorded as A, pixel coordinates
  • the matrix is C, and the homography matrix is B, which is expressed as follows:
  • the embodiments of the present disclosure can correct the initial pixel coordinates of each sample reference object in the image coordinate system, and obtain the more accurate corrected pixel coordinates of each sample reference object in the image coordinate system, so as to obtain the more accurate corrected pixel coordinates of each sample reference object in the image coordinate system.
  • the world coordinates of each sample reference object in the world coordinate system and the corrected pixel coordinates of each sample reference object in the image coordinate system to obtain an accurate homography matrix of the image acquisition device, which improves the accuracy of the calibration of the image acquisition device sex.
  • the accuracy of the determined homography matrix can also be tested. During the test, the following steps S501 to S504 can be performed:
  • S501 Acquire multiple test images taken by an image acquisition device.
  • the image acquisition device here is the same type of image acquisition device as the above-mentioned image acquisition device, and the shooting angle when shooting multiple test reference object arrays is the same as the above angle when acquiring the sample reference object array.
  • test reference object here is similar to that of the sample reference object, and will not be repeated here. Multiple different test reference object arrays can be set, so that the image acquisition device can shoot for each test reference object array to obtain multiple test images. .
  • the method of determining the test pixel coordinates of each test reference object in the test image in the image coordinate system is the same as the method described above for determining the corrected pixel coordinates of each sample reference object in the sample image in the image coordinate system. This will not be repeated here.
  • S503 Determine the test world coordinates of the test reference object in the world coordinate system based on the test pixel coordinates and the homography matrix.
  • test pixel coordinate matrix is formed based on the abscissa and ordinate values obtained from the test pixel coordinates, and the test pixel coordinate matrix and the homography matrix are input to the image acquisition device
  • the conversion equation between pixel coordinates and world coordinates is used to obtain the test world coordinates of each test reference object in the test image in the world coordinate system.
  • S504 Determine the accuracy of the homography matrix based on the real world coordinates and the test world coordinates of the test reference object in the multiple test images.
  • the embodiment of the present disclosure verifies the accuracy of the homography matrix to determine whether the accuracy of the obtained homography matrix satisfies the set conditions, so that when the accuracy of the homography matrix does not meet the set conditions, the accuracy of the homography matrix can be checked in time.
  • the homography matrix is corrected, for example, the calibration process for the image acquisition device is performed again, that is, the process of steps S101 to S104 is performed, so as to obtain a homography matrix with higher accuracy, and then to ensure that the distance measurement is performed based on the image acquisition device.
  • carry out accurate ranging When, carry out accurate ranging.
  • FIG. 6 is a flowchart of a method for determining a position according to an embodiment of the present disclosure. , Specifically includes the following steps S601 to S604:
  • S601 Acquire a target image obtained after the image acquisition device photographs the target object.
  • S602 Based on the target image, determine the pixel coordinates of the target object in the image coordinate system.
  • S603 Determine the world coordinates of the target object in the world coordinate system based on the pixel coordinates and the homography matrix of the image acquisition device.
  • S604 Determine the distance between the target object and the preset position point based on the world coordinates of the target object in the world coordinate system and the coordinates of the preset position point in the world coordinate system.
  • the preset position here can be the projection of the center of the front axle on the ground, or the projection of the center of the car body on the ground.
  • the origin is in the world coordinate system.
  • the coordinates in are known, and the preset position point can be used as the corresponding vehicle distance measurement point when measuring the distance between the target object and the vehicle.
  • the entire process of S601 to S604 refers to the process of distance measurement through the homography matrix after obtaining the homography matrix of the image acquisition device, because the target object in the target image has an area size, and the target object is obtained after obtaining the homography matrix.
  • the distance measurement point of the target object is determined according to the target object image, and then the distance between the target object and the vehicle is determined based on the world coordinates of the distance measurement point and the preset position point in the world coordinate system.
  • the label frame where the target object is located is obtained, because in the calibration process of the image acquisition device, the selected vertebral reference object is used as the tangent position to the ground.
  • the homography matrix of the image acquisition device determined by the reference object.
  • the center position point is used as the ranging point, and then the pixel coordinates of the ranging point are used as the pixel coordinates of the target in the image coordinate system.
  • the target After obtaining the pixel coordinates of the target in the image coordinate system, input the pixel coordinates and homography matrix of the target in the image coordinate system into the conversion equation between the pixel coordinates of the image acquisition device and the world coordinates, and then the target can be obtained.
  • the world coordinates in the world coordinate system, and then the Euclidean distance between the two are calculated according to the world coordinates of the target in the world coordinate system and the world coordinates of the preset position point to determine the distance between the target and the vehicle.
  • the homography matrix can be used to accurately determine the world coordinates of the target in the world coordinate system, and then determine the distance to the target.
  • the calibration method obtains the sample image obtained by the image acquisition device shooting the sample reference object, first determines the initial pixel coordinates of each sample reference object in the image coordinate system, and then determines the initial pixel coordinates of each sample reference object based on each sample reference
  • the initial pixel coordinates of the object in the image coordinate system are fitted with a straight line to the sample reference object array in the sample image, and the initial pixel coordinates are corrected based on the fitted straight line to obtain the position of each sample reference object in the image coordinate system. Correct the pixel coordinates.
  • the sample reference objects can be placed in advance, for example, the sample reference objects can be arranged in an array, so that the sample reference objects belonging to the same row or the sample reference objects belonging to the same column are located on a straight line in the world coordinate system , And then by fitting a straight line to the initial pixel coordinates of the sample reference object in the image coordinate system, that is, the initial pixel coordinates of each sample reference object in the image coordinate system can be corrected, and each sample reference object can be obtained in the image coordinate system.
  • the more accurate corrected pixel coordinates in the sample reference object the world coordinates of each sample reference object in the world coordinate system and the corrected pixel coordinates of each sample reference object in the image coordinate system are used to obtain accurate image acquisition equipment.
  • the homography matrix improves the accuracy of the calibration of image acquisition equipment.
  • the writing order of the steps does not mean a strict execution order but constitutes any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possibility.
  • the inner logic is determined.
  • the embodiment of the present disclosure also provides a calibration device corresponding to the calibration method. Since the principle of the device in the embodiment of the disclosure to solve the problem is similar to the above-mentioned calibration method of the embodiment of the disclosure, the implementation of the device can be referred to the method The implementation of the repetition will not be repeated.
  • FIG. 7 it is a schematic structural diagram of a calibration device 700 provided by an embodiment of the present disclosure, including:
  • the image acquisition module 701 is used to acquire a sample image taken by an image acquisition device
  • the first determining module 702 is configured to determine the initial pixel coordinates of the multiple sample reference objects in the sample image in the image coordinate system based on the sample image;
  • the coordinate correction module 703 is used to perform a straight line fitting to the sample reference objects located on the same straight line based on the determined initial pixel coordinates of each sample reference object in the image coordinate system, and to perform fitting fitting based on the fitted straight line Correct the initial pixel coordinates of to obtain the corrected pixel coordinates;
  • the second determination module 704 is configured to determine the homography matrix of the image acquisition device based on the world coordinates of each sample reference object in the sample image in the world coordinate system and the obtained corrected pixel coordinates.
  • the coordinate correction module 703 is used for:
  • the initial pixel coordinates of each sample reference object in the image coordinate system are corrected to obtain the intermediate pixel coordinates; and based on the intermediate pixel coordinates of each sample reference object, the alignment is located in the second direction
  • the sample reference objects on the straight line of are respectively fitted with a straight line to obtain a plurality of second straight lines, wherein the straight line along the first direction intersects the straight line along the second direction;
  • the corrected pixel coordinates are obtained.
  • the initial pixel coordinates include an initial first coordinate value and an initial second coordinate value, and the first coordinate axis corresponding to the initial first coordinate value and the second coordinate axis corresponding to the initial second coordinate value are perpendicular to each other;
  • the coordinate correction module 703 When the coordinate correction module 703 is used to correct the initial pixel coordinates of each sample reference object in the image coordinate system based on the multiple first straight lines to obtain the intermediate pixel coordinates, it includes:
  • the intermediate pixel coordinates of a sample reference object include the The initial first coordinate value and the middle second coordinate value of the sample reference object;
  • the coordinate correction module 703 When the coordinate correction module 703 is used to perform straight line fitting on the sample reference objects located on the straight line along the second direction based on the intermediate pixel coordinates of each sample reference object to obtain multiple second straight lines, it includes
  • a first straight line fitting is performed on the sample reference object located on a straight line along the second direction to obtain a plurality of second straight lines.
  • the method when the coordinate correction module 703 is used to obtain corrected pixel coordinates based on multiple first straight lines and multiple second straight lines, the method includes:
  • the pixel coordinates corresponding to the intersections of the plurality of first straight lines and the plurality of second straight lines are used as the corrected pixel coordinates.
  • the first coordinate axis is the abscissa axis in the image coordinate system
  • the second coordinate axis is the ordinate axis in the image coordinate system
  • the first coordinate axis is the ordinate axis in the image coordinate system
  • the second coordinate axis is the abscissa axis in the image coordinate system.
  • the second determining module 704 is further configured to:
  • test image For each test image, determine the test pixel coordinates of each test reference object in the test image in the image coordinate system;
  • test pixel coordinates and the homography matrix determine the test world coordinates of the test reference object in the world coordinate system
  • the accuracy of the homography matrix is determined.
  • an embodiment of the present disclosure also provides a position determining device 800, which locates a target obtained based on the image capturing device through the homography matrix of the image capturing device determined by the above-mentioned calibration device.
  • the location determining device 800 includes:
  • the image acquisition module 801 is configured to acquire a target image obtained after the image acquisition device photographs the target object;
  • the first determining module 802 is configured to determine the pixel coordinates of the target object in the image coordinate system based on the target image;
  • the second determining module 803 is used to determine the world coordinates of the target object in the world coordinate system based on the pixel coordinates and the homography matrix of the image acquisition device.
  • the homography matrix of the image acquisition device adopts any one of the embodiments of the disclosure
  • the calibration method is determined.
  • the second determining module 803 is further configured to:
  • the distance between the target and the preset location point is determined.
  • an embodiment of the present disclosure also provides an electronic device 900.
  • a schematic structural diagram of the electronic device provided by the embodiment of the present disclosure includes:
  • the processor 901 and the memory 902 communicate through the bus 903, so that the processor 901 is Execute the following instructions: obtain the sample image taken by the image acquisition device; based on the sample image, determine the initial pixel coordinates of multiple sample reference objects in the sample image in the image coordinate system; based on the determined position of each sample reference object in the image coordinate system The initial pixel coordinates, a straight line fitting is performed on the sample reference objects located on the same straight line, and the initial pixel coordinates participating in the fitting are corrected based on the fitted straight line to obtain the corrected pixel coordinates; based on each sample reference in the sample image
  • the world coordinates of the object in the world coordinate system and the obtained corrected pixel coordinates determine the homography matrix of the image acquisition device.
  • an embodiment of the present disclosure also provides an electronic device 1000.
  • a schematic structural diagram of the electronic device provided by the embodiment of the present disclosure includes:
  • the processor 1001 and the memory 1002 communicate through the bus 1003, so that the processor 1001 is Execute the following instructions: Obtain the target image obtained after the image capture device shoots the target; Based on the target image, determine the pixel coordinates of the target in the image coordinate system; Determine the target location based on the pixel coordinates and the homography matrix of the image capture device The world coordinates in the world coordinate system and the homography matrix of the image acquisition device are determined by the calibration method of the first aspect.
  • the embodiments of the present disclosure also provide a computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to execute the steps of the calibration method or position determination in the above method embodiments Method steps.
  • the computer program product of the calibration method or the position determination method provided by the embodiment of the present disclosure includes a computer-readable storage medium storing program code, and the program code includes instructions that can be used to execute the steps of the calibration method in the above method embodiment Or for the steps of the location determination method, please refer to the foregoing method embodiment for details, which will not be repeated here.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a nonvolatile computer readable storage medium executable by a processor.
  • the technical solution of the present disclosure essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present disclosure.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Manufacturing & Machinery (AREA)
  • Electromagnetism (AREA)
  • Multimedia (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

一种标定方法、位置确定方法、装置、电子设备及存储介质,标定方法包括:获取图像采集设备拍摄的样本图像(S101);基于样本图像,确定样本图像中多个样本参照物在图像坐标系中的初始像素坐标(S102);基于确定的每个样本参照物在图像坐标系中的初始像素坐标,对位于同一条直线上的样本参照物进行直线拟合,并基于拟合的直线对参与拟合的初始像素坐标进行修正,得到修正像素坐标(S103);基于样本图像中的每个样本参照物在世界坐标系下的世界坐标、以及得到的修正像素坐标,确定图像采集设备的单应性矩阵(S104)。提高了标定结果的准确性。

Description

标定方法、位置确定方法、装置、电子设备及存储介质
本申请要求于2020年03月13日提交中国国家知识产权局、申请号为202010175090.3、申请名称为“标定方法、位置确定方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及计算机视觉技术领域,具体而言,涉及一种标定方法、位置确定方法、装置、电子设备及存储介质。
背景技术
随着人工智能技术的迅速发展,传统工业与信息技术结合,为人们的生活带来便利,比如将汽车行业与信息技术结合,可以产生能够自动驾驶的智能汽车,智能汽车在自动驾驶过程中,测距是非常重要的环节。在智能汽车辅助驾驶所采用的测距传感器中,视觉传感器能够获得较丰富的道路结构环境信息,价格也较为低廉。
在视觉测距中,单目视觉测距技术相对于多目视觉测距技术具有成本低廉、***安装简单、稳定性好等特点,因而被广泛采用。在单目视觉测距中,需要用到单应性矩阵(homography matrix),基于拍摄的目标物在图像坐标系中的像素坐标,以及该单应性矩阵,可以得到目标物在世界坐标系中的世界坐标,基于该世界坐标即可得到该目标物与预设位置点之间的距离信息。因此,单应性矩阵的准确性直接影响测距结果的精确性。
单应性矩阵是通过预先进行标定得到的,在标定时,已知参照物在世界坐标系中的世界坐标,需要在图像采集设备拍摄的包含该参照物的图像中将该参照物选取出来,以得到其在图像坐标系中的像素坐标。一般地,在图像中选取参照物时需要通过手工选取,由于存在视觉误差,在图像中的选取结果不精确,从而导致标定结果不准确。
发明内容
有鉴于此,本公开至少提供一种标定方案,以提高对图像采集设备标定的准确性。
第一方面,本公开实施例提供了一种标定方法,包括:
获取图像采集设备拍摄的样本图像;
基于所述样本图像,确定所述样本图像中多个样本参照物在图像坐标系中的初始像素坐标;
基于确定的每个样本参照物在图像坐标系中的初始像素坐标,对位于同一条直线上的所述样本参照物进行直线拟合,并基于拟合的直线对参与拟合的初始像素坐标进行修正,得到修正像素坐标;
基于所述样本图像中的每个样本参照物在世界坐标系下的世界坐标、以及得到的修正像素坐标,确定所述图像采集设备的单应性矩阵。
在本公开实施例中,通过对拍摄的样本图像中的样本参照物进行直线拟合,能够对拍摄的样本图像中样本参照物在图像坐标系中的初始像素坐标进行修正,进而得到每个样本参照物在图像坐标系中的较为准确的修正像素坐标,从而基于修正像素坐标对图像采集设备进行标定,能够得到准确的单应性矩阵,即提高了对图像采集设备标定的准确性。
一种可能的实施方式中,所述基于确定的每个样本参照物在图像坐标系中的初始像素坐标,对位于同一条直线上的所述样本参照物进行直线拟合,并基于拟合的直线对参与拟合的初始像素坐标进行修正,得到修正像素坐标,包括:
基于确定的每个样本参照物在图像坐标系中的初始像素坐标,对位于沿第一方向的直线上的样本参照物分别进行直线拟合,得到多条第一直线;
基于多条第一直线,对每个样本参照物在图像坐标系中的初始像素坐标进行修正,得到中间像素坐标;并基于每个样本参照物的中间像素坐标,对位于沿第二方向上的直线上的样本参照物分别进行直线拟合,得到多条第二直线,其中,沿第一方向上的直线与沿第二方向上的直线相交;
基于多条所述第一直线和多条所述第二直线,得到所述修正像素坐标。
这里提出在对多个样本参照物的初始像素坐标进行修正,得到修正像素坐标时,可以基于样本参照物所属的不同直线对样本参照物的初始像素坐标进行修正,比如选择两个不同方向上的直线,逐渐对多个样本参照物的初始像素坐标进行修正,以得到较为准确的修正像素坐标。
一种可能的实施方式中,所述初始像素坐标包括初始第一坐标值和初始第二坐标值,所述初始第一坐标值对应的第一坐标轴与所述初始第二坐标值对应的第二坐标轴相互垂直;
基于多条第一直线,对每个样本参照物在图像坐标系中的初始像素坐标进行修正,得到中间像素坐标,包括:
将每个样本参照物的初始像素坐标中的初始第一坐标值,代入该样本参照物所在的所述第一直线的直线方程,得到中间第二坐标值;一个样本参照物的中间像素坐标包括该样本参照物的初始第一坐标值和中间第二坐标值;
基于每个样本参照物的中间像素坐标,对位于沿第二方向上的直线上的样本参照物分别进行直线拟合,得到多条第二直线,包括:
基于每个样本参照物的中间像素坐标中的初始第一坐标值和中间第二坐标值,对位于沿第二方向的直线上的所述样本参照物进行直线拟合,得到多条第二直线。
一种可能的实施方式中,所述基于多条所述第一直线和多条所述第二直线,得到所述修正像素坐标,包括:
将多条所述第一直线和多条所述第二直线的交点对应的像素坐标,作为所述修正像素坐标。
本公开实施例提出了一种如何针对具体地对多个样本参照物的初始像素坐标进行修正的过程,即先针对初始像素坐标中的其中一个坐标值进行修正,然后再对另一个坐标值进行修正,逐渐得到准确度较高的修正坐标。
一种可能的实施方式中,所述第一坐标轴为图像坐标系中的横坐标轴,所述第二坐标轴为图像坐标系中的纵坐标轴;或者,所述第一坐标轴为图像坐标系中的纵坐标轴,所述第二坐标轴为图像坐标系中的横坐标轴。
一种可能的实施方式中,确定所述图像采集设备的单应性矩阵之后,还包括:
获取所述图像采集设备拍摄的多个测试图像;
针对每个所述测试图像,确定所述测试图像中每个测试参照物在图像坐标系中的测试像素坐标;
基于所述测试像素坐标和所述单应性矩阵,确定所述测试参照物在所述世界坐标系中的测试世界坐标;
基于多个所述测试图像中所述测试参照物的真实世界坐标和所述测试世界坐标,确定所述单应性矩阵的准确度。
这里,在标定得到的单应性矩阵的准确度不符合条件时,能够及时进行单应性矩阵的修正,比如可以选择新的样本参照物进行重新标定。
第二方面,本公开实施例提供了一种位置确定方法,包括:
获取图像采集设备拍摄目标物后得到的目标图像;
基于所述目标图像,确定所述目标物在图像坐标系下的像素坐标;
基于所述像素坐标和所述图像采集设备的单应性矩阵,确定所述目标物在世界坐标系下的世界坐标,所述图像采集设备的单应性矩阵采用第一方面所述的标定方法确定。
在一种应用场景下,本公开实施例得到准确度高的单应性矩阵后,能够利用该单应性矩阵准确地确定目标物在世界坐标系中的世界坐标。
一种可能的实施方式中,确定所述目标物在世界坐标系下的世界坐标之后,还包括:
基于所述目标物在世界坐标系下的世界坐标以及所述世界坐标系中的预设位置点的坐标,确定所述目标物与所述预设位置点之间的距离。
在一种应用场景下,本公开实施例得到准确度高的单应性矩阵后,能够利用该单应性矩阵准确地确定目标物在世界坐标系中的世界坐标,进而确定预设位置点与目标物之间的距离。
第三方面,本公开实施例提供了一种标定装置,包括:
图像获取模块,用于获取图像采集设备拍摄的样本图像;
第一确定模块,用于基于所述样本图像,确定所述样本图像中多个样本参照物在图像坐标系中的初始像素坐标;
坐标修正模块,用于基于确定的每个样本参照物在图像坐标系中的初始像素坐标,对位于同一条直线上的所述样本参照物进行直线拟合,并基于拟合的直线对参与拟合的初始像素坐标进行修正,得到修正像素坐标;
第二确定模块,用于基于所述样本图像中的每个样本参照物在世界坐标系下的世界坐标、以及得到的修正像素坐标,确定所述图像采集设备的单应性矩阵。
一种可能的实施方式中,所述坐标修正模块用于:
基于确定的每个样本参照物在图像坐标系中的初始像素坐标,对位于沿第一方向的直线上的样本参照物分别进行直线拟合,得到多条第一直线;
基于多条第一直线,对每个样本参照物在图像坐标系中的初始像素坐标进行修正,得到中间像素坐标;并基于每个样本参照物的中间像素坐标,对位于沿第二方向上的直线上的样本参照物分别进行直线拟合,得到多条第二直线,其中,沿第一方向上的直线与沿第二方向上的直线相交;
基于多条所述第一直线和多条所述第二直线,得到所述修正像素坐标。
一种可能的实施方式中,所述初始像素坐标包括初始第一坐标值和初始第二坐标值,所述初始第一坐标值对应的第一坐标轴与所述初始第二坐标值对应的第二坐标轴相互垂直;
所述坐标修正模块在用于基于多条第一直线,对每个样本参照物在图像坐标系中的初始像素坐标进行修正,得到中间像素坐标时,包括:
将每个样本参照物的初始像素坐标中的初始第一坐标值,代入该样本参照物所在的所述第一直线的直线方程,得到中间第二坐标值;一个样本参照物的中间像素坐标包括该样本参照物的初始第一坐标值和中间第二坐标值;
所述坐标修正模块在用于基于每个样本参照物的中间像素坐标,对位于沿第二方向上的直线上的样本参照物分别进行直线拟合,得到多条第二直线时,包括
基于每个样本参照物的中间像素坐标中的初始第一坐标值和中间第二坐标值,对位于沿第二方向的直线上的所述样本参照物进行第直线拟合,得到多条第二直线。
一种可能的实施方式中,所述坐标修正模块在用于基于多条所述第一直线和多条所述 第二直线,得到所述修正像素坐标时,包括:
将多条所述第一直线和多条所述第二直线的交点对应的像素坐标,作为所述修正像素坐标。
一种可能的实施方式中,所述第一坐标轴为图像坐标系中的横坐标轴,所述第二坐标轴为图像坐标系中的纵坐标轴;或者,所述第一坐标轴为图像坐标系中的纵坐标轴,所述第二坐标轴为图像坐标系中的横坐标轴。
一种可能的实施方式中,所述第二确定模块在确定所述图像采集设备的单应性矩阵之后,还用于:
获取所述图像采集设备拍摄的多个测试图像;
针对每个所述测试图像,确定所述测试图像中每个测试参照物在图像坐标系中的测试像素坐标;
基于所述测试像素坐标和所述单应性矩阵,确定所述测试参照物在所述世界坐标系中的测试世界坐标;
基于多个所述测试图像中所述测试参照物的真实世界坐标和所述测试世界坐标,确定所述单应性矩阵的准确度。
第四方面,本公开实施例提供了一种位置确定装置,包括:
图像获取模块,用于获取图像采集设备拍摄目标物后得到的目标图像;
第一确定模块,用于基于所述目标图像,确定所述目标物在图像坐标系下的像素坐标;
第二确定模块,用于基于所述像素坐标和所述图像采集设备的单应性矩阵,确定所述目标物在世界坐标系下的世界坐标,所述图像采集设备的单应性矩阵采用本公开实施例提供的任一标定方法确定。
在一种可能的实施方式中,确定所述目标物在世界坐标系下的世界坐标之后,所述第二确定模块还用于:
基于所述目标物在世界坐标系下的世界坐标以及所述世界坐标系中的预设位置点的坐标,确定所述目标物与所述预设位置点之间的距离。
第五方面,本公开提供了一种电子设备,包括:处理器、存储介质和总线,所述存储介质存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述处理器与所述存储介质之间通过总线通信,所述处理器执行所述机器可读指令,以执行如第一方面所述标定方法或者第二方面所述位置确定方法的步骤。
第六方面,本公开提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器运行时执行如权第一方面所述标定方法或者第二方面所述位置确定方法的步骤。
第七方面,本公开提供了一种计算机程序产品,该计算机程序产品包括程序指令,所述程序指令当被处理器执行时使所述处理器执行如权第一方面所述标定方法或者第二方面所述位置确定方法的步骤。
关于上述装置、电子设备或计算机可读存储介质的实施效果描述可以参见上述方法内容的描述,这里不再赘述。
为使本公开的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。
附图说明
为了更清楚地说明本公开实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,此处的附图被并入说明书中并构成本说明书中的一部分,这些附图示出了符 合本公开的实施例,并与说明书一起用于说明本公开的技术方案。应当理解,以下附图仅示出了本公开的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。
图1示出了本公开实施例所提供的一种标定方法的流程图;
图2示出了本公开实施例所提供的样本参照物阵列在世界坐标系下的示意图;
图3示出了本公开实施例所提供的样本参照物阵列对应的样本图像;
图4示出了本公开实施例所提供的一种对样本参照物的初始像素坐标进行修正的方法流程图;
图5示出了本公开实施例所提供的一种单应性矩阵准确度的测试方法流程图;
图6示出了本公开实施例所提供的一种位置确定方法的流程图;
图7示出了本公开实施例所提供的一种标定装置的结构示意图;
图8示出了本公开实施例所提供的一种位置确定装置的结构示意图;
图9示出了本公开实施例所提供的一种电子设备的结构示意图;
图10示出了本公开实施例所提供的另一种电子设备的结构示意图。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本公开实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本公开的实施例的详细描述并非旨在限制要求保护的本公开的范围,而是仅仅表示本公开的选定实施例。基于本公开的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。
目前,在自动驾驶领域、机器人领域,常常需要依靠图像采集设备进行视觉测距,依靠图像采集设备进行视觉测距的原理是确定图像采集设备拍摄的目标物在图像坐标系中的像素坐标,然后基于图像采集设备的单应性矩阵,确定目标物在世界坐标系下的世界坐标,进而根据预设位置点的世界坐标以及目标物的世界坐标,确定出预设位置点与目标物之间的距离,这里的预设位置点可以为设置的世界坐标系原点,因此,单应性矩阵的准确性直接影响测距结果的精确性。单应性矩阵是通过预先进行标定得到的,在标定时,已知参照物在世界坐标系中的世界坐标,需要在图像采集设备拍摄的包含该参照物的图像中将该参照物选取出来,以得到其在图像坐标系中的像素坐标。在图像中选取参照物时一般会通过手工选取,由于存在视觉误差,在图像中的选取结果不精确,这样会导致标定结果不准确。基于此,本公开以下实施例提供了一种对选取的参照物的像素坐标进行修正的方法。
基于上述研究,本公开提供了一种标定方法,在获取到图像采集设备拍摄样本参照物得到的样本图像后,先确定多个样本参照物在图像坐标系中的初始像素坐标,然后基于每个样本参照物在图像坐标系中的初始像素坐标,对样本图像中的位于统一直线上的样本参照物进行直线拟合,并基于拟合的直线对参与拟合的初始像素坐标进行修正,得到参与拟合的样本参照物在图像坐标系中的修正像素坐标。
这里,因为样本参照物可以预先摆放好,比如可以将样本参照物按照阵列排布,这样属于同一行的样本参照物或者属于同一列的样本参照物在世界坐标系中是位于一条直线上的,然后通过对图像坐标系中样本参照物的初始像素坐标进行直线拟合,即能够对每个样本参照物在图像坐标系中的初始像素坐标进行修正,得到每个样本参照物在图像坐标系中的较为准确的修正像素坐标,从而根据样本参照物中每个样本参照物在世界坐标系下的世 界坐标、以及每个样本参照物在图像坐标系下的修正像素坐标,得到图像采集设备准确的单应性矩阵,即提高了对图像采集设备标定的准确性。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。
为便于对本实施例进行理解,首先对本公开实施例所公开的一种标定方法进行详细介绍,本公开实施例所提供的标定方法的执行主体一般为具有数据处理能力的计算机设备。
参见附图1所示,为本公开实施例提供的一种标定方法的流程示意图,包括以下步骤S101~S104:
S101,获取图像采集设备拍摄的样本图像;
S102,基于样本图像,确定样本图像中多个样本参照物在图像坐标系中的初始像素坐标;
S103,基于确定的每个样本参照物在图像坐标系中的初始像素坐标,对位于同一条直线上的样本参照物进行直线拟合,并基于拟合的直线对参与拟合的初始像素坐标进行修正,得到修正像素坐标;
S104,基于样本图像中的每个样本参照物在世界坐标系下的世界坐标、以及得到的修正像素坐标,确定图像采集设备的单应性矩阵。
下面分别对上述S101~S104加以说明。
在上述S101中,获取图像采集设备拍摄的样本图像,可以是拍摄样本参照物阵列后得到的样本图像,比如可以提前设置样本参照物所在的图像采集环境和世界坐标系,比如在地面上绘制多条直线,或者寻找有多条车道线的场所,形成多条直线L,在每条直线L上摆放多个形状一致的样本参照物,比如,这里样本参照物可以为锥体参照物,多个样本参照物可以分为多组,每组位于同一条直线L上,另外还需要绘制多条直线H,使得每条直线H和各条直线L相交,将样本参照物放置在直线L和直线H相交的交点上,得到样本参照物阵列,该样本参照物阵列包括在多条直线L上共线的样本参照物,同时,这些样本参照物也在多条直线H上共线。
本公开实施例提出以车辆的前轴中心点或者车体中心在地面的映射点为原点建立世界坐标系,这里的原点即为设定位置点,图像采集设备位于该车辆的设定位置处,得到如图2所示的世界坐标系,为了简便化,使得每条直线L与世界坐标系中的Y轴平行,每条直线H与世界坐标系中的X轴平行。
本公开实施例将位于车辆上的图像采集设备的摄像头调整为与地面平行,当图像采集设备向Y轴方向拍摄样本参照物阵列时可以得到如图3所示的样本图像。
在上述S102中,在得到样本参照物的样本图像后,可以将该样本图像放置在图像坐标系中,基于用户手工在图像坐标系中选取的椎体参照物与地面相切的位置,确定该样本参照物在图像坐标系中的初始像素坐标;或者,还可以将该样本图像输入提前训练好的像素坐标确定模型中,确定每个样本参照物的初始像素坐标。
这里,像素坐标确定模型可以先基于样本图像进行图像识别,确定出该椎体参照物与地面相切的位置,然后基于确定的每个样本参照物在图像中的位置确定这些样本参照物在图像坐标系中的初始像素坐标。
上述S103中,因为在世界坐标系中,直线L上的样本参照物共线,直线H上的样本参照物共线,且每个样本参照物均位于一条直线L和一条直线H的交点处,针对此,可对样本图像中的样本参照物阵列进行直线拟合来修正每个样本参照物的初始像素坐标。
具体地,如图4所示,基于确定的每个样本参照物在图像坐标系中的初始像素坐标,对位于同一条直线上的样本参照物进行直线拟合,并基于拟合的直线对参与拟合的初始像 素坐标进行修正,得到修正像素坐标时,可以执行以下步骤S401~S403:
S401,基于确定的每个样本参照物在图像坐标系中的初始像素坐标,对位于沿第一方向的直线上的样本参照物分别进行直线拟合,得到多条第一直线。
其中,每条第一直线中位于各样本参照物之间的线段,与其它第一直线中位于各样本参照物之间的线段不相交,比如多条第一直线可以相互平行,或者,多条第一直线沿远处相交,但是在样本参照物所处的位置处不相交。
上述得到的初始像素坐标由于人眼误差或者像素坐标确定模型的误差,导致确定的初始像素坐标并不准确,致使本该位于同一直线上的初始像素坐标可能并不在同一条直线上,故这里可以先对这些初始像素坐标进行直线拟合,得到多条第一直线。
在对位于沿第一方向的直线上的样本参照物分别进行直线拟合后,得到的多条第一直线中位于各样本参照物之间的线段,与其它第一直线中位于各样本参照物之间的线段不相交,比如,在对样本参照物进行直线拟合后,可以得到与图3中的直线L对应的多条第一直线,或者得到与图3中的直线H对应的多条第一直线。
具体在对沿第一方向的直线上的样本参照物进行第一次直线拟合时,可以先对样本图像中的样本参照物进行分组,得到多组样本参照物,每组样本参照物在世界坐标系中属于同一条直线,具体在分组时,可以按照在世界坐标系中是否属于同一直线L进行分组,即将在世界坐标系中属于同一直线L上的样本参照物划分为一组,或者,也可以按照在世界坐标系中是否属于同一直线H进行分组,即将在世界坐标系中属于同一直线H上的样本参照物划分为一组。
以按照在世界坐标系中是否属于同一直线L进行分组为例,本公开实施例将在世界坐标系中属于同一直线L上的样本参照物划分为一组,比如将如图3所示的样本图像中,按照是否属于同一直线L,将样本参照物阵列中的样本参照物划分为4组,针对4组样本参照物对应的初始像素坐标分别进行直线拟合,可以得到4条第一直线。
针对每组样本参照物对应的初始像素坐标,可以按照最小二乘法进行直线拟合,具体可以按照以下公式(1)、公式(2)和公式(3),得到多条第一直线对应的第一直线方程:
Figure PCTCN2020142509-appb-000001
Figure PCTCN2020142509-appb-000002
Figure PCTCN2020142509-appb-000003
其中,(x i,y i)表示属于同一组样本参照物中第i个样本参照物的初始像素坐标;n表示属于同一组样本参照物包括n个;x表示属于同一组样本参照物对应的初始横坐标值的 平均值;
Figure PCTCN2020142509-appb-000004
表示属于同一组样本参照物对应的初始纵坐标值的平均值;b、b 0和b 1表示第一直线方程中的未知参数。
在将每组样本参照物对应的初始像素坐标代入以上公式(1)~(3)中,得到每组参数初始像素坐标对应的第一直线方程中的未知参数b 0和b 1后,即可以得到每条第一直线对应的第一直线方程:y=b 1x-b 0
S402,基于多条第一直线,对每个样本参照物在图像坐标系中的初始像素坐标进行修正,得到中间像素坐标;并基于每个样本参照物的中间像素坐标,对位于沿第二方向上的直线上的样本参照物分别进行直线拟合,得到多条第二直线。
其中,沿第一方向上的直线与沿第二方向上的直线相交。
这里初始像素坐标包括初始第一坐标值和初始第二坐标值,其中,初始第一坐标值对应的第一坐标轴与初始第二坐标值对应的第二坐标轴相互垂直。
具体地,在基于多条第一直线,对每个样本参照物在图像坐标系中的初始像素坐标进行修正,得到中间像素坐标时,可以包括:
将每个样本参照物的初始像素坐标中的初始第一坐标值,代入该样本参照物所在的第一直线的直线方程,得到中间第二坐标值。
其中一个样本参照物的中间像素坐标包括该样本参照物的初始第一坐标值和中间第二坐标值,即对初始像素坐标进行初次修正,得到中间像素坐标的过程,其实是对样本参照物的初始第二坐标值进行修正的过程。
具体地,在图像坐标系中,第一坐标轴可以为横坐标轴或者纵坐标轴,第一坐标轴为图像坐标系中的横坐标轴时,第二坐标轴为图像坐标系中的纵坐标轴;或者,第一坐标轴为图像坐标系中的纵坐标轴时,第二坐标轴为图像坐标系中的横坐标轴。
比如,上述图3中的样本图像总共包括20个样本参照物,这20个样本参照物的初始像素坐标分别为(x 1,y 1)~(x 20,y 20),其中每个样本参照物的初始第一坐标值可以为x 1~x 20,初始第二坐标值可以为y 1~y 20,这里初始第一坐标值对应的第一坐标轴可以为图像坐标系中的横坐标轴,初始第二坐标值对应的第二坐标轴可以为图像坐标系中的纵坐标轴,或者,每个样本参照物的初始第一坐标值可以为y 1~y 20,初始第二坐标值可以为x 1~x 20,这里初始第一坐标值对应的第一坐标轴可以为图像坐标系中的纵坐标轴,初始第二坐标值对应的第二坐标轴可以为图像坐标系中的横坐标轴。
具体地,这里代入第一直线的直线方程中的初始第一坐标值可以是与横坐标轴对应初始横坐标值,也可以是与纵坐标轴对应的初始纵坐标值,在多次历史试验中,发现无论是通过手工在样本图像中标注样本参照物得到的初始像素坐标还是通过像素坐标确定模型确定的初始像素坐标,确定的初始像素坐标中的横坐标值的准确性大于纵坐标值的准确性,故本公开实施例可以先对精确度较低的纵坐标值进行修正,即将每个样本参照物的初始像素坐标中的初始横坐标值,代入该样本参照物所在的第一直线的直线方程,得到中间第二坐标值,这里的中间第二坐标值即为该样本参照物的初始像素坐标的初始纵坐标值对应的首次修正后的纵坐标值。
每个样本参照物的初始第一坐标值和中间第二坐标值构成中间像素坐标,比如,针对上述20个样本参照物的初始像素坐标为:(x 1,y 1)~(x 20,y 20),按照上述方式修正后,得到对应的20个样本参照物的中间像素坐标:(x 1,y 1')~(x 20,y 20')。
然后具体在基于每个样本参照物的中间像素坐标,对位于沿第二方向上的直线上的样本参照物分别进行直线拟合,得到多条第二直线时,可以包括:
基于每个样本参照物的中间像素坐标中的初始第一坐标值和中间第二坐标值,对位于沿第二方向的直线上的样本参照物进行直线拟合,得到多条第二直线。
其中,每条第二直线中位于各样本参照物之间的线段,与其它第二直线中位于各样本参照物之间的线段不相交,且每条第二直线中位于各样本参照物之间的线段,与多条第一直线中位于各样本参照物之间的线段相交。
基于每个样本参照物的中间像素坐标,对沿第二方向的直线上的样本参照物进行直线拟合后,得到的多条第二直线中位于各样本参照物之间的线段,与其它第二直线中位于各样本参照物之间的线段不相交,比如,若对样本参照物进行直线拟合,得到多条第一直线拟合是与图3中的直线L对应的多条第一直线,则对样本参照物进行直线拟合,得到的是与图3中的直线H对应的多条第二直线;若对样本参照物进行直线拟合,得到的是与图3中的直线H对应的多条第一直线,则对样本参照物进行直线拟合,得到的是与图3中的直线L对应的多条第二直线。
具体在进行第二次直线拟合,得到多条第二直线时,同样可以先对样本参照物阵列中的样本参照物按照进行分组,得到多组样本参照物,每组样本参照物在世界坐标系中属于同一条直线,具体在分组时,若进行第一次直线拟合时,对样本参照物的分组方式是按照在世界坐标系中是否属于同一直线L进行分组,则在进行第二次直线拟合时,对样本参照物的分组方式是按照在世界坐标系中是否属于同一直线H进行分组;反之,若进行第一次直线拟合时,对样本参照物的分组方式是按照在世界坐标系中是否属于同一直线H进行分组,则在进行第二次直线拟合时,对样本参照物的分组方式是按照在世界坐标系中是否属于同一直线L进行分组。
本公开实施例在得到多条第一直线时,对样本参照物的分组方式是按照在世界坐标系中是否属于同一直线L进行分组,则在得到多条第二直线时,对样本参照物的分组方式是按照在世界坐标系中是否属于同一直线H进行分组,即将在世界坐标系中属于同一直线H上的样本参照物划分为一组,比如,针对如图3所示的样本图像中,在对沿第二方向上的直线上样本参照物进行直线拟合前,将样本参照物划分为5组,针对每组样本参照物进行直线拟合,得到5条直线。
具体地,针对每组样本参照物对应的中间像素坐标,可以按照最小二乘法进行第二直线拟合,具体可以按照以下公式(4)、公式(5)和公式(6),得到多条直线对应的第二直线方程:
Figure PCTCN2020142509-appb-000005
Figure PCTCN2020142509-appb-000006
Figure PCTCN2020142509-appb-000007
其中,(x i,y i')表示属于同一组样本参照物中第i个样本参照物的中间像素坐标,该中间像素坐标由初始横坐标值和中间纵坐标值构成;n表示属于同一组样本参照物包括n个;x表示属于同一组样本参照物对应的初始横坐标值的平均值;y'表示属于同一组样本参照物对应的中间纵坐标值的平均值,该中间纵坐标值即为对样本参照物进行第一次直线拟合后,针对初始纵坐标值进行修正后得到的中间纵坐标值;b、b 2和b 3表示第一直线方程中的未知参数。
在将每组样本参照物对应的中间像素坐标代入以上公式(4)~(6)中,得到每组参数初始像素坐标对应的第二直线方程中的未知参数b 2和b 3后,即可以得到每条第二直线对应的第二直线方程:y=b 3x-b 2
S403,基于多条第一直线和多条第二直线,得到修正像素坐标。
这里可以将多条第一直线和多条第二直线的交点对应的像素坐标,作为修正像素坐标。
这里通过计算第一直线方程和第二直线方程的交点坐标值,得到样本参照物阵列中每个样本参照物的修正像素坐标,比如,针对上述20个样本参照物的中间像素坐标为:(x 1,y 1')~(x 20,y 20'),按照上述方式修正后,得到对应的20个样本参照物的修正像素坐标:(x 1”,y 1”)~(x 20”,y 20”)。
通过上述S401~S403的过程,在对多个样本参照物的初始像素坐标进行修正,得到修正像素坐标时,可以基于样本参照物所属的不同直线对样本参照物的初始像素坐标进行修正,比如选择两个不同方向上的直线,逐渐对多个样本参照物的初始像素坐标进行修正,以得到较为准确的修正像素坐标,具体地,可以在对多个样本参照物的初始像素坐标进行修正的过程中,可以先针对初始像素坐标中的其中一个坐标值进行修正,然后再对另一个坐标值进行修正,逐渐得到准确度较高的修正坐标。
针对上述步骤S104,在得到每个样本参照物在图像坐标系中的修正像素坐标后,即可以基于每个样本参照物在世界坐标系下的世界坐标、以及每个样本参照物在图像坐标系下的修正像素坐标,确定图像采集设备的单应性矩阵,具体地,可以基于每个样本参照物在图像坐标系中的修正像素坐标构成像素坐标矩阵,基于每个样本参照物在世界坐标系中的世界坐标构成世界坐标矩阵,然后以像素坐标矩阵和世界坐标矩阵作为已知量,以图像采集设备的单应性矩阵作为未知量,代入图像采集设备像素坐标和世界坐标的转换方程中,确定图像采集设备的单应性矩阵。
具体地,记录样本参照物阵列中的每个样本参照物在世界坐标系中的世界坐标为:(X 1,Y 1)~(X n,Y n),记录世界坐标矩阵为A,像素坐标矩阵为C,单应性矩阵为B,具体表示如下:
Figure PCTCN2020142509-appb-000008
然后将世界坐标矩阵为A,像素坐标矩阵为C和单应性矩阵为B代入图像采集设备像素坐标和世界坐标的转换方程,转换方程用以下公式(7)表示:
A=B×C           (7);
对该转换方程求解,得到图像采集设备的单应性矩阵B=(AA T)*(CA T) -1
本公开实施例能够对每个样本参照物在图像坐标系中的初始像素坐标进行修正,得到每个样本参照物在图像坐标系中的较为准确的修正像素坐标,从而根据样本参照物阵列中每个样本参照物在世界坐标系下的世界坐标、以及每个样本参照物在图像坐标系下的修正像素坐标,得到图像采集设备准确的单应性矩阵,即提高了对图像采集设备标定的准确性。
进一步地,如图5所示,在确定图像采集设备的单应性矩阵之后,还可以对确定的单应性矩阵的准确度进行测试,在进行测试时,可以执行以下步骤S501~S504:
S501,获取图像采集设备拍摄的多个测试图像。
这里的图像采集设备与上述提到的图像采集设备为同种图像采集设备,且在拍摄多个测试参照物阵列时的拍摄角度与上文在获取样本参照物阵列时的角度相同。
这里的测试参照物与样本参照物的设置过程类似,在此不再赘述,可以设置多个不同的测试参照物阵列,使得图像采集设备针对每个测试参照物阵列进行拍摄,得到多个测试图像。
S502,针对每个测试图像,确定测试图像中每个测试参照物在图像坐标系中的测试像素坐标。
这里确定测试图像中每个测试参照物在图像坐标系中的测试像素坐标的方式,与上文介绍的确定样本图像中每个样本参照物在图像坐标系中的修正像素坐标的方式相同,在此不再赘述。
S503,基于测试像素坐标和单应性矩阵,确定测试参照物在世界坐标系中的测试世界坐标。
得到每个测试图像中的测试参照物的测试像素坐标后,基于测试像素坐标中得到横坐标值和纵坐标值构成测试像素坐标矩阵,将该测试像素坐标矩阵和单应性矩阵输入图像采集设备像素坐标和世界坐标的转换方程,得到测试图像中的每个测试参照物在世界坐标系中的测试世界坐标。
S504,基于多个测试图像中测试参照物的真实世界坐标和测试世界坐标,确定单应性矩阵的准确度。
比较每个测试图像中测试参照物的真实世界坐标和测试世界坐标,确定该测试图像中的测试参照物的测试世界坐标是否准确,将测试参照物的测试世界坐标准确的个数和测试参照物的总个数的比值,作为单应性矩阵的准确度。
本公开实施例对单应性矩阵进行准确度验证,以确定得到的单应性矩阵的准确度是否满足设定条件,以便在单应性矩阵的准确度不符合设定条件时,能够及时对单应性矩阵进行纠正,比如再次执行针对图像采集设备的标定过程,即执行上述步骤S101~S104的过程,从而得到准确度较高的单应性矩阵,进而保证在基于图像采集设备进行测距时,进行准确测距。
进一步地,在确定图像采集设备的单应性矩阵之后,可以基于该单应性矩阵对目标物进行位置确定,如图6所示,为本公开实施例提供的一种位置确定方法的流程图,具体包括以下步骤S601~S604:
S601,获取图像采集设备拍摄目标物后得到的目标图像。
S602,基于目标图像,确定目标物在图像坐标系下的像素坐标。
S603,基于像素坐标和该图像采集设备的单应性矩阵,确定目标物在世界坐标系下的世界坐标。
S604,基于目标物在世界坐标系下的世界坐标以及世界坐标系中的预设位置点的坐标,确定目标物与预设位置点之间的距离。
以车辆为例,这里的预设位置点可以是车前轴中心点在地面的投影,也可以是车体中心在地面的投影,其作为世界坐标系的原点时,该原点的在世界坐标系中的坐标为已知的,可以将该预设位置点作为在测量目标物与车辆的距离时对应的车辆测距点。
S601~S604整个过程是指在得到图像采集设备的单应性矩阵后,通过该单应性矩阵进行测距的过程,因为目标物图像中的目标物是有面积大小的,在得到该目标物图像后,要根据该目标物图像确定目标物的测距点,再基于该测距点和预设位置点在世界坐标系中的世界坐标确定目标物与车辆的距离。
具体地,得到目标物所在的目标图像后,基于图像识别技术,得到目标物所在的标注框,因为在对图像采集设备的标定过程中是通过选择的椎体参照物与地面相切的位置作为参照物确定的图像采集设备的单应性矩阵,这里在选择目标物的测距点时,也需要在标注框与目标图像中的地面的切线上选择,比如可以将标注框与地面的切线的中心位置点作为测距点,然后将该测距点的像素坐标作为目标物在图像坐标系下的像素坐标。
在得到目标物在图像坐标系下的像素坐标后,将该目标物在图像坐标系下的像素坐标和单应性矩阵输入图像采集设备像素坐标和世界坐标的转换方程中,即可以得到目标物在世界坐标系下的世界坐标,进而根据目标物在世界坐标系下的世界坐标以及预设位置点的世界坐标,计算两者的欧式距离,即可以确定目标物与车辆之间的距离。
本公开实施例得到准确度高的单应性矩阵后,能够利用该单应性矩阵准确地确定目标物在世界坐标系中的世界坐标,进而确定与目标物之间的距离。
综上,本公开实施例提供的标定方法,获取到图像采集设备拍摄样本参照物得到的样本图像后,先确定每个样本参照物在图像坐标系中的初始像素坐标,然后基于每个样本参照物在图像坐标系中的初始像素坐标,对样本图像中的样本参照物阵列进行直线拟合,并基于拟合的直线对初始像素坐标进行修正,得到每个样本参照物在图像坐标系中的修正像素坐标。
这里,因为样本参照物可以预先摆放好,比如可以将样本参照物按照阵列排布,这样属于同一行的样本参照物或者属于同一列的样本参照物在世界坐标系中是位于一条直线上的,然后通过对图像坐标系中样本参照物的初始像素坐标进行直线拟合,即能够对每个样本参照物在图像坐标系中的初始像素坐标进行修正,得到每个样本参照物在图像坐标系中的较为准确的修正像素坐标,从而根据样本参照物中每个样本参照物在世界坐标系下的世界坐标、以及每个样本参照物在图像坐标系下的修正像素坐标,得到图像采集设备准确的单应性矩阵,即提高了对图像采集设备标定的准确性。
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
基于同一技术构思,本公开实施例中还提供了与标定方法对应的标定装置,由于本公 开实施例中的装置解决问题的原理与本公开实施例上述标定方法相似,因此装置的实施可以参见方法的实施,重复之处不再赘述。
参见图7所示,为本公开实施例提供的一种标定装置700的结构示意图,包括:
图像获取模块701,用于获取图像采集设备拍摄的样本图像;
第一确定模块702,用于基于样本图像,确定样本图像中多个样本参照物在图像坐标系中的初始像素坐标;
坐标修正模块703,用于基于确定的每个样本参照物在图像坐标系中的初始像素坐标,对位于同一条直线上的样本参照物进行直线拟合,并基于拟合的直线对参与拟合的初始像素坐标进行修正,得到修正像素坐标;
第二确定模块704,用于基于样本图像中的每个样本参照物在世界坐标系下的世界坐标、以及得到的修正像素坐标,确定图像采集设备的单应性矩阵。
一种可能的实施方式中,坐标修正模块703用于:
基于确定的每个样本参照物在图像坐标系中的初始像素坐标,对位于沿第一方向的直线上的样本参照物分别进行直线拟合,得到多条第一直线;
基于多条第一直线,对每个样本参照物在图像坐标系中的初始像素坐标进行修正,得到中间像素坐标;并基于每个样本参照物的中间像素坐标,对位于沿第二方向上的直线上的样本参照物分别进行直线拟合,得到多条第二直线,其中,沿第一方向上的直线与沿第二方向上的直线相交;
基于多条第一直线和多条第二直线,得到修正像素坐标。
一种可能的实施方式中,初始像素坐标包括初始第一坐标值和初始第二坐标值,初始第一坐标值对应的第一坐标轴与初始第二坐标值对应的第二坐标轴相互垂直;
坐标修正模块703在用于基于多条第一直线,对每个样本参照物在图像坐标系中的初始像素坐标进行修正,得到中间像素坐标时,包括:
将每个样本参照物的初始像素坐标中的初始第一坐标值,代入该样本参照物所在的第一直线的直线方程,得到中间第二坐标值;一个样本参照物的中间像素坐标包括该样本参照物的初始第一坐标值和中间第二坐标值;
坐标修正模块703在用于基于每个样本参照物的中间像素坐标,对位于沿第二方向上的直线上的样本参照物分别进行直线拟合,得到多条第二直线时,包括
基于每个样本参照物的中间像素坐标中的初始第一坐标值和中间第二坐标值,对位于沿第二方向的直线上的样本参照物进行第直线拟合,得到多条第二直线。
一种可能的实施方式中,坐标修正模块703在用于基于多条第一直线和多条第二直线,得到修正像素坐标时,包括:
将多条第一直线和多条第二直线的交点对应的像素坐标,作为修正像素坐标。
一种可能的实施方式中,第一坐标轴为图像坐标系中的横坐标轴,第二坐标轴为图像坐标系中的纵坐标轴;或者,第一坐标轴为图像坐标系中的纵坐标轴,第二坐标轴为图像坐标系中的横坐标轴。
一种可能的实施方式中,第二确定模块704在确定图像采集设备的单应性矩阵之后,还用于:
获取图像采集设备拍摄的多个测试图像;
针对每个测试图像,确定测试图像中每个测试参照物在图像坐标系中的测试像素坐标;
基于测试像素坐标和单应性矩阵,确定测试参照物在世界坐标系中的测试世界坐标;
基于多个测试图像中测试参照物的真实世界坐标和测试世界坐标,确定单应性矩阵的准确度。
参见图8所示,本公开实施例还提供了一种位置确定装置800,通过上述标定装置确定的图像采集设备的单应性矩阵对基于该图像采集设备获取到的目标物进行定位。该位置确定装置800包括:
图像获取模块801,用于获取图像采集设备拍摄目标物后得到的目标图像;
第一确定模块802,用于基于目标图像,确定目标物在图像坐标系下的像素坐标;
第二确定模块803,用于基于像素坐标和图像采集设备的单应性矩阵,确定目标物在世界坐标系下的世界坐标,图像采集设备的单应性矩阵采用本公开实施例提供的任一标定方法确定。
一种可能的实施方式中,确定目标物在世界坐标系下的世界坐标之后,第二确定模块803还用于:
基于目标物在世界坐标系下的世界坐标以及世界坐标系中的预设位置点的坐标,确定目标物与预设位置点之间的距离。
对应于图1所示的标定方法,本公开实施例还提供了一种电子设备900,如图9所示,为本公开实施例提供的电子设备的结构示意图,包括:
处理器901、存储器902、和总线903;存储器902用于存储执行指令,包括内存9021和外部存储器9022;这里的内存9021也称内存储器,用于暂时存放处理器901中的处理数据,以及与硬盘等外部存储器9022交换的数据,处理器901通过内存9021与外部存储器9022进行数据交换,当电子设备900运行的情况下,处理器901与存储器902之间通过总线903通信,使得处理器901在执行以下指令:获取图像采集设备拍摄的样本图像;基于样本图像,确定样本图像中多个样本参照物在图像坐标系中的初始像素坐标;基于确定的每个样本参照物在图像坐标系中的初始像素坐标,对位于同一条直线上的样本参照物进行直线拟合,并基于拟合的直线对参与拟合的初始像素坐标进行修正,得到修正像素坐标;基于样本图像中的每个样本参照物在世界坐标系下的世界坐标、以及得到的修正像素坐标,确定图像采集设备的单应性矩阵。
对应于图6所示的位置确定方法,本公开实施例还提供了一种电子设备1000,如图10所示,为本公开实施例提供的电子设备的结构示意图,包括:
处理器1001、存储器1002、和总线1003;存储器1002用于存储执行指令,包括内存10021和外部存储器10022;这里的内存10021也称内存储器,用于暂时存放处理器1001中的处理数据,以及与硬盘等外部存储器10022交换的数据,处理器1001通过内存10021与外部存储器10022进行数据交换,当电子设备1000运行的情况下,处理器1001与存储器1002之间通过总线1003通信,使得处理器1001在执行以下指令:获取图像采集设备拍摄目标物后得到的目标图像;基于目标图像,确定目标物在图像坐标系下的像素坐标;基于像素坐标和图像采集设备的单应性矩阵,确定目标物在世界坐标系下的世界坐标,图像采集设备的单应性矩阵采用第一方面的标定方法确定。
本公开实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行的情况下执行上述方法实施例中的标定方法的步骤或者位置确定方法的步骤。
本公开实施例所提供的标定方法或者位置确定方法的计算机程序产品,包括存储了程序代码的计算机可读存储介质,所述程序代码包括的指令可用于执行上述方法实施例中的标定方法的步骤或者位置确定方法的步骤,具体可参见上述方法实施例,在此不再赘述。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***和装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。在本公开所提供的几个实施例中,应该理解到,所揭露的***、装置和方法,可以通过其它的方式实 现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现的情况下可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用的情况下,可以存储在一个处理器可执行的非易失的计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上所述实施例,仅为本公开的具体实施方式,用以说明本公开的技术方案,而非对其限制,本公开的保护范围并不局限于此,尽管参照前述实施例对本公开进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本公开实施例技术方案的精神和范围,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应所述以权利要求的保护范围为准。

Claims (19)

  1. 一种标定方法,其特征在于,包括:
    获取图像采集设备拍摄的样本图像;
    基于所述样本图像,确定所述样本图像中多个样本参照物在图像坐标系中的初始像素坐标;
    基于确定的每个样本参照物在图像坐标系中的初始像素坐标,对位于同一条直线上的所述样本参照物进行直线拟合,并基于拟合的直线对参与拟合的初始像素坐标进行修正,得到修正像素坐标;
    基于所述样本图像中的每个样本参照物在世界坐标系下的世界坐标、以及得到的修正像素坐标,确定所述图像采集设备的单应性矩阵。
  2. 根据权利要求1所述的标定方法,其特征在于,所述基于确定的每个样本参照物在图像坐标系中的初始像素坐标,对位于同一条直线上的所述样本参照物进行直线拟合,并基于拟合的直线对参与拟合的初始像素坐标进行修正,得到修正像素坐标,包括:
    基于确定的每个样本参照物在图像坐标系中的初始像素坐标,对位于沿第一方向的直线上的样本参照物分别进行直线拟合,得到多条第一直线;
    基于多条第一直线,对每个样本参照物在图像坐标系中的初始像素坐标进行修正,得到中间像素坐标;并基于每个样本参照物的中间像素坐标,对位于沿第二方向上的直线上的样本参照物分别进行直线拟合,得到多条第二直线,其中,沿第一方向上的直线与沿第二方向上的直线相交;
    基于多条所述第一直线和多条所述第二直线,得到所述修正像素坐标。
  3. 根据权利要求2所述的标定方法,其特征在于,所述初始像素坐标包括初始第一坐标值和初始第二坐标值,所述初始第一坐标值对应的第一坐标轴与所述初始第二坐标值对应的第二坐标轴相互垂直;
    基于多条第一直线,对每个样本参照物在图像坐标系中的初始像素坐标进行修正,得到中间像素坐标,包括:
    将每个样本参照物的初始像素坐标中的初始第一坐标值,代入该样本参照物所在的所述第一直线的直线方程,得到中间第二坐标值;一个样本参照物的中间像素坐标包括该样本参照物的初始第一坐标值和中间第二坐标值;
    基于每个样本参照物的中间像素坐标,对位于沿第二方向上的直线上的样本参照物分别进行直线拟合,得到多条第二直线,包括:
    基于每个样本参照物的中间像素坐标中的初始第一坐标值和中间第二坐标值,对位于沿第二方向的直线上的所述样本参照物进行直线拟合,得到多条第二直线。
  4. 根据权利要求2或3所述的标定方法,其特征在于,所述基于多条所述第一直线和多条所述第二直线,得到所述修正像素坐标,包括:
    将多条所述第一直线和多条所述第二直线的交点对应的像素坐标,作为所述修正像素坐标。
  5. 根据权利要求3所述的标定方法,其特征在于,所述第一坐标轴为图像坐标系中的横坐标轴,所述第二坐标轴为图像坐标系中的纵坐标轴;或者,所述第一坐标轴为图像坐标系中的纵坐标轴,所述第二坐标轴为图像坐标系中的横坐标轴。
  6. 根据权利要求1所述的标定方法,其特征在于,确定所述图像采集设备的单应性矩阵之后,还包括:
    获取所述图像采集设备拍摄的多个测试图像;
    针对每个所述测试图像,确定所述测试图像中每个测试参照物在图像坐标系中的测试像素坐标;
    基于所述测试像素坐标和所述单应性矩阵,确定所述测试参照物在所述世界坐标系中的测试世界坐标;
    基于多个所述测试图像中所述测试参照物的真实世界坐标和所述测试世界坐标,确定所述单应性矩阵的准确度。
  7. 一种位置确定方法,其特征在于,包括:
    获取图像采集设备拍摄目标物后得到的目标图像;
    基于所述目标图像,确定所述目标物在图像坐标系下的像素坐标;
    基于所述像素坐标和所述图像采集设备的单应性矩阵,确定所述目标物在世界坐标系下的世界坐标,所述图像采集设备的单应性矩阵采用权利要求1-6任一所述的标定方法确定。
  8. 根据权利要求7所述的位置确定方法,其特征在于,确定所述目标物在世界坐标系下的世界坐标之后,所述位置确定方法还包括:
    基于所述目标物在世界坐标系下的世界坐标以及所述世界坐标系中的预设位置点的坐标,确定所述目标物与所述预设位置点之间的距离。
  9. 一种标定装置,其特征在于,包括:
    图像获取模块,用于获取图像采集设备拍摄的样本图像;
    第一确定模块,用于基于所述样本图像,确定所述样本图像中多个样本参照物在图像坐标系中的初始像素坐标;
    坐标修正模块,用于基于确定的每个样本参照物在图像坐标系中的初始像素坐标,对位于同一条直线上的所述样本参照物进行直线拟合,并基于拟合的直线对参与拟合的初始像素坐标进行修正,得到修正像素坐标;
    第二确定模块,用于基于所述样本图像中的每个样本参照物在世界坐标系下的世界坐标、以及得到的修正像素坐标,确定所述图像采集设备的单应性矩阵。
  10. 根据权利要求9所述的标定装置,其特征在于,所述坐标修正模块用于:
    基于确定的每个样本参照物在图像坐标系中的初始像素坐标,对位于沿第一方向的直线上的样本参照物分别进行直线拟合,得到多条第一直线;
    基于多条第一直线,对每个样本参照物在图像坐标系中的初始像素坐标进行修正,得到中间像素坐标;并基于每个样本参照物的中间像素坐标,对位于沿第二方向上的直线上的样本参照物分别进行直线拟合,得到多条第二直线,其中,沿第一方向上的直线与沿第二方向上的直线相交;
    基于多条所述第一直线和多条所述第二直线,得到所述修正像素坐标。
  11. 根据权利要求10所述的标定装置,其特征在于,所述初始像素坐标包括初始第一坐标值和初始第二坐标值,所述初始第一坐标值对应的第一坐标轴与所述初始第二坐标值对应的第二坐标轴相互垂直;
    所述坐标修正模块在用于基于多条第一直线,对每个样本参照物在图像坐标系中的初始像素坐标进行修正,得到中间像素坐标时,包括:
    将每个样本参照物的初始像素坐标中的初始第一坐标值,代入该样本参照物所在的所述第一直线的直线方程,得到中间第二坐标值;一个样本参照物的中间像素坐标包括该样本参照物的初始第一坐标值和中间第二坐标值;
    所述坐标修正模块在用于基于每个样本参照物的中间像素坐标,对位于沿第二方向上 的直线上的样本参照物分别进行直线拟合,得到多条第二直线时,包括:
    基于每个样本参照物的中间像素坐标中的初始第一坐标值和中间第二坐标值,对位于沿第二方向的直线上的所述样本参照物进行第直线拟合,得到多条第二直线。
  12. 根据权利要求10或11所述的标定装置,其特征在于,所述坐标修正模块在用于基于多条所述第一直线和多条所述第二直线,得到所述修正像素坐标时,包括:
    将多条所述第一直线和多条所述第二直线的交点对应的像素坐标,作为所述修正像素坐标。
  13. 根据权利要求11所述的标定装置,其特征在于,所述第一坐标轴为图像坐标系中的横坐标轴,所述第二坐标轴为图像坐标系中的纵坐标轴;或者,所述第一坐标轴为图像坐标系中的纵坐标轴,所述第二坐标轴为图像坐标系中的横坐标轴。
  14. 根据权利要求9所述的标定装置,其特征在于,所述第二确定模块在确定所述图像采集设备的单应性矩阵之后,还用于:
    获取所述图像采集设备拍摄的多个测试图像;
    针对每个所述测试图像,确定所述测试图像中每个测试参照物在图像坐标系中的测试像素坐标;
    基于所述测试像素坐标和所述单应性矩阵,确定所述测试参照物在所述世界坐标系中的测试世界坐标;
    基于多个所述测试图像中所述测试参照物的真实世界坐标和所述测试世界坐标,确定所述单应性矩阵的准确度。
  15. 一种位置确定装置,其特征在于,包括:
    图像获取模块,用于获取图像采集设备拍摄目标物后得到的目标图像;
    第一确定模块,用于基于所述目标图像,确定所述目标物在图像坐标系下的像素坐标;
    第二确定模块,用于基于所述像素坐标和所述图像采集设备的单应性矩阵,确定所述目标物在世界坐标系下的世界坐标,所述图像采集设备的单应性矩阵采用权利要求1-6任一所述的标定方法确定。
  16. 根据权利要求15所述的位置确定装置,其特征在于,确定所述目标物在世界坐标系下的世界坐标之后,所述第二确定模块还用于:
    基于所述目标物在世界坐标系下的世界坐标以及所述世界坐标系中的预设位置点的坐标,确定所述目标物与所述预设位置点之间的距离。
  17. 一种电子设备,其特征在于,包括:处理器、存储介质和总线,所述存储介质存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述处理器与所述存储介质之间通过总线通信,所述处理器执行所述机器可读指令,以执行如权利要求1至6任一所述方法的步骤,或者,以执行如权利要求7或8所述方法的步骤。
  18. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器运行时执行如权利要求1至6任一所述方法的步骤,或者,以执行如权利要求7或8所述方法的步骤。
  19. 一种计算机程序产品,其特征在于,所述计算机程序产品包括程序指令,所述程序指令被处理器运行时该处理器执行如权利要求1至6任一所述方法的步骤,或者,以执行如权利要求7或8所述方法的步骤。
PCT/CN2020/142509 2020-03-13 2020-12-31 标定方法、位置确定方法、装置、电子设备及存储介质 WO2021179772A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
KR1020217024741A KR20210116507A (ko) 2020-03-13 2020-12-31 교정 방법, 위치 확정 방법, 장치, 전자 디바이스 및 저장매체
SG11202111469TA SG11202111469TA (en) 2020-03-13 2020-12-31 Calibration method and apparatus, location determination method and apparatus, electronic device, and storage medium
JP2021546384A JP2022528301A (ja) 2020-03-13 2020-12-31 キャリブレーション方法、位置確定方法、装置、電子機器及び記憶媒体
US17/502,387 US20220036587A1 (en) 2020-03-13 2021-10-15 Calibration method, electronic device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010175090.3 2020-03-13
CN202010175090.3A CN111380502B (zh) 2020-03-13 2020-03-13 标定方法、位置确定方法、装置、电子设备及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/502,387 Continuation US20220036587A1 (en) 2020-03-13 2021-10-15 Calibration method, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021179772A1 true WO2021179772A1 (zh) 2021-09-16

Family

ID=71215336

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/142509 WO2021179772A1 (zh) 2020-03-13 2020-12-31 标定方法、位置确定方法、装置、电子设备及存储介质

Country Status (6)

Country Link
US (1) US20220036587A1 (zh)
JP (1) JP2022528301A (zh)
KR (1) KR20210116507A (zh)
CN (1) CN111380502B (zh)
SG (1) SG11202111469TA (zh)
WO (1) WO2021179772A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114199124A (zh) * 2021-11-09 2022-03-18 汕头大学 基于线性拟合的坐标标定方法、装置、***及介质

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111380502B (zh) * 2020-03-13 2022-05-24 商汤集团有限公司 标定方法、位置确定方法、装置、电子设备及存储介质
CN112419423A (zh) * 2020-10-30 2021-02-26 上海商汤临港智能科技有限公司 一种标定方法、装置、电子设备及存储介质
CN112489136B (zh) * 2020-11-30 2024-04-16 商汤集团有限公司 标定方法、位置确定方法、装置、电子设备及存储介质
CN112529968A (zh) * 2020-12-22 2021-03-19 上海商汤临港智能科技有限公司 摄像设备标定方法、装置、电子设备及存储介质
CN113129378A (zh) * 2021-04-28 2021-07-16 北京市商汤科技开发有限公司 一种定位方法、装置、电子设备及存储介质
CN113313772B (zh) * 2021-07-28 2021-10-15 浙江华睿科技股份有限公司 一种标定方法、装置、电子设备及存储介质
CN113643379A (zh) * 2021-08-05 2021-11-12 北京的卢深视科技有限公司 标定方法、标定装置、交互装置、电子设备及存储介质
CN117351077B (zh) * 2023-09-14 2024-07-02 广东凯普科技智造有限公司 一种点样仪动态预测的视觉修正方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101894366A (zh) * 2009-05-21 2010-11-24 北京中星微电子有限公司 一种获取标定参数的方法、装置及一种视频监控***
CN103247048A (zh) * 2013-05-10 2013-08-14 东南大学 一种基于二次曲线与直线的摄像机混合标定方法
US20160267661A1 (en) * 2015-03-10 2016-09-15 Fujitsu Limited Coordinate-conversion-parameter determination apparatus, coordinate-conversion-parameter determination method, and non-transitory computer readable recording medium having therein program for coordinate-conversion-parameter determination
CN108805934A (zh) * 2017-04-28 2018-11-13 华为技术有限公司 一种车载摄像机的外部参数标定方法及装置
CN109443209A (zh) * 2018-12-04 2019-03-08 四川大学 一种基于单应性矩阵的线结构光***标定方法
CN111380502A (zh) * 2020-03-13 2020-07-07 商汤集团有限公司 标定方法、位置确定方法、装置、电子设备及存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009129001A (ja) * 2007-11-20 2009-06-11 Sanyo Electric Co Ltd 運転支援システム、車両、立体物領域推定方法
JP6738293B2 (ja) * 2017-02-23 2020-08-12 Kddi株式会社 カメラキャリブレーション方法、プログラムおよび装置
CN110345875B (zh) * 2018-04-04 2021-04-27 灵动科技(北京)有限公司 标定及测距方法、装置、电子设备及计算机可读存储介质
CN108875657A (zh) * 2018-06-26 2018-11-23 北京茵沃汽车科技有限公司 一种车道线检测方法
CN108986172B (zh) * 2018-07-25 2021-09-07 西北工业大学 一种面向小景深***的单视图线性摄像机标定方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101894366A (zh) * 2009-05-21 2010-11-24 北京中星微电子有限公司 一种获取标定参数的方法、装置及一种视频监控***
CN103247048A (zh) * 2013-05-10 2013-08-14 东南大学 一种基于二次曲线与直线的摄像机混合标定方法
US20160267661A1 (en) * 2015-03-10 2016-09-15 Fujitsu Limited Coordinate-conversion-parameter determination apparatus, coordinate-conversion-parameter determination method, and non-transitory computer readable recording medium having therein program for coordinate-conversion-parameter determination
CN108805934A (zh) * 2017-04-28 2018-11-13 华为技术有限公司 一种车载摄像机的外部参数标定方法及装置
CN109443209A (zh) * 2018-12-04 2019-03-08 四川大学 一种基于单应性矩阵的线结构光***标定方法
CN111380502A (zh) * 2020-03-13 2020-07-07 商汤集团有限公司 标定方法、位置确定方法、装置、电子设备及存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114199124A (zh) * 2021-11-09 2022-03-18 汕头大学 基于线性拟合的坐标标定方法、装置、***及介质

Also Published As

Publication number Publication date
JP2022528301A (ja) 2022-06-10
SG11202111469TA (en) 2021-11-29
KR20210116507A (ko) 2021-09-27
CN111380502A (zh) 2020-07-07
US20220036587A1 (en) 2022-02-03
CN111380502B (zh) 2022-05-24

Similar Documents

Publication Publication Date Title
WO2021179772A1 (zh) 标定方法、位置确定方法、装置、电子设备及存储介质
CN111210468B (zh) 一种图像深度信息获取方法及装置
CN110111248B (zh) 一种基于特征点的图像拼接方法、虚拟现实***、照相机
CN109657607B (zh) 一种基于人脸识别的人脸目标测距方法、装置及存储介质
WO2023011339A1 (zh) 视线方向追踪方法和装置
CN111932565B (zh) 一种多靶标识别跟踪解算方法
CN112489136B (zh) 标定方法、位置确定方法、装置、电子设备及存储介质
CN110443879B (zh) 一种基于神经网络的透视误差补偿方法
CN110763306B (zh) 一种基于单目视觉的液位测量***及方法
CN109191374B (zh) 一种畸变参数测量方法、装置及***
CN108398123B (zh) 一种全站仪及其度盘标定方法
WO2024011764A1 (zh) 标定参数确定方法、混合标定板、装置、设备和介质
US10628968B1 (en) Systems and methods of calibrating a depth-IR image offset
CN106408614B (zh) 适于现场应用的摄像机内参数标校方法和***
CN114360043B (zh) 模型参数标定方法、视线追踪方法、装置、介质及设备
WO2019127319A1 (zh) 头戴式显示设备的畸变测量方法及***
CN109308472B (zh) 一种基于虹膜投影匹配函数的三维视线估计方法
CN110414101B (zh) 一种仿真场景测量方法、准确性测定方法及***
WO2020224199A1 (zh) 鱼眼相机标定***、方法、装置、电子设备及存储介质
CN109712198B (zh) 一种高级驾驶辅助***的标定方法
CN115187612A (zh) 一种基于机器视觉的平面面积测量方法、装置及***
CN113012238B (zh) 一种多深度相机快速标定与数据融合的方法
CN111710002B (zh) 一种基于Optitrack***的相机外参标定方法
CN111998823B (zh) 基于双目异光源测距装置的目标测距方法
CN112419423A (zh) 一种标定方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 20217024741

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2021546384

Country of ref document: JP

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20924724

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20924724

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 28.03.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20924724

Country of ref document: EP

Kind code of ref document: A1