Projection device and projection device parameter calibration method
By projecting images onto a card and identifying coded points and feature points using a projection device, matching relationships are obtained for parameter calibration. This solves the problem of inconsistency between the actual and theoretical parameters of the projection device, improving the accuracy of image correction and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HISENSE GRP HLDG CO LTD
- Filing Date
- 2022-12-29
- Publication Date
- 2026-05-08
AI Technical Summary
During use, the discrepancy between actual and theoretical parameters of projection equipment can lead to poor image correction accuracy, affecting the user experience.
The light-emitting component of the projection device projects the image card onto the calibration area, the camera captures the image, the coded points and feature points are identified, the matching relationship between the image coordinate system and the optomechanical coordinate system is obtained, and the parameters are calibrated.
It improves the accuracy of image correction and enhances the user experience.
Smart Images

Figure CN115953481B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of projection equipment technology, and in particular to a projection device and a method for calibrating projection device parameters. Background Technology
[0002] A projection device is a display device that projects images or videos onto a screen. Projection devices use optical lens components to refract laser light of a specific color onto a screen to form a concrete image.
[0003] When using a projection device, if the projector's position is off-center or not perpendicular to the projection surface, it will cause deviations in the projection angle and distance. This will prevent the projector from projecting the image completely onto the preset projection area, resulting in a distorted image and a poor user experience. Therefore, the image correction function of the projection device can be used to correct the display position and shape of the projected image to avoid distortion. During image correction, the projection device will adjust the projected image based on internal parameters, including optical engine intrinsic parameters and camera extrinsic parameters.
[0004] However, when using the theoretical parameters marked at the factory, due to certain errors in the actual production and assembly process, the actual parameters of the projection equipment are inconsistent with the theoretical parameters, resulting in poor accuracy when the projection equipment performs image correction, which seriously affects the user experience. Summary of the Invention
[0005] This application provides a projection device and a method for calibrating projection device parameters to solve the problem of inconsistency between the actual and theoretical parameters of the projection device, which affects the user experience.
[0006] In a first aspect, some embodiments of this application provide a projection device, including a light-emitting component, a camera, and a controller. The light-emitting component is configured to project projection content onto a projection surface; the camera is configured to capture an image on the projection surface; and the controller is configured to perform the following steps:
[0007] In response to a user-inputted parameter calibration command, the light-emitting component is controlled to project the first image card onto the calibration area, and the first image of the first image card captured by the camera is acquired; the projection surface includes the calibration area, and the calibration area includes feature points and coded points;
[0008] Identify coded points in the first image;
[0009] Based on the encoded points, a first matching relationship is obtained between the image coordinate system and the world coordinate system;
[0010] Identify feature points in the first image;
[0011] Based on the feature points, a second matching relationship is obtained between the image coordinate system and the optomechanical coordinate system;
[0012] Based on the first matching relationship and the second matching relationship, the parameters of the projection device are calibrated.
[0013] Secondly, some embodiments of this application provide a method for calibrating projection device parameters, characterized in that it is applied to a projection device, the projection device including a light-emitting component, a camera, and a controller, and the projection device parameter calibration method includes:
[0014] In response to a user-inputted parameter calibration command, the light-emitting component is controlled to project the first image card onto the calibration area, and the first image of the first image card captured by the camera is acquired; the projection surface includes the calibration area, and the calibration area includes feature points and coded points;
[0015] Identify coded points in the first image;
[0016] Based on the encoded points, a first matching relationship is obtained between the image coordinate system and the world coordinate system;
[0017] Identify feature points in the first image;
[0018] Based on the feature points, a second matching relationship is obtained between the image coordinate system and the optomechanical coordinate system;
[0019] Based on the first matching relationship and the second matching relationship, the parameters of the projection device are calibrated.
[0020] As can be seen from the above technical solutions, the projection device and projection device parameter calibration method provided in some embodiments of this application are as follows: After the user inputs a parameter calibration command to the projection device, the projection device projects a first image card onto the calibration area and acquires a first image of the first image card. The calibration area includes feature points and coded points. The projection device identifies the coded points in the first image and obtains a first matching relationship between the image coordinate system and the world coordinate system based on the coded points. The projection device identifies feature points in the first image and obtains a second matching relationship between the image coordinate system and the optomechanical coordinate system based on the feature points. The projection device calibrates the projection device parameters based on the first and second matching relationships. The projection device can calibrate actual parameters itself instead of using theoretical parameters, thereby improving the accuracy of image correction and enhancing the user experience. Attached Figure Description
[0021] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This application shows schematic diagrams illustrating the placement of projection devices according to some embodiments;
[0023] Figure 2 This application shows schematic diagrams of the optical path of a projection device according to some embodiments;
[0024] Figure 3 The circuit architecture schematic diagram of a projection device according to some embodiments of this application is shown;
[0025] Figure 4 The present application shows schematic diagrams of the structure of projection devices according to some embodiments;
[0026] Figure 5 This application shows a schematic diagram of the system framework for implementing display control using a projection device according to some embodiments;
[0027] Figure 6 Schematic diagrams are shown in some embodiments when the position of the projection device changes;
[0028] Figure 7 Schematic diagrams of components of the projection device are shown in some embodiments;
[0029] Figure 8 The interaction flowcharts of the components of the projection device in some embodiments are shown;
[0030] Figure 9 Schematic diagrams of the calibration areas are shown in some embodiments;
[0031] Figure 10 A schematic diagram of the complete ring is shown in some embodiments;
[0032] Figure 11 A schematic diagram of the annular region of the coding point is shown in some embodiments;
[0033] Figure 12 A schematic diagram of a circular outline is shown in some embodiments;
[0034] Figure 13 A schematic diagram of a horizontal stripe pattern card is shown in some embodiments;
[0035] Figure 14 A schematic diagram of a vertical striped pattern card is shown in some embodiments. Detailed Implementation
[0036] To make the objectives and implementation methods of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments.
[0037] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0038] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.
[0039] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.
[0040] The term "module" refers to any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0041] The embodiments of this application can be applied to various types of projection devices. The following description will use a projector as an example to illustrate the projection device and the automatic focusing method.
[0042] A projector is a device that projects images or videos onto a screen. Projectors can connect to computers, cable TV networks, the internet, VCD (Video Compact Disc), DVD (Digital Versatile Disc Recordable), game consoles, DV camcorders, and other devices via various interfaces to play corresponding video signals. Projectors are widely used in homes, offices, schools, and entertainment venues.
[0043] Figure 1 This application shows schematic diagrams illustrating the placement of projection devices according to some embodiments. Figure 2 A schematic diagram of the optical path of a projection device according to some embodiments of this application is shown.
[0044] In some embodiments, reference Figure 1-2This application provides a projection device including a projection screen 1 and a projection device 2. The projection screen 1 is fixed in a first position, and the projection device 2 is placed in a second position so that the image projected by the device matches the projection screen 1. The projection device includes a laser light source 100, an optical engine 200, a lens 300, and a projection medium 400. The laser light source 100 provides illumination for the optical engine 200, which modulates the light beam and outputs it to the lens 300 for imaging, projecting it onto the projection medium 400 to form a projected image. Since the laser light source 100, the optical engine 200, and the lens 300 are used together to emit projection light to project the image, in some embodiments of this application, the laser light source 100, the optical engine 200, and the lens 300 are collectively referred to as the light-emitting assembly.
[0045] In some embodiments, the laser source 100 of the projection device includes a laser assembly 110 and an optical lens assembly 120. The light beam emitted by the laser assembly 110 can pass through the optical lens assembly 120 to provide illumination for the optical engine. For example, the optical lens assembly 120 requires a high level of environmental cleanliness and airtightness; while the chamber in which the laser assembly is installed can be sealed with a lower level of dustproof sealing to reduce sealing costs.
[0046] In some embodiments, the optical engine 200 of the projection device may include a blue optical engine, a green optical engine, and a red optical engine, and may also include a heat dissipation system, a circuit control system, etc. It should be noted that in some embodiments, the light-emitting component of the projector may also be implemented using an LED light source.
[0047] Figure 3 A schematic diagram of the circuit architecture of a projection device according to some embodiments of this application is shown. In some embodiments, the projection device may include a display control circuit 10, a laser light source 20, at least one laser driving component 30, and at least one brightness sensor 40. The laser light source 20 may include at least one laser corresponding to at least one laser driving component 30. Here, "at least one" refers to one or more, and "more than one" refers to two or more.
[0048] Based on this circuit architecture, the projection device can achieve adaptive adjustment. For example, by setting a brightness sensor 40 in the light output path of the laser light source 20, the brightness sensor 40 can detect the first brightness value of the laser light source and send the first brightness value to the display control circuit 10.
[0049] The display control circuit 10 can acquire the second brightness value corresponding to the driving current of each laser, and determine that the laser has a COD fault when the difference between the second brightness value and the first brightness value of the laser is greater than the difference threshold. Then the display control circuit can adjust the current control signal of the corresponding laser driving component until the difference is less than or equal to the difference threshold, thereby eliminating the COD fault of the blue laser. The projection device can eliminate the COD fault of the laser in a timely manner, reduce the damage rate of the laser, and improve the image display effect of the projection device.
[0050] Figure 4 A schematic diagram of the structure of a projection device according to some embodiments of this application is shown.
[0051] In some embodiments, the laser light source 20 in the projection device may include independently configured blue laser 201, red laser 202 and green laser 203. The projection device may also be called a three-color projection device. The blue laser 201, red laser 202 and green laser 203 are all modular lightweight (Mirai Console Loader, MCL) packaged lasers, which are small in size and facilitate compact arrangement of the optical path.
[0052] In some embodiments, the controller includes at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), RAM (random access memory), ROM (read-only memory), a first to an nth interface for input / output, a communication bus, etc.
[0053] In some embodiments, the projection device may be configured with a camera for working in conjunction with the projection device to adjust and control the projection process. For example, the camera configured with the projection device may be specifically implemented as a 3D camera or a binocular camera; when the camera is implemented as a binocular camera, it specifically includes a left camera and a right camera; the binocular camera can acquire the image and playback content presented on the screen corresponding to the projection device, i.e., the projection surface, which is projected by the optical engine built into the projection device.
[0054] When the projection device moves, its projection angle and distance to the projection surface change, which will cause the projected image to be distorted, and the projected image will be displayed as a trapezoidal image or other distorted image; the projection device controller can achieve automatic trapezoidal correction based on the image captured by the camera, by coupling the angle between the optical engine and the projection surface and the correct display of the projected image.
[0055] Figure 5 A schematic diagram of the system framework for display control of a projection device according to some embodiments of this application is shown.
[0056] In some embodiments, the projection device has the characteristics of a long-throw micro-projector, and its controller can control the display of the projected light image through a preset algorithm to achieve functions such as automatic keystone correction of the displayed image, calibration of projection device parameters, automatic obstacle avoidance, automatic focus adjustment, and eye protection.
[0057] In some embodiments, the projection device is equipped with a gyroscope sensor; during the movement of the device, the gyroscope sensor can sense the position movement and actively collect movement data; then the collected data is sent to the application service layer through the system framework layer to support the application data required during user interface interaction and application interaction. The collected data can also be used by the controller for data calls in the algorithm service implementation.
[0058] In some embodiments, the projection device is equipped with a time-of-flight sensor. After the time-of-flight sensor collects the corresponding data, the data will be sent to the time-of-flight service corresponding to the service layer. After the time-of-flight service obtains the data, it will send the collected data to the application service layer through a process communication framework. The data will be used for data calls, user interfaces, program applications, and other interactive applications of the controller.
[0059] In some embodiments, the projection device is configured with a camera for acquiring images, which may be a binocular camera, a depth camera, or a 3D camera, etc. The camera acquisition data is sent to a camera service, and then the camera service sends the acquired image data to a process communication framework and / or a projection device calibration service. The projection device calibration service can receive the camera acquisition data sent by the camera service, and the controller can call the corresponding control algorithm in the algorithm library for different functions to be implemented.
[0060] In some embodiments, data interaction is performed with the application service through a process communication framework, and then the calculation results are fed back to the correction service through the process communication framework. The correction service sends the obtained calculation results to the projection device operating system to generate control signaling, and sends the control signaling to the optical engine control driver to control the optical engine operating conditions and realize automatic correction of the displayed image.
[0061] In some embodiments, users can use the above-described projection device in various scenarios. Different projection surfaces can be used as the projection medium 400 in different scenarios. For example, some users need to project onto a projection screen, i.e., the projection medium 400 is the projection screen; some users need to project onto a white wall, i.e., the projection medium 400 is the white wall; and some users need to project onto the ceiling, i.e., the projection medium 400 is the ceiling. For ease of description, in the embodiments of this application, the projection medium 400, projection surface, background wall, etc., all refer to the medium used to present the projected image. Unless otherwise stated, the projection medium 400, projection surface, and background wall have the same meaning and function.
[0062] If a user needs to project onto a wall or ceiling, they can adjust the projection angle and position of the projector to project the image onto different areas until the user finds the best viewing area.
[0063] If a user needs to project onto a specific area, such as a projection screen, the content projected by the projector can overlap with the blank area on the projection screen, thus providing the user with the best viewing experience.
[0064] Projection screens are used in cinemas, offices, home theaters, large conferences, and other settings to display images and video files. They can be configured to different sizes to suit specific needs. To better match users' viewing habits, the aspect ratio of the projector and the screen is usually set to 16:9 or 4:3 to accommodate the image size projected by the projection device.
[0065] To achieve optimal projection results, the installation positions of the projection screen and projection equipment can be operated by professional after-sales technicians. By setting the projection screen and projection equipment in the optimal positions for optimal projection during operation, the image projected by the projector will be completely within the projection screen, thereby improving the user experience. During use, users can also set the positions of both components themselves; this application embodiment does not impose any limitations.
[0066] When a user turns on the projector, it projects pre-set content onto a projection surface, displaying a projected image for viewing. However, if the projector is not positioned correctly, it may not be perpendicular to the projection surface, resulting in a trapezoidal or other distorted image. Alternatively, if the user bumps into the projector, changing its position, projection angle, and distance from the projection surface, the projected image may also be distorted, resulting in a trapezoidal or other distorted image. In these cases, image correction is necessary to ensure the projector projects a standard-shaped image for the user's viewing. Figure 6 The diagram illustrates how the projection device's position changes in some embodiments. The projection device initially stands at position A, projecting onto a suitable rectangular projection area that typically and accurately covers the corresponding rectangular screen. When the projector moves from position A to position B, distorted projected images, such as trapezoidal images, often occur, causing the projected image to misalign with the rectangular screen.
[0067] Users can manually control the projection device to adjust the projection angle, thereby controlling the display position and shape of the projected image and achieving image correction. However, this manual correction method is cumbersome and cannot accurately correct the projected image. Projection devices can also achieve automatic keystone correction based on deep learning neural networks, by coupling the angle between the optical engine and the projection surface with the correct display of the projected image. However, this correction method is slow and requires a large amount of scene data for model training to achieve a certain level of accuracy, making it unsuitable for scenarios requiring immediate and rapid correction from the user's device.
[0068] In some embodiments, the projection device can correct the projected image based on a keystone correction algorithm. The projection device can construct a transformation matrix between the projection plane in the world coordinate system and the optomechanical coordinate system based on a binocular camera. According to the projection device's internal parameters, including optomechanical camera intrinsic parameters and optomechanical camera extrinsic parameters, it calculates the homography relationship between the projected image and the image to be played. This homography relationship is then used to achieve arbitrary shape transformation between the projected image and the image to be played, thereby correcting the projected image. The internal parameters of the projection device can be those marked on the device casing or instruction manual at the time of manufacture. These parameters are typically set based on the projection device's function, assembly, manufacturing, components, and usage status, and are applicable to all projection devices of the same model.
[0069] However, the parameters specified by the projection device at the factory are theoretical parameters. In actual production and assembly, errors can occur, causing discrepancies between the actual and theoretical parameters. Using theoretical parameters for image correction significantly reduces the accuracy of the correction, resulting in distorted images and severely impacting the user experience.
[0070] Therefore, the projection device provided in this application embodiment can have a projection device parameter calibration function. The projection device parameter calibration function refers to the projection device's ability to automatically calibrate its internal parameters, thereby performing image correction based on these parameters to improve the user experience. The projection device can be set to a projection device parameter calibration mode, and the user can send a projection device parameter calibration command to the projection device, causing it to enter the projection device parameter calibration mode and thus enabling the projection device parameter calibration function.
[0071] In some embodiments, users can send projection device parameter calibration commands to the projection device by operating designated buttons on the remote control. In practical applications, a pre-defined mapping between projection device parameter calibration commands and remote control buttons is established. For example, a projection device parameter calibration mode button can be set on the remote control. When the user touches this button, the remote control sends a projection device parameter calibration command to the projection device, at which point the projection device enters projection device parameter calibration mode. When the user touches the button again, the projection device exits projection device parameter calibration mode.
[0072] In some embodiments, the projection device has voice control functionality. The projection device includes a sound acquisition unit, which may be a microphone. Users can use the sound acquisition unit of the projection device to send projection device parameter calibration commands to the projection device via voice input, thereby controlling the projection device to enter the projection device parameter calibration mode.
[0073] In some embodiments, the projection device may be equipped with a specific button for controlling whether the projection device enters the projection device parameter calibration mode. When the user presses this button, the projection device can automatically enter this mode.
[0074] In some embodiments, users can control the projection device using a smart device, such as a mobile phone. Users can send projection device parameter calibration commands to the projection device via their mobile phone. In practical applications, a control can be set up on the mobile phone to select whether to enter the projection device parameter calibration mode, thereby sending projection device parameter calibration commands to the projection device.
[0075] In order for a projection device to perform projection device parameter calibration, the projection device should include at least a light output component, a camera 500, and a controller. Figure 7Schematic diagrams of components of the projection device are shown in some embodiments.
[0076] The light-emitting component can be an optical engine, configured to project content onto the projection surface. Clearly, the projected content includes the user interface and the media assets being played. For example, when a user uses the remote control that comes with the projector to set up the projector, the light-emitting component can project the settings interface onto the projection surface; and when a user uses the projector to watch movies, TV series, or other multimedia resources, the light-emitting component can project the media assets onto the projection surface.
[0077] Camera 500 is configured to capture images, specifically images of the projection surface. Camera 500 can also capture images of the environment surrounding the projection device, thereby obtaining scene images. Camera 500 can acquire images of different objects depending on the intended purpose. For example, when the projection device adjusts its projection angle, camera 500 can capture images of the projection surface to obtain an image including the projected content; when the projection device automatically avoids obstacles, camera 500 can capture images of targets in front of the light-emitting component to obtain sampled images including the obstacle targets.
[0078] In order to accurately project images onto the screen area, some embodiments of this application also provide a specific method for calibrating projection device parameters, which is applied to the projection device. Figure 8 The diagrams show the interaction flowcharts of the components of the projection device in some embodiments, such as... Figure 8 As shown, it includes the following steps:
[0079] S101. In response to the parameter calibration command input by the user, the light-emitting component is controlled to project the first image card onto the calibration area and acquire the first image of the first image card captured by the camera; the projection surface includes the calibration area, and the calibration area includes feature points and coding points.
[0080] S102. Identify coding points in the first image.
[0081] S103. Obtain the first matching relationship between the image coordinate system and the world coordinate system based on the encoded points.
[0082] S104. Identify feature points in the first image.
[0083] S105. Obtain the second matching relationship between the image coordinate system and the optomechanical coordinate system based on the feature points.
[0084] S106. Based on the first matching relationship and the second matching relationship, calibrate the projection device parameters.
[0085] In some embodiments, the user can input a parameter calibration instruction to the projection device, so that the projection device calibrates the parameters. In response to this instruction, the controller can control the light-emitting component to project the first chart onto the calibration area in the projection plane. The first chart is used to illuminate the entire calibration area to identify the calibration area. To avoid the content in the chart affecting the identification of the calibration area, the first chart does not contain any graphics and can be a solid-color chart, such as a black chart.
[0086] When projecting the first chart, the controller can adjust the projection angle of the light-emitting component to the maximum angle, so that the light-emitting component can project an image with the largest range, and the first chart in the projection plane can cover the entire calibration area as much as possible to accurately identify the content of the calibration area.
[0087] After the light-emitting component projects the first chart, the content of the first chart will be included in the projection plane, and the first chart will cover the calibration area. The controller can control the camera to take a picture of the first chart and obtain the image captured by the camera of the first chart, which is called the first image in the embodiments of the present application. The first image can contain the content of the first chart, and the calibration area can be included in the first chart.
[0088] In some embodiments, the calibration area is located in the projection plane. The calibration area can be a calibration board and can be fixedly placed in the projection plane. The calibration area includes several feature points and several coding points. Figure 9 Shows a schematic diagram of the calibration area in some embodiments. As Figure 9 shown, the calibration area can adopt a black board surface, and several coding points 9a and feature points 9b are arranged regularly in the calibration area. Among them, the coding point 9a is the key node on the "rice" - shaped pattern in the calibration area, Figure 9 There are a total of 25 coding points 9a in the example, and the remaining center points are feature points.
[0089] The coding point can include a center area and an annular area. The center area is a center point. The feature point includes a center area. Among them, the center areas of the feature point and the coding point can be set to exactly the same content, that is, the center area of the coding point and the feature point are the same center point. For example, the size of the center point can be set to a radius d1 = 12mm.
[0090] There is a certain interval between the center area and the annular area of the coding point. The annular area can be several parts of a complete ring. When setting the annular area of each coding point, a complete ring can be generated first. Figure 10 Shows a schematic diagram of a complete ring in some embodiments. As Figure 10As shown, the central region is A, and the portion consisting of B1-B12 constitutes the complete ring. The complete ring can be divided into several equal parts; in this embodiment, we will use the division of the complete ring into 12 equal parts as an example. B1-B12 are the 12 parts of the complete ring.
[0091] For each coding point, the central region of the circle is the same, and it is the same central point as the feature point. The annular region of the coding point is a selection of several parts from the 12 parts of the complete annular region. That is, the annular region of each coding point is only a few parts of the complete annular region, not a complete annular region. Figure 11 A schematic diagram of the annular region of the coding point is shown in some embodiments. For example... Figure 11 As shown, the annular region of this coding point includes the B1-B2, B4-B5 and B9-B11 portions of the complete annular ring, that is, it includes 7 portions of the complete annular ring.
[0092] Meanwhile, in this embodiment, the annular region of each coding point is different; that is, each coding point corresponds to a unique annular region. Each annular region can be assigned a unique code, which is referred to as the first code in this embodiment. Each of the 12 parts of the complete annular region corresponds to a code number. If the part is white (i.e., it exists), the code number is 1; if the part is black (i.e., it does not exist), the code number is 0. For a coding point, the combination of the code numbers of its annular region relative to all parts of the complete annular region constitutes the first code of that coding point. The combination order is clockwise, i.e., in the order of B1-B12. Figure 11 Taking the encoded point in the image as an example, it includes parts B1-B2, B4-B5, and B9-B11. These parts appear white in the image, so their encoded number is 1. Other non-existent parts appear black in the image, so their encoded number is 0. Therefore, the first code of this encoded point is 110110001110.
[0093] Since the annular region of each coding point is different, each coding point corresponds to a unique first code.
[0094] When setting the dimensions of the annular region, the radius of the inner circle can be set to d2 = 29 mm, and the radius of the outer circle can be set to d3 = 45 mm.
[0095] In some embodiments, after acquiring the first image, the controller can identify coded points in the first image.
[0096] The controller can first convert the first image to grayscale to obtain a grayscale image. The controller can then perform edge detection on the grayscale image, or binarize it to obtain a binary image. The binary image contains only black and white graphics. Feature points and coded points are represented as white graphics.
[0097] The controller can perform closed contour recognition on a binarized image to obtain several closed contours. Encoding points are then determined based on these closed contours.
[0098] In some embodiments, the center point corresponding to the center region of the feature point and the coding point may include several points, which may cause these points to form a closed contour. That is, the outermost part of the center point will be a closed contour, while a closed contour may still exist inside the center point.
[0099] When performing closed contour recognition on a binarized image, due to noise interference such as ambient light, it is inevitable that multiple contours will be identified at a single center point. Therefore, it is impossible to identify all closed contours.
[0100] The controller can perform external contour recognition on the binarized image to obtain the first external contour.
[0101] It should be noted that the binarized image may contain some large contours. For example, the overall edge of the calibration region may form a closed contour, or there may be obstacles outside the calibration region forming contours. The controller needs to exclude these contours.
[0102] Considering that the area of such contours can be relatively large, a contour ratio can be preset as a threshold for the ratio of contour area to image area. Contours exceeding this threshold are considered obstacles or calibration area contours and can be ignored.
[0103] The controller can obtain the contour area of all the first outer contours and the image area of the first image, and can calculate the ratio of each contour area to the image area.
[0104] If a ratio greater than a preset contour ratio exists, it indicates that the currently identified first outer contour is unusable. The controller can delete the first outer contour from the binarized image, either by setting the grayscale value of the corresponding pixel to 0, making it appear black. Then, the controller can perform outer contour recognition on the binarized image after deleting the first outer contour to obtain the second outer contour. The controller can then determine these second outer contours as usable closed contours.
[0105] If there is no ratio greater than the preset contour ratio, that is, all ratios are less than or equal to the preset contour ratio, it means that the currently identified first external contour is usable, and the controller can directly determine the first external contour as a usable closed contour.
[0106] In some embodiments, after obtaining available closed contours, the controller can determine encoding points based on these closed contours.
[0107] Due to the placement of the projection equipment and the angle of the camera, the center points in the calibration area, including the center regions of feature points and coded points, as well as the annular region, will appear as ellipses in the image. Therefore, it is necessary to convert the ellipse into a perfect circle.
[0108] The controller can first obtain the roundness of several closed contours, and determine the closed contour with a roundness greater than or equal to a preset roundness threshold as the first closed contour. The preset roundness threshold can be 0.85. For the annular region of the encoding point, the roundness of the ellipse it presents in the image may be small, so the annular region can be removed by roundness detection.
[0109] It should be noted that the outline of a circle is composed of several outline points. If the number of outline points is too small, the resulting ellipse will have a large error and needs to be discarded.
[0110] The controller can obtain the number of contour points in the first closed contour and determine the first closed contour with a number of contour points greater than a preset threshold as the second closed contour. The preset threshold can be 10, and the first closed contour with a number of contour points less than or equal to 10 will be discarded.
[0111] The controller can fit the second closed contour to obtain a fitted contour, which may be elliptical.
[0112] Because the fitting process may have some problems, the fitted ellipse may be severely deformed, rendering the contour unusable. Therefore, the controller can discard such contours.
[0113] The controller can calculate the area of the second closed contour, referred to as the first area in this embodiment, and can also calculate the area of the fitted contour, referred to as the second area in this embodiment. The controller can calculate the ratio of the second area to the first area. If this ratio is too large or too small, it indicates a problem with the fitting process. A ratio condition can be preset, for example, a ratio of 0.9-1.1 is considered acceptable. A ratio exceeding this range indicates a problem with the fitting process.
[0114] The controller can acquire the fitting profile corresponding to the ratio that satisfies a preset ratio condition, referred to as the target fitting profile in this embodiment. The controller can acquire encoding points based on the target fitting profile. In this case, the target fitting profile may be an elliptical profile.
[0115] In some embodiments, when obtaining encoding points based on the target fitted contour, the controller can convert the elliptical contour into a circular contour. The controller can perform an affine transformation on the target fitted contour to obtain the target contour, which is a circular contour.
[0116] The controller can identify the coded points based on the target contour.
[0117] The controller can first obtain the first code of all coding points, and each coding point will correspond to a unique first code.
[0118] The controller can acquire a second code corresponding to each target contour. By matching the first and second codes, the coded points can be identified.
[0119] If a target has the same first and second codes, it means that the target contour corresponding to the second code is part of the coded point. Since the circularity detection step in the previous process has already eliminated the annular region, the target contour is the center region. The controller can determine this target contour as the center region of the coded point corresponding to the first code of the target.
[0120] In some embodiments, the controller may obtain a second code corresponding to the target contour according to the following steps.
[0121] The controller can first obtain the number of codes in the first encoding and then divide the target contour into contour branches equal to the number of codes. The number of codes is the number of equal divisions of the complete ring, which is 12. Therefore, the controller can divide the target contour into 12 equal parts, each of which is a contour branch.
[0122] The controller can divide the contour branches into several contour intervals. In this embodiment, each contour interval is set to 1 degree. Since the target contour is divided into 12 contour branches, the angle corresponding to each contour branch is 30 degrees. The controller can divide each contour branch into 30 equal parts, and each part is set as a 1-degree contour interval.
[0123] The controller can obtain the radius of the target contour, which is referred to as the first radius r in this embodiment. The controller can obtain a radius threshold based on the first radius. In this embodiment, the radius threshold is set to (r / d1*d2)—(r / d1*d3), which is the radius length (r / 12*29)—(r / 12*45) corresponding to the annular region.
[0124] The controller can select a preset number of radii within a radius threshold, referred to as the second radius in this embodiment, and 16 second radii can be selected.
[0125] Draw a circular outline with the center of the target outline as the center and the second radius as the radius. Figure 12 Schematic diagrams of circular outlines are shown in some embodiments. For example... Figure 12 As shown, L is the circular contour drawn based on the center and second radius of the target contour.
[0126] Let's take the first contour interval as an example, that is, the 0-1 degree contour interval in clockwise order. The controller can determine the color of the contour interval within the angle range.
[0127] The controller can obtain the grayscale value of the pixel corresponding to each circular outline. If the grayscale value of a circular outline corresponding to a second radius exceeds a preset number of such outlines, then that outline interval is designated as the first color. The preset number can be half the total number of second radii, for example, 8. The preset grayscale value is 255, and the first color can be white.
[0128] If no grayscale value corresponding to the second radius exceeds the preset number, the outline interval is determined as the second color, which can be black.
[0129] The controller can obtain the colors of all outline branches.
[0130] The controller can iterate through the colors of all contour intervals in a contour branch and determine the color of the contour branch as the color with the most occurrences. For example, if a contour branch has 20 white contour intervals and 10 black contour intervals, then the contour branch is white.
[0131] The controller can determine the value corresponding to the contour branch based on the color of the contour branch, with white being 1 and black being 0.
[0132] Based on the steps described above, the numerical values corresponding to all contour branches in the target contour can be obtained.
[0133] The controller can obtain the second code corresponding to the target contour based on the values corresponding to the contour branches. Combining the values corresponding to all contour branches in clockwise order yields the second code corresponding to the target contour.
[0134] In some embodiments, if there is no first code that is the same as the second code in the first code of all encoded points, it means that the point corresponding to the target contour can be a feature point, but not the center region of the encoded point.
[0135] If multiple second codes are identical to a certain first code, it may indicate an error occurred in the process of acquiring the second code for a target contour. In this case, the controller can remove the code point corresponding to the first code.
[0136] In some embodiments, after identifying the coded points in the first image, the controller can obtain a first matching relationship between the image coordinate system and the world coordinate system based on the coded points.
[0137] The controller can obtain the center point of the circle region of the encoded point and its image coordinates in the first image, which are referred to as the first image coordinates in this embodiment.
[0138] The controller can obtain the world coordinates of the encoded points based on the calibration region, referred to as the first world coordinates in this embodiment. Specifically, all center points in the calibration region, including the center regions of feature points and encoded points, can be numbered to determine the world coordinates of each center point. For example, if the calibration region includes 23*23 center points, the first row can be represented as (0,0) to (22,0). The world coordinates of the calibration region start from (0,0) and end at (22,22).
[0139] The controller calculates the first homography matrix based on the first image coordinates and the first world coordinates. The homography matrix can then be calculated using the coordinates of the four encoded points.
[0140] The controller can determine the first homography matrix as the first matching relationship between the image coordinate system and the world coordinate system.
[0141] In some embodiments, the controller may identify feature points in the first image.
[0142] The controller can first obtain the world coordinates of the feature points based on the calibration area, which are referred to as the second world coordinates in this embodiment.
[0143] Among the several closed contours identified in the first image, the controller can identify circular contours. For each closed contour, the target contour obtained is the center point of the circle in the calibration region. At this point, the center point includes the central region of feature points and encoded points. The controller can remove the central region to obtain all feature points.
[0144] The controller can determine the circular outline outside the center region of the encoding point as the first feature point.
[0145] The controller can obtain the image coordinates of the center point of the first feature point in the first image, and convert the image coordinates into world coordinates based on the first matching relationship.
[0146] If the second world coordinates of a target are the same as the world coordinates of the first feature point, the controller can identify the first feature point as the second feature point. The second feature point is the more accurate feature point identified.
[0147] In some embodiments, the controller can obtain a second matching relationship between the image coordinate system and the optomechanical coordinate system based on the identified feature points.
[0148] The controller can control the light-emitting component to project the second image card onto the calibration area and acquire a second image of the second image card captured by the camera. In this embodiment, the second image card can be a pure white image card.
[0149] The controller can also control the light-emitting component to project the grating chart onto the calibration area and acquire the grating image captured by the camera. The grating chart consists of 24 charts: 12 horizontal stripe charts (multiple horizontal stripes distributed vertically) and 12 vertical stripe charts (multiple vertical stripes distributed horizontally). Figure 13 Schematic diagrams of horizontal stripe pattern cards in some embodiments are shown. The 12 horizontal stripe pattern cards include 4 grating pattern cards with a first frequency but different phases, 4 grating pattern cards with a second frequency but different phases, and 4 grating pattern cards with a third frequency but different phases. Figure 14 Schematic diagrams of vertical stripe pattern cards in some embodiments are shown. The 12 vertical stripe pattern cards include 4 grating pattern cards with a first frequency but different phases, 4 grating pattern cards with a second frequency but different phases, and 4 grating pattern cards with a third frequency but different phases.
[0150] The controller can obtain the average gray level of all pixels in the first image and the average gray level of all pixels in the second image, and calculate the average of the two average gray levels as the gray level threshold.
[0151] The controller can acquire the pixel value of each pixel in the entire raster image. If the pixel value is greater than the grayscale threshold, the grayscale value of that pixel is set to 255; if the pixel value is less than or equal to the grayscale threshold, the grayscale value of that pixel is set to 0. The purpose is to eliminate areas not illuminated by the raster and avoid phase interference.
[0152] In some embodiments, the controller may select a plurality of pixels within the closed contour of the second feature point. The closed contour of the second feature point has a certain area, and multiple pixels are contained within it.
[0153] The controller can first obtain the image coordinates (x0, y0) of the center point of the second feature point in the first image. In these image coordinates, the x0 and y0 coordinates may not be integers. The controller can then round down the x0 and y0 coordinates to obtain the coordinates (x1, y1).
[0154] When selecting points, the controller can set the x-coordinate range to x1-2—x1+3, and select six integer coordinates within this range: x1-2, x1-1, x1, x1+1, x1+2, and x1+3. Simultaneously, the controller can select two y-coordinates: y1 and y1+1. Based on these coordinates, 12 pixels can be selected.
[0155] The controller can first confirm the 6 pixels with y-coordinate y1. The controller can then calculate the absolute phase of these 6 points based on the raster image. The method for calculating the absolute phase is as follows:
[0156] The phase of a point in a raster image is calculated using the phase-shifting method.
[0157] Calculate the w-direction phase of the point at three frequencies using the grating images corresponding to the 12 vertical fringe patterns. Specifically, the phase of the point at a given frequency can be calculated using four grating images with the same frequency. Calculate the h-direction phase of the point at three frequencies using the grating images corresponding to the 12 horizontal fringe patterns.
[0158] The controller calculates the superimposed principal phase values based on multi-frequency heterodyne, including the principal phase values in the w-direction and the h-direction. The controller can unwrap the principal phase values to obtain the absolute phase in the w-direction and the absolute phase in the h-direction for that pixel.
[0159] The controller can detect the absolute phase of the six pixels at y-coordinate y1 to see if they meet preset absolute phase conditions. The preset absolute phase conditions can be: arranged in coordinate order, the absolute phase of each pixel increases continuously, and the ratio s of the absolute phase of the next pixel to the absolute phase of the previous pixel in any two adjacent pixels satisfies 0.7. <s<1.4。
[0160] It should be noted that for pixels with the same y-coordinate, the absolute phase in the w direction is detected; for pixels with the same x-coordinate, the absolute phase in the h direction is detected.
[0161] Therefore, for the 6 pixels with y-coordinate y1, the controller checks whether the absolute phase in the w-direction satisfies the absolute phase condition. If so, the controller can continue to check whether the absolute phase in the w-direction of the 6 pixels with y-coordinate y1+1 satisfies the absolute phase condition.
[0162] If the absolute phase in the w-direction satisfies the absolute phase condition, the controller can detect the absolute phase in the h-direction. The controller can select new pixels, including those with y-coordinates ranging from y1-2 to y1+3, and within this range, select six integer coordinates: y1-2, y1-1, y1, y1+1, y1+2, and y1+3. Simultaneously, the controller can select two x-coordinates: x1 and x1+1. Based on these coordinates, 12 pixels can be selected.
[0163] For these 12 pixels, calculate the absolute phase and check whether the absolute phase in the h direction of the 6 pixels with x coordinate x1 satisfies the absolute phase condition, and whether the absolute phase in the h direction of the 6 pixels with x coordinate x1+1 satisfies the absolute phase condition.
[0164] If all conditions are met, then the second feature points corresponding to these pixels are determined as target feature points.
[0165] The controller can acquire the image coordinates of multiple adjacent pixels of the target feature point. In this embodiment, for a certain center point, the image coordinates of the center point of that circle are referred to as the image coordinates of that point.
[0166] Therefore, the image coordinates of the target feature point are (x0, y0). The controller can select four pixels around (x0, y0): (x1, y1), (x1, y1+1), (x1+1, y1), and (x1+1, y1+1), and calculate the absolute phase of each of these four points.
[0167] The controller can interpolate the absolute phase of these pixels to obtain the absolute phase of the target feature points.
[0168] The controller can obtain the optomechanical coordinates of the target feature points in the plane corresponding to the target feature points in the optomechanical coordinate system based on the absolute phase of the target feature points.
[0169] The controller can calculate the second homography matrix based on the optomechanical coordinates and the image coordinates of the target feature points, and determine the second homography matrix as the second matching relationship between the image coordinate system and the optomechanical coordinate system.
[0170] In some embodiments, the matching relationships between the image coordinate system, the optomechanical coordinate system, and the world coordinate system can be determined based on the first matching relationship and the second matching relationship.
[0171] The controller can calibrate the projection device parameters based on this matching relationship. The projection device parameters may include optical engine intrinsic parameters, camera intrinsic parameters, optical engine-camera extrinsic parameters, optical engine distortion coefficients, and camera distortion coefficients.
[0172] The controller can calibrate these parameters for image correction.
[0173] This application also provides a method for calibrating projection device parameters, applied to a projection device, the method comprising:
[0174] In response to the parameter calibration command input by the user, the light-emitting component is controlled to project the first image card onto the calibration area and acquire the first image of the first image card captured by the camera.
[0175] Identify coded points in the first image.
[0176] The first matching relationship between the image coordinate system and the world coordinate system is obtained based on the encoded points.
[0177] Feature points are identified in the first image.
[0178] The second matching relationship between the image coordinate system and the optomechanical coordinate system is obtained based on feature points.
[0179] Based on the first and second matching relationships, the parameters of the projection device are calibrated.
[0180] In some embodiments, identifying coded points in the first image further includes:
[0181] The first image is binarized to obtain a binarized image; closed contour recognition is performed on the binarized image to obtain several closed contours; coding points are determined based on the several closed contours.
[0182] In some embodiments, performing closed contour recognition processing on the binarized image further includes:
[0183] External contour recognition is performed on the binarized image to obtain a first external contour; the contour area of the first external contour and the image area of the first image are obtained. If the ratio of the contour area to the image area is less than or equal to a preset contour ratio, the first external contour is determined to be a closed contour. If the ratio of the contour area to the image area is greater than the contour ratio, the first external contour in the binarized image is deleted, and external contour recognition is performed on the binarized image to obtain a second external contour; the second external contour is determined to be a closed contour.
[0184] In some embodiments, determining the coding points based on a plurality of closed contours further includes:
[0185] The roundness of several closed contours is obtained, and the closed contours with roundness greater than or equal to a preset roundness threshold are identified as the first closed contours; the number of contour points of the first closed contours is obtained, and the first closed contours with a number of contour points greater than a preset number threshold are identified as the second closed contours; the second closed contours are fitted to obtain fitted contours; the first area of the second closed contours and the second area of the fitted contours are calculated, and the ratio of the second area to the first area is calculated; the target fitted contours corresponding to the ratios that satisfy the preset ratio conditions are obtained; and the coding points are obtained based on the target fitted contours.
[0186] In some embodiments, the encoded point includes a central region and an annular region. Obtaining the encoded point based on the target fitted contour further includes:
[0187] Obtain the first code of the coding point, and the coding point corresponds to a unique first code; perform an affine transformation on the target fitted contour to obtain the target contour; obtain the second code corresponding to the target contour; if there are targets with the same first code and second code, then the target contour is determined as the circle center region of the coding point corresponding to the first code of the target.
[0188] In some embodiments, obtaining the second code corresponding to the target contour further includes:
[0189] Obtain the number of codes for the first code, and divide the target contour into contour branches equal to the number of codes; divide the contour branches into several contour intervals; obtain the first radius of the target contour, and obtain a radius threshold based on the first radius; select a preset number of second radii within the radius threshold. Construct a circular contour with the center of the target contour as the center and the second radii as the radius; obtain the grayscale value of the pixel corresponding to the circular contour within the angle of the contour interval. Determine the color of the contour interval, where if the grayscale value corresponding to more than a preset number of second radii is greater than a preset grayscale value, the contour interval is determined as the first color; otherwise, the contour interval is determined as the second color. Traverse the colors of the contour intervals in the contour branches to determine the color of the contour branch with the most occurrences; determine the value corresponding to the contour branch based on the color of the contour branch; obtain the second code corresponding to the target contour based on the value corresponding to the contour branch.
[0190] In some embodiments, obtaining the first matching relationship between the image coordinate system and the world coordinate system based on the encoded points further includes:
[0191] Obtain the first image coordinates of the center region of the encoded point in the first image; obtain the first world coordinates of the encoded point based on the calibration region; calculate the first homography matrix based on the first image coordinates and the first world coordinates, and determine the first homography matrix as the first matching relationship between the image coordinate system and the world coordinate system.
[0192] In some embodiments, the feature point includes a central region. Identifying feature points in the first image further includes:
[0193] The second world coordinates of the feature points are obtained based on the calibration region; the circular contours among several closed contours are identified; the circular contours outside the center region of the encoded points are determined as the first feature points; the image coordinates of the first feature points are obtained, and the image coordinates are converted into world coordinates based on the first matching relationship; if there is a target whose second world coordinates are the same as the world coordinates of the first feature point, the first feature point is determined as the second feature point.
[0194] In some embodiments, performing a second matching relationship between the image coordinate system and the optomechanical coordinate system based on feature points further includes:
[0195] Select several pixels within the closed contour of the second feature point; control the light-emitting component to project the grating chart onto the calibration area and acquire the grating image captured by the camera; obtain the absolute phase of several pixels based on the grating image; if the absolute phase of several pixels satisfies a preset absolute phase condition, then the second feature point is determined as the target feature point; acquire multiple pixels adjacent to the image coordinates of the target feature point; perform interpolation processing on the absolute phases of the multiple pixels to obtain the absolute phase of the target feature point; obtain the optomechanical coordinates of the target feature point based on the absolute phase of the target feature point; calculate the second homography matrix based on the optomechanical coordinates and the image coordinates of the target feature point, and determine the second homography matrix as the second matching relationship between the image coordinate system and the optomechanical coordinate system.
[0196] The same or similar parts among the various embodiments in this specification can be referred to mutually, and will not be repeated here.
[0197] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or certain parts of the embodiments of the present invention.
[0198] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0199] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the embodiments and various different variations of embodiments suitable for specific application considerations.
Claims
1. A projection device, characterized in that, include: The light-emitting component is configured to project the content onto the projection surface; The camera is configured to capture images in the projection surface; The controller is configured as follows: In response to a user-inputted parameter calibration command, the light-emitting component is controlled to project the first image card onto the calibration area, and the first image of the first image card captured by the camera is acquired; the projection surface includes the calibration area, the calibration area includes feature points and encoding points, and the encoding points include a central region and an annular region; The first image is binarized to obtain a binarized image; Closed contour recognition is performed on the binarized image to obtain several closed contours; Obtain the roundness of the plurality of closed contours, and determine the closed contour with a roundness greater than or equal to a preset roundness threshold as the first closed contour; Obtain the number of contour points of the first closed contour, and determine the first closed contour with a number of contour points greater than a preset threshold as the second closed contour; The second closed contour is fitted to obtain the fitted contour; Calculate the first area of the second closed contour and the second area of the fitted contour, and calculate the ratio of the second area to the first area; Obtain the target fitted contour corresponding to the ratio that satisfies the preset ratio condition; Obtain the first code of the coding point, where each coding point corresponds to a unique first code; The target fitted contour is subjected to an affine transformation to obtain the target contour. Obtain the second code corresponding to the target contour; If there are targets with the same first code and second code, then the target contour is determined as the center region of the code point corresponding to the first code of the target; Based on the encoded points, a first matching relationship is obtained between the image coordinate system and the world coordinate system; Identify feature points in the first image; Based on the feature points, a second matching relationship is obtained between the image coordinate system and the optomechanical coordinate system; Based on the first matching relationship and the second matching relationship, the parameters of the projection device are calibrated.
2. The projection device according to claim 1, characterized in that, The controller performs closed contour recognition processing on the binarized image and is further configured to: The binarized image is subjected to external contour recognition to obtain a first external contour; Obtain the contour area of the first outer contour and the image area of the first image; If the ratio of the contour area to the image area is less than or equal to a preset contour ratio, then the first outer contour is determined as a closed contour. If the ratio of the contour area to the image area is greater than the contour ratio, then the first outer contour in the binarized image is deleted, and the outer contour is identified in the binarized image to obtain the second outer contour. The second outer contour is defined as a closed contour.
3. The projection device according to claim 1, characterized in that, The controller executes the acquisition of the second encoding corresponding to the target contour and is further configured to: Obtain the number of codes for the first code, and divide the target contour into contour branches of the number of codes; The contour branch is divided into several contour intervals; Obtain a first radius of the target contour, and obtain a radius threshold based on the first radius; select a preset number of second radii within the radius threshold; A circular outline is drawn with the center of the target outline as the center and the second radius as the radius; Within the angle of the contour interval, obtain the grayscale value of the pixel corresponding to the circular contour; The color of the contour interval is determined, wherein if the grayscale value corresponding to more than a preset number of second radii is greater than a preset grayscale value, the contour interval is determined to be a first color; if the grayscale value corresponding to no more than a preset number of second radii is greater than the preset grayscale value, the contour interval is determined to be a second color. Iterate through the colors of the contour intervals in the contour branches to determine the color of the contour branch with the most occurrences. The numerical value corresponding to the contour branch is determined based on the color of the contour branch; The second code corresponding to the target contour is obtained based on the value corresponding to the contour branch.
4. The projection device according to claim 1, characterized in that, The controller performs a first matching relationship between the image coordinate system and the world coordinate system based on the encoded points, and is further configured to: Obtain the first image coordinates of the center region of the encoded point in the first image; The first world coordinates of the encoded point are obtained based on the calibration region; The first homography matrix is calculated based on the first image coordinates and the first world coordinates, and the first homography matrix is determined as the first matching relationship between the image coordinate system and the world coordinate system.
5. The projection device according to claim 1, characterized in that, The feature points include a central region; the controller performs feature point recognition in the first image and is further configured to: The second world coordinates of the feature points are obtained based on the calibration region; Identify the circular contour among the several closed contours; The circular outline outside the center region of the encoded point is defined as the first feature point; Obtain the image coordinates of the first feature point, and convert the image coordinates into world coordinates based on the first matching relationship; If there exists a target with the same second world coordinates as the first feature point, then the first feature point is designated as the second feature point.
6. The projection device according to claim 5, characterized in that, The controller executes a second matching relationship between the image coordinate system and the optomechanical coordinate system based on the feature points, and is further configured to: Select several pixels within the closed contour of the second feature point; The light-emitting component is controlled to project the grating pattern card onto the calibration area, and the grating image captured by the camera on the grating pattern card is acquired; the absolute phase of the plurality of pixels is acquired based on the grating image; If the absolute phase of the plurality of pixels satisfies a preset absolute phase condition, then the second feature point is determined as the target feature point; Obtain the image coordinates of multiple adjacent pixels of the target feature point; The absolute phase of the target feature point is obtained by interpolating the absolute phase of the plurality of pixels. The optomechanical coordinates of the target feature points are obtained based on the absolute phase of the target feature points; The second homography matrix is calculated based on the optomechanical coordinates and the image coordinates of the target feature points, and the second homography matrix is determined as the second matching relationship between the image coordinate system and the optomechanical coordinate system.
7. A method for calibrating parameters of a projection device, characterized in that, Applied to a projection device, the projection device includes a light-emitting component, a camera, and a controller, and the parameter calibration method for the projection device includes: In response to a user-inputted parameter calibration command, the light-emitting component is controlled to project the first image card onto the calibration area, and the first image of the first image card captured by the camera is acquired; the projection surface includes the calibration area, the calibration area includes feature points and encoding points, and the encoding points include a central region and an annular region; The first image is binarized to obtain a binarized image; Closed contour recognition is performed on the binarized image to obtain several closed contours; Obtain the roundness of the plurality of closed contours, and determine the closed contour with a roundness greater than or equal to a preset roundness threshold as the first closed contour; Obtain the number of contour points of the first closed contour, and determine the first closed contour with a number of contour points greater than a preset threshold as the second closed contour; The second closed contour is fitted to obtain the fitted contour; Calculate the first area of the second closed contour and the second area of the fitted contour, and calculate the ratio of the second area to the first area; Obtain the target fitted contour corresponding to the ratio that satisfies the preset ratio condition; Obtain the first code of the coding point, where each coding point corresponds to a unique first code; The target fitted contour is subjected to an affine transformation to obtain the target contour. Obtain the second code corresponding to the target contour; If there are targets with the same first code and second code, then the target contour is determined as the center region of the code point corresponding to the first code of the target; Based on the encoded points, a first matching relationship is obtained between the image coordinate system and the world coordinate system; Identify feature points in the first image; Based on the feature points, a second matching relationship is obtained between the image coordinate system and the optomechanical coordinate system; Based on the first matching relationship and the second matching relationship, the parameters of the projection device are calibrated.
Citation Information
Patent Citations
High-precision three-dimensional reconstruction method and system based on binary surface structured light
CN107945268A
Projector calibration method, intelligent terminal and storage medium
CN112050751A