Automatic convex lens adjusting method, device and equipment based on video camera obscura and medium
By automatically calculating and adjusting the position of the convex lens, the problem of time-consuming and labor-intensive manual adjustment and unclear imaging in video camera obscura calibration is solved, and the imaging clarity and detection performance of the camera are improved.
Patent Information
- Application Number
- CN202410641283.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-08-23
AI Technical Summary
In the existing technology, manually adjusting the position of the convex lens during calibration of a video camera obscura is time-consuming and labor-intensive, and can easily lead to unclear imaging and affect the detection performance of the camera.
Through an automated method, the alignment of the camera and the display screen and the distance calculation between the target image and the outer contour image are used to automatically adjust the convex lens in the video obscura so that the center of the camera, the center of the convex lens and the center of the display screen are kept on the same straight line.
The imaging clarity of the camera is improved, the detection performance of the camera is enhanced, the adjustment time is reduced and the accuracy is improved.
Smart Images

Figure CN118540588A
Abstract
Description
Technical Field
[0001] The present application relates to the field of automobile technology, and in particular to a method, device, equipment and computer-readable storage medium for automatically adjusting a convex lens based on a video darkroom. Background Art
[0002] With the rapid development of automobile technology, people have higher and higher requirements for Advanced Driver Assistance System (ADAS). In the process of vehicle development, various tests need to be performed on the ADAS controller. Among them, the hardware-in-the-loop (HIL) test of the ADAS controller uses the video dark box method to perform camera-in-the-loop test. The video dark box includes a camera, a convex lens and a display screen. A slide rail is set between the camera and the display screen. The convex lens is located between the camera and the display screen, and a convex lens fixing bracket is used to slide and connect with the slide rail. Before the HIL test, the video dark box needs to be calibrated so that the center of the camera, the center of the convex lens and the center of the display screen in the video dark box are in the same straight line. In the related art, the operator manually adjusts the relative position of the convex lens relative to the camera and the display screen by visual inspection so that the center of the camera, the center of the convex lens and the center of the display screen are in the same straight line. However, this method of manually adjusting the position of the convex lens is not only time-consuming and labor-intensive, but also has the problem that the screen image is not clear after being magnified by the convex lens due to inadequate adjustment, which further affects the detection performance of the camera. Summary of the invention
[0003] The present application provides a method, device, equipment and computer-readable storage medium for automatic adjustment of a convex lens based on a video darkbox, which can solve the technical problems in the prior art that, when calibrating a video darkbox, the position of the convex lens is manually adjusted, which is not only time-consuming and labor-intensive, but also has the problem of unclear imaging of the screen image after being magnified by the convex lens due to improper adjustment, further affecting the detection performance of the camera, and the like.
[0004] In a first aspect, an embodiment of the present application provides a method for automatically adjusting a convex lens based on a video dark box, and the method for automatically adjusting a convex lens based on a video dark box comprises:
[0005] Align the camera and display screen in the video darkbox;
[0006] Displaying a first image on a display screen, wherein a center point of the first image is located at a center position of the display screen;
[0007] Acquire a target image and an outer contour image of the convex lens from the camera, wherein the target image is an image of the first image after being transmitted through the convex lens;
[0008] Determine the horizontal distance and the vertical distance between the center point of the target image and the center point of the outer contour image;
[0009] The convex lens in the video dark box is adjusted according to the horizontal distance and the vertical distance.
[0010] In combination with the first aspect, in one implementation, aligning the camera and the display screen in the video darkbox includes:
[0011] Adjust the camera's posture and align the center of the camera lens in the video dark box with the center of the display screen.
[0012] In combination with the first aspect, in one implementation, determining the horizontal distance and the vertical distance between the center point of the target image and the center point of the outer contour image includes:
[0013] Get the outer contour radius of the convex lens;
[0014] Obtain a first number of pixels and a second number of pixels, wherein the first number of pixels is the number of pixels located on a circular ring radius in a horizontal direction in the outer contour image, and the second number of pixels is the number of pixels located on a circular ring radius in a vertical direction in the outer contour image;
[0015] Acquire a first pixel distance and a second pixel distance, wherein the first pixel distance is a pixel distance between a center point of the target image and a center point of the outer contour image in a horizontal direction, and the second pixel distance is a pixel distance between a center point of the target image and a center point of the outer contour image in a vertical direction;
[0016] Determine a horizontal distance between a center point of the target image and a center point of the outer contour image based on the outer contour radius, the first number of pixels, and the first pixel distance;
[0017] Based on the outer contour radius, the second number of pixels and the second pixel distance, a vertical distance between a center point of the target image and a center point of the outer contour image is determined.
[0018] In combination with the first aspect, in one implementation, the horizontal distance between the center point of the target image and the center point of the outer contour image is determined based on the outer contour radius, the first number of pixels and the first pixel distance, and the corresponding formula is:
[0019]
[0020] Accordingly, the vertical distance between the center point of the target image and the center point of the outer contour image is determined based on the outer contour radius, the second number of pixels and the second pixel distance, and the corresponding formula is:
[0021]
[0022] Among them, x is the horizontal distance between the center point of the target image and the center point of the outer contour image, y is the vertical distance between the center point of the target image and the center point of the outer contour image, R is the outer contour radius, X1 is the number of first pixel points, Y1 is the number of second pixel points, X2 is the first pixel distance, and Y2 is the second pixel distance.
[0023] In combination with the first aspect, in one implementation, adjusting the convex lens in the video dark box according to the horizontal distance and the vertical distance includes:
[0024] Moving the convex lens in the video dark box by the horizontal distance along the width direction of the vehicle body;
[0025] The convex lens in the video dark box is moved along the vehicle body height direction by the vertical distance.
[0026] In a second aspect, an embodiment of the present application provides a convex lens automatic adjustment device based on a video dark box, and the convex lens automatic adjustment device based on a video dark box includes:
[0027] An alignment module, used to align the camera and the display screen in the video darkbox;
[0028] A display module, used for displaying a first image on a display screen, wherein a center point of the first image is located at a center position of the display screen;
[0029] An acquisition module, used to acquire a target image and an outer contour image of the convex lens from a camera, wherein the target image is an image of the first image after being transmitted through the convex lens;
[0030] A determination module, used to determine the horizontal distance and the vertical distance between the center point of the target image and the center point of the outer contour image;
[0031] The adjustment module is used to adjust the convex lens in the video dark box according to the horizontal distance and the vertical distance.
[0032] In conjunction with the second aspect, in one implementation, the alignment module is specifically configured to:
[0033] Adjust the camera's posture and align the center of the camera lens in the video dark box with the center of the display screen.
[0034] In conjunction with the second aspect, in one implementation, the determining module is specifically configured to:
[0035] Get the outer contour radius of the convex lens;
[0036] Obtain a first number of pixels and a second number of pixels, wherein the first number of pixels is the number of pixels located on a circular ring radius in a horizontal direction in the outer contour image, and the second number of pixels is the number of pixels located on a circular ring radius in a vertical direction in the outer contour image;
[0037] Acquire a first pixel distance and a second pixel distance, wherein the first pixel distance is a pixel distance between a center point of the target image and a center point of the outer contour image in a horizontal direction, and the second pixel distance is a pixel distance between a center point of the target image and a center point of the outer contour image in a vertical direction;
[0038] Determine a horizontal distance between a center point of the target image and a center point of the outer contour image based on the outer contour radius, the first number of pixels, and the first pixel distance;
[0039] Based on the outer contour radius, the second number of pixels and the second pixel distance, a vertical distance between a center point of the target image and a center point of the outer contour image is determined.
[0040] In conjunction with the second aspect, in one implementation, the determining module is specifically configured to:
[0041] According to the following formula, the horizontal distance between the center point of the target image and the center point of the outer contour image is determined:
[0042]
[0043] Accordingly, the vertical distance between the center point of the target image and the center point of the outer contour image is determined according to the following formula:
[0044]
[0045] Among them, x is the horizontal distance between the center point of the target image and the center point of the outer contour image, y is the vertical distance between the center point of the target image and the center point of the outer contour image, R is the outer contour radius, X1 is the number of first pixel points, Y1 is the number of second pixel points, X2 is the first pixel distance, and Y2 is the second pixel distance.
[0046] In conjunction with the second aspect, in one implementation, the adjustment module is specifically used to:
[0047] Moving the convex lens in the video dark box by the horizontal distance along the width direction of the vehicle body;
[0048] The convex lens in the video dark box is moved along the vehicle body height direction by the vertical distance.
[0049] In a third aspect, an embodiment of the present application provides an automatic adjustment device for a convex lens based on a video dark box, wherein the automatic adjustment device for a convex lens based on a video dark box comprises a processor, a memory, and an automatic adjustment program for a convex lens based on a video dark box stored in the memory and executable by the processor, wherein when the automatic adjustment program for a convex lens based on a video dark box is executed by the processor, the steps of the automatic adjustment method for a convex lens based on a video dark box as described in any one of the first aspects are implemented.
[0050] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which is stored a convex lens automatic adjustment program based on a video dark box. When the convex lens automatic adjustment program based on a video dark box is executed by a processor, the steps of the convex lens automatic adjustment method based on a video dark box as described in any one of the first aspects are implemented.
[0051] The beneficial effects brought by the technical solution provided by the embodiments of the present application include:
[0052] First, align the camera and display screen in the video darkbox; then display the first image on the display screen, with the center point of the first image located at the center of the display screen; then obtain the target image and the outer contour image of the convex lens from the camera, wherein the target image is the image of the first image after being transmitted through the convex lens; further determine the horizontal distance and vertical distance between the center point of the target image and the center point of the outer contour image; according to the horizontal distance and the vertical distance, adjust the convex lens in the video darkbox, and automatically adjust the center of the camera, the center of the convex lens and the center of the display screen to be on the same straight line, thereby improving the imaging clarity of the camera and further improving the detection performance of the camera. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 This is a flow chart of the first embodiment of the method for automatically adjusting a convex lens based on a video darkroom of the present application;
[0054] Figure 2 A schematic diagram of a video dark box structure provided for one embodiment of the present application;
[0055] Figure 3 This is a functional module diagram of an embodiment of a convex lens automatic adjustment device based on a video darkroom of the present application;
[0056] Figure 4 This is a schematic diagram of the hardware structure of the convex lens automatic adjustment device based on the video darkroom involved in the embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0058] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0059] In a first aspect, an embodiment of the present application provides a method for automatically adjusting a convex lens based on a video darkroom.
[0060] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the method for automatically adjusting the convex lens based on the video dark box of this application. Figure 1 As shown, the automatic adjustment method of the convex lens based on the video dark box includes:
[0061] Step 110, aligning the camera and the display screen in the video darkbox;
[0062] Figure 2 A schematic diagram of the video dark box structure provided for an embodiment of the present application, in combination with the internal structure of the video dark box, a slide rail is provided between the camera and the display screen, a convex lens is located between the camera and the display screen, and a convex lens fixing bracket is slidably connected to the slide rail. It can be understood that the camera and the display screen in the video dark box need to be aligned without installing the convex lens, and after alignment, the convex lens fixing bracket is slidably connected to the slide rail, and the position of the convex lens is flexibly set according to actual needs, for example: installed on the side close to the display screen, on the side close to the camera, or in the middle of the two.
[0063] In specific implementation, the position of the slide rail between the camera and the display screen and the camera can be adjusted to align the lens center of the camera in the video darkbox with the center of the display screen. On this basis, the accuracy of subsequent adjustment of the convex lens position can be improved.
[0064] Furthermore, in some embodiments, aligning the camera and the display screen in the video darkbox includes:
[0065] Adjust the camera's posture and align the center of the camera lens in the video dark box with the center of the display screen.
[0066] Specifically, the center of the camera lens in the video darkbox and the center of the display screen can be aligned by automatically adjusting the camera's yaw angle, tilt angle, pitch angle and other postures.
[0067] In this embodiment, the lens center of the camera in the video dark box is aligned with the center of the display screen by adjusting the posture of the camera, which lays a foundation for adjusting the convex lens in the video dark box.
[0068] Step 120: display a first image on a display screen, wherein a center point of the first image is located at a center position of the display screen;
[0069] The first image may be in the shape of a crosshair, a five-pointed star, etc., which is not specifically limited in the present application. The present application is introduced below by taking the first image in the shape of a crosshair as an example.
[0070] Step 130, acquiring a target image and an outer contour image of the convex lens from the camera, wherein the target image is an image of the first image after being transmitted through the convex lens;
[0071] like Figure 2 As shown, the first image displayed on the display screen is received by the camera after being transmitted by the convex lens and imaged in the camera. The outer contour of the convex lens, i.e., the outer edge ring of the convex lens, will also present a black ring-shaped pattern in the camera, i.e., the outer contour image of the convex lens. From the camera, the target image and the outer contour image of the convex lens can be directly obtained.
[0072] Step 140, determining the horizontal distance and the vertical distance between the center point of the target image and the center point of the outer contour image;
[0073] It can be understood that the horizontal distance between the center point of the target image and the center point of the outer contour image represents the relative position between the display screen and the convex lens in the horizontal direction, and the vertical distance between the center point of the target image and the center point of the outer contour image represents the relative position between the display screen and the convex lens in the vertical direction. By determining the above-mentioned horizontal distance and vertical distance, the adjustment direction of the convex lens in the video darkbox can be further determined.
[0074] It should be noted that the convex lens can be set at different positions for multiple times, and step 140 can be repeated to ensure that the center of the convex lens coincides with the center of the camera, that is, the optical axis of the convex lens coincides with the center line of the camera, and the coincidence here means coincidence within a certain error range.
[0075] Step 150: Adjust the convex lens in the video darkbox according to the horizontal distance and the vertical distance.
[0076] Specifically, a motor arranged in the mounting base of the convex lens is used to move the convex lens in the video darkbox by the horizontal distance along the width direction of the vehicle body; and the convex lens in the video darkbox is moved by the vertical distance along the height direction of the vehicle body, thereby achieving adjustment of the convex lens in the video darkbox.
[0077] In this embodiment, the camera and the display screen in the video darkbox are first aligned; then the first image is displayed on the display screen, and the center point of the first image is located at the center of the display screen; then, the target image and the outer contour image of the convex lens are obtained from the camera, and the target image is the image of the first image after being transmitted through the convex lens; the horizontal distance and the vertical distance between the center point of the target image and the center point of the outer contour image are further determined; according to the horizontal distance and the vertical distance, the convex lens in the video darkbox is adjusted, and the center of the camera, the center of the convex lens and the center of the display screen can be automatically adjusted to the same straight line, which can improve the imaging clarity of the camera and further improve the detection performance of the camera.
[0078] Further, in some embodiments, determining the horizontal distance and the vertical distance between the center point of the target image and the center point of the outer contour image includes:
[0079] Step 210, obtaining the outer contour radius of the convex lens;
[0080] Step 220, obtaining a first number of pixels and a second number of pixels, wherein the first number of pixels is the number of pixels located on a circular ring radius in a horizontal direction in the outer contour image, and the second number of pixels is the number of pixels located on a circular ring radius in a vertical direction in the outer contour image;
[0081] In a specific implementation, after the target image and the outer contour image of the convex lens are imaged in the camera, image detection is used to identify the number of pixel points on the horizontal radius of the circular ring in the outer contour image, and to identify the number of pixel points on the vertical radius of the circular ring in the outer contour image.
[0082] Step 230: Obtain a first pixel distance and a second pixel distance, wherein the first pixel distance is the pixel distance between the center point of the target image and the center point of the outer contour image in the horizontal direction, and the second pixel distance is the pixel distance between the center point of the target image and the center point of the outer contour image in the vertical direction;
[0083] Furthermore, the pixel distance between the center point of the target image and the center point of the outer contour image in the horizontal direction is identified through image detection, and the second pixel distance is identified as the pixel distance between the center point of the target image and the center point of the outer contour image in the vertical direction.
[0084] Step 240: determining a horizontal distance between a center point of the target image and a center point of the outer contour image based on the outer contour radius, the first number of pixels and the first pixel distance;
[0085] In a specific implementation, the horizontal distance between the center point of the target image and the center point of the outer contour image is determined by the following formula:
[0086]
[0087] Wherein, x is the horizontal distance between the center point of the target image and the center point of the outer contour image, R is the outer contour radius, X1 is the first pixel number, and X2 is the first pixel distance.
[0088] Step 250: Determine a vertical distance between a center point of the target image and a center point of the outer contour image based on the outer contour radius, the second number of pixels and the second pixel distance.
[0089] In a specific implementation, the vertical distance between the center point of the target image and the center point of the outer contour image is determined by the following formula:
[0090]
[0091] Wherein, y is the vertical distance between the center point of the target image and the center point of the outer contour image, R is the outer contour radius, Y1 is the second pixel number, and Y2 is the second pixel distance.
[0092] In this embodiment, it is described how to automatically determine the horizontal distance and the vertical distance between the center point of the target image and the center point of the outer contour image, which can improve the adjustment efficiency and adjustment accuracy of the convex lens of the video darkroom.
[0093] In a second aspect, an embodiment of the present application also provides a convex lens automatic adjustment device based on a video darkroom.
[0094] In one embodiment, referring to Figure 3 , Figure 3 This is a functional module diagram of an embodiment of a convex lens automatic adjustment device based on a video dark box of the present application. Figure 3 As shown, the convex lens automatic adjustment device 300 based on the video dark box includes:
[0095] An alignment module 310, for aligning a camera and a display screen in a video dark box;
[0096] A display module 320, configured to display a first image on a display screen, wherein a center point of the first image is located at a center position of the display screen;
[0097] An acquisition module 330 is used to acquire a target image and an outer contour image of the convex lens from the camera, wherein the target image is an image of the first image after being transmitted through the convex lens;
[0098] A determination module 340, configured to determine a horizontal distance and a vertical distance between a center point of the target image and a center point of the outer contour image;
[0099] The adjustment module 350 is used to adjust the convex lens in the video dark box according to the horizontal distance and the vertical distance.
[0100] Furthermore, in some implementations, the alignment module 310 is specifically configured to:
[0101] Adjust the camera's posture and align the center of the camera lens in the video dark box with the center of the display screen.
[0102] Further, in some implementations, the determining module 340 is specifically configured to:
[0103] Get the outer contour radius of the convex lens;
[0104] Obtain a first number of pixels and a second number of pixels, wherein the first number of pixels is the number of pixels located on a circular ring radius in a horizontal direction in the outer contour image, and the second number of pixels is the number of pixels located on a circular ring radius in a vertical direction in the outer contour image;
[0105] Acquire a first pixel distance and a second pixel distance, wherein the first pixel distance is a pixel distance between a center point of the target image and a center point of the outer contour image in a horizontal direction, and the second pixel distance is a pixel distance between a center point of the target image and a center point of the outer contour image in a vertical direction;
[0106] Determine a horizontal distance between a center point of the target image and a center point of the outer contour image based on the outer contour radius, the first number of pixels, and the first pixel distance;
[0107] Based on the outer contour radius, the second number of pixels and the second pixel distance, a vertical distance between a center point of the target image and a center point of the outer contour image is determined.
[0108] Further, in some implementations, the determining module 340 is specifically configured to:
[0109] According to the following formula, the horizontal distance between the center point of the target image and the center point of the outer contour image is determined:
[0110]
[0111] Accordingly, the vertical distance between the center point of the target image and the center point of the outer contour image is determined according to the following formula:
[0112]
[0113] Among them, x is the horizontal distance between the center point of the target image and the center point of the outer contour image, y is the vertical distance between the center point of the target image and the center point of the outer contour image, R is the outer contour radius, X1 is the number of first pixel points, Y1 is the number of second pixel points, X2 is the first pixel distance, and Y2 is the second pixel distance.
[0114] Furthermore, in some implementations, the adjustment module 350 is specifically configured to:
[0115] Moving the convex lens in the video dark box by the horizontal distance along the width direction of the vehicle body;
[0116] The convex lens in the video dark box is moved along the vehicle body height direction by the vertical distance.
[0117] Among them, the functional implementation of each module in the above-mentioned convex lens automatic adjustment device based on video dark box corresponds to the various steps in the above-mentioned convex lens automatic adjustment method embodiment based on video dark box, and its functions and implementation processes will not be repeated here one by one.
[0118] In a third aspect, an embodiment of the present application provides an automatic adjustment device for a convex lens based on a video darkbox. The automatic adjustment device for a convex lens based on a video darkbox can be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.
[0119] Reference Figure 4 , Figure 4 Schematic diagram of the hardware structure of the automatic adjustment device for convex lens based on video dark box involved in the embodiment of the present application. In the embodiment of the present application, the automatic adjustment device for convex lens based on video dark box may include a processor, a memory, a communication interface and a communication bus.
[0120] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.
[0121] The communication interface includes an input / output (I / O) interface, a physical interface, and a logical interface, etc., which are used to realize the interconnection of devices inside the convex lens automatic adjustment device based on the video dark box, and an interface used to realize the interconnection of the convex lens automatic adjustment device based on the video dark box with other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, an optical fiber interface, an ATM interface, etc.; the user device can be a display (Display), a keyboard (Keyboard), etc.
[0122] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0123] The processor may be a general-purpose processor, which may call the automatic adjustment program for the convex lens based on the video dark box stored in the memory, and execute the automatic adjustment method for the convex lens based on the video dark box provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the automatic adjustment program for the convex lens based on the video dark box is called may refer to the various embodiments of the automatic adjustment method for the convex lens based on the video dark box of the present application, which will not be repeated here.
[0124] Those skilled in the art will understand that Figure 4 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0125] In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium.
[0126] The computer-readable storage medium of the present application stores a convex lens automatic adjustment program based on a video dark box, wherein when the convex lens automatic adjustment program based on a video dark box is executed by a processor, the steps of the convex lens automatic adjustment method based on a video dark box as described above are implemented.
[0127] Among them, the method implemented when the convex lens automatic adjustment program based on the video dark box is executed can refer to the various embodiments of the convex lens automatic adjustment method based on the video dark box of the present application, and will not be repeated here.
[0128] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0129] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.
[0130] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0131] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0132] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0133] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.
[0134] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for automatically adjusting a convex lens based on a video darkroom, characterized in that: The convex lens automatic adjustment method based on the video dark box comprises: Align the camera and display screen in the video darkbox; Displaying a first image on a display screen, wherein a center point of the first image is located at a center position of the display screen; Acquire a target image and an outer contour image of the convex lens from the camera, wherein the target image is an image of the first image after being transmitted through the convex lens; Determine the horizontal distance and the vertical distance between the center point of the target image and the center point of the outer contour image; The convex lens in the video dark box is adjusted according to the horizontal distance and the vertical distance.
2. The method for automatically adjusting a convex lens based on a video darkroom according to claim 1, characterized in that: The step of aligning the camera and the display screen in the video dark box includes: Adjust the camera's posture and align the center of the camera lens in the video dark box with the center of the display screen.
3. The method for automatically adjusting the convex lens based on the video dark box according to claim 1, characterized in that: Determining the horizontal distance and the vertical distance between the center point of the target image and the center point of the outer contour image includes: Get the outer contour radius of the convex lens; Obtain a first number of pixels and a second number of pixels, wherein the first number of pixels is the number of pixels located on a circular ring radius in a horizontal direction in the outer contour image, and the second number of pixels is the number of pixels located on a circular ring radius in a vertical direction in the outer contour image; Acquire a first pixel distance and a second pixel distance, wherein the first pixel distance is a pixel distance between a center point of the target image and a center point of the outer contour image in a horizontal direction, and the second pixel distance is a pixel distance between a center point of the target image and a center point of the outer contour image in a vertical direction; Determine a horizontal distance between a center point of the target image and a center point of the outer contour image based on the outer contour radius, the first number of pixels, and the first pixel distance; Based on the outer contour radius, the second number of pixels and the second pixel distance, a vertical distance between a center point of the target image and a center point of the outer contour image is determined.
4. The method for automatically adjusting a convex lens based on a video dark box as claimed in claim 3, characterized in that: The horizontal distance between the center point of the target image and the center point of the outer contour image is determined based on the outer contour radius, the first number of pixels and the first pixel distance, and the corresponding formula is: Accordingly, the vertical distance between the center point of the target image and the center point of the outer contour image is determined based on the outer contour radius, the second number of pixels and the second pixel distance, and the corresponding formula is: Among them, x is the horizontal distance between the center point of the target image and the center point of the outer contour image, y is the vertical distance between the center point of the target image and the center point of the outer contour image, R is the outer contour radius, X1 is the number of first pixel points, Y1 is the number of second pixel points, X2 is the first pixel distance, and Y2 is the second pixel distance.
5. The method for automatically adjusting the convex lens based on the video dark box according to claim 1, characterized in that: The step of adjusting the convex lens in the video dark box according to the horizontal distance and the vertical distance includes: Moving the convex lens in the video dark box by the horizontal distance along the width direction of the vehicle body; The convex lens in the video dark box is moved along the vehicle body height direction by the vertical distance.
6. A convex lens automatic adjustment device based on a video darkroom, characterized in that: The convex lens automatic adjustment device based on the video dark box comprises: An alignment module, used to align the camera and the display screen in the video darkbox; A display module, configured to display a first image on a display screen, wherein a center point of the first image is located at a center position of the display screen; An acquisition module, used to acquire a target image and an outer contour image of the convex lens from a camera, wherein the target image is an image of the first image after being transmitted through the convex lens; A determination module, used to determine the horizontal distance and the vertical distance between the center point of the target image and the center point of the outer contour image; The adjustment module is used to adjust the convex lens in the video dark box according to the horizontal distance and the vertical distance.
7. The automatic adjustment device for convex lens based on video dark box according to claim 6, characterized in that: The alignment module is specifically used for: Adjust the camera's posture and align the center of the camera lens in the video dark box with the center of the display screen.
8. The automatic adjustment device for convex lens based on video dark box according to claim 6, characterized in that: The determination module is specifically used for: Get the outer contour radius of the convex lens; Obtain a first number of pixels and a second number of pixels, wherein the first number of pixels is the number of pixels located on a circular ring radius in a horizontal direction in the outer contour image, and the second number of pixels is the number of pixels located on a circular ring radius in a vertical direction in the outer contour image; Acquire a first pixel distance and a second pixel distance, wherein the first pixel distance is a pixel distance between a center point of the target image and a center point of the outer contour image in a horizontal direction, and the second pixel distance is a pixel distance between a center point of the target image and a center point of the outer contour image in a vertical direction; Determine a horizontal distance between a center point of the target image and a center point of the outer contour image based on the outer contour radius, the first number of pixels, and the first pixel distance; Based on the outer contour radius, the second number of pixels and the second pixel distance, a vertical distance between a center point of the target image and a center point of the outer contour image is determined.
9. A convex lens automatic adjustment device based on a video darkroom, characterized in that: The automatic adjustment device for convex lenses based on video dark box includes a processor, a memory, and an automatic adjustment program for convex lenses based on video dark box stored in the memory and executable by the processor, wherein when the automatic adjustment program for convex lenses based on video dark box is executed by the processor, the steps of the automatic adjustment method for convex lenses based on video dark box as described in any one of claims 1 to 5 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a convex lens automatic adjustment program based on a video dark box, wherein when the convex lens automatic adjustment program based on a video dark box is executed by a processor, the steps of the convex lens automatic adjustment method based on a video dark box as described in any one of claims 1 to 5 are implemented.
