Camera mount offset test method, apparatus, electronic device, and readable medium
By adjusting the distance between the camera bracket and the test card, image sequences are acquired and an angle offset curve is generated, which solves the problem that existing technologies cannot detect accidental or periodic offsets of the camera bracket and improves the accuracy of the test.
Patent Information
- Application Number
- CN202411801294.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-12-09
AI Technical Summary
Existing camera bracket offset testing methods cannot detect accidental or periodic offsets of the bracket between two image acquisitions when images are acquired at randomly selected time points, resulting in poor test accuracy.
By adjusting the distance between the camera bracket and the white-background black rectangular test card, image sequences of the test card are acquired, camera image resolution and lens field of view information are obtained, pixel coordinates of the test reference point are extracted, and an angle offset curve is generated to display the offset change.
It improves the accuracy of camera bracket offset testing, captures accidental or periodic bracket offsets, reduces the impact of accidental or periodic offsets on the test, and improves the accuracy of the test.
Smart Images

Figure CN119618061B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of this disclosure relate to the field of computer technology, and more specifically to a method, apparatus, electronic device, and readable medium for testing camera bracket offset. Background Technology
[0002] With the continuous development of machine vision and image processing technologies, cameras have been widely used in many fields, and camera brackets play a crucial role in camera installation and fixation. Camera bracket offset testing is a technique for detecting the offset of camera brackets. Currently, the common method for offset testing of camera brackets is as follows: during the test period, images of a reference object are captured using a camera fixed to the bracket at randomly selected time points. These images are then compared with the initial image of the same reference object captured at the start of the test to determine whether the bracket has shifted.
[0003] However, when using the above method to perform offset tests on camera brackets, the following technical problems often occur:
[0004] During the test period, images of the reference object are captured by a camera fixed on a bracket at randomly selected time points. The captured images are then compared with the initial images of the same reference object captured at the start of the test to determine whether the bracket has shifted. If the bracket shifts between the two image captures and returns to its initial position just before the random time point capture, the shift between the two image captures cannot be detected, resulting in poor accuracy of the camera bracket shift test.
[0005] The information disclosed in this background section is only intended to enhance the understanding of the background of the inventive concept, and therefore may contain information that does not form prior art known to those skilled in the art. Summary of the Invention
[0006] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0007] Some embodiments of this disclosure provide methods, apparatus, electronic devices, and computer-readable media for testing camera bracket offset to address one or more of the technical problems mentioned in the background section above.
[0008] In a first aspect, some embodiments of this disclosure provide a camera bracket offset testing method, which includes: adjusting the distance between a camera bracket fixing a camera inside a preset test lightbox and a white-background black rectangular test card as a test distance; acquiring a sequence of test card images of the white-background black rectangular test card within a preset test time period using a camera fixed on the camera bracket; obtaining camera image resolution information and lens field of view information of the camera; obtaining preset reference point pixel coordinate information; for each test card image in the test card image sequence, performing test reference point extraction processing on the test card image to obtain test reference point pixel coordinate information corresponding to the test card image; generating a sequence of test reference point pixel coordinate information based on the generated test reference point pixel coordinate information; generating an angle offset curve corresponding to the camera bracket based on the sequence of test reference point pixel coordinate information, the camera image resolution information, the lens field of view information, and the preset reference point pixel coordinate information; and displaying the generated angle offset curve on a preset camera bracket offset test page.
[0009] Secondly, some embodiments of this disclosure provide a camera bracket offset testing device, the device comprising: an adjustment unit configured to adjust the distance between a camera bracket fixing a camera inside a preset test lightbox and a white-background black rectangular test card as a test distance; an acquisition unit configured to acquire a sequence of test card images of the white-background black rectangular test card within a preset test time period using a camera fixed on the camera bracket; a first acquisition unit configured to acquire camera image resolution information and lens field of view information of the camera; a second acquisition unit configured to acquire pixel coordinate information of a preset reference point; and an extraction processing unit configured to process the test card image sequence. For each test card image in the test card image, a test reference point extraction process is performed to obtain the corresponding test reference point pixel coordinate information; the first generation unit is configured to generate a sequence of test reference point pixel coordinate information based on the generated test reference point pixel coordinate information; the second generation unit is configured to generate an angle offset curve corresponding to the camera bracket based on the test reference point pixel coordinate information sequence, the camera image resolution information, the lens field of view information, and the preset reference point pixel coordinate information; the display unit is configured to display the generated angle offset curve on a preset camera bracket offset test page.
[0010] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.
[0011] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
[0012] The above-described embodiments of this disclosure have the following beneficial effects: the camera bracket offset testing method of some embodiments of this disclosure improves the accuracy of camera bracket offset testing. Specifically, the reason for the poor accuracy of camera bracket offset testing is that during the test period, by randomly selecting time points, images of the reference object are captured using a camera fixed on the bracket, and the captured images are compared with the initial image of the same reference object captured at the beginning of the test to determine whether the bracket has shifted. If the bracket shifts between two image captures and returns to its initial position just before the random time point capture, the shift that occurred between the two image captures cannot be detected, resulting in poor accuracy of the camera bracket offset testing. Based on this, the camera bracket offset testing method of some embodiments of this disclosure first adjusts the distance between the camera bracket fixing the camera in the preset test lightbox and the white background black rectangular test card as the test distance. Thus, the distance between the camera bracket fixing the camera and the white background black rectangular test card can be adjusted so that the white background black rectangular test card occupies a large portion of the camera screen. Then, the camera fixed on the camera bracket captures the test card image sequence of the white background black rectangular test card within the preset test period. Therefore, a test card image sequence that is more sensitive to instantaneous or intermittent offsets can be obtained for detecting camera offsets within a preset test time period. Next, the camera image resolution information and lens field of view information of the aforementioned camera are acquired. This yields the camera image resolution information and lens field of view information used to generate the angular offset curve of the camera bracket. Then, the pixel coordinate information of a preset reference point is acquired. This provides the coordinate information of the preset reference point used for testing. Next, for each test card image in the aforementioned test card image sequence, test reference point extraction processing is performed to obtain the corresponding test reference point pixel coordinate information. This allows for reference point extraction processing of the test card image, yielding test reference point pixel coordinate information used to generate a sequence of test reference point pixel coordinate information. Then, based on the generated test reference point pixel coordinate information, a sequence of test reference point pixel coordinate information is generated. This provides a sequence of test reference point pixel coordinate information characterizing the state changes of the reference point in the camera frame. Subsequently, based on the aforementioned test reference point pixel coordinate information sequence, the aforementioned camera image resolution information, the aforementioned lens field of view information, and the aforementioned preset reference point pixel coordinate information, an angle offset curve corresponding to the aforementioned camera bracket is generated. Thus, an angle offset curve characterizing whether the camera bracket has shifted is obtained. Finally, the generated angle offset curve is displayed on a preset camera bracket offset test page. This is also because, during the offset test of the camera bracket, a sequence of test card images, which is more sensitive to instantaneous or intermittent offsets and characterizes the state changes of the camera bracket, is collected within a preset test time period.Based on the test card image sequence characterizing the state changes of the camera bracket, an offset test is performed on the camera bracket, generating an angular offset curve characterizing whether the camera bracket has shifted. The generated angular offset curve can capture accidental, instantaneous, or periodic bracket shifts, reducing the impact of accidental or periodic shifts on the camera bracket offset test (e.g., the bracket shifts between two image acquisitions and returns to its initial position just before a random time point acquisition), thus improving the accuracy of the camera bracket offset test. Attached Figure Description
[0013] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.
[0014] Figure 1 This is a flowchart of some embodiments of the camera bracket offset testing method according to the present disclosure;
[0015] Figure 2 These are schematic diagrams of some embodiments of the camera bracket offset testing apparatus according to this disclosure;
[0016] Figure 3 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure;
[0017] Figure 4 This is a schematic diagram of an internal application test scenario based on some embodiments of the camera bracket offset test method disclosed herein. Detailed Implementation
[0018] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0019] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0020] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0021] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0022] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0023] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0024] Figure 1 A flow 100 of some embodiments of a camera bracket offset testing method according to the present disclosure is shown. The camera bracket offset testing method includes the following steps:
[0025] Step 101: Adjust the distance between the camera bracket fixing the camera inside the preset test light box and the white-background black rectangular test card to the test distance.
[0026] In some embodiments, the execution entity (e.g., a computing device) of the camera bracket offset test method can adjust the distance between the camera bracket fixing the camera within the preset test lightbox and the white-background black rectangular test card as the test distance by controlling a slide rail or guide rail installed in the preset test lightbox. It should be noted that the white-background black rectangular test card can be placed on the slide rail or guide rail using a bracket. Optionally, the execution entity can display the preset test distance on a preset camera bracket offset test page to notify the tester to adjust the distance between the camera bracket fixing the camera within the preset test lightbox and the white-background black rectangular test card as the test distance. The white-background black rectangular test card can be an image with a white background including black rectangles. The center point of the black rectangle in the white-background black rectangular test card can overlap with the center point of the white-background black rectangular test card. The preset test lightbox can be a test lightbox used to test whether the camera bracket offsets within a preset test time.
[0027] In some optional implementations of certain embodiments, the aforementioned execution entity can adjust the distance between the camera bracket fixing the camera inside the preset test lightbox and the white-background black rectangular test card to the test distance through the following steps:
[0028] The first step is to obtain the horizontal field of view of the camera. In practice, the executing entity can obtain the horizontal field of view of the camera from a pre-defined product specification document. This pre-defined product specification document can be a file that records the various parameters of the camera. For example, the file can be a PDF file or a JSON file.
[0029] The second step is to obtain the width of the white-background, black-rectangular test card as the test card width. In practice, the execution entity can obtain the width of the white-background, black-rectangular test card from a preset database.
[0030] The third step involves generating the test distance based on the aforementioned horizontal field of view angle and test card width. In practice, the executing entity can input the aforementioned horizontal field of view angle and test card width as the first and second parameters, respectively, into the preset test distance calculation formula to obtain the test distance. The aforementioned preset test distance calculation formula can be... The above D can be the test distance. The above W can be the test card width (second parameter), and the above FOV can be the horizontal field of view angle (first parameter). The above horizontal field of view angle can represent the horizontal field of view angle of the above camera.
[0031] Fourth step, adjust the distance between the camera bracket fixing the camera inside the preset test light box and the white-background black rectangular test card to the test distance.
[0032] Figure 4 A schematic diagram of an internal application test scenario is shown, illustrating some embodiments of the camera bracket offset test method according to this disclosure. Figure 4 The image shows a preset test light box 401, which includes a camera bracket 403, a camera 404 fixed on the camera bracket, and a white-background black rectangular test card 402.
[0033] Step 102: Acquire a sequence of test card images of a white background with a black rectangle within a preset test time period using a camera fixed on a camera bracket.
[0034] In some embodiments, the execution entity can acquire a sequence of test card images of the white-background, black-rectangular test card within a preset test time period using a camera fixed on the camera bracket. Each test card image in the sequence has a corresponding acquisition time.
[0035] In some optional implementations of certain embodiments, the execution entity may acquire a sequence of test card images of the white-background black rectangular test card within a preset test time period using a camera fixed on the camera bracket through the following steps:
[0036] The first step is to determine the start time of the aforementioned preset test period as the initial time point. For example, the preset test period could be "Start time: October 1, 2023, 14:00, End time: October 1, 2023, 16:00". The start time could be October 1, 2023, 14:00.
[0037] The second step involves performing the following data collection steps based on the initial time point:
[0038] The first sub-step involves capturing an image of the white-background, black-rectangular test card using a camera fixed on the aforementioned camera bracket at an initial time point, and determining the initial time point as the acquisition time for the test card image.
[0039] The second sub-step involves obtaining the system time after a preset time interval following the initial time point mentioned above. In practice, the execution entity can obtain the system time using a preset function (e.g., the GetLocalTime function).
[0040] The third sub-step is to determine the acquired system time as the initial time point in response to the determination that the acquired system time is within the aforementioned preset test time period, and to update the initial time point.
[0041] The fourth sub-step involves repeating the above data collection steps based on the updated initial time point.
[0042] The third step is to determine that the acquired system time is not within the preset time period mentioned above, and then arrange the acquired test card images from front to back according to the acquisition time corresponding to the test card images to obtain the test card image sequence.
[0043] Step 103: Obtain the camera image resolution information and lens field of view information of the camera.
[0044] In some embodiments, the executing entity can obtain the camera image resolution information and lens field of view information of the camera. In practice, the executing entity can obtain the camera image resolution information and lens field of view information of the camera from the aforementioned preset product specification document. The camera image resolution information includes the number of horizontal pixels and the number of vertical pixels of the camera. The number of horizontal pixels can be the number of pixels the camera can capture in the horizontal direction. The number of vertical pixels can be the number of pixels the camera can capture in the vertical direction. The lens field of view information includes the horizontal field of view angle and the vertical field of view angle. The horizontal field of view angle can represent the horizontal field of view angle of the camera. The vertical field of view angle represents the vertical field of view angle of the camera.
[0045] Step 104: Obtain the pixel coordinate information of the preset reference point.
[0046] In some embodiments, the execution entity can acquire preset reference point pixel coordinate information. This preset reference point pixel coordinate information includes both horizontal and vertical coordinate values. Specifically, it represents the position of a reference point in an initial image of a white-background black rectangular test card captured before the test. The reference point can be an image point containing a vertex of the black rectangle in the initial image (e.g., the upper right corner vertex of the black rectangle in the white-background black rectangular test card). The initial image can be an image of the white-background black rectangular test card captured by a camera fixed on the camera bracket when the distance between the camera bracket and the white-background black rectangular test card is the test distance.
[0047] Step 105: For each test card image in the test card image sequence, perform test reference point extraction processing on the test card image to obtain the pixel coordinate information of the test reference point of the corresponding test card image.
[0048] In some embodiments, the execution entity may perform test reference point extraction processing on each test card image in the test card image sequence to obtain the test reference point pixel coordinate information corresponding to the test card image.
[0049] In the process of adopting technical solutions to address the problems mentioned in the background section, the following issues often arise:
[0050] During the offset test of a camera bracket, it is necessary to extract test reference points from the test card image within a preset test time period to obtain the pixel coordinate information of the test reference points. A conventional solution to this technical problem is to find reference points in the test card image based on feature point matching, and then determine the position information of these reference points as their pixel coordinate information. However, this conventional solution, which relies on feature point matching to find reference points in the test card image and determine their position information as their pixel coordinate information, still has the following problems:
[0051] Feature-point matching methods typically rely heavily on salient and stable reference points in the image. When the camera bracket shifts, causing a change in the shooting angle, the shape or size of the reference points in the image may change, affecting the accuracy of the matching. Furthermore, finding reference points in the test card image using feature-point matching methods is highly dependent on image quality. Poor image quality (e.g., blurriness, noise) can lead to low accuracy in feature point (reference point) extraction or a high number of failed extraction attempts. When reference point extraction fails, it needs to be repeated, wasting computing resources.
[0052] Considering the shortcomings of feature point matching-based methods for finding reference points in test card images, the inventors decided to adopt the following solution:
[0053] In some optional implementations of certain embodiments, the execution entity may perform test reference point extraction processing on the test card image through the following steps to obtain the test reference point pixel coordinate information corresponding to the test card image:
[0054] The first step is to filter and smooth the test card image to obtain a smoothed test card image. In practice, the execution entity can use a Gaussian filter to filter and smooth the test card image to obtain a smoothed test card image.
[0055] The second step is to perform grayscale processing on the smooth test card image to obtain a grayscale test card image. In practice, the executing entity can use image grayscale processing technology to perform grayscale processing on the smooth test card image to obtain a grayscale test card image.
[0056] The third step involves detecting the gradient information of each grayscale test card pixel in the aforementioned grayscale test card image. Each grayscale test card pixel corresponds one-to-one with each gradient information. Each gradient information includes a gradient intensity value and gradient direction information. In practice, the execution entity can detect the gradient information of each grayscale test card pixel using convolution operations (such as the Sobel operator). The gradient direction information represents the gradient direction of the pixel in the grayscale test card image. For example, the gradient information could be "gradient intensity value: 145.34, gradient direction information: 63.43 degrees".
[0057] Fourth step: For each pixel in the grayscale test card image above, perform the following non-maximum suppression processing:
[0058] The first sub-step is to determine the gradient information of the pixels in the grayscale test card image as the target gradient information.
[0059] The second sub-step involves determining the gradient direction information included in the aforementioned target gradient information as the reference gradient direction information.
[0060] The third sub-step involves determining the gradient intensity value included in the aforementioned target gradient information as the reference gradient intensity value.
[0061] The fourth sub-step involves determining the target gradient direction based on the aforementioned reference gradient direction information. In practice, the executing entity can compare the reference gradient direction information with various preset angles. In response to determining that the angle corresponding to the gradient direction of the aforementioned reference gradient direction information is one of the preset angles, the aforementioned gradient direction information is determined as the target gradient direction. For example, the preset angles can be "0 degrees, 45 degrees, 90 degrees, 135 degrees, 180 degrees, 225 degrees, 270 degrees, 315 degrees, 360 degrees". Next, in response to determining that the angle corresponding to the gradient direction of the aforementioned reference gradient direction information is not one of the preset angles, the executing entity can compare the angle corresponding to the gradient direction of the aforementioned reference gradient direction information with the corresponding range of various preset angle ranges to determine the preset angle range in which the angle of the aforementioned reference gradient direction information lies. Each preset angle range has a corresponding preset angle. Then, the executing entity can determine the preset angle range information of the preset angle range in which the angle of the reference gradient direction information lies as the target preset angle range information. Finally, the executing entity can determine the preset angle corresponding to the target preset angle range information as the target gradient direction. As an example, the above preset angle range information can be {"greater than 0 degrees and less than or equal to 22.5 degrees", "greater than 22.5 degrees and less than 45 degrees", "greater than 45 degrees and less than or equal to 67.5 degrees", "greater than 67.5 degrees and less than 90 degrees", "greater than 90 degrees and less than or equal to 112.5 degrees", "greater than 112.5 degrees and less than 135 degrees", "greater than 135 degrees and less than or equal to 157.5 degrees", "greater than 157.5 degrees and less than 180 degrees", "greater than 180 degrees and less than or equal to 202.5 degrees", "greater than 202.5 degrees and less than 225 degrees", "greater than 225 degrees and less than or equal to 247.5 degrees", "greater than 247.5 degrees and less than 270 degrees", "greater than 270 degrees and less than or equal to 292.5 degrees", "greater than 292.5 degrees and less than 315 degrees", "greater than 315 degrees and less than or equal to 337.5 degrees", "greater than 337.5 degrees and less than 360 degrees".} The above-mentioned "greater than 0 degrees and less than or equal to 22.5 degrees" is a preset angle range, corresponding to 0 degrees. "greater than 22.5 degrees and less than 45 degrees" corresponds to 45 degrees; "greater than 45 degrees and less than or equal to 67.5 degrees" corresponds to 45 degrees; "greater than 67.5 degrees and less than 90 degrees" corresponds to 90 degrees; "greater than 90 degrees and less than or equal to 112.5 degrees" corresponds to 90 degrees; "greater than 112.5 degrees and less than 135 degrees" corresponds to 135 degrees; "greater than 135 degrees and less than or equal to 157.5 degrees" corresponds to 135 degrees; "greater than 157.5 degrees and less than 180 degrees" corresponds to 180 degrees; "greater than 180 degrees and less than or equal to 202.5 degrees" corresponds to 180 degrees; "greater than 202.5 degrees and less than 225 degrees" corresponds to 225 degrees."Greater than 225 degrees and less than or equal to 247.5 degrees" corresponds to 225 degrees. "Greater than 247.5 degrees and less than 270 degrees" corresponds to 270 degrees. "Greater than 270 degrees and less than or equal to 292.5 degrees" corresponds to 270 degrees. "Greater than 292.5 degrees and less than 315 degrees" corresponds to 315 degrees. "Greater than 315 degrees and less than or equal to 337.5 degrees" corresponds to 315 degrees. "Greater than 337.5 degrees and less than 360 degrees" corresponds to 0 degrees. As an example, the above reference gradient direction information can be "63.43 degrees," and the preset angle range information for the preset angle range containing "63.43 degrees" can be "greater than 45 degrees and less than or equal to 67.5 degrees," then the above target gradient direction can be 45 degrees.
[0062] The fifth sub-step involves identifying the grayscale test card image pixel with the smallest distance from the aforementioned grayscale test card image pixel in the positive direction of the target gradient direction as the first adjacent pixel, and identifying the gradient intensity value corresponding to the first adjacent pixel as the first gradient intensity value. This distance can be Euclidean distance.
[0063] The sixth sub-step involves determining the grayscale test card image pixel that has the smallest distance from the grayscale test card image pixel in the negative direction of the target gradient direction as the second adjacent pixel, and determining the gradient intensity value corresponding to the second adjacent pixel as the second gradient intensity value.
[0064] The seventh sub-step involves, in response to determining that the reference gradient intensity value is less than or equal to the first gradient intensity value or the second gradient intensity value, updating the gradient intensity value included in the gradient information corresponding to the pixels of the grayscale test card image to a preset value, thereby updating the gradient information corresponding to the pixels of the grayscale test card image. The preset value can be 0.
[0065] The fifth step is to determine the gradient information of each pixel in each grayscale test card image after the above non-maximum suppression processing as the set of gradient information to be screened, wherein each gradient information to be screened in the set of gradient information to be screened corresponds one-to-one with each pixel in the grayscale test card image.
[0066] Step 6: Based on the aforementioned gradient information set to be filtered, perform dual-threshold detection processing on each grayscale test card image pixel corresponding to the aforementioned gradient information set to be filtered, to obtain a first edge grayscale test card image pixel set and a second edge grayscale test card image pixel set. Specifically, the gradient intensity value of each first edge grayscale test card image pixel (strong edge pixel) in the aforementioned first edge grayscale test card image pixel set is greater than a first preset threshold. The gradient intensity value of each second edge grayscale test card pixel (weak edge pixel) in the aforementioned second edge grayscale test card image pixel set is less than or equal to the aforementioned first preset threshold and greater than the second preset threshold.
[0067] Step 7: Based on the aforementioned first edge grayscale test card image pixel set, perform pseudo-edge pixel removal processing on the aforementioned second edge grayscale test card image pixel set to obtain a removed second edge grayscale test card image pixel set. In practice, the aforementioned execution entity uses edge connection technology to perform pseudo-edge pixel removal processing on the aforementioned second edge grayscale test card image pixel set to obtain a removed second edge grayscale test card image pixel set. Specifically, the aforementioned execution can use edge connection technology to check whether each second edge grayscale test card pixel in the second edge grayscale test card image pixel set is connected to at least one first edge grayscale test card image pixel. If a second edge grayscale test card pixel is connected to at least one first edge grayscale test card image pixel, then the aforementioned second edge grayscale test card pixel is retained. If a second edge grayscale test card pixel is not connected to any first edge grayscale test card image pixel, then the second edge grayscale test card pixel is removed from the aforementioned second edge grayscale test card image pixel set.
[0068] Step 8: The pixels in the first edge grayscale test card image set and the pixels in the second edge grayscale test card image set that satisfy the preset filtering conditions are determined as test reference point pixels. The preset filtering conditions can be conditions used to select test reference point pixels. For example, the preset filtering conditions can be that the x-coordinate and y-coordinate of the pixel can be one of the four vertices of a quadrilateral (black rectangle) in the edge grayscale test card image, and that the pixel's x-coordinate and y-coordinate satisfy a preset vertex selection condition. As an example, the preset vertex selection condition can be "the x-coordinate value is greater than at least two of the x-coordinate values corresponding to the other three vertices, and the y-coordinate value is greater than at least two of the y-coordinate values corresponding to the other three vertices." Optionally, the above-mentioned preset filtering condition can be "the similarity between edge grayscale test card image pixels and preset reference points is the greatest among the similarities between each edge grayscale test card image pixel and preset reference point in the first edge grayscale test card image pixel set and the above-mentioned eliminated second edge grayscale test card image pixel set".
[0069] Step 9: Determine the position information of the aforementioned test reference point pixels in the aforementioned grayscale test card image as the test reference point pixel coordinate information, wherein the aforementioned test reference point pixel coordinate information includes the horizontal coordinate value and the vertical coordinate value.
[0070] The above technical solution and its related content, as an inventive point of this disclosure, solve the technical problem of "numerous reference point extraction failures and wasted computing resources due to repeated extractions." Factors leading to numerous reference point extraction failures and wasted computing resources often include: feature point matching methods typically rely heavily on salient and stable reference points in the image. When the camera bracket shifts, causing a change in the shooting angle, the shape or size of the reference point in the image may change, affecting the accuracy of matching. Furthermore, the method of finding reference points in the test card image based on feature point matching is highly dependent on image quality. Poor image quality (e.g., blurriness, noise) may result in low accuracy in feature point (reference point) extraction or numerous reference point extraction failures. When reference point extraction fails, it needs to be repeated, wasting computing resources. Solving these factors reduces the number of reference point extraction failures and the waste of computing resources. To achieve this, the first step is to filter and smooth the test card image to obtain a smoothed test card image. This reduces noise in the test card image and improves the accuracy of test reference point extraction. The second step is to perform grayscale processing on the smoothed test card image to obtain a grayscale test card image. The third step is to detect the gradient information of each grayscale test card image pixel in the grayscale test card image. Each grayscale test card image pixel corresponds one-to-one with each gradient information, and each gradient information includes gradient intensity and gradient direction information. Thus, the gradient information of each grayscale test card image pixel in the grayscale test card image can be obtained. This gradient information reflects the changes in grayscale values in the image. The fourth step is to perform non-maximum suppression processing on each grayscale test card image pixel: First sub-step: determine the gradient information of the grayscale test card image pixel in the grayscale test card image as the target gradient information. Second sub-step: determine the gradient direction information included in the target gradient information as the reference gradient direction information. The third sub-step involves determining the gradient intensity value included in the target gradient information as the reference gradient intensity value. The fourth sub-step involves determining the target gradient direction based on the reference gradient direction information. The fifth sub-step involves determining the grayscale test card image pixel with the smallest distance to the grayscale test card image pixel in the positive direction of the target gradient direction as the first adjacent pixel, and determining the gradient intensity value corresponding to the first adjacent pixel as the first gradient intensity value. Thus, a first gradient intensity value can be obtained for updating the gradient information corresponding to the grayscale test card image pixels.The sixth sub-step involves identifying the grayscale test card image pixel with the smallest distance from the grayscale test card image pixel in the negative direction of the target gradient direction as the second adjacent pixel, and identifying the gradient intensity value corresponding to the second adjacent pixel as the second gradient intensity value. This yields a second gradient intensity value used to update the gradient information corresponding to the grayscale test card image pixel. The seventh sub-step involves updating the gradient intensity value included in the gradient information corresponding to the grayscale test card image pixel to a preset value in response to determining that the reference gradient intensity value is less than or equal to the first gradient intensity value or less than or equal to the second gradient intensity value. This updates the gradient information corresponding to the grayscale test card image pixel to suppress interference from the gradient information of grayscale test card image pixels with small gradient intensity values during extraction. Step 5: Determine the gradient information of each pixel in the grayscale test card image after the above non-maximum suppression processing as the set of gradient information to be filtered. Each gradient information in the set corresponds one-to-one with each pixel in the grayscale test card image. Step 6: Based on the set of gradient information to be filtered, perform double threshold detection processing on each pixel in the grayscale test card image corresponding to the set of gradient information to be filtered, obtaining a first edge grayscale test card image pixel set and a second edge grayscale test card image pixel set. Thus, the first edge grayscale test card image pixel set representing strong edge pixels and the second edge grayscale test card image pixel set representing weak edge pixels can be detected through double threshold detection processing. The first edge grayscale test card image pixel set and the second edge grayscale test card image pixel set can be the set of test reference points. Step 7: Based on the first edge grayscale test card image pixel set, perform pseudo-edge pixel removal processing on the second edge grayscale test card image pixel set, obtaining a removed second edge grayscale test card image pixel set. Therefore, pseudo-edge pixel removal processing can be performed on the pixel set of the second edge grayscale test card image representing weak edge pixels to improve the accuracy of edge pixels. Step 8: Edge grayscale test card image pixels that meet the preset screening conditions in the aforementioned first edge grayscale test card image pixel set and the aforementioned removed second edge grayscale test card image pixel set are determined as test reference point pixels. Thus, test reference point pixels can be selected from the first edge grayscale test card image pixel set representing relatively stable rectangular edge information and the removed second edge grayscale test card image pixel set. Step 9: The position information of the aforementioned test reference point pixels in the aforementioned grayscale test card image is determined as test reference point pixel coordinate information, wherein the aforementioned test reference point pixel coordinate information includes horizontal coordinate values and vertical coordinate values.Because it employs the detection of gradient information for each pixel in the grayscale test card image, reflecting changes in grayscale values, it can capture the image's edge information. Even when the camera bracket shifts, although the shooting angle changes, the edge information of the rectangle remains relatively stable in the image. Then, based on the first set of grayscale test card image pixels representing edge information and the second set of grayscale test card image pixels after removing the second edge, test reference point pixels (e.g., the pixel at the top right corner of the black rectangle) are selected. Compared to methods based on feature point matching to find reference points in the test card image, this method has less dependence on significant and stable single reference points in the image and less dependence on image quality. It is more adaptable to image changes, improves the accuracy of feature point (reference point) extraction, and thus improves the accuracy of the test reference point pixel coordinate information, reduces the number of failed reference point extractions, and reduces the waste of computing resources caused by re-extraction.
[0071] Step 106: Based on the generated pixel coordinate information of each test reference point, generate a sequence of pixel coordinate information of test reference points.
[0072] In some embodiments, the execution entity described above may generate a sequence of test reference point pixel coordinate information based on the generated pixel coordinate information of each test reference point.
[0073] In some optional implementations of certain embodiments, the aforementioned execution entity can generate a sequence of test reference point pixel coordinate information based on the generated pixel coordinate information of each test reference point through the following steps:
[0074] The first step is to sort the pixel coordinate information of each test reference point according to the order in which the test card images corresponding to the pixel coordinate information of each test reference point are arranged in the sequence of test card images, so as to obtain the sequence of pixel coordinate information of test reference points.
[0075] Step 107: Based on the sequence of pixel coordinate information of the test reference point, the camera image resolution information, the lens field of view information, and the preset reference point pixel coordinate information, generate the angle offset curve of the corresponding camera bracket.
[0076] In some embodiments, the execution entity may generate an angle offset curve corresponding to the camera bracket based on the sequence of pixel coordinate information of the test reference point, the camera image resolution information, the lens field of view information, and the preset reference point pixel coordinate information.
[0077] In some optional implementations of certain embodiments, the execution entity may generate an angle offset curve corresponding to the camera bracket by means of the following steps based on the test reference point pixel coordinate information sequence, the camera image resolution information, the lens field of view information, and the preset reference point pixel coordinate information:
[0078] The first step is to determine the pixel coordinates of the first test reference point in the sequence of test reference point pixel coordinates by performing the following steps:
[0079] The first sub-step generates horizontal and vertical angle offset values based on the pixel coordinate information of the test reference point, the pixel coordinate information of the preset reference point, the camera image resolution information, and the lens field of view information.
[0080] The second sub-step is to determine the acquisition time of the corresponding test reference point pixel coordinate information.
[0081] The third sub-step involves determining the horizontal and vertical angle offset values as the offset information corresponding to the acquisition time.
[0082] The fourth sub-step involves deleting the pixel coordinate information of the first test reference point from the test reference point pixel coordinate information sequence in order to update the test reference point pixel coordinate information sequence.
[0083] The fifth sub-step is to execute the above determination step again based on the updated test reference point pixel coordinate information sequence, in response to the determination that the updated test reference point pixel coordinate information sequence is not an empty set.
[0084] The second step is to generate an angle offset curve corresponding to the camera bracket based on the determined offset information sequence of the updated test reference point pixel coordinate information as an empty set.
[0085] In some optional implementations of certain embodiments, the aforementioned execution entity can generate horizontal and vertical angle offset values based on test reference point pixel coordinate information, preset reference point pixel coordinate information, camera image resolution information, and lens field of view information through the following steps:
[0086] The first step is to determine the x-coordinate value included in the pixel coordinate information of the above test reference point as the target x-coordinate value.
[0087] The second step is to determine the horizontal coordinate value included in the preset reference point pixel coordinate information as the reference horizontal coordinate value.
[0088] The third step is to determine the number of horizontal pixels of the camera included in the above camera image resolution information as the target number of horizontal pixels.
[0089] The fourth step is to determine the horizontal field of view angle included in the above lens field of view information as the target horizontal field of view angle. For example, the target horizontal field of view angle can be 60 degrees.
[0090] Step 5: Based on the aforementioned target horizontal coordinate value, reference horizontal coordinate value, target horizontal pixel count, and target horizontal field of view angle, generate a horizontal angle offset value. In practice, the executing entity can determine the difference between the target horizontal coordinate value and the reference horizontal coordinate value as the first value. Then, the executing entity can determine the ratio of the first value to the target horizontal pixel count as the second value. Afterward, the executing entity can determine the horizontal angle offset value as the product of the second value and the target horizontal field of view angle. For example, the target horizontal coordinate value can be 340, the reference horizontal coordinate value can be 320, the first value can be 20, the target horizontal pixel count can be 640, the second value can be (20 / 640), the target horizontal field of view angle can be 60 degrees, and the horizontal angle offset value can be (20 / 640) × 60 degrees = 1.875 degrees.
[0091] The sixth step is to determine the ordinate value included in the pixel coordinate information of the above test reference point as the target ordinate value.
[0092] Step 7: Determine the ordinate value included in the preset reference point pixel coordinate information as the reference ordinate value.
[0093] Step 8: Determine the number of vertical pixels of the camera included in the above camera image resolution information as the target number of vertical pixels.
[0094] Step 9: Determine the vertical field of view angle included in the above lens field of view information as the target vertical field of view angle.
[0095] Step 10: Based on the aforementioned target ordinate value, reference ordinate value, target vertical pixel count, and target vertical field of view angle, generate a vertical angle offset value. In practice, the executing entity can determine the difference between the target ordinate value and the reference ordinate value as the third value. Then, the executing entity can determine the ratio of the third value to the target vertical pixel count as the fourth value. Finally, the executing entity can determine the vertical angle offset value by multiplying the fourth value by the target vertical field of view angle.
[0096] In some optional implementations of certain embodiments, the execution entity can generate an angle offset curve corresponding to the camera bracket based on the determined offset information through the following steps:
[0097] The first step is to determine the acquisition time corresponding to each of the above offset information.
[0098] The second step is to determine the horizontal angle offset values included in the above offset information as the target horizontal angle offset values, wherein each target horizontal angle offset value corresponds one-to-one with each acquisition time.
[0099] The third step is to determine the vertical angle offset values included in each offset information as the vertical angle offset values of each target, wherein each target vertical angle offset value corresponds one-to-one with each acquisition time.
[0100] The fourth step involves generating an angle offset curve corresponding to the camera bracket based on the aforementioned horizontal angle offset values, vertical angle offset values, and acquisition times. In practice, the executing entity can call a preset plotting library interface to generate a first relationship curve showing the correspondence between the horizontal angle offset values and acquisition times, and a second relationship curve showing the correspondence between the vertical angle offset values and acquisition times. Then, the executing entity can save the first and second relationship curves as images as angle offset curves using a preset plotting save function (e.g., `plt.savefig()`). The preset plotting library interface can be the `matplotlib.pyplot` interface.
[0101] Step 108: Display the generated angle offset curve on the preset camera bracket offset test page.
[0102] In some embodiments, the executing entity may display the generated angle offset curve on a preset camera bracket offset test page. This preset camera bracket offset test page can be a page used to display the angle offset curve.
[0103] The above-described embodiments of this disclosure have the following beneficial effects: the camera bracket offset testing method of some embodiments of this disclosure improves the accuracy of camera bracket offset testing. Specifically, the reason for the poor accuracy of camera bracket offset testing is that during the test period, by randomly selecting time points, images of the reference object are captured using a camera fixed on the bracket, and the captured images are compared with the initial images of the same reference object captured at the beginning of the test to determine whether the bracket has shifted. If the bracket shifts between two image captures and returns to its initial position just before the random time point capture, the shift that occurred between the two image captures cannot be detected, resulting in poor accuracy of the camera bracket offset testing. Based on this, the camera bracket offset testing method of some embodiments of this disclosure first adjusts the distance between the camera bracket fixing the camera in the preset test light box and the white background black rectangular test card as the test distance. Thus, the distance between the camera bracket fixing the camera and the white background black rectangular test card can be adjusted so that the white background black rectangular test card occupies a large portion of the camera screen. Then, a sequence of test card images of the white-background, black-rectangular test card within a preset test time period is acquired using a camera fixed on the aforementioned camera bracket. Each test card image in the sequence has a corresponding acquisition time. This yields a test card image sequence that is more sensitive to instantaneous or intermittent shifts, used to detect camera shifts within the preset test time period. Next, the camera image resolution information and lens field of view information of the aforementioned camera are acquired. This yields the camera image resolution information and lens field of view information used to generate the angular offset curve of the camera bracket. Then, the pixel coordinate information of a preset reference point is acquired, including both horizontal and vertical coordinate values. This yields the coordinate information of the preset reference point used for testing. Next, for each test card image in the aforementioned test card image sequence, test reference point extraction processing is performed to obtain the corresponding test reference point pixel coordinate information for that test card image. This yields the test reference point pixel coordinate information used to generate the test reference point pixel coordinate information sequence. Then, based on the generated pixel coordinate information of each test reference point, a sequence of test reference point pixel coordinate information is generated. This yields a sequence of test reference point pixel coordinate information characterizing the state change of the reference points within the camera frame. Next, based on the aforementioned sequence of test reference point pixel coordinate information, the aforementioned camera image resolution information, the aforementioned lens field of view information, and the aforementioned preset reference point pixel coordinate information, an angle offset curve corresponding to the aforementioned camera bracket is generated. This yields an angle offset curve characterizing whether the camera bracket has shifted. Finally, the generated angle offset curve is displayed on a preset camera bracket offset test page.Because the camera bracket offset test was conducted by acquiring a sequence of test card images within a preset test period—images that are more sensitive to instantaneous or intermittent offsets—the system effectively represented changes in the camera bracket's state. Based on this sequence of test card images, the camera bracket was subjected to offset testing, generating an angular offset curve indicating whether the camera bracket had shifted. This generated angular offset curve can capture accidental, instantaneous, or periodic bracket offsets, reducing the impact of accidental or periodic offsets on the camera bracket offset test (e.g., the bracket shifted between two image acquisitions and returned to its initial position just before a random time point acquisition), thus improving the accuracy of the camera bracket offset test.
[0104] Further reference Figure 2 As an implementation of the methods shown in the figures, this disclosure provides some embodiments of a camera bracket offset testing device, which are similar to... Figure 1 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0105] like Figure 2 As shown, a camera bracket offset testing device 200 in some embodiments includes: an adjustment unit 201, an acquisition unit 202, a first acquisition unit 203, a second acquisition unit 204, an extraction processing unit 205, a first generation unit 206, a second generation unit 207, and a display unit 208. The adjustment unit 201 is configured to adjust the distance between the camera bracket (fixed within a preset test lightbox) and the white-background black rectangular test card to a test distance; the acquisition unit 202 is configured to acquire a sequence of test card images of the white-background black rectangular test card within a preset test time period using a camera fixed on the camera bracket; the first acquisition unit 203 is configured to acquire camera image resolution information and lens field of view information of the camera; the second acquisition unit 204 is configured to acquire pixel coordinate information of a preset reference point; and the extraction processing unit 205 is configured to perform the above-mentioned test card process on each test card image in the test card image sequence. The card image is processed to extract test reference points, obtaining the pixel coordinate information of the test reference points corresponding to the test card image; the first generation unit 206 is configured to generate a sequence of test reference point pixel coordinate information based on the generated pixel coordinate information of each test reference point; the second generation unit 207 is configured to generate an angle offset curve corresponding to the camera bracket based on the sequence of test reference point pixel coordinate information, the camera image resolution information, the lens field of view information, and the preset reference point pixel coordinate information; the display unit 208 is configured to display the generated angle offset curve on a preset camera bracket offset test page.
[0106] It is understandable that the units described in the device 200 are related to the reference. Figure 1 The steps in the method described above correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 200 and the units contained therein, and will not be repeated here.
[0107] The following is for reference. Figure 3 It shows a schematic diagram of the structure of an electronic device 300 suitable for implementing some embodiments of the present disclosure. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.
[0108] like Figure 3 As shown, the electronic device 300 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. The RAM 303 also stores various programs and data required for the operation of the electronic device 300. The processing unit 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0109] Typically, the following devices can be connected to I / O interface 305: input devices 306 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 307 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 308 including, for example, magnetic tapes, hard disks, etc.; and communication devices 309. Communication device 309 allows electronic device 300 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 3 An electronic device 300 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 3 Each box shown can represent a device or multiple devices as needed.
[0110] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 309, or installed from storage device 308, or installed from ROM 302. When the computer program is executed by processing device 301, it performs the functions defined in the methods of some embodiments of this disclosure.
[0111] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0112] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0113] The computer-readable medium may be included in an electronic device or may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: adjust the distance between the camera bracket of the fixed camera within a preset test lightbox and the white-background black rectangular test card to a test distance; acquire a sequence of test card images of the white-background black rectangular test card within a preset test time period using the camera fixed on the camera bracket; obtain the camera image resolution information and lens field of view information of the camera; obtain preset reference point pixel coordinate information; for each test card image in the test card image sequence, perform test reference point extraction processing on the test card image to obtain the corresponding test reference point pixel coordinate information; generate a sequence of test reference point pixel coordinate information based on the generated test reference point pixel coordinate information; generate an angle offset curve corresponding to the camera bracket based on the sequence of test reference point pixel coordinate information, the camera image resolution information, the lens field of view information, and the preset reference point pixel coordinate information; and display the generated angle offset curve on a preset camera bracket offset test page.
[0114] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0115] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0116] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including an adjustment unit, an acquisition unit, a first acquisition unit, a second acquisition unit, an extraction processing unit, a first generation unit, a second generation unit, and a display unit. The names of these units do not necessarily limit the specific unit; for example, the acquisition unit may also be described as "a unit that acquires a sequence of test card images of the white-background black rectangular test card within a preset test time period using a camera fixed to the aforementioned camera bracket."
[0117] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0118] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of technical features, but should also cover other technical solutions formed by arbitrary combinations of technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A camera holder offset test method, comprising: adjusting a distance between a camera holder of a fixed camera in a preset test light box and a white background black rectangular test card to a test distance; capturing a test card image sequence of the white background black rectangular test card within a preset test time period by a camera fixed on the camera holder; obtaining camera image resolution information and lens field of view angle information of the camera; obtaining preset reference point pixel coordinate information; for each test card image in the test card image sequence, performing test reference point extraction processing on the test card image to obtain test reference point pixel coordinate information corresponding to the test card image; generating a test reference point pixel coordinate information sequence based on the generated test reference point pixel coordinate information; generating an angle offset amount curve corresponding to the camera holder based on the test reference point pixel coordinate information sequence, the camera image resolution information, the lens field of view angle information, and the preset reference point pixel coordinate information, comprising: for a first test reference point pixel coordinate information in the test reference point pixel coordinate information sequence, performing the following determination steps: generating a horizontal angle offset amount value and a vertical angle offset amount value based on the test reference point pixel coordinate information, the preset reference point pixel coordinate information, the camera image resolution information, and the lens field of view angle information; determining a capture time corresponding to the test reference point pixel coordinate information; determining the horizontal angle offset amount value and the vertical angle offset amount value as offset amount information corresponding to the capture time; deleting the first test reference point pixel coordinate information from the test reference point pixel coordinate information sequence to update the test reference point pixel coordinate information sequence; in response to determining that the updated test reference point pixel coordinate information sequence is not an empty set, performing the determination steps again according to the updated test reference point pixel coordinate information sequence; in response to determining that the updated test reference point pixel coordinate information sequence is an empty set, generating the angle offset amount curve corresponding to the camera holder according to the determined offset amount information; displaying the generated angle offset amount curve on a preset camera holder offset test page.
2. The method of claim 1, wherein, The adjusting of the distance between the camera holder of the fixed camera in the preset test light box and the white background black rectangular test card to the test distance comprises: obtaining a horizontal field of view angle of the camera; obtaining a width of the white background black rectangular test card as a test card width; generating the test distance based on the horizontal field of view angle and the test card width; adjusting the distance between the camera holder of the fixed camera in the preset test light box and the white background black rectangular test card to the test distance.
3. The method of claim 1, wherein, The generating of the test reference point pixel coordinate information sequence based on the generated test reference point pixel coordinate information comprises: sorting the test reference point pixel coordinate information according to an arrangement order of each test card image corresponding to the test reference point pixel coordinate information in the test card image sequence to obtain the test reference point pixel coordinate information sequence.
4. The method of claim 1, wherein, Each test card image in the test card image sequence has a corresponding acquisition time, and the camera fixed on the camera support acquires the test card image sequence of the white background black rectangle test card in a preset test time period, including: Determine the starting time point of the preset test time period as an initial time point; According to the initial time point, the following acquisition steps are performed: Acquire the image of the white background black rectangle test card at the initial time point as a test card image, and determine the initial time point as the acquisition time of the test card image; After a preset time interval after the initial time point, acquire the system time; In response to determining that the acquired system time is within the preset test time period, determine the acquired system time as the initial time point to update the initial time point; According to the updated initial time point, the acquisition step is executed again; In response to determining that the acquired system time is not within the preset test time period, arrange the acquired test card images in order from front to back according to the acquisition time corresponding to the test card image, to obtain the test card image sequence.
5. The method of claim 1, wherein, The camera image resolution information includes the number of horizontal pixels of the camera and the number of vertical pixels of the camera, the lens field of view angle information includes the horizontal field of view angle and the vertical field of view angle, the preset reference point pixel coordinate information includes the horizontal coordinate value and the vertical coordinate value, and the horizontal angle offset value and the vertical angle offset value are generated based on the test reference point pixel coordinate information, the preset reference point pixel coordinate information, the camera image resolution information, and the lens field of view angle information, including: Determine the horizontal coordinate value included in the test reference point pixel coordinate information as a target horizontal coordinate value; Determine the horizontal coordinate value included in the preset reference point pixel coordinate information as a reference horizontal coordinate value; Determine the number of horizontal pixels of the camera included in the camera image resolution information as a target horizontal pixel number; Determine the horizontal field of view angle included in the lens field of view angle information as a target horizontal field of view angle; Generate a horizontal angle offset value based on the target horizontal coordinate value, the reference horizontal coordinate value, the target horizontal pixel number, and the target horizontal field of view angle; Determine the vertical coordinate value included in the test reference point pixel coordinate information as a target vertical coordinate value; Determine the vertical coordinate value included in the preset reference point pixel coordinate information as a reference vertical coordinate value; Determine the number of vertical pixels of the camera included in the camera image resolution information as a target vertical pixel number; Determine the vertical field of view angle included in the lens field of view angle information as a target vertical field of view angle; Generate a vertical angle offset value based on the target vertical coordinate value, the reference vertical coordinate value, the target vertical pixel number, and the target vertical field of view angle.
6. The method of claim 1, wherein, According to the determined offset information, the angle offset curve corresponding to the camera support is generated, including: Determine the acquisition time corresponding to each offset information; determining each horizontal angle offset value included in each offset information as a target horizontal angle offset value, wherein each target horizontal angle offset value corresponds to each acquisition time one by one; determining each vertical angle offset value included in each offset information as a target vertical angle offset value, wherein each target vertical angle offset value corresponds to each acquisition time one by one; generating an angle offset curve corresponding to the camera holder based on the target horizontal angle offset values, the target vertical angle offset values, and the acquisition times.
7. A camera holder offset testing device, comprising: an adjusting unit configured to adjust a distance between a camera holder of a fixed camera in a preset test light box and a white background black rectangular test card to a test distance; an acquisition unit configured to acquire a test card image sequence of the white background black rectangular test card in a preset test time period by a camera fixed on the camera holder; a first obtaining unit configured to obtain camera image resolution information and lens field of view angle information of the camera; a second obtaining unit configured to obtain preset reference point pixel coordinate information; an extraction processing unit configured to, for each test card image in the test card image sequence, perform test reference point extraction processing on the test card image to obtain test reference point pixel coordinate information corresponding to the test card image; a first generating unit configured to generate a test reference point pixel coordinate information sequence based on the generated test reference point pixel coordinate information; a second generating unit configured to generate an angle offset curve corresponding to the camera holder based on the test reference point pixel coordinate information sequence, the camera image resolution information, the lens field of view angle information, and the preset reference point pixel coordinate information, including: for a first test reference point pixel coordinate information in the test reference point pixel coordinate information sequence, performing the following determination step: based on the test reference point pixel coordinate information, the preset reference point pixel coordinate information, the camera image resolution information, and the lens field of view angle information, generating a horizontal angle offset value and a vertical angle offset value; determining an acquisition time corresponding to the test reference point pixel coordinate information; determining the horizontal angle offset value and the vertical angle offset value as offset information corresponding to the acquisition time; deleting the first test reference point pixel coordinate information from the test reference point pixel coordinate information sequence to update the test reference point pixel coordinate information sequence; in response to determining that the updated test reference point pixel coordinate information sequence is not an empty set, performing the determination step again according to the updated test reference point pixel coordinate information sequence; and in response to determining that the updated test reference point pixel coordinate information sequence is an empty set, generating the angle offset curve corresponding to the camera holder based on the determined offset information. The display unit is configured to display the generated angle offset curve on a preset camera support offset test page. 8.An electronic device, comprising: one or more processors; a memory device having stored thereon one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-6.
9. A computer readable medium having stored thereon a computer program, wherein, The program is executed by the processor to implement the method according to any one of claims 1-6.
Citation Information
Patent Citations
Device and method for correcting optical axis deviation of video camera based on binocular stereoscopic vision
CN107560543A
A method for testing relative positions of a lens and an image sensor in a camera shooting module
CN107702695A