Image calibration method and device with guide frame, electronic equipment and storage medium

By using guide boxes during image calibration to guide users to take chessboard pictures, and combined with the filtering and clarity calculation of video frames, the method of automatically obtaining high-quality chessboard pictures is realized, solving the poor quality of chessboard videos taken by non-professional personnel The problem of calibration improves the accuracy and efficiency of calibration.

CN119399296APending Publication Date: 2025-02-07GUANGDONG OPTO MEDIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411672485.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

There is a lack of a method in the prior art that can guide non-professional personnel to take pictures of chessboard pictures, and automatically filter chessboard pictures with high clarity and automatically obtain high-quality and effective chessboard pictures while taking pictures.

Method used

By determining the position and number of guide boxes and displaying the guide boxes during shooting, the user is guided to take the chessboard picture correctly. At the same time, read the video frame and determine whether the complete chessboard picture is included, determine whether the chessboard picture is in the guide box, calculate the clarity of the chessboard picture in the guide box, and output a clear image list.

Benefits of technology

It improves the efficiency and accuracy of the calibration process, reduces the dependence on professionals and the consumption of computing resources, and ensures that non-professionals can also complete high-quality camera calibration work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399296A_ABST
    Figure CN119399296A_ABST
Patent Text Reader

Abstract

The invention provides an image calibration method and device with a guide frame, electronic equipment and a storage medium, which are applied to the technical field of image processing, and can guide a user to correctly shoot a chessboard chart and ensure the accuracy of the shooting angle and range by determining the position and number of the guide frame and displaying the guide frame in the shooting process. Effective video frames can be screened out by reading the video frames and judging whether the video frames contain complete chessboard diagrams or not; further ensuring that the position and the size of the chessboard diagram meet requirements by judging whether the chessboard diagram is in the guide frame or not; by calculating the definition of the checkerboard diagram in the guide frame and outputting an image list according to the definition, a high-quality calibration image can be obtained. Therefore, according to the method, the calibration accuracy is improved, the operation process is simplified, and non-professionals can complete high-quality camera calibration work.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image calibration method, device, electronic device and storage medium with a guide frame. Background Art

[0002] In the image measurement process and machine vision applications, in order to determine the relationship between the three-dimensional geometric position of a point on the surface of a spatial object and its corresponding point in the image, a geometric model of camera imaging, namely, camera parameters, must be established. The accuracy of the camera parameter calibration results and the stability of the algorithm directly affect the accuracy of the results produced by the camera work. Chessboard calibration is a common method for camera calibration. By binarizing the clear camera image and finding quadrilaterals (black chessboard areas) to find candidate points for chessboard corners, only quadrilaterals that meet specific size standards are retained and organized in a regular grid structure. Through a specific process algorithm, the camera's internal and external parameters and distortion coefficients are calculated and then used in various machine vision tasks.

[0003] The accuracy of checkerboard calibration depends on the clarity of the image, the size of the checkerboard, and the appropriate angle. The traditional calibration process is usually: fix the checkerboard image and shoot videos from different angles with a handheld camera. After obtaining the checkerboard video, multiple high-definition checkerboard images at different angles are screened manually or automatically. The above method has obvious limitations. First, poorly shot videos may cause calibration failure. The size and angle of the checkerboard during shooting are key factors for accurate calibration. For the former, too large or too small will lead to inaccurate calibration. If the checkerboard is too large, it may cause corner point detection failure. If the checkerboard is too small, it will not be able to record edge distortion and make it impossible to infer a complete correction model. For the latter, if the angle of the calibration image is too small, the image has no depth information or lacks sufficient depth information. The grasp of the above two parameters requires experienced staff. The traditional calibration process can ask experienced professionals to shoot when calibrating the camera. However, the effect of this method is limited to when the professionals are near the camera. When the camera to be calibrated is located in another position or multiple cameras in different positions need to be calibrated in a short period of time, the quality of the video obtained by non-professionals is difficult to guarantee, which may cause inaccurate calibration. Secondly, manual image screening may cause image screening errors due to visual fatigue. Finally, most methods of automatic image screening include edge detection, frequency domain filtering, etc., which will cause a lot of computational burden on computer hardware.

[0004] Therefore, the prior art lacks a method that can guide non-professionals to photograph chessboard images, and automatically select chessboard images with high definition while photographing the chessboard images, so as to automatically obtain high-quality and effective chessboard images. Summary of the invention

[0005] In view of the above-mentioned shortcomings of the prior art, the image calibration method, device, electronic device and storage medium with a guide frame provided in the present application are applied to the field of image processing technology, and have the advantages of improving the efficiency and accuracy of the calibration process, reducing dependence on professionals and consumption of computing resources.

[0006] In a first aspect, a method for calibrating an image with a guide frame is provided, the method comprising: S1: Determine the position and number of guide frames; S2: during the process of shooting the calibration video, displaying the guide frames in sequence according to the positions and numbers of the guide frames to guide the user to shoot; S3: reading the captured video frame of the calibration video, and determining whether the video frame contains a complete chessboard image; S4: Acquire a video frame containing a complete chessboard image, and determine whether the chessboard image is within the guide frame; S5: Calculate the clarity of the chessboard image within the guide frame, and output a clear image list according to the clarity of the chessboard image.

[0007] The present application proposes an image calibration method with a guide frame, which can guide users to correctly shoot chessboard images by determining the position and number of guide frames and displaying them during shooting, ensuring the accuracy of shooting angles and ranges; by reading video frames and judging whether they contain complete chessboard images, valid video frames can be screened out; by judging whether the chessboard images are in the guide frame, the position and size of the chessboard images can be further ensured to meet the requirements; by calculating the clarity of the chessboard images in the guide frame and outputting the image list according to the clarity, high-quality calibration images can be obtained. Therefore, the technical solution solves the problem of poor quality of chessboard videos shot by non-professionals through the setting and display of the guide frame. The guide frame can help users correctly grasp the shooting angle and range, ensuring that a chessboard image of appropriate size and angle is obtained. At the same time, by screening, judging and calculating the clarity of video frames, high-quality and effective chessboard images can be automatically obtained, avoiding the errors that may be caused by manual screening, and reducing the calculation burden of the computer. This method not only improves the accuracy of calibration, but also simplifies the operation process, so that non-professionals can also complete high-quality camera calibration work.

[0008] Further, in step S1, each of the guide frames includes a large frame and a small frame, and the position of the guide frame includes a position without an inclination angle and a position with an inclination angle.

[0009] The present application proposes an image calibration method with a guide frame, which sets a guide frame including a large frame and a small frame, and provides two position options: no tilt angle and tilt angle. This technical solution effectively solves the problem of the position and shape of the guide frame, and can better guide users to shoot chessboard images, improving shooting quality and efficiency. The combination of large and small frames can provide users with clearer shooting range guidance, and different angle positions can meet the shooting needs in different scenes, thereby obtaining more diverse chessboard image samples, which is conducive to improving the accuracy and comprehensiveness of camera calibration.

[0010] Further, step S3 includes: S31: reading the video frame of the calibration video, and splitting the video frame into left and right views; S32: performing grayscale processing on the left and right views respectively; S33: using a sliding window method to perform corner point detection on the left and right views after the grayscale processing, and selecting the point with the largest response value in the corner point detection as a candidate point; S34: Determine whether the candidate point conforms to the distribution pattern of chessboard corner points. If so, the video frame corresponding to the candidate point contains a complete chessboard pattern. If not, the video frame corresponding to the candidate point does not contain a complete chessboard pattern, and the video frame that does not contain a complete chessboard pattern is discarded.

[0011] This application proposes an image calibration method with a guide frame. This scheme realizes the automatic detection and screening of the complete chessboard image in the video frame through four steps: video frame splitting, grayscale processing, corner point detection and regularity judgment. The accuracy of binocular camera calibration can be guaranteed by processing the left and right views separately; the data is simplified by grayscale processing while retaining edge features; the sliding window method is used for corner point detection to accurately locate feature points; finally, the integrity of the chessboard image is ensured by judging the distribution law of corner points, thereby improving the calibration accuracy.

[0012] Furthermore, step S3 also includes: S35: Calculate the coordinates of 54 corner points of the left and right views in the video frame containing the complete chessboard image, so as to determine whether the chessboard image is within the guide frame.

[0013] The present application proposes an image calibration method with a guide frame, which provides an accurate data basis for the subsequent judgment of whether the chessboard image is within the guide frame by calculating the coordinates of the 54 corner points of the left and right views in the video frame containing the complete chessboard image. This method can accurately locate the position of the chessboard image in the video frame, thereby effectively solving the technical problem of accurately calculating the coordinates of the corner points of the chessboard image to determine whether the chessboard image is within the guide frame. By obtaining a large number of accurate corner point coordinates, this method can more accurately evaluate the position and posture of the chessboard image, thereby improving the accuracy and reliability of subsequent judgments.

[0014] Further, step S4 includes: S41: for the guide frame set at a position without an inclination angle, determining whether the length and width of the outer frame of the chessboard image in the current video frame are greater than the length and width of the small frame of the guide frame, and smaller than the length and width of the large frame of the guide frame; S42: Determine whether the coordinates of the corner points of the left view of the chessboard image in the current video frame are within the large frame and outside the small frame; S43: If the length and width of the bounding box of the chessboard image in the current video frame are greater than the length and width of the small guide box, and smaller than the length and width of the large guide box; and the coordinates of the corner points of the left view are within the large box and outside the small box, it is determined that the current chessboard image is within the guide box.

[0015] Furthermore, step S4 also includes: S44: for the guide frame set at an inclined angle, determine whether the length and width of the outer frame of the chessboard image in the current video frame are greater than the length and width of the small frame of the guide frame, and smaller than the length and width of the large frame of the guide frame; S45: determining whether the coordinates of the corner points of the left view and the right view of the chessboard image in the current video frame are within the large frame and outside the small frame; S46: If the length and width of the bounding box of the chessboard image in the current video frame are greater than the length and width of the small guide frame, and smaller than the length and width of the large guide frame; the corner point coordinates of the left view and the corner point coordinates of the right view are within the large frame and outside the small frame, it is determined that the current chessboard image is within the guide frame.

[0016] Further, step S5 includes: S51: Obtaining coordinates of 54 corner points of the left and right views in the guide frame; S52: Cut out a k*k image sub-region with the corner point coordinates as the center; S53: Divide the image into four regions according to the dark regions and the bright regions in the sub-regions, including two dark regions and two bright regions; S54: Counting the distances between the darkest pixel and the brightest pixel in the same row or column at the boundaries between the regions, calculating the sum of the distances to obtain the chessboard image clarity, and outputting a clear image list according to the chessboard image clarity.

[0017] In a second aspect, an image calibration device with a guide frame includes: Set guide frame module: used to determine the position and number of guide frames; A guide frame display module: used to display the guide frames in sequence according to the positions and numbers of the guide frames during the process of shooting the calibration video, so as to guide the user to shoot; The first judgment module is used to read the video frame of the calibration video and judge whether the video frame contains a complete chessboard image; The second judgment module is used to obtain a video frame containing a complete chessboard image and judge whether the chessboard image is within the guide frame; Output module: used for calculating the clarity of the chessboard image in the guide frame, and outputting a clear image list according to the clarity of the chessboard image.

[0018] In a third aspect, the present application provides an electronic device, including a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in any of the above methods are executed.

[0019] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in any of the above methods are executed.

[0020] Beneficial effects: The image calibration, device, electronic device and storage medium with guide frame proposed in the present application can guide users to correctly shoot chessboard images by determining the position and number of guide frames and displaying them during shooting, thereby ensuring the accuracy of shooting angle and range; by reading video frames and judging whether they contain complete chessboard images, valid video frames can be screened out; by judging whether the chessboard images are in the guide frame, the position and size of the chessboard images can be further ensured to meet the requirements; by calculating the clarity of the chessboard images in the guide frame and outputting the image list according to the clarity, high-quality calibration images can be obtained. Therefore, the technical solution solves the problem of poor quality of chessboard videos shot by non-professionals through the setting and display of the guide frame. The guide frame can help users correctly grasp the shooting angle and range, and ensure that a chessboard image of appropriate size and angle is obtained. At the same time, by screening, judging and calculating the clarity of video frames, high-quality and effective chessboard images can be automatically obtained, avoiding the errors that may be caused by manual screening, and reducing the calculation burden of the computer. This method not only improves the accuracy of calibration, but also simplifies the operation process, so that non-professionals can also complete high-quality camera calibration work. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is a flow chart of an image calibration method with a guide frame proposed in this application.

[0022] Figure 2 This is a structural diagram of an image calibration device with a guide frame proposed in this application.

[0023] Figure 3 A schematic diagram of the structure of the electronic device provided in this application.

[0024] Figure 4 It is a video frame with a guide frame in this application.

[0025] Description of reference numerals: 201, guide frame setting module; 202, guide frame display module; 203, first judgment module; 204, second judgment module; 205, output module; 301, processor; 302, memory; 303, communication bus; 3, electronic device. DETAILED DESCRIPTION

[0026] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application usually described and marked in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0027] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first, second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0028] The following disclosure provides many different implementation methods or examples for achieving the purpose of the present invention, which solves the problem in the prior art that there is a lack of a method that can guide non-professionals to take pictures of chessboard pictures, and while taking pictures of chessboard pictures, automatically screen chessboard pictures with high definition, and automatically obtain high-quality and effective chessboard pictures.

[0029] Please refer to Figure 1 In a first aspect, a method for calibrating an image with a guide frame is provided, the method comprising: S1: Determine the position and number of guide frames; S2: during the process of shooting the calibration video, guide frames are displayed in sequence according to the positions and numbers of the guide frames to guide the user to shoot; S3: Read the video frame of the captured calibration video, and determine whether the video frame contains a complete chessboard image; S4: obtaining a video frame containing a complete chessboard image, and determining whether the chessboard image is within the guide frame; S5: Calculate the clarity of the chessboard image within the guide frame, and output a clear image list according to the clarity of the chessboard image.

[0030] Among them, in step S1, since the calibration process, the chessboard image is too large or too small, which will have an adverse effect on the calibration, so this application uses a guide frame to guide the user to limit the distance of the camera shooting the calibration plate. Among them, the background of the calibration plate is white, and the black squares are arranged in a cross-spaced manner. In addition, if the angle between the camera and the calibration plate is too small, the image may lack sufficient depth information, so this guidance method regulates the angle between the camera and the calibration plate.

[0031] The position of the guide frame should be displayed in the center of the camera display screen, including two guide frames: one without an inclination angle and one with an inclination angle. The number of guide frames is set in advance by the technician according to the calibration requirements. In one embodiment of the present application, 9 guide frames can be set.

[0032] The chessboard images were photographed from different positions. Experimental verification showed that this method selected two types of images, one with tilt angle and one without tilt angle, for calibration. In this algorithm, the position of the guide frame was selected according to the needs, including 7 images at different positions and 2 images with a tilt angle of 30°. Therefore, the number of guide frames can be 9, which can cover different shooting angles and ranges to ensure comprehensive calibration data.

[0033] Among them, in step S2, during the process of shooting the calibration video, the guide frames are displayed in sequence according to the determined positions and quantities. Each guide frame is displayed for a predetermined time during the shooting process until all guide frames are displayed. In this way, the user can be guided in real time to adjust the shooting angle and range to improve the shooting quality. For the convenience of guidance, only the left eye guide frame is displayed in the binocular camera. The guide frame includes a large frame and a small frame. The purpose is to limit the position of the chessboard. When shooting, the user needs to put the chessboard in the large frame and the attached Figure 4 The left and right pictures show an example of a guide frame without a tilt angle and an example of a guide frame with a tilt angle, respectively.

[0034] Among them, in step S3, the video frame of the captured calibration video is read, and it is determined whether the video frame contains a complete chessboard diagram, so as to quickly filter out the video frames containing valid information, reduce the amount of data for subsequent processing, and speed up the calculation efficiency.

[0035] In step S4, a video frame containing a complete chessboard pattern is obtained, and it is determined whether the chessboard pattern is within the guide frame, thereby ensuring that the position and size of the chessboard pattern meet preset requirements.

[0036] In step S5, the clarity of the chessboard image in the guide frame is calculated, and a clear image list is output according to the clarity of the chessboard image, so that a final high-quality calibration image can be obtained.

[0037] Among them, the guide frame refers to the framework used to guide the user to correctly shoot the chessboard pattern during the shooting process, which can be implemented by a virtual frame displayed on the shooting interface. The judgment of the complete chessboard pattern refers to judging whether it contains a complete chessboard pattern by reading the video frame and analyzing the image information therein, which can be implemented by an image processing algorithm. The judgment of the chessboard pattern within the guide frame refers to judging whether it is within the guide frame by analyzing the position and size of the chessboard pattern in the video frame, which can be implemented by a coordinate comparison method. Clarity calculation and output refers to calculating the clarity of the image and outputting a clear image list, which can be implemented by image processing technology.

[0038] The implementation principle of this scheme is as follows: First, multiple guide frames are virtually displayed on the display screen of the shooting device, and these guide frames cover different shooting angles and ranges. During the shooting process, the user adjusts the position and angle of the chessboard image according to the display of the guide frame. After the shooting is completed, the system automatically reads the video frame and uses the image processing algorithm to detect the integrity of the chessboard image in each frame. For the frame containing the complete chessboard image, it is further determined whether it is located in the guide frame. Finally, the system calculates the clarity of the chessboard image in these frames and outputs a list of images sorted by clarity. In this way, even non-professionals can shoot high-quality chessboard images that meet the calibration requirements.

[0039] Further, in step S1, each guide frame includes a large frame and a small frame, and the position of the guide frame includes a position without an inclination angle and a position with an inclination angle.

[0040] Among them, the guide frame consists of a large frame and a small frame. This double-frame structure can guide users to shoot more accurately and ensure that the chessboard image is within the appropriate range. The setting of the position without tilt angle and the position with tilt angle enables the guide frame to adapt to the needs of different shooting angles, increasing the flexibility and diversity of shooting. By setting a guide frame including a large frame and a small frame, and providing two position options of no tilt angle and tilt angle, the technical solution effectively solves the problem of the position and shape of the guide frame. This design can better guide users to shoot chessboard images and improve shooting quality and efficiency. The combination of large and small frames can provide users with clearer shooting range guidance, and different angle positions can meet the shooting needs in different scenes, thereby obtaining more diverse chessboard image samples, which is conducive to improving the accuracy and comprehensiveness of camera calibration.

[0041] Specifically, the design of the guide frame can be implemented in a variety of ways. For example, the large frame and the small frame can be rectangular in shape. The size ratio between the large frame and the small frame can be adjusted according to actual needs to accommodate chessboards of different sizes. The non-tilted angle position usually refers to the guide frame being parallel to the edge of the screen, while the tilted angle position can be set to 30° to meet the needs of different shooting scenes.

[0042] Further, step S3 includes: S31: Read the video frame of the captured calibration video, and split the video frame into left and right views; S32: grayscale processing is performed on the left and right views respectively; S33: using a sliding window method to perform corner point detection on the left and right views after grayscale processing, and selecting the point with the largest response value in the corner point detection as a candidate point; S34: Determine whether the candidate point conforms to the distribution pattern of chessboard corner points. If so, the video frame corresponding to the candidate point contains a complete chessboard pattern. If not, the video frame corresponding to the candidate point does not contain a complete chessboard pattern, and the video frame that does not contain a complete chessboard pattern is discarded.

[0043] The scheme realizes the automatic detection and screening of the complete chessboard in the video frame through four steps: video frame splitting, grayscale processing, corner point detection and regularity judgment. The accuracy of binocular camera calibration can be guaranteed by processing the left and right views separately; the data can be simplified by grayscale processing while retaining edge features; the sliding window method can be used for corner point detection to accurately locate feature points; and finally, the integrity of the chessboard can be ensured by judging whether the corner points are distributed regularly, thereby improving the calibration accuracy.

[0044] Specifically, the technical solution of the present application can be implemented in the following ways: First, read the video frame of the calibration video and split it into left and right views. This step provides basic data for subsequent processing and is suitable for the calibration of binocular cameras. The splitting method can be performed according to the resolution of the video frame and the camera parameters. For example, for a video frame with a resolution of 1920x1080, it can be equally divided into two left and right views of 960x1080. Secondly, grayscale processing is performed on the left and right views respectively. Grayscale processing can use a variety of algorithms, such as weighted average method or maximum method. Then, the sliding window method is used to detect corner points of the left and right views after grayscale processing. The size of the sliding window can be adjusted according to the size of the chessboard. By comparing the corner point response values ​​in different windows, the point with the largest response value is selected as the candidate point. This method can effectively locate the feature points of the chessboard and improve the accuracy of detection. Finally, it is determined whether the candidate point conforms to the distribution law of the corner points of the chessboard. The corner points of the chessboard usually present a regular grid distribution. It can be determined whether it conforms to this law by calculating the distance and angle between adjacent candidate points.

[0045] This solution can automatically process a large number of video frames and quickly filter out frames containing complete chessboard patterns. Compared with traditional manual screening methods, this automated processing not only improves efficiency but also reduces the possibility of human error. At the same time, by processing the left and right views separately, this method is particularly suitable for the calibration of binocular cameras, which can ensure that the obtained chessboard pattern is complete in both the left and right views, thereby improving the accuracy of calibration.

[0046] Furthermore, step S3 also includes: S35: Calculate the coordinates of 54 corner points of the left and right views in the video frame containing the complete chessboard image, so as to determine whether the chessboard image is within the guide frame.

[0047] The step of calculating the coordinates of 54 corner points of the left and right views in the video frame containing the complete chessboard pattern can be completed in multiple implementation methods. For example, the video frame can be processed by a computer vision algorithm to extract the edge information of the chessboard pattern; then a corner point detection algorithm, such as Harris corner point detection or Shi-Tomasi corner point detection, is used to obtain candidate points; then, the corner points that meet the chessboard structure are screened out by geometric feature analysis, and finally 54 accurate corner point coordinates are obtained.

[0048] Further, step S4 includes: S41: for the guide frame set at a position without an inclination angle, determining whether the length and width of the outer frame of the chessboard image in the current video frame are greater than the length and width of the small frame of the guide frame, and smaller than the length and width of the large frame of the guide frame; S42: Determine whether the coordinates of the corner points of the left view of the chessboard image in the current video frame are within the large frame and outside the small frame; S43: If the length and width of the bounding box of the chessboard image in the current video frame are greater than the length and width of the small guide box, and smaller than the length and width of the large guide box; and the coordinates of the corner points of the left view are within the large box and outside the small box, it is determined that the current chessboard image is within the guide box.

[0049] Among them, for the guide frame without tilt angle, by comparing the length and width of the chessboard image's external frame with the length and width of the small frame and the large frame of the guide frame, the chessboard image with the length and width of the external frame greater than the length and width of the small frame and less than the length and width of the large frame is screened, and the coordinates of the corner points of the chessboard image must be located inside the large frame and outside the small frame at the same time, in order to accurately determine that the chessboard image is completely within the guide frame, so that a more standard and consistent chessboard image can be obtained. Compared with the traditional manual adjustment shooting method, the technical solution of the present application has higher calibration accuracy and convenient operation. It effectively solves the technical problem that it is difficult for non-professionals to accurately control the shooting position of the chessboard image through the guide frame and multiple judgment mechanisms.

[0050] Furthermore, step S4 also includes: S44: for the guide frame set at an inclined angle, determine whether the length and width of the outer frame of the chessboard image in the current video frame are greater than the length and width of the small frame of the guide frame, and smaller than the length and width of the large frame of the guide frame; S45: determining whether the coordinates of the corner points of the left view and the right view of the chessboard image in the current video frame are within the large frame and outside the small frame; S46: If the length and width of the bounding box of the chessboard image in the current video frame are greater than the length and width of the small guide box, and smaller than the length and width of the large guide box; the corner point coordinates of the left view and the corner point coordinates of the right view are within the large box and outside the small box, it is determined that the current chessboard image is within the guide box.

[0051] Among them, for the guide frame with a tilted angle, first determine whether the length and width of the circumscribed frame of the chessboard image in the current video frame is greater than the length and width of the small frame of the guide frame, and less than the length and width of the large frame of the guide frame. This step can be achieved by image processing algorithms, such as edge detection or contour extraction, to determine the circumscribed rectangle of the chessboard image and calculate its length and width; secondly, determine whether the corner point coordinates of the left view of the chessboard image in the current video frame and the corner point coordinates of the right view are within the large frame and outside the small frame. This step can be achieved by corner point detection and coordinate judgment. Compared with the previous method for judging the guide frame without tilt angle, the judgment of the corner point coordinates of the right view is added. This is because in the case of a tilt angle, the projection of the chessboard image may be deformed, and the judgment based on the left view alone may not be accurate enough. By considering the corner point coordinates of the left and right views at the same time, the position of the chessboard image can be more comprehensively evaluated and the accuracy of the judgment can be improved.

[0052] Further, step S5 includes: S51: Obtain the coordinates of 54 corner points of the left and right views in the guide frame; S52: Cut out a k*k image sub-region with the corner point coordinate as the center; S53: Divide the image into four regions according to the dark regions and the bright regions in the sub-regions, including two dark regions and two bright regions; S54: Counting the distances between the darkest pixel and the brightest pixel in the same row or column at the boundaries between the various regions, and calculating the sum of the distances to obtain the chessboard image clarity, and outputting a clear image list according to the chessboard image clarity.

[0053] Among them, by obtaining the coordinates of the corner points, the position of the chessboard pattern in the image can be accurately located, which solves the problem of inaccurate chessboard pattern position that may occur in traditional methods. By cutting out sub-regions and dividing the regions, it is possible to focus on the key features of the chessboard pattern, that is, the boundaries of the black and white grids. This localized processing method not only improves the calculation efficiency, but also effectively avoids interference from other parts of the image on the clarity assessment. Among them, a k*k image sub-region is cut out with the corner point coordinates as the center. The k value here can be adjusted according to actual needs, and usually a 5x5 or 7x7 sub-region can be selected.

[0054] By counting the pixel distance at the junction of dark and bright areas, the sharpness of the chessboard edge is directly reflected, thereby accurately measuring the clarity of the image. Compared with the traditional method based on overall image features, this localized evaluation method is more accurate and requires less calculation. During the calculation process, if the sum of the calculated distances is less than the preset threshold, the view is considered clear and can participate in the next calculation. If the sum of the distances is greater than or equal to the preset threshold, the video frame with the guide frame is re-acquired, and the video frame with the complete chessboard image is selected for clarity calculation until 9 clear calibration video frames are obtained, and a clear image list is output, and the camera internal parameters can be obtained through the calibration algorithm.

[0055] Traditional methods usually rely on global image features, such as edge detection or frequency domain analysis, which are often complex to calculate, have high hardware requirements, and are easily disturbed by non-chessboard areas in the image. In contrast, the method based on local features proposed in this application is simple to calculate, has low hardware requirements, and can more accurately reflect the clarity of the chessboard image. In addition, traditional methods often require manual participation to determine the clarity threshold, which not only increases the workload, but also may introduce subjective errors. The method of this application completely avoids human intervention through automatic calculation and sorting, greatly improving efficiency and consistency. Therefore, the technical solution proposed in this application not only solves the problem of automatically screening chessboard images with high clarity, but also has obvious improvements in computational efficiency, adaptability and degree of automation, providing a powerful tool for improving the efficiency and accuracy of chessboard mapping.

[0056] Please refer to Figure 2 , an image calibration device with a guide frame, the device comprising: A guide frame setting module 201 is used to determine the position and number of guide frames; The guide frame display module 202 is used to display the guide frames in sequence according to the positions and numbers of the guide frames during the process of shooting the calibration video, so as to guide the user to shoot; The first judgment module 203 is used to read the video frame of the captured calibration video and judge whether the video frame contains a complete chessboard image; The second judgment module 204 is used to obtain a video frame containing a complete chessboard image and judge whether the chessboard image is within the guide frame; Output module 205: used to calculate the clarity of the chessboard image in the guide frame, and output a clear image list according to the clarity of the chessboard image.

[0057] Among them, the guide frame setting module 201 determines the position and number of the guide frames to provide a clear reference for shooting. The guide frame display module 202 displays the guide frames in sequence during the shooting process to ensure that the user can shoot at the appropriate position. The first judgment module 203 reads the video frame and determines whether it contains a complete chessboard image, and selects valid frames. The second judgment module 204 further determines whether the chessboard image is within the guide frame to ensure the suitability of the chessboard image position. The output module 205 calculates the clarity of the chessboard image in the guide frame and outputs a clear image list.

[0058] During the implementation process, each module cooperates with each other through data transmission and logical judgment. For example, the output of the guide frame setting module 201 will directly affect the display content of the guide frame display module 202, ensuring that the user can shoot at the correct position. The judgment result of the first judgment module 203 will affect the judgment of the second judgment module 204. Only when the first judgment module 203 confirms that there is a complete chessboard image, the second judgment module 204 will perform position judgment. This design makes the calibration process more efficient and accurate.

[0059] In a specific embodiment, the guide frame setting module 201 can set the guide frame to a plurality of different sizes to adapt to different shooting environments. The number of guide frames can be adjusted according to actual needs. For example, in an environment with poor light, the number of guide frames can be increased to improve the success rate of shooting. The guide frame display module 202 can use a dynamic display method to provide real-time feedback on the user's shooting situation. The first judgment module 203 and the second judgment module 204 use advanced image processing algorithms to ensure that the existence of the chessboard pattern can be accurately identified. The output module 205 outputs a list of clear images based on the result of the clarity calculation.

[0060] This image calibration device with a guide frame effectively solves the technical problems of non-professionals when shooting chessboard images through the setting and display of the guide frame, ensuring the suitability of the shooting angle and range. At the same time, the setting of multiple judgment modules automates the image screening process, reduces the error rate of manual screening, and reduces the burden on computer hardware.

[0061] Compared with the prior art, the technical solution of the present application significantly improves the success rate of non-professionals in photographing chessboard images through the setting of the guide frame and the automatic screening mechanism, and ensures the accuracy of the calibration results. In the prior art, the control of the shooting quality depends entirely on manual experience, while the solution of the present application overcomes this limitation through structured guidance and automated judgment process.

[0062] Please refer to Figure 3 , Figure 3 A structural schematic diagram of an electronic device provided in an embodiment of the present application, the present application provides an electronic device 3, including: a processor 301 and a memory 302, the processor 301 and the memory 302 are interconnected and communicate with each other through a communication bus 303 and / or other forms of connection mechanisms (not marked), the memory 302 stores computer-readable instructions executable by the processor 301, when the electronic device is running, the processor 301 executes the computer-readable instructions to execute the method in any optional implementation of the above embodiment to achieve the following functions: reading video frames in a calibration video; judging the completeness of the video frames frame by frame, and obtaining complete image frames according to the completeness; calculating the clarity and unilateral blur of each complete image frame; screening out the first complete image frame corresponding to the unilateral blur less than the first preset value, and sorting the remaining second complete image frames according to the clarity, the complete image frames including the first complete image frame and the second complete image frame.

[0063] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method in any optional implementation of the above embodiment is executed to achieve the following functions: reading video frames in a calibration video; judging the integrity of the video frames frame by frame, and obtaining complete image frames based on the completeness; calculating the clarity and unilateral blur of each complete image frame; filtering out the first complete image frame corresponding to the unilateral blur less than a first preset value, and sorting the remaining second complete image frames according to the clarity, the complete image frames including the first complete image frame and the second complete image frame.

[0064] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0065] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0066] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0067] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

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

Claims

1. A method for image calibration with a guide frame, characterized in that: The method comprises: S1: Determine the position and number of guide frames; S2: during the process of shooting the calibration video, displaying the guide frames in sequence according to the positions and numbers of the guide frames to guide the user to shoot; S3: reading the captured video frame of the calibration video, and determining whether the video frame contains a complete chessboard image; S4: Acquire a video frame containing a complete chessboard image, and determine whether the chessboard image is within the guide frame; S5: Calculate the clarity of the chessboard image within the guide frame, and output a clear image list according to the clarity of the chessboard image.

2. The image calibration method with a guide frame according to claim 1, characterized in that: In step S1, each of the guide frames includes a large frame and a small frame, and the position of the guide frame includes a position without an inclination angle and a position with an inclination angle.

3. The image calibration method with a guide frame according to claim 1, characterized in that: Step S3 includes: S31: reading the video frame of the calibration video, and splitting the video frame into left and right views; S32: performing grayscale processing on the left and right views respectively; S33: using a sliding window method to perform corner point detection on the left and right views after the grayscale processing, and selecting the point with the largest response value in the corner point detection as a candidate point; S34: Determine whether the candidate point conforms to the distribution pattern of chessboard corner points. If so, the video frame corresponding to the candidate point contains a complete chessboard pattern. If not, the video frame corresponding to the candidate point does not contain a complete chessboard pattern, and the video frame that does not contain a complete chessboard pattern is discarded.

4. The image calibration method with a guide frame according to claim 3, characterized in that: Step S3 also includes: S35: Calculate the coordinates of 54 corner points of the left and right views in the video frame containing the complete chessboard image, so as to determine whether the chessboard image is within the guide frame.

5. The image calibration method with a guide frame according to claim 4, characterized in that: Step S4 includes: S41: for the guide frame set at a position without an inclination angle, determining whether the length and width of the outer frame of the chessboard image in the current video frame are greater than the length and width of the small frame of the guide frame, and smaller than the length and width of the large frame of the guide frame; S42: Determine whether the coordinates of the corner points of the left view of the chessboard image in the current video frame are within the large frame and outside the small frame; S43: If the length and width of the bounding box of the chessboard image in the current video frame are greater than the length and width of the small guide box, and smaller than the length and width of the large guide box; and the coordinates of the corner points of the left view are within the large box and outside the small box, it is determined that the current chessboard image is within the guide box.

6. The image calibration method with a guide frame according to claim 5, characterized in that: Step S4 also includes: S44: for the guide frame set at an inclined angle, determine whether the length and width of the outer frame of the chessboard image in the current video frame are greater than the length and width of the small frame of the guide frame, and smaller than the length and width of the large frame of the guide frame; S45: determining whether the coordinates of the corner points of the left view and the right view of the chessboard image in the current video frame are within the large frame and outside the small frame; S46: If the length and width of the bounding box of the chessboard image in the current video frame are greater than the length and width of the small guide frame, and smaller than the length and width of the large guide frame; the corner point coordinates of the left view and the corner point coordinates of the right view are within the large frame and outside the small frame, it is determined that the current chessboard image is within the guide frame.

7. The image calibration method with a guide frame according to claim 1, characterized in that: Step S5 includes: S51: Obtaining coordinates of 54 corner points of the left and right views in the guide frame; S52: Cut out a k*k image sub-region with the corner point coordinates as the center; S53: Divide the image into four regions according to the dark regions and the bright regions in the sub-regions, including two dark regions and two bright regions; S54: Counting the distances between the darkest pixel and the brightest pixel in the same row or column at the boundaries between the regions, calculating the sum of the distances to obtain the chessboard image clarity, and outputting a clear image list according to the chessboard image clarity.

8. An image calibration device with a guide frame, characterized in that: The device comprises: Set guide frame module: used to determine the position and number of guide frames; A guide frame display module: used to display the guide frames in sequence according to the positions and numbers of the guide frames during the process of shooting the calibration video, so as to guide the user to shoot; The first judgment module is used to read the video frame of the calibration video and judge whether the video frame contains a complete chessboard image; The second judgment module is used to obtain a video frame containing a complete chessboard image and judge whether the chessboard image is within the guide frame; Output module: used for calculating the clarity of the chessboard image in the guide frame, and outputting a clear image list according to the clarity of the chessboard image.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the method according to any one of claims 1 to 7 are executed.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are executed.