Image data processing method, device, apparatus and storage medium
Patent Information
- Application Number
- CN202510526057.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]本发明提供一种图像数据处理方法、装置、设备及存储介质,以至少解决因人眼图像数据的规格差异化大,导致图像数据对应的处理结果或应用结果的精准度较低的问题
[0020]根据本发明实施例的第五方面,提供了一种计算机可读存储介质,计算机可读存储介质上存储有指令,当计算机可读存储介质中的指令由计算机设备的处理器执行时,使得计算机设备能够执行如第一方面及其任一种可能的实现方式的图像数据处理方法。
Smart Images

Figure CN122990182A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to an image data processing method, apparatus, device and storage medium. Background Technology
[0002] Currently, the application of human eye image data covers various technical fields such as image gaze redirection, driver fatigue monitoring, virtual reality, and augmented reality. Analyzing human eye image data can provide valuable information for social and scientific research, and also offer directions for innovation and improvement in technology and product development. However, in the practical application of human eye image data, due to the different sources or acquisition methods, the specifications of human eye image data vary greatly. Therefore, the accuracy of the processing or application results obtained based on these different specifications of image data is relatively low. Summary of the Invention
[0003] This invention provides an image data processing method, apparatus, device, and storage medium to at least solve the problem of low accuracy in processing or application results caused by the large differences in the specifications of human eye image data. The technical solution of this invention is as follows:
[0004] According to a first aspect of the present invention, an image data processing method is provided, the method comprising: detecting target key parts in an image to be processed based on facial key points; configuring the detected target key parts into a preset part region of a preset contour template to obtain a target facial image; cropping a target eye image from the target facial image; the target eye image comprising the eye region covered by any one eye in the target facial image.
[0005] As one possible implementation, cropping a target eye image from a target facial image includes: determining a predetermined number of target eye keypoints in the target facial image for any eye region corresponding to each of the two eyes; the predetermined number of target eye keypoints are used to characterize the eye feature information included in the target facial image; constructing a minimum circle region corresponding to the minimum circle enclosed by the predetermined number of target eye keypoints on the target facial image according to the minimum enclosing circle algorithm; and cropping a target eye image from the target facial image based on the minimum circle region; the target eye image includes the minimum circle region.
[0006] As another possible implementation, the target eye image is cropped from the target face image based on the minimum circular region, including: determining a square region covered by the target eye image with the center point of the minimum circular region as the center and the target length as the side length; wherein the target length is a preset multiple of the radius of the minimum circular region, and the preset multiple is an integer greater than 1 and less than 6; and cropping the target eye image from the target face image based on the square region.
[0007] As another possible implementation, the method further includes: acquiring any target eye image corresponding to any eye region; and mirroring any target eye image in the horizontal direction to obtain a mirrored eye image.
[0008] As another possible implementation, the method also includes: using an image interpolation algorithm to adjust the size of the target eye image and the corresponding mirror eye image to a preset size to obtain a set of eye data.
[0009] As another possible implementation, the method further includes: adjusting a preset magnification so that the target eye image also includes the area covered by the eyebrows in the target face image.
[0010] As another possible implementation, the target key areas include, in addition to the eye area, at least one or more of the following: the facial contour area, the eyebrow area, the nose area, the mouth area, the cheek area, the jaw area, and the ear area.
[0011] According to a second aspect of the present invention, an image data processing apparatus is provided, the apparatus comprising: a detection unit configured to detect target key parts in an image to be processed based on facial key points; a normalization unit configured to place the detected target key parts into a preset region of a preset contour template to obtain a target facial image; and a cropping unit configured to crop a target eye image from the target facial image; wherein the target eye image includes the eye region covered by any one eye in the target facial image.
[0012] As one possible implementation, the cropping unit is specifically configured to determine a preset number of target eye key points in the target facial image for any eye region corresponding to each of the two eyes in the target facial image; the preset number of target eye key points are used to characterize the eye feature information included in the target facial image; according to the algorithm for solving the minimum bounding circle, a minimum circle region corresponding to the minimum circle enclosed by the preset number of target eye key points on the target facial image is constructed; based on the minimum circle region, the target eye image is cropped from the target facial image; the target eye image includes the minimum circle region.
[0013] As another possible implementation, the cropping unit is specifically configured to determine the square region covered by the target eye image with the center point of the smallest circular region as the center and the target length as the side length; wherein the target length is a preset multiple of the radius of the smallest circular region, and the preset multiple is an integer greater than 1 and less than 6; based on the square region, the target eye image is cropped from the target face image.
[0014] As another possible implementation, the image processing apparatus further includes: a mirror unit configured to acquire any target eye image corresponding to any eye region; and to mirror-reverse any target eye image in the horizontal direction to obtain a mirrored eye image.
[0015] As another possible implementation, the image processing device further includes an adjustment unit configured to use an image interpolation algorithm to adjust the size of the target eye image and the corresponding mirror eye image to a preset size to obtain a set of eye data.
[0016] As another possible implementation, the adjustment unit is also configured to adjust a preset magnification so that the target eye image also includes the area covered by the eyebrow region in the target face image.
[0017] Another possible implementation is that, in addition to the eye area, the target key areas include at least one or more of the following: the facial contour area, the eyebrow area, the nose area, the mouth area, the cheek area, the jaw area, and the ear area.
[0018] According to a third aspect of the present invention, an image processing apparatus is provided, which is configured to perform an image data processing method as described in the first aspect and any possible implementation thereof.
[0019] According to a fourth aspect of the present invention, a computer device is provided, comprising: a processor and a memory for storing processor-executable instructions; wherein the processor is configured to execute the executable instructions to implement an image data processing method as described in the first aspect and any possible implementation thereof.
[0020] According to a fifth aspect of the present invention, a computer-readable storage medium is provided, on which instructions are stored, such that when the instructions in the computer-readable storage medium are executed by a processor of a computer device, the computer device is able to perform an image data processing method as described in the first aspect and any possible implementation thereof.
[0021] According to a sixth aspect of the embodiments of this application, a computer program product is provided, the computer program product including computer instructions, which, when executed on a computer device, cause the computer device to perform the image data processing method described in the first aspect and any possible implementation thereof.
[0022] The technical solution provided by the embodiments of the present invention brings at least the following beneficial effects: Based on facial key points, the target key parts representing facial information in the image to be processed are configured into the preset part regions of a unified preset contour template, so that the acquired target facial images are all images of the same size as the preset contour template, and each target key part of the target facial image is located in the corresponding preset part region. Based on this, when cropping the target eye image from the target facial image, it is only necessary to crop according to the cropping requirements of the target eye image, using the preset part region corresponding to the eye in the target key parts, so that the layout and image size of the key parts in different target eye images obtained according to the same cropping requirements are consistent.
[0023] Therefore, by using the above-mentioned standardized processing method for human eye images, it is possible to facilitate the creation / preprocessing of large human eye image datasets, reduce the differences in human eye image data, and thus improve the accuracy of the processing or application results corresponding to human eye image data. At the same time, it can also ensure that the human eye data of different individuals achieves consistent processing results and can be seamlessly embedded into the entire human eye data application process without producing any flaws.
[0024] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0025] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application, and do not constitute an undue limitation of this application.
[0026] Figure 1 This is a flowchart illustrating an image data processing method according to an exemplary embodiment. Figure 1 ;
[0027] Figure 2 This is a flowchart illustrating an image data processing method according to an exemplary embodiment. Figure 2 ;
[0028] Figure 3 This is a schematic diagram illustrating an image cropping process according to an exemplary embodiment;
[0029] Figure 4This is a schematic diagram illustrating an image processing procedure according to an exemplary embodiment;
[0030] Figure 5 This is a block diagram illustrating an image data processing apparatus according to an exemplary embodiment;
[0031] Figure 6 This is a schematic diagram of an image processing device according to an exemplary embodiment. Detailed Implementation
[0032] To enable those skilled in the art to better understand the technical solutions of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims. Furthermore, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to image data used for analysis, stored image data, displayed image data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0034] Before providing a detailed description of the image data processing method provided in the embodiments of this application, let's first briefly introduce the application scenarios involved in the embodiments of this application.
[0035] Currently, the application of human eye image data covers various technical fields such as image gaze redirection, driver fatigue monitoring, virtual reality, and augmented reality. Analyzing human eye image data can provide valuable information for social and scientific research, and also offer directions for innovation and improvement in technology and product development. However, in the practical application of human eye image data, due to the different sources or acquisition methods, the specifications of human eye image data vary greatly. Therefore, the accuracy of the processing or application results obtained based on these different specifications of image data is relatively low.
[0036] Furthermore, the lack of uniformity in the current academic and engineering communities regarding the standardization and preprocessing methods for human eye data presents a problem: when the processing of human eye images is part of the overall project, non-standard human eye preprocessing methods embedded in the entire project flow will result in image defects. Moreover, with the increasing number of learning applications related to the human eye, there is an urgent need for a unified method to standardize and preprocess human eye data.
[0037] To address the aforementioned issues, this application provides a method based on facial key points, which configures the target key parts representing facial information in the image to be processed into the preset part regions of a unified preset contour template, so that the acquired target facial images are all images of the same size as the preset contour template, and each target key part of the target facial image is located in the corresponding preset part region.
[0038] Based on this, when cropping the target eye image from the target facial image, it is only necessary to crop according to the cropping requirements of the target eye image, using the preset area corresponding to the eye in the key parts of the target image. This ensures that the layout and size of the key parts in different target eye images obtained according to the same cropping requirements are consistent. Therefore, through the above-mentioned standardized processing method for human eye images, it is possible to facilitate the creation / preprocessing of large human eye image datasets, reduce the differences in human eye image data, and thus improve the accuracy of the processing or application results corresponding to human eye image data; it also ensures consistent processing results for human eye data of different individuals, and can be seamlessly embedded into the entire human eye data application workflow without any flaws.
[0039] The image data processing method provided in this application embodiment can be applied to image processing devices.
[0040] For ease of understanding, the image data processing method provided in this application will be described in detail below with reference to the accompanying drawings.
[0041] Figure 1 This is a flowchart illustrating an image data processing method according to an exemplary embodiment, such as... Figure 1 As shown, the image data processing method includes the following steps.
[0042] S11, the image processing device detects key target areas in the image to be processed based on facial key points.
[0043] In some implementations, the aforementioned target key regions are unscaled key regions extracted from the image to be processed. Typically, a similarity transformation is used to align faces in the image to be processed without scaling. A similarity transformation is a linear transformation that changes the size and position of an object while preserving its shape.
[0044] The aforementioned facial key points are feature points that characterize facial contours. These include key points characterizing eye features; they may also include one or more of the following: facial edge contour points, and location points of eyebrows, eyes, nose, mouth, lips, ears, etc.
[0045] S12, the image processing device configures the detected key parts of the target into the preset part area of the preset contour template to obtain the target facial image.
[0046] This preset contour template represents the correspondence between key facial features and their locations within the facial contour area.
[0047] The preset contour template is used to indicate the preset regions in which each key target feature is located in the target facial image. In the preset contour template, different key target features correspond to different preset regions, and there is a one-to-one correspondence between key target features and preset regions.
[0048] The aforementioned key target areas include the eye area, and may also include at least one or more of the following: the facial contour area, the eyebrow area, the nose area, the mouth area, the cheek area, the jaw area, and the ear area.
[0049] For example, the following key target parts extracted—eyes, eyebrows, nose, mouth, cheeks, jaw, and ears—are respectively configured into the preset areas corresponding to each key target part in the preset contour template.
[0050] In some embodiments, the above-mentioned preset contour template is a face image template with uniform size and uniform key part layout.
[0051] In other embodiments, in order to ensure no image scaling, different preset contour templates are set for images to be processed of different sizes, that is, the preset contour templates correspond one-to-one with the size of the images to be processed.
[0052] Based on the aforementioned preset contour template, the positions of each extracted key target part can be adjusted to ensure that the positional distribution of each key target part extracted from different images is consistent, thereby achieving face image alignment and avoiding the influence caused by individual facial feature differences. This avoids the problem of large differences in the distribution of human eye data extracted from face images due to inconsistent distribution of key parts in face images.
[0053] In addition, the above-mentioned non-scaling face alignment can ensure that the resolution of the face is not lost to the greatest extent.
[0054] S13, according to the preset cropping rules, crop the target eye image from the target face image.
[0055] The aforementioned target eye image includes the eye region covered by any one eye in the target face image.
[0056] Preset cropping rules are used to instruct the cropping of preset areas, including the eyes, in the target facial image.
[0057] Through the above implementation method, when cropping a target eye image from a target facial image, it is only necessary to crop according to the cropping requirements of the target eye image, using a preset area corresponding to the eye in the key parts of the target image. This ensures that the layout and image size of the key parts in different target eye images obtained according to the same cropping requirements are consistent, thus achieving standardized processing of human eye images. Therefore, it can facilitate the creation / preprocessing of large human eye image datasets, reduce differences in human eye image data, and improve the accuracy of processing or application results corresponding to human eye image data; it can also ensure consistent processing results for human eye data of different individuals, and can be seamlessly embedded into the entire human eye data application workflow without any flaws.
[0058] As a refinement and extension of the specific implementation of the above embodiments, in order to fully illustrate the specific implementation process of this embodiment, this application provides implementation methods for some other image data processing methods.
[0059] Combination Figure 1 like Figure 2 As shown, the human eye image cropping method in step S13 above can be implemented through the following steps.
[0060] S131, for any eye region corresponding to the two eyes in the target facial image, determine a preset number of target eye key points in the target facial image.
[0061] The aforementioned preset number of target eye key points are used to characterize the eye feature information included in the target facial image.
[0062] For example, such as Figure 3 As shown, when detecting target eye key points in an aligned face image, six eye key points are obtained in the left and right eye regions. These six eye key points include important information about key points such as the corners of the eyes and eyelids.
[0063] Based on this step, the position and shape information of each eye can be accurately obtained.
[0064] S132, according to the algorithm for solving the minimum bounding circle, construct the minimum circle region corresponding to the minimum circle enclosed by a preset number of target eye key points on the target facial image.
[0065] The smallest circle enclosed on the target facial image is also called the smallest circumcircle.
[0066] For example, such as Figure 3 The diagram shows the center and radius of the smallest circumcircle determined by six eye key points. The smallest circumcircle can be understood as the smallest circle containing all given eye key points.
[0067] Through this step, the algorithm can recursively construct the circumcircle and adapt it to more points, thus obtaining a circle that covers the entire eye area and is as compact as possible.
[0068] S133, based on the minimum circle region, crop the target eye image from the target face image.
[0069] The target eye image includes a minimum circular region.
[0070] In one implementation, a square region covered by the target eye image is determined with the center point of the smallest circular region as the center and the target length as the side length. Then, the target eye image is cropped from the target face image using this square region as the target cropping region.
[0071] The target length is the radius of the smallest circular region, which is a preset multiple of the target length.
[0072] The preset multiplier is set to an integer greater than 1 and less than 6. Based on this preset multiplier, an area slightly larger than the eye itself is selected for cropping to ensure that the information around the eyes in the image (such as eyebrows, eyelids, etc.) is not cut off. This is to avoid the truncation causing misalignment when the regenerated eyebrows are pasted back onto the original face, thus resulting in imperfections.
[0073] For example, such as Figure 3 As shown, a square region is enclosed by a square with a side length of 4 times the radius of the smallest circumcircle and the center of the smallest circumcircle as the center. This square region is the target cropping region, and the target human eye image of the left eye is cropped from the target facial image.
[0074] In some implementations, in order to meet the requirement that the target eye image also includes the area covered by the eyebrows in the target face image, the preset magnification can be adjusted to fully represent the important feature information of the eye and its surroundings, thereby avoiding the accidental cropping of key parts such as eyebrows, so as to ensure that the image after image processing can be easily integrated back into the original image without producing any unnatural breaks or flaws.
[0075] Furthermore, to eliminate the influence of differences between the left and right eyes in practical applications of human eye data, it is typically necessary to acquire any target eye image corresponding to any eye region, i.e., select either the right or left eye. The target eye image is then mirrored horizontally to obtain a mirrored eye image. This ensures a unified processing flow for the left and right eyes during model training, allowing the model to focus more on learning specific targets without needing to consider the differences between the left and right eyes during training.
[0076] Specifically, in most cases, a person's left and right eyes are symmetrical, so the image of the right eye (or left eye) can be flipped to be consistent with the image of the left eye (or right eye) in order to eliminate the difference between the left and right eyes through mirror reflection.
[0077] For example, in practical applications such as gaze redirection models for gaze updates, inverse normalization, and inverse alignment transformations, consistent human eye image data for both eyes is typically used to ensure more accurate image processing results.
[0078] To meet the size requirements of human eye images in practical applications, an image interpolation algorithm is used to flexibly adjust the size of the target eye image and the corresponding mirror eye image to the preset size required for human eye images in practical applications.
[0079] Common image interpolation algorithms are used to perform size changes, rotations, and geometric transformations in image processing. They typically include the following: Nearest Neighbor Interpolation, Bilinear Interpolation, Bicubic Interpolation, Lanczos Interpolation, and Triangle Interpolation.
[0080] Optionally, to ensure that the generated image is smoother and has higher detail retention, a bicubic interpolation algorithm is used to adjust the size of the target eye image and the corresponding mirror eye image to the preset size required for human eye images in actual applications.
[0081] The above adjustment process can be understood as changing the resolution of an image. Specifically, enlarging a small image means increasing its resolution; shrinking a large image means decreasing its resolution.
[0082] When training deep learning, it is often necessary to resize the input human eye image data to a specific size to fit the model structure. This can be achieved using techniques such as image interpolation to adjust the cropped and flipped human eye image to a suitable size for the model input, thus ensuring the model functions correctly.
[0083] In a process of redirecting human eye gaze, the workflow is as follows: Figure 4 As shown, firstly, a preset contour template is used to align the key target features of the face in the image to be processed without scaling. This aligns all faces in the images to be processed onto a standard template, obtaining the target facial image. This avoids the influence of individual facial feature differences, and the unscaled alignment ensures that the facial resolution is not lost to the greatest extent. Then, a uniform preset cropping rule is used to normalize the target facial image, obtaining the target eye image. Finally, a gaze redirection model is used to update the gaze, perform inverse normalization, and perform inverse alignment transformation on the target eye image to complete the gaze redirection function of the original face image. Among them, inverse normalization restores the original eye position, so that it can be seamlessly pasted back to the aligned face; inverse alignment transformation pastes the aligned face back to the original image, completing the entire gaze redirection process.
[0084] To achieve the above functions, the image data processing apparatus includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art will readily recognize that, based on the algorithmic steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0085] This application embodiment also provides a method such as Figure 5 The image data processing apparatus shown includes: a detection unit 501, a normalization unit 502, a cropping unit 503, a mirroring unit 504, and an adjustment unit 505.
[0086] Detection unit 501 is configured to detect target key parts in the image to be processed based on facial key points. Normalization unit 502 is configured to place the detected target key parts into a preset region of a preset contour template to obtain a target facial image. Cropping unit 503 is configured to crop a target eye image from the target facial image; the target eye image includes the eye region covered by either eye in the target facial image.
[0087] As one possible implementation, the cropping unit 503 is specifically configured to determine a preset number of target eye key points in the target facial image for any eye region corresponding to each of the two eyes in the target facial image; the preset number of target eye key points are used to characterize the eye feature information included in the target facial image; according to the algorithm for solving the minimum bounding circle, a minimum circle region corresponding to the minimum circle enclosed by the preset number of target eye key points on the target facial image is constructed; based on the minimum circle region, the target eye image is cropped from the target facial image; the target eye image includes the minimum circle region.
[0088] As another possible implementation, the cropping unit 503 is specifically configured to determine the square region covered by the target eye image with the center point of the smallest circular region as the center and the target length as the side length; wherein the target length is the radius of the smallest circular region, and the preset multiple is an integer greater than 1 and less than 6; and the target eye image is cropped from the target face image based on the square region.
[0089] As another possible implementation, the image processing apparatus further includes: a mirror unit 504, configured to acquire any target eye image corresponding to any eye region; and to mirror-reverse any target eye image in the horizontal direction to obtain a mirrored eye image.
[0090] As another possible implementation, the image processing device further includes: an adjustment unit 505, configured to use an image interpolation algorithm to adjust the size of the target eye image and the corresponding mirror eye image to a preset size to obtain a set of eye data.
[0091] As another possible implementation, the adjustment unit 505 is also configured to adjust a preset magnification so that the target eye image also includes the area covered by the eyebrows in the target face image.
[0092] Another possible implementation is that, in addition to the eye area, the target key areas include at least one or more of the following: the facial contour area, the eyebrow area, the nose area, the mouth area, the cheek area, the jaw area, and the ear area.
[0093] Regarding the apparatus in the above embodiments, the specific manner in which each unit module performs its operations has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0094] Figure 6 This is a schematic diagram of an image processing device provided in this application. Figure 6The image processing device 60 may include at least one processor 601 and a memory 603 for storing processor-executable instructions. The processor 601 is configured to execute the instructions in the memory 603 to implement the image data processing method described in the following embodiments.
[0095] In addition, the image processing device 60 may also include a communication bus 602, at least one communication interface 604, an input device 606, and an output device 605.
[0096] The processor 601 may be a processor (central processing unit, CPU), a microprocessor unit, an ASIC, or one or more integrated circuits for controlling the execution of the program of the present application.
[0097] The communication bus 602 may include a path for transmitting information between the aforementioned components.
[0098] Communication interface 604 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.
[0099] Input device 606 is used to receive input signals and output device 605 is used to output signals.
[0100] The memory 603 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory may exist independently and be connected to the processing unit via a bus. The memory may also be integrated with the processing unit.
[0101] The memory 603 stores instructions for executing the scheme of this application, and the processor 601 controls the execution. The processor 601 executes the instructions stored in the memory 603 to realize the functions of the method of this application.
[0102] In a specific implementation, as one embodiment, the processor 601 may include one or more CPUs, for example... Figure 6 CPU0 and CPU1 in the CPU.
[0103] In a specific implementation, as one example, the image processing device 60 may include multiple processors, such as... Figure 6 Processors 601 and 607 are described herein. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor here may refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).
[0104] The image processing device, such as Figure 6 The diagram includes a processor 601 and a memory 603 for storing executable instructions of the processor 601; wherein the processor 601 is configured to execute executable instructions to implement the image data processing method as described in any of the possible embodiments above. And it can achieve the same technical effect, so to avoid repetition, it will not be described again here.
[0105] This application also provides a computer-readable storage medium, which, when executed by a processor of a control device or an image processing apparatus, enables the control device or image processing apparatus to perform an image data processing method as described in any of the possible embodiments above. The same technical effects can be achieved, and to avoid repetition, further details are omitted here.
[0106] This application also provides a computer program product, including a computer program or instructions, which are executed by a processor as an image data processing method according to any of the possible embodiments described above. The same technical effects can be achieved, and to avoid repetition, further details are omitted here.
[0107] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0108] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. An image data processing method, characterized in that, The method includes: Based on facial key points, target key parts in the image to be processed are detected; The detected key parts of the target are configured into the preset part area of the preset contour template to obtain the target facial image; A target eye image is cropped from the target facial image; the target eye image includes the eye area covered by any one eye in the target facial image.
2. The method according to claim 1, characterized in that, Cropping the target eye image from the target facial image includes: For any eye region corresponding to each of the two eyes in the target facial image, a preset number of target eye key points are determined in the target facial image; the preset number of target eye key points are used to characterize the eye feature information included in the target facial image; According to the algorithm for finding the minimum bounding circle, construct the minimum circle region corresponding to the minimum circle enclosed by the preset number of target eye key points on the target face image; Based on the minimum circular region, the target eye image is cropped from the target face image; the target eye image includes the minimum circular region.
3. The method according to claim 2, characterized in that, The step of cropping the target eye image from the target facial image based on the minimum circular region includes: The square area covered by the target eye image is determined with the center point of the smallest circular region as the center and the target length as the side length; wherein the target length is the radius of the smallest circular region, which is a preset multiple, and the preset multiple is an integer greater than 1 and less than 6; Based on the square region, the target eye image is cropped from the target facial image.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Acquire an image of any target eye corresponding to any eye region; The image of any target eye was mirrored in the horizontal direction to obtain a mirrored eye image.
5. The method according to claim 4, characterized in that, The method further includes: An image interpolation algorithm is used to adjust the size of the target eye image and the corresponding mirrored eye image to a preset size to obtain a set of eye data.
6. The method according to claim 3, characterized in that, The method further includes: The preset magnification is adjusted so that the target eye image also includes the area covered by the eyebrows in the target face image.
7. The method according to any one of claims 1 to 3, characterized in that, The target key areas include, in addition to the eye area, at least one or more of the following: the facial contour area, the eyebrow area, the nose area, the mouth area, the cheek area, the jaw area, and the ear area.
8. An image data processing apparatus, characterized in that, The device includes: The detection unit is configured to detect key target areas in the image to be processed based on facial key points; The normalization unit is configured to place the detected target key parts into a preset part area of a preset contour template to obtain a target facial image; The cropping unit is configured to crop a target eye image from the target face image; the target eye image includes the eye region covered by either eye in the target face image.
9. An image processing device, characterized in that, The device is configured to perform the image data processing method as described in any one of claims 1-7.
10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the image processing device, the image processing device performs the image data processing method as described in any one of claims 1-7.