Vehicle-mounted projection correction method and vehicle-mounted projection system
By identifying and calculating the projection boundary and transformation relationship in the on-board projection system, the abnormal display problem of projection screen caused by the mismatch between the on-board projector and the projection screen is solved, and the accurate correction and complete display of the projection screen is achieved.
Patent Information
- Application Number
- CN202510095734.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2045-01-22
AI Technical Summary
In the on-board projection system, due to the incomplete matching between the on-board projector and the projection screen, the boundary of the projection screen may exceed the boundary of the projection screen, resulting in abnormal display of the projection screen and making it difficult to achieve automatic correction.
By obtaining the target image taken by the camera, identifying the boundaries of the projection screen and the projection screen, calculating the projection boundaries of the vehicle projector, and calculating the transformation relationship between the vehicle projector coordinate system and the preset projection area based on the size of the projection screen and the position of the preset projection area, and then controlling the projector to project the image and/or video to the preset projection area.
Accurate correction of the projection screen of the on-board projector is achieved, ensuring that the projection screen is fully displayed in the projection screen, avoiding the influence of the complexity of the environment in the vehicle.
Smart Images

Figure CN119544938A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle-mounted projection, and in particular to a vehicle-mounted projection correction method and a vehicle-mounted projection system. Background Art
[0002] With the rise and development of smart cockpits, some vehicles are usually equipped with on-board projectors and projection screens. The projection screen can display the projection image of the on-board projector, which is convenient for passengers to watch movies during the ride. Since the on-board projector and the projection screen are not completely matched, there is a certain angle and distance between the plane where the projection lens of the on-board projector is located and the plane where the projection screen is located, which may cause the boundary of the projection image of the on-board projector to exceed the boundary of the projection screen, and other situations where the projection image is not displayed normally. In this case, it is necessary to automatically correct the projection image of the on-board projector so that the projection image is displayed normally on the projection screen. The above process is called the on-board projection correction process. However, due to the complex environment in the vehicle, it is difficult to correct the projection image of the on-board projector. Summary of the invention
[0003] The purpose of the embodiment of the present invention is to provide a vehicle-mounted projection correction method and a vehicle-mounted projection system to achieve correction of the projection image of the vehicle-mounted projector. The specific technical solution is as follows:
[0004] An embodiment of the present invention provides a vehicle-mounted projection correction method, the method comprising:
[0005] Acquire a target image including a projection picture and a projection screen captured by a camera; wherein the projection picture is a picture projected by the vehicle-mounted projector according to a preset zoom ratio on an image and / or video and displayed on the projection screen;
[0006] Identify the boundary of the projection picture in the target image to obtain a first boundary of the projection picture in the image coordinate system, and identify the boundary of the projection screen in the target image to obtain a second boundary of the projection screen in the image coordinate system;
[0007] According to the preset scaling ratio and the first boundary, a projection boundary of the vehicle-mounted projector is calculated as a third boundary of the projection boundary in the image coordinate system; wherein the projection boundary is a boundary of an area formed by the light emitted by the vehicle-mounted projector on the plane where the projection screen is located;
[0008] According to the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated as a first transformation relationship;
[0009] Based on the first transformation relationship, the vehicle-mounted projector is controlled to project the image and / or video to the preset projection area.
[0010] In a possible embodiment, the transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated based on the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen, as a first transformation relationship, including:
[0011] According to the second boundary and the third boundary, a transformation relationship between a vehicle-mounted projector coordinate system and a projection screen coordinate system is calculated as a second transformation relationship;
[0012] According to the size of the projection screen and the size and position of the preset projection area in the projection screen, a third transformation relationship between the projection screen coordinate system and the preset projection area is calculated;
[0013] According to the second transformation relationship and the third transformation relationship, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated as a first transformation relationship.
[0014] In a possible embodiment, the transformation relationship between the vehicle-mounted projector coordinate system and the projection screen coordinate system is calculated based on the second boundary and the third boundary as the second transformation relationship, including:
[0015] According to the third boundary, a transformation relationship between the camera coordinate system and the vehicle-mounted projector coordinate system is calculated as a fourth transformation relationship;
[0016] According to the second boundary, a transformation relationship between the camera coordinate system and the projection screen coordinate system is calculated as a fifth transformation relationship;
[0017] According to the fourth transformation relationship and the fifth transformation relationship, the transformation relationship between the vehicle-mounted projector coordinate system and the projection screen coordinate system is calculated and obtained as the second transformation relationship.
[0018] In a possible embodiment, the transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated based on the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen, as a first transformation relationship, including:
[0019] According to the size of the projection screen and the size and position of the preset projection area in the projection screen, a third transformation relationship between the projection screen coordinate system and the preset projection area is calculated;
[0020] According to the third boundary, a transformation relationship between the camera coordinate system and the vehicle-mounted projector coordinate system is calculated as a fourth transformation relationship;
[0021] According to the second boundary, a transformation relationship between the camera coordinate system and the projection screen coordinate system is calculated as a fifth transformation relationship;
[0022] According to the third transformation relationship, the fourth transformation relationship and the fifth transformation relationship, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated as a first transformation relationship.
[0023] In a possible embodiment, acquiring a target image including a projection picture and a projection screen captured by a camera includes:
[0024] Obtaining the original image including the projection image and the projection screen captured by the camera;
[0025] The original image is distorted to obtain a target image.
[0026] The embodiment of the present invention further provides a vehicle-mounted projection system, the vehicle-mounted projection system comprising: a vehicle-mounted projector, a projection screen, a camera and a processor;
[0027] The vehicle-mounted projector is used to project images and / or videos onto the projection screen;
[0028] The camera is used to capture a target image including a projection picture and a projection screen, and send the target image to the processor; wherein the projection picture is a picture in which the vehicle-mounted projector projects an image and / or video according to a preset zoom ratio and is displayed on the projection screen;
[0029] The processor is used to receive the target image, identify the boundary of the projection picture in the target image, obtain the first boundary of the projection picture in the image coordinate system, and identify the boundary of the projection screen in the target image to obtain the second boundary of the projection screen in the image coordinate system; calculate the projection boundary of the vehicle-mounted projector according to the preset scaling ratio and the first boundary as the third boundary of the projection boundary in the image coordinate system; wherein the projection boundary is the boundary of the area formed by the light emitted by the vehicle-mounted projector on the plane where the projection screen is located; calculate the transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area according to the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen as the first transformation relationship; based on the first transformation relationship, control the vehicle-mounted projector to project the image and / or video to the preset projection area.
[0030] In a possible embodiment, the vehicle-mounted projector and the camera are fixedly arranged at the same position;
[0031] The optical axis of the vehicle-mounted projector is parallel to the optical axis of the camera.
[0032] The embodiment of the present invention further provides a vehicle-mounted projection correction device, the device comprising:
[0033] An image acquisition module, used to acquire a target image including a projection picture and a projection screen captured by a camera; wherein the projection picture is a picture projected by the vehicle-mounted projector according to a preset zoom ratio on an image and / or video and displayed on the projection screen;
[0034] A boundary recognition module, used to recognize the boundary of the projection screen in the target image, obtain a first boundary of the projection screen in the image coordinate system, and recognize the boundary of the projection screen in the target image, obtain a second boundary of the projection screen in the image coordinate system;
[0035] a boundary calculation module, configured to calculate a projection boundary of the vehicle-mounted projector according to the preset zoom ratio and the first boundary, as a third boundary of the projection boundary in the image coordinate system; wherein the projection boundary is a boundary of an area formed by the light emitted by the vehicle-mounted projector on the plane where the projection screen is located;
[0036] a transformation relationship calculation module, configured to calculate a transformation relationship between a vehicle-mounted projector coordinate system and the preset projection area according to the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen, as a first transformation relationship;
[0037] A projection control module is used to control the vehicle-mounted projector to project the image and / or video to the preset projection area based on the first transformation relationship.
[0038] In a possible embodiment, the transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated based on the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen, as a first transformation relationship, including:
[0039] According to the second boundary and the third boundary, a transformation relationship between a vehicle-mounted projector coordinate system and a projection screen coordinate system is calculated as a second transformation relationship;
[0040] According to the size of the projection screen and the size and position of the preset projection area in the projection screen, a third transformation relationship between the projection screen coordinate system and the preset projection area is calculated;
[0041] According to the second transformation relationship and the third transformation relationship, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated as a first transformation relationship.
[0042] In a possible embodiment, the transformation relationship between the vehicle-mounted projector coordinate system and the projection screen coordinate system is calculated based on the second boundary and the third boundary as the second transformation relationship, including:
[0043] According to the third boundary, a transformation relationship between the camera coordinate system and the vehicle-mounted projector coordinate system is calculated as a fourth transformation relationship;
[0044] According to the second boundary, a transformation relationship between the camera coordinate system and the projection screen coordinate system is calculated as a fifth transformation relationship;
[0045] According to the fourth transformation relationship and the fifth transformation relationship, the transformation relationship between the vehicle-mounted projector coordinate system and the projection screen coordinate system is calculated and obtained as the second transformation relationship.
[0046] In a possible embodiment, the transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated based on the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen, as a first transformation relationship, including:
[0047] According to the size of the projection screen and the size and position of the preset projection area in the projection screen, a third transformation relationship between the projection screen coordinate system and the preset projection area is calculated;
[0048] According to the third boundary, a transformation relationship between the camera coordinate system and the vehicle-mounted projector coordinate system is calculated as a fourth transformation relationship;
[0049] According to the second boundary, a transformation relationship between the camera coordinate system and the projection screen coordinate system is calculated as a fifth transformation relationship;
[0050] According to the third transformation relationship, the fourth transformation relationship and the fifth transformation relationship, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated as a first transformation relationship.
[0051] In a possible embodiment, acquiring a target image including a projection picture and a projection screen captured by a camera includes:
[0052] Obtaining the original image including the projection image and the projection screen captured by the camera;
[0053] The original image is distorted to obtain a target image.
[0054] An embodiment of the present invention further provides an electronic device, including:
[0055] Memory, used to store computer programs;
[0056] The processor is used to implement any of the above-mentioned vehicle-mounted projection correction methods when executing the program stored in the memory.
[0057] An embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned vehicle-mounted projection correction methods.
[0058] Beneficial effects of the embodiments of the present invention:
[0059] An embodiment of the present invention provides a vehicle-mounted projection correction method and a vehicle-mounted projection system, in which the vehicle-mounted projector projects an image and / or video according to a preset zoom ratio, so that the image and / or video projected by the vehicle-mounted projector is completely displayed on the projection screen to obtain a projection picture. And by obtaining a target image including the projection picture and the projection screen captured by a camera, identifying the boundary of the projection picture in the target image, and obtaining the first boundary of the projection picture in the image coordinate system, the position of the projection picture in the image coordinate system is determined, so that the boundary of the projection area formed by the light emitted by the vehicle-mounted projector on the plane where the projection screen is located can be calculated according to the preset zoom ratio and the first boundary, as the third boundary, that is, the position of the projection boundary in the image coordinate system is obtained. It can be understood that there will be other objects such as seat backs behind the projection screen hung in the vehicle, so that the projection picture of the vehicle-mounted projector may fall on other objects and be displayed, and the other objects and the projection screen are not in the same plane. Therefore, if the boundaries of the projection pictures on different planes in the image captured by the camera are directly identified, the identification result will be inaccurate, making it difficult to calibrate the projection picture of the vehicle-mounted projector. In the embodiment of the present application, since the projection picture is completely displayed on the projection screen when the target image is captured, when the target image is identified to obtain the first boundary, the projection picture is located in the same plane, and the accurate first boundary can be identified. In addition, since the third boundary is calculated based on the first boundary and the preset scaling ratio, even if part of the light emitted by the vehicle-mounted projector during projection is displayed on other objects, it will not affect the calculation of the third boundary, thereby obtaining an accurate third boundary and avoiding the influence of the vehicle interior environment. The transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area can be calculated based on the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen as the first transformation relationship, and based on the first transformation relationship, the vehicle-mounted projector is controlled to project the image and / or video to the preset projection area, thereby realizing the correction of the projection picture of the vehicle-mounted projector.
[0060] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0062] Figure 1A schematic diagram of a process flow of a vehicle-mounted projection correction method provided in an embodiment of the present application;
[0063] Figure 2a A schematic diagram of the structure of a vehicle-mounted projection system provided in an embodiment of the present application;
[0064] Figure 2b Another structural schematic diagram of the vehicle-mounted projection system provided in an embodiment of the present application;
[0065] Figure 3 A schematic diagram of a process for acquiring a target image provided in an embodiment of the present application;
[0066] Figure 4 A schematic diagram of a vehicle-mounted projector projection provided in an embodiment of the present application;
[0067] Figure 5 A schematic diagram of a projection correction effect of a vehicle-mounted projector provided in an embodiment of the present application;
[0068] Figure 6 Another schematic diagram of a process flow of a vehicle-mounted projection correction method provided in an embodiment of the present application;
[0069] Figure 7 A schematic diagram of another process flow of the vehicle-mounted projection correction method provided in an embodiment of the present application;
[0070] Figure 8 A schematic diagram of another process flow of the vehicle-mounted projection correction method provided in an embodiment of the present application;
[0071] Fig. 9 A schematic diagram of another process flow of the vehicle-mounted projection correction method provided in an embodiment of the present application;
[0072] Fig.10 A schematic diagram of the structure of a vehicle-mounted projection correction device provided in an embodiment of the present application;
[0073] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0074] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field based on this application belong to the scope of protection of the present invention.
[0075] In order to more clearly illustrate the vehicle-mounted projection correction method and the vehicle-mounted projection system provided by the present application, the application scenarios of the vehicle-mounted projection correction method and the vehicle-mounted projection system provided by the present application will be exemplified below. It can be understood that the following example is only one possible application scenario of the vehicle-mounted projection correction method and the vehicle-mounted projection system provided by the present application. In other possible embodiments, the vehicle-mounted projection correction method and the vehicle-mounted projection system provided by the present application can also be applied to other scenarios, and the following examples do not impose any limitation on this.
[0076] When setting up a vehicle-mounted projector and a projection screen on a vehicle, the vehicle-mounted projector is generally placed above the rear of the second row of seats in the vehicle, and a projection screen is placed between the second row of seats and the front row of seats in the vehicle. The vehicle-mounted projector can project the image and / or video to be projected onto the projection screen. Since the vehicle-mounted projector and the projection screen are not completely matched, there is a certain angle and distance between the plane where the projection lens of the vehicle-mounted projector is located and the plane where the projection screen is located, which may cause the boundary of the projection screen of the vehicle-mounted projector to exceed the boundary of the projection screen, and other situations where the projection screen is not displayed normally. Therefore, when installing and arranging the vehicle-mounted projector and the projection screen, it is necessary to automatically calibrate the projection screen of the vehicle-mounted projector so that the projection screen is displayed normally on the projection screen. The above process is called the vehicle-mounted projection calibration process. The projection screen in this article refers to: when the vehicle-mounted projector projects the image and / or video onto a certain plane, the area where the image and / or video is displayed on the plane; the boundary of this area is the boundary of the projection screen.
[0077] In addition, it is understandable that the operation of the vehicle will produce a certain amount of bumps, causing the positions of some objects that cannot be firmly set on the vehicle to change, such as pendants, paper towels, vehicle-mounted projectors, projection screens and other objects. Therefore, even if the vehicle-mounted projection calibration is performed when the vehicle-mounted projector and the projection screen are installed and arranged, it is possible that when the positions of the vehicle-mounted projector and the projection screen change, the boundary of the projection screen of the vehicle-mounted projector still exceeds the boundary of the projection screen, and the projection screen is not displayed normally. Therefore, in addition to the need to automatically calibrate the projection screen of the vehicle-mounted projector when installing and arranging the vehicle-mounted projector and the projection screen, the projection screen of the vehicle-mounted projector also needs to be automatically calibrated each time the vehicle-mounted projector and the projection screen are used.
[0078] Since the projection screen is generally set between the second row of seats and the front row of seats in the vehicle, the projection screen and the surrounding internal structure of the vehicle are not on the same vertical plane, and the projection screen of the vehicle-mounted projector may be projected onto other objects such as seat backs, causing the projection screen of the vehicle-mounted projector to be located on different planes. In addition, compared with the scene of hanging a projection screen on a white wall in a conventional home or office, the vehicle environment in which the projection screen is located is more complex when the projection screen is set on a vehicle, and the color of the interior decoration in the vehicle is variable. Therefore, in the process of vehicle-mounted projection correction, if the image containing the projection screen of the vehicle-mounted projector is captured and the projection screen boundary is directly identified, then due to the situation that the projection screen in the image is located on different planes and the influence of the complex environment of the vehicle, the recognition result of the projection screen boundary may be inaccurate, making it difficult to correct the projection screen according to the identified projection screen boundary. Therefore, how to realize the correction of the projection screen of the vehicle-mounted projector has become an urgent problem to be solved.
[0079] Based on this, the embodiment of the present application provides a vehicle-mounted projection correction method, see Figure 1 , methods include:
[0080] S101, obtaining a target image including a projection picture and a projection screen captured by a camera.
[0081] The projection picture is a picture that is projected by the vehicle-mounted projector according to a preset zoom ratio and / or video, and is displayed on the projection screen.
[0082] S102, identifying the boundary of the projection screen in the target image to obtain a first boundary of the projection screen in the image coordinate system, and identifying the boundary of the projection screen in the target image to obtain a second boundary of the projection screen in the image coordinate system.
[0083] S103: Calculate a projection boundary of the vehicle-mounted projector according to the preset zoom ratio and the first boundary as a third boundary of the projection boundary in the image coordinate system.
[0084] The projection boundary is the boundary of the area formed by the light emitted by the vehicle-mounted projector on the plane where the projection screen is located.
[0085] S104, calculating a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area according to the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen as a first transformation relationship.
[0086] S105: Based on the first transformation relationship, control the vehicle-mounted projector to project the image and / or video to a preset projection area.
[0087] In the embodiment of the present application, the image and / or video projected by the vehicle-mounted projector is projected according to a preset zoom ratio, so that the image and / or video projected by the vehicle-mounted projector is completely displayed on the projection screen to obtain a projection picture. And by obtaining the target image including the projection picture and the projection screen captured by the camera, identifying the boundary of the projection picture in the target image, and obtaining the first boundary of the projection picture in the image coordinate system, the position of the projection picture in the image coordinate system is determined, so that the boundary of the projection area formed by the light emitted by the vehicle-mounted projector on the plane where the projection screen is located can be calculated according to the preset zoom ratio and the first boundary, as the third boundary, that is, the position of the projection boundary in the image coordinate system is obtained. It can be understood that there will be other objects such as seat backs behind the projection screen hung in the vehicle, so the projection picture of the vehicle-mounted projector may fall on other objects and be displayed, and the other objects and the projection screen are not in the same plane. Therefore, if the boundary of the projection picture on different planes in the image captured by the camera is directly identified, the recognition result will be inaccurate, making it difficult to correct the projection picture of the vehicle-mounted projector. In the embodiment of the present application, since the projection picture is completely displayed on the projection screen when the target image is captured, when the target image is identified to obtain the first boundary, the projection picture is located in the same plane, and the accurate first boundary can be identified. In addition, since the third boundary is calculated based on the first boundary and the preset scaling ratio, even if part of the light emitted by the vehicle-mounted projector during projection is displayed on other objects, it will not affect the calculation of the third boundary, thereby obtaining an accurate third boundary and avoiding the influence of the vehicle interior environment. The transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area can be calculated based on the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen as the first transformation relationship, and based on the first transformation relationship, the vehicle-mounted projector is controlled to project the image and / or video to the preset projection area, thereby realizing the correction of the projection picture of the vehicle-mounted projector.
[0088] In order to facilitate the description of the vehicle-mounted projection correction method provided by the present application, the vehicle-mounted projection system provided by the present application will be first described as an example below. Figure 2a , the vehicle projection system includes:
[0089] A vehicle-mounted projector 210 , a projection screen 220 , a camera 230 , and a processor 240 .
[0090] The vehicle-mounted projector 210 is used to project images and / or videos onto a projection screen 220 .
[0091] The camera 230 is used to capture a target image including the projection picture and the projection screen 220 , and send the target image to the processor 240 . Figure 2a The connection line between the camera 230 and the processor 240 is used to represent the data transmission process in which the camera 230 sends the target image to the processor 240.
[0092] The processor 240 is used to receive the target image and execute the aforementioned S102-S105. The step of acquiring the target image in the aforementioned S101 can be implemented by the processor 240 receiving the target image. Therefore, the step of the processor 240 receiving the target image is equivalent to the aforementioned S101. Therefore, the processor 240 can be used to execute the aforementioned S101-S105. Figure 2a The connection line between the vehicle-mounted projector 210 and the processor 240 is used to represent the data transmission process in which the processor 240 controls the vehicle-mounted projector 210 to project an image and / or video to a preset projection area.
[0093] See also Figure 2b The processor 240 may be an electronic device externally connected to the camera 230 and the vehicle-mounted projector 210, and the electronic device may implement the aforementioned S101-S105. For example, the electronic device may refer to a laptop computer, a server, etc. It is understandable that Figure 2b This is only an example of a possible vehicle-mounted projection system. In other possible embodiments, the processor 240 may also refer to a processing chip built into the vehicle-mounted projector 210 .
[0094] Set up on the vehicle Figure 2a In the vehicle-mounted projection system shown, the camera 230 can be set at any position where an image including the complete projection screen 220 can be captured. The camera 230 can be set at the same position as the vehicle-mounted projector 210, or at a different position.
[0095] In one possible embodiment, see Figure 2b , the vehicle-mounted projector 210 and the camera 230 are fixedly arranged at the same position. The same position in this article means that the distance between the vehicle-mounted projector 210 and the camera 230 is small enough. In this example, the camera 230 and the vehicle-mounted projector 210 can be non-detachably arranged at the same position, or can be detachably arranged at the same position. For example, a groove can be arranged below the vehicle-mounted projector 210, and a protrusion can be arranged above the camera 230. The camera 230 and the vehicle-mounted projector 210 can be installed together by fixing the protrusion of the camera 230 on the groove of the vehicle-mounted projector 210, and the camera 230 can be removed from the vehicle-mounted projector 210 by removing the protrusion of the camera 230 from the groove of the vehicle-mounted projector 210. It can be understood that, Figure 2bThis is only an example of a possible arrangement of the camera 230 and the vehicle-mounted projector 210 . In other possible implementations, the camera 230 may also be arranged above, to the right, or to the left, etc., of the vehicle-mounted projector 210 .
[0096] Furthermore, in this example, the optical axis of the vehicle-mounted projector 210 and the optical axis of the camera 230 may be parallel or may have a certain deflection angle. Figure 2b In the example shown, the vehicle-mounted projector 210 and the camera 230 are fixedly arranged at the same position, and the optical axis of the vehicle-mounted projector 210 is parallel to the optical axis of the camera 230. If the optical axis of the vehicle-mounted projector 210 is parallel to the optical axis of the camera 230, when calculating the transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area, that is, when calculating the first transformation relationship, it is not necessary to consider the rotation angle between the vehicle-mounted projector 210 and the camera 230, thereby reducing the amount of calculation when calculating the first transformation relationship.
[0097] In other possible embodiments, if the vehicle-mounted projector 210 is disposed above and behind the second row of seats in the vehicle, and the projection screen 220 is disposed between the second row of seats and the front row of seats in the vehicle, the camera 230 can be placed near the right or left door of the second row of seats in the vehicle, as long as the camera 230 is able to capture an image including the complete projection screen 220 at the disposed position.
[0098] In the above embodiments, the vehicle has two rows of seats as an example for illustrative description. In other possible embodiments, the vehicle may also have three or more rows of seats. In this embodiment, the vehicle-mounted projector 210, the projection screen 220, and the camera 230 may be placed in the following manner: the vehicle-mounted projector 210 may be set above the rear of the last row of seats in the vehicle, the projection screen 220 may be set between the second row of seats and the front row of seats in the vehicle, the camera 230 may be set at the same position as the vehicle-mounted projector 210, or the camera 230 may be placed near the right or left door of the second row of seats in the vehicle, as long as the camera 230 can capture an image including the complete projection screen 220 at the set position. In this embodiment, the vehicle-mounted projector 210, the projection screen 220, and the camera 230 are also placed according to the needs of the user, as long as the camera 230 can capture an image including the complete projection screen 220 at the set position. This application does not impose any restrictions on the placement of the vehicle-mounted projector 210, the projection screen 220, and the camera 230.
[0099] The above has been an exemplary description of the vehicle-mounted projection system for implementing the vehicle-mounted projection correction method provided by the present application. Figure 1 ,right Figure 1The vehicle-mounted projection correction method shown is exemplarily described, that is, the aforementioned S101-S105 is exemplarily described:
[0100] Among them, in S101, the preset zoom ratio can be set according to user needs or past experience, as long as it is ensured that when the vehicle-mounted projector projects the image and / or video according to the preset zoom ratio, the image and / or video can be completely displayed on the projection screen, that is, the projection picture is completely displayed on the projection screen.
[0101] Since the projection image can be completely displayed on the projection screen, if the camera can capture the complete projection screen, the camera can also capture the target image including the projection image and the projection target. Therefore, when the camera in the aforementioned vehicle-mounted projection system is set in the vehicle, it is only necessary to ensure that the camera can capture the image including the complete projection screen at the set position. Exemplarily, if the vehicle-mounted projector is set at the upper rear of the second row of the vehicle, and the projection screen is set between the second row of seats and the front row of seats, the camera can be placed near the door on the right or left side of the second row of the vehicle, or the camera can be placed at the upper rear of the second row of the vehicle like the vehicle-mounted projector.
[0102] It is understandable that the image captured by the camera has certain distortion compared to the real object, and the distortion may cause the subsequent recognition of the first boundary and the second boundary to be inaccurate, thereby affecting the accuracy of the correction of the projection image of the vehicle-mounted projector. Based on this, in a possible embodiment, see Figure 3 , S101 includes:
[0103] S1011, obtaining an original image including a projection image and a projection screen captured by a camera.
[0104] S1012, performing distortion processing on the original image to obtain a target image.
[0105] Distortion processing can refer to reconstructing the original image through a polynomial transformation or a correction function; distortion processing can also refer to restoring the straight lines and parallelism in the original image through perspective transformation or distortion correction; distortion processing can also refer to estimating the distortion parameters of the camera by detecting the straight lines in the original image, and correcting the original image according to the distortion parameters.
[0106] By selecting this embodiment, the image captured by the camera, including the projection picture and the projection screen, can be used as the original image, and the original image can be distorted to obtain the target image, thereby reducing or removing the impact of camera distortion on the authenticity of the target image, improving the accuracy of subsequent recognition of the first boundary and the second boundary in the target image, and further improving the accuracy of correction of the projection picture of the vehicle-mounted projector.
[0107] In S102, the boundary of the projection screen in the target image can be identified by a boundary recognition algorithm to obtain a first boundary of the projection screen in the image coordinate system, and the boundary of the projection screen in the target image can be identified to obtain a second boundary of the projection screen in the image coordinate system. The boundary recognition algorithm can be any algorithm capable of identifying boundaries, such as a template matching algorithm, a feature recognition algorithm, a deep learning algorithm, etc., and this application does not impose any limitation on this.
[0108] Specifically, the boundary recognition algorithm can identify the four endpoints of the boundary of the projection screen in the target image, and output the coordinates of the four endpoints of the boundary of the projection screen in the image coordinate system. Then, the boundary of the quadrilateral area with the four endpoints of the boundary of the projection screen as vertices in the image coordinate system is the first boundary, that is, the first boundary can be represented by the coordinates of the four endpoints of the boundary of the projection screen in the image coordinate system.
[0109] Similarly, the boundary recognition algorithm can identify the four endpoints of the boundary of the projection screen in the target image, and output the coordinates of the four endpoints of the boundary of the projection screen in the image coordinate system. The boundary of the area formed by the coordinates of the four endpoints of the boundary of the projection screen in the image coordinate system is the second boundary, that is, the second boundary can be represented by the coordinates of the four endpoints of the boundary of the projection screen in the image coordinate system.
[0110] In S103, see Figure 4 , where 41 is the first boundary, 42 is the second boundary, and 43 is the third boundary. When the vehicle-mounted projector projects an image and / or video according to a preset zoom ratio, if all the light emitted by the vehicle-mounted projector is projected onto the plane where the projection screen is located, then the area formed by the light emitted by the vehicle-mounted projector on the plane where the projection screen is located is Figure 4 The area formed by the third boundary 43, and the ratio between the size of the area formed by the third boundary 43 and the size of the area formed by the first boundary 41 is the preset scaling ratio.
[0111] Corresponding to S102, if the first boundary is represented by the coordinates of the four endpoints of the boundary of the projection screen in the image coordinate system, then the product of the coordinates of the four endpoints of the boundary of the projection screen in the image coordinate system and the preset scaling ratio can be used as the coordinates of the four endpoints of the projection boundary in the image coordinate system, that is, the third boundary is represented by the coordinates of the four endpoints of the projection boundary in the image coordinate system.
[0112] In S104, the preset projection area is any area determined by the user in the projection screen, and the size of the preset projection area can be set according to the user's needs. It can be understood that after the projection screen of the vehicle-mounted projector is calibrated, the projection screen should be located in the preset projection area. In order to enable the user to fully view the projection screen, the size of the preset projection area should be less than or equal to the size of the projection screen. For example, the length and width of the projection screen can be reduced by 10 mm each to obtain the size of the preset projection area.
[0113] It is understandable that the conversion relationship between different coordinate systems can be fitted by the coordinates of the same object in different coordinate systems. Since the second boundary of the projection screen in the image coordinate system and the third boundary of the projection boundary in the image coordinate system have been obtained in the aforementioned S102-S103, and at the same time, the size of the projection screen in the projection screen coordinate system, the size and position of the preset projection area in the projection screen in the projection screen coordinate system are known, and the position of the projection boundary under the vehicle-mounted projector is also known, therefore, according to the above information, the conversion relationship between the three different coordinate systems of the image coordinate system, the projection screen coordinate system and the vehicle-mounted projector coordinate system can be fitted, and the conversion relationship between the vehicle-mounted projector coordinate system and the preset projection area can be obtained as the first conversion relationship. The first conversion relationship is denoted as Mpt below. The following will exemplarily illustrate how to calculate the first conversion relationship Mpt, which will not be repeated here.
[0114] In S105, since the first transformation relationship Mpt refers to the transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area, the vehicle-mounted projector can project the image and / or video to the preset projection area according to the parameters in the first transformation relationship Mpt. Figure 5 The schematic diagram of the projection correction effect is shown in the figure. Figure 5 51 is an uncorrected projection image, and 52 is a corrected projection image. If the projection image of the vehicle-mounted projector is not corrected, the uncorrected projection image 51 may exceed the projection screen 220. Assuming that the size of the preset projection area is equal to the size of the projection screen 220, the corrected projection image 52 can be completely displayed on the entire projection screen 220.
[0115] The above S101-S105 have been described in an exemplary manner. The following will describe how to calculate the first transformation relationship Mpt in an exemplary manner. Figure 6 , Figure 6 The illustrated embodiment includes:
[0116] S101, obtaining a target image including a projection picture and a projection screen captured by a camera.
[0117] The projection picture is a picture that is projected by the vehicle-mounted projector according to a preset zoom ratio and / or video, and is displayed on the projection screen.
[0118] S102, identifying the boundary of the projection screen in the target image to obtain a first boundary of the projection screen in the image coordinate system, and identifying the boundary of the projection screen in the target image to obtain a second boundary of the projection screen in the image coordinate system.
[0119] S103: Calculate a projection boundary of the vehicle-mounted projector according to the preset zoom ratio and the first boundary as a third boundary of the projection boundary in the image coordinate system.
[0120] The projection boundary is the boundary of the area formed by the light emitted by the vehicle-mounted projector on the plane where the projection screen is located.
[0121] S1041: Calculate a transformation relationship between the vehicle-mounted projector coordinate system and the projection screen coordinate system according to the second boundary and the third boundary as a second transformation relationship.
[0122] S1042: Calculate a third transformation relationship between the projection screen coordinate system and the preset projection area according to the size of the projection screen and the size and position of the preset projection area in the projection screen.
[0123] S1043: According to the second transformation relationship and the third transformation relationship, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated as a first transformation relationship.
[0124] S105: Based on the first transformation relationship, control the vehicle-mounted projector to project the image and / or video to a preset projection area.
[0125] Figure 6 In the embodiment shown, Figure 1 The embodiments shown are similar, differing only in that Figure 6 In the illustrated embodiment, S104 is subdivided into S1041, S1042 and S1043, so only S1041, S1042 and S1043 are described below.
[0126] Among them, in S1041, since the vehicle-mounted projector coordinate system is constructed based on the posture of the vehicle-mounted projector, the projection boundary is obtained by projection of the vehicle-mounted projector, and therefore, the projection boundary can be used to characterize the posture of the vehicle-mounted projector. Similarly, since the projection screen coordinate system is constructed based on the projection screen, the boundary of the projection screen can be used to characterize the posture of the projection screen. In addition, since the third boundary can represent the position of the projection boundary in the image coordinate system, and the second boundary can represent the position of the boundary of the projection screen in the image coordinate system, the transformation relationship between the posture of the vehicle-mounted projector and the posture of the projection screen can be calculated through the conversion relationship between the second boundary and the third boundary in the image coordinate system, that is, the transformation relationship between the vehicle-mounted projector coordinate system and the projection screen coordinate system is calculated as the second transformation relationship. The second transformation relationship is denoted as Mps in the following text. The following text will provide an exemplary description of how to calculate the second transformation relationship Mps, which will not be repeated here.
[0127] In S1042, as described in the above S104, the preset projection area is any area determined by the user in the projection screen, and the coordinates of the four endpoints of the preset projection area in the projection screen coordinate system can be obtained according to the size and position of the preset projection area in the projection screen. In addition, since the projection screen coordinate system is constructed based on the posture of the projection screen, the coordinates of the four endpoints of the projection screen in the projection screen coordinate system can be obtained according to the size of the projection screen, so that the size displacement parameters between the preset projection area and the projection screen can be determined according to the coordinates of the preset projection area and the projection screen in the projection screen coordinate system, that is, the transformation relationship between the preset projection area and the projection screen is determined, so that the third transformation relationship between the projection screen coordinate system and the preset projection area can be calculated. The third transformation relationship is denoted as Mst below.
[0128] In S1043, the product of the second transformation relationship Mps and the third transformation relationship Mst is used as the transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area, that is, the first transformation relationship Mpt=Mps×Mst. The product of the second transformation relationship Mps and the third transformation relationship Mst refers to: the product of the second transformation relationship Mps and the third transformation relationship Mst calculated by matrix multiplication.
[0129] In the above, an exemplary description is given on how to calculate the first transformation relationship Mpt. In the following, an exemplary description is given on how to calculate the second transformation relationship Mps. Figure 7 , Figure 7 The illustrated embodiment includes:
[0130] S101, obtaining a target image including a projection picture and a projection screen captured by a camera.
[0131] The projection picture is a picture that is projected by the vehicle-mounted projector according to a preset zoom ratio and / or video, and is displayed on the projection screen.
[0132] S102, identifying the boundary of the projection screen in the target image to obtain a first boundary of the projection screen in the image coordinate system, and identifying the boundary of the projection screen in the target image to obtain a second boundary of the projection screen in the image coordinate system.
[0133] S103: Calculate a projection boundary of the vehicle-mounted projector according to the preset zoom ratio and the first boundary as a third boundary of the projection boundary in the image coordinate system.
[0134] The projection boundary is the boundary of the area formed by the light emitted by the vehicle-mounted projector on the plane where the projection screen is located.
[0135] S10411. Calculate, based on the third boundary, a transformation relationship between the camera coordinate system and the vehicle-mounted projector coordinate system as a fourth transformation relationship.
[0136] S10412: Calculate, based on the second boundary, a transformation relationship between the camera coordinate system and the projection screen coordinate system as a fifth transformation relationship.
[0137] S10413: According to the fourth transformation relationship and the fifth transformation relationship, a transformation relationship between the vehicle-mounted projector coordinate system and the projection screen coordinate system is calculated as a second transformation relationship.
[0138] S1042: Calculate a third transformation relationship between the projection screen coordinate system and the preset projection area according to the size of the projection screen and the size and position of the preset projection area in the projection screen.
[0139] S1043: According to the second transformation relationship and the third transformation relationship, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated as a first transformation relationship.
[0140] S105: Based on the first transformation relationship, control the vehicle-mounted projector to project the image and / or video to a preset projection area.
[0141] Figure 7 In the embodiment shown, Figure 6 The embodiments shown are similar, differing only in that Figure 7 In the illustrated embodiment, S1041 is subdivided into S10411, S10412 and S10413, so only S10411, S10412 and S10413 are described below.
[0142] Among them, in S10411, since the target image is obtained by taking a picture with a camera, the transformation relationship between the camera coordinate system and the image coordinate system can be calculated based on the parameters of the camera. In addition, as described in the aforementioned S1041, the projection boundary can be used to characterize the posture of the vehicle-mounted projector, and the third boundary can represent the position of the projection boundary in the image coordinate system. Therefore, the transformation relationship between the image coordinate system and the vehicle-mounted projector coordinate system can be fitted based on the positions of the projection boundary in the vehicle-mounted projector coordinate system and the image coordinate system, respectively. According to the transformation relationship between the camera coordinate system and the image coordinate system and the transformation relationship between the image coordinate system and the vehicle-mounted projector coordinate system, the transformation relationship between the camera coordinate system and the vehicle-mounted projector coordinate system can be calculated as the fourth transformation relationship. The fourth transformation relationship is denoted as Mcp hereinafter.
[0143] Exemplarily, the fourth transformation relationship Mcp can be represented by the following matrix:
[0144]
[0145] Where f is the focal length of the camera, t 1 ,t 2 ,t 3 It is used to represent the relative offset between the camera coordinate system and the vehicle projector coordinate system, r 1,1 、r 1,2 、r 1,3 、r 2,1 、r 2,2 、r 2,3 、r 3,1 、r 3,2 、r 3,3 Used to represent the relative deflection between the camera coordinate system and the vehicle projector coordinate system.
[0146] It can be understood that although this example only illustrates the case where the fourth transformation relationship Mcp is represented in matrix form, this does not mean that the fourth transformation relationship Mcp in this application must be represented in matrix form. For the case where the fourth transformation relationship Mcp is represented in other forms other than a matrix, the principle is exactly the same. The only difference lies in the representation form of the fourth transformation relationship Mcp. Therefore, it will not be repeated here. The same applies to the first transformation relationship, the second transformation relationship, the third transformation relationship and the fifth transformation relationship in this article.
[0147] In S10412, as described in S10411 above, the transformation relationship between the camera coordinate system and the image coordinate system can be calculated based on the parameters of the camera. And, as described in S1041 above, the boundary of the projection screen can be used to characterize the position of the projection screen, and the second boundary can represent the position of the boundary of the projection screen in the image coordinate system. Therefore, the transformation relationship between the image coordinate system and the projection screen coordinate system can be fitted according to the position of the boundary of the projection screen in the projection screen coordinate system and the image coordinate system respectively. According to the transformation relationship between the camera coordinate system and the image coordinate system and the transformation relationship between the image coordinate system and the projection screen coordinate system, the transformation relationship between the camera coordinate system and the projection screen coordinate system can be calculated as the fifth transformation relationship. The fifth transformation relationship is denoted as Mcs hereinafter.
[0148] In S10413, if the fourth transformation relationship Mcp is expressed in the form of a matrix, the product of the inverse matrix of the fourth transformation relationship Mcp and the fifth transformation relationship Mcs is used as the transformation relationship between the vehicle-mounted projector coordinate system and the projection screen coordinate system, that is, the second transformation relationship Mps=Mcp -1 ×Mcs.
[0149] In the above, an exemplary description has been given on how to calculate the second transformation relationship in S1041. In the following, an exemplary description will be given on how to calculate the first transformation relationship Mpt in S104. Figure 8 , Figure 8 The illustrated embodiment includes:
[0150] S101, obtaining a target image including a projection picture and a projection screen captured by a camera.
[0151] The projection picture is a picture that is projected by the vehicle-mounted projector according to a preset zoom ratio and / or video, and is displayed on the projection screen.
[0152] S102, identifying the boundary of the projection screen in the target image to obtain a first boundary of the projection screen in the image coordinate system, and identifying the boundary of the projection screen in the target image to obtain a second boundary of the projection screen in the image coordinate system.
[0153] S103: Calculate a projection boundary of the vehicle-mounted projector according to the preset zoom ratio and the first boundary as a third boundary of the projection boundary in the image coordinate system.
[0154] The projection boundary is the boundary of the area formed by the light emitted by the vehicle-mounted projector on the plane where the projection screen is located.
[0155] S104a, calculating and obtaining a third transformation relationship between the projection screen coordinate system and the preset projection area according to the size of the projection screen and the size and position of the preset projection area in the projection screen.
[0156] S104b: Calculate, based on the third boundary, a transformation relationship between the camera coordinate system and the vehicle-mounted projector coordinate system as a fourth transformation relationship.
[0157] S104c, calculating, based on the second boundary, a transformation relationship between the camera coordinate system and the projection screen coordinate system as a fifth transformation relationship.
[0158] S104d: According to the third transformation relationship, the fourth transformation relationship and the fifth transformation relationship, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated as a first transformation relationship.
[0159] S105: Based on the first transformation relationship, control the vehicle-mounted projector to project the image and / or video to a preset projection area.
[0160] Figure 8 In the embodiment shown, Figure 1 The embodiments shown are similar, differing only in that Figure 8 In the embodiment shown, S104 is subdivided into S104a, S104b, S104c and S104d, and S104a is the same as the aforementioned S1042, S104b is the same as the aforementioned S10411, and S104c is the same as the aforementioned S10412, so the aforementioned descriptions of S1042, S10411 and S10412 can be referred to, and will not be repeated here. Only S104d will be described exemplarily below.
[0161] In S104d, if the fourth transformation relationship Mcp is expressed in the form of a matrix, the product of the inverse matrix of the fourth transformation relationship Mcp, the fifth transformation relationship Mcs and the third transformation matrix Mst can be used as the transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area, that is, the first transformation relationship Mpt=Mcp -1 ×Mcs×Mst.
[0162] In another possible implementation, the product of the inverse matrix of the fourth transformation relationship Mcp and the fifth transformation relationship Mcs can be used as the transformation relationship between the vehicle-mounted projector coordinate system and the projection screen coordinate system, that is, the second transformation relationship Mps=Mcp -1 The product of the second transformation relationship Mps and the third transformation relationship Mst is then used as the transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area, that is, the first transformation relationship Mpt=Mps×Mst.
[0163] Corresponding to the aforementioned vehicle-mounted projection system, the process of the aforementioned vehicle-mounted projection system executing the vehicle-mounted projection correction method provided by the present application can be as follows: Fig. 9 See Fig. 9 ,include:
[0164] S901, turn on the projector.
[0165] Fig. 9 The projector shown in the figure is the Figure 2a or Figure 2b The vehicle-mounted projector 210 shown in FIG.
[0166] S902, the projector projects a picture scaled to a certain ratio.
[0167] The certain scaling ratio of the projector during projection in S902 is the preset scaling ratio in S101, and the picture is the projection picture in S101. Please refer to the relevant description of S101, which will not be repeated here.
[0168] S903, camera shooting picture.
[0169] S903 corresponds to the aforementioned camera capturing and obtaining a target image including a projection picture and a projection screen.
[0170] S904, the algorithm automatically identifies the projection screen boundary 1.
[0171] The projection screen boundary 1 is the aforementioned first boundary. S903 corresponds to the aforementioned S102. Please refer to the relevant description of the aforementioned S102, which will not be repeated here.
[0172] S905, the algorithm calculates the projection original picture boundary 1'.
[0173] The projected original picture boundary 1' is the aforementioned third boundary. S904 corresponds to the aforementioned S103. Please refer to the relevant description of the aforementioned S103, which will not be repeated here.
[0174] S906, calculating the camera and projector transformation matrix Mcp.
[0175] The camera and projector transformation matrix Mcp is the aforementioned fourth transformation relationship. S903 corresponds to the aforementioned S10411. Please refer to the relevant description of the aforementioned S10411, which will not be repeated here.
[0176] S907, the algorithm automatically identifies the curtain boundary 2.
[0177] Fig. 9 The curtain shown in the figure is the Figure 2a or Figure 2bThe projection screen 220 shown in FIG. The screen boundary 2 is the aforementioned second boundary, and S903 corresponds to the aforementioned S102. The relevant description of the aforementioned S102 can be referred to and will not be repeated here.
[0178] S908, calculating the transformation matrix Mcs between the camera and the screen.
[0179] The transformation matrix Mcs between the camera and the screen is the fifth transformation relationship mentioned above. S903 corresponds to the above S10412. Please refer to the relevant description of the above S10412, which will not be repeated here.
[0180] S909, calculate the transformation matrix Mps between the projector and the screen.
[0181] The transformation matrix Mps between the projector and the screen is the aforementioned second transformation relationship. S903 corresponds to the aforementioned S10413. Please refer to the relevant description of the aforementioned S10413, which will not be repeated here.
[0182] S910, size and position parameters of the screen and the target image.
[0183] S911, calculate the transformation matrix Mst between the screen and the screen target.
[0184] The target image and the screen target in S910 and S911 are the aforementioned preset projection areas, and the transformation matrix Mst between the screen and the screen target is the aforementioned third transformation relationship. S910-S911 corresponds to the aforementioned S1042. Please refer to the relevant description of the aforementioned S1042, which will not be repeated here.
[0185] S912, calculate the transformation matrix Mpt between the projector and the screen target.
[0186] The transformation matrix Mpt between the projector and the screen target is the aforementioned first transformation relationship. S912 corresponds to the aforementioned S1043. Please refer to the relevant description of the aforementioned S1043, which will not be repeated here.
[0187] S913, output to the projector chip.
[0188] If the processor 240 is Figure 2b In the electronic device shown, the processor 240 needs to send the first transformation relationship to the projector chip.
[0189] S914, the projector is calibrated.
[0190] S914 corresponds to the aforementioned S105, and the relevant description of the aforementioned S105 can be referred to, which will not be repeated here.
[0191] Corresponding to the above-mentioned vehicle-mounted projection correction method, the present application also provides a vehicle-mounted projection correction device, see Fig.10, the device comprises:
[0192] The image acquisition module 1001 is used to acquire a target image including a projection image and a projection screen captured by a camera; wherein the projection image is an image projected by the vehicle-mounted projector according to a preset zoom ratio and / or a video, and displayed on the projection screen;
[0193] The boundary recognition module 1002 is used to recognize the boundary of the projection screen in the target image, obtain the first boundary of the projection screen in the image coordinate system, and recognize the boundary of the projection screen in the target image, obtain the second boundary of the projection screen in the image coordinate system;
[0194] The boundary calculation module 1003 is used to calculate the projection boundary of the vehicle-mounted projector according to the preset zoom ratio and the first boundary as the third boundary of the projection boundary in the image coordinate system; wherein the projection boundary is the boundary of the area formed by the light emitted by the vehicle-mounted projector on the plane where the projection screen is located;
[0195] The transformation relationship calculation module 1004 is used to calculate the transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area according to the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen, as a first transformation relationship;
[0196] The projection control module 1005 is used to control the vehicle-mounted projector to project the image and / or video to a preset projection area based on the first transformation relationship.
[0197] In a possible embodiment, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated according to the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen, as a first transformation relationship, including:
[0198] According to the second boundary and the third boundary, a transformation relationship between the vehicle-mounted projector coordinate system and the projection screen coordinate system is calculated as a second transformation relationship;
[0199] According to the size of the projection screen and the size and position of the preset projection area in the projection screen, a third transformation relationship between the projection screen coordinate system and the preset projection area is calculated;
[0200] According to the second transformation relationship and the third transformation relationship, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated as the first transformation relationship.
[0201] In a possible embodiment, a transformation relationship between a vehicle-mounted projector coordinate system and a projection screen coordinate system is calculated based on the second boundary and the third boundary as a second transformation relationship, including:
[0202] According to the third boundary, a transformation relationship between the camera coordinate system and the vehicle-mounted projector coordinate system is calculated as a fourth transformation relationship;
[0203] According to the second boundary, a transformation relationship between the camera coordinate system and the projection screen coordinate system is calculated as a fifth transformation relationship;
[0204] According to the fourth transformation relationship and the fifth transformation relationship, the transformation relationship between the vehicle-mounted projector coordinate system and the projection screen coordinate system is calculated and obtained as the second transformation relationship.
[0205] In a possible embodiment, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated according to the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen, as a first transformation relationship, including:
[0206] According to the size of the projection screen and the size and position of the preset projection area in the projection screen, a third transformation relationship between the projection screen coordinate system and the preset projection area is calculated;
[0207] According to the third boundary, a transformation relationship between the camera coordinate system and the vehicle-mounted projector coordinate system is calculated as a fourth transformation relationship;
[0208] According to the second boundary, a transformation relationship between the camera coordinate system and the projection screen coordinate system is calculated as a fifth transformation relationship;
[0209] According to the third transformation relationship, the fourth transformation relationship and the fifth transformation relationship, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated as the first transformation relationship.
[0210] In a possible embodiment, obtaining a target image including a projection picture and a projection screen captured by a camera includes:
[0211] Obtaining the original image including the projection image and the projection screen captured by the camera;
[0212] The original image is distorted to obtain the target image.
[0213] The present application also provides an electronic device, such as Fig.11 As shown, including:
[0214] A memory 111, used for storing computer programs;
[0215] The processor 112 is used to execute the program stored in the memory 111 to implement the following steps:
[0216] Acquire a target image including a projection picture and a projection screen captured by a camera; wherein the projection picture is a picture projected by the vehicle-mounted projector according to a preset zoom ratio on an image and / or video and displayed on the projection screen;
[0217] Identify the boundary of the projection picture in the target image to obtain a first boundary of the projection picture in the image coordinate system, and identify the boundary of the projection screen in the target image to obtain a second boundary of the projection screen in the image coordinate system;
[0218] According to the preset scaling ratio and the first boundary, a projection boundary of the vehicle-mounted projector is calculated as a third boundary of the projection boundary in the image coordinate system; wherein the projection boundary is a boundary of an area formed by the light emitted by the vehicle-mounted projector on the plane where the projection screen is located;
[0219] According to the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated as a first transformation relationship;
[0220] Based on the first transformation relationship, the vehicle-mounted projector is controlled to project the image and / or video to the preset projection area.
[0221] Furthermore, the electronic device may further include a communication bus and / or a communication interface, and the processor 112, the communication interface, and the memory 111 communicate with each other via the communication bus.
[0222] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0223] The communication interface is used for communication between the above electronic device and other devices.
[0224] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0225] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0226] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned vehicle-mounted projection correction methods are implemented.
[0227] In another embodiment provided by the present invention, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any vehicle-mounted projection correction method in the above embodiments.
[0228] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0229] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0230] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the system, device, electronic device, computer-readable storage medium, and computer program product containing instructions, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0231] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A vehicle-mounted projection correction method, characterized in that: The method comprises: Acquire a target image including a projection picture and a projection screen captured by a camera; wherein the projection picture is a picture projected by the vehicle-mounted projector according to a preset zoom ratio on an image and / or video and displayed on the projection screen; Identify the boundary of the projection picture in the target image to obtain a first boundary of the projection picture in the image coordinate system, and identify the boundary of the projection screen in the target image to obtain a second boundary of the projection screen in the image coordinate system; According to the preset scaling ratio and the first boundary, a projection boundary of the vehicle-mounted projector is calculated as a third boundary of the projection boundary in the image coordinate system; wherein the projection boundary is a boundary of an area formed by the light emitted by the vehicle-mounted projector on the plane where the projection screen is located; According to the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated as a first transformation relationship; Based on the first transformation relationship, the vehicle-mounted projector is controlled to project the image and / or video to the preset projection area.
2. The method according to claim 1, characterized in that The calculation of the transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area according to the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen as the first transformation relationship includes: According to the second boundary and the third boundary, a transformation relationship between a vehicle-mounted projector coordinate system and a projection screen coordinate system is calculated as a second transformation relationship; According to the size of the projection screen and the size and position of the preset projection area in the projection screen, a third transformation relationship between the projection screen coordinate system and the preset projection area is calculated; According to the second transformation relationship and the third transformation relationship, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated as a first transformation relationship.
3. The method according to claim 2, characterized in that The calculation of the transformation relationship between the vehicle-mounted projector coordinate system and the projection screen coordinate system according to the second boundary and the third boundary as the second transformation relationship includes: According to the third boundary, a transformation relationship between the camera coordinate system and the vehicle-mounted projector coordinate system is calculated as a fourth transformation relationship; According to the second boundary, a transformation relationship between the camera coordinate system and the projection screen coordinate system is calculated as a fifth transformation relationship; According to the fourth transformation relationship and the fifth transformation relationship, the transformation relationship between the vehicle-mounted projector coordinate system and the projection screen coordinate system is calculated and obtained as the second transformation relationship.
4. The method according to claim 1, characterized in that: The calculation of the transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area according to the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen as the first transformation relationship includes: According to the size of the projection screen and the size and position of the preset projection area in the projection screen, a third transformation relationship between the projection screen coordinate system and the preset projection area is calculated; According to the third boundary, a transformation relationship between the camera coordinate system and the vehicle-mounted projector coordinate system is calculated as a fourth transformation relationship; According to the second boundary, a transformation relationship between the camera coordinate system and the projection screen coordinate system is calculated as a fifth transformation relationship; According to the third transformation relationship, the fourth transformation relationship and the fifth transformation relationship, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated as a first transformation relationship.
5. The method according to claim 1, characterized in that The acquisition of the target image including the projection picture and the projection screen captured by the camera includes: Obtaining the original image including the projection image and the projection screen captured by the camera; The original image is distorted to obtain a target image.
6. A vehicle-mounted projection system, characterized in that: The vehicle-mounted projection system includes: a vehicle-mounted projector, a projection screen, a camera and a processor; The vehicle-mounted projector is used to project images and / or videos onto the projection screen; The camera is used to capture a target image including a projection picture and a projection screen, and send the target image to the processor; wherein the projection picture is a picture in which the vehicle-mounted projector projects an image and / or video according to a preset zoom ratio and is displayed on the projection screen; The processor is used to receive the target image, identify the boundary of the projection picture in the target image, obtain the first boundary of the projection picture in the image coordinate system, and identify the boundary of the projection screen in the target image to obtain the second boundary of the projection screen in the image coordinate system; calculate the projection boundary of the vehicle-mounted projector according to the preset scaling ratio and the first boundary as the third boundary of the projection boundary in the image coordinate system; wherein the projection boundary is the boundary of the area formed by the light emitted by the vehicle-mounted projector on the plane where the projection screen is located; calculate the transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area according to the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen as the first transformation relationship; based on the first transformation relationship, control the vehicle-mounted projector to project the image and / or video to the preset projection area.
7. The system according to claim 6, characterized in that The vehicle-mounted projector and the camera are fixedly arranged at the same position; The optical axis of the vehicle-mounted projector is parallel to the optical axis of the camera.
8. A vehicle-mounted projection correction device, characterized in that: The device comprises: An image acquisition module, used to acquire a target image including a projection picture and a projection screen captured by a camera; wherein the projection picture is a picture projected by the vehicle-mounted projector according to a preset zoom ratio on an image and / or video and displayed on the projection screen; A boundary recognition module, used to recognize the boundary of the projection screen in the target image, obtain a first boundary of the projection screen in the image coordinate system, and recognize the boundary of the projection screen in the target image, obtain a second boundary of the projection screen in the image coordinate system; a boundary calculation module, configured to calculate a projection boundary of the vehicle-mounted projector according to the preset zoom ratio and the first boundary, as a third boundary of the projection boundary in the image coordinate system; wherein the projection boundary is a boundary of an area formed by the light emitted by the vehicle-mounted projector on the plane where the projection screen is located; a transformation relationship calculation module, configured to calculate a transformation relationship between a vehicle-mounted projector coordinate system and the preset projection area according to the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen, as a first transformation relationship; A projection control module is used to control the vehicle-mounted projector to project the image and / or video to the preset projection area based on the first transformation relationship.
9. The device according to claim 8, characterized in that The calculation of the transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area according to the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen as the first transformation relationship includes: According to the second boundary and the third boundary, a transformation relationship between a vehicle-mounted projector coordinate system and a projection screen coordinate system is calculated as a second transformation relationship; According to the size of the projection screen and the size and position of the preset projection area in the projection screen, a third transformation relationship between the projection screen coordinate system and the preset projection area is calculated; According to the second transformation relationship and the third transformation relationship, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated as a first transformation relationship; The calculation of the transformation relationship between the vehicle-mounted projector coordinate system and the projection screen coordinate system according to the second boundary and the third boundary as the second transformation relationship includes: According to the third boundary, a transformation relationship between the camera coordinate system and the vehicle-mounted projector coordinate system is calculated as a fourth transformation relationship; According to the second boundary, a transformation relationship between the camera coordinate system and the projection screen coordinate system is calculated as a fifth transformation relationship; According to the fourth transformation relationship and the fifth transformation relationship, a transformation relationship between the vehicle-mounted projector coordinate system and the projection screen coordinate system is calculated as a second transformation relationship; The calculation of the transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area according to the second boundary, the third boundary, the size of the projection screen, and the size and position of the preset projection area in the projection screen as the first transformation relationship includes: According to the size of the projection screen and the size and position of the preset projection area in the projection screen, a third transformation relationship between the projection screen coordinate system and the preset projection area is calculated; According to the third boundary, a transformation relationship between the camera coordinate system and the vehicle-mounted projector coordinate system is calculated as a fourth transformation relationship; According to the second boundary, a transformation relationship between the camera coordinate system and the projection screen coordinate system is calculated as a fifth transformation relationship; According to the third transformation relationship, the fourth transformation relationship and the fifth transformation relationship, a transformation relationship between the vehicle-mounted projector coordinate system and the preset projection area is calculated as a first transformation relationship; The acquisition of the target image including the projection picture and the projection screen captured by the camera includes: Obtaining the original image including the projection image and the projection screen captured by the camera; The original image is distorted to obtain a target image.
10. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-5 when executing a program stored in a memory.
Citation Information
Patent Citations
Vehicle-mounted screen picture projection correction method and device
CN114007054A
Projection picture correction method and device and storage medium
CN115174878A
Projection picture correction method and device, computer equipment and storage medium
CN115174879A
Curtain alignment method and device for projector, terminal and medium
CN116800938A
Projection system and method for adjusting projection screen
WO2021174989A1