Method, device, storage medium and electronic device for adjusting calibration frame

By calculating the degree of deflection between the reference recognition box and the target recognition box and adjusting the target calibration box, the problem of inaccurate adjustment of the parking position in the prior art is solved, and the accurate parking detection of the monitoring equipment is realized.

CN114494419BActive Publication Date: 2025-02-07ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210096688.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-26
Publication Date
2025-02-07
Estimated Expiration
2042-01-26

AI Technical Summary

Technical Problem

The problem of inaccurate adjustment of pre-configured allowable parking positions in the prior art has caused the monitoring equipment to fail to detect the parking conditions normally.

Method used

By determining a first degree of deflection between the reference recognition box and the target recognition box, and a second degree of deflection between the target calibration box and the reference recognition box, the target calibration box is calculated and the target calibration box is adjusted according to the degree of deflection.

Benefits of technology

The effect of accurately adjusting the target calibration box is achieved, solving the problem of inaccurate adjustment of pre-configuration permitted parking positions, and ensuring that the monitoring equipment can accurately detect the parking conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114494419B_ABST
    Figure CN114494419B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method, device, storage medium and electronic device for adjusting a calibration frame, wherein a first deflection degree between a reference recognition frame and a target recognition frame for selecting a target object included in a target image currently captured by a camera device is determined, wherein the reference recognition frame is a historical recognition frame for selecting a target object determined before the target recognition frame is determined; a second deflection degree between a target calibration frame currently configured by the camera device and the reference recognition frame is determined, wherein the target calibration frame is used to select a target area, and the target area is used to place a target object; a target deflection degree is determined based on the first deflection degree and the second deflection degree; and the target calibration frame is adjusted based on the target deflection degree. Through the present invention, the problem of inaccurate adjustment of a pre-configured allowed parking position existing in the related art is solved, and the effect of accurately adjusting the target calibration frame is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of image recognition, and in particular, to a method, device, storage medium and electronic device for adjusting a calibration frame. Background Art

[0002] When using monitoring equipment to detect whether the parking of an object is reasonable, it is usually necessary to pre-configure the allowed parking positions in the monitoring interface, for example, manually draw the allowed parking positions. Then identify the parking position of the object, and determine whether the parking of the object is reasonable based on the configured position and the parking position. However, if the parking position drawn by the monitoring device is offset from the actual position due to external factors, the parking condition cannot be detected normally. Therefore, it is necessary to adjust the pre-configured allowed parking positions. However, in the related art, there is a problem of inaccurate adjustment of the pre-configured allowed parking positions.

[0003] Currently, no effective solution has been proposed for the above-mentioned problems existing in the related technologies. Summary of the invention

[0004] Embodiments of the present invention provide a method, device, storage medium and electronic device for adjusting a calibration frame, so as to at least solve the problem of inaccurate adjustment of a pre-configured allowed parking position existing in the related art.

[0005] According to one embodiment of the present invention, a method for adjusting a calibration frame is provided, comprising: determining a first deflection degree between a reference recognition frame and a target recognition frame for selecting a target object included in a target image currently acquired by a camera device, wherein the reference recognition frame is a historical recognition frame for selecting the target object determined before determining the target recognition frame; determining a second deflection degree between a target calibration frame currently configured by the camera device and the reference recognition frame, wherein the target calibration frame is used to select a target area, and the target area is used to place the target object; determining a target deflection degree based on the first deflection degree and the second deflection degree; and adjusting the target calibration frame based on the target deflection degree.

[0006] According to another embodiment of the present invention, a calibration frame adjustment device is provided, comprising: a first determination module, used to determine a first deflection degree between a reference identification frame and a target identification frame for selecting a target object included in a target image currently acquired by a camera device, wherein the reference identification frame is a historical identification frame for selecting the target object determined before determining the target identification frame; a second determination module, used to determine a second deflection degree between a target calibration frame currently configured by the camera device and the reference identification frame, wherein the target calibration frame is used to select a target area, and the target area is used to place the target object; a third determination module, used to determine a target deflection degree based on the first deflection degree and the second deflection degree; and an adjustment module, used to adjust the target calibration frame based on the target deflection degree.

[0007] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of any of the above methods when executed by a processor.

[0008] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0009] Through the present invention, the first deflection degree between the reference identification frame and the target identification frame for selecting the target object included in the target image currently captured by the camera device is determined, the second deflection degree between the target calibration frame currently configured by the camera device and the reference identification frame is determined, the target deflection degree is determined according to the first deflection degree and the second deflection degree, and the target calibration frame is adjusted according to the target deflection degree. Because the first deflection degree between the target identification frame and the reference identification frame is determined before adjusting the target calibration frame, and the second deflection degree between the target calibration frame and the reference identification frame is determined, that is, the actual error and the system error are determined, and the target deflection degree is determined based on the combination of the two, therefore, the deflection degree of the target calibration frame can be accurately determined, and then the target calibration frame can be accurately adjusted according to the target deflection degree, therefore, the problem of inaccurate adjustment of the pre-configured allowed parking position existing in the related art can be solved, and the effect of accurately adjusting the target calibration frame can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 It is a hardware structure block diagram of a mobile terminal of a calibration frame adjustment method according to an embodiment of the present invention;

[0011] Figure 2 is a flow chart of a method for adjusting a calibration frame according to an embodiment of the present invention;

[0012] Figure 3 is a schematic diagram of a calibration target object according to an exemplary embodiment of the present invention;

[0013] Figure 4 is a schematic diagram of position deviation angle according to an exemplary embodiment of the present invention;

[0014] Figure 5 is a schematic diagram of position deviation between a calibration frame and a recognition frame according to an exemplary embodiment of the present invention;

[0015] Figure 6 4 is a structural block diagram of a calibration frame adjustment device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0016] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.

[0017] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0018] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for adjusting a calibration frame according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0019] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for adjusting the calibration frame in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0020] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0021] In this embodiment, a method for adjusting a calibration frame is provided. Figure 2 is a flow chart of a method for adjusting a calibration frame according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0022] Step S202, determining a first deflection degree between a reference recognition frame and a target recognition frame for selecting a target object included in a target image currently captured by a camera device, wherein the reference recognition frame is a historical recognition frame for selecting the target object determined before determining the target recognition frame;

[0023] Step S204, determining a second deflection degree between a target calibration frame currently configured by the camera device and the reference recognition frame, wherein the target calibration frame is used to frame a target area, and the target area is used to place the target object;

[0024] Step S206, determining a target deflection degree based on the first deflection degree and the second deflection degree;

[0025] Step S208: adjusting the target calibration frame based on the target deflection degree.

[0026] In an exemplary embodiment, the target object may be a person, an object, a vehicle, etc. The target area may be an area for placing the target object. When the target object is an object, the target area may be an area for placing the object, such as the distance position where the object is placed in a factory. When the target object is a vehicle, the target area may be a parking space. In the actual parking space calibration process, the camera device may often deflect at a certain angle due to some reasons, thereby causing the target calibration frame of the camera device to offset at a certain angle, resulting in a large error in the final calibrated parking space. The calibration diagram of the target object can be found in the attached figure. Figure 3 ,like Figure 3 As shown in the figure, the rectangular frame A1B1C1D1 is the target calibration frame, and the rectangular frame E1F1G1H1 is the target recognition frame. Point M1 is the center of the target calibration frame, and point N1 is the center of the target recognition frame. It is impossible for the target calibration frame and the target recognition frame to completely overlap, and there is a position deviation. When the camera installation position deflects, the position deviation between the two will increase as the deflection angle increases. Therefore, in order to improve the stability of the calibration equipment, the target calibration frame can be corrected in real time.

[0027] In the above embodiment, the reference identification frame may initially be an identification frame obtained by selecting the target object when the target object is first identified. After multiple identifications, the reference identification frame may be updated at a predetermined time interval, a first deflection degree between the reference identification frame and the target identification frame may be determined, a second deflection degree between the target identification frame and the current target calibration frame may be determined, and the target deflection degree may be determined based on the first deflection degree and the second deflection degree. The target calibration frame may be adjusted based on the target deflection degree. The first deflection degree and the second deflection degree may be a deflection angle, a deflection distance, and the like. When it is determined that the target calibration frame needs to be adjusted based on the target deflection degree, an alarm operation may be performed to prompt the user to redraw the target calibration frame. The angle and direction of the target calibration frame that needs to be adjusted may also be determined based on the target deflection degree, and the current target calibration frame may be adjusted according to the angle and direction that need to be adjusted to obtain the final target calibration frame.

[0028] Optionally, the executor of the above steps may be a background processor, or other devices with similar processing capabilities, or a machine that integrates at least an image acquisition device and a data processing device, wherein the image acquisition device may include a graphics acquisition module such as a camera, and the data processing device may include a computer, a mobile phone or other terminal, but is not limited thereto.

[0029] Through the present invention, the first deflection degree between the reference identification frame and the target identification frame for selecting the target object included in the target image currently captured by the camera device is determined, the second deflection degree between the target calibration frame currently configured by the camera device and the reference identification frame is determined, the target deflection degree is determined according to the first deflection degree and the second deflection degree, and the target calibration frame is adjusted according to the target deflection degree. Because the first deflection degree between the target identification frame and the reference identification frame is determined before adjusting the target calibration frame, and the second deflection degree between the target calibration frame and the reference identification frame is determined, that is, the actual error and the system error are determined, and the target deflection degree is determined based on the combination of the two, therefore, the deflection degree of the target calibration frame can be accurately determined, and then the target calibration frame can be accurately adjusted according to the target deflection degree, therefore, the problem of inaccurate adjustment of the pre-configured allowed parking position existing in the related art can be solved, and the effect of accurately adjusting the target calibration frame can be achieved.

[0030] In an exemplary embodiment, determining the first deflection degree between the reference recognition frame and the target recognition frame for selecting the target object included in the target image currently captured by the camera device includes: determining a first point included in the target recognition frame and a second point included in the reference recognition frame corresponding to the first point; determining a third point of a predetermined calibration frame included in the target calibration frame; determining a first vector based on the first point and the third point; determining a second vector based on the second point and the third point; and determining the first deflection degree based on the first vector and the second vector. In this embodiment, when determining the first deflection degree, the first point included in the target recognition frame and the second point included in the reference recognition frame corresponding to the first point may be determined, the third point of the predetermined calibration frame included in the target calibration frame may be determined, the first vector may be determined based on the first point and the third point, the second vector may be determined based on the second point and the third point, and the first deflection degree may be determined based on the first vector and the second vector. The first point may be the average center point of all the recognition frames included in the target recognition frame, that is, the first point may be the average center point of the center points of the multiple recognition frames included in the target recognition frame. Accordingly, the second point is the average center point of the center points of the multiple recognition frames included in the reference recognition frame. The predetermined calibration frame can be any calibration frame in the target calibration frame, such as the attached Figure 3 The box in A1B1C1D1.

[0031] It should be noted that the first point can also be the average vertex of a certain vertex of each recognition box included in the target recognition box. For example, the coordinates of the upper left corner vertex of each recognition box are determined, and the average coordinates of multiple coordinates are determined as the first point. At this time, the second point is the average vertex of the upper left corner vertices of each recognition box included in the reference recognition frame.

[0032] In an exemplary embodiment, determining the first deflection degree based on the first vector and the second vector includes: determining the deflection direction of the first vector relative to the second vector; determining the deflection angle between the first vector and the second vector; when the deflection direction is the first direction, determining the deflection angle as the first deflection degree; when the deflection direction is the second direction, determining the opposite of the deflection angle as the first deflection degree, wherein the first direction is opposite to the second direction. In this embodiment, when determining the first deflection degree, the deflection direction of the first vector relative to the second vector can be determined, when the first vector deflects in the first direction relative to the second vector, the deflection angle between the first vector and the second vector can be determined as the first deflection degree, when the first vector deflects in the second direction relative to the second vector, the opposite of the deflection angle between the first vector and the second vector can be determined as the first deflection degree. Wherein, the first direction can be counterclockwise, and the second direction can be clockwise. Of course, the first direction can also be clockwise, and the second direction can be counterclockwise.

[0033] In an exemplary embodiment, determining the first point included in the target recognition frame includes: determining the coordinates of the fourth point corresponding to the first point in each recognition frame included in the target recognition frame, obtaining multiple first coordinates, determining the first average coordinates of the multiple first coordinates, and determining the point corresponding to the first average coordinate as the first point; determining the second point corresponding to the first point included in the reference recognition frame includes: determining the coordinates of the fifth point corresponding to the second point in each recognition frame included in the reference recognition frame, obtaining multiple second coordinates, determining the second average coordinates of the multiple second coordinates, and determining the point corresponding to the second average coordinate as the second point. In this embodiment, when determining the first point included in the target recognition frame, the fourth point corresponding to the first point in each recognition frame included in the target recognition frame can be determined, such as when the first point is the center point, the center point of each recognition frame can be determined. Determine the first coordinates of the multiple fourth points, determine the average value of the horizontal coordinates and the average value of the vertical coordinates in the multiple first coordinates, and determine the point corresponding to the first average coordinate formed by the average value of the horizontal coordinate and the average value of the vertical coordinate as the first point. Similarly, the second point can be determined according to the above method.

[0034] In the above embodiment, the method for determining the second deflection degree between the reference recognition frame and the target calibration frame is the same as the method for determining the first deflection degree between the reference recognition frame and the target recognition frame.

[0035] In the above embodiment, when the first point and the second point are the center points, during the calibration process, the coordinates of each vertex of the manually drawn target calibration frame and the reference recognition frame are known, and the reference recognition frame and the target calibration frame can be used as standard rectangles, such as Figure 3As shown, the coordinates of the center M1 of the target calibration frame can be obtained as The coordinates of the center N1 of the reference recognition frame are: The target calibration frame is a rectangular frame drawn according to the parking space, so the centers of the calibration frames of all parking spaces are on a straight line. The vehicle identification frame is related to the parking position of the vehicle, and the centers of all identification frames are not on a straight line. In order to estimate the position of the vehicle identification frame, the center coordinates of all vehicle identification frames are averaged to eliminate the system error, that is, the coordinate N0 after the average coordinates of all reference identification frames are found: In order to quantitatively describe the position deviation between the target calibration frame and the reference recognition frame, the line connecting M1N0 is taken as the position centerline of the vehicle recognition frame, and the angle between the calibration frame and the position centerline of the recognition frame is the position deviation angle between the two. The schematic diagram of the position deviation angle can be found in the attached figure. Figure 4 .like Figure 4 As shown, the center line of the target calibration frame, that is, the coordinates of the vector M1M2 can be expressed as: (x M2 -x M1 ,y M2 -y M1 ), the center line of the reference recognition frame, that is, the coordinates of the vector M1N0 can be expressed as: (x N0 -x M1 ,y N0 -y M1 ), so the initial deviation angle α between the reference recognition frame and the target calibration frame is: That is, the second deflection degree.

[0036] In the above embodiment, when the camera deflects, the original image changes, but the target calibration frame is manually drawn. No matter how the camera deflects, the relative position of the target calibration frame and the image is fixed. However, the position of the vehicle identification frame will change relative to the image. Therefore, the deflection of the camera can actually be converted into the deflection angle of the vehicle identification frame. The schematic diagram of the position deviation of the calibration frame and the identification frame after the camera deflects can be found in the attached figure. Figure 5 .like Figure 5 As shown, P1, P2, and P3 are the actual centers of the target recognition frame after the image is deflected. The coordinates can be calculated from the coordinates of each vertex of the target recognition frame. N1, N2, and N3 are the centers of the vehicle recognition frame when the position relative to the image remains unchanged after the image is deflected, that is, the reference recognition frame. After the image is deflected, the coordinates of the center N'0 after eliminating the system error can be obtained by averaging the centers of each target recognition frame: The angle of image deflection is the angle β between the midline of the vehicle identification frame before and after the image is rotated, where β can be expressed as That is, the first deflection degree can be represented by the angle between two vectors M1N0 (corresponding to the second vector) and M1N′0 (corresponding to the first vector).

[0037] In an exemplary embodiment, determining the target deflection degree based on the first deflection degree and the second deflection degree includes: determining the sum of the first deflection degree and the second deflection degree; and determining the sum as the target deflection degree. In this embodiment, after determining the first deflection degree and the second deflection degree, the sum of the first deflection degree and the second deflection degree can be determined as the target deflection degree. For example, counterclockwise deflection is a negative direction and clockwise deflection is a positive direction, so the total deflection angle γ of the target recognition frame and the target calibration frame after the picture is deflected (corresponding to the above-mentioned target deflection degree) is: γ=α+β.

[0038] In an exemplary embodiment, adjusting the target calibration frame based on the target deflection degree includes: adjusting the target calibration frame when the target deflection degree is greater than a first threshold. In this embodiment, when the total deflection angle γ between the target recognition frame and the target calibration frame is greater than the first threshold, a large error will be generated in the target calibration, resulting in incorrect parking space calibration. Therefore, an alarm operation can be performed to prompt the user to adjust the target calibration frame, or to adjust the target calibration frame according to the target deflection degree.

[0039] In an exemplary embodiment, the distance between each target recognition frame included in the target recognition frame and the corresponding calibration frame included in the target calibration frame is determined to obtain multiple target distances, wherein the corresponding calibration frame is a calibration frame corresponding to the target recognition frame; the shortest side length of the target recognition frame is determined; the product of the shortest side length and a predetermined constant is determined as a second threshold, wherein the predetermined constant is greater than zero and less than 1; when the multiple target distances include a distance less than the second threshold, the target calibration frame is adjusted. In this embodiment, when the target deflection degree does not reach the first threshold, but due to the large number of parking spaces, incorrect calibration may occur. At this time, it is possible to determine whether the distant target calibration frame needs to be corrected by calculating whether the distance between the target recognition frame and the center of the target calibration frame exceeds the specified distance. Among them, the specified distance is the second threshold, and the second threshold can be the product of the shortest side length of the target recognition frame and a predetermined constant, and the predetermined constant is a value greater than 0 and less than 1, such as 1 / 3, 1 / 2, 2 / 3, etc. The distance between the center of the target recognition frame and the center of the target calibration frame can be calculated by coordinates: Through long-term actual testing of parking space calibration in different areas, it is necessary to impose bidirectional restrictions on the total deflection angle γ between the vehicle identification frame and the parking space calibration frame and the distance MP between the center of the vehicle identification frame and the center of the parking space calibration frame. Among them, the total deflection angle cannot exceed the set maximum deflection angle threshold, and the distance between the centers of the two frames cannot exceed the shortest side length of the vehicle identification frame, that is: Where l is the shortest side length of the target recognition box, and θ is the maximum allowable deflection angle of the camera, i.e., the first threshold.

[0040] In the above embodiment, the position deviation between the vehicle identification frame and the parking space calibration frame after the camera is deflected is quantitatively evaluated to determine whether the parking space calibration frame needs to be corrected. The position deviation between the vehicle identification frame and the parking space calibration frame is represented by two indicators: the distance between the centers of the two frames and the deflection angle between the equivalent midlines of the two frames. When the maximum distance between the centers of the two frames exceeds the side length of the vehicle identification frame, the parking space calibration frame is corrected. Or when the deflection angle of the equivalent midline of the two frames is greater than the preset threshold value θ, it can be determined that the parking space calibration frame needs to be corrected. That is, when the roadside parking camera is offset, the camera can automatically adjust according to the offset angle or distance, and re-send the position of the detection frame to ensure that the detection frame matches the parking space as much as possible.

[0041] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0042] In this embodiment, a device for adjusting a calibration frame is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0043] Figure 6 is a structural block diagram of an adjustment device for a calibration frame according to an embodiment of the present invention, such as Figure 6 As shown, the device comprises:

[0044] A first determination module 62 is used to determine a first deflection degree between a reference recognition frame and a target recognition frame for selecting a target object included in a target image currently captured by a camera device, wherein the reference recognition frame is a historical recognition frame for selecting the target object determined before determining the target recognition frame;

[0045] A second determination module 64 is used to determine a second deflection degree between a target calibration frame currently configured by the camera device and the reference identification frame, wherein the target calibration frame is used to frame a target area, and the target area is used to place the target object;

[0046] a third determination module 66, configured to determine a target deflection degree based on the first deflection degree and the second deflection degree;

[0047] The adjustment module 68 is used to adjust the target calibration frame based on the target deflection degree.

[0048] In an exemplary embodiment, the first determination module 62 can determine the first deflection degree between the reference identification frame and the target identification frame for selecting the target object included in the target image currently captured by the camera device in the following manner: determine a first point included in the target identification frame and a second point included in the reference identification frame corresponding to the first point; determine a third point of a predetermined calibration frame included in the target calibration frame; determine a first vector based on the first point and the third point; determine a second vector based on the second point and the third point; and determine the first deflection degree based on the first vector and the second vector.

[0049] In an exemplary embodiment, the first determination module 62 can determine the first deflection degree based on the first vector and the second vector in the following manner: determine the deflection direction of the first vector relative to the second vector; determine the deflection angle between the first vector and the second vector; when the deflection direction is a first direction, determine the deflection angle as the first deflection degree; when the deflection direction is a second direction, determine the opposite of the deflection angle as the first deflection degree, wherein the first direction is opposite to the second direction.

[0050] In an exemplary embodiment, the first determination module 62 can determine the first point included in the target identification frame in the following manner: determine the coordinates of the fourth point corresponding to the first point in each identification frame included in the target identification frame to obtain multiple first coordinates, determine the first average coordinates of the multiple first coordinates, and determine the point corresponding to the first average coordinate as the first point; the first determination module 62 can determine the second point corresponding to the first point included in the reference identification frame in the following manner: determine the coordinates of the fifth point corresponding to the second point in each identification frame included in the reference identification frame to obtain multiple second coordinates, determine the second average coordinates of the multiple second coordinates, and determine the point corresponding to the second average coordinate as the second point.

[0051] In an exemplary embodiment, the third determination module 66 may determine the target deflection degree based on the first deflection degree and the second deflection degree in the following manner: determine the sum of the first deflection degree and the second deflection degree; and determine the sum as the target deflection degree.

[0052] In an exemplary embodiment, the adjustment module 68 may adjust the target calibration frame based on the target deflection degree in the following manner: if the target deflection degree is greater than a first threshold, adjust the target calibration frame.

[0053] In an exemplary embodiment, the device can be used to determine the distance between each target identification frame included in the target identification frame and the corresponding calibration frame included in the target calibration frame to obtain multiple target distances, wherein the corresponding calibration frame is a calibration frame corresponding to the target identification frame; determine the shortest side length of the target identification frame; determine the product of the shortest side length and a predetermined constant as a second threshold, wherein the predetermined constant is greater than zero and less than 1; and adjust the target calibration frame when the multiple target distances include a distance less than the second threshold.

[0054] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0055] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0056] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0057] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0058] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0059] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0060] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0061] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for adjusting a calibration frame, characterized in that: include: Determine a first degree of deflection between a reference recognition frame and a target recognition frame for selecting a target object included in a target image currently captured by a camera device, wherein the reference recognition frame is a historical recognition frame for selecting the target object determined before determining the target recognition frame; Determining a second degree of deflection between a target calibration frame currently configured by the camera device and the reference identification frame, wherein the target calibration frame is used to frame a target area, and the target area is used to place the target object; determining a target deflection degree based on the first deflection degree and the second deflection degree; adjusting the target calibration frame based on the target deflection degree; Determining a first deflection degree between a reference identification frame and a target identification frame for selecting a target object included in a target image currently captured by a camera device includes: determining a first point included in the target identification frame and a second point included in the reference identification frame corresponding to the first point; determining a third point of a predetermined calibration frame included in the target calibration frame; determining a first vector based on the first point and the third point; determining a second vector based on the second point and the third point; and determining the first deflection degree based on the first vector and the second vector.

2. The method according to claim 1, characterized in that: Determining the first deflection degree based on the first vector and the second vector includes: determining a deflection direction of the first vector relative to the second vector; determining a deflection angle between the first vector and the second vector; When the deflection direction is a first direction, determining the deflection angle as the first deflection degree; When the deflection direction is a second direction, the opposite number of the deflection angle is determined as the first deflection degree, wherein the first direction is opposite to the second direction.

3. The method according to claim 1, characterized in that Determining the first point included in the target recognition frame includes: determining the coordinates of a fourth point in each recognition frame included in the target recognition frame and corresponding to the first point, obtaining a plurality of first coordinates, determining a first average coordinate of the plurality of first coordinates, and determining a point corresponding to the first average coordinate as the first point; Determining the second point included in the reference identification frame and corresponding to the first point includes: determining the coordinates of the fifth point in each identification frame included in the reference identification frame and corresponding to the second point, obtaining multiple second coordinates, determining the second average coordinates of the multiple second coordinates, and determining the point corresponding to the second average coordinate as the second point.

4. The method according to claim 1, characterized in that: Determining a target deflection degree based on the first deflection degree and the second deflection degree includes: determining a sum of the first deflection degree and the second deflection degree; The sum is determined as the target deflection degree.

5. The method according to claim 1, characterized in that Adjusting the target calibration frame based on the target deflection degree includes: When the target deflection degree is greater than a first threshold, the target calibration frame is adjusted.

6. The method according to claim 1, characterized in that The method further comprises: Determine the distance between each target recognition frame included in the target recognition frame and the corresponding calibration frame included in the target calibration frame to obtain a plurality of target distances, wherein the corresponding calibration frame is a calibration frame corresponding to the target recognition frame; Determine the shortest side length of the target recognition frame; Determine the product of the shortest side length and a predetermined constant as a second threshold, wherein the predetermined constant is greater than zero and less than 1; When the plurality of target distances include a distance smaller than the second threshold, the target calibration frame is adjusted.

7. A calibration frame adjustment device, characterized in that: include: A first determination module is used to determine a first deflection degree between a reference recognition frame and a target recognition frame for selecting a target object included in a target image currently captured by a camera device, wherein the reference recognition frame is a historical recognition frame for selecting the target object determined before determining the target recognition frame; A second determination module is used to determine a second deflection degree between a target calibration frame currently configured by the camera device and the reference identification frame, wherein the target calibration frame is used to frame a target area, and the target area is used to place the target object; a third determination module, configured to determine a target deflection degree based on the first deflection degree and the second deflection degree; An adjustment module, configured to adjust the target calibration frame based on the target deflection degree; The first determination module determines the first deflection degree between the reference identification frame and the target identification frame for selecting the target object included in the target image currently captured by the camera device in the following manner: determining a first point included in the target identification frame and a second point included in the reference identification frame corresponding to the first point; determining a third point of a predetermined calibration frame included in the target calibration frame; determining a first vector based on the first point and the third point; determining a second vector based on the second point and the third point; and determining the first deflection degree based on the first vector and the second vector.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 6 when executed by a processor.

9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Exterior parameter self-calibration method for camera with rotating stereovision

    CN101320474A

  • Monitoring image based intelligent parking lot parking place identification method and system

    CN104112370A