Vehicle window opening compensation value determination method and device and electronic device
The automatic adjustment of the window opening through image recognition technology solves the problems of large errors and low efficiency in window opening compensation value testing, and achieves high-precision and efficient window control.
Patent Information
- Application Number
- CN202510780595.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-09-16
AI Technical Summary
In the prior art, the test error of the window opening compensation value is large and the test efficiency is low, and the manual measurement method is inaccurate and time-consuming.
Through image recognition technology, a camera is used to capture images of adjusted window openings, which are then matched with a template image library to automatically adjust the window opening value until the preset number of tests is reached to determine the target window opening compensation value.
It improves the accuracy of window opening control and system stability, reduces manual intervention, reduces maintenance costs, and improves testing efficiency and user experience.
Smart Images

Figure CN120649759A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of vehicle networking technology, and in particular to a method, device, and electronic device for determining a window opening compensation value. Background Art
[0002] In recent years, with the development of intelligent connected vehicles (ICVs), an increasing number of intelligent systems have been incorporated into vehicles, providing drivers with a more convenient, safe, and comfortable driving experience. Windows, as a crucial channel for communication between the vehicle's interior and exterior environments, play a crucial role in ICVs. However, because window opening and closing involve the coordinated operation of multiple electronic components, various issues can arise during actual use, such as the window position not matching expectations. To ensure proper operation of the windows, precise control and compensation of the window opening are required.
[0003] In the prior art, the method of manually measuring the window opening compensation value has the problems of large test errors and low test efficiency. Therefore, how to measure and obtain a more accurate window opening compensation value is an urgent problem to be solved. Summary of the Invention
[0004] The embodiments of the present application provide a method, device and electronic device for determining a window opening compensation value, aiming to improve the technical problems in the prior art of inaccurate window opening compensation values obtained through manual measurement and low testing efficiency.
[0005] According to one aspect of an embodiment of the present invention, a method for determining a window opening compensation value is provided, comprising: in response to receiving a test instruction, adjusting the window opening value and photographing the window after the window opening value is adjusted to obtain a first picture, wherein the test instruction is an instruction for adjusting the desired window opening value to a specified opening value, and the first picture is a picture of the window photographed after the window opening value is adjusted based on an initial window opening compensation value; determining a first actual opening value corresponding to the first picture based on the window opening value corresponding to the second picture, wherein the second picture is a template picture whose similarity with the first picture is greater than a preset threshold; determining a first window opening compensation value based on the specified opening value and the first actual opening value, wherein the first window opening compensation value is an opening error when the window opening value is controlled to be adjusted to the specified opening value based on the test instruction; adjusting the window opening value for the next test based on the first window opening compensation value until a preset number of tests is reached to obtain a target window opening compensation value.
[0006] Through the above-mentioned technical solution as a whole, the purpose of automatically optimizing the window opening compensation value is achieved, thereby realizing the technical effect of improving the window opening control accuracy and system stability, and further solving the technical problems in the existing technology of inaccurate window opening compensation values obtained by manual measurement and low testing efficiency.
[0007] Furthermore, the method for determining the window opening compensation value also includes: in response to the initial window opening compensation value being the same as the target window opening compensation value, compensating the window opening value based on the initial window opening compensation value; or, in response to the initial window opening compensation value being different from the target window opening compensation value, compensating the window opening value based on the target window opening compensation value.
[0008] Through the above technical solution, the initial compensation value and the target compensation value are automatically compared, and the system can intelligently determine whether the compensation value needs to be updated, thereby reducing the need for manual intervention and making the window opening control process more intelligent and efficient.
[0009] Furthermore, determining the first actual opening value corresponding to the first picture based on the window opening value corresponding to the second picture includes: matching the first picture with the template picture library to obtain a second picture, wherein the second picture carries the window opening value; and determining the first actual opening value based on the window opening value carried by the second picture.
[0010] Through the above technical solution, image recognition and matching technology is used to quickly match the first image with the images in the template library to obtain a second image. The window opening value of the second image can be used to accurately identify the actual position of the window in the first image, thereby obtaining a more accurate window opening measurement value, avoiding the inaccuracy and repeatability of traditional manual measurement.
[0011] Furthermore, the window opening value at the next test is adjusted based on the first window opening compensation value until a preset number of tests is reached to obtain a target window opening compensation value, including: adjusting the window opening value to a specified opening value based on the first window opening compensation value, and obtaining a third picture after the window opening value is adjusted; determining a second actual opening value corresponding to the third picture based on a fourth picture, wherein the fourth picture is a template picture whose similarity to the third picture is greater than a preset threshold; determining a second window opening compensation value based on the specified opening value and the second actual opening value, wherein the second window opening compensation value is an opening error when the control window opening value is adjusted to the specified opening value; adjusting the window opening value at the next test based on the second window opening compensation value until a preset number of tests is reached to obtain a target window opening compensation value.
[0012] Through the above technical solution, the test process forms a closed loop. The test results after each adjustment will be used to calculate the next window opening compensation value. Through continuous iteration and fine-tuning of the compensation value, the above technical solution can significantly improve the accuracy and stability of window opening control, while reducing maintenance costs and improving user experience.
[0013] Furthermore, the method for determining the window opening compensation value also includes: calling a camera to shoot the window at different opening positions to obtain multiple fifth pictures; performing image preprocessing on the multiple fifth pictures to obtain multiple sixth pictures; and creating a template picture library based on the multiple sixth pictures.
[0014] Through the above technical solution, pictures of the car windows at different opening positions are taken and recorded, ensuring that the template image library contains all states of the car windows from fully closed to fully open. The clarity and contrast of the template images are enhanced through the image preprocessing step, making the template images more accurate and consistent, and improving the accuracy and reliability of subsequent opening measurements.
[0015] Furthermore, in response to receiving a test instruction, the window opening value is adjusted and the window after the window opening value is adjusted is photographed to obtain a first picture, including: in response to receiving a test instruction, the window opening value is adjusted to a specified opening value based on an initial window opening compensation value; calling a camera to photograph the window after the window opening value is adjusted to obtain a seventh picture; and performing image preprocessing on the seventh picture to obtain a first picture.
[0016] Through the above technical solution, the method of instantly adjusting the window opening and capturing images can quickly respond to test needs, provide instant feedback information to the system, and speed up the testing process.
[0017] According to another aspect of an embodiment of the present invention, a device for determining a window opening compensation value is also provided, including an acquisition module, the acquisition module being configured to adjust the window opening value and photograph the window after the window opening value is adjusted in response to receiving a test instruction, to obtain a first picture, wherein the test instruction is an instruction for adjusting the desired window opening value to a specified opening value, and the first picture is a picture of the window photographed after the window opening value is adjusted based on an initial window opening compensation value; a first determination module, the first determination module being configured to determine a first actual opening value corresponding to the first picture based on the window opening value corresponding to the second picture, wherein the second picture is a template picture whose similarity with the first picture is greater than a preset threshold; a second determination module, the second determination module being configured to determine a first window opening compensation value based on the specified opening value and the first actual opening value, wherein the first window opening compensation value is an opening error when the window opening value is adjusted to the specified opening value based on the test instruction; and an adjustment module, the adjustment module being configured to adjust the window opening value for the next test based on the first window opening compensation value until a preset number of tests is reached to obtain a target window opening compensation value.
[0018] Furthermore, the window opening compensation value determination device also includes a compensation module, which is used to compensate the window opening value based on the initial window opening compensation value in response to the initial window opening compensation value being the same as the target window opening compensation value; or, in response to the initial window opening compensation value being different from the target window opening compensation value, compensate the window opening value based on the target window opening compensation value.
[0019] Furthermore, the first determination module is also used to match the first picture with the template picture library to obtain a second picture, wherein the second picture carries the window opening value; and determine the first actual opening value based on the window opening value carried by the second picture.
[0020] Furthermore, the adjustment module is also used to adjust the window opening value to a specified opening value based on the first window opening compensation value, and obtain a third picture after the window opening value is adjusted; determine the second actual opening value corresponding to the third picture based on the fourth picture, wherein the fourth picture is a template picture whose similarity with the third picture is greater than a preset threshold; determine the second window opening compensation value based on the specified opening value and the second actual opening value, wherein the second window opening compensation value is the opening error when the control window opening value is adjusted to the specified opening value; adjust the window opening value at the next test based on the second window opening compensation value until the preset number of tests is reached to obtain the target window opening compensation value.
[0021] Furthermore, the device for determining the window opening compensation value also includes a creation module, which is used to call the camera to shoot the window at different opening positions to obtain multiple fifth pictures; perform image preprocessing on the multiple fifth pictures to obtain multiple sixth pictures; and create a template picture library based on the multiple sixth pictures.
[0022] Furthermore, the acquisition module is also used to adjust the window opening value to a specified opening value based on the initial window opening compensation value in response to receiving a test instruction; call the camera to shoot the window after the window opening value is adjusted to obtain a seventh picture; and perform image preprocessing on the seventh picture to obtain the first picture.
[0023] According to another aspect of an embodiment of the present invention, a vehicle is provided, comprising: a memory storing an executable program; and a processor for running the program, wherein the method for determining a window opening compensation value in each embodiment of the present invention is executed when the program is running.
[0024] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the method for determining the window opening compensation value in each embodiment of the present invention when running on a computer or processor.
[0025] According to another aspect of an embodiment of the present invention, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for determining the window opening compensation value in various embodiments of the present invention.
[0026] In an embodiment of the present invention, a first picture is obtained by adjusting the window opening value and photographing the window after the window opening value is adjusted in response to receiving a test instruction, wherein the test instruction is an instruction for adjusting the expected window opening value to a specified opening value, and the first picture is a picture of the window photographed after the window opening value is adjusted based on the initial window opening compensation value; a first actual opening value corresponding to the first picture is determined based on the window opening value corresponding to the second picture, wherein the second picture is a template picture whose similarity with the first picture is greater than a preset threshold; the first window is determined based on the specified opening value and the first actual opening value The window opening compensation value is a value obtained by adjusting the window opening value to a specified value based on a test instruction, and the window opening value in the next test is adjusted based on the first window opening compensation value until a preset number of tests is reached to obtain a target window opening compensation value. The technical solution achieves the purpose of automatically optimizing the window opening compensation value, thereby realizing the technical effect of improving the window opening control accuracy and system stability, and further solves the technical problem in the prior art that the window opening compensation value obtained by manual measurement is inaccurate and the test efficiency is low. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 This is a flow chart of a method for determining a window opening compensation value provided by an embodiment of the present application;
[0028] Figure 2 This is a schematic diagram of a window opening compensation value test process provided by an embodiment of the present application;
[0029] Figure 3 This is a window opening compensation value testing process provided by an embodiment of the present application;
[0030] Figure 4 is a structural diagram of a device for determining a window opening compensation value provided in an embodiment of the present application;
[0031] Figure 5 It is a structural diagram of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the technical problems, technical solutions and beneficial effects solved by this application more clearly understood, this application is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0033] In order to help those skilled in the art better understand the present technical solution, the following terminology is explained:
[0034] Template images are a collection of reference images captured at different window opening positions, used for subsequent image matching. Each template image represents a window at a specific opening position. By matching it with the real-time image, the system can accurately determine the actual window opening position.
[0035] The window opening compensation value is set to correct for window opening deviations caused by factors such as inertia and mechanical errors during the window opening and closing process. In the control system, timely adjustment of this compensation value ensures that the actual window opening position is highly consistent with the desired control target.
[0036] Existing manual testing methods primarily involve attaching a tape strip to the window glass and marking a specific opening position. Repeatedly, the strip is manually measured to calculate the window opening compensation value by measuring the displacement of the marked point. The specific steps of the manual testing method are: Apply the tape strip to the window glass and mark line a at the initial top dead center position; jog the window down 30 times to the stop position, then automatically raise it to the initial top dead center, and mark line b on the tape strip; use a ruler to measure the distance k between lines a and b, representing the inertial displacement of the window when it stops. If distance k is less than 1mm, the window opening compensation value is considered acceptable; otherwise, adjustment is required. Technical limitations of the manual testing method include: Manually measuring the distance k between lines a and b can introduce additional errors due to individual differences, viewing angles, and lighting conditions. Furthermore, the manual testing method requires multiple attempts to obtain a single result, and each attempt requires waiting for the window to reach the specified position, significantly reducing testing efficiency. Due to the limited number of tests, the data obtained was insufficient to fully reflect the changes in window opening compensation values over long-term use, resulting in low data reliability. Furthermore, the entire process required manual operation, which increased personnel costs. Long periods of manual operation can easily lead to fatigue, affecting test continuity and accuracy.
[0037] A method for determining a window opening compensation value provided by an embodiment of the present application includes: in response to receiving a test instruction, adjusting the window opening value and photographing the window after the window opening value is adjusted to obtain a first picture, wherein the test instruction is an instruction for adjusting the desired window opening value to a specified opening value, and the first picture is a picture of the window photographed after the window opening value is adjusted based on an initial window opening compensation value; determining a first actual opening value corresponding to the first picture based on the window opening value corresponding to the second picture, wherein the second picture is a template picture whose similarity with the first picture is greater than a preset threshold; determining a first window opening compensation value based on the specified opening value and the first actual opening value, wherein the first window opening compensation value is an opening error when the window opening value is controlled to be adjusted to the specified opening value based on the test instruction; adjusting the window opening value for the next test based on the first window opening compensation value until a preset number of tests is reached to obtain a target window opening compensation value.
[0038] Through the above-mentioned technical solution as a whole, the purpose of automatically optimizing the window opening compensation value is achieved, thereby realizing the technical effect of improving the window opening control accuracy and system stability, and further solving the technical problems in the existing technology of inaccurate window opening compensation values obtained by manual measurement and low testing efficiency.
[0039] This embodiment of the application provides a method for determining a window opening compensation value. Please refer to Figure 1 , including the following steps:
[0040] Step S10: In response to receiving the test instruction, adjusting the window opening value and photographing the window after the window opening value is adjusted to obtain a first image, wherein the test instruction is an instruction to adjust the desired window opening value to a specified opening value, and the first image is an image of the window taken after the window opening value is adjusted based on the initial window opening compensation value;
[0041] In the embodiments of the present invention, a test command can be understood as a command issued by a test system, which is intended to instruct the window control system to adjust the window opening to a specific value. For example, the command is typically transmitted to the window control unit in the form of an electronic signal, triggering the subsequent window opening adjustment action, although this is not a limitation herein.
[0042] The window opening value can be understood as being used to indicate the degree to which the window is currently open. For example, the window opening value is usually expressed in percentage form, such as 0% represents that the window is completely closed, 100% represents that the window is completely open, and values between 0% and 100% represent different degrees of window opening status, which are not limited here.
[0043] The first image can be understood as a real-time image of the window captured by the camera after the window opening value has been adjusted to the specified value. This image is key data used during the test to reflect the actual window opening state and is used for subsequent image processing and opening value calibration.
[0044] The designated opening value can be understood as the target opening value preset in the test instruction, i.e., the opening position to which the window should be adjusted. For example, during the test, the window control system will adjust the window opening and closing state according to the designated opening value to verify the accuracy of the window opening compensation value.
[0045] The initial window opening compensation value can be understood as a window opening compensation parameter pre-set in the window control system software. It is used to offset opening errors caused by factors such as inertia when the window stops operating. For example, before the test begins, the window control system uses this compensation value to adjust the window opening. The compensation value is then further optimized based on a comparison of the actual opening value in the first image with the specified opening value.
[0046] In response to receiving a test instruction, adjusting the window opening value and photographing the window after the window opening value is adjusted, and obtaining the first picture can be understood as, when receiving an instruction to adjust the desired window opening value to the specified opening value, the system adjusts the window opening value based on the initial window opening compensation value, and photographs the actual position of the window after the window opening value is adjusted, to obtain the first picture.
[0047] In an embodiment of the present invention, in response to receiving a test instruction, the window control system automatically adjusts the window to the target opening based on the specified opening value in the instruction and the initial window opening compensation value. At the same time, the camera immediately takes a first picture of the current state of the window, reducing errors caused by manual operation, reducing labor costs, and ensuring the accuracy of the window opening compensation value.
[0048] Step S12: determining a first actual window opening value corresponding to the first picture based on the window opening value corresponding to the second picture, wherein the second picture is a template picture having a similarity with the first picture greater than a preset threshold;
[0049] In the embodiment of the present invention, the second picture can be understood as a template picture that best matches the first picture among a series of template pictures stored in the system.
[0050] The first actual opening value can be understood as the actual window opening value after the test command is triggered, as determined by matching the first image with the second image. For example, the second image corresponds to an opening value, and the system can infer the actual window opening value in the first image by matching the first image with the second image, thereby obtaining the first actual opening value.
[0051] The preset threshold can be understood as a standard set in the image matching algorithm to determine the degree of similarity between two images. If the similarity between a first image and a second image exceeds the preset threshold, the first and second images are considered highly similar, and the first image and its corresponding second image can be considered to have the same window opening state. For example, the preset threshold can be set to 0.9, which is not a limitation here.
[0052] Determining the first actual opening value corresponding to the first picture based on the second picture can be understood as determining the actual opening value of the vehicle window (ie, the first actual opening value) based on the second picture that is most similar to the first picture.
[0053] In the embodiment of the present invention, by determining the first actual opening value corresponding to the first image based on the second image, the reliability of the test data can be ensured, and the test efficiency of the vehicle window control system performance verification is improved.
[0054] Step S14: determining a first window opening compensation value based on the designated opening value and the first actual opening value, wherein the first window opening compensation value is an opening error when the window opening value is adjusted to the designated opening value based on the test instruction;
[0055] In an embodiment of the present invention, the first window opening compensation value can be understood as the difference between the actual opening value achieved (i.e., the first actual opening value) and the target opening value (i.e., the specified opening value) when the window opening value is adjusted to the desired specified opening value based on the test instruction.
[0056] Determining the first window opening compensation value based on the specified opening value and the first actual opening value can be understood as comparing the first actual opening value with the specified opening value and calculating the opening error between the two. The opening error reflects the degree of deviation of the window control system when achieving the specified opening value. Based on the opening error, the first window opening compensation value can be determined.
[0057] In the embodiment of the present invention, the first window opening compensation value is determined based on the designated opening value and the first actual opening value, thereby automatically correcting the inertia offset of the window control system, thereby effectively eliminating the window control error.
[0058] Step S16: adjusting the window opening value for the next test based on the first window opening compensation value until a preset number of tests is reached to obtain a target window opening compensation value.
[0059] In the embodiment of the present invention, the preset number of tests can be understood as the number of times the system performs iterative optimization to obtain the target window opening compensation value. For example, the preset number of tests can be set to 100,000 times, which is not limited here.
[0060] The target window opening compensation value can be understood as the final window opening compensation value determined by the system through statistical analysis after the preset number of tests are completed.
[0061] Based on the first window opening compensation value, the window opening value in the next test is adjusted until the preset number of tests is reached. The target window opening compensation value is obtained. It can be understood that after each test, the window opening control parameters are adjusted according to the first window opening compensation value (that is, the compensation value calculated in the previous test). After completing the preset number of tests, the system will analyze the test data obtained to determine the final compensation value of the window opening, that is, the target window opening compensation value.
[0062] In an embodiment of the present invention, the window opening value in the next test is adjusted based on the first window opening compensation value until a preset number of tests is reached to obtain a target window opening compensation value. Through iterative testing and continuous adjustment of the compensation value, the accuracy of the window opening control can be significantly improved, ensuring that the window can be accurately stopped at the position desired by the user, and reducing opening errors caused by factors such as mechanical inertia and motor response delay.
[0063] In an embodiment of the present invention, a first picture is obtained by adjusting the window opening value and photographing the window after the window opening value is adjusted in response to receiving a test instruction, wherein the test instruction is an instruction for adjusting the expected window opening value to a specified opening value, and the first picture is a picture of the window photographed after the window opening value is adjusted based on the initial window opening compensation value; a first actual opening value corresponding to the first picture is determined based on the window opening value corresponding to the second picture, wherein the second picture is a template picture whose similarity with the first picture is greater than a preset threshold; the first window is determined based on the specified opening value and the first actual opening value The window opening compensation value is a value obtained by adjusting the window opening value to a specified value based on a test instruction, and the window opening value in the next test is adjusted based on the first window opening compensation value until a preset number of tests is reached to obtain a target window opening compensation value. The technical solution achieves the purpose of automatically optimizing the window opening compensation value, thereby realizing the technical effect of improving the window opening control accuracy and system stability, and further solves the technical problem in the prior art that the window opening compensation value obtained by manual measurement is inaccurate and the test efficiency is low.
[0064] Optionally, the method for determining the window opening compensation value further includes the following steps:
[0065] In response to the initial window opening compensation value being the same as the target window opening compensation value, compensating the window opening value based on the initial window opening compensation value; or,
[0066] In response to the initial window opening compensation value being different from the target window opening compensation value, the window opening value is compensated based on the target window opening compensation value.
[0067] In this embodiment of the present invention, in response to the initial window opening compensation value being identical to the target window opening compensation value, compensating the window opening value based on the initial window opening compensation value can be understood as follows: if, after a series of tests and iterative optimization, the initial window opening compensation value determined by the system is consistent with the target window opening compensation value obtained after 100,000 tests, then the initial setting value has been verified to be accurate. For example, when the initial window opening compensation value is identical to the target window opening compensation value, the initial compensation value can continue to be used to compensate the window opening, ensuring that each time the window moves to a specified position, the window opening error is minimized and the window accurately stops at the desired position.
[0068] In response to the initial window opening compensation value being different from the target window opening compensation value, compensating the window opening value based on the target window opening compensation value can be understood as follows: after multiple iterative tests, if the initial window opening compensation value differs from the target window opening compensation value, the target window opening compensation value represents the optimal window opening compensation value determined by the system after 100,000 tests. When the initial window opening compensation value differs from the target window opening compensation value, the target window opening compensation value should be used to replace the initial window opening compensation value to compensate for the window opening. This allows for more precise adjustment of the motor drive, reduces error factors such as mechanical inertia, ensures high precision and consistency of window opening, and thus improves vehicle performance and user experience.
[0069] In an embodiment of the present invention, a target window opening compensation value is determined through iterative testing. When the initial window opening compensation value is the same as the target window opening compensation value, the initial value is directly used to compensate for the window opening to ensure control accuracy. If the two are different, the target window opening compensation value is used for compensation to correct the control error, thereby improving the accuracy and stability of the window opening control and reducing the opening error caused by mechanical inertia.
[0070] Optionally, in step S12, determining the first actual window opening value corresponding to the first picture based on the window opening value corresponding to the second picture includes the following steps:
[0071] Step S121, matching the first image with a template image library to obtain a second image, wherein the second image carries the window opening value;
[0072] Step S122: determining a first actual window opening value based on the window opening value carried in the second image.
[0073] In an embodiment of the present invention, the template image library can be understood as a set of images that have been pre-collected and labeled with specific window opening values. For example, the template images are taken at different window openings, covering all possible states from fully closed (0% opening) to fully open (100% opening), and each image corresponds to a window opening percentage. For example, a template image can be taken for every 0.1% opening of the window, and the number of window templates taken is 1,000. The template is the source for obtaining the actual window opening position, which is not limited here.
[0074] Matching the first picture with the template picture library to obtain the second picture can be understood as the system comparing the first picture taken in real time (i.e., the picture of the current actual window opening) with multiple pictures of known opening states stored in the template picture library. The matching goal is to find a template picture that is most similar to the first picture, i.e., the second picture.
[0075] Determining the first actual opening value based on the window opening value carried by the second picture can be understood as, after finding the second picture that best matches the first picture (the current actual state of the window), the system will determine the actual opening value of the window at this moment, that is, the first actual opening value, based on the window opening value marked in the second picture.
[0076] In an embodiment of the present invention, by accurately matching a first picture taken in real time with a template picture library, a second picture carrying the current window opening value is found, and based on the window opening value of the second picture, the first actual opening value of the current window is determined, thereby improving the accuracy and stability of the window opening detection.
[0077] Optionally, in step S16, adjusting the window opening value for the next test based on the first window opening compensation value until a preset number of tests is reached to obtain a target window opening compensation value includes the following execution steps:
[0078] Step S161, adjusting the window opening value to a specified opening value based on the first window opening compensation value, and acquiring a third image after the window opening value is adjusted;
[0079] Step S162, determining a second actual opening value corresponding to the third picture based on a fourth picture, wherein the fourth picture is a template picture having a similarity with the third picture greater than a preset threshold;
[0080] Step S163, determining a second window opening compensation value based on the designated opening value and the second actual opening value, wherein the second window opening compensation value is an opening error when the control window opening value is adjusted to the designated opening value;
[0081] Step S164 , adjusting the window opening value for the next test based on the second window opening compensation value until a preset number of tests is reached to obtain a target window opening compensation value.
[0082] In this embodiment of the present invention, the third image can be understood as a real-time image of the actual window opening state captured by the system via a camera after the window opening value has been adjusted to the specified target opening. For example, the third image reflects the actual state of the window opening value after adjustment and is used for subsequent matching with images in the template image library and confirmation of the window opening value.
[0083] The fourth picture can be understood as a template picture in the template picture library that has the highest similarity with the third picture.
[0084] The second actual opening value can be understood as the actual opening value of the window after adjustment, which is calculated and confirmed by the system based on the opening value carried by the fourth picture.
[0085] The second window opening compensation value may be understood as a deviation between the designated opening value and the second actual opening value.
[0086] Adjusting the window opening value to a specified opening value based on the first window opening compensation value and obtaining a third image after the window opening value is adjusted can be understood as using the current window opening compensation value (i.e., the first window opening compensation value) to adjust the window opening to a predetermined target opening value. After the adjustment is completed, a camera is used to capture an image reflecting the actual window opening state after the adjustment, i.e., the third image.
[0087] Determining the second actual opening value corresponding to the third picture based on the fourth picture can be understood as the system matching the third picture (the actual picture of the adjusted window opening) with the pictures in the template picture library to find the template picture with the highest similarity, that is, the fourth picture.
[0088] Determining the second window opening compensation value based on the specified opening value and the second actual opening value can be understood as follows: after obtaining the specified opening value (the desired window opening setting value) and the second actual opening value (the actual window opening value obtained through image recognition), the system will calculate the difference between the two and obtain the second window opening compensation value based on the difference.
[0089] Based on the second window opening compensation value, the window opening value in the next test is adjusted until the preset number of tests is reached to obtain the target window opening compensation value. It can be understood that the second window opening compensation value determined in this test cycle will be applied to the window opening value adjustment of the next test as the basis for adjustment until the preset number of tests is completed and the target window opening compensation value is finally obtained.
[0090] In this embodiment of the present invention, a first window opening compensation value is used to control the window to a preset opening, and a third image is captured. Subsequently, the image is matched with the fourth image with the highest similarity in a template library to determine a second actual window opening value. Next, the error between the target and actual window openings is calculated to generate a second window opening compensation value, which is used for the next round of window opening adjustments. This cycle repeats until the test is complete and the target window opening compensation value is obtained. Through multiple iterations, the window opening control error is gradually reduced, and closed-loop testing is automated, significantly improving test efficiency and data reliability while reducing labor costs.
[0091] Optionally, the method for determining the window opening compensation value further includes the following steps:
[0092] Using a camera to photograph the vehicle window at different opening positions to obtain a plurality of fifth images;
[0093] performing image preprocessing on the plurality of fifth images to obtain a plurality of sixth images;
[0094] A template picture library is created based on the plurality of sixth pictures.
[0095] In the embodiment of the present invention, the fifth picture can be understood as an original picture taken by a camera when the vehicle window is at different opening positions.
[0096] Image preprocessing can be understood as including but not limited to noise removal, image enhancement, contrast adjustment, size standardization, feature point extraction, etc. The purpose is to improve the clarity, contrast and recognition features of the image so as to more accurately identify the actual opening position of the window in the subsequent image matching process.
[0097] The sixth image can be understood as an optimized image obtained by performing a series of image preprocessing operations on the fifth image.
[0098] Calling the camera to shoot the car window at different opening positions to obtain multiple fifth pictures can be understood as the system controlling the car window to move to a series of preset different opening positions, and then using the camera to shoot the car window conditions at each position, thereby obtaining a series of original images reflecting the car window in different opening states.
[0099] Performing image preprocessing on multiple fifth pictures to obtain multiple sixth pictures can be understood as the system performing a series of image processing operations on the original images obtained above (i.e., the fifth pictures) to enhance image features, reduce noise, standardize image formats, etc., thereby obtaining optimized images, i.e., the sixth pictures.
[0100] Creating a template image library based on multiple sixth images can be understood as collecting and storing all pre-processed, optimized images (i.e., sixth images) in a database or file collection to form a template image library. The template image library contains characteristic images of the vehicle window at all tested opening positions, which are used in the subsequent image matching process as a comparison baseline to help the system quickly and accurately identify and determine the actual window opening position.
[0101] In this embodiment of the present invention, a camera is used to capture raw images (the fifth image) of various window opening states. These images are then preprocessed and optimized into the sixth image, creating a comprehensive template image library. Preprocessing the fifth image improves image quality, facilitates precise matching, and ensures accurate window opening detection. This template library provides a standard reference for subsequent automated testing, enabling precise calculation of window opening compensation values. This significantly improves test efficiency and data reliability, reduces manual intervention, and ensures control accuracy.
[0102] Optionally, in step S10, in response to receiving the test instruction, adjusting the window opening value and photographing the window after the window opening value is adjusted to obtain a first picture, including the following execution steps:
[0103] Step S101, in response to receiving a test instruction, adjusting the window opening value to a specified opening value based on an initial window opening compensation value;
[0104] Step S102, calling a camera to photograph the vehicle window after the window opening value is adjusted to obtain a seventh image;
[0105] Step S103: perform image preprocessing on the seventh picture to obtain the first picture.
[0106] In the embodiment of the present invention, the seventh picture can be understood as a real-time picture taken by the camera when the vehicle window is adjusted to the specified opening value according to the initial window opening compensation value after responding to the test instruction.
[0107] In response to receiving a test instruction, adjusting the window opening value to a specified opening value based on the initial window opening compensation value can be understood as, when the test system receives an instruction to start the test, adjusting the window to move to the specified opening position according to the preset initial window opening compensation value.
[0108] Calling the camera to shoot the window after the window opening value is adjusted to obtain the seventh picture can be understood as follows: after the window moves and stops at the specified opening position, the system automatically triggers the camera to shoot, captures the actual state of the window at this time, and obtains the seventh picture.
[0109] Performing image preprocessing on the seventh picture to obtain the first picture can be understood as the system preprocessing the seventh picture obtained from the camera, such as denoising, enhancement, resizing, feature extraction, etc., to obtain the first picture, so as to optimize image quality, reduce interference factors, and improve the accuracy and efficiency of subsequent image analysis.
[0110] In an embodiment of the present invention, first, the vehicle window is adjusted to a specified opening according to a test instruction and an initial compensation value. Then, the camera captures the adjusted window state in real time to obtain an unprocessed seventh image. Finally, the seventh image is optimized through image preprocessing technology to obtain a clear first image, thereby improving the accuracy and efficiency of subsequent opening detection, reducing human errors, and ensuring the reliability and consistency of the test results.
[0111] Figure 2 This is a schematic diagram of the window opening compensation value test process provided by an embodiment of the present application, such as Figure 2 As shown, the present invention proposes a method for determining a window opening compensation value. The principle is as follows: First, a camera is used to capture images of different window openings as templates, and an automated window opening detection script is executed to continuously control the window to stop at a specified opening position. Second, a camera is used to capture the actual window opening position, match the template, and obtain the actual window opening position. This is then compared with the target window opening position, obtaining a difference. This difference is then written into the updated window opening compensation value through diagnostics. Finally, a closed-loop control test is performed 100,000 times to obtain the final window opening compensation value. This value is then compared with the initial software-set window opening compensation value. If the results match, the initial software-set window opening compensation value is accurate; otherwise, it is inaccurate and needs to be updated to the final window opening compensation value. The present invention utilizes a fully automated closed-loop control test to determine the window opening compensation value, resulting in low test error, high timeliness, and low labor costs. Furthermore, the 100,000 closed-loop tests provide sufficient data verification and high reliability. In addition, through the window opening compensation value determination method proposed in the present invention, the window opening compensation value finally verified to be relatively accurate can effectively eliminate the inertia error of the window stopping, making the window control more precise, and at the same time can effectively reduce the occurrence rate of faults such as the window not closing tightly and air leakage.
[0112] Figure 3 This is a window opening compensation value test process provided by an embodiment of the present application, such as Figure 3As shown, a camera is first used to capture images of the window at various openings. These images serve as reference templates for subsequent matching, ensuring coverage of the full opening range from 0% to 100%. This creates a template image library. An automated detection script is then run to control the window's movement to the specified opening position based on the initially set compensation value. When the window reaches the specified position, the camera is again used to capture a raw image of the window's actual opening. This captured image undergoes preprocessing, including denoising, enhancement, and resizing, to improve image quality and facilitate accurate detection and matching. This image then generates the actual window opening image. The preprocessed image is then matched against the template image library to accurately identify the window's actual opening position, providing the data foundation for calculating and verifying the compensation value. The detected actual opening is then compared with the target opening, and the difference is calculated. The window opening compensation value is then updated through diagnostic writes to eliminate inertia errors when the window stops. This process is repeated 100,000 times to ensure the stability and accuracy of the compensation value, forming a closed-loop control test mechanism. Finally, the compensation value obtained after the closed-loop test is compared with the initial software setting to determine whether the initial window opening compensation value is accurate, providing reliable data support for the window control system. Through these steps, the objectivity and accuracy of the test results are ensured, while significantly improving testing efficiency and reducing labor costs.
[0113] The embodiment of the present application also provides a window opening compensation value determination device 400, please refer to Figure 4 , including: an acquisition module 401, used to adjust the window opening value and photograph the window after the window opening value is adjusted in response to receiving a test instruction, to obtain a first picture, wherein the test instruction is an instruction for adjusting the expected window opening value to a specified opening value, and the first picture is a picture of the window taken after the window opening value is adjusted based on the initial window opening compensation value; a first determination module 402, used to determine a first actual opening value corresponding to the first picture based on the window opening value corresponding to the second picture, wherein the second picture is a template picture whose similarity with the first picture is greater than a preset threshold; a second determination module 403, used to determine a first window opening compensation value based on the specified opening value and the first actual opening value, wherein the first window opening compensation value is an opening error when the window opening value is controlled to be adjusted to the specified opening value based on the test instruction; an adjustment module 404, used to adjust the window opening value for the next test based on the first window opening compensation value, until the preset number of tests is reached to obtain a target window opening compensation value.
[0114] Furthermore, the window opening compensation value determination device also includes a compensation module, which is used to compensate the window opening value based on the initial window opening compensation value in response to the initial window opening compensation value being the same as the target window opening compensation value; or, in response to the initial window opening compensation value being different from the target window opening compensation value, compensate the window opening value based on the target window opening compensation value.
[0115] Furthermore, the first determination module 402 is also used to match the first picture with the template picture library to obtain a second picture, wherein the second picture carries the window opening value; and determine the first actual opening value based on the window opening value carried by the second picture.
[0116] Furthermore, the adjustment module 404 is also used to adjust the window opening value to a specified opening value based on the first window opening compensation value, and obtain a third picture after the window opening value is adjusted; determine the second actual opening value corresponding to the third picture based on the fourth picture, wherein the fourth picture is a template picture whose similarity with the third picture is greater than a preset threshold; determine the second window opening compensation value based on the specified opening value and the second actual opening value, wherein the second window opening compensation value is the opening error when the control window opening value is adjusted to the specified opening value; adjust the window opening value at the next test based on the second window opening compensation value until the preset number of tests is reached to obtain the target window opening compensation value.
[0117] Furthermore, the device for determining the window opening compensation value also includes a creation module, which is used to call the camera to shoot the window at different opening positions to obtain multiple fifth pictures; perform image preprocessing on the multiple fifth pictures to obtain multiple sixth pictures; and create a template picture library based on the multiple sixth pictures.
[0118] Furthermore, the acquisition module 401 is also used to adjust the window opening value to a specified opening value based on the initial window opening compensation value in response to receiving a test instruction; call the camera to shoot the window after the window opening value is adjusted to obtain a seventh picture; and perform image preprocessing on the seventh picture to obtain the first picture.
[0119] According to another aspect of an embodiment of the present invention, a vehicle is provided, comprising: a memory storing an executable program; and a processor for running the program, wherein the method for determining a window opening compensation value in each embodiment of the present invention is executed when the program is running.
[0120] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the method for determining the window opening compensation value in each embodiment of the present invention when running on a computer or processor.
[0121] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0122] Step S10, in response to receiving the test instruction, adjusting the window opening value and photographing the window after the window opening value is adjusted to obtain a first image, wherein the test instruction is an instruction to adjust the desired window opening value to a specified opening value, and the first image is an image of the window taken after the window opening value is adjusted based on the initial window opening compensation value;
[0123] Step S12, determining a first actual window opening value corresponding to the first picture based on the window opening value corresponding to the second picture, wherein the second picture is a template picture having a similarity with the first picture greater than a preset threshold;
[0124] Step S14, determining a first window opening compensation value based on the designated opening value and the first actual opening value, wherein the first window opening compensation value is an opening error when the window opening value is adjusted to the designated opening value based on the test instruction;
[0125] Step S16, adjusting the window opening value for the next test based on the first window opening compensation value until a preset number of tests is reached to obtain a target window opening compensation value.
[0126] According to another aspect of the present invention, an electronic device 50 is provided. Figure 5 , including a memory 510 and a processor 520, wherein the memory 510 stores a computer program, and the processor 520 is configured to run the computer program to execute the method for determining the window opening compensation value in various embodiments of the present invention.
[0127] Optionally, in this embodiment, the processor in the electronic device may be configured to run a computer program to perform the following steps:
[0128] Step S10, in response to receiving the test instruction, adjusting the window opening value and photographing the window after the window opening value is adjusted to obtain a first image, wherein the test instruction is an instruction to adjust the desired window opening value to a specified opening value, and the first image is an image of the window taken after the window opening value is adjusted based on the initial window opening compensation value;
[0129] Step S12, determining a first actual window opening value corresponding to the first picture based on the window opening value corresponding to the second picture, wherein the second picture is a template picture having a similarity with the first picture greater than a preset threshold;
[0130] Step S14, determining a first window opening compensation value based on the designated opening value and the first actual opening value, wherein the first window opening compensation value is an opening error when the window opening value is adjusted to the designated opening value based on the test instruction;
[0131] Step S16, adjusting the window opening value for the next test based on the first window opening compensation value until a preset number of tests is reached to obtain a target window opening compensation value.
[0132] In this application, a plurality refers to two or more.
[0133] In this application, unless otherwise expressly defined, the terms "mounted," "connected," and "connected" should be interpreted broadly. For example, they can refer to fixed, detachable, or integral connections; mechanical or electrical connections; direct or indirect connections through an intermediary; and internal communication between two components. A person of ordinary skill in the art will understand the specific meanings of these terms in this application.
[0134] The terms "first," "second," "third," "fourth," etc. (if any) in this application are used to distinguish similar objects and are not necessarily used to describe a particular sequential order.
[0135] The term "and / or" in this application simply describes an association between related objects, indicating that three possible relationships exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this application generally indicates that the related objects are in an "or" relationship.
[0136] Unless otherwise specified, all steps of the present application may be performed sequentially or randomly. For example, a statement that the method includes steps A and B indicates that the method may include steps A and B performed sequentially, or steps B and A performed sequentially. For example, a statement that the method may also include step C indicates that step C may be added to the method in any order, for example, the method may include steps A, B, and C, or steps A, C, and B, or steps C, A, and B, etc.
[0137] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A method for determining a window opening compensation value, characterized in that: include: In response to receiving a test instruction, adjusting the window opening value and photographing the window after the window opening value is adjusted to obtain a first image, wherein the test instruction is an instruction to adjust the window opening value to a specified opening value, and the first image is a picture of the window taken after the window opening value is adjusted based on the initial window opening compensation value; determining a first actual window opening value corresponding to the first picture based on a window opening value corresponding to a second picture, wherein the second picture is a template picture having a similarity with the first picture greater than a preset threshold; determining a first window opening compensation value based on the designated opening value and the first actual opening value, wherein the first window opening compensation value is an opening error when the window opening value is adjusted to the designated opening value based on the test instruction; The window opening value in the next test is adjusted based on the first window opening compensation value until a preset number of tests is reached to obtain a target window opening compensation value.
2. The method according to claim 1, characterized in that The method further comprises: In response to the initial window opening compensation value being the same as the target window opening compensation value, compensating the window opening value based on the initial window opening compensation value; or, In response to the initial window opening compensation value being different from the target window opening compensation value, the window opening value is compensated based on the target window opening compensation value.
3. The method according to claim 1 or 2, characterized in that Determining the first actual window opening value corresponding to the first picture based on the window opening value corresponding to the second picture includes: Matching the first image with a template image library to obtain the second image, wherein the second image carries the window opening value; The first actual window opening value is determined based on the window opening value carried in the second image.
4. The method according to claim 1 or 2, characterized in that The adjusting the window opening value in the next test based on the first window opening compensation value until a preset number of tests is reached to obtain a target window opening compensation value includes: adjusting the window opening value to the designated opening value based on the first window opening compensation value, and acquiring a third image after the window opening value is adjusted; determining a second actual opening value corresponding to the third picture based on a fourth picture, wherein the fourth picture is a template picture having a similarity with the third picture greater than a preset threshold; determining a second window opening compensation value based on the designated opening value and the second actual opening value, wherein the second window opening compensation value is an opening error when controlling the window opening value to be adjusted to the designated opening value; The window opening value in the next test is adjusted based on the second window opening compensation value until the preset number of tests is reached to obtain the target window opening compensation value.
5. The method according to claim 3, characterized in that The method further comprises: Using a camera to photograph the vehicle window at different opening positions to obtain a plurality of fifth images; performing image preprocessing on the plurality of fifth pictures to obtain a plurality of sixth pictures; The template picture library is created based on the plurality of sixth pictures.
6. The method according to claim 1 or 2, characterized in that In response to receiving the test instruction, adjusting the window opening value and photographing the window after the window opening value is adjusted to obtain a first picture, including: In response to receiving the test instruction, adjusting the window opening value to the designated opening value based on the initial window opening compensation value; Invoking a camera to photograph the vehicle window after the window opening value is adjusted to obtain a seventh image; Perform image preprocessing on the seventh picture to obtain the first picture.
7. A device for determining a window opening compensation value, characterized in that: The device comprises: an acquisition module configured to, in response to receiving a test instruction, adjust the window opening value and photograph the window after the window opening value is adjusted to obtain a first image, wherein the test instruction is an instruction to adjust the window opening value to a specified opening value, and the first image is a picture of the window taken after the window opening value is adjusted based on an initial window opening compensation value; a first determining module, configured to determine a first actual window opening value corresponding to the first picture based on a window opening value corresponding to a second picture, wherein the second picture is a template picture having a similarity with the first picture greater than a preset threshold; a second determining module, configured to determine a first window opening compensation value based on the designated opening value and the first actual opening value, wherein the first window opening compensation value is an opening error when the window opening value is adjusted to the designated opening value based on the test instruction; An adjustment module is used to adjust the window opening value in the next test based on the first window opening compensation value until a preset number of tests is reached to obtain a target window opening compensation value.
8. A vehicle, characterized in that: The vehicle includes: a memory storing an executable program; and a processor for running the program, wherein the method for determining the window opening compensation value described in any one of claims 1 to 6 is executed when the program is running.
9. A computer-readable storage medium, characterized in that The storage medium stores a computer program, wherein the computer program is configured to execute the method for determining the window opening compensation value according to any one of claims 1 to 6 when running on a computer or a processor.
10. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to run the computer program to execute the method for determining a vehicle window opening compensation value as claimed in any one of claims 1 to 6.