A camera calibration method, device, equipment and readable storage medium

By acquiring images captured by a camera, extracting bitmap images, and verifying the coordinate values ​​of the target calibration box, the problem of geometric model anomalies caused by the scanning rod influence of fixed-focus cameras was solved, thus improving the accuracy of camera calibration and character recognition.

CN116452676BActive Publication Date: 2025-11-21NANJING BAIGEZHENGLIU NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310351374.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-03
Publication Date
2025-11-21
Estimated Expiration
2043-04-03

AI Technical Summary

Technical Problem

Fixed-focus cameras cause abnormal geometric model creation due to the influence of the scanning rod, affecting the accuracy of optical character recognition.

Method used

By acquiring images captured by the camera, a bitmap is cropped to obtain the target calibration box. The coordinates of the target calibration box are then verified to be related to a preset calibration threshold. If the coordinates are greater than the preset threshold, the camera calibration data is determined.

Benefits of technology

It enables accurate calibration of the camera, improving the accuracy of character recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116452676B_ABST
    Figure CN116452676B_ABST
Patent Text Reader

Abstract

The application provides a camera calibration method, device and equipment and readable storage medium, and relates to the technical field of calibration. The method comprises the following steps: first, acquiring an image generated by a camera; then, acquiring a target calibration frame according to a dot matrix intercepted in the image; then, verifying the size relationship between the coordinate value of the target calibration frame and a preset calibration threshold value; and if the coordinate value of the target calibration frame is greater than the preset calibration threshold value, determining the calibration data of the camera based on the coordinate value of the target calibration frame. Through the application of the technical solution, the effectiveness of the calibration frame of the camera device can be quickly verified, and the accuracy and effectiveness of the calibration data of the camera are ensured, so that the accuracy of character recognition is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of calibration, in particular to a camera calibration method, device, equipment and readable storage medium. BACKGROUND

[0002] In the process of implementing image measurement and machine vision application, in order to determine the mutual relationship between the three-dimensional geometric position of a point on the surface of a space object and the corresponding point in the image, a geometric model of the camera needs to be established, and through the geometric model, the conversion of the three-dimensional coordinates of the space object to the two-dimensional coordinates of the object in the image is realized.

[0003] At present, in order to control the cost, the scanning camera on some electronic devices (such as a scanning pen) usually adopts a fixed-focus camera, and the field of view (FOV) of the camera will be affected by the scanning rod, which will easily lead to the abnormal creation of the geometric model of the camera, such as the abnormality of the calibration data source of the scanning camera, which will cause the error of the point taking of the corresponding calibration frame or the smallness of the calibration frame, thereby affecting the accuracy of the optical character recognition (OCR) for extracting and recognizing the content. SUMMARY

[0004] The present application provides a camera calibration method, device, equipment and readable storage medium, and the main purpose is to solve the technical problem that the geometric model of the camera of the electronic device is abnormally created due to the influence of the scanning rod, and the image recognition cannot be further realized.

[0005] The first aspect of the present application discloses a camera calibration method, which comprises:

[0006] obtaining an image photographed by a camera;

[0007] obtaining a target calibration frame according to a dot matrix intercepted in the image;

[0008] verifying the size relationship between the coordinate value of the target calibration frame and a preset calibration threshold value;

[0009] if the coordinate value of the target calibration frame is greater than the preset calibration threshold value, determining the calibration data of the camera based on the coordinate value of the target calibration frame

[0010] In some embodiments disclosed in the present application, the obtaining of the target calibration frame according to the dot matrix intercepted in the image specifically comprises:

[0011] obtaining the number of points included in the intercepted region in the image;

[0012] obtaining the point distribution format in the image according to the setting information of the point pixel size of the image;

[0013] determine the dot matrix based on the point quantity and the point distribution format according to the point distribution interval;

[0014] obtain a target calibration frame based on an outline of the dot matrix.

[0015] In some embodiments disclosed in the present application, the obtaining of the target calibration frame based on the outline of the dot matrix specifically comprises:

[0016] performing definition detection on surrounding point positions in the dot matrix;

[0017] filtering out surrounding point positions with definition less than a threshold value from the dot matrix;

[0018] obtaining the target calibration frame according to an outline of the filtered dot matrix.

[0019] In some embodiments disclosed in the present application, the method further comprises:

[0020] if the coordinate value of the target calibration frame is less than the preset calibration threshold value, identifying a threshold value parameter of the dot matrix less than the calibration threshold value, the threshold value parameter comprising at least one of length and width;

[0021] identifying a test result of basic element information of the camera based on the threshold value parameter.

[0022] In some embodiments disclosed in the present application, the basic element information of the camera comprises at least one of camera material size, camera definition, image recognition algorithm type, upper computer software name, bottom package storage location, debugging bridge instruction, assembly position, and assembly offset.

[0023] In some embodiments disclosed in the present application, before the obtaining of the target calibration frame according to the dot matrix intercepted from the image, the method further comprises:

[0024] identifying an abnormal projection in the image;

[0025] cropping an abnormal area containing the abnormal projection in the image;

[0026] The obtaining of the target calibration frame according to the dot matrix intercepted from the image comprises:

[0027] obtaining the target calibration frame according to the dot matrix intercepted from the image after the cropping of the abnormal area.

[0028] In some embodiments disclosed in the present application, the verification of the size relationship between the coordinate value of the target calibration frame and the preset calibration threshold value comprises:

[0029] obtaining model information of the camera;

[0030] verify a size relationship between the coordinate value of the target calibration frame and a preset calibration threshold value corresponding to the model information.

[0031] The second aspect embodiment of the present application discloses a camera calibration device, which comprises:

[0032] The acquisition module is configured to acquire an image captured by the camera, and acquire a target calibration frame according to a dot matrix intercepted from the image.

[0033] The verification module is configured to verify a size relationship between the coordinate value of the target calibration frame and a preset calibration threshold value.

[0034] The result module is configured to determine calibration data of the camera based on the coordinate value of the target calibration frame if the coordinate value of the target calibration frame is greater than the calibration threshold value.

[0035] The third aspect embodiment of the present application discloses an electronic device, which comprises at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect embodiment of the present application.

[0036] The fourth aspect embodiment of the present application provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to perform the method described in the first aspect embodiment of the present application.

[0037] In summary, according to the information verification method, device, equipment and readable storage medium provided by the present application, the calibration frame of the camera device can be quickly verified, the image generated by the camera is acquired, the target calibration frame is acquired according to the dot matrix intercepted from the image, the size relationship between the coordinate value of the target calibration frame and the preset calibration threshold value is verified, and the calibration data of the camera is determined based on the coordinate value of the target calibration frame if the coordinate value of the target calibration frame is greater than the preset calibration threshold value. In the technical solution of the present application, the coordinate value of the target calibration value used by the camera in the process of capturing the image is verified with the calibration threshold value in size, and the calibration data of the camera is quickly generated based on the verification result. By applying the technical solution of the present application, the effectiveness of the calibration frame of the camera device can be quickly verified, and the accuracy and effectiveness of the calibration data of the camera are ensured, thereby improving the accuracy of character recognition.

[0038] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0039] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application and are not intended to limit the application.

[0040] Figure 1 A flowchart of a camera calibration method provided by an embodiment of the present application;

[0041] Figure 2 A learning pen scanning calibration logic diagram provided by an embodiment of the present application;

[0042] Figure 3 A flowchart of verification according to a preset calibration threshold provided by an embodiment of the present application;

[0043] Figure 4 A structural diagram of a camera calibration device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0044] Embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings, in which the same or similar reference numerals identify the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the accompanying drawings are exemplary and are intended to explain the present application, and cannot be understood as limiting the present application.

[0045] To solve the technical problem that the camera cannot further realize image recognition due to the creation of a geometric model anomaly caused by the influence of the photographed image, the present application provides a camera calibration method, device, equipment and readable storage medium, which can accurately calibrate camera data, so that the camera can accurately recognize characters in the image.

[0046] Figure 1 A flowchart of a camera calibration method according to an exemplary embodiment is shown, as shown in Figure 1 , comprising the following steps.

[0047] Step 101, obtaining an image photographed by a camera.

[0048] The content of the technical solution of the present embodiment is to obtain calibration data of the camera, and the finally obtained calibration data is used to establish a geometric model of the camera. Through the geometric model, the conversion of the three-dimensional coordinates of the space object under the camera to the two-dimensional coordinates of the object in the image is realized, so that the recognition of the characters in the photographed image of the camera is realized. The scheme of the present embodiment is applied to obtain the image photographed by the camera before determining the calibration data. Therefore, the photographed image proposed in the present embodiment is applied to the extraction and / or verification of the calibration data, which is a pre-step of obtaining the final camera calibration data.

[0049] The camera can be a camera for image shooting to realize character recognition, for example, the camera is installed on a scanning pen, and the scanning pen camera is used for character scanning. Further, the camera is a fixed-focus camera.

[0050] In step 102, the target calibration frame is obtained according to the dot matrix intercepted in the image.

[0051] In the embodiment, the dot matrix image contained in the image shot by the camera is intercepted. The camera is used to obtain the imaging of an object, and can be further used to perform character recognition on the shot image. For the same size character at the same position, the shooting field of view of the camera affects the accuracy and efficiency of the final character recognition. In the embodiment, the field of view of the current camera shot picture is represented by the target calibration frame.

[0052] Based on the above, the embodiment further includes that in order to accurately obtain the target calibration frame of the camera, the dot matrix is shot by the camera, and the image containing the dot matrix is generated by intercepting the shot image. The dot matrix is a corresponding image generated by points according to a certain arrangement combination. In the dot matrix proposed in the embodiment, it is a graph generated by one or more points according to a certain arrangement array. Based on the regularity of the arrangement of the points in the dot matrix, the image can be quickly intercepted, the field of view of the camera is recognized, and the target calibration frame is delimited according to the dot matrix in the embodiment.

[0053] In addition, the embodiment further includes the step of recognizing the edge line of the dot matrix. In the process of recognizing the dot matrix displayed in the image, if the edge line of the dot matrix is included in the current image, the relative position of the camera and the dot matrix needs to be adjusted, so that the dot matrix in the image generated by the camera should not be occupied by other irrelevant images. That is, the shooting of the dot matrix is maximized under the current configuration of the camera.

[0054] In the process of obtaining the target calibration frame according to the intercepted dot matrix, the dot matrix can be a chart, and the chart is an image generated by arranging a certain point in a certain array. Further, the shooting position of the camera is fixed, the chart dot matrix moves relative to the camera at a certain rate, the camera shoots the chart at a certain moment to generate an image, and the target calibration frame is generated by intercepting the image. The content contained in the calibration frame is that the characters shot in the calibration frame of the camera can be accurately recognized as computer-recognizable character symbols after the camera establishes a geometric coordinate.

[0055] In step 103, the size relationship between the coordinate value of the target calibration frame and the preset calibration threshold value is verified.

[0056] After the target calibration frame of the camera is acquired, a coordinate system is established based on the entire range of the generated image for the acquired target calibration frame to obtain specific coordinate values of the target calibration frame in the coordinate system. Wherein, for the size of the specific coordinate values, the embodiment proposes to compare the coordinate values with the preset calibration threshold value to determine the size relationship between the coordinate values and the preset calibration threshold value. Through the verification of the coordinate values of the target calibration frame and the preset calibration threshold value, the effectiveness of the coordinate values of the target calibration frame under the current image can be verified based on the preset calibration threshold value to determine whether the camera can shoot an image meeting the character recognition requirement under the current condition.

[0057] Wherein, the preset of the size of the preset calibration threshold value is preset by the minimum field of view image for shooting and performing text recognition under the current camera. The preset calibration threshold value can enable the minimum range image presented in the field of view of the camera to be accurately recognized. At the same time, for different cameras, the calibration threshold value is also affected by the position of the camera field of view. For example, in the field of view of the fisheye camera, the final imaging needs to be located in the center of the camera field of view to reduce the probability of error after subsequent image correction. It also needs to verify the value position of the target calibration value by limiting the calibration threshold value. Therefore, the calculation of the calibration frame of the camera also needs to consider the coordinate value position of the calibration frame.

[0058] Step 104, if the coordinate value of the target calibration frame is greater than the preset calibration threshold value, the calibration data of the camera is determined based on the coordinate value of the target calibration frame.

[0059] If the coordinate value of the target calibration frame is greater than the preset calibration threshold value, it is determined that the target calibration frame meets the requirement of the preset calibration threshold value, and then the calibration data of the camera can be determined based on the coordinate value of the target calibration frame, wherein the determined calibration data is used for calculating the geometric model of the camera.

[0060] When the coordinate value of the target calibration frame is greater than the preset calibration threshold value, it can be confirmed that the image that can be shot under the current effective field of view of the camera meets the subsequent requirements, and the content contained in the image can also achieve the image requirement of character recognition. The calibration data of the camera can be further determined based on the coordinate value of the target calibration frame defined by the current effective field of view.

[0061] In the embodiment, a camera calibration method is disclosed. The method includes: acquiring an image generated by a camera shooting; acquiring a target calibration frame according to a dot matrix captured in the image; verifying a size relationship between a coordinate value of the target calibration frame and a preset calibration threshold value; and determining calibration data of the camera based on the coordinate value of the target calibration frame, if the coordinate value of the target calibration frame is greater than the preset calibration threshold value. In the embodiment, a dot matrix is shot by a camera, a target calibration frame is generated based on a position of the dot matrix in an image, a size relationship between a coordinate value of the target calibration frame and a preset threshold value is compared, and whether the target calibration frame of the image shot by the camera is valid is verified according to a comparison result. Calibration data of the camera is calculated according to a verification result, thereby establishing a geometric model of the camera and realizing accurate calibration of the camera. In an optional embodiment, in a specific process of acquiring the target calibration frame according to the dot matrix captured in the image, the camera shoots the dot matrix, and after an image is generated, the generated image does not completely include the dot matrix due to influences of some obstructions in an actual shooting process of the camera. Therefore, a part containing the dot matrix needs to be captured from the generated image, and the target calibration frame is acquired according to a camera field of view capable of shooting the dot matrix. The specific process includes: acquiring a number of points included in a captured region in the image; acquiring a point distribution format in the image according to setting information of a pixel size of the points; determining the dot matrix according to the number of points and the point distribution format based on a point distribution interval; and acquiring the target calibration frame based on an outline of the dot matrix.

[0062] After the image generated by the dot matrix shot by the camera is acquired, the points shot in the image are counted, the number of points is calculated, and a distribution format of the points in the dot matrix is acquired. The size of an outline value of the dot matrix included in the image is determined based on setting information of a pixel size of each point in the dot matrix and a distribution interval between the points, and the target calibration frame of the camera is further determined through the outline of the dot matrix.

[0063] In the embodiment, the target calibration frame of the camera is further confirmed by detailed processing of the dot matrix contained in the image. Further, the embodiment mainly performs point position recognition on the dot matrix in the captured image, calculates the specific pixels of the dot matrix by recognizing the number of point positions, the pixel size of the point positions, the distribution format of the point positions, and the distribution interval between the point positions in the image, and realizes the calculation of the target calibration frame. It should be noted that the overall arrangement of the dot matrix is regular, and the calculation of the target calibration frame can be realized based on the regular dot matrix. The number of point positions is the number of point positions included in the dot matrix captured in the image. The pixel size of the point position is the pixel value size occupied by each point position in the dot matrix, that is, the size of each point position. The distribution format of the point position is the distribution relationship between the point positions in the dot matrix, such as vertical and horizontal distribution, or 45-degree inclined distribution. The distribution interval between the point positions is the interval distance between two adjacent point positions. In a dot matrix, there can be multiple distribution intervals between a point position and an adjacent point position.

[0064] The target calibration frame is obtained by dividing the contour of the dot matrix contained in the image. Meanwhile, in the process of obtaining the target calibration frame according to the contour of the dot matrix, the shape of the dot matrix contour needs to be determined according to the shape of the target calibration frame, and the shape of the target calibration frame needs to be different according to the type of the camera. Meanwhile, in the process of obtaining the target calibration frame from the dot matrix in the image, the same shape as the target calibration frame is maximally intercepted as the contour of the dot matrix.

[0065] For example, the finally determined target calibration frame needs to be a rectangle, so the contour of the dot matrix divided in the process is a rectangle. At this time, the dot matrix in the image is in an irregular shape, so the rectangle needs to be maximally intercepted as a rectangle from the dot matrix image.

[0066] In the above embodiment, the target calibration frame is obtained by recognizing the dot matrix captured in the image, that is, the target calibration frame is obtained by capturing the dot matrix by the camera, recognizing the dot matrix, and calculating the specific parameters of the target calibration frame by using the recognition result. The above scheme can accurately divide the target calibration frame based on the shooting effect.

[0067] In an optional embodiment of the present application, the target calibration frame is obtained based on the contour of the dot matrix, specifically including: performing clarity detection on the surrounding point positions in the dot matrix; filtering out the surrounding point positions with a clarity less than a threshold from the dot matrix; and obtaining the target calibration frame according to the contour of the filtered dot matrix.

[0068] In the process of acquiring the target calibration frame based on the dot matrix contour, the clarity of the surrounding points in the dot matrix contour is detected after the dot matrix is intercepted. For example, when the camera is a fisheye camera, the generated dot matrix may appear clear in the center and blurred around. In order to accurately identify the dot matrix, the clarity of the surrounding points in the contour of the intercepted dot matrix needs to be detected. When the clarity is less than the threshold, in order to ensure the accuracy of the target calibration frame, the surrounding points with insufficient clarity need to be filtered. The surrounding points in the contour refer to the points included in the preset pixel length in the contour of the dot matrix, or refer to the preset number of points in the contour of the dot matrix.

[0069] The clarity of the surrounding points in the dot matrix in the photographed image is detected, and the points with insufficient clarity are filtered, so that the dot matrix contained in the filtered dot matrix can be identified, the probability of error in the identification process is reduced, and the accuracy in the process of drawing the target calibration frame is improved.

[0070] In an optional embodiment of the present application, if the coordinate value of the target calibration frame is less than the preset calibration threshold, a threshold parameter of the dot matrix less than the calibration threshold is identified, and the threshold parameter includes at least one of length and width; and the inspection result of the basic element information of the camera is identified based on the threshold parameter.

[0071] In the process of comparing the coordinate value of the target calibration frame with the preset calibration threshold, the size relationship between the coordinate value of the target calibration frame and the preset calibration threshold is compared. After the target calibration frame is identified, a coordinate system is established with a certain specific position of the camera image as the origin, and the coordinate value of the target calibration frame is calculated according to the position of the target calibration frame in the coordinate system. The parameter value of the target calibration frame can be obtained through the coordinate value of the target calibration frame, and the parameter value of the target calibration frame is compared with the preset calibration threshold. When the target calibration frame is a rectangle, the parameter value of the target calibration frame includes the length and / or width of the target calibration frame, and the length and width of the target calibration frame can be obtained according to the position of the target calibration frame in the coordinate system, and the length and width of the target calibration frame are compared with the preset calibration threshold. In the comparison process, the length of the target calibration frame can be compared with the length of the preset calibration threshold, or the width of the target calibration frame can be compared with the width of the preset calibration threshold, or the length and width of the target calibration frame can be compared with the length and width of the preset calibration threshold, respectively, to compare the coordinate value of the target calibration frame with the preset calibration threshold, and further to obtain the verification result of the basic element information of the camera according to the comparison result.

[0072] Meanwhile, by using the threshold parameter to identify the dot matrix in the photographed image, the basic element information of the camera can be further verified. The camera can realize the shooting of the image meeting the demand through the joint configuration result of multiple aspects.

[0073] Especially for the fixed-focus camera, since the camera cannot realize adaptive adjustment of the focal length, it is extremely important to accurately configure the basic elements of the camera. Under the accurate configuration of the basic elements, the camera can realize the shooting of the image meeting the demand. According to the comparison result of the preset threshold parameter and the coordinate value of the calibration threshold, the related identification of the basic element information of the camera can be realized.

[0074] In an optional embodiment of the present application, the basic element information of the camera includes at least one of the material size of the camera, the definition of the camera, the type of image recognition algorithm, the name of the host computer software, the storage location of the bottom package, the debugging bridge instruction, the assembly position, and the assembly offset.

[0075] Before the camera realizes the shooting of the image, a series of related configurations are needed, wherein the hardware configuration includes the material size of the camera, the definition of the camera, the assembly position, and the assembly offset, and the software configuration includes the type of image recognition algorithm, the name of the host computer software, the storage location of the bottom package, and the debugging bridge instruction.

[0076] For the hardware configuration of the camera, in order to realize the protection of the camera lens, the camera is not exposed outside the shooting device during the actual installation design of the camera. In this case, especially for the fixed-focus camera, the actual shooting effect of the camera is limited by the installation position. Therefore, during the installation of the camera, a series of configurations and configuration verifications need to be performed on the hardware configurations such as the material size of the camera, the definition of the camera, the assembly position, and the assembly offset. The material is a related component that affects the installation position of the camera in the camera device where the camera is installed, for example, the control chip of the camera.

[0077] Meanwhile, after the hardware configuration meets certain requirements, related software configurations need to be performed, including the executed image recognition algorithm, the connection with the host computer software, the storage of the bottom package, and the execution of the debugging bridge instruction. Based on the above-mentioned related software configurations, the type of image recognition algorithm, the name of the host computer software, the storage location of the bottom package, and the debugging bridge instruction can be configured and verified as the software basic element information of the camera.

[0078] It is further disclosed in the embodiment that one or more of the above-mentioned basic element information can be confirmed as abnormal through the comparison result of the coordinate value of the target calibration frame and the preset calibration threshold.

[0079] For example, when a scanning pen product is scanned, the shooting field of view obtained by the working of the scanning pen camera is affected by the camera material size, camera resolution, image recognition algorithm type, host software name, bottom package storage location, debugging bridge instruction, assembly position, and assembly offset. The difference between the coordinate value of the target calibration frame and the calibration threshold value can be determined. The embodiment can realize accurate positioning of one or more of the above basic element information.

[0080] In an optional embodiment of the present application, before obtaining the target calibration frame according to the dot matrix image captured from the image, the method further comprises: identifying an abnormal projection in the image; cropping an abnormal area in the image containing the abnormal projection; accordingly, the step 102 of obtaining the target calibration frame according to the dot matrix image captured from the image can comprise: obtaining the target calibration frame according to the dot matrix image captured from the image after cropping the abnormal area.

[0081] Due to the limitation of the camera installation position, especially for a fixed-focus camera, the shooting field of view can be affected by the projection of other accessories of the shooting device. During the image recognition process, the projection of other accessories can be regarded as an abnormal projection for the dot matrix image captured by the camera. When it is determined that the captured image includes an abnormal projection, the related area containing the abnormal projection can be cropped, and the target calibration frame can be obtained based on the dot matrix image included in the cropped image.

[0082] When applied to a scanning pen, the scanning pen is provided with a scanning rod. When the fixed-focus camera of the scanning pen captures an image, the scanning rod can also be captured in the image. At this time, the scanning rod generates an abnormal projection in the image, which affects the subsequent image recognition. In order to avoid the abnormality in the subsequent target calibration frame division process, the abnormal area containing the abnormal projection in the image is cropped, and the target calibration frame is further obtained according to the intermediate image of the scanning rod.

[0083] The embodiment is aimed at identifying the abnormal projection in the image generated by the camera during the shooting process, dividing the image part containing the abnormal projection into an abnormal area, further cropping the abnormal image, and further obtaining the dot matrix image and the target calibration frame. By using the scheme of the embodiment, the influence of the abnormal projection in the image caused by the camera itself or external factors can be excluded during the image acquisition and target calibration frame acquisition process, thereby ensuring the accuracy of the image dot matrix.

[0084] In a possible embodiment of the present application, the size relationship between the coordinate value of the target calibration frame and the preset calibration threshold value is verified, including: obtaining the model information of the camera; and verifying the size relationship between the coordinate value of the target calibration frame and the preset calibration threshold value corresponding to the model information.

[0085] In the process of verifying the size relationship between the coordinate value of the target calibration frame and the preset calibration threshold value, the present embodiment further discloses that the preset calibration threshold value corresponding to the current camera model information is extracted. In different camera devices, different models of cameras can be used. Therefore, for different models of cameras, the size of the preset calibration threshold value is adjusted to adapt to the change of the camera model, so that the verification result between the coordinate value of the current target calibration frame and the preset calibration threshold value can adapt to the calibration of the current camera.

[0086] In an optional embodiment of the present application, if the coordinate value of the target calibration frame is less than the preset calibration threshold value, the camera is controlled to take a dot matrix image again, and the target calibration value is obtained based on the dot matrix image contained in the current taken image. The size relationship between the coordinate value of the target calibration frame and the preset calibration threshold value is verified. When the coordinate value of the target calibration frame is still less than the preset calibration threshold value after the above process is repeated for a preset number of times, the camera is calibrated as abnormal.

[0087] For example, when the camera is installed in a learning pen, the calibration process is as shown in Figure 2 , Figure 2 The disclosed learning pen scanning calibration logic diagram confirms that the camera and the scanning rod are assembled after receiving the scanning calibration signal. According to the current defined font and the algorithm implemented to draw the frame, the artificial judgment of the frame is performed. The current frame is used as the target calibration frame in the above embodiment. After it is judged that the frame is normal, the current frame data is written into the camera product. The calibration data of the camera is generated according to the current frame data, and a geometric model is generated. The camera scans the corresponding exercises under the current geometric model to generate Camera images. During the scanning process, a plurality of continuous frames of Camera images are generated. Each frame of image is cropped to obtain the image in the effective field of view. The images in the effective fields of view of the plurality of frames of images are spliced and subjected to OCR recognition. The recognized exercises are compared with the exercise library, and the required exercise content is output.

[0088] For the process of responding to the scanning calibration signal to the artificial judgment in the above Figure 2 , Figure 3 a flowchart for verifying according to the preset calibration threshold value is further disclosed, as shown in Figure 3As shown, the learning pen is connected to the computer and moves to the designated position to capture the dot matrix to start calibration in response to the scanning calibration signal. The learning pen test software acquires the calibration coordinate value according to the image captured by the camera of the learning pen, the calibration coordinate value is the target calibration value of the learning pen, and it is determined whether the current calibration coordinate value is greater than the threshold value, the threshold value is the preset calibration threshold value, if the calibration coordinate value is greater than the threshold value, the calibration value of the current learning pen is normal, otherwise, the learning pen re-executes the preset calibration threshold value verification.

[0089] Based on the implementation of the method described above, the embodiment provides a camera calibration device, as shown in the figure, Figure 1 The device includes: Figure 4 The device includes:

[0090] The acquisition module 21 is configured to acquire an image captured by a camera, and acquire a target calibration frame according to a dot matrix intercepted from the image.

[0091] The verification module 22 is configured to verify a size relationship between a coordinate value of the target calibration frame and a preset calibration threshold value.

[0092] The result module 23 is configured to, if the coordinate value of the target calibration frame is greater than the calibration threshold value, determine calibration data of the camera based on the coordinate value of the target calibration frame.

[0093] In some embodiments of the present application, the acquisition module 21 is specifically configured to acquire a number of dot positions included in an intercepted region in the image, acquire a dot position distribution format of the image according to setting information of a dot position pixel size of the image, determine the dot matrix based on the number of dot positions and the dot position distribution format according to a dot position distribution interval, and acquire the target calibration frame based on an outline of the dot matrix.

[0094] In some embodiments of the present application, the acquisition module 21 is specifically further configured to perform clarity detection on surrounding dot positions in the dot matrix, filter out surrounding dot positions with clarity less than a threshold value from the dot matrix, and acquire the target calibration frame according to an outline of the filtered dot matrix.

[0095] In some embodiments of the present application, the verification module 22 is further configured to, if the coordinate value of the target calibration frame is less than the preset calibration threshold value, identify a threshold value parameter of the dot matrix less than the calibration threshold value, the threshold value parameter including at least one of length and width, and identify a test result of basic element information of the camera based on the threshold value parameter.

[0096] In some embodiments of the present application, the basic element information of the camera includes at least one of the following: camera material size, camera resolution, image recognition algorithm type, host software name, bottom package storage location, debugging bridge instruction, assembly location, and assembly offset.

[0097] In some embodiments of the present application, the verification module 22 is further configured to identify an abnormal projection in the image; and crop an abnormal area containing the abnormal projection in the image. The acquisition module 21 is configured to acquire a target calibration frame according to a dot matrix image captured from the image after the abnormal area is cropped.

[0098] In some embodiments of the present application, the verification module 22 is configured to acquire model information of the camera; and verify a size relationship between a coordinate value of the target calibration frame and a preset calibration threshold value corresponding to the model information.

[0099] The present embodiment also provides an electronic device for implementing the camera calibration method, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the camera calibration method.

[0100] Embodiments of the present application also provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the camera calibration method described in the above embodiments of the present application.

[0101] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "exemplary embodiment", "example", "specific example" or "some examples" means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the exemplary description of the above terms does not necessarily mean the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0102] Any process or method descriptions in flow charts or described elsewhere herein can be understood as representing one or more steps in a set of steps performed in support of one or more functions or processes described herein, and that the representation can be understood as an example of a set of steps that can be performed in support of one or more functions or processes described herein. The sets of steps can be performed in the order described, in a different order than described, or conceptually at the same time. Further, an item recited in the claims as one item can be implemented as more than one item. Further, any operations described herein can be combined or integrated with other operations.

[0103] The logic and / or steps represented in the flowcharts and / or described herein, for example, can be considered as a sequence of instructions to implement logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, apparatus, or device, such as a computer-based system, a system including a processing module, or other systems that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can be a computer- readable storage medium or a computer-readable signal medium. The computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include the following: an electrical connection having one or more wires (conductor control method), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium can even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example, via the optical scanner of a device or device, then compiled, interpreted, or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.

[0104] It should be understood that each part of the embodiments of the present application can be realized by hardware, software, firmware, or a combination thereof. In the above-described embodiments, a plurality of steps or methods can be realized by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if realized by hardware, and as in another embodiment, any one or a combination of the following technologies known in the art can be used: discrete logic circuitry having logic gates for implementing logic functions on data signals, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), and the like.

[0105] Those skilled in the art of the present technology can understand that all or part of the steps carried out by the above-described embodiment methods can be completed by programs instructing related hardware, and the programs can be stored in a computer-readable storage medium. When the programs are executed, they include one or a combination of the steps of the method embodiments.

[0106] In addition, each of the functional units in the various embodiments of the present application can be integrated in one processing module, or each unit can exist physically separately, or two or more units can be integrated in one module. The integrated module can be implemented in the form of hardware or in the form of a software function module. When the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0107] Although the embodiments of the present application have been shown and described above, it should be understood by those skilled in the art that the above embodiments are exemplary and cannot be construed as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.

Claims

1. A camera calibration method, characterized in that, include: Acquire images captured by a camera; wherein the images are obtained by the camera capturing a pixelated image; Based on the raster image cropped from the image, a target bounding box is obtained; wherein, the raster image is a corresponding image generated by arranging points according to a certain combination. Verify the relationship between the coordinates of the target calibration box and the preset calibration threshold; wherein the preset calibration threshold is preset based on the minimum field of view image captured and used for text recognition under the current camera. If the coordinate value of the target calibration box is greater than the preset calibration threshold, then the calibration data of the camera is determined based on the coordinate value of the target calibration box. Specifically, obtaining the target bounding box based on the raster image cropped from the image includes: Obtain the number of points included in the cropped area of ​​the image; Based on the pixel size setting information of the image, obtain the pixel distribution format in the image; The dot matrix is ​​determined based on the dot distribution interval, the number of dots, and the dot distribution format. The target bounding box is obtained based on the contour of the dot matrix image; The verification of the relationship between the coordinates of the target calibration box and the preset calibration threshold includes: The parameter values ​​of the target calibration box are obtained by using the coordinate values ​​of the target calibration box, and the parameter values ​​of the target calibration box are compared with the preset calibration threshold value; wherein, when the target calibration box is rectangular, the parameter values ​​of the target calibration box include the length and / or width of the target calibration box.

2. The method according to claim 1, characterized in that, The step of obtaining the target bounding box based on the contour of the dot matrix image specifically includes: Sharpness detection is performed on the surrounding points in the dot matrix image; Filter out surrounding points with a resolution less than the threshold from the bitmap; The target bounding box is obtained based on the outline of the filtered dot matrix.

3. The method according to claim 1, characterized in that, The method further includes: If the coordinate value of the target calibration box is less than the preset calibration threshold, then the threshold parameter of the dot matrix is ​​identified as being less than the calibration threshold. The threshold parameter includes at least one of length and width. The detection result of the basic element information of the camera is identified based on the threshold parameter.

4. The method according to claim 3, characterized in that, The basic information of the camera includes at least one of the following: camera material size, camera resolution, image recognition algorithm type, host computer software name, base package storage location, debugging bridge command, assembly location, and assembly offset.

5. The method according to claim 1, characterized in that, Before obtaining the target bounding box based on the raster image cropped from the image, the method further includes: Identify abnormal projections in the image; Cropping the abnormal regions in the image that contain anomalous projections; The step of obtaining the target bounding box based on the raster image cropped from the image includes: The target bounding box is obtained from the raster image cropped from the image after cropping the abnormal region.

6. The method according to any one of claims 1-5, characterized in that, The verification of the relationship between the coordinates of the target calibration box and the preset calibration threshold specifically includes: Obtain the model information of the camera; Verify the relationship between the coordinate values ​​of the target calibration box and the preset calibration threshold value corresponding to the model information.

7. A camera calibration device, characterized in that, include: The acquisition module is used to acquire images captured by the camera; A target bounding box is obtained based on the bitmap cropped from the image; wherein, the image is obtained by the camera capturing the bitmap, and the bitmap is a corresponding image generated by the arrangement and combination of points in a certain way; The verification module is used to verify the relationship between the coordinate values ​​of the target calibration box and the preset calibration threshold value; wherein, the preset calibration threshold value is preset based on the minimum field of view image captured and used for text recognition under the current camera. The result module is used to determine the calibration data of the camera based on the coordinates of the target calibration box if the coordinates of the target calibration box are greater than the calibration threshold value. Specifically, obtaining the target calibration box based on the bitmap cropped from the image includes: Obtain the number of points included in the cropped area of ​​the image; Based on the pixel size setting information of the image, obtain the pixel distribution format in the image; The dot matrix is ​​determined based on the dot distribution interval, the number of dots, and the dot distribution format. The target bounding box is obtained based on the contour of the dot matrix image; The verification of the relationship between the coordinates of the target calibration box and the preset calibration threshold includes: The parameter values ​​of the target calibration box are obtained by using the coordinate values ​​of the target calibration box, and the parameter values ​​of the target calibration box are compared with the preset calibration threshold value; wherein, when the target calibration box is rectangular, the parameter values ​​of the target calibration box include the length and / or width of the target calibration box.

8. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Calibration guiding method and camera device

    CN113052910A