WO2023284358A1 - Camera calibration method and apparatus, electronic device, and storage medium - Google Patents

Camera calibration method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2023284358A1
WO2023284358A1 PCT/CN2022/088601 CN2022088601W WO2023284358A1 WO 2023284358 A1 WO2023284358 A1 WO 2023284358A1 CN 2022088601 W CN2022088601 W CN 2022088601W WO 2023284358 A1 WO2023284358 A1 WO 2023284358A1
Authority
WO
WIPO (PCT)
Prior art keywords
camera
target
detection frame
camera parameter
image
Prior art date
Application number
PCT/CN2022/088601
Other languages
French (fr)
Chinese (zh)
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 北京迈格威科技有限公司
Publication of WO2023284358A1 publication Critical patent/WO2023284358A1/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
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras

Definitions

  • the present application relates to the technical field of image processing, in particular, to a camera calibration method, device, electronic equipment and storage medium.
  • the parameters of the geometric model are the camera parameters.
  • the process of solving the camera parameters is called camera calibration.
  • the first type of camera calibration method needs to rely on the placed calibration objects, and the manufacturing accuracy of the calibration objects will affect the calibration results.
  • some application scenarios for example, security prevention and control scenarios
  • the second type of camera calibration method mainly uses the motion information of the camera to calibrate the camera.
  • This method does not need to rely on the calibration object, but it needs to control the camera to do some special motion, and The method is not suitable for scenes where the motion information is unknown or the camera movement cannot be controlled (for example, a security prevention and control scene). From the above analysis, it can be seen that the application scene of the relevant camera calibration method is limited.
  • embodiments of the present application provide a camera calibration method, device, electronic equipment, and storage medium, so as to at least solve the above problems.
  • Some embodiments of the present application provide a camera calibration method, the method may include: acquiring information of detection frames of at least two target areas in the first image; wherein, the first image is taken by the camera at the first moment The image received; the information of each detection frame includes: the position and size of the corresponding detection frame in the first image; according to the information of the detection frames of the at least two targets, the first linear parameter group is determined; wherein , the first linear parameter group is used to characterize the linear relationship between the position and size of the detection frame in the first image; the first linear parameter exists in the predetermined correspondence between the linear parameter group and the camera parameter group When grouping, find the first camera parameter group corresponding to the first linear parameter group from the corresponding relationship; wherein, the first camera parameter group includes: the erection height of the camera, the pitch of the camera angle and the focal length of the camera; determining a target camera parameter set according to the first camera parameter set.
  • the information of the detection frames in the area where at least two targets are located in the first image captured by the camera is obtained, and the information of each detection frame includes: the position and size of the corresponding detection frame in the first image ; According to the information of the detection frame of at least two targets, determine the first linear parameter group that characterizes the linear relationship between the position and size of the detection frame in the first image, and then from the predetermined linear parameter group and camera parameter group In the corresponding relationship, quickly find out the first camera parameter group corresponding to the first linear parameter group, and determine the target camera parameter group according to the first camera parameter group.
  • the whole process does not need to place a calibration object, and does not need to control the camera movement. Can complete camera calibration.
  • the method may further include: acquiring a plurality of different camera parameter groups; parameters corresponding to any two camera parameter groups in the plurality of different camera parameter groups The types are the same; for each camera parameter group, use the camera parameter group, the size and position information of at least two virtual targets to generate a detection frame simulation diagram; wherein, the detection frame simulation diagram includes: the at least two The detection frame of the virtual target; according to the position and size of at least two detection frames in the detection frame simulation diagram in the detection frame simulation diagram, a linear parameter group is determined; the relationship between the linear parameter group and the camera parameter group is established Correspondence.
  • the size and position information of at least two virtual targets to generate a detection frame simulation diagram may include: The size distribution of the real target of the same type as the virtual target generates the size of the at least two virtual targets; generates the position information of the at least two virtual targets; for each camera parameter group, according to the camera parameter group, the at least The size and position information of the two virtual objects is used to generate the simulation diagram of the detection frame.
  • the sizes of at least two virtual targets are generated according to the size distribution of real targets of the same type as the virtual targets; for each camera parameter set, the positions of at least two virtual targets generated according to the camera parameter set Size and position information to generate a simulation map of the detection frame. Since the size of the virtual target is generated according to the size distribution of the same type of real target, it is ensured that the generated detection frame distribution map is more meaningful.
  • obtaining a plurality of different camera parameter groups may include: based on the target sampling interval, performing discrete values for each camera parameter within a value range to obtain the plurality of camera parameters parameter group.
  • each camera parameter is discretely valued within a range of values, thereby ensuring that multiple different camera parameter groups can be obtained.
  • the method may further include: for each linear parameter group in the corresponding relationship, in When the difference between the values of the corresponding parameters in the linear parameter group and the first linear parameter group is less than the target threshold, determine that the linear parameter group is the second linear parameter group; from the correspondence, find out the relationship with A second camera parameter set corresponding to the second linear parameter set; determining the target camera parameter set according to the second camera parameter set.
  • the two linear parameter groups are The difference between the values of the corresponding parameters in the corresponding camera parameter group will also be relatively small.
  • the first linear parameter group when the first linear parameter group does not exist in the corresponding relationship, it is determined from the corresponding relationship The difference between the values of the corresponding parameters in the first linear parameter group and the second linear parameter group whose values are smaller than the target threshold, and then find out the second camera parameter group corresponding to the second linear parameter group from the corresponding relationship , and then determine the target camera parameter set according to the second camera parameter set, so that when the first linear parameter set does not exist in the corresponding relationship, camera calibration can be completed relatively accurately.
  • the second linear parameter group corresponding to the second linear parameter group is found from the corresponding relationship.
  • the camera parameter group may include: for each second linear parameter group, finding the second camera parameter group corresponding to the second linear parameter group from the corresponding relationship; correspondingly, according to the second
  • determining the target camera parameter group includes: obtaining the detection frame information of the target area in the second image; the second image is the image captured by the camera at the second moment; the first moment and the The difference between the second moments is smaller than the target time difference; for each second camera parameter group, based on the second camera parameter group, the information of the detection frame of the target in the first image, and the information in the second image
  • the information of the detection frame of the target determines the final moving speed of the target captured by the camera from the first moment to the second moment; when it is determined that the final moving speed is within the normal moving speed range, determine the The second camera parameter set is qualified; according to the qualified second camera parameter set
  • this application considers that in most cases, the normal movement of the target The speed is within the normal moving speed range, and then obtain the detection frame information of the area where the target is located in the second image captured by the camera at the second moment, wherein the difference between the first moment and the second moment is smaller than the target time difference; then For each second camera parameter group, based on the second camera parameter group and the information of the detection frame of the target in the first image and the second image, determine the final moving speed, and when the final moving speed is determined to be within the normal moving speed range, determine that the second camera parameter set is qualified, and then determine the target camera parameter set according to the qualified second camera parameter set to ensure the accuracy of camera calibration.
  • the information of the detection frame of the target in the first image, and the information of the detection frame of the target in the second image determine The final moving speed of the target captured by the camera from the first moment to the second moment may include: the information of the detection frame of the target in the first image, and the target's detection frame information in the second image.
  • each detection frame information group includes: information of two detection frames corresponding to the target; information for each detection frame in each detection frame information group , based on the second camera parameter group and the information of the detection frame, determine the position information of the target corresponding to the detection frame in the world coordinate system; according to the information corresponding to each detection frame corresponding to the detection frame information group According to the position information of the target in the world coordinate system, the moving speed of the corresponding target between the first moment and the second moment is determined; according to the moving speed of the at least one target, the obtained Describe the final movement speed.
  • At least one target detection frame information group is determined from the target detection frame information in the first image and the second image, and for each detection frame information in each detection frame information group, Based on the second camera parameter group and the information of the detection frame, determine the position information of the target corresponding to the detection frame in the world coordinate system, and then according to the position information of each detection frame corresponding to the detection frame information group, Determine the moving speed of the corresponding target between the first moment and the second moment; determine the final moving speed according to the moving speed of at least one target to ensure the accuracy of the final moving speed.
  • the determining the target camera parameter set according to the qualified second camera parameter set may include: when the number of qualified second camera parameter sets is at least two, Values of corresponding parameters in at least two qualified second camera parameter sets are respectively averaged to obtain a target camera parameter set.
  • the target camera parameter set is obtained by averaging the values of corresponding parameters in at least two qualified second camera parameter sets, so as to improve the accuracy of camera calibration results.
  • the device may include: a first acquisition unit configured to acquire information of detection frames of areas where at least two targets are located in the first image; wherein, the The first image is the image captured by the camera at the first moment; the information of each detection frame includes: the position and size of the corresponding detection frame in the first image; the first determining unit is configured to be used according to the The information of the detection frames of at least two targets determines a first linear parameter group; wherein, the first linear parameter group is used to characterize the linear relationship between the position and size of the detection frames in the first image; the first The searching unit is configured to find out the first linear parameter group corresponding to the first linear parameter group from the corresponding relationship when the first linear parameter group exists in the predetermined correspondence between the linear parameter group and the camera parameter group.
  • a camera parameter group wherein, the first camera parameter group includes: the mounting size of the camera, the pitch angle of the camera, and the focal length of the camera; a first target determination unit, configured to parameter set determines the target camera
  • the device may further include: a camera parameter acquisition unit configured to acquire multiple different camera parameter sets; among the multiple different camera parameter sets The types of parameters corresponding to any two camera parameter groups are the same; the simulation map generation unit is configured to generate a detection frame for each camera parameter group by using the camera parameter group, at least two virtual target size and position information A simulation diagram; wherein, the detection frame simulation diagram includes: the detection frames of the at least two virtual targets; the linear parameter group determination unit is configured to be used for at least two detection frames in the detection frame simulation diagram according to the The detection frame simulates the position and size in the diagram to determine a linear parameter set; the corresponding relationship establishing unit is configured to establish a corresponding relationship between the linear parameter set and the camera parameter set.
  • a camera parameter acquisition unit configured to acquire multiple different camera parameter sets; among the multiple different camera parameter sets The types of parameters corresponding to any two camera parameter groups are the same
  • the simulation map generation unit is configured to generate a detection frame for each camera parameter group by using the camera parameter group, at least two virtual target size and position information A simulation diagram
  • the simulation diagram generation unit may include: a size generation unit configured to generate the The size of at least two virtual targets; the position information generation unit configured to generate the position information of the at least two virtual targets; the simulation map generation subunit configured to, for each camera parameter group, according to the camera parameters group, the size and position information of the at least two virtual objects, and generate the simulation diagram of the detection frame.
  • the camera parameter acquisition unit may be configured to perform discrete values for each camera parameter within a value range based on the target sampling interval to obtain the multiple different camera parameter sets.
  • the device may further include: a second determining unit configured to, when the first linear parameter group does not exist in the corresponding relationship, for the For each linear parameter group in the corresponding relationship, when the difference between the value of the linear parameter group and the value of the corresponding parameter in the first linear parameter group is smaller than the target threshold, the linear parameter group is determined to be the second linear parameter group
  • the second search unit is configured to find out the second camera parameter set corresponding to the second linear parameter set from the corresponding relationship; the second target determination unit is configured to use the second target determination unit according to the second A camera parameter set, for determining the target camera parameter set.
  • the second search unit may be configured to specifically use for each second linear parameter group, from the corresponding relationship, find out the second camera parameter group corresponding to the second linear parameter group;
  • the second target determining unit may include:
  • the second acquiring unit is configured to acquire the information of the detection frame of the area where the target is located in the second image; the second image is an image captured by the camera at a second moment; the first moment and the second The difference between the two moments is less than the target time difference; the speed determination unit is configured to, for each second camera parameter set, based on the second camera parameter set, the information of the detection frame of the target in the first image, and The information of the detection frame of the target in the second image determines the final moving speed of the target captured by the camera from the first moment to the second moment; the screening unit is configured to determine the When the final moving speed is within the normal moving speed range, it is determined that the second camera parameter set is qualified; the second target determination subunit is configured to determine the target camera parameter set according to the qualified second camera parameter set.
  • the speed determination unit may include: an information group determination unit configured to obtain the information of the detection frame of the target from the first image, and the second In the information of the detection frame of the target in the two images, at least one detection frame information group of the target is determined; each detection frame information group includes: information of two detection frames corresponding to the target; the position determination unit is configured to be used for each The information of each detection frame in the first detection frame information group, based on the second camera parameter group and the information of the detection frame, determine the position information of the target corresponding to the detection frame in the world coordinate system; the moving speed The determination unit is configured to determine, according to the position information of the target corresponding to each detection frame corresponding to the detection frame information group in the world coordinate system, that the corresponding target The moving speed between the second moments; the speed subunit is configured to obtain the final moving speed according to the moving speed of the at least one target.
  • the second target determination unit may be further configured to, when the number of qualified second camera parameter sets is at least two, respectively select at least two qualified The values of the corresponding parameters in the second camera parameter set are averaged to obtain the target camera parameter set.
  • Still other embodiments of the present application provide an electronic device, including a processor and a memory connected to the processor, where a computer program is stored in the memory, and when the computer program is executed by the processor, the The electronic device executes the method described in the first aspect.
  • Still other embodiments of the present application provide a computer-readable storage medium, where a computer program is stored in the storage medium, and when the computer program is run on a computer, the computer is made to execute the method described in the first aspect .
  • Still other embodiments of the present application provide a computer program, where the computer program includes computer readable code, and when the computer readable code is executed by a processor, implements the method provided by some implementations of the present application.
  • Still other embodiments of the present application provide a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, the method provided by some implementations of the present application is implemented.
  • FIG. 1 is a schematic flowchart of a camera calibration method provided in an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a simulation diagram of a detection frame provided by an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of a camera calibration device provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Icons 300-camera calibration device; 310-first acquisition unit; 320-first determination unit; 330-first search unit; 340-first target determination unit; 400-electronic equipment; 401-processor; 402-memory ; 403-communication interface.
  • Computer vision is specifically to allow machines to recognize the world.
  • Computer vision technology usually includes face recognition, liveness detection, fingerprint recognition and anti-counterfeiting verification, biometric recognition, face detection, pedestrian detection, target detection, pedestrian detection, etc.
  • FIG. 1 is a flow chart of a camera calibration method provided by an embodiment of the present application. The process shown in FIG. 1 will be described in detail below, and the method may include steps: S11-S14.
  • S11 Obtain the information of the detection frames in the area where at least two targets are located in the first image; wherein, the first image is an image captured by the camera at the first moment; the information of each detection frame includes: the corresponding detection frame is in The position and size in the first image.
  • S12 Determine the first linear parameter group according to the information of the detection frames of the at least two targets; wherein, the first linear parameter group is used to characterize the relationship between the position and size of the detection frames in the first image linear relationship.
  • the first linear parameter set exists in the predetermined correspondence between the linear parameter set and the camera parameter set, find the first camera parameter set corresponding to the first linear parameter set from the correspondence;
  • the first camera parameter group includes: the mounting height of the camera, the pitch angle of the camera, and the focal length of the camera.
  • the origin of the image coordinate system can be the center of the image captured by the camera or the vertex of the captured image, one of the x-axis and the y-axis of the image coordinate system is parallel to the upper edge of the image, and the x axis of the image coordinate system is The other of the axis and the y axis is parallel to the lower edge;
  • the origin of the camera coordinate system is the center of the camera, the z-axis of the camera coordinate system is consistent with the shooting direction of the camera, and the x-axis and y-axis of the camera coordinate system are determined according to the right-hand spiral rule;
  • the origin of the world coordinate system is the projection point of the center of the camera on the road where the target is located, the z axis of the world coordinate system is perpendicular to the road where the target is located, and the xy axis of the world coordinate system overlaps with the road where the target is located.
  • S11 Obtain the information of the detection frames in the area where at least two targets are located in the first image; wherein, the first image is an image captured by the camera at the first moment; the information of each detection frame includes: the corresponding detection frame is in The position and size in the first image.
  • the camera can be a camera arranged at any position, and the target can be a pedestrian, an animal, a vehicle, a building, etc.; in this embodiment, the target is a pedestrian, and the detection frame can be a rectangle or a square; The shape of the detection frame can be determined according to the shape of the target, usually a quadrilateral.
  • the position and size of the detection frame in the first image may be determined according to an image processing algorithm or a target detection model. It can be understood that the position and size of the detection frame in the first image may represent the position and size of its corresponding target in the image coordinate system.
  • the position of the detection frame can be determined according to the lower edge of the detection frame.
  • the aspect ratio of the detection frame is determined, and the long side, short side, diagonal line, area, etc. of the detection frame can be used as the size of the detection frame.
  • S11 can be implemented in the following manner: acquire the first image, use an image processing algorithm or a pre-trained target detection model to detect the target in the first image, and determine the area where at least two targets are located Information about the location and size of the detection box in the first image.
  • the information of the detection frames of the regions where at least two targets are located in the first image may be directly acquired from a third party.
  • S12 Determine the first linear parameter group according to the information of the detection frames of the at least two targets; wherein, the first linear parameter group is used to characterize the relationship between the position and size of the detection frames in the first image linear relationship.
  • b is the size of the detection frame in the image taken by the camera (in S12, the image is the first image), and u is the image of the detection frame in the camera (in S12, the image is the first image)
  • u is the image of the detection frame in the camera (in S12, the image is the first image)
  • the position in , k is the slope of the line, and d is the intercept of the line.
  • the first linear parameter group may include a value of parameter k and a value of parameter d; k and d may be collectively referred to as linear parameters.
  • u is determined with the center of the image as the coordinate origin of the image coordinate system.
  • the size of the detection frame in the first image conforms to a linear relationship with the position in the first image and is determined as follows:
  • the initial relationship expression represents the position, size and camera parameters of the detection frame corresponding to the target in the image captured by the camera, the position of the target in the world coordinate system, and the relationship between the actual size of the target .
  • the xy axis of the world coordinate system overlaps with the plane where the target is located (for example, when the target is a pedestrian, the world coordinate system overlaps with the road surface where the pedestrian is located)
  • c is the actual size of the target
  • f is the focal length of the camera
  • is the pitch angle of the camera in the world coordinate system defined above
  • h is the height of the camera
  • b is the size of the detection frame corresponding to the target in the image captured by the camera
  • u is the position of the detection frame corresponding to the target in the image captured by the camera.
  • u is determined with the center of the image as the coordinate origin of the image coordinate system.
  • the camera calibration is to determine the value of the camera parameters
  • the camera parameters include: the focal length f of the camera, the pitch angle ⁇ of the camera, and the erection height h of the camera.
  • the value range of u is [-540,540]. Within this range, the relationship between b and u can be approximated as a linear relationship from the above initial relationship expression, and the linear parameter used to characterize the linear parameter Groups k and d are associated with camera parameters.
  • the first linear parameter set exists in the predetermined correspondence between the linear parameter set and the camera parameter set, find the first camera parameter set corresponding to the first linear parameter set from the correspondence;
  • the first camera parameter group includes: the mounting height of the camera, the pitch angle of the camera, and the focal length of the camera.
  • each linear parameter group in the corresponding relationship includes: the value of the parameter k and the value of the parameter d, and each linear parameter group is different; each camera parameter group in the corresponding relationship includes: the value of the parameter f, the value of the parameter ⁇ and The value of parameter h is different for each camera parameter group.
  • S13 can be implemented as follows, the value of the parameter k in the first linear parameter group is compared with each value of the parameter k in the corresponding relationship, and the value of the parameter d in the first linear parameter group Values are compared with each value of the parameter d in the corresponding relationship to determine whether the value of the parameter k is the same as the value of k in the first linear parameter group in the linear parameter group of the corresponding relationship, and the value of the parameter d is the same as that of the first linear parameter group
  • S14 may be implemented in the following manner, directly determining the first camera parameter set as the target camera parameter set.
  • the target camera parameter set is the camera parameter set corresponding to the camera that captured the first image.
  • the representative detection frame can be determined according to the size and position of the detection frames of at least two targets in the image captured by the camera
  • the first linear parameter set of the linear relationship between the position and size in the image captured by the camera and then quickly find out the first linear parameter set from the corresponding relationship between the predetermined linear parameter set and the camera parameter set
  • the corresponding camera parameter group and determine the target camera parameter group representing the camera parameters according to the searched camera parameter group.
  • the whole process does not need to place a calibration object, nor does it need to control the camera movement.
  • the camera calibration can be completed only by the image taken by the camera itself. The efficiency and accuracy of camera calibration are greatly improved.
  • the method may further include steps A1-A4.
  • A1 multiple different camera parameter sets are acquired; the types of parameters corresponding to any two camera parameter sets in the multiple different camera parameter sets are the same.
  • each camera parameter group in a plurality of different camera parameter groups includes: the value of the focal length f of the camera, the value of the pitch angle ⁇ of the camera and the value of the erection height h of the camera, and in each camera parameter group At least one of the focal length f of the camera, the pitch angle ⁇ of the camera, and the erection height h of the camera is different from the value of the corresponding parameter in other camera parameter groups.
  • A1 may include: based on the target sampling interval, performing discrete values for each camera parameter within a value range to obtain the plurality of different camera parameter groups.
  • the target sampling interval and the value range corresponding to each camera parameter are set according to actual needs, and there is no limitation here.
  • the value range of each camera parameter is constant, the smaller the sampling interval is, the corresponding After the value is discretely selected within the value range, the number of camera parameter groups obtained is larger.
  • A1 may be implemented in the following manner, directly acquiring multiple different camera parameter sets from a third party, or acquiring multiple different camera parameter sets stored in advance.
  • step A2 is performed.
  • A2 For each camera parameter group, use the camera parameter group, the size and position information of at least two virtual targets to generate a detection frame simulation diagram; wherein, the detection frame simulation diagram includes: the at least two virtual targets detection frame.
  • A2 may include steps A21-A23.
  • A21 Generate the sizes of the at least two virtual objects according to the size distribution of real objects of the same type as the virtual objects.
  • the size of the virtual target may be the size of the virtual target in the world coordinate system.
  • A21 can be implemented in the following manner, obtain the size distribution of multiple real targets of the same type as the virtual target, and take the values of the minimum size and maximum size according to the minimum size and maximum size in the size distribution
  • the range is randomly sampled to obtain the dimensions of at least two virtual objects.
  • A21 can be implemented in the following manner: obtain the sizes of multiple real targets of the same type as the virtual target, randomly select the sizes of at least two real targets from the multiple real targets, and select The sizes of the at least two real targets are taken as the sizes of the at least two virtual targets.
  • A21 can be implemented in the following manner: obtain the sizes of multiple real targets of the same type as the virtual target, determine the average size of multiple real targets according to the sizes of the multiple real targets, and generate at least two The size of the virtual target, wherein the size of each virtual target obeys a normal distribution whose mean is an average size.
  • the number of multiple real targets may be 100, 1000, 2000, etc., which is not limited.
  • A22 Generate location information of the at least two virtual objects.
  • A22 may randomly generate position information of at least two virtual targets in the following manner.
  • A22 may be implemented in the following manner, generating position information of at least two virtual objects according to at least two pieces of predetermined position information.
  • the position information may be the position of the virtual target in the world coordinate system, or the position of the virtual target in the image coordinate system.
  • execution order of A21 and A22 is not limited.
  • A23 For each camera parameter set, generate the detection frame simulation diagram according to the camera parameter set, the size and position information of the at least two virtual objects.
  • A23 can be implemented in the following manner, for the size and position information of each virtual target, the virtual target is generated at the corresponding position 3D model, and then according to the 3D model of the virtual target and the camera parameter set, determine the projection of the 3D model of the virtual target in the image coordinate system of the camera corresponding to the camera parameter set (if the projection is determined, it is determined The size and position of the virtual target in the image coordinate system), and then according to the projection of the three-dimensional models of at least two virtual targets, a detection frame simulation diagram is generated; wherein, the detection frame simulation diagram includes at least two detection frames corresponding to the virtual targets box, as shown in Figure 2.
  • A23 can be implemented in the following manner. For the size and position information of each virtual target, use The size and position information of the camera parameter group and the virtual target, determine the size of the detection frame corresponding to the virtual target in the image coordinate system of the camera corresponding to the camera parameter group according to the aforementioned initial relational expression, and then according to at least two The position in the image coordinate system and the size in the image coordinate system of the detection frame corresponding to each virtual target are generated to generate a simulation diagram of the detection frame.
  • generating a detection frame simulation diagram does not mean that an image must be generated, as long as the size and position information of the detection frame corresponding to the area where the virtual target is located in the image coordinate system is determined, it is considered that the detection frame simulation has been generated picture.
  • step A3 is executed.
  • A3 Determine a linear parameter set according to the positions and sizes of at least two detection frames in the detection frame simulation graph in the detection frame simulation graph.
  • the coordinate system of the detection frame simulation graph is the image coordinate system of the camera corresponding to the corresponding camera parameter group.
  • step S12 for the specific implementation manner of A3, reference may be made to step S12, so details are not repeated here.
  • step A4 is performed.
  • A4 Establish the corresponding relationship between the linear parameter set and the camera parameter set.
  • the corresponding relationship between the linear parameter group and the camera parameter group is pre-established by detecting the simulation graph, and the camera parameter group can be determined directly by looking up the linear parameter group table when it is necessary to determine the camera parameter group, which greatly improves the camera parameter estimation efficiency.
  • the method may further include steps B1-B3.
  • B1 can be implemented in the following manner.
  • the parameters in the linear parameter group The value of k is made difference with the value of the parameter k in the first linear parameter group, obtains the first difference;
  • the value of the parameter d in this linear parameter group is made difference with the value of the parameter d in the first linear parameter group , to obtain the second difference, when it is determined that both the first difference and the second difference are smaller than the target threshold, the linear parameter group is determined to be the second linear parameter group; otherwise, it is determined that the linear parameter group is not the second linear group .
  • B2 can be implemented as follows, for the second linear parameter group, according to the position of the second linear parameter group in the corresponding relationship, from the corresponding relationship, find out the The second camera parameter group corresponding to the second linear parameter group.
  • B2 can be implemented in the following manner, for each second linear parameter group, from the corresponding relationship, find out the The second camera parameter group corresponding to the second linear parameter group.
  • B3 Determine the target camera parameter set according to the second camera parameter set.
  • B3 may be implemented in the following manner, directly determining the second camera parameter set as the target camera parameter set.
  • B3 may include steps B31-B34.
  • B31 Obtain the detection frame information of the area where the target is located in the second image; the second image is the image captured by the camera at the second moment; the difference between the first moment and the second moment less than the target time difference.
  • the first moment may be located before the second moment, or may be located after the second moment.
  • the value range of the target time difference may be 0.3 seconds-2 seconds, and the target time difference is determined according to the average normal moving speed of the target and the shooting range that the camera can cover.
  • step B32 is executed.
  • B32 For each second camera parameter group, based on the second camera parameter group, the information of the detection frame of the target in the first image, and the information of the detection frame of the target in the second image, determine the The final moving speed of the target captured by the camera from the first moment to the second moment.
  • B32 may include steps B321-B324.
  • each detection frame information group includes: The information of the two detection boxes corresponding to the target.
  • B321 can be implemented in the following manner.
  • the information of the detection frame of the target in the first image according to the position of the detection frame of the target in the first image, determine the distance between the target and the target from the first image. image, and then according to the image of the target and/or the position of the detection frame of the target in the first image, use target tracking technology to determine whether there is an image of the target in the second image, and if yes, the first image will be
  • the detection frame information of the target in the second image and the detection frame information of the target in the second image are divided into detection frame information groups of the target until at least one detection frame information group of the target is determined.
  • B322 For the information of each detection frame in each detection frame information group, based on the second camera parameter group and the information of the detection frame, determine the position of the target corresponding to the detection frame in the world coordinate system information.
  • the position information of the target corresponding to the detection frame in the world coordinate system can be uniquely determined according to the position and size of the detection frame in the image coordinate system.
  • B322 can be implemented in the following manner, for each detection frame in each detection frame information group (each detection frame information group includes the information of two detection frames, and the two detection frames correspond to the first The first image and the second image taken at the first moment and the second moment), based on the second camera parameter set and the position and size of the detection frame in its corresponding image, it is determined that the target corresponding to the detection frame is in the world Position information in a coordinate system.
  • step B323 After determining the position information of the target corresponding to the detection frame information group in the world coordinate system at the first moment and the second moment, step B323 is executed.
  • B323 can be implemented in the following manner. According to the position information of the target in the world coordinate system corresponding to the two detection frames corresponding to the corresponding target, the moving distance of the corresponding target is determined; according to the first moment and the second moment, the time difference between the first moment and the second moment is determined; then, the moving speed of the corresponding target between the first moment and the second moment is obtained by quotienting the moving distance and the time difference.
  • step B324 is executed.
  • B324 Obtain the final moving speed according to the moving speed of the at least one target.
  • B324 may directly determine the moving speed of the target as the final moving speed in the following manner.
  • B324 may average the determined moving speeds of the at least two targets between the first moment and the second moment in the following manner to obtain the final moving speed.
  • step B33 is executed.
  • the normal movement speed range is determined according to the target type.
  • the moving speed of a vehicle type object is 20km/h-120km/h.
  • B33 can be implemented in the following manner, determine whether the final moving speed is within the normal moving speed range, if it is determined that the final moving speed is within the normal moving speed range, then determine that the second camera parameter set is qualified; otherwise , it is determined that the second camera parameter set is unqualified.
  • step B34 is executed.
  • B34 Determine the target camera parameter set according to the qualified second camera parameter set.
  • B34 may be implemented in the following manner, directly determining the qualified second camera parameter set as the final camera parameter set of the camera.
  • B34 may be implemented in the following manner, respectively calculating the values of corresponding parameters in at least two qualified second camera parameter groups Averaged to get the target camera parameter set.
  • the number of qualified second camera parameter groups is at least two, average the values of the parameter f in the at least two qualified second camera parameter groups to obtain the parameter f in the target camera parameter group
  • the value of parameter ⁇ in at least two qualified second camera parameter groups is averaged to obtain the value of parameter ⁇ in the target camera parameter group
  • the parameters in at least two qualified second camera parameter groups The value of h is averaged to obtain the value of parameter h in the target camera parameter group.
  • the unreasonable camera parameter set can be filtered through the index of target speed, and the final camera parameter set can be determined with a reasonable camera parameter set, which greatly improves the camera parameter set. Estimated accuracy.
  • FIG. 3 is a structural block diagram of a camera calibration device 300 provided in an embodiment of the present application.
  • the structural block diagram shown in Figure 3 will be described below, and the shown devices may include:
  • the first acquiring unit 310 may be configured to acquire information of detection frames of at least two target areas in the first image; wherein, the first image is an image captured by the camera at the first moment; each detection frame The information includes: the position and size of the corresponding detection frame in the first image.
  • the first determining unit 320 may be configured to determine a first linear parameter group according to the information of the detection frames of the at least two targets; wherein, the first linear parameter group is used to characterize the detection frames in the first A linear relationship between position and size in the image.
  • the first searching unit 330 may be configured to, when the first linear parameter group exists in the predetermined correspondence between the linear parameter group and the camera parameter group, find out the first linear parameter from the corresponding relationship.
  • the first target determining unit 340 may be configured to determine a target camera parameter set according to the first camera parameter set.
  • the device may further include: a camera parameter acquisition unit configured to acquire multiple different camera parameter sets; any two camera parameter sets in the multiple different camera parameter sets correspond to The types of parameters are the same; the simulation diagram generating unit is configured to use the camera parameter group, the size and position information of at least two virtual targets to generate a detection frame simulation diagram for each camera parameter group; wherein, the detection The frame simulation diagram includes: the detection frames of the at least two virtual targets; a linear parameter group determination unit configured to be used in the detection frame simulation graph according to the at least two detection frames in the detection frame simulation graph The position and size determine the linear parameter set; the corresponding relationship establishing unit is configured to establish the corresponding relationship between the linear parameter set and the camera parameter set.
  • a camera parameter acquisition unit configured to acquire multiple different camera parameter sets; any two camera parameter sets in the multiple different camera parameter sets correspond to The types of parameters are the same
  • the simulation diagram generating unit is configured to use the camera parameter group, the size and position information of at least two virtual targets to generate a detection frame simulation diagram for each camera parameter group; wherein
  • the simulation diagram generating unit may include: a size generating unit configured to generate the sizes of the at least two virtual objects according to the size distribution of real objects of the same type as the virtual objects;
  • the information generation unit is configured to generate the position information of the at least two virtual targets;
  • the simulation map generation subunit is configured to use for each camera parameter group, according to the size and position information of the at least two virtual targets , to generate the simulation diagram of the detection frame.
  • the camera parameter acquisition unit may be configured to perform discrete values of each camera parameter within a value range based on a target sampling interval to obtain the plurality of different camera parameter groups.
  • the device may further include: a second determination unit configured to, when the first linear parameter group does not exist in the corresponding relationship, for each linear parameter group in the corresponding relationship , when the differences between the values of the corresponding parameters in the linear parameter group and the first linear parameter group are smaller than the target threshold, the linear parameter group is determined to be the second linear parameter group; the second search unit is configured to use From the corresponding relationship, find out the second camera parameter set corresponding to the second linear parameter set; the second target determination unit is configured to determine the target camera according to the second camera parameter set parameter group.
  • the second search unit may be configured to specifically for each second linear parameter group, from the corresponding relationship, Find out the second camera parameter group corresponding to the second linear parameter group;
  • the second target determining unit may include:
  • the second acquiring unit is configured to acquire the information of the detection frame of the area where the target is located in the second image; the second image is an image captured by the camera at a second moment; the first moment and the second The difference between the two moments is less than the target time difference; the speed determination unit is configured to, for each second camera parameter set, based on the second camera parameter set, the information of the detection frame of the target in the first image, and The information of the detection frame of the target in the second image determines the final moving speed of the target captured by the camera from the first moment to the second moment; the screening unit is configured to determine the When the final moving speed is not within the normal moving speed range, it is determined that the second camera parameter set is unqualified; otherwise, it is determined that the second camera parameter set is qualified; the second target determination subunit is configured to parameter group, to determine the target camera parameter group.
  • the speed determining unit may include: an information group determining unit configured to obtain the information of the detection frame of the target in the first image and the information of the detection frame of the target in the second image Among them, the detection frame information group of at least one target is determined; each detection frame information group includes: information of two detection frames corresponding to the target; the position determination unit is configured to be used for each detection frame information group The information of the detection frame, based on the second camera parameter group and the information of the detection frame, determines the position information of the target corresponding to the detection frame in the world coordinate system; the moving speed determination unit is configured to use the The position information of the target corresponding to each detection frame corresponding to the detection frame information group in the world coordinate system determines the moving speed of the corresponding target between the first moment and the second moment a speed subunit configured to obtain the final moving speed according to the moving speed of the at least one target.
  • an information group determining unit configured to obtain the information of the detection frame of the target in the first image and the information of the detection frame of the target in the second image Among
  • the second target determining unit may also be configured to, when the number of qualified second camera parameter groups is at least two, respectively set corresponding The values of the parameters are averaged to obtain the target camera parameter set.
  • FIG. 4 is a schematic structural diagram of an electronic device 400 provided by an embodiment of the present application.
  • the electronic device 400 may be a personal computer, a tablet computer, a smart phone, a personal digital assistant (personal digital assistant, PDA) and the like.
  • PDA personal digital assistant
  • the electronic device 400 may include: a memory 402, a processor 401, a communication interface 403, and a communication bus, and the communication bus is used to implement connection and communication of these components.
  • the memory 402 can be used to store various data such as the camera calibration method provided by the embodiment of the present application and the calculation program instructions corresponding to the device, wherein the memory 402 can be, but not limited to, a random access memory, a read-only memory (Read Only Memory, ROM), Programmable Read-Only Memory (Programmable Read-Only Memory, PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (Electric Erasable Programmable Read -Only Memory, EEPROM), etc.
  • a random access memory a read-only memory (Read Only Memory, ROM), Programmable Read-Only Memory (Programmable Read-Only Memory, PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (Electric Erasable Programmable Read -Only Memory, EEPROM), etc.
  • the processor 401 can be used to read and execute the computer program instructions corresponding to the camera calibration method and device stored in the memory, so as to obtain the information of the detection frame of the area where at least two targets are located in the first image; wherein, the first The image is an image captured by the camera at the first moment; the information of each detection frame includes: the position and size of the corresponding detection frame in the first image; according to the information of the detection frames of the at least two targets, determine The first linear parameter group is obtained; wherein, the first linear parameter group is used to characterize the linear relationship between the position and size of the detection frame in the first image; the correspondence between the predetermined linear parameter group and the camera parameter group When the first linear parameter group exists in the relationship, the first camera parameter group corresponding to the first linear parameter group is found from the corresponding relationship; wherein, the first camera parameter group includes: The erection height, the pitch angle of the camera, and the focal length of the camera; determine a target camera parameter set according to the first camera parameter set.
  • the processor 401 may be an integrated circuit chip, which has a signal processing capability.
  • processor 401 can be general purpose processor, comprises CPU, network processor (Network Processor, NP) etc.; Can also be digital signal processor (DSP), application specific integrated circuit (ASIC), field programmable gate array (FPGA) ) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the communication interface 403 can be used to receive or send data.
  • the embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is run on the computer, the computer is made to execute any one of the implementations of the present application. method provided by the method.
  • Still other embodiments of the present application provide a computer program, where the computer program includes computer readable code, and when the computer readable code is executed by a processor, implements the method provided by some implementations of the present application.
  • Still other embodiments of the present application provide a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, the method provided by some implementations of the present application is implemented.
  • the camera calibration method, device, electronic equipment, and storage medium proposed by each embodiment of the present application are used to obtain the information of the detection frames of at least two target areas in the first image captured by the camera, and each detection frame
  • the information includes: the position and size of the corresponding detection frame in the first image; according to the information of the detection frames of at least two targets, determine the linear relationship between the position and size of the detection frame in the first image
  • the target camera parameter set is determined, and the camera calibration can be completed without placing a calibration object or controlling the camera movement during the whole process.
  • each block in a flowchart or block diagram may represent a module, program segment, or part of code that includes one or more Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based device that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.
  • each functional module in each embodiment of the present application may be integrated to form an independent part, each module may exist independently, or two or more modules may be integrated to form an independent part.
  • the present application provides a camera calibration method, device, electronic equipment, and storage medium, including: acquiring the detection frame information of at least two target areas in the first image; the first image is the image captured by the camera at the first moment; The information of each detection frame includes the position and size of the corresponding detection frame in the first image; according to the information of the detection frames of at least two targets, a first linear parameter group is determined; the first linear parameter group is used to characterize the detection frame The linear relationship between the position and size in the first image; when the first linear parameter group exists in the corresponding relationship between the predetermined linear parameter group and the camera parameter group, find out the relationship with the first linear parameter from the corresponding relationship
  • the camera calibration method, device, electronic device, and storage medium of the present application are reproducible, and can be applied in various applications.
  • the camera calibration method, device, electronic equipment, and storage medium of the present application may be applied in the technical field of image processing and the like.

Abstract

The present application provides a camera calibration method and apparatus, an electronic device, and a storage medium. The method comprises: obtaining information of bounding boxes of areas where at least two targets in a first image are located, wherein the first image is an image captured by a camera at a first moment, and the information of each bounding box comprises the position and the size of the corresponding bounding box in the first image; determining a first linear parameter group according to the information of the bounding boxes of the at least two targets, the first linear parameter group being used for representing a linear relationship between the position and the size of the bounding box in the first image; when the first linear parameter group is present in a predetermined correspondence between a linear parameter group and a camera parameter group, finding a first camera parameter group corresponding to the first linear parameter group from the correspondence, the first camera parameter group comprising the mounting height of the camera, the pitch angle of the camera, and the focal length of the camera; and determining a target camera parameter group according to the first camera parameter group. Camera calibration can be completed without placing a calibration object or controlling the camera to move.

Description

相机标定方法、装置、电子设备及存储介质Camera calibration method, device, electronic equipment and storage medium
相关申请的交叉引用Cross References to Related Applications
本申请要求于2021年07月16日提交中国国家知识产权局的申请号为2021108077251、名称为“相机标定方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application with application number 2021108077251 entitled "Camera Calibration Method, Device, Electronic Equipment, and Storage Medium" filed with the State Intellectual Property Office of China on July 16, 2021, the entire contents of which are incorporated by reference incorporated in this application.
技术领域technical field
本申请涉及图像处理技术领域,具体而言,涉及一种相机标定方法、装置、电子设备及存储介质。The present application relates to the technical field of image processing, in particular, to a camera calibration method, device, electronic equipment and storage medium.
背景技术Background technique
在图像测量过程以及机器视觉应用中,为确定空间物体表面中的点的三维几何位置与图像中的像素点的对应关系,通常需要建立相机成像的几何模型,而几何模型的参数就是相机参数,求解相机参数的过程称之为相机标定。In the image measurement process and machine vision applications, in order to determine the corresponding relationship between the three-dimensional geometric position of the point on the surface of the space object and the pixel point in the image, it is usually necessary to establish a geometric model of camera imaging, and the parameters of the geometric model are the camera parameters. The process of solving the camera parameters is called camera calibration.
相关的相机标定方法主要有两类,第一类相机标定方法需要依靠放置的标定物,且标定物的制作精度会影响标定结果,同时,由于有些应用场景(例如,安全防控场景)不适合放置标定物,继而限制了该方法的应用;第二类相机标定方法主要利用相机的运动信息来对相机进行标定,该方法不需要依靠标定物,但需要控制相机做某些特殊运动,并且该方法不适用于运动信息未知或无法控制相机移动的场景(例如,安全防控场景),从上述分析可知,相关的相机标定方法的应用场景局限。There are two main types of related camera calibration methods. The first type of camera calibration method needs to rely on the placed calibration objects, and the manufacturing accuracy of the calibration objects will affect the calibration results. At the same time, some application scenarios (for example, security prevention and control scenarios) are not suitable for Placing a calibration object limits the application of this method; the second type of camera calibration method mainly uses the motion information of the camera to calibrate the camera. This method does not need to rely on the calibration object, but it needs to control the camera to do some special motion, and The method is not suitable for scenes where the motion information is unknown or the camera movement cannot be controlled (for example, a security prevention and control scene). From the above analysis, it can be seen that the application scene of the relevant camera calibration method is limited.
发明内容Contents of the invention
鉴于此,本申请的实施例提供了一种相机标定方法、装置、电子设备及存储介质,以至少解决上述问题。In view of this, embodiments of the present application provide a camera calibration method, device, electronic equipment, and storage medium, so as to at least solve the above problems.
本申请的一些实施例提供一种相机标定方法,所述方法可以包括:获取第一图像中至少两个目标所在区域的检测框的信息;其中,所述第一图像为相机在第一时刻拍摄到的图像;每个检测框的信息包括:对应的检测框在所述第一图像中的位置和尺寸;根据所述至少两个目标的检测框的信息,确定出第一线性参数组;其中,该第一线性参数组用于表征检测框在所述第一图像中的位置和尺寸之间的线性关系;在预先确定的线性参数组和相机参数组的对应关系中存在该第一线性参数组时,从所述对应关系中,查找出与该第一线性参数组对应的第一相机参数组;其中,所述第一相机参数组包括:所述相机的架设高度、所述相机的俯仰角和所述相机的焦距;根据所述第一相机参数组确定目标相机参数组。Some embodiments of the present application provide a camera calibration method, the method may include: acquiring information of detection frames of at least two target areas in the first image; wherein, the first image is taken by the camera at the first moment The image received; the information of each detection frame includes: the position and size of the corresponding detection frame in the first image; according to the information of the detection frames of the at least two targets, the first linear parameter group is determined; wherein , the first linear parameter group is used to characterize the linear relationship between the position and size of the detection frame in the first image; the first linear parameter exists in the predetermined correspondence between the linear parameter group and the camera parameter group When grouping, find the first camera parameter group corresponding to the first linear parameter group from the corresponding relationship; wherein, the first camera parameter group includes: the erection height of the camera, the pitch of the camera angle and the focal length of the camera; determining a target camera parameter set according to the first camera parameter set.
在上述实现过程中,获取相机拍摄到的第一图像中至少两个目标所在区域的检测框的信息,每个检测框的信息包括:对应的检测框在所述第一图像中的位置和尺寸;根据至少 两个目标的检测框的信息,确定出表征检测框在第一图像中的位置和尺寸之间的线性关系的第一线性参数组,继而从预先确定的线性参数组和相机参数组的对应关系中,快速地查找出与该第一线性参数组对应的第一相机参数组,并根据第一相机参数组确定目标相机参数组,整个过程无需放置标定物,也无需控制相机运动就能完成相机标定。In the above implementation process, the information of the detection frames in the area where at least two targets are located in the first image captured by the camera is obtained, and the information of each detection frame includes: the position and size of the corresponding detection frame in the first image ; According to the information of the detection frame of at least two targets, determine the first linear parameter group that characterizes the linear relationship between the position and size of the detection frame in the first image, and then from the predetermined linear parameter group and camera parameter group In the corresponding relationship, quickly find out the first camera parameter group corresponding to the first linear parameter group, and determine the target camera parameter group according to the first camera parameter group. The whole process does not need to place a calibration object, and does not need to control the camera movement. Can complete camera calibration.
基于这些实施例,在一种可能的设计中,所述方法还可以包括:获取多个不同的相机参数组;所述多个不同的相机参数组中的任意两个相机参数组所对应的参数的种类相同;针对每个相机参数组,利用该相机参数组、至少两个虚拟目标的尺寸和位置信息,生成检测框仿真图;其中,所述检测框仿真图中包括:所述至少两个虚拟目标的检测框;根据所述检测框仿真图中的至少两个检测框在所述检测框仿真图中的位置和尺寸,确定出线性参数组;建立该线性参数组与该相机参数组的对应关系。Based on these embodiments, in a possible design, the method may further include: acquiring a plurality of different camera parameter groups; parameters corresponding to any two camera parameter groups in the plurality of different camera parameter groups The types are the same; for each camera parameter group, use the camera parameter group, the size and position information of at least two virtual targets to generate a detection frame simulation diagram; wherein, the detection frame simulation diagram includes: the at least two The detection frame of the virtual target; according to the position and size of at least two detection frames in the detection frame simulation diagram in the detection frame simulation diagram, a linear parameter group is determined; the relationship between the linear parameter group and the camera parameter group is established Correspondence.
在上述实现过程中,在获取到多个不同的相机参数组之后,针对每个相机参数组,利用该相机参数组、至少两虚拟目标在世界坐标系中的尺寸和位置信息,生成检测框仿真图;继而根据至少两个检测框在检测框仿真图中的位置和尺寸,确定出表征检测框在检测框仿真图中的位置和尺寸之间的线性关系的线性参数组,建立该线性参数组与该相机参数组的对应关系,继而保证后续能够根据对应关系,快速查找出相机的相机参数组。In the above implementation process, after obtaining multiple different camera parameter sets, for each camera parameter set, use the camera parameter set, the size and position information of at least two virtual targets in the world coordinate system to generate a detection frame simulation Figure; then according to the position and size of at least two detection frames in the detection frame simulation diagram, determine the linear parameter group representing the linear relationship between the position and size of the detection frame in the detection frame simulation diagram, and set up the linear parameter group The corresponding relationship with the camera parameter set ensures that the camera parameter set of the camera can be quickly searched out subsequently according to the corresponding relationship.
基于这些实施例,在一种可能的设计中,针对每个相机参数组,利用该相机参数组、至少两个虚拟目标的尺寸和位置信息,生成检测框仿真图,可以包括:根据与所述虚拟目标同类型的真实目标的尺寸分布,生成所述至少两个虚拟目标的尺寸;生成所述至少两个虚拟目标的位置信息;针对每个相机参数组,根据该相机参数组、所述至少两个虚拟目标的尺寸和位置信息,生成所述检测框仿真图。Based on these embodiments, in a possible design, for each camera parameter group, using the camera parameter group, the size and position information of at least two virtual targets to generate a detection frame simulation diagram may include: The size distribution of the real target of the same type as the virtual target generates the size of the at least two virtual targets; generates the position information of the at least two virtual targets; for each camera parameter group, according to the camera parameter group, the at least The size and position information of the two virtual objects is used to generate the simulation diagram of the detection frame.
在上述实现过程中,根据与虚拟目标同类型的真实目标的尺寸分布,生成至少两个虚拟目标的尺寸;针对每个相机参数组,根据该相机参数组、生成的至少两个虚拟目标的位置尺寸和位置信息,来生成检测框仿真图,由于虚拟目标的尺寸根据与其同类型的真实目标的尺寸分布来生成,继而保证生成的检测框分布图更具有参考意义。In the above implementation process, the sizes of at least two virtual targets are generated according to the size distribution of real targets of the same type as the virtual targets; for each camera parameter set, the positions of at least two virtual targets generated according to the camera parameter set Size and position information to generate a simulation map of the detection frame. Since the size of the virtual target is generated according to the size distribution of the same type of real target, it is ensured that the generated detection frame distribution map is more meaningful.
基于这些实施例,在一种可能的设计中,获取多个不同的相机参数组,可以包括:基于目标采样间隔,对各个相机参数在取值范围内进行离散取值,得到所述多个相机参数组。Based on these embodiments, in a possible design, obtaining a plurality of different camera parameter groups may include: based on the target sampling interval, performing discrete values for each camera parameter within a value range to obtain the plurality of camera parameters parameter group.
在上述实现过程中,基于目标采样间隔,对各个相机参数在取值范围内进行离散取值,继而保证能够得到多个不同的相机参数组。In the above implementation process, based on the target sampling interval, each camera parameter is discretely valued within a range of values, thereby ensuring that multiple different camera parameter groups can be obtained.
基于这些实施例,在一种可能的设计中,在所述对应关系中不存在该第一线性参数组时,所述方法还可以包括:针对所述对应关系中的每个线性参数组,在该线性参数组与该第一线性参数组中的对应参数的值之间的差值均小于目标阈值时,确定该线性参数组为第二线性参数组;从所述对应关系中,查找出与所述第二线性参数组对应的第二相机参数组; 根据所述第二相机参数组,确定所述目标相机参数组。Based on these embodiments, in a possible design, when the first linear parameter group does not exist in the corresponding relationship, the method may further include: for each linear parameter group in the corresponding relationship, in When the difference between the values of the corresponding parameters in the linear parameter group and the first linear parameter group is less than the target threshold, determine that the linear parameter group is the second linear parameter group; from the correspondence, find out the relationship with A second camera parameter set corresponding to the second linear parameter set; determining the target camera parameter set according to the second camera parameter set.
针对任意两个线性参数组,若这两个线性参数组中的对应参数(两个线性参数组中相同类别的参数)的值之间的差值比较小,那么,这两个线性参数组各自对应的相机参数组中的对应参数的值之间的差值也会比较小,因此,在上述实现过程中,在对应关系中不存在该第一线性参数组时,从对应关系中,确定出与该第一线性参数组中的对应参数的值之间的差值均小于目标阈值的第二线性参数组,继而从对应关系中,查找出与第二线性参数组对应的第二相机参数组,继而根据第二相机参数组,确定目标相机参数组,由此,在对应关系中不存在该第一线性参数组时,也可以比较准确地完成相机标定。For any two linear parameter groups, if the difference between the values of the corresponding parameters (parameters of the same category in the two linear parameter groups) in the two linear parameter groups is relatively small, then the two linear parameter groups are The difference between the values of the corresponding parameters in the corresponding camera parameter group will also be relatively small. Therefore, in the above implementation process, when the first linear parameter group does not exist in the corresponding relationship, it is determined from the corresponding relationship The difference between the values of the corresponding parameters in the first linear parameter group and the second linear parameter group whose values are smaller than the target threshold, and then find out the second camera parameter group corresponding to the second linear parameter group from the corresponding relationship , and then determine the target camera parameter set according to the second camera parameter set, so that when the first linear parameter set does not exist in the corresponding relationship, camera calibration can be completed relatively accurately.
基于这些实施例,在一种可能的设计中,在所述第二线性参数组的数量为至少两个时,从所述对应关系中,查找出与所述第二线性参数组对应的第二相机参数组,可以包括:针对每个第二线性参数组,从所述对应关系中,查找出与该第二线性参数组对应的第二相机参数组;对应的,所述根据所述第二相机参数组,确定目标相机参数组包括:获取第二图像中目标所在区域的检测框的信息;所述第二图像为所述相机在第二时刻拍摄到的图像;所述第一时刻和所述第二时刻之间的差值小于目标时间差;针对每个第二相机参数组,基于该第二相机参数组、所述第一图像中目标的检测框的信息,以及所述第二图像中目标的检测框的信息,确定出所述相机在所述第一时刻至所述第二时刻拍摄到的目标的最终移动速度;在确定所述最终移动速度处于正常移动速度范围内时,确定该第二相机参数组合格;根据合格的第二相机参数组,确定所述目标相机参数组。Based on these embodiments, in a possible design, when the number of the second linear parameter groups is at least two, the second linear parameter group corresponding to the second linear parameter group is found from the corresponding relationship. The camera parameter group may include: for each second linear parameter group, finding the second camera parameter group corresponding to the second linear parameter group from the corresponding relationship; correspondingly, according to the second The camera parameter group, determining the target camera parameter group includes: obtaining the detection frame information of the target area in the second image; the second image is the image captured by the camera at the second moment; the first moment and the The difference between the second moments is smaller than the target time difference; for each second camera parameter group, based on the second camera parameter group, the information of the detection frame of the target in the first image, and the information in the second image The information of the detection frame of the target determines the final moving speed of the target captured by the camera from the first moment to the second moment; when it is determined that the final moving speed is within the normal moving speed range, determine the The second camera parameter set is qualified; according to the qualified second camera parameter set, the target camera parameter set is determined.
在上述实现过程中,在所述第二线性参数组的数量为至少两个时,针对每个第二线性参数组,从对应关系中,查找出与该第二线性参数组对应的第二相机参数组,为了将查找出的全部第二相机参数组中不合格的相机参数组进行剔除,以提高相机标定结果的准确性,因此,本申请考虑到在绝大多数情况下,目标的正常移动速度位于正常移动速度范围内,继而获取相机在第二时刻拍摄到的第二图像中目标所在区域的检测框的信息,其中,第一时刻和第二时刻之间的差值小于目标时间差;接着针对每个第二相机参数组,基于该第二相机参数组,以及第一图像和第二图像中目标的检测框的信息,确定出相机在第一时刻至第二时刻拍摄到的目标的最终移动速度,并在确定最终移动速度处于正常移动速度范围内时,确定该第二相机参数组合格,继而根据合格的第二相机参数组,确定目标相机参数组,保证相机标定的准确性。In the above implementation process, when the number of the second linear parameter groups is at least two, for each second linear parameter group, find out the second camera corresponding to the second linear parameter group from the corresponding relationship Parameter group, in order to eliminate unqualified camera parameter groups in all the second camera parameter groups found, so as to improve the accuracy of camera calibration results, therefore, this application considers that in most cases, the normal movement of the target The speed is within the normal moving speed range, and then obtain the detection frame information of the area where the target is located in the second image captured by the camera at the second moment, wherein the difference between the first moment and the second moment is smaller than the target time difference; then For each second camera parameter group, based on the second camera parameter group and the information of the detection frame of the target in the first image and the second image, determine the final moving speed, and when the final moving speed is determined to be within the normal moving speed range, determine that the second camera parameter set is qualified, and then determine the target camera parameter set according to the qualified second camera parameter set to ensure the accuracy of camera calibration.
基于这些实施例,在一种可能的设计中,基于该第二相机参数组、所述第一图像中目标的检测框的信息,以及所述第二图像中目标的检测框的信息,确定出所述相机在所述第一时刻至所述第二时刻拍摄到的目标的最终移动速度,可以包括:从所述第一图像中目标的检测框的信息,以及所述第二图像中目标的检测框的信息中,确定出至少一个目标的检 测框信息组;每个检测框信息组包括:对应目标的两个检测框的信息;针对每个检测框信息组中的每个检测框的信息,基于该第二相机参数组和该检测框的信息,确定出该检测框所对应的目标在所述世界坐标系中的位置信息;根据该检测框信息组所对应的每个检测框所对应的目标在所述世界坐标系中的位置信息,确定出所述对应的目标在所述第一时刻至所述第二时刻之间的移动速度;根据所述至少一个目标的移动速度,得到所述最终移动速度。Based on these embodiments, in a possible design, based on the second camera parameter set, the information of the detection frame of the target in the first image, and the information of the detection frame of the target in the second image, determine The final moving speed of the target captured by the camera from the first moment to the second moment may include: the information of the detection frame of the target in the first image, and the target's detection frame information in the second image. In the information of the detection frame, at least one detection frame information group of the target is determined; each detection frame information group includes: information of two detection frames corresponding to the target; information for each detection frame in each detection frame information group , based on the second camera parameter group and the information of the detection frame, determine the position information of the target corresponding to the detection frame in the world coordinate system; according to the information corresponding to each detection frame corresponding to the detection frame information group According to the position information of the target in the world coordinate system, the moving speed of the corresponding target between the first moment and the second moment is determined; according to the moving speed of the at least one target, the obtained Describe the final movement speed.
在上述实现过程中,从第一图像和第二图像中目标的检测框的信息中,确定出至少一个目标的检测框信息组,针对每个检测框信息组中的每个检测框的信息,基于该第二相机参数组和该检测框的信息,确定出该检测框所对应的目标在世界坐标系中的位置信息,继而根据该检测框信息组所对应的每个检测框的位置信息,确定出对应的目标在第一时刻至第二时刻之间的移动速度;根据至少一个目标的移动速度来确定最终移动速度,保证最终移动速度的准确性。In the above implementation process, at least one target detection frame information group is determined from the target detection frame information in the first image and the second image, and for each detection frame information in each detection frame information group, Based on the second camera parameter group and the information of the detection frame, determine the position information of the target corresponding to the detection frame in the world coordinate system, and then according to the position information of each detection frame corresponding to the detection frame information group, Determine the moving speed of the corresponding target between the first moment and the second moment; determine the final moving speed according to the moving speed of at least one target to ensure the accuracy of the final moving speed.
基于这些实施例,在一种可能的设计中,所述根据合格的第二相机参数组,确定所述目标相机参数组可以包括:在合格的第二相机参数组的数量为至少两个时,分别将至少两个合格的第二相机参数组中的对应参数的值求平均,得到目标相机参数组。Based on these embodiments, in a possible design, the determining the target camera parameter set according to the qualified second camera parameter set may include: when the number of qualified second camera parameter sets is at least two, Values of corresponding parameters in at least two qualified second camera parameter sets are respectively averaged to obtain a target camera parameter set.
在上述实现过程中,通过分别将至少两个合格的第二相机参数组中的对应参数的值求平均,得到目标相机参数组,以提高相机标定结果的准确性。In the above implementation process, the target camera parameter set is obtained by averaging the values of corresponding parameters in at least two qualified second camera parameter sets, so as to improve the accuracy of camera calibration results.
本申请的另一些实施例提供一种相机标定装置,所述装置可以包括:第一获取单元,配置成用于获取第一图像中至少两个目标所在区域的检测框的信息;其中,所述第一图像为相机在第一时刻拍摄到的图像;每个检测框的信息包括:对应的检测框在所述第一图像中的位置和尺寸;第一确定单元,配置成用于根据所述至少两个目标的检测框的信息,确定出第一线性参数组;其中,该第一线性参数组用于表征检测框在所述第一图像中的位置和尺寸之间的线性关系;第一查找单元,配置成用于在预先确定的线性参数组和相机参数组的对应关系中存在该第一线性参数组时,从所述对应关系中,查找出与该第一线性参数组对应的第一相机参数组;其中,所述第一相机参数组包括:所述相机的架设尺寸、所述相机的俯仰角和所述相机的焦距;第一目标确定单元,用于根据所述第一相机参数组确定目标相机参数组。Some other embodiments of the present application provide a camera calibration device, the device may include: a first acquisition unit configured to acquire information of detection frames of areas where at least two targets are located in the first image; wherein, the The first image is the image captured by the camera at the first moment; the information of each detection frame includes: the position and size of the corresponding detection frame in the first image; the first determining unit is configured to be used according to the The information of the detection frames of at least two targets determines a first linear parameter group; wherein, the first linear parameter group is used to characterize the linear relationship between the position and size of the detection frames in the first image; the first The searching unit is configured to find out the first linear parameter group corresponding to the first linear parameter group from the corresponding relationship when the first linear parameter group exists in the predetermined correspondence between the linear parameter group and the camera parameter group. A camera parameter group; wherein, the first camera parameter group includes: the mounting size of the camera, the pitch angle of the camera, and the focal length of the camera; a first target determination unit, configured to parameter set determines the target camera parameter set.
基于上述另一些实施例,在一种可能的设计中,所述装置还可以包括:相机参数获取单元,配置成用于获取多个不同的相机参数组;所述多个不同的相机参数组中的任意两个相机参数组所对应的参数的种类相同;仿真图生成单元,配置成用于针对每个相机参数组,利用该相机参数组、至少两个虚拟目标尺寸和位置信息,生成检测框仿真图;其中,所述检测框仿真图中包括:所述至少两个虚拟目标的检测框;线性参数组确定单元,配置成用 于根据所述检测框仿真图中的至少两个检测框在所述检测框仿真图中的位置和尺寸,确定出线性参数组;对应关系建立单元,配置成用于建立该线性参数组与该相机参数组的对应关系。Based on other embodiments above, in a possible design, the device may further include: a camera parameter acquisition unit configured to acquire multiple different camera parameter sets; among the multiple different camera parameter sets The types of parameters corresponding to any two camera parameter groups are the same; the simulation map generation unit is configured to generate a detection frame for each camera parameter group by using the camera parameter group, at least two virtual target size and position information A simulation diagram; wherein, the detection frame simulation diagram includes: the detection frames of the at least two virtual targets; the linear parameter group determination unit is configured to be used for at least two detection frames in the detection frame simulation diagram according to the The detection frame simulates the position and size in the diagram to determine a linear parameter set; the corresponding relationship establishing unit is configured to establish a corresponding relationship between the linear parameter set and the camera parameter set.
基于上述另一些实施例,在一种可能的设计中,所述仿真图生成单元可以包括:尺寸生成单元,配置成用于根据与所述虚拟目标同类型的真实目标的尺寸分布,生成所述至少两个虚拟目标的尺寸;位置信息生成单元,配置成用于生成所述至少两个虚拟目标的位置信息;仿真图生成子单元,配置成用于针对每个相机参数组,根据该相机参数组、所述至少两个虚拟目标的尺寸和位置信息,生成所述检测框仿真图。Based on other embodiments above, in a possible design, the simulation diagram generation unit may include: a size generation unit configured to generate the The size of at least two virtual targets; the position information generation unit configured to generate the position information of the at least two virtual targets; the simulation map generation subunit configured to, for each camera parameter group, according to the camera parameters group, the size and position information of the at least two virtual objects, and generate the simulation diagram of the detection frame.
基于上述另一些实施例,在一种可能的设计中,所述相机参数获取单元可以配置成具体用于基于目标采样间隔,对各个相机参数在取值范围内进行离散取值,得到所述多个不同的相机参数组。Based on the other embodiments above, in a possible design, the camera parameter acquisition unit may be configured to perform discrete values for each camera parameter within a value range based on the target sampling interval to obtain the multiple different camera parameter sets.
基于上述另一些实施例,在一种可能的设计中,所述装置还可以包括:第二确定单元,配置成用于在所述对应关系中不存在该第一线性参数组时,针对所述对应关系中的每个线性参数组,在该线性参数组与该第一线性参数组中的对应参数的值之间的差值均小于目标阈值时,确定该线性参数组为第二线性参数组;第二查找单元,配置成用于从所述对应关系中,查找出与所述第二线性参数组对应的第二相机参数组;第二目标确定单元,配置成用于根据所述第二相机参数组,确定所述目标相机参数组。Based on some other embodiments above, in a possible design, the device may further include: a second determining unit configured to, when the first linear parameter group does not exist in the corresponding relationship, for the For each linear parameter group in the corresponding relationship, when the difference between the value of the linear parameter group and the value of the corresponding parameter in the first linear parameter group is smaller than the target threshold, the linear parameter group is determined to be the second linear parameter group The second search unit is configured to find out the second camera parameter set corresponding to the second linear parameter set from the corresponding relationship; the second target determination unit is configured to use the second target determination unit according to the second A camera parameter set, for determining the target camera parameter set.
基于上述另一些实施例,在一种可能的设计中,在所述第二线性参数组的数量为至少两个时,所述第二查找单元可以配置成具体用于针对每个第二线性参数组,从所述对应关系中,查找出与该第二线性参数组对应的第二相机参数组;Based on the other embodiments above, in a possible design, when the number of the second linear parameter groups is at least two, the second search unit may be configured to specifically use for each second linear parameter group, from the corresponding relationship, find out the second camera parameter group corresponding to the second linear parameter group;
对应的,所述第二目标确定单元可以包括:Correspondingly, the second target determining unit may include:
第二获取单元,配置成用于获取第二图像中目标所在区域的检测框的信息;所述第二图像为所述相机在第二时刻拍摄到的图像;所述第一时刻和所述第二时刻之间的差值小于目标时间差;速度确定单元,配置成用于针对每个第二相机参数组,基于该第二相机参数组、所述第一图像中目标的检测框的信息,以及所述第二图像中目标的检测框的信息,确定出所述相机在所述第一时刻至所述第二时刻拍摄到的目标的最终移动速度;筛选单元,配置成用于在确定所述最终移动速度处于正常移动速度范围内时,确定该第二相机参数组合格;第二目标确定子单元,配置成用于根据合格的第二相机参数组,确定所述目标相机参数组。The second acquiring unit is configured to acquire the information of the detection frame of the area where the target is located in the second image; the second image is an image captured by the camera at a second moment; the first moment and the second The difference between the two moments is less than the target time difference; the speed determination unit is configured to, for each second camera parameter set, based on the second camera parameter set, the information of the detection frame of the target in the first image, and The information of the detection frame of the target in the second image determines the final moving speed of the target captured by the camera from the first moment to the second moment; the screening unit is configured to determine the When the final moving speed is within the normal moving speed range, it is determined that the second camera parameter set is qualified; the second target determination subunit is configured to determine the target camera parameter set according to the qualified second camera parameter set.
基于上述另一些实施例,在一种可能的设计中,所述速度确定单元可以包括:信息组确定单元,配置成用于从所述第一图像中目标的检测框的信息,以及所述第二图像中目标的检测框的信息中,确定出至少一个目标的检测框信息组;每个检测框信息组包括:对应 目标的两个检测框的信息;位置确定单元,配置成用于针对每个检测框信息组中的每个检测框的信息,基于该第二相机参数组和该检测框的信息,确定出该检测框所对应的目标在所述世界坐标系中的位置信息;移动速度确定单元,配置成用于根据该检测框信息组所对应的每个检测框所对应的目标在所述世界坐标系中的位置信息,确定出所述对应的目标在所述第一时刻至所述第二时刻之间的移动速度;速度子单元,配置成用于根据所述至少一个目标的移动速度,得到所述最终移动速度。Based on other embodiments above, in a possible design, the speed determination unit may include: an information group determination unit configured to obtain the information of the detection frame of the target from the first image, and the second In the information of the detection frame of the target in the two images, at least one detection frame information group of the target is determined; each detection frame information group includes: information of two detection frames corresponding to the target; the position determination unit is configured to be used for each The information of each detection frame in the first detection frame information group, based on the second camera parameter group and the information of the detection frame, determine the position information of the target corresponding to the detection frame in the world coordinate system; the moving speed The determination unit is configured to determine, according to the position information of the target corresponding to each detection frame corresponding to the detection frame information group in the world coordinate system, that the corresponding target The moving speed between the second moments; the speed subunit is configured to obtain the final moving speed according to the moving speed of the at least one target.
基于上述另一些实施例,在一种可能的设计中,所述第二目标确定单元还可以配置成用于在合格的第二相机参数组的数量为至少两个时,分别将至少两个合格的第二相机参数组中的对应参数的值求平均,得到目标相机参数组。Based on other embodiments above, in a possible design, the second target determination unit may be further configured to, when the number of qualified second camera parameter sets is at least two, respectively select at least two qualified The values of the corresponding parameters in the second camera parameter set are averaged to obtain the target camera parameter set.
本申请的又一些实施例提供一种电子设备,包括处理器以及与所述处理器连接的存储器,所述存储器内存储计算机程序,当所述计算机程序被所述处理器执行时,使得所述电子设备执行第一方面所述的方法。Still other embodiments of the present application provide an electronic device, including a processor and a memory connected to the processor, where a computer program is stored in the memory, and when the computer program is executed by the processor, the The electronic device executes the method described in the first aspect.
本申请的再一些实施例提供一种计算机可读的存储介质,所述存储介质中存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行第一方面所述的方法。Still other embodiments of the present application provide a computer-readable storage medium, where a computer program is stored in the storage medium, and when the computer program is run on a computer, the computer is made to execute the method described in the first aspect .
本申请的又一些实施例提供一种计算机程序,所述计算机程序包括计算机可读代码,所述计算机可读代码被处理器执行时实现本申请的一些实施提供的所述方法。Still other embodiments of the present application provide a computer program, where the computer program includes computer readable code, and when the computer readable code is executed by a processor, implements the method provided by some implementations of the present application.
本申请的又一些实施例提供一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序被处理器执行时实现本申请的一些实施提供的所述方法。Still other embodiments of the present application provide a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, the method provided by some implementations of the present application is implemented.
本申请的其他特征和优点将在随后的说明书阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请实施例了解。本申请的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。Other features and advantages of the present application will be set forth in the ensuing description and, in part, will be apparent from the description, or can be learned by practicing the embodiments of the present application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
附图说明Description of drawings
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the accompanying drawings used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, so It should be regarded as a limitation on the scope, and those skilled in the art can also obtain other related drawings based on these drawings without creative work.
图1为本申请实施例提供的相机标定方法的流程示意图。FIG. 1 is a schematic flowchart of a camera calibration method provided in an embodiment of the present application.
图2为本申请实施例提供的检测框仿真图的示意图。FIG. 2 is a schematic diagram of a simulation diagram of a detection frame provided by an embodiment of the present application.
图3为本申请实施例提供的相机标定装置的结构示意图。FIG. 3 is a schematic structural diagram of a camera calibration device provided by an embodiment of the present application.
图4为本申请实施例提供的电子设备的结构示意图。FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
图标:300-相机标定装置;310-第一获取单元;320-第一确定单元;330-第一查找单元;340-第一目标确定单元;400-电子设备;401-处理器;402-存储器;403-通信接口。Icons: 300-camera calibration device; 310-first acquisition unit; 320-first determination unit; 330-first search unit; 340-first target determination unit; 400-electronic equipment; 401-processor; 402-memory ; 403-communication interface.
具体实施方式detailed description
下面将结合本申请实施例中附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本申请的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。It should be noted that like numerals and letters denote similar items in the following figures, therefore, once an item is defined in one figure, it does not require further definition and explanation in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second" and the like are only used to distinguish descriptions, and cannot be understood as indicating or implying relative importance.
计算机视觉作为人工智能的一个重要分支,具体是让机器识别世界,计算机视觉技术通常包括人脸识别、活体检测、指纹识别与防伪验证、生物特征识别、人脸检测、行人检测、目标检测、行人识别、图像处理、图像识别、图像语义理解、图像检索、视频处理、视频内容识别、三维重建、虚拟现实、增强现实、同步定位与地图构建(SLAM)、计算摄影、机器人导航与定位等技术。随着人工智能技术的研究和进步,该项技术在众多领域展开了应用,例如安全防范、城市管理、交通管理、楼宇管理、园区管理、人脸通行、人脸考勤、物流管理、仓储管理、机器人、智能营销、计算摄影、手机影像、云服务、智能家居、穿戴设备、无人驾驶、自动驾驶、智能医疗、人脸支付、人脸解锁、人证核验、摄像机、移动互联网、网络直播、智能测温等领域。As an important branch of artificial intelligence, computer vision is specifically to allow machines to recognize the world. Computer vision technology usually includes face recognition, liveness detection, fingerprint recognition and anti-counterfeiting verification, biometric recognition, face detection, pedestrian detection, target detection, pedestrian detection, etc. Recognition, image processing, image recognition, image semantic understanding, image retrieval, video processing, video content recognition, 3D reconstruction, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), computational photography, robot navigation and positioning and other technologies. With the research and progress of artificial intelligence technology, this technology has been applied in many fields, such as security protection, urban management, traffic management, building management, park management, face access, face attendance, logistics management, warehouse management, Robots, smart marketing, computational photography, mobile imaging, cloud services, smart home, wearable devices, unmanned driving, autonomous driving, smart medical care, face payment, face unlocking, witness verification, cameras, mobile Internet, webcasting, Intelligent temperature measurement and other fields.
请参照图1,图1为本申请实施例提供的一种相机标定方法的流程图,下面将对图1所示的流程进行详细阐述,所述方法可以包括步骤:S11-S14。Please refer to FIG. 1 . FIG. 1 is a flow chart of a camera calibration method provided by an embodiment of the present application. The process shown in FIG. 1 will be described in detail below, and the method may include steps: S11-S14.
S11:获取第一图像中至少两个目标所在区域的检测框的信息;其中,所述第一图像为相机在第一时刻拍摄到的图像;每个检测框的信息包括:对应的检测框在所述第一图像中的位置和尺寸。S11: Obtain the information of the detection frames in the area where at least two targets are located in the first image; wherein, the first image is an image captured by the camera at the first moment; the information of each detection frame includes: the corresponding detection frame is in The position and size in the first image.
S12:根据所述至少两个目标的检测框的信息,确定出第一线性参数组;其中,该第一线性参数组用于表征检测框在所述第一图像中的位置和尺寸之间的线性关系。S12: Determine the first linear parameter group according to the information of the detection frames of the at least two targets; wherein, the first linear parameter group is used to characterize the relationship between the position and size of the detection frames in the first image linear relationship.
S13:在预先确定的线性参数组和相机参数组的对应关系中存在该第一线性参数组时,从所述对应关系中,查找出与该第一线性参数组对应的第一相机参数组;其中,所述第一相机参数组包括:所述相机的架设高度、所述相机的俯仰角和所述相机的焦距。S13: When the first linear parameter set exists in the predetermined correspondence between the linear parameter set and the camera parameter set, find the first camera parameter set corresponding to the first linear parameter set from the correspondence; Wherein, the first camera parameter group includes: the mounting height of the camera, the pitch angle of the camera, and the focal length of the camera.
S14:根据所述第一相机参数组确定目标相机参数组。S14: Determine a target camera parameter set according to the first camera parameter set.
下面对上述方法详细介绍。The above method is described in detail below.
为了便于后续理解,在此,先对相机标定方法中所涉及到的图像坐标系、相机坐标系和世界坐标系进行定义。For the convenience of subsequent understanding, here, the image coordinate system, camera coordinate system and world coordinate system involved in the camera calibration method are first defined.
具体地,图像坐标系的原点可以为相机所拍摄到的图像的中心或者所拍摄到的图像的顶点,图像坐标系的x轴、y轴之一与图像的上边沿平行,图像坐标系的x轴、y轴中的另一个与下边沿平行;Specifically, the origin of the image coordinate system can be the center of the image captured by the camera or the vertex of the captured image, one of the x-axis and the y-axis of the image coordinate system is parallel to the upper edge of the image, and the x axis of the image coordinate system is The other of the axis and the y axis is parallel to the lower edge;
相机坐标系的原点为所述相机的中心,相机坐标系的z轴与相机的拍摄方向一致,相机坐标系的x轴和y轴根据右手螺旋定则确定;The origin of the camera coordinate system is the center of the camera, the z-axis of the camera coordinate system is consistent with the shooting direction of the camera, and the x-axis and y-axis of the camera coordinate system are determined according to the right-hand spiral rule;
世界坐标系的原点为相机的中心在目标所在路面上的投影点,世界坐标系的z轴与目标所在路面垂直,世界坐标系的xy轴与目标所在路面重叠。The origin of the world coordinate system is the projection point of the center of the camera on the road where the target is located, the z axis of the world coordinate system is perpendicular to the road where the target is located, and the xy axis of the world coordinate system overlaps with the road where the target is located.
S11:获取第一图像中至少两个目标所在区域的检测框的信息;其中,所述第一图像为相机在第一时刻拍摄到的图像;每个检测框的信息包括:对应的检测框在所述第一图像中的位置和尺寸。S11: Obtain the information of the detection frames in the area where at least two targets are located in the first image; wherein, the first image is an image captured by the camera at the first moment; the information of each detection frame includes: the corresponding detection frame is in The position and size in the first image.
其中,在本实施例中,相机可以为设置在任意位置处的相机,目标可以为行人、动物、车辆、建筑物等;在本实施例中,目标为行人,检测框可以为长方形或正方形;检测框的形状可以根据目标的形状确定,通常为四边形。Wherein, in this embodiment, the camera can be a camera arranged at any position, and the target can be a pedestrian, an animal, a vehicle, a building, etc.; in this embodiment, the target is a pedestrian, and the detection frame can be a rectangle or a square; The shape of the detection frame can be determined according to the shape of the target, usually a quadrilateral.
检测框在第一图像中的位置和尺寸可以根据图像处理算法或目标检测模型确定。可以理解的是,检测框在第一图像中的位置和尺寸可以表征其对应的目标在图像坐标系中的位置和尺寸。The position and size of the detection frame in the first image may be determined according to an image processing algorithm or a target detection model. It can be understood that the position and size of the detection frame in the first image may represent the position and size of its corresponding target in the image coordinate system.
一例中,检测框的位置可以根据检测框的下边缘确定。对于一种特定类型的目标的检测框,检测框的长宽比是确定的,可将检测框的长边、短边、对角线、面积等作为检测框的尺寸。In one example, the position of the detection frame can be determined according to the lower edge of the detection frame. For a detection frame of a specific type of target, the aspect ratio of the detection frame is determined, and the long side, short side, diagonal line, area, etc. of the detection frame can be used as the size of the detection frame.
作为一种实施方式,S11可以按照如下方式实施,获取第一图像,利用图像处理算法或者预先训练好的目标检测模型,对第一图像中的目标进行检测,确定出表征至少两个目标所在区域在第一图像中的位置和尺寸的检测框的信息。As an implementation, S11 can be implemented in the following manner: acquire the first image, use an image processing algorithm or a pre-trained target detection model to detect the target in the first image, and determine the area where at least two targets are located Information about the location and size of the detection box in the first image.
其中,目标检测模型的训练可以参考相关技术,因此,在此不再赘述。Wherein, for the training of the target detection model, reference may be made to related technologies, so details will not be repeated here.
作为另一种实施方式,可以直接从第三方获取第一图像中至少两个目标所在区域的检测框的信息。As another implementation manner, the information of the detection frames of the regions where at least two targets are located in the first image may be directly acquired from a third party.
S12:根据所述至少两个目标的检测框的信息,确定出第一线性参数组;其中,该第一线性参数组用于表征检测框在所述第一图像中的位置和尺寸之间的线性关系。S12: Determine the first linear parameter group according to the information of the detection frames of the at least two targets; wherein, the first linear parameter group is used to characterize the relationship between the position and size of the detection frames in the first image linear relationship.
在实际实施过程中,S12可以按照如下方式实施,针对至少两个目标的检测框的信息中的每个检测框的信息,将该检测框的位置和尺寸输入线性关系表达式b=k×u+d中,得到线性关系方程组,对线性关系方程组进行联立求解,得到第一线性参数组。In the actual implementation process, S12 can be implemented in the following manner, for the information of each detection frame in the information of the detection frames of at least two targets, the position and size of the detection frame are input into the linear relationship expression b=k×u In +d, the linear relationship equations are obtained, and the linear relationship equations are solved simultaneously to obtain the first linear parameter group.
S12还可以按照如下方式实施,根据至少两个目标的检测框的信息中的每个检测框的信息,对线性关系表达式b=k×u+d进行线性拟合,得到第一线性参数组。S12 can also be implemented in the following manner, according to the information of each detection frame in the information of the detection frames of at least two targets, the linear relationship expression b=k×u+d is linearly fitted to obtain the first linear parameter group .
其中,b为检测框在相机所拍摄的图像(在S12中,该图像为第一图像)中的尺寸,u为 检测框在相机所拍摄的图像(在S12中,该图像为第一图像)中的位置,k为直线斜率,d为直线截距。第一线性参数组中可以包括参数k的值和参数d的值;k和d可以统称为线性参数。Wherein, b is the size of the detection frame in the image taken by the camera (in S12, the image is the first image), and u is the image of the detection frame in the camera (in S12, the image is the first image) The position in , k is the slope of the line, and d is the intercept of the line. The first linear parameter group may include a value of parameter k and a value of parameter d; k and d may be collectively referred to as linear parameters.
一例中,u是在以图像中心为图像坐标系的坐标原点的情况下确定的。In one example, u is determined with the center of the image as the coordinate origin of the image coordinate system.
其中,检测框在第一图像中的尺寸和在第一图像中的位置符合线性关系是通过如下方式确定的:Wherein, the size of the detection frame in the first image conforms to a linear relationship with the position in the first image and is determined as follows:
获取初始关系表达式,其中,初始关系表达式表征目标对应的检测框在相机所拍摄图像中的位置、尺寸和相机参数以及目标在世界坐标系中的位置、目标的实际尺寸之间的关联关系。当世界坐标系的xy轴与目标所在平面重叠(例如目标为行人时,世界坐标系与行人所在路面重叠),可获取如下初始表达式:Obtain the initial relationship expression, where the initial relationship expression represents the position, size and camera parameters of the detection frame corresponding to the target in the image captured by the camera, the position of the target in the world coordinate system, and the relationship between the actual size of the target . When the xy axis of the world coordinate system overlaps with the plane where the target is located (for example, when the target is a pedestrian, the world coordinate system overlaps with the road surface where the pedestrian is located), the following initial expression can be obtained:
Figure PCTCN2022088601-appb-000001
Figure PCTCN2022088601-appb-000001
c为目标的实际尺寸,f为相机的焦距,α为相机在前述定义的世界坐标系中的俯仰角,h为相机架设高度,b为目标对应的检测框在相机所拍摄的图像中的尺寸,u为目标对应的检测框在相机所拍摄图像中的位置。c is the actual size of the target, f is the focal length of the camera, α is the pitch angle of the camera in the world coordinate system defined above, h is the height of the camera, and b is the size of the detection frame corresponding to the target in the image captured by the camera , u is the position of the detection frame corresponding to the target in the image captured by the camera.
一例中,u是在以图像中心为图像坐标系的坐标原点的情况下确定的。In one example, u is determined with the center of the image as the coordinate origin of the image coordinate system.
值得一提的是,相机标定在于确定相机参数的值,相机参数包括:相机的焦距f,相机的俯仰角α,相机的架设高度h。It is worth mentioning that the camera calibration is to determine the value of the camera parameters, the camera parameters include: the focal length f of the camera, the pitch angle α of the camera, and the erection height h of the camera.
以图像尺寸为1080P为为例,u的取值范围为[-540,540],在该范围内b和u的关系可以从上述初始关系表达式近似为线性关系,且用于表征线性参数的线性参数组k和d和相机参数存在关联关系。Taking the image size of 1080P as an example, the value range of u is [-540,540]. Within this range, the relationship between b and u can be approximated as a linear relationship from the above initial relationship expression, and the linear parameter used to characterize the linear parameter Groups k and d are associated with camera parameters.
在获取到第一线性参数组之后,执行S13。After the first linear parameter set is acquired, S13 is executed.
S13:在预先确定的线性参数组和相机参数组的对应关系中存在该第一线性参数组时,从所述对应关系中,查找出与该第一线性参数组对应的第一相机参数组;其中,所述第一相机参数组包括:所述相机的架设高度、所述相机的俯仰角和所述相机的焦距。S13: When the first linear parameter set exists in the predetermined correspondence between the linear parameter set and the camera parameter set, find the first camera parameter set corresponding to the first linear parameter set from the correspondence; Wherein, the first camera parameter group includes: the mounting height of the camera, the pitch angle of the camera, and the focal length of the camera.
其中,对应关系中的各个线性参数组均包括:参数k的值和参数d的值,各个线性参数组不同;对应关系中的各个相机参数组均包括:参数f的值,参数α的值和参数h的值,各个相机参数组不同。Wherein, each linear parameter group in the corresponding relationship includes: the value of the parameter k and the value of the parameter d, and each linear parameter group is different; each camera parameter group in the corresponding relationship includes: the value of the parameter f, the value of the parameter α and The value of parameter h is different for each camera parameter group.
在实际实施过程中,S13可以按照如下方式实施,将第一线性参数组中的参数k的值与对应关系中的参数k的各个值进行比较,以及将第一线性参数组中的参数d的值与对应关系中的参数d的各个值进行比较,以确定对应关系的线性参数组中,是否存在参数k的值与第一线性参数组中的k的值相同,且参数d的值与第一线性参数组中的d的值相同的第一线性参数组,在确定对应关系中存在第一线性参数组时,从对应关系中,查找出与第一线性参数组对应的第一相机参数组。In the actual implementation process, S13 can be implemented as follows, the value of the parameter k in the first linear parameter group is compared with each value of the parameter k in the corresponding relationship, and the value of the parameter d in the first linear parameter group Values are compared with each value of the parameter d in the corresponding relationship to determine whether the value of the parameter k is the same as the value of k in the first linear parameter group in the linear parameter group of the corresponding relationship, and the value of the parameter d is the same as that of the first linear parameter group A first linear parameter group with the same value of d in a linear parameter group, when it is determined that there is a first linear parameter group in the corresponding relationship, find the first camera parameter group corresponding to the first linear parameter group from the corresponding relationship .
S14:根据所述第一相机参数组确定目标相机参数组。S14: Determine a target camera parameter set according to the first camera parameter set.
在实际实施过程中,S14可以按照如下方式实施,直接将第一相机参数组确定为目标相机参数组。In an actual implementation process, S14 may be implemented in the following manner, directly determining the first camera parameter set as the target camera parameter set.
目标相机参数组即为拍摄了第一图像的相机所对应的相机参数组。The target camera parameter set is the camera parameter set corresponding to the camera that captured the first image.
根据本申请实施例,由于发现了检测框在相机拍摄的图像中的尺寸和的位置符合线性关系,能够根据相机拍摄的图像中至少两个目标的检测框的尺寸和位置,确定出表征检测框在相机拍摄的图像中的位置和尺寸之间的线性关系的第一线性参数组,继而从预先确定的线性参数组和相机参数组的对应关系中,快速地查找出与该第一线性参数组对应的相机参数组,并根据查找出的相机参数组确定代表相机参数的目标相机参数组,整个过程无需放置标定物,也无需控制相机运动,仅依靠相机拍摄的图像本身就能完成相机标定,大大提高了相机标定的效率和准确性。According to the embodiment of the present application, since it is found that the size and position of the detection frame in the image captured by the camera conforms to a linear relationship, the representative detection frame can be determined according to the size and position of the detection frames of at least two targets in the image captured by the camera The first linear parameter set of the linear relationship between the position and size in the image captured by the camera, and then quickly find out the first linear parameter set from the corresponding relationship between the predetermined linear parameter set and the camera parameter set The corresponding camera parameter group, and determine the target camera parameter group representing the camera parameters according to the searched camera parameter group. The whole process does not need to place a calibration object, nor does it need to control the camera movement. The camera calibration can be completed only by the image taken by the camera itself. The efficiency and accuracy of camera calibration are greatly improved.
作为一种实施方式,为获得预先确定的线性参数组和相机参数组的对应关系,所述方法还可以包括步骤A1-A4。As an implementation manner, in order to obtain a predetermined correspondence between a linear parameter set and a camera parameter set, the method may further include steps A1-A4.
A1:获取多个不同的相机参数组;所述多个不同的相机参数组中的任意两个相机参数组所对应的参数的种类相同。A1: multiple different camera parameter sets are acquired; the types of parameters corresponding to any two camera parameter sets in the multiple different camera parameter sets are the same.
其中,多个不同的相机参数组中的每个相机参数组中均包括:相机的焦距f的值,相机的俯仰角α的值和相机的架设高度h的值,且每个相机参数组中的焦距f,相机的俯仰角α,及相机的架设高度h三者中至少一者与其他相机参数组中的对应参数的值不同。Wherein, each camera parameter group in a plurality of different camera parameter groups includes: the value of the focal length f of the camera, the value of the pitch angle α of the camera and the value of the erection height h of the camera, and in each camera parameter group At least one of the focal length f of the camera, the pitch angle α of the camera, and the erection height h of the camera is different from the value of the corresponding parameter in other camera parameter groups.
作为一种实施方式,A1可以包括:基于目标采样间隔,对各个相机参数在取值范围内进行离散取值,得到所述多个不同的相机参数组。As an implementation manner, A1 may include: based on the target sampling interval, performing discrete values for each camera parameter within a value range to obtain the plurality of different camera parameter groups.
其中,目标采样间隔和各个相机参数所对应的取值范围根据实际需求设定,在此不做限制,在各个相机参数的取值范围一定时,采样间隔越小,对各个相机参数在对应的取值 范围内进行离散取值后,得到的相机参数组的数量越多。Among them, the target sampling interval and the value range corresponding to each camera parameter are set according to actual needs, and there is no limitation here. When the value range of each camera parameter is constant, the smaller the sampling interval is, the corresponding After the value is discretely selected within the value range, the number of camera parameter groups obtained is larger.
作为另一种实施方式,A1可以按照如下方式实施,直接从第三方获取多个不同的相机参数组,或者获取预先存储的多个不同的相机参数组。As another implementation manner, A1 may be implemented in the following manner, directly acquiring multiple different camera parameter sets from a third party, or acquiring multiple different camera parameter sets stored in advance.
在得到多个不同的相机参数组之后,执行步骤A2。After obtaining multiple different camera parameter sets, step A2 is performed.
A2:针对每个相机参数组,利用该相机参数组、至少两个虚拟目标的尺寸和位置信息,生成检测框仿真图;其中,所述检测框仿真图中包括:所述至少两个虚拟目标的检测框。A2: For each camera parameter group, use the camera parameter group, the size and position information of at least two virtual targets to generate a detection frame simulation diagram; wherein, the detection frame simulation diagram includes: the at least two virtual targets detection frame.
作为一种实施方式,A2可以包括步骤A21-A23。As an implementation manner, A2 may include steps A21-A23.
A21:根据与所述虚拟目标同类型的真实目标的尺寸分布,生成所述至少两个虚拟目标的尺寸。A21: Generate the sizes of the at least two virtual objects according to the size distribution of real objects of the same type as the virtual objects.
虚拟目标的尺寸可以为虚拟目标在世界坐标系下的尺寸。The size of the virtual target may be the size of the virtual target in the world coordinate system.
在实际实施过程中,A21可以按照如下方式实施,获取与虚拟目标同类型的多个真实目标的尺寸分布,根据尺寸分布中的最小尺寸和最大尺寸,对最小尺寸和最大尺寸所构成的取值范围进行随机采样,得到至少两个虚拟目标的尺寸。In the actual implementation process, A21 can be implemented in the following manner, obtain the size distribution of multiple real targets of the same type as the virtual target, and take the values of the minimum size and maximum size according to the minimum size and maximum size in the size distribution The range is randomly sampled to obtain the dimensions of at least two virtual objects.
作为一种实施方式,A21可以按照如下方式实施,获取与虚拟目标同类型的多个真实目标的尺寸,从多个真实目标的尺寸中,随机地选取至少两个真实目标的尺寸,并将选取出的至少两个真实目标的尺寸作为至少两个虚拟目标的尺寸。As an implementation, A21 can be implemented in the following manner: obtain the sizes of multiple real targets of the same type as the virtual target, randomly select the sizes of at least two real targets from the multiple real targets, and select The sizes of the at least two real targets are taken as the sizes of the at least two virtual targets.
作为另一种实施方式,A21可以按照如下方式实施,获取与虚拟目标同类型的多个真实目标的尺寸,根据多个真实目标的尺寸,确定出多个真实目标的平均尺寸,生成至少两个虚拟目标的尺寸,其中,各个虚拟目标的尺寸服从均值为平均尺寸的正态分布。As another implementation, A21 can be implemented in the following manner: obtain the sizes of multiple real targets of the same type as the virtual target, determine the average size of multiple real targets according to the sizes of the multiple real targets, and generate at least two The size of the virtual target, wherein the size of each virtual target obeys a normal distribution whose mean is an average size.
其中,多个真实目标的数量可以为100个,1000个,2000个等,对此不做限制。Wherein, the number of multiple real targets may be 100, 1000, 2000, etc., which is not limited.
A22:生成所述至少两个虚拟目标的位置信息。A22: Generate location information of the at least two virtual objects.
在实际实施过程中,A22可以按照如下方式,随机地生成至少两个虚拟目标的位置信息。During actual implementation, A22 may randomly generate position information of at least two virtual targets in the following manner.
作为一种实施方式,A22可以按照如下方式实施,根据预先确定的至少两个位置信息,生成至少两个虚拟目标的位置信息。As an implementation manner, A22 may be implemented in the following manner, generating position information of at least two virtual objects according to at least two pieces of predetermined position information.
位置信息可以为虚拟目标在世界坐标系中的位置,也可以为虚拟目标在图像坐标系中的位置。The position information may be the position of the virtual target in the world coordinate system, or the position of the virtual target in the image coordinate system.
其中,A21和A22的执行顺序不做限制。Wherein, the execution order of A21 and A22 is not limited.
A23:针对每个相机参数组,根据该相机参数组、所述至少两个虚拟目标的尺寸和位置信息,生成所述检测框仿真图。A23: For each camera parameter set, generate the detection frame simulation diagram according to the camera parameter set, the size and position information of the at least two virtual objects.
在实际实施过程中,当虚拟目标的位置信息为虚拟目标在世界坐标系中的位置时,A23 可以按照如下方式实施,针对每个虚拟目标的尺寸和位置信息,在相应的位置生成该虚拟目标的三维模型,继而根据该虚拟目标的三维模型和该相机参数组,确定出该虚拟的目标的三维模型在该相机参数组对应的相机的图像坐标系下的投影(确定了投影,也就确定了虚拟目标在图像坐标系中的尺寸和位置),继而根据至少两个虚拟目标的三维模型的投影,生成检测框仿真图;其中,检测框仿真图中包括至少两个虚拟目标所对应的检测框,如图2所示。In the actual implementation process, when the position information of the virtual target is the position of the virtual target in the world coordinate system, A23 can be implemented in the following manner, for the size and position information of each virtual target, the virtual target is generated at the corresponding position 3D model, and then according to the 3D model of the virtual target and the camera parameter set, determine the projection of the 3D model of the virtual target in the image coordinate system of the camera corresponding to the camera parameter set (if the projection is determined, it is determined The size and position of the virtual target in the image coordinate system), and then according to the projection of the three-dimensional models of at least two virtual targets, a detection frame simulation diagram is generated; wherein, the detection frame simulation diagram includes at least two detection frames corresponding to the virtual targets box, as shown in Figure 2.
作为一种实施方式,当虚拟目标的位置信息为虚拟目标在相机参数组所对应相机的图像坐标系中的位置时,A23可以按照如下方式实施,针对每个虚拟目标的尺寸和位置信息,利用该相机参数组和该虚拟目标的尺寸和位置信息,根据前述初始关系表达式确定出该虚拟目标所对应的检测框在该相机参数组对应的相机的图像坐标系中的尺寸,继而根据至少两个虚拟目标所对应的检测框的在图像坐标系中的位置和在图像坐标系中的尺寸,生成检测框仿真图。As an implementation, when the position information of the virtual target is the position of the virtual target in the image coordinate system of the camera corresponding to the camera parameter group, A23 can be implemented in the following manner. For the size and position information of each virtual target, use The size and position information of the camera parameter group and the virtual target, determine the size of the detection frame corresponding to the virtual target in the image coordinate system of the camera corresponding to the camera parameter group according to the aforementioned initial relational expression, and then according to at least two The position in the image coordinate system and the size in the image coordinate system of the detection frame corresponding to each virtual target are generated to generate a simulation diagram of the detection frame.
可以理解的是,生成检测框仿真图,并不意味着一定要生成一幅图像,只要确定了虚拟目标在图像坐标系中所在区域对应检测框的尺寸和位置信息,即认为生成了检测框仿真图。当然,也可以将表征检测框的像素区别于背景的像素值展示出来、以生成图像,以便用户检查虚拟目标的尺寸和位置是否合理。It can be understood that generating a detection frame simulation diagram does not mean that an image must be generated, as long as the size and position information of the detection frame corresponding to the area where the virtual target is located in the image coordinate system is determined, it is considered that the detection frame simulation has been generated picture. Of course, it is also possible to display the pixel values representing the detection frame different from the pixel values of the background to generate an image, so that the user can check whether the size and position of the virtual target are reasonable.
在生成检测框仿真图之后,执行步A3。After the detection frame simulation diagram is generated, step A3 is executed.
A3:根据所述检测框仿真图中的至少两个检测框在所述检测框仿真图中的位置和尺寸,确定出线性参数组。A3: Determine a linear parameter set according to the positions and sizes of at least two detection frames in the detection frame simulation graph in the detection frame simulation graph.
可以理解的是,检测框仿真图所在坐标系为其所对应的相机参数组对应相机的图像坐标系。It can be understood that the coordinate system of the detection frame simulation graph is the image coordinate system of the camera corresponding to the corresponding camera parameter group.
其中,A3的具体实施方式可以参照步骤S12,因此,在此不再赘述。Wherein, for the specific implementation manner of A3, reference may be made to step S12, so details are not repeated here.
在确定出该线性参数组之后,执行步骤A4。After the linear parameter set is determined, step A4 is performed.
A4:建立该线性参数组与该相机参数组的对应关系。A4: Establish the corresponding relationship between the linear parameter set and the camera parameter set.
本申请实施例通过检测仿真图预先建立线性参数组与相机参数组的对应关系,在需要确定相机参数组时可直接通过线性参数组查表确定,大大提高了相机参数估计效率。In the embodiment of the present application, the corresponding relationship between the linear parameter group and the camera parameter group is pre-established by detecting the simulation graph, and the camera parameter group can be determined directly by looking up the linear parameter group table when it is necessary to determine the camera parameter group, which greatly improves the camera parameter estimation efficiency.
作为一种实施方式,所述方法还可以包括步骤B1-B3。As an implementation manner, the method may further include steps B1-B3.
B1:在所述对应关系中不存在该第一线性参数组时,针对所述对应关系中的每个线性参数组,在该线性参数组与该第一线性参数组中的对应参数的值之间的差值均小于目标阈值时,确定该线性参数组为第二线性参数组。B1: When the first linear parameter group does not exist in the corresponding relationship, for each linear parameter group in the corresponding relationship, between the value of the corresponding parameter in the linear parameter group and the first linear parameter group When the differences between are smaller than the target threshold, the linear parameter set is determined to be the second linear parameter set.
在实际实施过程中,B1可以按照如下方式实施,在所述对应关系中不存在该第一线性 参数组时,针对所述对应关系中的每个线性参数组,将该线性参数组中的参数k的值与第一线性参数组中的参数k的值作差,得到第一差值;以及将该线性参数组中的参数d的值与第一线性参数组中的参数d的值作差,得到第二差值,在确定第一差值和第二差值均小于目标阈值时,才确定该线性参数组为第二线性参数组;反之,确定该线性参数组不为第二线性组。In the actual implementation process, B1 can be implemented in the following manner. When the first linear parameter group does not exist in the corresponding relationship, for each linear parameter group in the corresponding relationship, the parameters in the linear parameter group The value of k is made difference with the value of the parameter k in the first linear parameter group, obtains the first difference; And the value of the parameter d in this linear parameter group is made difference with the value of the parameter d in the first linear parameter group , to obtain the second difference, when it is determined that both the first difference and the second difference are smaller than the target threshold, the linear parameter group is determined to be the second linear parameter group; otherwise, it is determined that the linear parameter group is not the second linear group .
B2:从所述对应关系中,查找出与所述第二线性参数组对应的第二相机参数组。B2: From the corresponding relationship, find out a second camera parameter set corresponding to the second linear parameter set.
在第二线性参数组的数量为一个时,B2可以按照如下方式实施,针对第二线性参数组,根据所述第二线性参数组在对应关系中的位置,从对应关系中,查找出与第二线性参数组对应的第二相机参数组。When the number of the second linear parameter group is one, B2 can be implemented as follows, for the second linear parameter group, according to the position of the second linear parameter group in the corresponding relationship, from the corresponding relationship, find out the The second camera parameter group corresponding to the second linear parameter group.
作为一种实施方式,在所述第二线性参数组的数量为至少两个时,B2可以按照如下方式实施,针对每个第二线性参数组,从所述对应关系中,查找出与该第二线性参数组对应的第二相机参数组。As an implementation manner, when the number of the second linear parameter groups is at least two, B2 can be implemented in the following manner, for each second linear parameter group, from the corresponding relationship, find out the The second camera parameter group corresponding to the second linear parameter group.
B3:根据所述第二相机参数组,确定所述目标相机参数组。B3: Determine the target camera parameter set according to the second camera parameter set.
在第二相机参数组为一个时,B3可以按照如下方式实施,直接将该第二相机参数组确定为目标相机参数组。When there is one second camera parameter set, B3 may be implemented in the following manner, directly determining the second camera parameter set as the target camera parameter set.
作为一种实施方式,在所述第二线性参数组的数量为至少两个时,B3可以包括步骤B31-B34。As an implementation manner, when the number of the second linear parameter sets is at least two, B3 may include steps B31-B34.
B31:获取第二图像中目标所在区域的检测框的信息;所述第二图像为所述相机在第二时刻拍摄到的图像;所述第一时刻和所述第二时刻之间的差值小于目标时间差。B31: Obtain the detection frame information of the area where the target is located in the second image; the second image is the image captured by the camera at the second moment; the difference between the first moment and the second moment less than the target time difference.
其中,第一时刻可以位于第二时刻之前,也可以位于第二时刻之后。Wherein, the first moment may be located before the second moment, or may be located after the second moment.
其中,所述目标时间差的取值范围可以为0.3秒-2秒,所述目标时间差根据目标的平均正常移动速度和所述相机所能覆盖的拍摄范围决定。Wherein, the value range of the target time difference may be 0.3 seconds-2 seconds, and the target time difference is determined according to the average normal moving speed of the target and the shooting range that the camera can cover.
值得一提的是,第一图像和第二图像中包括相同的目标。It is worth mentioning that the same target is included in the first image and the second image.
其中,B31的具体实施方式与S11相同,具体不再赘述,可以理解的是,第二图像与第一图像的拍摄相机、拍摄角度、尺寸相同。Wherein, the specific implementation manner of B31 is the same as that of S11, and details will not be repeated here. It can be understood that the camera, shooting angle, and size of the second image are the same as those of the first image.
在获取到第二图像中目标所在区域的检测框的信息之后,执行步骤B32。After the information of the detection frame of the area where the target is located in the second image is acquired, step B32 is executed.
B32:针对每个第二相机参数组,基于该第二相机参数组、所述第一图像中目标的检测框的信息,以及所述第二图像中目标的检测框的信息,确定出所述相机在所述第一时刻至所述第二时刻拍摄到的目标的最终移动速度。B32: For each second camera parameter group, based on the second camera parameter group, the information of the detection frame of the target in the first image, and the information of the detection frame of the target in the second image, determine the The final moving speed of the target captured by the camera from the first moment to the second moment.
作为一种实施方式,B32可以包括步骤B321-B324。As an implementation manner, B32 may include steps B321-B324.
B321:从所述第一图像中目标的检测框的信息,以及所述第二图像中目标的检测框的信息中,确定出至少一个目标的检测框信息组;每个检测框信息组包括:对应目标的两个检测框的信息。B321: From the information of the detection frame of the target in the first image and the information of the detection frame of the target in the second image, determine at least one detection frame information group of the target; each detection frame information group includes: The information of the two detection boxes corresponding to the target.
在实际实施过程中,B321可以按照如下方式实施,针对第一图像中目标的检测框的信息,根据该目标的检测框在第一图像中的位置,从第一图像中确定出与该目标的图像,然后根据该目标的图像和/或该目标的检测框在第一图像中的位置,利用目标跟踪技术确定第二图像中是否存在该目标的图像,在为是时,才将第一图像中该目标的检测框信息,以及第二图像中该目标的检测框信息,划分为该目标的检测框信息组,直到确定出至少一个目标的检测框信息组。In the actual implementation process, B321 can be implemented in the following manner. Regarding the information of the detection frame of the target in the first image, according to the position of the detection frame of the target in the first image, determine the distance between the target and the target from the first image. image, and then according to the image of the target and/or the position of the detection frame of the target in the first image, use target tracking technology to determine whether there is an image of the target in the second image, and if yes, the first image will be The detection frame information of the target in the second image and the detection frame information of the target in the second image are divided into detection frame information groups of the target until at least one detection frame information group of the target is determined.
B322:针对每个检测框信息组中的每个检测框的信息,基于该第二相机参数组和该检测框的信息,确定出该检测框所对应的目标在所述世界坐标系中的位置信息。B322: For the information of each detection frame in each detection frame information group, based on the second camera parameter group and the information of the detection frame, determine the position of the target corresponding to the detection frame in the world coordinate system information.
可以理解的是,相机参数确定的情况下,根据检测框在图像坐标系中的位置和尺寸,即可唯一确定检测框对应的目标在世界坐标系下的位置信息。It can be understood that when the camera parameters are determined, the position information of the target corresponding to the detection frame in the world coordinate system can be uniquely determined according to the position and size of the detection frame in the image coordinate system.
在实际实施过程中,B322可以按照如下方式实施,针对每个检测框信息组中的每个检测框(每个检测框信息组中包括两个检测框的信息,两个检测框分别对应于第一时刻和第二时刻拍摄的第一图像和第二图像),基于该第二相机参数组和该检测框在其对应的图像中的位置和尺寸,确定出该检测框所对应的目标在世界坐标系中的位置信息。In the actual implementation process, B322 can be implemented in the following manner, for each detection frame in each detection frame information group (each detection frame information group includes the information of two detection frames, and the two detection frames correspond to the first The first image and the second image taken at the first moment and the second moment), based on the second camera parameter set and the position and size of the detection frame in its corresponding image, it is determined that the target corresponding to the detection frame is in the world Position information in a coordinate system.
在确定出该检测框信息组所对应的目标在第一时刻和第二时刻在世界坐标系中的位置信息之后,执行步骤B323。After determining the position information of the target corresponding to the detection frame information group in the world coordinate system at the first moment and the second moment, step B323 is executed.
B323:根据该检测框信息组所对应的每个检测框所对应的目标在所述世界坐标系中的位置信息,确定出所述对应的目标在所述第一时刻至所述第二时刻之间的移动速度。B323: According to the position information of the target corresponding to each detection frame corresponding to the detection frame information group in the world coordinate system, determine that the corresponding target is between the first moment and the second moment movement speed between.
在实际实施过程中,B323可以按照如下方式实施,根据对应的目标所对应的两个检测框所对应的目标在世界坐标系中的位置信息,确定出对应的目标的移动距离;根据第一时刻和第二时刻,确定出第一时刻与第二时刻之间的时间差;继而通过对移动距离和时间差作商,得到对应的目标在第一时刻至第二时刻之间的移动速度。In the actual implementation process, B323 can be implemented in the following manner. According to the position information of the target in the world coordinate system corresponding to the two detection frames corresponding to the corresponding target, the moving distance of the corresponding target is determined; according to the first moment and the second moment, the time difference between the first moment and the second moment is determined; then, the moving speed of the corresponding target between the first moment and the second moment is obtained by quotienting the moving distance and the time difference.
在确定出至少一个目标在第一时刻至第二时刻之间的移动速度之后,执行步骤B324。After determining the moving speed of at least one target between the first moment and the second moment, step B324 is executed.
B324:根据所述至少一个目标的移动速度,得到所述最终移动速度。B324: Obtain the final moving speed according to the moving speed of the at least one target.
在至少一个目标只包括一个目标时,B324可以按照如下方式,直接将该目标的移动速度确定为最终移动速度。When at least one target includes only one target, B324 may directly determine the moving speed of the target as the final moving speed in the following manner.
在至少一个目标的数量为至少两个时,B324可以按照如下方式,对确定出的至少两个目标在第一时刻至第二时刻之间的移动速度求平均,得到最终移动速度。When the number of at least one target is at least two, B324 may average the determined moving speeds of the at least two targets between the first moment and the second moment in the following manner to obtain the final moving speed.
在确定出最终移动速度之后,执行步骤B33。After the final moving speed is determined, step B33 is executed.
B33:在确定所述最终移动速度处于正常移动速度范围内时,确定该第二相机参数组合格。B33: When it is determined that the final moving speed is within the normal moving speed range, determine that the second camera parameter set is qualified.
其中,正常移动速度范围根据目标类型确定。例如,车辆类型的目标的移动速度为20km/h-120km/h。Wherein, the normal movement speed range is determined according to the target type. For example, the moving speed of a vehicle type object is 20km/h-120km/h.
在绝大多数情况下,目标的移动速度位于正常移动速度范围内,如果计算出的目标移动速度不在正常移动速度范围内,大概率是因为相机参数不合理。因此,在实际实施过程中,B33可以按照如下方式实施,确定最终移动速度是否处于正常移动速度范围内,若确定最终移动速度处于正常移动速度范围内,则确定该第二相机参数组合格;反之,确定该第二相机参数组不合格。In most cases, the moving speed of the target is within the normal moving speed range. If the calculated moving speed of the target is not within the normal moving speed range, there is a high probability that the camera parameters are unreasonable. Therefore, in the actual implementation process, B33 can be implemented in the following manner, determine whether the final moving speed is within the normal moving speed range, if it is determined that the final moving speed is within the normal moving speed range, then determine that the second camera parameter set is qualified; otherwise , it is determined that the second camera parameter set is unqualified.
在确定出合格的第二相机参数组之后,执行步骤B34。After the qualified second camera parameter set is determined, step B34 is executed.
B34:根据合格的第二相机参数组,确定所述目标相机参数组。B34: Determine the target camera parameter set according to the qualified second camera parameter set.
在确定为合格的第二相机参数组的数量为一个时,B34可以按照如下方式实施,直接将该合格的第二相机参数组确定为该相机的最终相机参数组。When the number of qualified second camera parameter sets is one, B34 may be implemented in the following manner, directly determining the qualified second camera parameter set as the final camera parameter set of the camera.
作为一种实施方式,在确定为合格的第二相机参数组的数量为至少两个时,B34可以按照如下方式实施,分别将至少两个合格的第二相机参数组中的对应参数的值求平均,得到目标相机参数组。As an implementation manner, when the number of qualified second camera parameter groups is at least two, B34 may be implemented in the following manner, respectively calculating the values of corresponding parameters in at least two qualified second camera parameter groups Averaged to get the target camera parameter set.
具体地,在确定为合格的第二相机参数组的数量为至少两个时,将至少两个合格的第二相机参数组中的参数f的值求平均,得到目标相机参数组中的参数f的值,将至少两个合格的第二相机参数组中的参数α的值求平均,得到目标相机参数组中的参数α的值,以及将至少两个合格的第二相机参数组中的参数h的值求平均,得到目标相机参数组中的参数h的值。Specifically, when the number of qualified second camera parameter groups is at least two, average the values of the parameter f in the at least two qualified second camera parameter groups to obtain the parameter f in the target camera parameter group The value of parameter α in at least two qualified second camera parameter groups is averaged to obtain the value of parameter α in the target camera parameter group, and the parameters in at least two qualified second camera parameter groups The value of h is averaged to obtain the value of parameter h in the target camera parameter group.
如此,能够在根据对应关系确定出的相机参数组为多个时,通过目标速度这一指标过滤不合理的相机参数组,用合理的相机参数组确定最终的相机参数组,大大提高了相机参数估计的准确性。In this way, when there are multiple camera parameter sets determined according to the corresponding relationship, the unreasonable camera parameter set can be filtered through the index of target speed, and the final camera parameter set can be determined with a reasonable camera parameter set, which greatly improves the camera parameter set. Estimated accuracy.
请参照图3,图3是本申请实施例提供的一种相机标定装置300的结构框图。下面将对图3所示的结构框图进行阐述,所示装置可以包括:Please refer to FIG. 3 . FIG. 3 is a structural block diagram of a camera calibration device 300 provided in an embodiment of the present application. The structural block diagram shown in Figure 3 will be described below, and the shown devices may include:
第一获取单元310,可以配置成用于获取第一图像中至少两个目标所在区域的检测框的信息;其中,所述第一图像为相机在第一时刻拍摄到的图像;每个检测框的信息包括:对应的检测框在所述第一图像中的位置和尺寸。The first acquiring unit 310 may be configured to acquire information of detection frames of at least two target areas in the first image; wherein, the first image is an image captured by the camera at the first moment; each detection frame The information includes: the position and size of the corresponding detection frame in the first image.
第一确定单元320,可以配置成用于根据所述至少两个目标的检测框的信息,确定出第一线性参数组;其中,该第一线性参数组用于表征检测框在所述第一图像中的位置和尺寸之间的线性关系。The first determining unit 320 may be configured to determine a first linear parameter group according to the information of the detection frames of the at least two targets; wherein, the first linear parameter group is used to characterize the detection frames in the first A linear relationship between position and size in the image.
第一查找单元330,可以配置成用于在预先确定的线性参数组和相机参数组的对应关系中存在该第一线性参数组时,从所述对应关系中,查找出与该第一线性参数组对应的第一相机参数组;其中,所述第一相机参数组包括:所述相机的架设尺寸、所述相机的俯仰角和所述相机的焦距。The first searching unit 330 may be configured to, when the first linear parameter group exists in the predetermined correspondence between the linear parameter group and the camera parameter group, find out the first linear parameter from the corresponding relationship. The first camera parameter group corresponding to the group; wherein, the first camera parameter group includes: the mounting size of the camera, the pitch angle of the camera, and the focal length of the camera.
第一目标确定单元340,可以配置成用于根据所述第一相机参数组确定目标相机参数组。The first target determining unit 340 may be configured to determine a target camera parameter set according to the first camera parameter set.
作为一种实施方式,所述装置还可以包括:相机参数获取单元,配置成用于获取多个不同的相机参数组;所述多个不同的相机参数组中的任意两个相机参数组所对应的参数的种类相同;仿真图生成单元,配置成用于针对每个相机参数组,利用该相机参数组、至少两个虚拟目标的尺寸和位置信息,生成检测框仿真图;其中,所述检测框仿真图中包括:所述至少两个虚拟目标的检测框;线性参数组确定单元,配置成用于根据所述检测框仿真图中的至少两个检测框在所述检测框仿真图中的位置和尺寸,确定出线性参数组;对应关系建立单元,配置成用于建立该线性参数组与该相机参数组的对应关系。As an implementation manner, the device may further include: a camera parameter acquisition unit configured to acquire multiple different camera parameter sets; any two camera parameter sets in the multiple different camera parameter sets correspond to The types of parameters are the same; the simulation diagram generating unit is configured to use the camera parameter group, the size and position information of at least two virtual targets to generate a detection frame simulation diagram for each camera parameter group; wherein, the detection The frame simulation diagram includes: the detection frames of the at least two virtual targets; a linear parameter group determination unit configured to be used in the detection frame simulation graph according to the at least two detection frames in the detection frame simulation graph The position and size determine the linear parameter set; the corresponding relationship establishing unit is configured to establish the corresponding relationship between the linear parameter set and the camera parameter set.
作为一种实施方式,所述仿真图生成单元可以包括:尺寸生成单元,配置成用于根据与所述虚拟目标同类型的真实目标的尺寸分布,生成所述至少两个虚拟目标的尺寸;位置信息生成单元,配置成用于生成所述至少两个虚拟目标的位置信息;仿真图生成子单元,配置成用于针对每个相机参数组,根据所述至少两个虚拟目标的尺寸和位置信息,生成所述检测框仿真图。As an implementation manner, the simulation diagram generating unit may include: a size generating unit configured to generate the sizes of the at least two virtual objects according to the size distribution of real objects of the same type as the virtual objects; The information generation unit is configured to generate the position information of the at least two virtual targets; the simulation map generation subunit is configured to use for each camera parameter group, according to the size and position information of the at least two virtual targets , to generate the simulation diagram of the detection frame.
作为一种实施方式,所述相机参数获取单元可以配置成具体用于基于目标采样间隔,对各个相机参数在取值范围内进行离散取值,得到所述多个不同的相机参数组。As an implementation manner, the camera parameter acquisition unit may be configured to perform discrete values of each camera parameter within a value range based on a target sampling interval to obtain the plurality of different camera parameter groups.
作为一种实施方式,所述装置还可以包括:第二确定单元,配置成用于在所述对应关系中不存在该第一线性参数组时,针对所述对应关系中的每个线性参数组,在该线性参数组与该第一线性参数组中的对应参数的值之间的差值均小于目标阈值时,确定该线性参数组为第二线性参数组;第二查找单元,配置成用于从所述对应关系中,查找出与所述第二线性参数组对应的第二相机参数组;第二目标确定单元,配置成用于根据所述第二相机参数组,确定所述目标相机参数组。As an implementation manner, the device may further include: a second determination unit configured to, when the first linear parameter group does not exist in the corresponding relationship, for each linear parameter group in the corresponding relationship , when the differences between the values of the corresponding parameters in the linear parameter group and the first linear parameter group are smaller than the target threshold, the linear parameter group is determined to be the second linear parameter group; the second search unit is configured to use From the corresponding relationship, find out the second camera parameter set corresponding to the second linear parameter set; the second target determination unit is configured to determine the target camera according to the second camera parameter set parameter group.
作为一种实施方式,在所述第二线性参数组的数量为至少两个时,所述第二查找单元可以配置成具体用于针对每个第二线性参数组,从所述对应关系中,查找出与该第二线性 参数组对应的第二相机参数组;As an implementation manner, when the number of the second linear parameter groups is at least two, the second search unit may be configured to specifically for each second linear parameter group, from the corresponding relationship, Find out the second camera parameter group corresponding to the second linear parameter group;
对应的,所述第二目标确定单元可以包括:Correspondingly, the second target determining unit may include:
第二获取单元,配置成用于获取第二图像中目标所在区域的检测框的信息;所述第二图像为所述相机在第二时刻拍摄到的图像;所述第一时刻和所述第二时刻之间的差值小于目标时间差;速度确定单元,配置成用于针对每个第二相机参数组,基于该第二相机参数组、所述第一图像中目标的检测框的信息,以及所述第二图像中目标的检测框的信息,确定出所述相机在所述第一时刻至所述第二时刻拍摄到的目标的最终移动速度;筛选单元,配置成用于在确定所述最终移动速度未处于正常移动速度范围内时,确定该第二相机参数组不合格;反之,确定该第二相机参数组合格;第二目标确定子单元,配置成用于根据合格的第二相机参数组,确定所述目标相机参数组。The second acquiring unit is configured to acquire the information of the detection frame of the area where the target is located in the second image; the second image is an image captured by the camera at a second moment; the first moment and the second The difference between the two moments is less than the target time difference; the speed determination unit is configured to, for each second camera parameter set, based on the second camera parameter set, the information of the detection frame of the target in the first image, and The information of the detection frame of the target in the second image determines the final moving speed of the target captured by the camera from the first moment to the second moment; the screening unit is configured to determine the When the final moving speed is not within the normal moving speed range, it is determined that the second camera parameter set is unqualified; otherwise, it is determined that the second camera parameter set is qualified; the second target determination subunit is configured to parameter group, to determine the target camera parameter group.
作为一种实施方式,所述速度确定单元可以包括:信息组确定单元,配置成用于从所述第一图像中目标的检测框的信息,以及所述第二图像中目标的检测框的信息中,确定出至少一个目标的检测框信息组;每个检测框信息组包括:对应目标的两个检测框的信息;位置确定单元,配置成用于针对每个检测框信息组中的每个检测框的信息,基于该第二相机参数组和该检测框的信息,确定出该检测框所对应的目标在所述世界坐标系中的位置信息;移动速度确定单元,配置成用于根据该检测框信息组所对应的每个检测框所对应的目标在所述世界坐标系中的位置信息,确定出所述对应的目标在所述第一时刻至所述第二时刻之间的移动速度;速度子单元,配置成用于根据所述至少一个目标的移动速度,得到所述最终移动速度。As an implementation manner, the speed determining unit may include: an information group determining unit configured to obtain the information of the detection frame of the target in the first image and the information of the detection frame of the target in the second image Among them, the detection frame information group of at least one target is determined; each detection frame information group includes: information of two detection frames corresponding to the target; the position determination unit is configured to be used for each detection frame information group The information of the detection frame, based on the second camera parameter group and the information of the detection frame, determines the position information of the target corresponding to the detection frame in the world coordinate system; the moving speed determination unit is configured to use the The position information of the target corresponding to each detection frame corresponding to the detection frame information group in the world coordinate system determines the moving speed of the corresponding target between the first moment and the second moment a speed subunit configured to obtain the final moving speed according to the moving speed of the at least one target.
作为一种实施方式,所述第二目标确定单元还可以配置成用于在合格的第二相机参数组的数量为至少两个时,分别将至少两个合格的第二相机参数组中的对应参数的值求平均,得到目标相机参数组。As an implementation manner, the second target determining unit may also be configured to, when the number of qualified second camera parameter groups is at least two, respectively set corresponding The values of the parameters are averaged to obtain the target camera parameter set.
本实施例对的各功能单元实现各自功能的过程,请参见上述图1-2所示实施例中表征的内容,此处不再赘述。For the process of realizing the respective functions by each functional unit in this embodiment, please refer to the content represented in the embodiment shown in the foregoing FIGS. 1-2 , which will not be repeated here.
请参照图4,图4为本申请实施例提供的一种电子设备400的结构示意图,电子设备400可以是个人电脑、平板电脑、智能手机、个人数字助理(personal digital assistant,PDA)等。Please refer to FIG. 4. FIG. 4 is a schematic structural diagram of an electronic device 400 provided by an embodiment of the present application. The electronic device 400 may be a personal computer, a tablet computer, a smart phone, a personal digital assistant (personal digital assistant, PDA) and the like.
电子设备400可以包括:存储器402、处理器401、通信接口403和通信总线,通信总线用于实现这些组件的连接通信。The electronic device 400 may include: a memory 402, a processor 401, a communication interface 403, and a communication bus, and the communication bus is used to implement connection and communication of these components.
所述存储器402可以用于存储本申请实施例提供的相机标定方法和装置对应的计算程序指令等各种数据,其中,存储器402可以是,但不限于,随机存取存储器,只读存储器 (Read Only Memory,ROM),可编程只读存储器(Programmable Read-Only Memory,PROM),可擦除只读存储器(Erasable Programmable Read-Only Memory,EPROM),电可擦除只读存储器(Electric Erasable Programmable Read-Only Memory,EEPROM)等。The memory 402 can be used to store various data such as the camera calibration method provided by the embodiment of the present application and the calculation program instructions corresponding to the device, wherein the memory 402 can be, but not limited to, a random access memory, a read-only memory (Read Only Memory, ROM), Programmable Read-Only Memory (Programmable Read-Only Memory, PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (Electric Erasable Programmable Read -Only Memory, EEPROM), etc.
处理器401可以用于读取并运行存储于存储器中的相机标定方法和装置对应的计算机程序指令,以获取第一图像中至少两个目标所在区域的检测框的信息;其中,所述第一图像为相机在第一时刻拍摄到的图像;每个检测框的信息包括:对应的检测框在所述第一图像中的位置和尺寸;根据所述至少两个目标的检测框的信息,确定出第一线性参数组;其中,该第一线性参数组用于表征检测框在所述第一图像中的位置和尺寸之间的线性关系;在预先确定的线性参数组和相机参数组的对应关系中存在该第一线性参数组时,从所述对应关系中,查找出与该第一线性参数组对应的第一相机参数组;其中,所述第一相机参数组包括:所述相机的架设高度、所述相机的俯仰角和所述相机的焦距;根据所述第一相机参数组确定目标相机参数组。The processor 401 can be used to read and execute the computer program instructions corresponding to the camera calibration method and device stored in the memory, so as to obtain the information of the detection frame of the area where at least two targets are located in the first image; wherein, the first The image is an image captured by the camera at the first moment; the information of each detection frame includes: the position and size of the corresponding detection frame in the first image; according to the information of the detection frames of the at least two targets, determine The first linear parameter group is obtained; wherein, the first linear parameter group is used to characterize the linear relationship between the position and size of the detection frame in the first image; the correspondence between the predetermined linear parameter group and the camera parameter group When the first linear parameter group exists in the relationship, the first camera parameter group corresponding to the first linear parameter group is found from the corresponding relationship; wherein, the first camera parameter group includes: The erection height, the pitch angle of the camera, and the focal length of the camera; determine a target camera parameter set according to the first camera parameter set.
其中,处理器401可能是一种集成电路芯片,具有信号的处理能力。上述的处理器401可以是通用处理器,包括CPU、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。Wherein, the processor 401 may be an integrated circuit chip, which has a signal processing capability. Above-mentioned processor 401 can be general purpose processor, comprises CPU, network processor (Network Processor, NP) etc.; Can also be digital signal processor (DSP), application specific integrated circuit (ASIC), field programmable gate array (FPGA) ) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps, and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
通信接口403可以用于接收或者发送数据。The communication interface 403 can be used to receive or send data.
此外,本申请实施例还提供了一种计算机可读的存储介质,在该存储介质中存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行本申请任一项实施方式所提供的方法。In addition, the embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is run on the computer, the computer is made to execute any one of the implementations of the present application. method provided by the method.
本申请的又一些实施例提供一种计算机程序,所述计算机程序包括计算机可读代码,所述计算机可读代码被处理器执行时实现本申请的一些实施提供的所述方法。Still other embodiments of the present application provide a computer program, where the computer program includes computer readable code, and when the computer readable code is executed by a processor, implements the method provided by some implementations of the present application.
本申请的又一些实施例提供一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序被处理器执行时实现本申请的一些实施提供的所述的方法。Still other embodiments of the present application provide a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, the method provided by some implementations of the present application is implemented.
综上所述,本申请各实施例提出的相机标定方法、装置、电子设备及存储介质,以获取相机拍摄到的第一图像中至少两个目标所在区域的检测框的信息,每个检测框的信息包括:对应的检测框在所述第一图像中的位置和尺寸;根据至少两个目标的检测框的信息,确定出表征检测框在第一图像中的位置和尺寸之间的线性关系的第一线性参数组,继而从预先确定的线性参数组和相机参数组的对应关系中,快速地查找出与该第一线性参数组对 应的第一相机参数组,并根据第一相机参数组确定目标相机参数组,整个过程无需放置标定物,也无需控制相机运动就能完成相机标定。To sum up, the camera calibration method, device, electronic equipment, and storage medium proposed by each embodiment of the present application are used to obtain the information of the detection frames of at least two target areas in the first image captured by the camera, and each detection frame The information includes: the position and size of the corresponding detection frame in the first image; according to the information of the detection frames of at least two targets, determine the linear relationship between the position and size of the detection frame in the first image The first linear parameter set, and then from the predetermined correspondence between the linear parameter set and the camera parameter set, quickly find out the first camera parameter set corresponding to the first linear parameter set, and according to the first camera parameter set The target camera parameter set is determined, and the camera calibration can be completed without placing a calibration object or controlling the camera movement during the whole process.
在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本申请的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的装置来实现,或者可以用专用硬件与计算机指令的组合来实现。In the embodiments provided in this application, it should be understood that the disclosed devices and methods may also be implemented in other ways. The device embodiments described above are only illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functions and possible implementations of devices, methods and computer program products according to multiple embodiments of the present application. operate. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or part of code that includes one or more Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based device that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.
另外,在本申请各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In addition, each functional module in each embodiment of the present application may be integrated to form an independent part, each module may exist independently, or two or more modules may be integrated to form an independent part.
工业实用性Industrial Applicability
本申请提供一种相机标定方法、装置、电子设备及存储介质,包括:获取第一图像中至少两个目标所在区域的检测框的信息;第一图像为相机在第一时刻拍摄到的图像;每个检测框的信息包括对应的检测框在第一图像中的位置和尺寸;根据至少两个目标的检测框的信息,确定出第一线性参数组;第一线性参数组用于表征检测框在第一图像中的位置和尺寸之间的线性关系;在预先确定的线性参数组和相机参数组的对应关系中存在该第一线性参数组时,从对应关系中查找出与第一线性参数组对应的第一相机参数组;第一相机参数组包括相机的架设高度、相机的俯仰角和相机的焦距,根据第一相机参数组确定目标相机参数组,无需放置标定物或控制相机运动就能完成相机标定。The present application provides a camera calibration method, device, electronic equipment, and storage medium, including: acquiring the detection frame information of at least two target areas in the first image; the first image is the image captured by the camera at the first moment; The information of each detection frame includes the position and size of the corresponding detection frame in the first image; according to the information of the detection frames of at least two targets, a first linear parameter group is determined; the first linear parameter group is used to characterize the detection frame The linear relationship between the position and size in the first image; when the first linear parameter group exists in the corresponding relationship between the predetermined linear parameter group and the camera parameter group, find out the relationship with the first linear parameter from the corresponding relationship The first camera parameter group corresponding to the first camera parameter group; the first camera parameter group includes the erection height of the camera, the pitch angle of the camera and the focal length of the camera, and the target camera parameter group is determined according to the first camera parameter group, without placing calibration objects or controlling camera movement. Can complete camera calibration.
此外,可以理解的是,本申请的相机标定方法、装置、电子设备及存储介质是可以重现的,并且可以应用在多种应用中。例如,本申请的相机标定方法、装置、电子设备及存储介质可以应用于图像处理技术领域等。In addition, it can be understood that the camera calibration method, device, electronic device, and storage medium of the present application are reproducible, and can be applied in various applications. For example, the camera calibration method, device, electronic equipment, and storage medium of the present application may be applied in the technical field of image processing and the like.

Claims (12)

  1. 一种相机标定方法,其特征在于,所述方法包括:A camera calibration method, characterized in that the method comprises:
    获取第一图像中至少两个目标所在区域的检测框的信息;其中,所述第一图像为相机在第一时刻拍摄到的图像;每个检测框的信息包括:对应的检测框在所述第一图像中的位置和尺寸;Acquiring the information of the detection frame of the area where at least two targets are located in the first image; wherein, the first image is an image captured by the camera at the first moment; the information of each detection frame includes: the corresponding detection frame is in the position and size in the first image;
    根据所述至少两个目标的检测框的信息,确定出第一线性参数组;其中,该第一线性参数组用于表征检测框在所述第一图像中的位置和尺寸之间的线性关系;According to the information of the detection frames of the at least two targets, a first linear parameter group is determined; wherein the first linear parameter group is used to characterize the linear relationship between the position and size of the detection frames in the first image ;
    在预先确定的线性参数组和相机参数组的对应关系中存在该第一线性参数组时,从所述对应关系中,查找出与该第一线性参数组对应的第一相机参数组;其中,所述第一相机参数组包括:所述相机的架设高度、所述相机的俯仰角和所述相机的焦距;When the first linear parameter group exists in the predetermined correspondence between the linear parameter group and the camera parameter group, from the correspondence, find out the first camera parameter group corresponding to the first linear parameter group; wherein, The first camera parameter group includes: the erection height of the camera, the pitch angle of the camera, and the focal length of the camera;
    根据所述第一相机参数组确定目标相机参数组;其中,所述目标相机参数组为拍摄所述第一图像的相机所对应的相机参数组。A target camera parameter set is determined according to the first camera parameter set; wherein, the target camera parameter set is a camera parameter set corresponding to the camera that captures the first image.
  2. 根据权利要求1所述的方法,其特征在于,所述预先确定的线性参数组和相机参数组的对应关系是通过下述步骤获得的:The method according to claim 1, wherein the correspondence between the predetermined linear parameter set and the camera parameter set is obtained through the following steps:
    获取多个不同的相机参数组;所述多个不同的相机参数组中的任意两个相机参数组所对应的参数的种类相同;Acquiring multiple different camera parameter sets; the types of parameters corresponding to any two camera parameter sets in the multiple different camera parameter sets are the same;
    针对每个相机参数组,利用该相机参数组、至少两个虚拟目标的尺寸和位置信息,生成检测框仿真图;其中,所述检测框仿真图中包括:所述至少两个虚拟目标的检测框;For each camera parameter group, use the camera parameter group, the size and position information of at least two virtual targets to generate a detection frame simulation diagram; wherein, the detection frame simulation diagram includes: the detection of the at least two virtual targets frame;
    根据所述检测框仿真图中的至少两个检测框在所述检测框仿真图中的位置和尺寸,确定出线性参数组;Determine a linear parameter set according to the positions and sizes of at least two detection frames in the detection frame simulation graph in the detection frame simulation graph;
    建立该线性参数组与该相机参数组的对应关系。A corresponding relationship between the linear parameter set and the camera parameter set is established.
  3. 根据权利要求2所述的方法,其特征在于,针对每个相机参数组,利用该相机参数组、至少两个虚拟目标的尺寸和位置信息,生成检测框仿真图,包括:The method according to claim 2, wherein, for each camera parameter group, using the camera parameter group, the size and position information of at least two virtual targets to generate a detection frame simulation diagram, comprising:
    根据与所述虚拟目标同类型的真实目标的尺寸分布,生成所述至少两个虚拟目标的尺寸;generating sizes of the at least two virtual objects based on a size distribution of real objects of the same type as the virtual objects;
    生成所述至少两个虚拟目标的位置信息;generating location information of the at least two virtual targets;
    针对每个相机参数组,根据该相机参数组、所述至少两个虚拟目标的尺寸和位置信息,生成所述检测框仿真图。For each camera parameter set, the detection frame simulation diagram is generated according to the camera parameter set, the size and position information of the at least two virtual objects.
  4. 根据权利要求2或3所述的方法,其特征在于,获取多个不同的相机参数组,包括:The method according to claim 2 or 3, wherein obtaining a plurality of different camera parameter groups includes:
    基于目标采样间隔,对各个相机参数在取值范围内进行离散取值,得到所述多个不同的相机参数组。Based on the target sampling interval, each camera parameter is discretely valued within a value range to obtain the plurality of different camera parameter groups.
  5. 根据权利要求1至4中的任一项所述的方法,其特征在于,在所述对应关系中不存在该第一线性参数组时,所述方法还包括:The method according to any one of claims 1 to 4, wherein when the first linear parameter group does not exist in the correspondence, the method further comprises:
    针对所述对应关系中的每个线性参数组,在该线性参数组与该第一线性参数组中的对应参数的值之间的差值均小于目标阈值时,确定该线性参数组为第二线性参数组;For each linear parameter group in the corresponding relationship, when the difference between the value of the linear parameter group and the value of the corresponding parameter in the first linear parameter group is smaller than the target threshold, determine that the linear parameter group is the second Linear parameter set;
    从所述对应关系中,查找出与所述第二线性参数组对应的第二相机参数组;From the corresponding relationship, find out the second camera parameter group corresponding to the second linear parameter group;
    根据所述第二相机参数组,确定所述目标相机参数组。The target camera parameter set is determined according to the second camera parameter set.
  6. 根据权利要求5所述的方法,其特征在于,在所述第二线性参数组的数量为至少两个时,从所述对应关系中,查找出与所述第二线性参数组对应的第二相机参数组,包括:The method according to claim 5, wherein when the number of the second linear parameter groups is at least two, the second linear parameter group corresponding to the second linear parameter group is found out from the corresponding relationship. Camera parameter set, including:
    针对每个第二线性参数组,从所述对应关系中,查找出与该第二线性参数组对应的第二相机参数组;For each second linear parameter group, from the corresponding relationship, find out the second camera parameter group corresponding to the second linear parameter group;
    对应地,所述根据所述第二相机参数组,确定目标相机参数组包括:Correspondingly, according to the second camera parameter set, determining the target camera parameter set includes:
    获取第二图像中目标所在区域的检测框的信息;所述第二图像为所述相机在第二时刻拍摄到的图像;所述第一时刻和所述第二时刻之间的差值小于目标时间差;Acquiring the information of the detection frame of the area where the target is located in the second image; the second image is the image captured by the camera at the second moment; the difference between the first moment and the second moment is smaller than the target Time difference;
    针对每个第二相机参数组,基于该第二相机参数组、所述第一图像中目标的检测框的信息,以及所述第二图像中目标的检测框的信息,确定出所述相机在所述第一时刻至所述第二时刻拍摄到的目标的最终移动速度;For each second camera parameter group, based on the second camera parameter group, the information of the detection frame of the target in the first image, and the information of the detection frame of the target in the second image, it is determined that the camera is in The final moving speed of the target photographed from the first moment to the second moment;
    在确定所述最终移动速度处于正常移动速度范围内时,确定该第二相机参数组合格;When it is determined that the final moving speed is within the normal moving speed range, it is determined that the second camera parameter set is qualified;
    根据合格的第二相机参数组,确定所述目标相机参数组。The target camera parameter set is determined according to the qualified second camera parameter set.
  7. 根据权利要求6所述的方法,其特征在于,基于该第二相机参数组、所述第一图像中目标的检测框的信息,以及所述第二图像中目标的检测框的信息,确定出所述相机在所述第一时刻至所述第二时刻拍摄到的目标的最终移动速度,包括:The method according to claim 6, characterized in that, based on the second camera parameter group, the information of the detection frame of the target in the first image, and the information of the detection frame of the target in the second image, determine The final moving speed of the target captured by the camera from the first moment to the second moment includes:
    从所述第一图像中目标的检测框的信息,以及所述第二图像中目标的检测框的信息中,确定出至少一个目标的检测框信息组;每个检测框信息组包括:对应目标的两个检测框的信息;From the information of the detection frame of the target in the first image and the information of the detection frame of the target in the second image, at least one detection frame information group of the target is determined; each detection frame information group includes: a corresponding target The information of the two detection boxes of ;
    针对每个检测框信息组中的每个检测框的信息,基于该第二相机参数组和该检测框的信息,确定出该检测框所对应的目标在所述世界坐标系中的位置信息;For the information of each detection frame in each detection frame information group, based on the second camera parameter group and the information of the detection frame, determine the position information of the target corresponding to the detection frame in the world coordinate system;
    根据该检测框信息组所对应的每个检测框所对应的目标在所述世界坐标系中的位置信息,确定出所述对应的目标在所述第一时刻至所述第二时刻之间的移动速度;According to the position information of the target corresponding to each detection frame corresponding to the detection frame information group in the world coordinate system, determine the position of the corresponding target between the first moment and the second moment Moving speed;
    根据所述至少一个目标的移动速度,得到所述最终移动速度。The final moving speed is obtained according to the moving speed of the at least one target.
  8. 根据权利要求6或7所述的方法,其特征在于,所述根据合格的第二相机参数组,确定所述目标相机参数组包括:The method according to claim 6 or 7, wherein said determining the target camera parameter set according to the qualified second camera parameter set comprises:
    在合格的第二相机参数组的数量为至少两个时,分别将至少两个合格的第二相机参数 组中的对应参数的值求平均,得到所述目标相机参数组。When the number of qualified second camera parameter groups is at least two, the values of the corresponding parameters in at least two qualified second camera parameter groups are respectively averaged to obtain the target camera parameter group.
  9. 一种相机标定装置,其特征在于,所述相机标定装置包括:A camera calibration device, characterized in that the camera calibration device comprises:
    第一获取单元,配置成用于获取第一图像中至少两个目标所在区域的检测框的信息;其中,所述第一图像为相机在第一时刻拍摄到的图像;每个检测框的信息包括:对应的检测框在所述第一图像中的位置和尺寸;The first acquiring unit is configured to acquire the information of the detection frames in the area where at least two targets are located in the first image; wherein, the first image is an image captured by the camera at the first moment; the information of each detection frame Including: the position and size of the corresponding detection frame in the first image;
    第一确定单元,配置成用于根据所述至少两个目标的检测框的信息,确定出第一线性参数组;其中,该第一线性参数组用于表征检测框在所述第一图像中的位置和尺寸之间的线性关系;The first determination unit is configured to determine a first linear parameter set according to the information of the detection frames of the at least two targets; wherein, the first linear parameter set is used to characterize the detection frames in the first image The linear relationship between the position and size of ;
    第一查找单元,配置成用于在预先确定的线性参数组和相机参数组的对应关系中存在该第一线性参数组时,从所述对应关系中,查找出与该第一线性参数组对应的第一相机参数组;其中,所述第一相机参数组包括:所述相机的架设尺寸、所述相机的俯仰角和所述相机的焦距;The first search unit is configured to, when the first linear parameter set exists in the predetermined correspondence between the linear parameter set and the camera parameter set, find out from the correspondence that the first linear parameter set corresponds to the first linear parameter set. The first camera parameter group; wherein, the first camera parameter group includes: the mounting size of the camera, the pitch angle of the camera and the focal length of the camera;
    第一目标确定单元,配置成用于根据所述第一相机参数组确定目标相机参数组。The first target determination unit is configured to determine a target camera parameter set according to the first camera parameter set.
  10. 一种电子设备,其特征在于,包括存储器以及处理器,所述存储器中存储有计算机程序指令,所述计算机程序指令被所述处理器读取并运行时,执行如权利要求1至8中的任一项所述的方法。An electronic device, characterized in that it includes a memory and a processor, and computer program instructions are stored in the memory, and when the computer program instructions are read and executed by the processor, the steps in claims 1 to 8 are executed. any one of the methods described.
  11. 一种计算机可读的存储介质,其特征在于,所述存储介质上存储有计算机程序指令,所述计算机程序指令被计算机读取并运行时,执行如权利要求1至8中的任一项所述的方法。A computer-readable storage medium, characterized in that computer program instructions are stored on the storage medium, and when the computer program instructions are read and run by a computer, the computer program described in any one of claims 1 to 8 is executed. described method.
  12. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机程序,所述计算机程序被处理器执行时实现如权利要求1至8中的任一项所述的方法。A computer program product, characterized in that the computer program product includes a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is realized.
PCT/CN2022/088601 2021-07-16 2022-04-22 Camera calibration method and apparatus, electronic device, and storage medium WO2023284358A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110807725.1 2021-07-16
CN202110807725.1A CN113658265A (en) 2021-07-16 2021-07-16 Camera calibration method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2023284358A1 true WO2023284358A1 (en) 2023-01-19

Family

ID=78477434

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/088601 WO2023284358A1 (en) 2021-07-16 2022-04-22 Camera calibration method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN113658265A (en)
WO (1) WO2023284358A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113658265A (en) * 2021-07-16 2021-11-16 北京迈格威科技有限公司 Camera calibration method and device, electronic equipment and storage medium
CN115824038B (en) * 2022-08-17 2023-09-29 宁德时代新能源科技股份有限公司 Calibration ruler, calibration method and device, and detection method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104184985A (en) * 2013-05-27 2014-12-03 华为技术有限公司 Method and device for acquiring image
CN105741275A (en) * 2016-01-26 2016-07-06 浙江捷尚视觉科技股份有限公司 Human and car targets characteristics extraction method based on automatic calibration for fixed camera
CN107316332A (en) * 2017-05-16 2017-11-03 深圳市保千里电子有限公司 The camera and scene relating scaling method and system of a kind of application intelligent driving
CN111442845A (en) * 2020-03-26 2020-07-24 浙江大华技术股份有限公司 Infrared temperature measurement method and device based on distance compensation and computer storage medium
US20200358939A1 (en) * 2015-08-26 2020-11-12 Zhejiang Dahua Technology Co., Ltd. Methods and systems for traffic monitoring
CN113658265A (en) * 2021-07-16 2021-11-16 北京迈格威科技有限公司 Camera calibration method and device, electronic equipment and storage medium

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101894366B (en) * 2009-05-21 2014-01-29 北京中星微电子有限公司 Method and device for acquiring calibration parameters and video monitoring system
WO2016076400A1 (en) * 2014-11-13 2016-05-19 オリンパス株式会社 Calibration device, calibration method, optical device, imaging device, projection device, measurement system, and measurement method
AU2017225023A1 (en) * 2017-09-05 2019-03-21 Canon Kabushiki Kaisha System and method for determining a camera pose
CN108520541B (en) * 2018-03-07 2022-05-17 鞍钢集团矿业有限公司 Calibration method of wide-angle camera
CN109308693B (en) * 2018-08-29 2023-01-24 北京航空航天大学 Single-binocular vision system for target detection and pose measurement constructed by one PTZ camera
CN109448062A (en) * 2018-10-19 2019-03-08 苏州赛腾精密电子股份有限公司 A kind of camera calibration method, apparatus, terminal device and storage medium
CN111699514A (en) * 2019-05-30 2020-09-22 深圳市大疆创新科技有限公司 Calibration method and device for internal reference and relative attitude of camera, unmanned aerial vehicle and storage device
CN111508033A (en) * 2020-04-20 2020-08-07 腾讯科技(深圳)有限公司 Camera parameter determination method, image processing method, storage medium, and electronic apparatus
CN112132908B (en) * 2020-09-23 2024-02-20 西安邮电大学 Camera external parameter calibration method and device based on intelligent detection technology
CN112132874B (en) * 2020-09-23 2023-12-05 西安邮电大学 Calibration-plate-free heterogeneous image registration method and device, electronic equipment and storage medium
CN112800986B (en) * 2021-02-02 2021-12-07 深圳佑驾创新科技有限公司 Vehicle-mounted camera external parameter calibration method and device, vehicle-mounted terminal and storage medium
CN112950725A (en) * 2021-03-22 2021-06-11 深圳市城市交通规划设计研究中心股份有限公司 Monitoring camera parameter calibration method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104184985A (en) * 2013-05-27 2014-12-03 华为技术有限公司 Method and device for acquiring image
US20200358939A1 (en) * 2015-08-26 2020-11-12 Zhejiang Dahua Technology Co., Ltd. Methods and systems for traffic monitoring
CN105741275A (en) * 2016-01-26 2016-07-06 浙江捷尚视觉科技股份有限公司 Human and car targets characteristics extraction method based on automatic calibration for fixed camera
CN107316332A (en) * 2017-05-16 2017-11-03 深圳市保千里电子有限公司 The camera and scene relating scaling method and system of a kind of application intelligent driving
CN111442845A (en) * 2020-03-26 2020-07-24 浙江大华技术股份有限公司 Infrared temperature measurement method and device based on distance compensation and computer storage medium
CN113658265A (en) * 2021-07-16 2021-11-16 北京迈格威科技有限公司 Camera calibration method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113658265A (en) 2021-11-16

Similar Documents

Publication Publication Date Title
CN112894832B (en) Three-dimensional modeling method, three-dimensional modeling device, electronic equipment and storage medium
CN109059895B (en) Multi-mode indoor distance measurement and positioning method based on mobile phone camera and sensor
Chen et al. Rise of the indoor crowd: Reconstruction of building interior view via mobile crowdsourcing
CN110176032B (en) Three-dimensional reconstruction method and device
CN109520500B (en) Accurate positioning and street view library acquisition method based on terminal shooting image matching
WO2023284358A1 (en) Camera calibration method and apparatus, electronic device, and storage medium
US20140072170A1 (en) 3d human pose and shape modeling
WO2023016271A1 (en) Attitude determining method, electronic device, and readable storage medium
CN111833447A (en) Three-dimensional map construction method, three-dimensional map construction device and terminal equipment
CN106530407A (en) Three-dimensional panoramic splicing method, device and system for virtual reality
CN109902675B (en) Object pose acquisition method and scene reconstruction method and device
WO2023016182A1 (en) Pose determination method and apparatus, electronic device, and readable storage medium
CN111260779A (en) Map construction method, device and system and storage medium
WO2023016082A1 (en) Three-dimensional reconstruction method and apparatus, and electronic device and storage medium
CN113888639A (en) Visual odometer positioning method and system based on event camera and depth camera
CN114969221A (en) Method for updating map and related equipment
CN111325828A (en) Three-dimensional face acquisition method and device based on three-eye camera
CN110673607A (en) Feature point extraction method and device in dynamic scene and terminal equipment
Huttunen et al. A monocular camera gyroscope
An et al. Image-based positioning system using LED Beacon based on IoT central management
CN114972492A (en) Position and pose determination method and device based on aerial view and computer storage medium
Price et al. Augmenting crowd-sourced 3d reconstructions using semantic detections
CN114998743A (en) Method, device, equipment and medium for constructing visual map points
CN112767477A (en) Positioning method, positioning device, storage medium and electronic equipment
CN111753766A (en) Image processing method, device, equipment and medium

Legal Events

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

Ref document number: 22841002

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE