Camera self-calibration method, intelligent device and storage medium
Through the camera self-calibration method, the standard parameters are calibrated using the characteristics of key areas in the image, solving the problem of degradation of imaging quality caused by camera offset, achieving an efficient calibration process and reducing costs.
Patent Information
- Application Number
- CN202411676388.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-02-18
AI Technical Summary
In the daily operation of battery swap stations, the camera gradually shifts or is dirty due to reasons such as the difference in the landing station and daily loss, which affects the imaging quality, making the visual algorithm unable to obtain effective input images, resulting in undetectable or incorrect output.
A camera self-calibration method is provided, by controlling the camera to take an image of the area to be photographed, the features of the key areas in the image are acquired, and the standard parameters of the preset key areas are calibrated according to these features. The method includes obtaining the mapping relationship between the current parameter and the standard parameter, and converting the standard parameter to the current parameter through an affine transformation matrix to achieve calibration of the standard parameter.
Effective calibration of small amplitude offset of the camera is achieved, imaging quality is improved, visual algorithms can obtain effective input images, reduce the need for manual participation, and reduce labor and time costs.
Smart Images

Figure CN119484808A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of camera calibration, and in particular to a camera self-calibration method, a smart device and a storage medium. Background Art
[0002] In the complete battery swap process at the battery swap station, multiple different types of cameras capture real-time images and provide them to the visual algorithm for identification to ensure that individual steps have been completed and meet the battery swap safety requirements, thereby achieving a fully automatic battery swap process. However, the detection of the visual algorithm depends on the clear imaging of the camera and the correct shooting position. When the camera gradually shifts or becomes dirty due to differences in landing stations, daily wear and tear, etc., it will affect the imaging quality of the camera, making it impossible for the battery swap visual algorithm to obtain valid input images, resulting in undetectable or erroneous outputs.
[0003] Previously, the camera could verify whether the imaging quality met the requirements before the battery swap algorithm was executed through an imaging quality detection algorithm to determine whether the results of the battery swap algorithm were reliable. However, with the long-term operation of battery swap stations, many serious problems such as poor landing work and unqualified resolution have been identified and modified. At this stage, most of the camera imaging problems come from daily operations. Over time, the camera gradually shifted slightly, causing the key area to deviate from the core detection area of the battery swap algorithm, and could not meet the operating requirements of the battery swap algorithm. However, the imaging quality actually meets the standards and only requires slight adjustments. Therefore, how to adaptively adjust the offset of the camera is a problem that needs to be solved in this field. Summary of the invention
[0004] In order to overcome the above-mentioned defects, the present application is proposed to solve or at least partially solve the technical problem of how to adaptively adjust the offset of the camera.
[0005] In a first aspect, a camera self-calibration method is provided, the method comprising:
[0006] Controlling the camera to capture an image of the area to be captured; wherein the camera is fixedly arranged relative to the area to be captured;
[0007] According to the image, obtaining features of a key area in the image;
[0008] According to the characteristics of the key area, the preset standard parameters of the key area are calibrated.
[0009] In a technical solution of the above-mentioned camera self-calibration method, calibrating the preset standard parameters of the key area according to the characteristics of the key area includes:
[0010] According to the features of the key area, obtaining current parameters of the key area in the image;
[0011] The standard parameter is calibrated according to the current parameter and the standard parameter.
[0012] In a technical solution of the above-mentioned camera self-calibration method, calibrating the standard parameter according to the current parameter and the standard parameter includes:
[0013] According to the current parameters and the standard parameters, obtaining a mapping relationship between the current parameters and the standard parameters;
[0014] According to the mapping relationship, the standard parameter is converted into the current parameter to achieve calibration of the standard parameter.
[0015] In a technical solution of the above-mentioned camera self-calibration method, the current parameter includes the current boundary of the key area, the standard parameter includes the standard boundary of the key area, and the mapping relationship includes an affine transformation matrix between the current boundary and the standard boundary;
[0016] The converting the standard parameter to the current parameter according to the mapping relationship includes:
[0017] The standard boundary is converted to the current boundary according to the affine transformation matrix.
[0018] In a technical solution of the above-mentioned camera self-calibration method, the camera is arranged at a battery swap station, and the battery swap station is communicatively connected with a cloud server;
[0019] The converting the standard parameter to the current parameter according to the mapping relationship includes:
[0020] According to the mapping relationship, the standard parameter is converted to the current parameter to obtain the calibrated standard parameter;
[0021] The calibrated standard parameters are uploaded to the cloud server, so that the cloud server sends the calibrated standard parameters to the battery swap station to run the battery swap algorithm.
[0022] In a technical solution of the above-mentioned camera self-calibration method, the camera is arranged at a battery swap station, and the battery swap station is communicatively connected with a cloud server;
[0023] The converting the standard parameter to the current parameter according to the mapping relationship includes:
[0024] The mapping relationship is uploaded to the cloud server so that the cloud server converts the standard parameters into the current parameters according to the mapping relationship to obtain calibrated standard parameters, and the calibrated standard parameters are sent to the battery swap station to run the battery swap algorithm.
[0025] In a technical solution of the above-mentioned camera self-calibration method, acquiring features of a key area in the image according to the image includes:
[0026] Determining the image quality of the image and acquiring an image that meets the conditions;
[0027] Determining whether the key area exists in the image that meets the conditions;
[0028] When the key area exists in the image that meets the condition, the features of the key area in the image are acquired.
[0029] In a technical solution of the above-mentioned camera self-calibration method, the acquiring the features of the key area in the image according to the image further includes:
[0030] When the key area does not exist in the image that meets the conditions, an alarm is issued to prompt manual calibration.
[0031] In a technical solution of the above-mentioned camera self-calibration method, controlling the camera to capture an image of the area to be captured includes:
[0032] In a preset time period, the camera is controlled to capture an image of the area to be captured.
[0033] In a second aspect, a smart device is provided, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method described in any one of the technical solutions of the above-mentioned camera self-calibration method is implemented.
[0034] In a third aspect, a computer-readable storage medium is provided, wherein a plurality of program codes are stored therein, wherein the program codes are suitable for being loaded and run by a processor to execute the method described in any one of the technical solutions of the above-mentioned camera self-calibration method.
[0035] Solution 1. A camera self-calibration method, characterized in that the method comprises:
[0036] Controlling the camera to capture an image of the area to be captured; wherein the camera is fixedly arranged relative to the area to be captured;
[0037] According to the image, obtaining features of a key area in the image;
[0038] According to the characteristics of the key area, the preset standard parameters of the key area are calibrated.
[0039] Solution 2. The camera self-calibration method according to Solution 1 is characterized in that:
[0040] The step of calibrating preset standard parameters of the key area according to the characteristics of the key area includes:
[0041] According to the features of the key area, obtaining current parameters of the key area in the image;
[0042] The standard parameter is calibrated according to the current parameter and the standard parameter.
[0043] Solution 3. The camera self-calibration method according to Solution 2 is characterized in that:
[0044] The step of calibrating the standard parameter according to the current parameter and the standard parameter includes:
[0045] According to the current parameters and the standard parameters, obtaining a mapping relationship between the current parameters and the standard parameters;
[0046] According to the mapping relationship, the standard parameter is converted into the current parameter to achieve calibration of the standard parameter.
[0047] Solution 4. The camera self-calibration method according to Solution 3 is characterized in that the current parameter includes the current boundary of the key area, the standard parameter includes the standard boundary of the key area, and the mapping relationship includes an affine transformation matrix between the current boundary and the standard boundary;
[0048] The converting the standard parameter to the current parameter according to the mapping relationship includes:
[0049] The standard boundary is converted to the current boundary according to the affine transformation matrix.
[0050] Solution 5. The camera self-calibration method according to Solution 3 or 4 is characterized in that the camera is set at a battery swap station, and the battery swap station is communicatively connected to a cloud server;
[0051] The converting the standard parameter to the current parameter according to the mapping relationship includes:
[0052] According to the mapping relationship, the standard parameter is converted to the current parameter to obtain the calibrated standard parameter;
[0053] The calibrated standard parameters are uploaded to the cloud server, so that the cloud server sends the calibrated standard parameters to the battery swap station to run the battery swap algorithm.
[0054] Solution 6. The camera self-calibration method according to Solution 3 or 4 is characterized in that the camera is set at a battery swap station, and the battery swap station is communicatively connected to a cloud server;
[0055] The converting the standard parameter to the current parameter according to the mapping relationship includes:
[0056] The mapping relationship is uploaded to the cloud server so that the cloud server converts the standard parameters into the current parameters according to the mapping relationship to obtain calibrated standard parameters, and the calibrated standard parameters are sent to the battery swap station to run the battery swap algorithm.
[0057] Solution 7. The camera self-calibration method according to Solution 1 is characterized in that:
[0058] The step of obtaining features of a key area in the image according to the image includes:
[0059] Determining the image quality of the image and acquiring an image that meets the conditions;
[0060] Determining whether the key area exists in the image that meets the conditions;
[0061] When the key area exists in the image that meets the condition, the features of the key area in the image are acquired.
[0062] Solution 8. The camera self-calibration method according to Solution 7 is characterized in that:
[0063] The acquiring, according to the image, features of a key area in the image further comprises:
[0064] When the key area does not exist in the image that meets the conditions, an alarm is issued to prompt manual calibration.
[0065] Solution 9. The camera self-calibration method according to Solution 1 is characterized in that:
[0066] The controlling the camera to capture an image of the area to be captured includes:
[0067] In a preset time period, the camera is controlled to capture an image of the area to be captured.
[0068] Solution 10. A smart device, comprising:
[0069] at least one processor;
[0070] and, a memory communicatively coupled to the at least one processor;
[0071] The memory stores a computer program, and when the computer program is executed by the at least one processor, the camera self-calibration method described in any one of Schemes 1 to 9 is implemented.
[0072] Solution 11. A computer-readable storage medium storing a plurality of program codes, wherein the program codes are suitable for being loaded and run by a processor to execute the camera self-calibration method described in any one of Solutions 1 to 9.
[0073] The above one or more technical solutions of the present application have at least one or more of the following beneficial effects:
[0074] In implementing the technical solution of the camera self-calibration method provided by the present application, the present application controls the camera to capture an image of the area to be captured, obtains the features of the key area in the image, and calibrates the preset standard parameters of the key area according to the features of the key area. Through the above configuration, the present application can realize the calibration of standard parameters according to the features of the key area of the image of the area to be captured. As long as the camera can capture the key area, the calibration can be realized, and effective calibration for small offsets of the camera can be realized. The calibration process is more convenient, no manual participation is required, and the manpower and time costs are lower. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] The disclosure of the present application will become easier to understand with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present application. Among them:
[0076] Figure 1 is a schematic flow chart of the main steps of a camera self-calibration method according to an embodiment of the present application;
[0077] Figure 2 It is a schematic flow chart of the main steps of a camera self-calibration method according to an implementation of an embodiment of the present application;
[0078] Figure 3 is an image of a region to be photographed according to an example of an embodiment of the present application;
[0079] Figure 4 is based on Figure 3 Schematic diagram of extracted key area features;
[0080] Figure 5 yes Figure 3 Schematic diagram of key areas of the image in ;
[0081] Figure 6 yes Figure 3 Schematic diagram of the standard boundary and current boundary of the image in;
[0082] Figure 7 yes Figure 3 A schematic diagram of converting a standard boundary in an image in to the current boundary;
[0083] Figure 8 It is a schematic diagram of the main structure of a smart device according to an embodiment of the present application.
[0084] Reference numerals:
[0085] 11: memory; 12: processor. DETAILED DESCRIPTION
[0086] Some embodiments of the present application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application and are not intended to limit the protection scope of the present application.
[0087] In the description of the present application, "module" and "processor" may include hardware, software or a combination of the two. A module may include hardware circuits, various suitable sensors, communication ports, memory, and may also include software parts, such as program code, or a combination of software and hardware. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware or a combination of the two. Computer-readable storage media include any suitable medium that can store program code, such as a disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, etc. The term "A and / or B" means all possible combinations of A and B, such as only A, only B or A and B. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B" and may include only A, only B or A and B. The singular terms "one" and "the" may also include plural forms.
[0088] The relevant user personal information that may be involved in the various embodiments of this application is strictly in accordance with the requirements of laws and regulations, following the principles of legality, legitimacy and necessity, based on the reasonable purposes of business scenarios, to process the personal information that users actively provide during the use of products / services or generated due to the use of products / services, as well as the personal information obtained with the user's authorization.
[0089] The user personal information processed by this application will vary depending on the specific product / service scenario, and shall be based on the specific scenario in which the user uses the product / service, and may involve the user's account information, device information, driving information, vehicle information or other related information. This application will treat the user's personal information and its processing with a high degree of diligence.
[0090] This application attaches great importance to the security of user personal information and has taken reasonable and feasible security protection measures that meet industry standards to protect user information and prevent personal information from being accessed, disclosed, used, modified, damaged or lost without authorization.
[0091] See attached Figure 1 , Figure 1 FIG. 1 is a flow chart of the main steps of a camera self-calibration method according to an embodiment of the present application. Figure 1 As shown, the camera self-calibration method in the embodiment of the present application mainly includes the following steps S101 to S103.
[0092] Step S101: Control the camera to capture an image of the area to be captured; wherein the camera is fixedly set relative to the area to be captured.
[0093] In this embodiment, the camera may be controlled to capture an image of the area to be captured.
[0094] In one embodiment, the camera may be a camera of a battery swap station. In order to ensure the correct operation of the battery swap algorithm, it is necessary to ensure that the key area required by the battery swap algorithm is always within the specified range. Since the key area and the camera have a relative invariance feature, if the key area is within the specified range, the battery swap algorithm can directly apply the key area to determine the camera's viewing angle. The camera's installation position, viewing angle, etc. can be confirmed in the early installation stage of the battery swap station, and installed as required when the station is landed, and parameter configuration is performed, such as the configuration of standard parameters of the key area.
[0095] In one implementation, the camera may also be a camera for other scenarios, such as a camera for scenarios where features such as a camera viewing angle and position need to be determined.
[0096] In one implementation, a static image (H, W, C) can be extracted from the main stream of the camera as the image of the area to be captured. H is the height parameter of the main stream resolution, W is the width parameter of the main stream resolution, and C is the channel parameter of the main stream. The image can be saved in jpg or png format.
[0097] In one implementation, the image in png format captured by the camera may be converted into an image in four-channel RGBA (Red, Green, Blue, Alpha) format as the final image of the area to be captured.
[0098] In one embodiment, the camera can be controlled to capture images of the area to be captured during a preset time period. The preset time period can be an idle time period of the battery swap station or a time period at night that does not affect the battery swap business.
[0099] Step S102: According to the image, the features of the key areas in the image are obtained.
[0100] In this embodiment, feature extraction may be performed on the image to obtain features of the key area.
[0101] In one implementation, the key region may be one or more. The set of features of the key region may be represented as Feature roi .
[0102] Step S103: calibrating the preset standard parameters of the key areas according to the characteristics of the key areas.
[0103] In this embodiment, the preset standard parameters can be calibrated according to the characteristics of the key areas. Among them, the standard parameters of the key areas are parameters used to determine the camera's viewing angle, position and other characteristics. That is, the standard parameters are the parameters of the key areas in the image of the area to be photographed taken by the camera during the original installation stage of the camera or assuming that the camera has not shifted. Since there is a relatively unchanged characteristic between the camera and the area to be photographed, when the camera is slightly offset, the camera can still capture the key area, and the standard parameters of the key areas can be calibrated according to the characteristics of the key areas in the image of the area to be photographed currently taken by the camera. For example, in the battery swap algorithm, the viewing angle of the camera of the battery swap station can be determined according to the standard parameters of the key areas.
[0104] In one implementation, the offset between the current parameters of the key area and the standard parameters may be determined according to the characteristics of the key area, and the standard parameters may be calibrated according to the offset.
[0105] Based on the method described in steps S101 to S103 above, the embodiment of the present application controls the camera to capture an image of the area to be captured, obtains the features of the key area in the image, and calibrates the preset standard parameters of the key area according to the features of the key area. Through the above configuration, the embodiment of the present application can realize the calibration of the standard parameters according to the features of the key area of the image of the area to be captured. As long as the camera can capture the key area, the calibration can be realized, and the effective calibration for the small offset of the camera can be realized. The calibration process is more convenient, no manual participation is required, and the manpower and time cost is lower.
[0106] Step S102 and step S103 are further described below.
[0107] In one implementation of the embodiment of the present application, step S102 includes the following steps S1021 to S1024:
[0108] Step S1021: Determine the image quality of the image and obtain an image that meets the conditions.
[0109] In this embodiment, it is determined whether the image quality of the image meets the conditions. Multiple parameters can be set to determine whether the image meets the conditions, such as basic image parameters (including brightness, contrast, etc.), image clarity, image integrity, etc., so as to eliminate the influence of objective factors on camera imaging, such as different weather, lighting, brightness, lens environment, objective factors inside and outside the area to be photographed, etc.
[0110] Step S1022: Determine whether there is a key area in the image that meets the conditions.
[0111] In this embodiment, it can be determined whether there is a key area in the image that meets the conditions, that is, whether the camera captures the key area.
[0112] Step S1023: When there is a key area in the image that meets the conditions, the features of the key area in the image are obtained.
[0113] In this implementation, if the camera captures the key area, the features of the key area in the image can be acquired.
[0114] Step S1024: When there is no key area in the image that meets the conditions, an alarm is issued to prompt manual calibration.
[0115] In this embodiment, if the camera fails to capture the key area, it means that the camera is offset at a large angle, and an alarm needs to be issued to prompt manual calibration or maintenance adjustment.
[0116] In one implementation of the embodiment of the present application, step S103 may further include the following steps S1031 and S1032:
[0117] Step S1031: According to the features of the key area, obtain the current parameters of the key area in the image.
[0118] In this implementation, the current parameters of the key area in the image may be extracted from the features of the key area.
[0119] In one implementation, the current parameter may be a current boundary of the key area in the image, and the standard parameter may be a standard boundary of the key area.
[0120] Step S1032: Calibrate the standard parameters according to the current parameters and the standard parameters.
[0121] In this implementation, step S1032 may further include the following steps S10321 and S10322:
[0122] Step S10321: According to the current parameters and the standard parameters, obtain the mapping relationship between the current parameters and the standard parameters.
[0123] In this implementation, a mapping relationship between the current parameters and the standard parameters may be acquired according to the current parameters and the standard parameters.
[0124] In one implementation, the mapping relationship may be an affine transformation matrix between the current boundary and the standard boundary. The affine transformation matrix may be determined according to the offset between the current boundary and the standard boundary.
[0125] Step S10322: According to the mapping relationship, the standard parameters are converted into current parameters to achieve calibration of the standard parameters.
[0126] In this implementation, the standard parameters may be converted to current parameters according to the mapping relationship, thereby achieving calibration of the standard parameters.
[0127] In one implementation, the offset between the current boundary and the standard boundary may be calculated, and an affine transformation matrix may be obtained based on the offset. The standard boundary may be converted to the current boundary based on the affine transformation matrix to achieve calibration of the standard boundary.
[0128] In one embodiment, the camera may be a camera installed at a battery swap station, and the battery swap station may be connected to a cloud server. The calibrated standard parameters may be uploaded to the cloud server, and the cloud server may overwrite the existing standard parameters with the calibrated standard parameters, and send the standard parameters to the battery swap station to run the battery swap algorithm.
[0129] In another embodiment, the mapping relationship between the standard parameters and the current parameters can be uploaded to a cloud server, which converts the standard parameters to the current parameters according to the mapping relationship, obtains the calibrated standard parameters, and uses the calibrated standard parameters to overwrite the existing standard parameters, and sends the standard parameters to the battery swap station to run the battery swap algorithm.
[0130] Combine the following Figures 3 to 7 In the example of a battery swap station camera, the main steps of the camera self-calibration method according to the present application are further explained.
[0131] like Figure 3 As shown, the camera of the battery swap station captures an image of the area to be photographed.
[0132] like Figure 4As shown in the image on the left, the image can be feature extracted to obtain the features of the key areas in the image, where label 1 is the feature of the key area and label 2 is the reasonable error range corresponding to the feature of the key area. Figure 4 As shown in the image on the right, Figure 4 The features in the left image define the range of the key area in the image. The range of the key area contains a certain tolerance range.
[0133] like Figure 5 As shown, the features of the key areas can be further extracted according to the range of the key areas. Figure 5 left), determine the current boundaries of the critical area (as shown in Figure 5 shown on the right).
[0134] like Figure 6 As shown, the offset can be calculated based on the current boundary and the standard boundary, where label 3 is the current boundary and label 4 is the standard boundary.
[0135] like Figure 7 As shown, an affine transformation matrix can be constructed based on the offset to convert the standard boundary to the current boundary.
[0136] like Figure 6 and Figure 7 As shown in the figure, assuming that the standard boundaries of the key area of the battery swap algorithm outside the battery swap station are L1 and L2, and the current boundaries of the key area in the image captured by the camera are L'1 and L'2, there is an offset δ between the standard boundaries and the current boundaries L1 ,δ L2 Similarly, the intersection point (x', y') of L'1 and L'2 also has an offset δ from the intersection point (x, y) of the standard position. x ,δ y . Through the affine transformation matrix It is possible to convert the standard boundary to the current boundary.
[0137] In one embodiment, please refer to the attached Figure 2 , Figure 2 FIG. 1 is a flow chart of the main steps of a camera self-calibration method according to an implementation of an embodiment of the present application. Figure 2 As shown, the camera self-calibration method may include the following steps S201 to S208:
[0138] Step S201: capturing images via a camera during a preset time period.
[0139] In this embodiment, the image of the area to be photographed can be captured by the camera within a preset time period.
[0140] Step S202: intercept the specified area and check whether the key features exist.
[0141] In this embodiment, a specified area may be captured in the image to determine whether a key feature (ie, a feature of the key area) exists.
[0142] Step S203: Determine whether a key feature is detected within the interception range; if so, execute step S204; if not, execute step S207.
[0143] Step S204: extract key features, calculate deviations from the standard position, and convert the standard position to the current image.
[0144] In this embodiment, key features in the image can be extracted, and the deviation value between the position of the key area in the image (i.e., the current boundary) and the standard position of the key area (i.e., the standard boundary) can be calculated based on the key features. If a deviation value exists, the standard position can be converted to the position of the key area in the image based on the mapping relationship.
[0145] Step S205: The calculated new standard position is stored as a parameter in the cloud server.
[0146] Step S206: The cloud server sends the new standard position to the battery swap station regularly to cover the original parameters, and then ends.
[0147] Step S207: It is determined that the camera offset is too large or there are other problems, and the camera is no longer usable.
[0148] Step S208: notify manual adjustment.
[0149] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art can understand that in order to achieve the effect of the present application, different steps do not have to be executed in such an order. They can be executed simultaneously (in parallel) or in other orders. These adjusted schemes are equivalent to the technical schemes described in this application, and therefore will also fall within the scope of protection of this application.
[0150] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above-mentioned embodiment of the present application can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code.
[0151] Another aspect of the present application also provides a computer-readable storage medium.
[0152] In an embodiment of a computer-readable storage medium according to the present application, the computer-readable storage medium may be configured to store a program for executing the camera self-calibration method of the above method embodiment, and the program may be loaded and run by a processor to implement the above camera self-calibration method. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The computer-readable storage medium may be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present application is a non-temporary computer-readable storage medium.
[0153] Another aspect of the present application also provides a smart device.
[0154] In an embodiment of an intelligent device according to the present application, the intelligent device may include at least one processor; and a memory connected to the at least one processor in communication; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method described in any of the above embodiments is implemented. Figure 8 , Figure 8 exemplarily shows that the memory 11 and the processor 12 are connected via a bus communication. The smart device described in this application may be, but is not limited to, a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR)\virtual reality (virtual reality, VR) device, etc., and the embodiments of this application are not limited to this.
[0155] So far, the technical solution of the present application has been described in conjunction with an embodiment shown in the accompanying drawings, but it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present application.
Claims
1. A camera self-calibration method, characterized in that: The method comprises: Controlling the camera to capture an image of the area to be captured; wherein the camera is fixedly arranged relative to the area to be captured; According to the image, obtaining features of a key area in the image; According to the characteristics of the key area, the preset standard parameters of the key area are calibrated.
2. The camera self-calibration method according to claim 1, characterized in that: The step of calibrating preset standard parameters of the key area according to the characteristics of the key area includes: According to the features of the key area, obtaining current parameters of the key area in the image; The standard parameter is calibrated according to the current parameter and the standard parameter.
3. The camera self-calibration method according to claim 2, characterized in that: The step of calibrating the standard parameter according to the current parameter and the standard parameter includes: According to the current parameters and the standard parameters, obtaining a mapping relationship between the current parameters and the standard parameters; According to the mapping relationship, the standard parameter is converted into the current parameter to achieve calibration of the standard parameter.
4. The camera self-calibration method according to claim 3, characterized in that: The current parameter includes a current boundary of the key area, the standard parameter includes a standard boundary of the key area, and the mapping relationship includes an affine transformation matrix between the current boundary and the standard boundary; The converting the standard parameter to the current parameter according to the mapping relationship includes: The standard boundary is converted to the current boundary according to the affine transformation matrix.
5. The camera self-calibration method according to claim 3 or 4, characterized in that: The camera is arranged at a battery swap station, and the battery swap station is communicatively connected with a cloud server; The converting the standard parameter to the current parameter according to the mapping relationship includes: According to the mapping relationship, the standard parameter is converted to the current parameter to obtain the calibrated standard parameter; The calibrated standard parameters are uploaded to the cloud server, so that the cloud server sends the calibrated standard parameters to the battery swap station to run the battery swap algorithm.
6. The camera self-calibration method according to claim 3 or 4, characterized in that: The camera is arranged at a battery swap station, and the battery swap station is communicatively connected with a cloud server; The converting the standard parameter to the current parameter according to the mapping relationship includes: The mapping relationship is uploaded to the cloud server so that the cloud server converts the standard parameters into the current parameters according to the mapping relationship to obtain calibrated standard parameters, and the calibrated standard parameters are sent to the battery swap station to run the battery swap algorithm.
7. The camera self-calibration method according to claim 1, characterized in that: The step of obtaining features of a key area in the image according to the image includes: Determining the image quality of the image and acquiring an image that meets the conditions; Determining whether the key area exists in the image that meets the conditions; When the key area exists in the image that meets the condition, the features of the key area in the image are acquired.
8. The camera self-calibration method according to claim 7, characterized in that: The acquiring, according to the image, features of a key area in the image further comprises: When the key area does not exist in the image that meets the conditions, an alarm is issued to prompt manual calibration.
9. The camera self-calibration method according to claim 1, characterized in that: The controlling the camera to capture an image of the area to be captured includes: In a preset time period, the camera is controlled to capture an image of the area to be captured.
10. A smart device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores a computer program, and when the computer program is executed by the at least one processor, the camera self-calibration method according to any one of claims 1 to 9 is implemented.