An image processing method and related apparatus
By performing pixel mapping and hole filling on depth images, the problem of missing depth information in depth images is solved, thus improving the efficiency of face recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AIBEE (BEIJING) TECH CO LTD
- Filing Date
- 2022-12-08
- Publication Date
- 2026-05-26
AI Technical Summary
Due to limitations in depth map acquisition technology, the original depth images suffer from missing depth information, resulting in low efficiency in face recognition.
By acquiring the undetermined pixel image of the object to be identified, the hole region is determined, and a suitable target filling kernel is selected according to the attribute characteristics of the hole region to fill the hole and repair the hole region, thus obtaining the target pixel image.
It improves image quality and enhances the efficiency of facial recognition.
Smart Images

Figure CN115690890B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to an image processing method and related apparatus. Background Technology
[0002] With the rapid development of social technology, facial recognition technology has become a widely used intelligent biometric technology, which is applied in many fields such as security checks, transportation, and facial payment.
[0003] Facial recognition is a biometric technology that identifies individuals based on facial features. It involves collecting image or video data containing faces, processing it using appropriate algorithms, and then identifying the detected faces. Currently, facial recognition primarily includes two methods: those based on two-dimensional images such as color maps and those based on three-dimensional images such as depth maps. Because depth maps offer more stable imaging and contain spatial stereoscopic information about the face, depth map-based facial recognition methods generally have better recognition performance.
[0004] However, due to limitations in depth map acquisition technology, the acquired raw depth images suffer from missing depth information, resulting in low efficiency in face recognition using raw depth images. Summary of the Invention
[0005] To address the aforementioned technical problems, this application provides an image processing method and related apparatus that can improve recognition efficiency.
[0006] The embodiments of this application disclose the following technical solutions:
[0007] On one hand, embodiments of this application provide an image processing method, characterized in that the method includes:
[0008] Obtain the undetermined pixel image corresponding to the object to be identified; the undetermined pixel image is obtained by mapping the original depth image corresponding to the object to be identified in pixel space;
[0009] Identify the hole regions in the image of pixels to be determined;
[0010] Based on the attribute characteristics of the cavity region, determine the target filling core corresponding to the cavity region;
[0011] The target filling kernel is used to fill the holes in the void area to obtain the target pixel image.
[0012] On the other hand, embodiments of this application provide an image processing apparatus, characterized in that the apparatus includes an acquisition unit, a determination unit, and a processing unit:
[0013] The acquisition unit is used to acquire a pixel image to be determined corresponding to the object to be identified; the pixel image to be determined is obtained by mapping the original depth image corresponding to the object to be identified in pixel space;
[0014] The determining unit is used to determine the hole region in the pixel image to be determined;
[0015] The determining unit is further configured to determine the target filling core corresponding to the cavity region based on the attribute characteristics of the cavity region;
[0016] The processing unit is used to fill the holes in the void region using the target filling kernel to obtain a target pixel image.
[0017] In another aspect, embodiments of this application provide a computer-readable storage medium for storing a computer program for performing the image processing method described above.
[0018] As can be seen from the above technical solution, when recognizing the object to be identified, the corresponding undetermined pixel image can be obtained first. This undetermined pixel image is obtained by mapping the original depth image into pixel space, which is the original pixel image. Then, the hole regions in the undetermined pixel image are identified, and based on the attribute characteristics of the hole regions, the corresponding target filling kernel is determined. Finally, the target filling kernel can be used to fill the hole regions, obtaining the target pixel image. Since the attribute characteristics of the hole regions reflect their features, the target filling kernel determined based on this is the most suitable for the hole regions, enabling the hole regions in the undetermined pixel image to be effectively repaired after the hole filling process. Therefore, the target pixel image has improved image quality compared to the original undetermined pixel image, and the target pixel image can be directly used to recognize the object to be identified, resulting in higher recognition efficiency. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating an image processing method provided in an embodiment of this application;
[0021] Figure 2 A schematic diagram of an image of undetermined pixels provided in an embodiment of this application;
[0022] Figure 3a A schematic diagram of a rhomboid core provided for an embodiment of this application;
[0023] Figure 3b A schematic diagram illustrating a single-core CPU as provided in an embodiment of this application;
[0024] Figure 3c A schematic diagram of a circular core provided for an embodiment of this application;
[0025] Figure 3d A schematic diagram of an upper triangular core provided for an embodiment of this application;
[0026] Figure 3e A schematic diagram of a lower triangular core provided in an embodiment of this application;
[0027] Figure 4 A flowchart of an image processing process provided in an embodiment of this application;
[0028] Figure 5 This is a structural diagram of an image processing apparatus provided in an embodiment of this application. Detailed Implementation
[0029] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0030] Because depth maps offer more stable imaging and contain spatial stereoscopic information about faces, depth map-based face recognition methods achieve better recognition results. However, due to limitations in depth map acquisition technology, the raw depth images often lack depth information, leading to lower efficiency in face recognition using these raw images. Therefore, in practical applications, the raw depth images need to be mapped in pixel space to obtain pixel images, which are then used for face recognition.
[0031] However, due to the lack of depth information in the original depth image, there are empty areas in the mapped pixel image, resulting in low efficiency of face recognition.
[0032] Therefore, this application provides an image processing method and related apparatus that can fill holes in a target pixel image to repair the hole area and obtain a higher quality target pixel image for face recognition, which is beneficial to improving recognition efficiency.
[0033] The image processing method provided in this application can be implemented using a computer device, which can be a terminal device or a server. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Terminal devices include, but are not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, and vehicle terminals. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, and this application does not impose any limitations in this regard.
[0034] The following examples illustrate this in detail:
[0035] Figure 1 A flowchart of an image processing method provided in this application embodiment, using a server as an example of the aforementioned computer device, is used for illustration. The method includes S101-S104:
[0036] S101: Obtain the undetermined pixel image corresponding to the object to be identified.
[0037] When performing face recognition on an object to be identified, a preliminary pixel image corresponding to the object can be obtained first. This preliminary pixel image is obtained by mapping the original depth image corresponding to the object in pixel space, which is the original pixel image. The original depth image can be acquired using a depth camera during face recognition of the object. The depth camera can be, for example, a structured light sensor or a time-of-flight sensor.
[0038] S102: Determine the hole region in the pixel image to be determined.
[0039] Because the original depth image may contain missing depth information, the mapped pixel image may contain hole regions. The presence of these hole regions results in poor quality of the undetermined pixel image, failing to accurately reflect the facial information of the object to be identified, and thus reducing the efficiency of face recognition. Therefore, to improve the efficiency of face recognition, hole regions in the undetermined pixel image can be identified first for subsequent hole-filling processing. For easier understanding of holes, an embodiment of this application provides a schematic diagram of an undetermined pixel image; please refer to [link to specific examples]. Figure 2 As shown, a partial cavity is presented as an example.
[0040] S103: Determine the target filling kernel corresponding to the cavity region based on the attribute characteristics of the cavity region.
[0041] S104: Use the target filling kernel to fill the holes in the void area to obtain the target pixel image.
[0042] After identifying the void region, a target filling core can be determined based on its attribute characteristics. These attribute characteristics reflect the features of the void region, and the target filling core determined based on these characteristics is the most suitable for the void. This target filling core can then be used to fill the void, thereby repairing it.
[0043] Furthermore, the target filling kernel can be used to fill the holes in the image to be identified, thus repairing the holes in the image. After the hole filling process is completed, the target pixel image is obtained. Based on this, hole filling can effectively repair the holes in the image to be identified. Therefore, the image quality of the target pixel image is improved compared to the original image to be identified, and the target pixel image can be directly used to identify the object to be recognized, resulting in higher recognition efficiency.
[0044] In practical applications, the attribute features of a hole region can be at least one of the shape features and area features of the hole region. Furthermore, the hole regions present in a pixel image to be determined typically include multiple hole regions, and the characteristics of different hole regions may differ. For ease of understanding, this application provides the following implementation methods as examples for different attribute features and the presence of multiple hole regions:
[0045] In one possible implementation, when the attribute features of the void region include the area features of the void region, and the void region comprises multiple void regions, the specific implementation of S102 may include: firstly, extracting the area features of the multiple void regions to determine their areas; then, determining the target filling kernels corresponding to the multiple void regions based on their area sizes. Based on this, a corresponding target filling kernel can be determined for each void region with a different area size. Correspondingly, the specific implementation of S103 may include: firstly, sorting the multiple void regions according to their areas from smallest to largest to obtain a void sequence; then, using the target filling kernel corresponding to each void region in the void sequence, sequentially performing void filling processing on the multiple void regions in the void sequence to obtain a target pixel image. Based on this, repair can start from the smallest void, and multiple void filling processes can be superimposed sequentially to complete the repair of multiple void regions, improving the repair effect for larger voids.
[0046] It should be noted that this application does not impose any restrictions on how to determine the corresponding target filling core based on the size of the void area.
[0047] For example, in one possible implementation, a preset area threshold can be set. In practice, multiple void regions with areas smaller than the preset area threshold can be designated as first void regions, and those with areas greater than or equal to the preset area threshold can be designated as second void regions. The preset area threshold serves as the basis for determining whether a void region is a small or large void. Based on this, multiple void regions can be categorized into first and second void regions; the first void region is considered a small void, and the second void region a large void. Furthermore, the target filling kernel corresponding to the first void region can be defined as a rhombus kernel, and the target filling kernel corresponding to the second void region can be defined as a single-core kernel. The rhombus kernel is more suitable for repairing smaller voids, while the single-core kernel is more suitable for repairing larger voids. Therefore, by determining matching target filling kernels for smaller and larger voids respectively, the repair effect can be improved.
[0048] In practical applications, considering that smaller holes are more susceptible to the influence of surrounding pixel values during repair, the hole-filling process using a diamond kernel for the first hole area can include two processes: diamond kernel expansion and erosion. Similarly, the hole-filling process using a single kernel for the second hole area can include only one process: single kernel expansion. Therefore, for smaller holes, an erosion operation is added to remove noise around the hole area, thereby reducing the impact of surrounding pixel values on smaller holes.
[0049] For ease of understanding, this application provides a schematic diagram of a rhomboid core, which can be found in the following embodiment. Figure 3a The diagram illustrates a 5x5 rhomboid core. Additionally, this application also provides a schematic diagram of a single-core architecture, which can be found in the attached diagram. Figure 3b The diagram illustrates a 5x5 all-single core. It should be noted that in practical applications, various filled cores are generally nxn structures; this example uses n=5, but the specific configuration can be adjusted according to actual needs, and this application does not impose any limitations.
[0050] In another possible implementation, when the attribute features of the void region include the shape features of the void region, and the void region comprises multiple void regions with different shapes, the specific implementation of S102 may include: firstly, extracting the shape features of the multiple void regions to determine the shapes corresponding to the multiple void regions. Further, a pre-constructed correspondence between void shapes and filling kernels can be obtained, and based on the shapes and correspondences of the multiple void regions, the target filling kernels corresponding to the multiple void regions are determined respectively.
[0051] The correspondence between cavity shapes and filling cores can be pre-defined, indicating the most suitable filling core for a specific cavity shape. For example, common cavity shapes include circles, triangles, rhombuses, and rectangles; correspondingly, the target filling cores can be circular, triangular, rhomboid, or uniform cores. Therefore, by determining the shapes corresponding to multiple cavity regions and based on the above correspondence, corresponding target filling cores can be determined for cavity regions of different shapes. Subsequently, the corresponding target filling cores can be directly used for cavity filling, which helps improve the repair effect.
[0052] For example, when multiple cavity regions are identified to have shapes including circles, triangles, rhombuses, and rectangles, the target fill kernel for a circular cavity region can be set to a circular kernel, the target fill kernel for a triangular cavity region to a triangular kernel, the target fill kernel for a rhombus cavity region to a rhombus kernel, and the target fill kernel for a rectangular cavity region to a rectangle. Based on this, the target fill kernel for each shape of cavity region is a shape-matched kernel. For triangles, they can be further divided into upper triangles and lower triangles; correspondingly, the triangle kernel can include upper triangle kernels and lower triangle kernels.
[0053] For ease of understanding, this application provides a schematic diagram of a circular core, which can be found in the following examples. Figure 3c As shown, a 5x5 circular core is illustrated. Additionally, this application also provides a schematic diagram of an upper triangular core, which can be found in the following examples. Figure 3d The diagram shows a 5x5 upper triangular core, and a schematic diagram of a lower triangular core is also provided. For details, please refer to [link / reference needed]. Figure 3e As shown, a 5*5 lower triangular kernel is illustrated. It should be noted that in practical applications, various filling kernels are generally n*n structures; this example uses n=5, but the specific configuration can be adjusted according to actual conditions, and this application does not impose any limitations.
[0054] In practical applications, the attribute features of void regions include not only their shape features but also their area features. In this case, we can first determine the corresponding target filling kernels for multiple void regions based on their shape features, and then fill the voids sequentially according to their area from smallest to largest, thereby improving the repair effect. In specific implementation, we can first sort the multiple void regions according to their area from smallest to largest to obtain a void sequence. Then, we can use the target filling kernel corresponding to each void region in the void sequence to sequentially fill the voids in the sequence, obtaining the target pixel image. The target filling kernel used here is determined based on the shape features of the void regions. Based on this, we can not only determine the target filling kernel with a matching shape based on shape features, but also sequentially fill multiple void regions according to their area from smallest to largest, thus improving the repair effect.
[0055] In the embodiments described above, for the image of pixels to be filled, it is necessary to first determine the hole regions in the image of pixels to be filled. It should be noted that this application does not limit the method for determining the hole regions in the image of pixels to be filled. For ease of understanding, the following determination method is provided as an example in the embodiments of this application:
[0056] In one possible implementation, the pixel values of the image to be determined can be inverted first to obtain an inverted pixel image. In practical applications, pixel value inversion can specifically involve subtracting the pixel value corresponding to each position (each pixel) in the image to be determined from the maximum value of 255 in the pixel space, thus obtaining the inverted pixel image. Based on this, it is beneficial to repair holes using hole-filling techniques such as dilation. Furthermore, the area to be filled in the inverted pixel image can be determined as the hole area based on the inverted pixel values corresponding to the inverted pixel image, so that subsequent hole-filling processing can be performed.
[0057] Understandably, in the specific implementation of pixel inversion processing, S104 may include: first, using the target filling kernel to fill the holes in the void areas, repairing the void areas to obtain a filled pixel image. Further, the filled pixel image is subjected to pixel value inversion processing to obtain the target pixel image. Specifically, the pixel value inversion processing of the filled pixel image involves subtracting the pixel value corresponding to each position in the filled pixel image from the maximum value of 255 in the pixel space, restoring the pixel value at each position to its actual state, ultimately obtaining the target pixel image.
[0058] To further improve the quality of the target pixel image and thus enhance the efficiency of face recognition, one possible implementation involves adding filtering to achieve noise reduction and smoothing, thereby improving image quality. In practice, the filled pixel image obtained after hole-filling can be filtered to achieve noise reduction and smoothing, resulting in a filtered pixel image with higher image quality compared to the filled pixel image. Furthermore, the target pixel image can be obtained by inverting the pixel values of the filtered pixel image, further improving its quality and thus enhancing the efficiency of face recognition.
[0059] In practical applications, filters can be used to perform the above filtering processing. This application does not impose any limitations on the choice of filter. For example, in specific implementations, a median filter can be used for median filtering to remove noise, and a Gaussian filter can be used for Gaussian filtering to smooth local surfaces. Therefore, a combination of a median filter and a Gaussian filter can achieve a good noise reduction and smoothing effect. Similarly, this application does not impose any limitations on the choice of median filter and Gaussian filter. For example, the median filter can be a 5x5 core median filter, and the Gaussian filter can also be a 5x5 core Gaussian filter.
[0060] Finally, face recognition can be performed using the target pixel image. For example, the target pixel image of the object to be recognized can be merged with the color image of the object to be recognized, and face recognition can be completed based on the merged result. Therefore, by performing a series of preprocessing steps on the original depth image, image quality can be improved, which is beneficial to improving the efficiency of subsequent face recognition.
[0061] As can be seen from the above technical solution, when recognizing the object to be identified, the corresponding undetermined pixel image can be obtained first. This undetermined pixel image is obtained by mapping the original depth image into pixel space, which is the original pixel image. Then, the hole regions in the undetermined pixel image are identified, and based on the attribute characteristics of the hole regions, the corresponding target filling kernel is determined. Finally, the target filling kernel can be used to fill the hole regions, obtaining the target pixel image. Since the attribute characteristics of the hole regions reflect their features, the target filling kernel determined based on this is the most suitable for the hole regions, enabling the hole regions in the undetermined pixel image to be effectively repaired after the hole filling process. Therefore, the target pixel image has improved image quality compared to the original undetermined pixel image, and the target pixel image can be directly used to recognize the object to be identified, resulting in higher recognition efficiency.
[0062] Figure 4This application provides an image processing flowchart. Specifically, in the face recognition process, for the original depth image corresponding to the object to be recognized, the original depth image can first undergo pixel mapping processing to obtain a pixel image to be determined. Then, the pixel value inversion processing of the pixel image to be determined is performed to obtain an inverted pixel image. Next, hole filling processing can be performed on the inverted pixel image to repair the hole areas, obtaining a filled pixel image. Then, median filtering and Gaussian filtering are performed on the filled pixel image to achieve noise reduction and smoothing, obtaining a filtered pixel image. Finally, pixel value inversion processing is performed on the filtered pixel image so that the pixel value at each position is restored to the actual pixel value, ultimately obtaining the target pixel image. The hole filling processing can include diamond kernel dilation, erosion operations, and all-one kernel dilation, etc., and the filtering processing can include median filtering and Gaussian filtering. Finally, the target pixel image can be used to perform face recognition on the object to be recognized.
[0063] It is understood that this basically corresponds to the method embodiment, so relevant details can be found in the description of the method embodiment.
[0064] Figure 5 This is a structural diagram of an image processing apparatus provided in an embodiment of this application. The apparatus includes an acquisition unit 501, a determination unit 502, and a processing unit 503.
[0065] The acquisition unit 501 is used to acquire a pixel image to be determined corresponding to the object to be identified; the pixel image to be determined is obtained by mapping the original depth image corresponding to the object to be identified in pixel space;
[0066] The determining unit 502 is used to determine the hole region in the pixel image to be determined;
[0067] The determining unit 502 is further configured to determine the target filling core corresponding to the cavity region based on the attribute characteristics of the cavity region;
[0068] The processing unit 503 is used to fill the holes in the hole region using the target filling kernel to obtain a target pixel image.
[0069] In one possible implementation, the attribute features of the void region include the area feature of the void region, the void region includes multiple void regions, and the determining unit is further configured to:
[0070] Area features are extracted from the multiple hollow regions to determine their areas;
[0071] Based on the area of the plurality of void regions, the target filling core corresponding to each of the plurality of void regions is determined;
[0072] The processing unit is also used for:
[0073] The cavity regions are sorted in ascending order of their area to obtain a cavity sequence;
[0074] The target pixel image is obtained by sequentially filling multiple hole regions in the hole sequence using the target filling kernel corresponding to each hole region in the hole sequence.
[0075] In one possible implementation, the determining unit is further configured to:
[0076] The cavity regions with an area smaller than a preset area threshold among the plurality of cavity regions are designated as first cavity regions, and the cavity regions with an area greater than or equal to the preset area threshold among the plurality of cavity regions are designated as second cavity regions.
[0077] The target filling core corresponding to the first void region is determined as a rhombus-shaped core, and the target filling core corresponding to the second void region is determined as a single core.
[0078] In one possible implementation, the attribute features of the cavity region include the shape features of the cavity region, the cavity region includes multiple cavity regions with different shapes, and the determining unit is further configured to:
[0079] Shape features are extracted from the multiple hollow regions to determine the shapes corresponding to the multiple hollow regions;
[0080] Obtain the correspondence between the pre-constructed void shape and the filling core;
[0081] Based on the shape of the plurality of void regions and the corresponding relationship, the target filling core corresponding to the plurality of void regions is determined respectively.
[0082] In one possible implementation, the attribute features of the void region further include the area features of the void region, and the processing unit is further configured to:
[0083] The cavity regions are sorted in ascending order of their area to obtain a cavity sequence;
[0084] The target pixel image is obtained by sequentially filling multiple hole regions in the hole sequence using the target filling kernel corresponding to each hole region in the hole sequence.
[0085] In one possible implementation, the determining unit is further configured to:
[0086] The pixel values of the image to be determined are inverted to obtain an inverted pixel image;
[0087] The area to be filled in the inverted pixel image is determined as the hole area based on the inverted pixel value corresponding to the inverted pixel image.
[0088] In one possible implementation, the processing unit is further configured to:
[0089] The target filling kernel is used to fill the holes in the void area to obtain a filled pixel image.
[0090] The pixel value inversion process is performed on the filled pixel image to obtain the target pixel image.
[0091] In one possible implementation, the processing unit is further configured to:
[0092] The filled pixel image is filtered to obtain a filtered pixel image;
[0093] The filtered pixel image is subjected to pixel value inversion processing to obtain the target pixel image.
[0094] As can be seen from the above technical solution, when recognizing the object to be identified, the corresponding undetermined pixel image can be obtained first. This undetermined pixel image is obtained by mapping the original depth image into pixel space, which is the original pixel image. Then, the hole regions in the undetermined pixel image are identified, and based on the attribute characteristics of the hole regions, the corresponding target filling kernel is determined. Finally, the target filling kernel can be used to fill the hole regions, obtaining the target pixel image. Since the attribute characteristics of the hole regions reflect their features, the target filling kernel determined based on this is the most suitable for the hole regions, enabling the hole regions in the undetermined pixel image to be effectively repaired after the hole filling process. Therefore, the target pixel image has improved image quality compared to the original undetermined pixel image, and the target pixel image can be directly used to recognize the object to be identified, resulting in higher recognition efficiency.
[0095] In another aspect, embodiments of this application also provide a storage medium for storing a computer program for executing the image processing method provided in the above embodiments.
[0096] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium can be at least one of the following media: read-only memory (ROM), RAM, magnetic disk, or optical disk, etc., and other media capable of storing program code.
[0097] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0098] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0099] The foregoing has provided a detailed description of an image processing method and related apparatus according to embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method of this application. Furthermore, those skilled in the art will recognize that there may be changes in the specific implementation methods and application scope based on the method of this application.
[0100] In summary, the content of this specification should not be construed as limiting this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. Furthermore, based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods.
Claims
1. An image processing method, characterized in that, The method includes: Obtain the undetermined pixel image corresponding to the object to be identified; the undetermined pixel image is obtained by mapping the original depth image corresponding to the object to be identified in pixel space; The pixel values of the image to be determined are inverted to obtain an inverted pixel image; The area to be filled in the inverted pixel image is determined as the hole area based on the inverted pixel value corresponding to the inverted pixel image; Area features are extracted from the multiple hollow regions to determine their areas; The cavity regions with an area smaller than a preset area threshold among the plurality of cavity regions are designated as first cavity regions, and the cavity regions with an area greater than or equal to the preset area threshold among the plurality of cavity regions are designated as second cavity regions. The target filling core corresponding to the first cavity region is determined as a rhombus core, and the target filling core corresponding to the second cavity region is determined as a single core; The cavity regions are sorted in ascending order of their area to obtain a cavity sequence; Using the target filling kernel corresponding to each hole region in the hole sequence, the multiple hole regions in the hole sequence are sequentially filled to obtain the target pixel image; The process of filling the voids in the voided region using the target filling kernel to obtain the target pixel image includes: The target filling kernel is used to fill the holes in the void area to obtain a filled pixel image. The filled pixel image is filtered to obtain a filtered pixel image; The filtered pixel image is subjected to pixel value inversion processing to obtain the target pixel image.
2. An image processing apparatus, characterized in that, The device includes an acquisition unit, a determination unit, and a processing unit: The acquisition unit is used to acquire the undetermined pixel image corresponding to the object to be identified; The undetermined pixel image is obtained by mapping the original depth image corresponding to the object to be identified in pixel space; The determining unit is used to perform pixel value inversion processing on the undetermined pixel image to obtain an inverted pixel image; and to determine the area to be filled in the inverted pixel image as a hole area based on the inverted pixel value corresponding to the inverted pixel image. The determining unit is further configured to extract area features from the plurality of hollow regions to determine the area of the plurality of hollow regions; and to designate hollow regions with an area less than a preset area threshold as first hollow regions, and hollow regions with an area greater than or equal to the preset area threshold as second hollow regions. The target filling core corresponding to the first cavity region is determined as a rhombus core, and the target filling core corresponding to the second cavity region is determined as a single core; The processing unit is used to sort the multiple cavity regions according to their areas from smallest to largest to obtain a cavity sequence; Using the target filling kernel corresponding to each hole region in the hole sequence, the multiple hole regions in the hole sequence are sequentially filled to obtain the target pixel image; The target filling kernel is used to fill the holes in the void region to obtain a filled pixel image; the filled pixel image is then filtered to obtain a filtered pixel image. The filtered pixel image is subjected to pixel value inversion processing to obtain the target pixel image.
3. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program for performing the method according to any one of claims 1-2.