Image evaluation method, device, electronic device, and computer-readable storage medium
By segmenting the depth map and color map generated by the RGB-D camera, the correct fill rate and overfill rate are calculated, the problem of poor quality at the edge position of the depth map is solved, and the accuracy and accuracy of three-dimensional modeling are improved.
Patent Information
- Application Number
- CN202210647273.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-08
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2042-06-08
AI Technical Summary
The depth value of the edge position of the target object in the depth map generated by the existing RGB-D cameras is very different from the background depth value, resulting in low quality of the depth map, affecting the accuracy and accuracy of subsequent three-dimensional modeling.
By segmenting the depth map and the color map, the correct fill rate and overfill rate are determined respectively, and the edge quality of the depth map is evaluated based on these two indicators, providing scientific and accurate evaluation methods.
Improve the accuracy of depth recovery and three-dimensional modeling, reduce errors in model reconstruction, and improve the accuracy of quality evaluation of edge positions of the depth map.
Smart Images

Figure CN115170477B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of image processing technology, and in particular to an image evaluation method, device, electronic device, and computer-readable storage medium. Background Art
[0002] With the rapid development of machine vision technology, color information alone can no longer meet the accuracy and speed requirements of image processing and target recognition technologies. Various application scenarios have an increasingly high demand for scene depth information. To this end, RGB-D cameras that can simultaneously obtain color and depth information within the target scene have emerged. RGB-D cameras are equipped with a color lens to obtain color information of the target scene through the color lens. RGB-D cameras can obtain depth information of the target scene based on monocular structured light technology, binocular vision technology, and time of flight (TOF) technology.
[0003] RGB-D cameras can generate a depth map of the target scene based on the acquired depth information. Subsequent applications, such as 3D reconstruction of face models, can restore real objects based on the depth map generated by the RGB-D camera. The restoration effect is largely affected by the quality of the depth map. However, there are target objects in the target scene. The depth values at the edge positions of the target objects in the depth map generated by the RGB-D camera differ greatly from the depth values of the background. The quality of these edge positions is low, which leads to errors in subsequent model reconstruction applications. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide an image evaluation method, device, electronic device and computer-readable storage medium, which can scientifically and accurately evaluate the quality of depth information at the edge position of the target object in the depth map, thereby improving the accuracy of subsequent depth recovery, three-dimensional modeling and other applications.
[0005] To solve the above technical problems, an embodiment of the present application provides an image evaluation method, including: segmenting the acquired depth map and color map of the target scene respectively to obtain a first target area map in the color map and a second target area map in the depth map; determining the correct filling rate based on the first pixel point in the first target area map and the pixel point corresponding to the first pixel point in the second target area map; determining the overfilling rate based on the second pixel point in the second target area map and the pixel point corresponding to the second pixel point in the first target area map; and determining the edge quality score of the depth map based on the correct filling rate and the overfilling rate.
[0006] An embodiment of the present application also provides an image evaluation device, including: a segmentation module, used to segment the acquired depth map and color map of the target scene respectively, to obtain a first target area map in the color map and a second target area map in the depth map; a first calculation module, used to determine the correct filling rate based on the first pixel point in the first target area map and the pixel point corresponding to the first pixel point in the second target area map; a second calculation module, used to determine the overfilling rate based on the second pixel point in the second target area map and the pixel point corresponding to the second pixel point in the first target area map; a scoring module, used to determine the edge quality score of the depth map based on the correct filling rate and the overfilling rate.
[0007] An embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above-mentioned image evaluation method.
[0008] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, which implements the above-mentioned image evaluation method when executed by a processor.
[0009] The image evaluation method, device, electronic device, and computer-readable storage medium provided in the embodiments of the present application are as follows: a server segments the acquired depth map and color map of the target scene, respectively, to obtain a first target area map in the color map and a second target area map in the depth map; and then determines the correct filling rate based on the first pixel in the first target area map and the pixel corresponding to the first pixel in the second target area map, and determines the overfill rate based on the second pixel in the second target area map and the pixel corresponding to the second pixel in the first target area map; and finally, determines the edge quality score of the depth map based on the determined correct filling rate and overfill rate. Considering that the quality of the depth information at the edge position of the target object in the depth map obtained by depth imaging of the depth camera is poor, the quality of the model obtained by three-dimensional modeling based on such a depth map is very poor, and serious errors are likely to occur, affecting the subsequent application. The embodiments of the present application measure whether the edge position in the depth map is complete by calculating the two indicators of the correct filling rate and the overfill rate of the depth map, thereby scientifically and accurately evaluating the quality of the depth information at the edge position of the target object in the depth map based on these two indicators, thereby improving the accuracy of subsequent depth recovery, three-dimensional modeling, and other applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] One or more embodiments are exemplarily described by the figures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments.
[0011] Figure 1 is a flowchart of an image evaluation method according to one embodiment of the present application;
[0012] Figure 2 is a flowchart of an image evaluation method according to one embodiment of the present application;
[0013] Figure 3 is a flowchart of an image evaluation method according to one embodiment of the present application;
[0014] Figure 4 is a flowchart of an image evaluation method according to one embodiment of the present application;
[0015] Figure 5 is a structural diagram of an image evaluation device according to an embodiment of the present application;
[0016] Figure 6 It is a structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, each embodiment of the present application will be described in detail below with reference to the accompanying drawings. However, it will be understood by those skilled in the art that in each embodiment of the present application, many technical details are proposed to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in the present application can be implemented. The division of the following embodiments is for convenience of description and should not constitute any limitation on the specific implementation of the present application. The various embodiments can be combined and referenced with each other under the premise of no contradiction.
[0018] The embodiment of the present application relates to an image evaluation method, which is applied to any terminal, device or server capable of image processing, such as Figure 1 As shown, the specific steps include the following steps.
[0019] Step 101 : segmenting the acquired depth map and color map of the target scene respectively to obtain a first target region map in the color map and a second target region map in the depth map.
[0020] In an example implementation, the acquired depth map and color map of the target scene are generated by photographing the target scene with an RGB-D camera. After the server obtains the depth map and color map of the target scene, it performs image segmentation on the depth map and color map of the target scene, respectively, and segments the preset target area in the target scene from the depth map and color map of the target scene, respectively, to obtain a first target area map in the color map and a second target area map in the depth map.
[0021] In an example implementation, image segmentation of a depth map and a color map of a target scene includes two steps: target area detection and target area segmentation. The purpose of target area detection is to mark the target area on the depth map and the color map using a box of a certain shape. For example, when the target area is a face, a face frame will be marked on the depth map and the color map after the target area detection. The function of the face frame is to mark the location of the face. The purpose of target area segmentation is to segment the area frame marked on the depth map and the color map from the depth map and the color map according to the detection results of the target area detection, forming a first target area map in the color map and a second target area map in the depth map. For example, when the target area is a face, the target area segmentation is to segment the target area from the depth map and the color map according to the position marked by the face frame, forming a first target area map in the color map and a second target area map in the depth map. The present application does not limit the detection method used in target area detection and the segmentation method used in target area segmentation. Any method that can perform area detection and image segmentation can be applied.
[0022] In one example implementation, before performing image segmentation on the depth map and the color map of the target scene, it is also possible to detect whether the depth map and the color map are aligned. If the depth map and the color map are not aligned, it is necessary to align the depth map and the color map according to the internal and external parameters of the RGB-D camera to avoid large errors in the correct fill rate and overfill rate calculated in subsequent steps due to the misalignment of the depth map and the color map.
[0023] Step 102 : determining a correct fill rate according to a first pixel point in the first target area map and a pixel point corresponding to the first pixel point in the second target area map.
[0024] In an example implementation, the total number of first pixel points in the first target area map is first obtained; then, the first pixel points in the first target area map are traversed, and the pixel points corresponding to the first pixel points in the first target area map are determined in the second target area map, thereby obtaining the total number of first pixel points that have corresponding pixel points in the second target area map; and then, the correct fill rate is determined based on the total number of first pixel points in the first target area map and the total number of first pixel points that have corresponding pixel points in the second target area map.
[0025] Step 103 : determining an overfill rate according to the second pixel point in the second target area map and the pixel point corresponding to the second pixel point in the first target area map.
[0026] In an example implementation, the total number of second pixel points in the second target area map is first obtained; then, the first pixel points in the second target area map are traversed, and the pixel points corresponding to the second pixel points in the second target area map are determined in the first target area map, thereby obtaining the total number of second pixel points for which there are no corresponding pixel points in the first target area map; and then, the overfill rate is determined based on the total number of second pixel points in the second target area map and the total number of second pixel points for which there are no corresponding pixel points in the first target area map.
[0027] Step 104 : Determine an edge quality score of the depth map based on the correct filling rate and the overfilling rate.
[0028] In an example implementation, after the correct fill rate and the overfill rate are determined, the edge quality score of the depth map can be determined based on whether the correct fill rate and the overfill rate meet the preset edge quality score conditions (edge quality score conditions such as: the correct fill rate is greater than A and the overfill rate is less than B); or the edge quality score of the depth map can be calculated based on the determined correct fill rate and overfill rate based on the preset edge quality score formula (edge quality score formula such as: edge quality score = A*correct fill rate + B*overfill rate), where the preset edge quality score conditions and the preset edge quality score formula can be customized by the user according to actual conditions.
[0029] In an example implementation, after the correct fill rate and the overfill rate are determined, the correct fill rate and the overfill rate can also be displayed to the user on a preset display interface, and the user can make independent judgments on the edge quality score of the depth map based on the displayed correct fill rate and the overfill rate.
[0030] In this embodiment, the server segments the acquired depth map and color map of the target scene respectively to obtain a first target area map in the color map and a second target area map in the depth map. Then, the server determines the correct filling rate based on the first pixel point in the first target area map and the pixel point corresponding to the first pixel point in the second target area map, and determines the overfill rate based on the second pixel point in the second target area map and the pixel point corresponding to the second pixel point in the first target area map. Finally, the edge quality score of the depth map is determined based on the determined correct filling rate and overfill rate. Considering that the quality of the depth information of the edge position of the target object in the depth map obtained by depth imaging of the depth camera is poor, the quality of the model obtained by three-dimensional modeling based on such a depth map is very poor, and serious errors are likely to occur, which affects the subsequent application. The embodiment of the present application measures whether the edge position in the depth map is complete by calculating the two indicators of the correct filling rate and the overfill rate of the depth map, so as to scientifically and accurately evaluate the quality of the depth information of the edge position of the target object in the depth map based on these two indicators, thereby improving the accuracy of subsequent depth recovery, three-dimensional modeling and other applications.
[0031] The embodiment of the present application relates to a method for evaluating image edge integrity, which is applied to any terminal, device or server capable of image processing, such as Figure 2 As shown, the specific steps include the following steps.
[0032] Step 201 : segmenting the acquired depth map and color map of the target scene respectively to obtain a first target region map in the color map and a second target region map in the depth map.
[0033] In an example implementation, this step is substantially the same as step 101 mentioned in the embodiment of the present application, and is not described in detail here.
[0034] Step 202 : traverse each first pixel point in the first target area map to determine the number of target first pixel points that can find corresponding pixel points in the second target area map.
[0035] In an exemplary implementation, for each first pixel in the first target area map, it is determined whether there is a pixel corresponding to the first pixel in the second target area map, and the first pixel with a corresponding pixel in the second target area map is recorded as the target first pixel (i.e., the first pixel in the target area map in the color map and the second target area map in the depth map is identified as the first pixel in the target area). After the corresponding pixel is determined for each first pixel in the first target area map, the number C of first pixels marked as target first pixels in the first target area map is obtained. d , where the number of target first pixels C dFormula C can be used d =Σ p∈Ω c B d p , where p∈Ω d When B d p is 1, in other cases, B d p is 0,Ω c is the first target area map, Ω d This is the second target area map.
[0036] Step 203 : determining a correct fill rate according to the number of target first pixels and the total number of first pixels.
[0037] In an exemplary implementation, the total number C of first pixel points in the first target area is obtained. all , and based on the preset correct fill rate formula (correct fill rate formula such as: R right =(C d / C all )*100%), according to the total number of the first pixel points C all and the number of the first pixel of the target C d Determine the correct fill rate.
[0038] Step 204 : traverse each second pixel point in the second target area map to determine the number of target second pixel points that cannot find corresponding pixel points in the first target area map.
[0039] In an exemplary implementation, for each second pixel in the second target area map, it is determined whether there is a pixel corresponding to the second pixel in the first target area map, and the second pixel that does not have a corresponding pixel in the first target area map is recorded as a target second pixel (i.e., the second pixel that is identified as the target area in the second target area map in the depth map and is not identified as the target area in the first target area map in the color map is the target first pixel). After the corresponding pixel is determined for each second pixel in the second target area map, the number D of second pixels marked as target second pixels in the second target area map is obtained. c , where the number of target second pixel points D c Formula D can be used c =Σ p∈Ωd B d p , where p∈Ω c When B d p is 0, in other cases, B d p =1,Ω cis the first target area map, Ω d This is the second target area map.
[0040] Step 205 : determining an overfill rate according to the number of target second pixels and the total number of second pixels.
[0041] In an exemplary implementation, the total number D of the second pixel points in the second target area is obtained. all , and based on the preset overfill rate formula (overfill rate formula such as: R overfill =(D c / D all )*100%), according to the total number of the second pixel points D all and the number of target second pixels D c Determine the correct fill rate.
[0042] Step 206 : Determine an edge quality score of the depth map based on the correct fill rate and the overfill rate.
[0043] In an example implementation, this step is substantially the same as step 104 mentioned in the embodiment of the present application, and is not described in detail here.
[0044] In this embodiment, based on other embodiments, the correct filling rate and the overfilling rate can be determined according to the correspondence between each first pixel point in the first target area map and each second pixel point in the second target area map, so as to more accurately evaluate the edge quality of the depth map.
[0045] The embodiment of the present application relates to a method for evaluating image edge integrity, which is applied to any terminal, device or server capable of image processing, such as Figure 3 As shown, the specific steps include the following steps.
[0046] Step 301 : performing target detection on the acquired RGB color image of the target scene based on a preset edge detection operator to obtain a first reference area image.
[0047] In one example implementation, the purpose of target detection is to mark the target area on the RGB color image using a box of a certain shape. The area marked with the box is called the first reference area map. For example, when the target area is a face, after the RGB color image undergoes target detection, a face frame will be marked on the RGB color image. The area where the face frame is located is the first reference area map.
[0048] In one example implementation, there are currently many methods for detecting targets in RGB color images based on edge detection operators. Since the accuracy of image edge extraction directly affects the size of two indicators, achieving pixel-level accuracy in image edge extraction is generally challenging. Alternatively, the target detection used here can be based on the Canny operator. However, when performing Canny operator detection, the detected image edges may be incomplete, and redundant edge features cannot be better eliminated. Therefore, after obtaining the first reference area map, the saturation of the RGB color map needs to be added for regional judgment. At the same time, since the processed image will be binarized when the Canny operator is used to process the image, the obtained first reference area map is actually a binary grayscale image.
[0049] Step 302 : Perform color space conversion on the RGB color map to obtain an HSV color map, and map the first reference area map onto the HSV color map to obtain a second reference area map.
[0050] In one example implementation, based on the characteristic that the saturation of the target object is consistent but different from that of the background, the RGB color map is converted into the HSV color space to generate an HSV color map. The generated HSV color map is aligned with the RGB color map. Therefore, the first reference area map can be mapped onto the HSV color map to obtain the second reference area map.
[0051] Step 303: Expand in all directions toward the first central area selected from the second reference area map with the first central area selected as the center, and mark the pixels expanded in all directions as non-zero pixels or zero pixels according to a preset marking method.
[0052] Obtaining a first average saturation of the first central area, and marking each pixel point in the first central area as the 0 pixel point;
[0053] Sequentially taking each pixel point in the second reference area image except the first central area as a first pixel point to be compared, and calculating a first difference between the saturation of each first pixel point to be compared and the first average saturation;
[0054] The first pixel point to be compared whose absolute value of the first difference is less than the preset saturation difference threshold is marked as the 0 pixel point, and the first pixel point to be compared whose absolute value of the first difference is greater than or equal to the saturation difference threshold is marked as the non-0 pixel point.
[0055] In an example implementation, when selecting the first central area, the area where the center point of the second reference area map is located (such as 5×5 pixels around the center point) can be used as the first central area, or the area where the center point of the target object is located (such as 5×5 pixels around the center point) can be used as the first central area; after the first central area is selected, the first central area is used as the center to expand in the direction of each pixel point (i.e., expand outward); wherein the direction of each pixel point can be the four directions of up, down, left, and right, or the 360 directions corresponding to each angle, which can be specified by the user.
[0056] In an exemplary implementation, before expanding in the direction of each pixel point, the first average saturation of the first central area is calculated based on the pixel value of each pixel point in the second reference area map, and each pixel point in the first central area is marked as a 0 pixel point, wherein the first average saturation is a non-zero saturation value, denoted as S 平 In the process of expanding toward each pixel point, each pixel point except the first central area in the second reference area map is used as the first pixel point to be compared, and the saturation S of each first pixel point to be compared is calculated respectively. 待 With the first average saturation S 平 The absolute value of the first difference is less than the preset saturation difference threshold [ie: (S 待 -S 平 )∈(-X%, X%)] is marked as a 0 pixel, and the first pixel to be compared whose absolute value of the first difference is greater than or equal to the saturation difference threshold and is connected to the 0 pixel is marked as a non-0 pixel; wherein X is a natural number specified by the user.
[0057] In an example implementation, in the process of expanding in the direction of each pixel point, the first number of non-zero pixel points in the current direction of the expansion process is determined in real time; when the first number is greater than a preset first threshold, the second number of non-zero pixel points that meet the pixel condition is determined; wherein the pixel condition is whether the pixel value of the non-zero pixel point on the first reference area map is a specified pixel value; when the ratio of the second number to the first number is greater than a preset second threshold, the second average saturation of each pixel point within a preset range centered on the specified pixel point in the current direction is obtained; when the second saturation does not meet the preset stop condition, the expansion in the current direction is stopped.
[0058] Step 304 : Determine the first target area map in the color map according to the marked pixel points in the second reference area map.
[0059] In an exemplary implementation, after marking of each pixel point on the second reference region map is completed, the region formed by the pixel points marked as 0 pixels or non-0 pixels on the second reference region map is the first target region.
[0060] In an example implementation, the second reference area map is divided into a first target area and a non-first target area based on the marking status of each pixel point on the second reference area map; after the second reference area map is divided into the first target area and the non-first target area, the second reference area map can be filtered. However, when filtering the second reference area map, the entire second reference area map cannot be directly filtered. The non-first target area in the second reference area map is first filtered to remove sharp points in the background so that the edge of the target object is smoother. Then, the first target area in the second reference area map is filtered to remove points in the area where the target object is located that have not been successfully expanded; wherein the filtering process can be a two-channel connected domain filtering method or other filtering processing methods.
[0061] Step 305 : Segment the acquired depth map of the target scene to obtain a second target region map in the depth map.
[0062] In an exemplary implementation, this step is substantially the same as the method for determining the second target area map mentioned in step 101 in the embodiment of the present application, and thus will not be described in detail here.
[0063] Step 306 : Determine a correct fill rate based on the first pixel point in the first target area map and the pixel point corresponding to the first pixel point in the second target area map.
[0064] In an example implementation, this step is substantially the same as step 102 mentioned in the embodiment of the present application, and is not described in detail here.
[0065] Step 307 determines an overfill rate according to the second pixel point in the second target area map and the pixel point corresponding to the second pixel point in the first target area map.
[0066] In an example implementation, this step is substantially the same as step 103 mentioned in the embodiment of the present application, and is not described in detail here.
[0067] Step 308 : Determine an edge quality score of the depth map based on the correct fill rate and the overfill rate.
[0068] In an example implementation, this step is substantially the same as step 104 mentioned in the embodiment of the present application, and is not described in detail here.
[0069] In this embodiment, on the basis of other embodiments, target detection can be performed on the RGB color image to obtain a first reference area map, and the area where the target object is located can be segmented again based on the saturation corresponding to each pixel point, so that a more accurate first target area map can be segmented from the RGB color image.
[0070] The embodiment of the present application relates to a method for evaluating image edge integrity, which is applied to any terminal, device or server capable of image processing, such as Figure 4 As shown, the specific steps include the following steps.
[0071] Step 401 : segment the acquired color image of the target scene to obtain a first target region image in the color image.
[0072] In an exemplary implementation, this step is substantially the same as the method for determining the first target area map mentioned in step 101 of the embodiment of the present application, and thus will not be described in detail here.
[0073] Step 402: Perform target detection on the depth map to obtain a third reference area map.
[0074] In one example implementation, the purpose of target detection is to mark the area where the target object is located using a frame of a certain shape on the depth map. The area marked with the frame is called the third reference area map; for example, when the target object is a human face, after the depth map undergoes target detection, a face frame will be marked on the depth map, and the area where the face frame is located is the third reference area map.
[0075] Step 403: Select a second central area from the third reference area map, and obtain an average depth value of the second central area.
[0076] In an exemplary implementation, when selecting the second central area, the area where the center point of the third reference area map is located (such as 5×5 pixels around the center point) can be used as the second central area, or the area where the center point of the target object is located (such as 5×5 pixels around the center point) can be used as the second central area. After the second central area is selected, the average depth value of the second central area is calculated based on the pixel values of each depth pixel point in the third reference area map, where the average depth value is a non-zero depth value, recorded as D 平 .
[0077] Step 404 : sequentially use each pixel in the third reference region map as a second pixel to be compared, and respectively calculate a second difference between the depth value of each second pixel to be compared and the average depth value.
[0078] In an exemplary implementation, each pixel in the third reference region map is traversed, and each pixel in the third reference region map is used as a second pixel to be compared, and the saturation D of each second pixel to be compared is calculated respectively. i With the first average saturation D 平 The second difference between .
[0079] Step 405 : retain the second pixels to be compared whose second difference is less than the preset depth value difference threshold, and determine the second target area map according to the retained second pixels to be compared.
[0080] In an exemplary implementation, the absolute value of the second difference is less than a preset depth value difference threshold [ie: (D 待 -D 平 )∈(-X%, X%)] are retained, and the retained second pixel points to be compared constitute a second target area map, wherein X is a natural number specified by the user.
[0081] In an example implementation, the second pixel points to be compared, whose absolute value of the second difference is greater than or equal to the depth value difference threshold, can constitute a non-second target area on the third reference area map; after the third reference area map is divided into the second target area and the non-second target area, the third reference area map can be filtered, and when filtering the third reference area map, the entire third reference area map cannot be directly filtered. The non-second target area map in the third reference area map is first filtered to remove noise points in the background, so that the edge of the target object is rounder, and then the second target area map in the third reference area map is filtered to remove noise points in the area where the target object is located; wherein the filtering process can be a two-channel connected domain filtering method or other filtering processing methods.
[0082] Step 406 : Determine a correct fill rate based on the first pixel point in the first target area map and the pixel point corresponding to the first pixel point in the second target area map.
[0083] In an example implementation, this step is substantially the same as step 102 mentioned in the embodiment of the present application, and is not described in detail here.
[0084] Step 407 determines an overfill rate according to the second pixel point in the second target area map and the pixel point corresponding to the second pixel point in the first target area map.
[0085] In an example implementation, this step is substantially the same as step 103 mentioned in the embodiment of the present application, and is not described in detail here.
[0086] Step 408 : Determine an edge quality score of the depth map based on the correct fill rate and the overfill rate.
[0087] In an example implementation, this step is substantially the same as step 104 mentioned in the embodiment of the present application, and is not described in detail here.
[0088] In this embodiment, on the basis of other embodiments, target detection can also be performed on the depth map. On the basis of obtaining the third reference area map, the area where the target object is located is segmented again in combination with the depth values corresponding to each pixel point, so that a more accurate second target area map can be segmented from the depth map.
[0089] The steps of the various methods above are divided only for the purpose of clear description. During implementation, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0090] The embodiment of the present application relates to an image evaluation device, which is characterized by the following specific description of the image edge integrity evaluation device of this embodiment. The following content is only provided for the convenience of understanding and is not required for the implementation of this embodiment. Figure 5 5 is a schematic diagram of the image evaluation device of this embodiment, which includes: a segmentation module 501 , a first calculation module 502 , a second calculation module 503 and a scoring module 504 .
[0091] The segmentation module 501 is configured to segment the acquired depth map and color map of the target scene respectively to obtain a first target region map in the color map and a second target region map in the depth map.
[0092] The first calculation module 502 is configured to determine a correct fill rate according to a first pixel point in the first target area map and a pixel point corresponding to the first pixel point in the second target area map.
[0093] The second calculation module 503 is configured to determine an overfill rate according to a second pixel point in the second target area map and a pixel point corresponding to the second pixel point in the first target area map.
[0094] The scoring module 504 is configured to determine an edge quality score of the depth map according to the correct fill rate and the overfill rate.
[0095] It is not difficult to find that this embodiment is a system embodiment corresponding to the above-mentioned method embodiment, and this embodiment can be implemented in conjunction with the above-mentioned method embodiment. The relevant technical details and technical effects mentioned in the above-mentioned embodiment are still valid in this embodiment, and to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the above-mentioned embodiment.
[0096] The present application embodiment relates to an electronic device, such as Figure 6 As shown, it includes: at least one processor 601; and a memory 602 that is communicatively connected to the at least one processor 601; wherein the memory 602 stores instructions that can be executed by the at least one processor 601, and the instructions are executed by the at least one processor 601 to enable the at least one processor 601 to execute the image evaluation method in the above-mentioned embodiments.
[0097] The memory and processor are connected using a bus, which can include any number of interconnected buses and bridges. The bus connects various circuits of one or more processors and memories. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits. These are all well known in the art and are therefore not described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single component or multiple components, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over a wireless medium via an antenna. Furthermore, the antenna receives data and transmits it to the processor.
[0098] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0099] The embodiments of the present application relate to a computer-readable storage medium storing a computer program, which implements the above-mentioned method embodiments when executed by a processor.
[0100] That is, those skilled in the art will understand that all or part of the steps in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a program, which is stored in a storage medium and includes a number of instructions for causing a device (which may be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., various media that can store program code.
[0101] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and that in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
Claims
1. An image evaluation method, characterized in that: include: Segmenting the acquired depth map and color map of the target scene respectively to obtain a first target region map in the color map and a second target region map in the depth map; Determining a correct fill rate based on first pixels in the first target area map and corresponding pixels in the second target area map, wherein determining the correct fill rate includes: traversing each first pixel, determining the number of target first pixels that can find corresponding pixels in the second target area map, and determining the correct fill rate based on the number of target first pixels and the total number of first pixels; Determining an overfill rate based on second pixels in the second target area map and corresponding pixels of the second pixels in the first target area map, wherein determining the overfill rate comprises: traversing each second pixel, determining a number of target second pixels for which corresponding pixels cannot be found in the first target area map, and determining the overfill rate based on the number of target second pixels and a total number of second pixels; An edge quality score of the depth map is determined based on the correct filling rate and the overfilling rate.
2. The image evaluation method according to claim 1, wherein: The color map is an RGB color map, and the first target area map in the color map is obtained by the following steps: Performing target detection on the RGB color image based on a preset edge detection operator to obtain a first reference area image; Performing color space conversion on the RGB color map to obtain an HSV color map, and mapping the first reference area map onto the HSV color map to obtain a second reference area map; Taking the first central area selected from the second reference area map as the center, expanding in all directions toward the first central area; Mark the pixels expanded from all directions as non-zero pixels or zero pixels according to a preset marking method; The first target area map is determined according to the marked pixel points on the second reference area map.
3. The image evaluation method according to claim 2, wherein: The method of marking the pixels expanded from all directions as non-zero pixels or zero pixels according to a preset marking method includes: Obtaining a first average saturation of the first central area, and marking each pixel point in the first central area as the 0 pixel point; Sequentially taking each pixel point in the second reference area image except the first central area as a first pixel point to be compared, and calculating a first difference between the saturation of each first pixel point to be compared and the first average saturation; The first pixel point to be compared whose absolute value of the first difference is less than the preset saturation difference threshold is marked as the 0 pixel point, and the first pixel point to be compared whose absolute value of the first difference is greater than or equal to the saturation difference threshold and is connected to the 0 pixel point is marked as the non-0 pixel point.
4. The image evaluation method according to claim 3, wherein: After marking the pixels expanded from each direction as non-zero pixels or zero pixels according to a preset marking method, and before determining the first target area map based on the marked pixels on the second reference area map, the method further includes: Traversing each direction, and determining in real time the first number of non-zero pixel points in the current direction during the expansion process; If the first number is greater than a preset first threshold, determining a second number of the non-zero pixel points that meet a pixel condition; wherein the pixel condition is whether the pixel value of the non-zero pixel point on the first reference area map is a specified pixel value; When the ratio of the second number to the first number is greater than a preset second threshold, obtaining a second average saturation of each pixel point within a preset range centered on the designated pixel point in the current direction; When the second average saturation does not meet a preset stop condition, the expansion in the current direction is stopped.
5. The image evaluation method according to claim 1, wherein: The second target area map in the depth map is obtained by the following steps: Performing target detection on the depth map to obtain a third reference area map; Selecting a second central area from the third reference area map, and obtaining an average depth value of the second central area; sequentially taking each pixel point in the third reference area map as a second pixel point to be compared, and respectively calculating a second difference between a depth value of each second pixel point to be compared and the average depth value; The second pixel points to be compared whose second difference value is less than the preset depth value difference threshold are retained, and a second target area map is determined according to the retained second pixel points to be compared.
6. An image evaluation device, characterized in that: The device comprises: a segmentation module, configured to segment the acquired depth map and color map of the target scene respectively, to obtain a first target region map in the color map and a second target region map in the depth map; a first calculation module, configured to determine a correct fill rate based on first pixels in the first target area map and corresponding pixels in the second target area map, wherein determining the correct fill rate comprises: traversing each first pixel, determining the number of target first pixels that can find corresponding pixels in the second target area map, and determining the correct fill rate based on the number of target first pixels and the total number of first pixels; a second calculation module, configured to determine an overfill rate based on second pixels in the second target area map and corresponding pixels of the second pixels in the first target area map, wherein determining the overfill rate comprises: traversing each second pixel, determining a number of target second pixels for which corresponding pixels cannot be found in the first target area map, and determining the overfill rate based on the number of target second pixels and a total number of second pixels; A scoring module is configured to determine an edge quality score of the depth map according to the correct fill rate and the overfill rate.
7. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the image evaluation method according to any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the image evaluation method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Method and device for generating video sequence of virtual viewpoints
CN102724529A
Image background estimation method based on depth map segmentation
CN113436220A