iToF depth data acquisition method and device
By obtaining the phase difference of the iToF depth frame to construct a grayscale image and obtain the pixel coordinates, the problem of the noise influence of the iToF depth camera based on the Spot light source is solved, and the stability and accuracy of the depth data are improved.
Patent Information
- Application Number
- CN202111230208.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-22
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-10-22
AI Technical Summary
The iToF depth camera based on Spot light source is affected by noise when calculating depth, resulting in poor stability and low accuracy of depth data.
By obtaining the phase difference of each pixel in the target depth frame, a grayscale image is constructed, the pixel coordinates are obtained according to the brightness, and these coordinates are used to filter the noise data to obtain the final depth data.
It improves the stability and accuracy of depth data, eliminates the impact of noise, and ensures the reliability of depth data.
Smart Images

Figure CN114119693B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to an iToF depth data acquisition method and device. Background Art
[0002] With the development of imaging technology and camera technology, depth cameras have been born to obtain depth information. Among them, iToF (Indirect Time of Flight) depth cameras are widely used in the field of depth information acquisition. iToF depth cameras indirectly measure depth through phase shift method. For example, the iToF depth camera transmits a modulated infrared light signal to the scene, and then the sensor receives the light signal reflected by the object to be measured in the scene. The phase difference between the transmitted signal and the received signal is calculated according to the accumulated charge during the exposure (integration) time, so as to obtain the depth of the target object. At present, the depth camera based on Spot light source will be seriously affected by noise when calculating the depth, which leads to poor stability and low accuracy of the final depth data. Summary of the invention
[0003] In view of the above problems, the present invention proposes an iToF depth data acquisition method and device, which can accurately denoise the iTOF depth data and improve the stability and accuracy of the depth data.
[0004] In the first aspect, the present application provides the following technical solution through an embodiment:
[0005] An iToF depth data acquisition method, comprising:
[0006] Obtain a first phase difference, a second phase difference, a third phase difference, and a fourth phase difference corresponding to each pixel in a target depth frame; obtain a grayscale image corresponding to the target depth frame according to the first phase difference, the second phase difference, the third phase difference, and the fourth phase difference; obtain multiple target pixel coordinates according to the brightness of the grayscale image; obtain final depth data according to the multiple target pixel coordinates and the first phase difference, the second phase difference, the third phase difference, and the fourth phase difference corresponding to each target pixel coordinate.
[0007] Optionally, obtaining a plurality of target pixel coordinates according to the brightness of the grayscale image includes:
[0008] According to the brightness of the grayscale image, the area contours of a plurality of bright areas are obtained; according to the area contours of the respective bright areas, the target pixel coordinates of the respective bright areas are obtained.
[0009] Optionally, obtaining the area contours of a plurality of bright areas according to the brightness of the grayscale image includes:
[0010] The contours of the bright areas are extracted from the grayscale image according to a preset contour extraction function to obtain the area contours of the respective bright areas.
[0011] Optionally, the contour extraction function is a canny function.
[0012] Optionally, obtaining the target pixel coordinates of the bright area according to the area contours of the bright areas includes:
[0013] According to the area contours of the bright areas, the circumscribed rectangles of the area contours are obtained; and for each of the circumscribed rectangles, the target pixel coordinates are obtained according to the maximum grayscale value in the circumscribed rectangle.
[0014] Optionally, obtaining the target pixel coordinates according to the maximum grayscale value within the circumscribed rectangle includes:
[0015] Acquire all grayscale values within the circumscribed rectangle; numerically sort all the grayscale values to obtain the maximum grayscale value; and obtain the target pixel coordinates according to the maximum grayscale value.
[0016] Optionally, obtaining a grayscale image corresponding to the target depth frame according to the first phase difference, the second phase difference, the third phase difference, and the fourth phase difference includes:
[0017] According to the first phase difference, the second phase difference, the third phase difference and the fourth phase difference, the confidence of each pixel is obtained; the confidence of each pixel is converted into a grayscale value to obtain the grayscale image; wherein, the greater the confidence, the greater the grayscale value.
[0018] In the second aspect, based on the same inventive concept, the present application provides the following technical solution through an embodiment:
[0019] An iToF depth data acquisition device, comprising:
[0020] An acquisition module is used to acquire a first phase difference, a second phase difference, a third phase difference and a fourth phase difference corresponding to each pixel in a target depth frame; a first processing module is used to obtain a grayscale image corresponding to the target depth frame according to the first phase difference, the second phase difference, the third phase difference and the fourth phase difference; a filtering module is used to obtain a plurality of target pixel coordinates according to the brightness of the grayscale image; a second processing module is used to obtain final depth data according to the plurality of target pixel coordinates and the first phase difference, the second phase difference, the third phase difference and the fourth phase difference corresponding to each target pixel coordinate.
[0021] In the third aspect, based on the same inventive concept, the present application provides the following technical solution through an embodiment:
[0022] An electronic device comprises a processor and a memory, wherein the memory is coupled to the processor and stores instructions, and when the instructions are executed by the processor, the electronic device executes the steps of any one of the methods described in the first aspect above.
[0023] In the fourth aspect, based on the same inventive concept, the present application provides the following technical solution through an embodiment:
[0024] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect above.
[0025] An iToF depth data acquisition method and device provided by an embodiment of the present invention obtains the first phase difference, the second phase difference, the third phase difference and the fourth phase difference corresponding to each pixel in the target depth frame; then, according to the first phase difference, the second phase difference, the third phase difference and the fourth phase difference, the grayscale image corresponding to the target depth frame is obtained; according to the brightness of the grayscale image, multiple target pixel coordinates are obtained; finally, according to the multiple target pixel coordinates and the first phase difference, the second phase difference, the third phase difference and the fourth phase difference corresponding to each target pixel coordinate, the final depth data is obtained. Among them, the final depth data obtained is filtered by the target pixel coordinates to ensure the stability and accuracy of the final depth data.
[0026] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0028] Figure 1 A flowchart of an iToF depth data acquisition method provided by a first embodiment of the present invention is shown;
[0029] Figure 2 A schematic diagram of the structure of a light source point in a first embodiment of the present invention is shown;
[0030] Figure 3A schematic diagram of depth data distribution before optimization in the first embodiment of the present invention is shown;
[0031] Figure 4 A schematic diagram of optimized depth data distribution in the first embodiment of the present invention is shown;
[0032] Figure 5 A schematic diagram of the functional module structure of an iTOF depth data acquisition device provided by the second embodiment of the present invention is shown. DETAILED DESCRIPTION
[0033] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0034] An iToF depth data acquisition method and device provided in the present invention can be used to obtain the depth data of the depth camera of mobile phones, computers, cameras, ranging devices and other devices, wherein the depth camera is a depth camera based on Spot (point) light source. Specifically, it can be applied to the image processing dedicated chip or processor in these devices. For example, a laptop computer currently has a depth camera, which captures whether the target user is in front of the laptop computer through the depth camera. When performing depth calculation in the process of capturing the target user, the method in the present invention can be used to achieve the acquisition of the depth data corresponding to the target user. In order to make the concept of the method and device of the present invention easier to understand, the method and device of the present invention are described in more detail below by way of specific embodiments.
[0035] See also Figure 1 In one embodiment of the present invention, a method for acquiring iToF depth data is provided. Figure 1 The flowchart of the iToF depth data acquisition method is shown. The iToF depth data acquisition method comprises:
[0036] Step S10: obtaining a first phase difference, a second phase difference, a third phase difference and a fourth phase difference corresponding to each pixel in the target depth frame;
[0037] Step S20: obtaining a grayscale image corresponding to the target depth frame according to the first phase difference, the second phase difference, the third phase difference and the fourth phase difference;
[0038] Step S30: obtaining a plurality of target pixel coordinates according to the brightness of the grayscale image;
[0039] Step S40: obtaining final depth data according to the plurality of target pixel coordinates and the first phase difference, the second phase difference, the third phase difference and the fourth phase difference corresponding to each target pixel coordinate.
[0040] The iToF depth data acquisition method in this embodiment obtains a grayscale image corresponding to the target depth frame based on the first phase difference, the second phase difference, the third phase difference and the fourth phase difference corresponding to each pixel in the target depth frame, such as Figure 2 As shown; then, the target pixel coordinates are found through the grayscale image. The target pixel coordinates are the coordinate points with the largest brightness, which can accurately represent the light source point, thereby filtering out the noise data in the area outside the target pixel coordinates. Finally, only the depth data corresponding to the target pixel coordinates is obtained as the final depth data, which ensures the stability and accuracy of the final depth data.
[0041] The possible implementation methods and implementation details of each step in this embodiment are further described below.
[0042] Step S10: obtaining a first phase difference, a second phase difference, a third phase difference and a fourth phase difference corresponding to each pixel in the target depth frame.
[0043] In step S10, the target depth frame includes image data of four different phases captured by the depth camera. During shooting, the transmitting end of the depth camera emits a light signal, such as an infrared light signal; then, the receiving end of the depth camera receives the infrared light signal, thereby exposing and generating a photoelectric signal. The first phase difference, the second phase difference, the third phase difference, and the fourth phase difference may correspond to phase delays of 0°, 90°, 180°, and 270°, respectively.
[0044] Step S20: obtaining a grayscale image corresponding to the target depth frame according to the first phase difference, the second phase difference, the third phase difference and the fourth phase difference.
[0045] In step S20, in some specific implementations, the grayscale image acquisition process may be as follows:
[0046] First, the confidence of each pixel is obtained according to the first phase difference, the second phase difference, the third phase difference and the fourth phase difference. The confidence can be obtained based on the formula confidence = abs(D0-D2) + abs(D1-D3); wherein confidence represents confidence, abs() represents absolute value, D0 is the first phase difference, D1 is the second phase difference, D2 is the third phase difference, and D3 is the fourth phase difference. Then, the confidence of each pixel is converted into a grayscale value to obtain a grayscale image; wherein, the greater the confidence, the greater the grayscale value. Specifically, the confidence corresponding to each pixel can be normalized and then mapped to 0-255 to obtain the grayscale value of each pixel; thus, a grayscale image can be constructed based on the grayscale value. For example, the existing normalization processing method can be used to normalize the confidence to the [0,1] interval, and then the normalized value is proportionally mapped to the 0-255 interval (for example, proportionally amplified 255 times) to achieve the mapping of the confidence to the grayscale value.
[0047] Step S30: obtaining a plurality of target pixel coordinates according to the brightness of the grayscale image.
[0048] In step S30, a possible implementation is as follows:
[0049] First, the contours of multiple bright areas can be obtained according to the brightness of the grayscale image. Specifically, a preset contour extraction function can be used to extract the contours of the bright areas from the grayscale image to obtain the contours of each bright area. The bright area is the white dot area in the grayscale image. There are multiple white dot areas in a grayscale image, such as Figure 2 The obtained area outline can be a circle, an ellipse or other irregular polygonal shapes.
[0050] The contour extraction function includes but is not limited to the canny function, the Roberts function, the Sobel function and the Prewitt function, through which the edge detection of the white dot area can be performed to identify the area contour. Furthermore, in this embodiment, the canny function can be used for extraction, which can ensure that the extraction process is less affected by noise, has a low error rate and good positioning.
[0051] Then, according to the regional outline of each bright area, the target pixel coordinates of each bright area are obtained. There are still many pixel values within the regional outline. Obtaining the final depth data according to the pixel values in the regional outline will be affected by the data of the area around the light source point, which will still lead to inaccurate depth data. Therefore, determining the target pixel coordinates from the regional outline can further filter the noise data and improve the stability and reliability of the final depth data.
[0052] In a specific implementation, the target pixel coordinates can be obtained as follows. The bounding rectangle of each bright area can be obtained according to the area contour of each bright area; thereby taking into account the pixels of the bright area and the surrounding area of the bright area as much as possible, which is conducive to including the white point pixel position missed in the contour recognition process, and improving the accuracy and reliability of the final depth data. The bounding rectangle in this embodiment should be understood as a square. Then, for each bounding rectangle, the target pixel coordinates are obtained according to the maximum grayscale value in the bounding rectangle. The maximum grayscale value in the bounding rectangle can be screened and obtained by sorting; first, all grayscale values in the bounding rectangle are obtained; then, all grayscale values are numerically sorted, and the sorting can be bubble sort, insertion sort, quick sort, selection sort and other sorting methods to complete the sorting from large to small or from small to large, and obtain the maximum grayscale value. In this embodiment, bubble sort can be used, which can have a higher calculation efficiency for grayscale values with a small amount of data. Finally, the target pixel coordinates are obtained according to the maximum grayscale value; the target pixel coordinates are the pixel coordinates corresponding to the maximum grayscale value, and each bright area has at least one target pixel coordinate.
[0053] Step S40: obtaining final depth data according to the plurality of target pixel coordinates and the first phase difference, the second phase difference, the third phase difference and the fourth phase difference corresponding to each target pixel coordinate.
[0054] Calculating the depth data by the first phase difference, the second phase difference, the third phase difference and the fourth phase difference is an existing method. For example, the 4-sampling-bucket algorithm can be used to calculate and obtain the depth data; the detailed process of obtaining the depth data is not repeated in this embodiment. In step S40, only the depth data corresponding to the target pixel coordinates can be obtained, which is the final depth data. Therefore, the final depth data no longer contains unstable data outside the target pixel coordinates, eliminating noise data.
[0055] In addition, in this embodiment, when executing step S20, the depth data corresponding to all pixels can be synchronously obtained and recorded as initial depth data. Since the pixel coordinates are not filtered in the initial depth data, the areas in and outside the bright area have more unstable depth data. When executing step S40, the depth data corresponding to the target pixel coordinates can be directly extracted from the initial depth data. In this way, when executing step S40, the depth data calculation is no longer performed; the depth data calculation process can be performed during the execution of step S20 and step S30, which can shorten the execution time of step S40 and improve efficiency.
[0056] It should be noted that in actual application, final depth data corresponding to multiple depth frames can be obtained, and then the average value is taken as the depth data actually used.
[0057] The technical effect of this embodiment is verified by an example below:
[0058] When the depth data is obtained by adopting the existing technical solution, the initial depth data is directly calculated by the first phase difference, the second phase difference, the third phase difference and the fourth phase difference. The initial depth data does not filter the noise data, and there are many noise points and poor stability. Figure 3 If the final depth data is obtained by using an iToF depth data acquisition method provided in this embodiment, the data is filtered, and the retained data has high accuracy and good stability, such as Figure 4 shown.
[0059] In summary, the iToF depth data acquisition method provided in this embodiment obtains the first phase difference, the second phase difference, the third phase difference and the fourth phase difference corresponding to each pixel in the target depth frame; then, according to the first phase difference, the second phase difference, the third phase difference and the fourth phase difference, the grayscale image corresponding to the target depth frame is obtained; according to the brightness of the grayscale image, multiple target pixel coordinates are obtained; finally, according to the multiple target pixel coordinates and the first phase difference, the second phase difference, the third phase difference and the fourth phase difference corresponding to each target pixel coordinate, the final depth data is obtained. Among them, the final depth data obtained is filtered by the target pixel coordinates to ensure the stability and accuracy of the final depth data.
[0060] Second embodiment
[0061] See also Figure 5 Based on the same inventive concept, the second embodiment of the present invention further provides an iToF depth data acquisition device 300, the iToF depth data acquisition device 300 comprising:
[0062] An acquisition module 301 is used to acquire a first phase difference, a second phase difference, a third phase difference and a fourth phase difference corresponding to each pixel in a target depth frame; a first processing module 302 is used to obtain a grayscale image corresponding to the target depth frame according to the first phase difference, the second phase difference, the third phase difference and the fourth phase difference; a filtering module 303 is used to obtain a plurality of target pixel coordinates according to the brightness of the grayscale image; a second processing module 304 is used to obtain final depth data according to the plurality of target pixel coordinates and the first phase difference, the second phase difference, the third phase difference and the fourth phase difference corresponding to each target pixel coordinate.
[0063] As an optional implementation, the filtering module 303 is specifically used to:
[0064] According to the brightness of the grayscale image, the area contours of a plurality of bright areas are obtained; according to the area contours of the respective bright areas, the target pixel coordinates of the respective bright areas are obtained.
[0065] As an optional implementation, the filtering module 303 is further specifically configured to:
[0066] The contours of the bright areas are extracted from the grayscale image according to a preset contour extraction function to obtain the area contours of the respective bright areas.
[0067] As an optional implementation, the contour extraction function is a canny function.
[0068] As an optional implementation, the filtering module 303 is further specifically configured to:
[0069] According to the area contours of the bright areas, the circumscribed rectangles of the area contours are obtained; and for each of the circumscribed rectangles, the target pixel coordinates are obtained according to the maximum grayscale value in the circumscribed rectangle.
[0070] As an optional implementation, the filtering module is further specifically used for:
[0071] Acquire all grayscale values within the circumscribed rectangle; numerically sort all the grayscale values to obtain the maximum grayscale value; and obtain the target pixel coordinates according to the maximum grayscale value.
[0072] As an optional implementation manner, the first processing module 302 is specifically configured to:
[0073] According to the first phase difference, the second phase difference, the third phase difference and the fourth phase difference, the confidence of each pixel is obtained; the confidence of each pixel is converted into a grayscale value to obtain the grayscale image; wherein, the greater the confidence, the greater the grayscale value.
[0074] It should be noted that the specific implementation and technical effects of the iToF depth data acquisition device 300 provided in the embodiment of the present invention are the same as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0075] Third embodiment
[0076] Based on the same inventive concept, another embodiment of the present application provides an electronic device for implementing the iToF depth data acquisition method described in the aforementioned embodiment of the present application. The electronic device includes a processor and a memory, the memory is coupled to the processor, and the memory stores instructions, and when the instructions are executed by the processor, the electronic device executes the steps of the method described in the aforementioned method embodiment.
[0077] It should be noted that in the electronic device provided by the embodiment of the present invention, when the instructions are executed by the processor, the specific implementation of each step and the technical effect produced are the same as those in the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in this embodiment can be referred to the corresponding contents in the aforementioned method embodiment.
[0078] Fourth embodiment
[0079] Based on the same inventive concept, another embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the method described in any one of the aforementioned method embodiments are implemented.
[0080] It should be noted that, in the computer-readable storage medium provided in the embodiment of the present invention, when the program is executed by the processor, the specific implementation of each step and the technical effect produced are the same as those in the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in this embodiment can be referred to the corresponding contents in the aforementioned method embodiment.
[0081] The term "and / or" that appears in this article is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship; the word "comprising" does not exclude the existence of elements or steps that are not listed in the claims. The word "one" or "an" placed before an element does not exclude the existence of multiple such elements. The present invention can be implemented with the aid of hardware including several different elements and with the aid of appropriately programmed computers. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.
[0082] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0083] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0084] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0085] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0086] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0087] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. An iToF depth data acquisition method, characterized in that: include: Obtaining a first phase difference, a second phase difference, a third phase difference, and a fourth phase difference corresponding to each pixel in the target depth frame; Obtaining a grayscale image corresponding to the target depth frame according to the first phase difference, the second phase difference, the third phase difference, and the fourth phase difference; According to the brightness of the grayscale image, obtaining a plurality of target pixel coordinates; Obtaining final depth data according to the plurality of target pixel coordinates and the first phase difference, the second phase difference, the third phase difference, and the fourth phase difference corresponding to each target pixel coordinate; The step of obtaining the grayscale image corresponding to the target depth frame according to the first phase difference, the second phase difference, the third phase difference and the fourth phase difference comprises: obtaining the confidence of each pixel according to the first phase difference, the second phase difference, the third phase difference and the fourth phase difference; converting the confidence of each pixel into a grayscale value to obtain the grayscale image; wherein the greater the confidence, the greater the grayscale value; The step of obtaining a plurality of target pixel coordinates according to the brightness of the grayscale image comprises: obtaining the region contours of a plurality of bright regions according to the brightness of the grayscale image; and obtaining the target pixel coordinates of each bright region according to the region contours of each bright region; The obtaining of target pixel coordinates of the bright areas according to the area contours of the bright areas comprises: obtaining a circumscribed rectangle of each area contour according to the area contours of the bright areas; and obtaining the target pixel coordinates according to the maximum grayscale value within each circumscribed rectangle.
2. The method according to claim 1, characterized in that The step of obtaining the area contours of a plurality of bright areas according to the brightness of the grayscale image comprises: The contours of the bright areas are extracted from the grayscale image according to a preset contour extraction function to obtain the area contours of the respective bright areas.
3. The method according to claim 2, characterized in that The contour extraction function is a canny function.
4. The method according to claim 1, characterized in that: The step of obtaining the target pixel coordinates according to the maximum grayscale value within the circumscribed rectangle includes: Obtain all grayscale values within the bounding rectangle; Numerically sorting all the grayscale values to obtain the maximum grayscale value; The target pixel coordinates are obtained according to the maximum grayscale value.
5. An iToF depth data acquisition device, characterized in that: include: An acquisition module, used to acquire a first phase difference, a second phase difference, a third phase difference and a fourth phase difference corresponding to each pixel in a target depth frame; A first processing module, configured to obtain a grayscale image corresponding to the target depth frame according to the first phase difference, the second phase difference, the third phase difference, and the fourth phase difference; A filtering module, used for obtaining a plurality of target pixel coordinates according to the brightness of the grayscale image; A second processing module, configured to obtain final depth data according to the plurality of target pixel coordinates and the first phase difference, the second phase difference, the third phase difference and the fourth phase difference corresponding to each target pixel coordinate; The step of obtaining the grayscale image corresponding to the target depth frame according to the first phase difference, the second phase difference, the third phase difference and the fourth phase difference comprises: obtaining the confidence of each pixel according to the first phase difference, the second phase difference, the third phase difference and the fourth phase difference; converting the confidence of each pixel into a grayscale value to obtain the grayscale image; wherein the greater the confidence, the greater the grayscale value; The step of obtaining a plurality of target pixel coordinates according to the brightness of the grayscale image comprises: obtaining the region contours of a plurality of bright regions according to the brightness of the grayscale image; and obtaining the target pixel coordinates of each bright region according to the region contours of each bright region; The obtaining of target pixel coordinates of the bright areas according to the area contours of the bright areas comprises: obtaining a circumscribed rectangle of each area contour according to the area contours of the bright areas; and obtaining the target pixel coordinates according to the maximum grayscale value within each circumscribed rectangle.
6. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory is coupled to the processor and stores instructions, and when the instructions are executed by the processor, the electronic device executes the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Image processing method and apparatus, electronic apparatus and computer readable storage medium
CN107742300A
Image sensor and image processing system having pixel structure
CN111010516A
Dual-mode full-field optical coherence tomography method
CN111855613A
Event type ToF camera encoding and decoding method and device, medium and equipment
CN112037295A
Method and apparatus for generating depth image
US20150334372A1
