Image editing method, device, equipment, medium and product

By extracting the outline information of the editing object in online clothing fitting and dividing the grid image, and using the mapping relationship to stretch the image, the problem of wrinkles in the image stretching is solved, and a smoother and more efficient clothing fitting effect is achieved.

CN117152287BActive Publication Date: 2024-10-18BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311119442.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2024-10-18
Estimated Expiration
2043-08-31

AI Technical Summary

Technical Problem

In the existing technology, during online clothing fitting, image stretching is prone to wrinkles, resulting in poor stretching effect and low fitting effect.

Method used

By extracting the mapping relationship between the contour information of the editing object in the image to be edited and mapping it to the measurement information, the image is divided into an initial grid image, and the mapping relationship is used to stretch the initial grid image to reduce the number of images stretched in a single time. area to avoid image wrinkles and obtain a smoother target image.

Benefits of technology

It achieves a smooth effect of image stretching, improves the display effect of clothing fitting, avoids image distortion, and provides higher stretching accuracy and better display effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117152287B_ABST
    Figure CN117152287B_ABST
Patent Text Reader

Abstract

The present disclosure provides an image editing method, device, equipment, medium and product, which are related to the field of artificial intelligence, specifically computer vision, augmented reality, virtual reality and other technical fields, and can be used in artificial intelligence content generation, metaverse and other scenarios. The specific implementation scheme is: based on the editing object in the image to be edited, extract the mapping relationship corresponding to the contour information of the editing object and the measurement information, and the measurement information is used to represent the editing target of the editing object; divide the image to be edited into at least one initial grid image; according to the mapping relationship, stretch at least one of the initial grid images into a target grid image; based on the target grid images corresponding to at least one of the initial grid images, determine the target image obtained by editing the image to be edited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence, specifically computer vision, augmented reality, virtual reality and other technical fields, and can be used in scenes such as artificial intelligence content generation and metaverse, and in particular, to an image editing method, device, equipment, medium and product. Background Art

[0002] Online shopping is a form of online shopping that is achieved through searching for product information on the Internet and processing electronic orders and online payments. Among them, clothing is the main category of online shopping. In order to provide users with a good clothing shopping experience, various shopping platforms are committed to providing users with virtual online fitting services.

[0003] Online fitting allows users to visually see the fitting effect, but the current fitting effect is not very good. Summary of the invention

[0004] The present disclosure provides an image editing method, apparatus, device, medium and product for implementing image smoothing editing.

[0005] According to a first aspect of the present disclosure, there is provided an image editing method, comprising:

[0006] Based on the editing object in the to-be-edited image, extracting a mapping relationship corresponding to mapping contour information of the editing object to measurement information, wherein the measurement information is used to represent an editing target of the editing object;

[0007] Dividing the image to be edited into at least one initial grid image;

[0008] According to the mapping relationship, respectively stretching at least one of the initial grid images into a target grid image;

[0009] Based on the target grid image respectively corresponding to at least one of the initial grid images, a target image obtained by editing the image to be edited is determined.

[0010] According to a second aspect of the present disclosure, there is provided an image editing device, comprising:

[0011] An extraction unit, configured to extract, based on an editing object in the image to be edited, a mapping relationship between contour information of the editing object and measurement information, wherein the measurement information is used to represent an editing target of the editing object;

[0012] A division unit, used for dividing the image to be edited into at least one initial grid image;

[0013] a stretching unit, configured to stretch at least one of the initial grid images into a target grid image corresponding to the measurement information according to the mapping relationship;

[0014] The determination unit is used to determine a target image obtained after editing of the image to be edited based on a target grid image respectively corresponding to at least one of the initial grid images.

[0015] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] 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 any one of the methods described in the first aspect.

[0019] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute any one of the methods described in the first aspect.

[0020] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising: a computer program, wherein the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program so that the electronic device executes the method described in the first aspect.

[0021] According to the technical solution disclosed in the present invention, based on the image to be edited, the mapping relationship corresponding to the contour information of the edited object in the image to be edited is extracted and mapped to the measurement information. The measurement information is the editing target set for the edited object, and the mapping relationship can reflect the conversion relationship between the contour information of the edited object and the editing target. After the image to be edited is divided into at least one initial grid image, the mapping relationship can be used to stretch each initial grid image to the target grid image, so that the target grid image corresponds to the measurement information, and the stretched target grid image can reach the editing target of the edited object. In the image editing process, the image to be edited is divided into grid images, and then the initial grid image is stretched using the mapping relationship. While the image stretching is achieved through the mapping relationship, the image area of ​​a single stretch is reduced. Since the stretching area is smaller, the image wrinkle phenomenon can be effectively avoided, and the obtained target grid image is smoother. Therefore, the target grid images corresponding to at least one initial grid image are used to determine the target image obtained by editing the image to be edited. The display screen of the target image is smoother, and the negative effects of stretching are avoided while having a higher stretching effect, so as to obtain a target image with better display effect.

[0022] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0024] Figure 1 is a system architecture diagram for implementing an image editing method provided by the present disclosure;

[0025] Figure 2 is a schematic diagram according to a first embodiment of the present disclosure;

[0026] Figure 3 is a schematic diagram according to a second embodiment of the present disclosure;

[0027] Figure 4 is an example diagram of a grid divided into an image to be edited provided by the present disclosure;

[0028] Figure 5 is an example diagram of a data input interface provided by the present disclosure;

[0029] Figure 6 is a schematic diagram according to a third embodiment of the present disclosure;

[0030] Figure 7 is a schematic diagram according to a fourth embodiment of the present disclosure;

[0031] Figure 8 is an example diagram of a grid image stretching provided by the present disclosure;

[0032] Fig. 9 is an application example diagram of an image editing method provided by an embodiment of the present disclosure;

[0033] Fig.10 is a schematic diagram according to a fifth embodiment of the present disclosure;

[0034] Fig.11 It is a block diagram of an electronic device used to implement the image editing method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0035] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0036] The technical solution disclosed in the present invention can be applied to online image editing scenarios, specifically to online fitting, smart fitness, game character settings, virtual reality, metaverse and other scenarios. Image stretching can be achieved through coordinate mapping to reduce distortion such as wrinkles caused by image stretching. The edited image will be smoother and have a better display effect.

[0037] In the related art, online shopping is a kind of online shopping that is realized by retrieving product information through the Internet and processing electronic orders, online payments, etc. Among them, clothing categories are the main categories of goods for online shopping. In order to provide users with a good clothing shopping experience, various shopping platforms are committed to providing users with virtual online fitting services.

[0038] In online fitting, a user may select an original clothing image, and then stretch the original clothing image into a target clothing image that matches the user's body shape, so that the user can intuitively see the fitting effect. However, the target clothing image currently obtained is prone to wrinkles, has a poor stretching effect, and has a low fitting effect.

[0039] In order to solve the wrinkle problem caused by image stretching, the technical solution disclosed in the present invention considers using a thin plate spline interpolation algorithm to deform the image. At the same time, in order to achieve accurate stretching, the present invention also divides the image into at least one initial grid image, and stretches the image in units of grids. The image size of a single stretch is small, which reduces the probability of wrinkles. The target image obtained by stretching is smoother and has a better display effect.

[0040] The present invention discloses an image editing method, device, equipment, medium and product, which are applied to computer vision, augmented reality, virtual reality and other technical fields in the field of artificial intelligence, and can be used for content review, metaverse and other common uses of artificial intelligence to reduce image distortion caused by image editing, and make the image display obtained by editing smoother and have better display effect.

[0041] The technical solution disclosed in the present invention extracts the mapping relationship between the contour information of the edited object in the image to be edited and the mapping information corresponding to the measurement information based on the image to be edited. The measurement information is the editing target set for the edited object, and the mapping relationship can reflect the conversion relationship between the contour information of the edited object and the editing target. After the image to be edited is divided into at least one initial grid image, the mapping relationship can be used to stretch each initial grid image to the target grid image, so that the target grid image corresponds to the measurement information, and the stretched target grid image can reach the editing target of the edited object. In the image editing process, the image to be edited is divided into grid images, and then the initial grid image is stretched using the mapping relationship. While the image stretching is achieved through the mapping relationship, the image area of ​​a single stretch is reduced. Since the stretching area is smaller, the image wrinkle phenomenon can be effectively avoided, and the obtained target grid image is smoother. Therefore, the target grid images corresponding to at least one initial grid image are used to determine the target image obtained by editing the image to be edited. The display screen of the target image is smoother, and the negative effects of stretching are avoided while having higher stretching accuracy, so as to obtain a target image with better display effect.

[0042] The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0043] like Figure 1 , is a system architecture diagram for implementing an image editing method provided by the present disclosure, the system may include a user terminal 1 and an electronic device 2.

[0044] The user terminal 1 may obtain the image to be edited provided by the user under the trigger of the user. An image editing request is generated based on the image to be edited, and the image editing request is sent to the electronic device 2. Exemplarily, the user terminal 1 may display an image editing page, which may include an image display area. The user terminal 1 may detect an image editing operation triggered by the user on the image display area, and obtain the image to be edited selected by the user.

[0045] The electronic device 2 can be configured with the image editing method disclosed in the present invention, and use the editing object in the image to be edited to extract the mapping relationship corresponding to the contour information of the editing object and map it to the measurement information. The measurement information can be used to represent the editing target of the editing object. After the image to be edited is divided into at least one initial grid image, at least one initial grid image can be stretched into a target grid image according to the mapping relationship, so that the target grid image meets the editing target of the editing object. Based on the target grid images corresponding to the at least one initial grid image, the target image obtained by editing the image to be edited is determined.

[0046] Figure 1The electronic device 2 is a cloud server. In addition, the electronic device can also be any device such as a personal computer, a laptop, a terminal device, a virtual terminal device, a wearable device, etc. The user terminal 1 can also be any of the above-mentioned computers, laptops, terminal devices, virtual terminal devices, wearable devices, mobile phones, etc. The specific types of electronic devices and user terminals are not limited in this embodiment. Of course Figure 1 The system architecture shown is only exemplary and should not constitute a specific limitation on the system architecture for implementing the image editing method. For example, the electronic device itself may also include a display screen to implement interaction with the user and image editing.

[0047] Figure 2 is a schematic diagram according to the first embodiment of the present disclosure, referring to Figure 2 The image editing method shown can be configured as an image editing device, which can be located in an electronic device. The image editing method can include the following steps:

[0048] 201. Based on an editing object in an image to be edited, extract a mapping relationship corresponding to contour information of the editing object and mapping it to measurement information, where the measurement information is used to represent an editing target of the editing object.

[0049] In this embodiment, the image to be edited may refer to a static image containing an editing object. The editing image may be a two-dimensional image or a three-dimensional image.

[0050] Of course, this embodiment can also be applied to many scenes. As the scene changes, the image to be edited can be different scene images. For example, in the online fitting scene, the image to be edited can include clothing images. In the game scene, the image to be edited can include character images. In the object filming scene, the image to be edited can be an object image for pasting thin molds. In addition, the image to be edited in the application scene can also be, for example, a film image corresponding to a room and wallpaper, a car film image corresponding to a vehicle and a car film, an object image corresponding to a sofa and a sofa cover, etc. This embodiment does not limit this too much.

[0051] Accordingly, in order to obtain the scene image in the above scene, it can be obtained through user interaction. That is, before step 201, it can also include: in response to the image editing request triggered by the user, obtaining the image to be edited in the image editing request. Afterwards, the editing object can be obtained from the image to be edited.

[0052] In the present disclosure, the editing object may be associated with the user. Specifically, the editing object may be associated with the user's object measurement data, so that the image to be edited where the editing object is located may be edited using the user's measurement information as the editing target.

[0053] In this embodiment, the mapping relationship may refer to the conversion relationship between the contour information of the edited object and the measured information. Extracting the mapping relationship corresponding to the contour information of the edited object mapped to the measured information may include: solving the mapping relationship to obtain the mapping relationship corresponding to the contour information of the edited object mapped to the measured information.

[0054] Specifically, extracting the mapping relationship corresponding to the contour information of the editing object mapped to the measurement information can include using the contour information of the editing object as mapping input data and the measurement information as mapping output data, solving the mapping relationship that can realize the conversion of mapping input data into mapping output data, and obtaining the mapping relationship.

[0055] In this embodiment, the image to be edited may be a partial image of the editing object extracted from the original image. The original image may be an image with a high content of background information, and the area where the editing object is located is a partial area of ​​the original image. The original image may be an image provided by a user for image editing. The original image refers to an image that has not been edited or cropped.

[0056] Furthermore, after obtaining the original image provided by the user, an object detection algorithm can be used to detect the object region of the editing object in the original image, and a local image corresponding to the object region can be captured from the original image to determine that the local image is the image to be edited.

[0057] After detecting the object area of ​​the edited object in the original image through the object detection algorithm, the proportion of the object area in the overall area of ​​the original image can be determined. If the ratio is greater than or equal to the ratio threshold, the original image can be directly determined to be the image to be edited. If the edit is less than the ratio threshold, a local image corresponding to the object area is intercepted from the original image, and the local image is determined to be the image to be edited. By comparing the proportions, it is possible to accurately judge whether the edited object needs to be cropped, further reduce the background information in the image to be edited, avoid the influence of background information on object editing, and improve the editing accuracy of the image to be edited.

[0058] 202. Divide the image to be edited into at least one initial grid image.

[0059] Optionally, dividing the image to be edited into at least one initial grid image may include: dividing the image to be edited into at least one initial grid image according to a preset image division strategy.

[0060] The image segmentation strategy may include information such as the number of segments, the size of segments, and the starting coordinates of segments.

[0061] Exemplarily, the number of divisions may include a row division number M and a column division number N, and the image to be edited may be divided in both row and column directions to obtain M*N initial grid images.

[0062] In this embodiment, the image shape of the initial grid image may be a rectangle or other types of geometric shapes, which are not particularly limited in this embodiment.

[0063] 203. According to the mapping relationship, stretch at least one initial grid image into a target grid image.

[0064] Optionally, the stretching step of any initial grid image in step 203 may include: calculating the mapping coordinates corresponding to the original coordinates of each pixel position point in the initial grid image according to the mapping relationship, moving the pixel position point to the corresponding mapping coordinates, and when the movement of each pixel point in the initial grid image is completed, the target grid image corresponding to the initial grid image can be obtained.

[0065] Furthermore, the original coordinates of the pixel position point can be used as input data, input into the mapping relationship, and the corresponding mapping coordinates can be calculated.

[0066] Since the original coordinates are converted to the mapped coordinates, for two adjacent original coordinates, the mapped coordinates obtained from the two original coordinates may be adjacent or not.

[0067] In this embodiment, moving the pixel position point to the corresponding mapping coordinates may specifically refer to setting the pixel value of the pixel position point to the pixel value of the mapping coordinates. The pixel value may be represented by the RGB format, that is, when the RGB format is adopted, the pixel value may be represented by three numerical values ​​(R, G, B).

[0068] For two adjacent mapping coordinates, the mapping of the two original coordinates can be completed by directly setting the coordinate value of the original coordinate to the mapping coordinate.

[0069] For two non-adjacent mapping coordinates, after setting the coordinate value of the original coordinate to the mapping coordinate, an interpolation algorithm can be used to interpolate the pixel coordinates between the two non-adjacent mapping coordinates, so that the pixel coordinates between the two mapping coordinates are also set with pixel values, avoiding the phenomenon of incomplete pixel display due to mapping.

[0070] 204. Determine a target image obtained by editing the image to be edited based on the target grid images respectively corresponding to the at least one initial grid image.

[0071] In this embodiment, at least one initial grid image may correspond to image position information, and the image position information may refer to the vertex coordinates of the initial grid image. Taking the initial grid image as a matrix as an example, the image position information of the initial grid image may be represented by the upper left vertex coordinates and the lower right vertex coordinates of the image.

[0072] Optionally, step 204 may include: based on image position information corresponding to at least one initial grid image, splicing target grid images corresponding to at least one initial grid image according to their respective image position information to obtain a target image.

[0073] Optionally, after obtaining the target image, the method may further include: determining an initial sub-page and a target sub-page for the image to be edited according to the target image, and generating a comparison display page based on the initial sub-page and the target sub-page, so that the comparison display page can display the image to be edited in the initial sub-region and the target image in the target sub-region. The image difference before and after editing can be viewed by comparing the display sub-pages to improve the image viewing effect.

[0074] In this embodiment, based on the editing object in the image to be edited, the mapping relationship corresponding to the contour information of the editing object and the measurement information can be extracted. The measurement information can be used to represent the editing target of the editing object, and then the mapping relationship can reflect the conversion relationship from the original contour information of the editing object to the editing target. Afterwards, the image to be edited is divided into at least one initial grid image. During the image editing process, the image to be edited is divided into grid images, and then the initial grid image is stretched using the mapping relationship. While the image stretching is achieved through the mapping relationship, the image area of ​​a single stretch is reduced. Since the stretching area is smaller, the image wrinkle phenomenon can be effectively avoided, and the obtained target grid image is smoother. Therefore, the target grid images corresponding to at least one initial grid image are used to determine the target image obtained by editing the image to be edited. The display screen of the target image is smoother, and the negative effects of stretching are avoided while having higher stretching accuracy, and the wrinkle phenomenon is avoided, so as to obtain a target image with better display effect.

[0075] In order to enable readers to more deeply understand the implementation principle of the present disclosure, the following Figure 3-Figure 10 ,right Figure 2 The illustrated embodiment is further refined.

[0076] Figure 3 is a schematic diagram according to the second embodiment of the present disclosure, referring to Figure 3 The image editing method shown is different from the above-mentioned embodiment in that it is a further refinement of the mapping relationship corresponding to mapping the contour information of the editing object to the measurement information based on the editing object in the image to be edited. The refinement step may include:

[0077] 301. Extract contour information of an editing object from an image to be edited, and determine measurement information set for the editing object.

[0078] Optionally, extracting contour information of the editing object from the image to be edited may include: extracting contour information of the target object from the image to be edited according to a contour detection algorithm.

[0079] Determining measurement information set for the edited object may include: determining the measurement information according to object measurement data set for the edited object.

[0080] 302. Based on the contour information and the measurement information, extract a mapping relationship between the contour information of the edited object and the measurement information.

[0081] Optionally, step 302 may include: extracting a conversion relationship from the profile information to the measurement information, and using the conversion relationship as the mapping information. The conversion relationship may convert the profile information into the measurement information.

[0082] That is, the profile information can be used as the information before the conversion, and the measurement information can be used as the information after the conversion. According to the known information before the conversion and the known information after the conversion, the conversion relationship is solved to obtain the mapping information. For example, taking the function f(x)=y as an example, x can be the profile information, y can be the measurement information, and the parameters of the function f are unknown. It is necessary to solve the parameters of the function f when (x, y) is known. The function f obtained by the solution is the mapping relationship.

[0083] The image editing method provided in this embodiment can extract the contour information of the editing object from the image to be edited, and determine the measurement information set for the editing object. Through contour extraction and measurement setting, the contour information and measurement information can be accurately obtained. The mapping relationship can be extracted in time through the contour information and measurement information. The mapping relationship is extracted through the contour information and measurement information, which can enable the mapping relationship to accurately represent the conversion relationship between the contour information and the measurement information, further improve the editing accuracy of the image editing process, avoid the phenomenon of clothing wrinkles, and achieve smoother image stretching.

[0084] Further, based on any of the above embodiments, the contour information includes at least one contour key point, the measurement information includes at least one measurement key point, and based on the contour information and the measurement information, extracting a mapping relationship corresponding to the edit object includes:

[0085] Determine at least one set of matching point pairs according to at least one contour key point and at least one measurement key point, wherein the matching point pairs include contour key points and measurement key points with mapping associations;

[0086] Based on at least one set of matching point pairs, a mapping function from contour key points of each set of matching point pairs to measurement key points of the same set is solved to obtain a coordinate mapping function.

[0087] Determine the mapping relationship corresponding to the coordinate mapping function for the edited object.

[0088] Optionally, determining at least one group of matching point pairs based on at least one contour key point and at least one measurement key point may include: dividing the contour key points and measurement key points with mapping association into a group of matching point pairs based on at least one contour key point and at least one measurement key point, and obtaining at least one group of matching point pairs after the division.

[0089] Specifically, for any contour keypoint, a measurement keypoint having a mapping association with the contour keypoint may be determined from at least one measurement keypoint.

[0090] Alternatively, for any measurement keypoint, a contour keypoint having a mapping association with the measurement keypoint may be determined from at least one contour keypoint.

[0091] Further, the contour key point and the measurement key point have a mapping association, which may include that if it is determined that the distance between the contour key point and the measurement key point is less than a distance threshold, the contour key point and the measurement key point have a mapping association. The distance between the contour key point and the measurement key point can be obtained by calculating the distance formula. The distance formula may include, for example, a two-point distance calculation formula, a two-norm formula, etc., which is not limited in this embodiment.

[0092] The image editing method provided in this embodiment can first group at least one contour key point and at least one measurement key point pair, divide the contour key points and measurement key points with mapping association into a group of matching point pairs, obtain at least one group of matching point pairs, and further refine the mapping association of contour information and measurement information through the matching point pairs. Through at least one group of matching point pairs, the mapping function between the contour key points and the measurement key points can be solved to obtain the coordinate mapping function, and the coordinate mapping function can be used as a mapping relationship. That is, the mapping function can be specifically solved using more specific key points, and the obtained coordinate mapping function can be mapped in point units, which can make the stretching process of the initial grid image more specific and detailed, and achieve more accurate stretching, thereby improving the editing accuracy and precision of the image to be edited, obtaining a smoother image stretching, and obtaining a target image with higher display effect.

[0093] In order to facilitate understanding of the relevant embodiments of the present disclosure, Figure 4 An example diagram of a grid division of an image to be edited is shown.

[0094] refer to Figure 4 In the division method shown, the number of row divisions M in the image division strategy is 8, and the number of column divisions is 12, so 8*12=96 sub-images can be obtained by division. Figure 4In , each table represents a sub-image.

[0095] exist Figure 4 On the basis of the divided grids shown in FIG, contour key points and measurement key points are also shown. Contour key points can be circular pixel points, and measurement key points can be rectangular key points. Contour key points can form a set of matching point pairs with their nearby measurement key points, for example, contour key point 401 and measurement key point 402 can be a set of matching point pairs. In order to effectively display matching point pairs, Figure 4 The key points in are only exemplary, and each key point may be a pixel point corresponding to a position point.

[0096] refer to Figure 4 The image to be edited can also determine a target contour key point from at least one contour key point, and apply the target contour key point to the merging of sub-images. Taking the target contour key point 403 as an example, it can be determined that the row 404 where the key point is located and the row 405 above the row where the target contour key point is located are at least two rows of sub-images adjacent to the target contour key point.

[0097] Therefore, the row where the target contour key point is located and the previous row can be merged, and the merged result is as follows: Figure 4 As shown, the dotted line in the figure is used to illustrate and distinguish two adjacent rows of sub-images to be merged, and does not have the meaning of image segmentation. For the specific implementation of sub-image merging, please refer to the specific description of the following embodiment.

[0098] Exemplarily, two sub-images 4041 and 4042 in the same column of two adjacent rows of sub-images may be regarded as an image group. Then, the two sub-images 4041 and 4042 in the same group are merged to obtain a merged result, that is, the rectangular area 4043 is the merged result.

[0099] As an embodiment, based on at least one set of matching point pairs, a mapping function from contour key points of each set of matching point pairs to measurement key points of the same set is solved to obtain a coordinate mapping function, including:

[0100] The objective function corresponding to the thin plate spline algorithm is used as the mapping function for mapping the contour key points of each group of matching point pairs to the measurement key points of the same group;

[0101] The objective function is solved using at least one set of matching point pairs to obtain a coordinate mapping function.

[0102] Optionally, the deformation target of the Thin Plate Spline algorithm (TPS) is to solve an objective function f, which can make the function f(x)=y and minimize the bending energy function. Therefore, the solved objective function f can be used to map other points of the image.

[0103] That is, using at least one set of matching point pairs to solve the objective function and obtain the coordinate mapping function may include: using at least one set of matching point pairs and solving the objective function under the constraint that the bending energy function is minimized to obtain the coordinate mapping function.

[0104] The bending energy function can be determined by the objective function f, and the bending energy function can be expressed as:

[0105]

[0106] Among them, (x i ,y i ) is a matching point pair, x i is the contour key point, y i is the key point for measurement. Λ is the rigidity control coefficient, x1 and x2 are the discretized plane coordinates, which can be known values.

[0107] TPS thin plate spline transformation is a non-rigid deformation. The input of the deformation algorithm is multiple sets of matching point pairs of the same parts in two images, and the output is the coordinate mapping of the same parts of the two images. It can be proved that the interpolation function of the thin plate spline can be the function with the minimum bending energy, that is, the interpolation function of the thin plate spline is the target function. The target function f(x) = y can be solved using at least one set of matching point pairs, such as (x1, y1), (x2, y2) and other at least one matching point pair to obtain the target function.

[0108] The image editing method provided in this embodiment can use the objective function corresponding to the thin plate spline algorithm as the mapping function. Due to the objective function of the thin plate spline algorithm, a balance can be achieved between the mapping smoothness and the optimal solution of the mapping, that is, through the objective function, the mapping relationship between the contour key points of various matching point pairs and the same group of measurement key points can be accurately solved, and the obtained coordinate mapping function has both smoothness and mapping accuracy, which can effectively improve the smoothness and mapping accuracy of image editing, and then use the coordinate mapping function to perform image editing, obtain a target image with smoother mapping effect and better effect, and avoid the wrinkle phenomenon after image editing.

[0109] In addition to using distance to determine matching point pairs, other methods can also be used to obtain matching point pairs. Further, based on any of the above embodiments, at least one set of matching point pairs is determined based on at least one contour key point and at least one measurement key point, including:

[0110] Based on an algorithm for obtaining matching point pairs, at least one set of matching point pairs from at least one contour key point and at least one measurement key point is extracted.

[0111] Optionally, the step of extracting at least one set of matching point pairs may include: inputting at least one contour key point and at least one measurement key point as input data into an algorithm for obtaining matching point pairs, and obtaining at least one set of matching point pairs output by the algorithm for obtaining matching point pairs.

[0112] Exemplarily, the algorithm for obtaining matching point pairs may be any one of algorithms such as Shift (transfer algorithm), Surf (Speeded Up Robust Features, accelerated robust features), and optical flow tracking.

[0113] The image editing method provided in this embodiment can directly extract at least one set of matching point pairs of at least one contour key point and at least one measurement key point by obtaining a matching point pair algorithm, thereby improving the efficiency and accuracy of obtaining matching point pairs.

[0114] Further, based on any of the above embodiments, extracting contour information of the editing object from the image to be edited includes:

[0115] Based on a contour detection algorithm, at least one contour key point of the editing object is extracted from the image to be edited, and the at least one contour key point is determined as contour information of the editing object.

[0116] Determine the measurement information set for the edited object, including:

[0117] The object measurement data provided by the user is obtained, where the object measurement data is the object size data obtained by field measurement.

[0118] Based on the object measurement data, at least one measurement key point is extracted, and the at least one measurement key point is determined to be measurement information set for the edited object.

[0119] Optionally, obtaining the object measurement data provided by the user may include, in response to a data input request triggered by the user, detecting the object measurement data input by the user.

[0120] Exemplarily, a data input pop-up window for object measurement data may be provided, and a user may input the object measurement data of the edited object through the data input pop-up window.

[0121] Figure 5 An example diagram of a data input interface is shown. Taking the editing object as a person as an example, the image to be edited may be a clothing image 501. Prompt information for data input may be displayed in the display page of the clothing image 501, for example, a prompt control 502 with a control name of "input measurement data". When it is detected that the user triggers the prompt control, it may switch to a data input pop-up window 503, which may include: prompting the data items that need to be entered, for example, the data items may include one or more data such as height, weight, chest circumference, three-dimensional, etc.

[0122] Optionally, obtaining the object measurement data provided by the user may include searching a database for object measurement data associated with the user information according to the user information. The database may store the user information and the object measurement data in an associated manner.

[0123] In this embodiment, the object measurement data may refer to data obtained by physically measuring the actual object represented by the editing object. Taking the editing object as a person as an example, the object measurement data may include: height, weight, chest circumference, waist circumference, limb length, head dimension, neck and shoulder width, etc.

[0124] Optionally, extracting at least one measurement key point based on the object measurement data may include: establishing a simulated object image corresponding to the object measurement data according to the object measurement data, and extracting at least one measurement key point in the simulated object image according to a contour detection algorithm.

[0125] Of course, the object measurement data may also be directly defined as measurement key points. For example, the object measurement data may include a series of pixel coordinates of pixels, and the pixels corresponding to the pixel coordinates in the image to be edited are directly determined as measurement key points.

[0126] The image editing method provided in this embodiment can use a contour detection algorithm to extract at least one contour key point of the editing object from the image to be edited. The contour detection algorithm can realize the rapid and accurate extraction of at least one contour key point. Obtain the object measurement data provided by the user. And extract at least one measurement key point through the object measurement data. The object measurement data can accurately represent the target that the editing object actually needs to edit, and then use the at least one measurement key point extracted from the object measurement data to make more accurate and effective editing adjustments to the editing object. Realize the acquisition basis of the mapping relationship using the key point, and improve the accuracy of the mapping relationship.

[0127] Further, based on any of the above embodiments, dividing the image to be edited into at least one initial grid image may include:

[0128] According to the contour information of the editing object, the image to be edited is divided into at least one initial grid image.

[0129] Optionally, dividing the image to be edited into at least one initial grid image according to the contour information of the edited object may include: dividing the image to be edited into a plurality of sub-images evenly according to a preset image division strategy, and merging the plurality of sub-images using the contour information of the edited object to obtain at least one initial grid image.

[0130] Furthermore, using the contour information of the editing object to merge multiple sub-images to obtain at least one initial grid image can include: determining at least one image group that needs to be merged among the multiple sub-images based on the contour information of the editing object, the image group including at least two sub-images that meet the merging conditions; performing image merging processing on the at least one image group to obtain merged images corresponding to the at least one image group; and determining at least one initial grid image based on the merged image corresponding to the at least one image group and the sub-images that are not involved in the merging among the multiple sub-images.

[0131] The image editing method provided in this embodiment can use the contour information of the editing object to divide the image to be edited into at least one initial grid image, and then use the contour information of the editing object to act on the division scene of the image to be edited, so that the division of the image to be edited can be affected by the contour information of the editing object, so that the at least one initial grid image obtained by the division is adapted to the contour information of the editing object, thereby improving the rationality of the image division. Furthermore, when using at least one initial grid image to edit the image, the editing result of the image can be made consistent with the contour information of the editing object, thereby improving the editing accuracy of the obtained target image and avoiding excessive stretching or invalid stretching.

[0132] Figure 6 is a schematic diagram according to the third embodiment of the present disclosure, referring to Figure 6 The image editing method shown is different from the above-mentioned embodiment in that it is a further refinement of the step of dividing the image to be edited into at least one initial grid image, and the refinement step may include:

[0133] 601. According to a preset image division strategy, the image to be edited is evenly divided into a plurality of sub-images.

[0134] Optionally, the image segmentation strategy may include information such as the number of segments, the size of segments, and the starting coordinates of segments.

[0135] Exemplarily, the number of divisions may include a row division number M and a column division number N, and the image to be edited may be divided in both row and column directions to obtain M*N initial grid images.

[0136] 602. Determine at least one image group to be merged among the multiple sub-images according to the contour information of the editing object, where the image group includes at least two sub-images that meet a merging condition.

[0137] Optionally, step 602 may include: according to contour information of the edited object, dividing at least two sub-images satisfying a merging condition among the multiple sub-images into one image group to obtain at least one image group.

[0138] 603. Perform image merging processing on at least one image group to obtain merged images corresponding to the at least one image group.

[0139] Optionally, step 603 may include: stitching at least two sub-images in the image group to obtain a merged image of the image group. Specifically, at least two sub-images in the image group may be synthesized according to original connection edges of the images to obtain a merged image corresponding to the image group.

[0140] 604. Determine at least one initial grid image based on the merged images corresponding to the at least one image group and the sub-images that are not involved in the merge among the multiple sub-images.

[0141] In this embodiment, at least one initial grid image may include at least one merged image and a sub-image not involved in the merge among the multiple sub-images. That is, a merged image can be used as an initial grid image, and a sub-image not involved in the merge can also be used as an initial grid image.

[0142] The image editing method provided in this embodiment can first use an image division strategy to evenly divide the image to be edited into multiple sub-images. The division of the sub-images conforms to a certain image division strategy, and a more regular preliminary division result is obtained. The obtained division regularity provides a premise for merging multiple sub-images. Therefore, by using the contour information of the editing object, at least one image group to be merged among the multiple sub-images is obtained, so that at least two sub-images in the image group are consistent with the contour of the editing object, which can make the division result of at least one initial grid image after merging more reasonable. Then, when using at least one initial grid image for image editing, the image editing result can be made consistent with the contour information of the editing object, further improving the editing accuracy of the obtained target image and avoiding excessive stretching or invalid stretching.

[0143] Further, based on any of the above embodiments, the contour information includes at least one contour key point, and at least one image group to be merged among the multiple sub-images is determined according to the contour information of the edited object, and the image group includes at least two sub-images that meet the merging condition, including:

[0144] According to at least one contour key point in the contour information, a target contour key point satisfying a contour merging condition is determined.

[0145] At least two rows of sub-images adjacent to the target contour key points are determined based on the image vertices respectively corresponding to the plurality of sub-images.

[0146] Based on at least two rows of sub-images, sub-images belonging to the same column are determined as at least two sub-images satisfying a merging condition, and at least one image group is obtained.

[0147] Optionally, the limb type of at least one contour key point can be determined according to at least one contour key point in the contour information, and the target contour key point belonging to the target limb type in the at least one contour key point can be determined according to the preset target limb type. For example, the target limb type can be an upper torso type, that is, the key points of the upper body of the human body can be used as target contour key points.

[0148] Further, based on the image vertices respectively corresponding to the plurality of sub-images, determining at least two rows of sub-images adjacent to the target contour key point may include: determining the row where the target contour key point is located according to the target contour key point. Further, the row where the target contour key point is located and the previous row of the row where the target contour key point is located may be determined as at least two rows of sub-images adjacent to the target contour key point. Alternatively, the row where the target contour key point is located and the next row of the row where the target contour key point is located may be determined as at least two rows of sub-images adjacent to the target contour key point. Alternatively, the row where the target contour key point is located and the previous row of the row where the target contour key point is located and the next row of the row where the target contour key point is located may be determined as at least two rows of sub-images adjacent to the target contour key point.

[0149] Optionally, based on at least two rows of sub-images, sub-images belonging to the same column are determined as at least two sub-images that meet a merging condition to obtain at least one image group, which may include: for the at least two rows of sub-images obtained, at least two sub-images belonging to the same row may be obtained by column to obtain at least one image group.

[0150] The image editing method provided by the present embodiment can extract target contour key points satisfying the contour merging condition from at least one contour key point, and determine at least two rows of sub-images to be merged according to the target contour key points, and then use the sub-images in the same column of the at least two rows of sub-images obtained as at least two sub-images satisfying the merging condition to obtain at least one image group. By setting the contour merging condition and the merging condition, the image group to be merged can be determined, so that the obtained at least one image group is actually consistent with the contour merging condition indicated by the contour information of the editing object, so that the merging of the sub-images is adapted to the contour information of the editing object, thereby improving the effectiveness and accuracy of the image merging and avoiding invalid merging of sub-images.

[0151] To achieve accurate results, Figure 7 is a schematic diagram according to the fourth embodiment of the present disclosure, referring to Figure 7 The image editing method shown is different from the above-mentioned embodiment in that, according to the mapping relationship, at least one initial grid image is stretched into a target grid image corresponding to the measurement information, including:

[0152] 701. Determine mesh vertices corresponding to at least one initial mesh image.

[0153] Optionally, the mesh vertices corresponding to the initial mesh image may be all vertices of the initial mesh image. Taking the initial mesh image as a rectangular image as an example, the mesh vertices corresponding to the initial mesh image may be four vertices of the rectangular mesh where the initial mesh image is located.

[0154] The initial grid image is divided by vertices, that is, the image area is first determined using the vertices, and then the local image corresponding to the image area is cropped from the video to be edited to obtain the initial grid image.

[0155] 702. Calculate, according to the mapping relationship, the mesh vertices of the initial mesh image and the mapping vertices corresponding to the measurement information, and obtain mapping vertices corresponding to at least one initial mesh image.

[0156] Optionally, step 702 may include: inputting mesh vertices of the initial mesh image into a mapping relationship, obtaining mapping vertices output by the mapping relationship, and obtaining mapping vertices respectively corresponding to at least one initial mesh image.

[0157] 703. Stretch at least one initial mesh image from corresponding mesh vertices to corresponding mapping vertices to obtain target mesh images corresponding to the at least one initial mesh image.

[0158] Optionally, an interpolation algorithm may be used to stretch each initial grid image from a grid vertex to a corresponding mapping vertex to obtain a target grid image corresponding to at least one initial grid image. For example, a TPS interpolation algorithm may be used to stretch each initial grid image from a grid vertex to a corresponding mapping vertex to obtain a target grid image corresponding to at least one initial grid image. In this embodiment, the specific type of the interpolation algorithm is not excessively limited.

[0159] The image editing method provided in this embodiment can use the mesh vertices corresponding to at least one initial mesh image for mapping, and can obtain the mapping vertices corresponding to at least one initial mesh image. Then, the mesh vertices and mapping points of the initial mesh image are used to complete the mapping of the initial mesh image to the target mesh image, which can make the image mapping process more refined, improve the efficiency and accuracy of image mapping, reduce the image protrusion or depression caused by inaccurate vertex mapping, realize smooth mapping of the image, and ensure the smoothness of the target image.

[0160] In order to facilitate understanding of the stretching principle of the initial grid image to the target grid image disclosed in the present invention, Figure 8An example diagram of mesh stretching is shown, taking the initial mesh image 801 as an example, the four vertices of the initial mesh image 801 are 8011-8014, and through the mapping relationship, the mapping vertex 8015 of the mesh vertex 8011, the mapping vertex 8016 of the mesh vertex 8012, the mapping vertex 8017 of the mesh vertex 8013, and the mapping vertex 8018 of the mesh vertex 8014 can be calculated respectively. Then, the initial mesh image 801 can be stretched into the target mesh image 802 through the vertices and the mapping vertices.

[0161] Further, based on any of the above embodiments, before extracting the mapping relationship between contour information of the edited object in the image to be edited and mapping it to the measurement information based on the image to be edited, the method further includes:

[0162] In response to a clothing selection operation triggered by a user, obtaining a target clothing selected by the user;

[0163] Render the target garment to a preset standard object model to obtain an edited object;

[0164] Based on the editing object, an image to be edited is generated.

[0165] Optionally, in response to a clothing selection operation triggered by the user, before obtaining the target clothing selected by the user, the method may include: detecting an online fitting request triggered by the user, displaying an online fitting page, which may display candidate clothing, and detecting a selection operation performed by the user on a target clothing among the candidate clothing.

[0166] The clothing selection operation may include a target clothing. Obtaining the target clothing selected by the user may include: parsing and obtaining the target clothing selected by the user from the clothing selection operation.

[0167] Optionally, generating the image to be edited based on the edit object may include: setting the edit object in a blank image to obtain the image to be edited. The blank image may refer to a pre-generated image for carrying the edit object. The blank image may have certain background information, but the background information does not affect the display of the edit object. Furthermore, the edit object may be set in the blank image by cutting out.

[0168] The image editing method provided in this embodiment allows the user to select a target garment and render the target garment based on a standard object model to obtain an editing object, which can be used to generate an image to be edited. The user's garment selection can realize a three-dimensional display of the garment, realize a personalized display of the garment image, and render the garment image using a preset standard object model, which can reduce the complexity of obtaining the editing object and improve the generation efficiency of the image to be edited.

[0169] Furthermore, based on any of the above embodiments, the method further includes:

[0170] According to the target image, a clothing display page is generated, and the clothing display page is displayed for the user to view the target image.

[0171] Optionally, generating a clothing display page according to the target image may include: determining an image subpage corresponding to the target image, and generating the clothing display page according to the image subpage.

[0172] The image subpage of the target image can be used as a partial page of the clothing display page.

[0173] In addition, in addition to the image subpage corresponding to the target image, the clothing display page may also include other subpages, such as an edit subpage corresponding to the image to be edited, a prompt control for prompting to input object measurement data, and / or an input subpage for directly inputting object measurement data. In addition, the clothing display subpage may also include a recommendation subpage. The recommendation subpage may include at least one recommended replacement garment and other types of recommended objects.

[0174] The image editing method provided in this embodiment can generate a clothing display page from the generated target image, allowing the user to view the target image, that is, intuitively display the editing result of the image to be edited to the user, which can improve the user experience.

[0175] As a possible implementation, the clothing display page includes a clothing display area, the clothing display area includes at least one replacement clothing, and the method further includes:

[0176] In response to a clothing selection operation performed by a user on a clothing display area, obtaining a target replacement clothing corresponding to the clothing selection operation;

[0177] Render the target replacement clothing to the preset standard object model to obtain a new editing object;

[0178] Based on the editing object, generate the image to be edited, including:

[0179] Based on the new editing object, an image to be edited is generated.

[0180] Optionally, at least one replacement garment may correspond to a garment subpage. There may be at least one garment subpage in the garment display area, and each garment subpage may display a replacement garment. At least one garment subpage may be displayed by sliding in the garment display area. For example, a user may switch the currently displayed garment subpage by sliding up and down or left and right in the garment display area.

[0181] In response to the user performing a clothing selection operation on the clothing display area, the user can also receive the clothing selection operation performed on the clothing display area. Specifically, the user can detect the clothing selection operation performed on the target clothing subpage in the clothing display area, and obtain the clothing information displayed in the target clothing subpage as the target replacement clothing.

[0182] The clothing in this embodiment may refer to clothing information, which may include clothing title, image, type, description information, clothing display video, detailed introduction information and other information, which is not excessively limited in this embodiment.

[0183] Optionally, generating the image to be edited based on the new editing object may include: setting the new editing object in a blank image to obtain the image to be edited. The blank image may refer to a pre-generated empty image, that is, the blank image can display an image, but the image content is empty.

[0184] The image editing method provided in this embodiment can realize the selection of clothing by the user through interaction with the user, so as to realize the replacement of clothing. It realizes providing the user with display switching of different clothing, so that the user can directly realize the corresponding editing display when selecting clothing, without providing measurement information again, reducing the complexity of operation, expanding the application scenarios of image editing, and improving the use efficiency.

[0185] Furthermore, based on any of the above embodiments, the method further includes:

[0186] In response to a measurement input request triggered by a user, object measurement data input by the user is obtained.

[0187] Based on the object measurement data, determine the measurement information set for the edited object.

[0188] In this embodiment, input prompt information of the measurement data can be displayed, a trigger operation performed by the user on the input prompt information can be detected, an input pop-up window for the measurement information can be displayed, and then the object measurement data input by the user in the input pop-up window can be detected.

[0189] Determining measurement information set for the edited object according to the object measurement data may include extracting measurement information from the object measurement data. The object measurement data may include, for example, height, width, volume, and other data.

[0190] The image editing method provided in this embodiment can obtain the object measurement data input by the user through interaction with the user, and then determine the measurement information set for the edited object according to the object measurement data, so as to realize the user's personalized setting of the measurement information of the edited object and improve the user experience.

[0191] like Fig. 9FIG. 1 is an example diagram of an application of an image editing method provided by an embodiment of the present disclosure. Fig. 9 For the image to be edited 901, the image to be edited can be divided into at least one initial grid image, and the specific division method can refer to the table network shown in 902. At least one contour key point of the editing object can be detected from the image to be edited 901. In addition, object measurement data input for the editing object can also be obtained, and at least one measurement key point can be extracted according to the object measurement data.

[0192] Afterwards, at least one set of matching point pairs can be extracted based on at least one contour key point and at least one measurement key point. At least one set of matching point pairs can be used to extract mapping relationships. The mapping relationship can be used for mapping the divided table network. For example, the vertices of the grid image can be mapped to obtain mapping vertices. The initial grid image is stretched by mapping the vertices to obtain a target grid image corresponding to the initial grid image. The stretching effect of the target grid image corresponding to at least one initial grid image can refer to the table network shown in 903. The target grid images corresponding to at least one initial grid image can be spliced ​​to form a target image 904.

[0193] Fig.10 is a schematic diagram according to the fifth embodiment of the present disclosure, referring to Fig.10 The image editing device 1000 shown may include the following units:

[0194] The extraction unit 1001 is used to extract a mapping relationship corresponding to contour information of the editing object and measurement information based on the editing object in the image to be edited, where the measurement information is used to represent an editing target of the editing object.

[0195] The dividing unit 1002 is configured to divide the image to be edited into at least one initial grid image.

[0196] The stretching unit 1003 is used to stretch at least one initial grid image into a target grid image corresponding to the measurement information according to the mapping relationship.

[0197] The determining unit 1004 is configured to determine a target image obtained after editing of the image to be edited based on the target grid images respectively corresponding to the at least one initial grid image.

[0198] As an embodiment, the extraction unit includes:

[0199] An information acquisition module, used to extract contour information of an editing object from the image to be edited, and determine measurement information set for the editing object;

[0200] The mapping extraction module is used to extract the corresponding mapping relationship when the contour information of the editing object is mapped to the measurement information based on the contour information and the measurement information.

[0201] Further, based on any of the above embodiments, the contour information includes at least one contour key point, the measurement information includes at least one measurement key point, and the mapping extraction module includes:

[0202] A point pair matching submodule, for determining at least one set of matching point pairs according to at least one contour key point and at least one measurement key point, wherein the matching point pairs include contour key points and measurement key points with mapping associations;

[0203] A mapping solver module, for solving a mapping function from contour key points of each group of matching point pairs to measurement key points of the same group based on at least one group of matching point pairs, to obtain a coordinate mapping function;

[0204] The mapping determination submodule is used to determine the mapping relationship corresponding to the edited object by the coordinate mapping function.

[0205] Further, based on any of the above embodiments, the mapping operator module is specifically used for:

[0206] The objective function corresponding to the thin plate spline algorithm is used as a mapping function for mapping the contour key points of each group of matching point pairs to the same group of measurement key points; the objective function is solved using at least one group of matching point pairs to obtain a coordinate mapping function.

[0207] Further, based on any of the above embodiments, the point pair matching submodule is specifically used for:

[0208] Based on an algorithm for obtaining matching point pairs, at least one set of matching point pairs from at least one contour key point and at least one measurement key point is extracted.

[0209] Further, based on any of the above embodiments, the information acquisition module includes:

[0210] A contour detection submodule, used to extract at least one contour key point of the editing object from the image to be edited based on a contour detection algorithm, and determine the at least one contour key point as contour information of the editing object;

[0211] The data acquisition submodule is used to acquire the object measurement data provided by the user, where the object measurement data is the object size data obtained by field measurement;

[0212] The key detection submodule is used to extract at least one key measurement point based on the object measurement data, and determine that the at least one key measurement point is the measurement information set for the edited object.

[0213] Further, based on any of the above embodiments, the division unit includes:

[0214] The contour division module is used to divide the image to be edited into at least one initial grid image according to the contour information of the edited object.

[0215] Further, based on any of the above embodiments, the division unit includes:

[0216] A strategy division module, used to divide the image to be edited into multiple sub-images evenly according to a preset image division strategy;

[0217] An image division module, used for determining at least one image group to be merged among the multiple sub-images according to the contour information of the edited object, wherein the image group includes at least two sub-images that meet the merging condition;

[0218] An image merging module, used to perform image merging processing on at least one image group respectively to obtain merged images corresponding to the at least one image group respectively;

[0219] The initial image module is used to determine at least one initial grid image based on the merged images respectively corresponding to at least one image group and the sub-images not involved in the merge among the multiple sub-images.

[0220] Further, based on any of the above embodiments, the contour information includes at least one contour key point, and the image segmentation module includes:

[0221] A target merging submodule, used to determine a target contour key point that meets the contour merging condition according to at least one contour key point in the contour information;

[0222] An adjacent determination submodule, used to determine at least two rows of sub-images adjacent to the target contour key point based on the image vertices respectively corresponding to the plurality of sub-images;

[0223] The merge confirmation submodule is used to determine, based on at least two rows of sub-images, sub-images belonging to the same column as at least two sub-images satisfying a merge condition, to obtain at least one image group.

[0224] Further, based on any of the above embodiments, the stretching unit includes:

[0225] A vertex determination module, used to determine mesh vertices corresponding to at least one initial mesh image;

[0226] A vertex mapping module, used to calculate the mesh vertices of the initial mesh image and the mapping vertices corresponding to the measurement information according to the mapping relationship, and obtain the mapping vertices corresponding to at least one initial mesh image;

[0227] The target determination module is used to stretch at least one initial grid image from corresponding grid vertices to corresponding mapping vertices to obtain target grid images corresponding to the at least one initial grid image.

[0228] Furthermore, based on any of the above embodiments, the method further includes:

[0229] A clothing selection unit, for obtaining a target clothing selected by the user in response to a clothing selection operation triggered by the user;

[0230] An object rendering unit, used for rendering the target garment to a preset standard object model to obtain an edited object;

[0231] The image generating unit is used to generate an image to be edited based on the editing object.

[0232] Furthermore, based on any of the above embodiments, the method further includes:

[0233] The page display unit is used to generate a clothing display page according to the target image, and display the clothing display page so that the user can view the target image.

[0234] Furthermore, based on any of the above embodiments, the method further includes:

[0235] A clothing replacement unit, configured to obtain a target replacement clothing corresponding to the clothing selection operation in response to a clothing selection operation performed by a user on the clothing display area;

[0236] An object updating unit, used for rendering the target replacement clothing to a preset standard object model to obtain a new editing object;

[0237] An image generation unit, comprising:

[0238] The image generation module is used to generate an image to be edited based on a new editing object.

[0239] Furthermore, based on any of the above embodiments, the method further includes:

[0240] A data input unit, configured to obtain object measurement data input by a user in response to a measurement input request triggered by a user;

[0241] The measurement extraction unit is used to determine the measurement information set for the edited object according to the object measurement data.

[0242] It should be noted that the editing object in this embodiment is not a head model for a specific user and cannot reflect the personal information of a specific user.

[0243] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0244] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0245] According to an embodiment of the present disclosure, the present disclosure also provides a computer program product, which includes: a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.

[0246] Fig.11 A schematic block diagram of an example electronic device 1100 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0247] like Fig.11 As shown, the device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1102 or a computer program loaded from a storage unit 1108 into a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the device 1100 can also be stored. The computing unit 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.

[0248] A number of components in the device 1100 are connected to the I / O interface 1105, including: an input unit 1106, such as a keyboard, a mouse, etc.; an output unit 1107, such as various types of displays, speakers, etc.; a storage unit 1108, such as a disk, an optical disk, etc.; and a communication unit 1109, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1109 allows the device 1100 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0249] The computing unit 1101 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1101 performs the various methods and processes described above, such as image editing methods. For example, in some embodiments, the image editing method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1108. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1100 via the ROM 1102 and / or the communication unit 1109. When the computer program is loaded into the RAM 1103 and executed by the computing unit 1101, one or more steps of the image editing method described above may be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured to perform the image editing method in any other appropriate manner (e.g., by means of firmware).

[0250] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0251] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0252] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0253] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0254] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0255] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0256] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0257] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. An image editing method, comprising: Based on the editing object in the to-be-edited image, extracting a mapping relationship between contour information of the editing object and measurement information, wherein the contour information includes at least one contour key point, and the measurement information is used to represent the editing target of the editing object; According to a preset image division strategy, the image to be edited is evenly divided into a plurality of sub-images; Determine the limb type of at least one contour key point according to at least one contour key point in the contour information, and determine a target contour key point belonging to the target limb type among the at least one contour key point according to a preset target limb type; Based on the image vertices respectively corresponding to the plurality of sub-images, determining at least two rows of sub-images adjacent to the target contour key points; Based on the at least two rows of sub-images, determining sub-images belonging to the same column as at least two sub-images satisfying a merging condition, and obtaining at least one image group; respectively performing image stitching on at least two sub-images in at least one of the image groups to obtain a merged image corresponding to at least one of the image groups; Determine at least one initial grid image based on a merged image corresponding to at least one of the image groups and sub-images that are not involved in the merge among the plurality of sub-images; According to the mapping relationship, respectively stretching at least one of the initial grid images into a target grid image; Based on the target grid image respectively corresponding to at least one of the initial grid images, a target image obtained by editing the image to be edited is determined.

2. The method according to claim 1, wherein: The extracting, based on the editing object in the to-be-edited image, a mapping relationship corresponding to mapping the contour information of the editing object to the measurement information includes: Extracting contour information of an editing object from the image to be edited, and determining measurement information set for the editing object; Based on the contour information and the measurement information, a mapping relationship between the contour information of the edited object and the measurement information is extracted.

3. The method according to claim 2, wherein: The contour information includes at least one contour key point, the measurement information includes at least one measurement key point, and extracting the mapping relationship corresponding to the edit object based on the contour information and the measurement information includes: Determine at least one set of matching point pairs according to at least one of the contour key points and at least one of the measurement key points, wherein the matching point pairs include contour key points and measurement key points with mapping associations; Based on at least one group of the matching point pairs, solving a mapping function from the contour key points of each group of matching point pairs to the measurement key points of the same group to obtain a coordinate mapping function; Determine that the coordinate mapping function is a mapping relationship corresponding to the editing object.

4. The method according to claim 3, wherein: The step of solving the mapping function from the contour key points of each group of matching point pairs to the measurement key points of the same group based on at least one group of matching point pairs to obtain the coordinate mapping function includes: The objective function corresponding to the thin plate spline algorithm is used as the mapping function for mapping the contour key points of each group of matching point pairs to the measurement key points of the same group; The objective function is solved using at least one set of the matching point pairs to obtain the coordinate mapping function.

5. The method according to claim 3 or 4, wherein: The step of determining at least one set of matching point pairs according to at least one contour key point and at least one measurement key point comprises: Based on an algorithm for obtaining matching point pairs, at least one set of matching point pairs from at least one contour key point and at least one measurement key point is extracted.

6. The method according to any one of claims 2 to 4, wherein: The step of extracting contour information of the editing object from the image to be edited includes: Based on a contour detection algorithm, extract at least one contour key point of the editing object from the image to be edited, and determine at least one contour key point as contour information of the editing object; The determining of the measurement information set for the editing object includes: Acquire object measurement data provided by a user, wherein the object measurement data is object size data obtained by field measurement; Based on the object measurement data, at least one measurement key point is extracted, and at least one of the measurement key points is determined to be the measurement information set for the edited object.

7. The method according to any one of claims 1 to 4, wherein: The step of respectively stretching at least one of the initial grid images into a target grid image corresponding to the measurement information according to the mapping relationship comprises: Determine mesh vertices corresponding to at least one of the initial mesh images; According to the mapping relationship, the mesh vertices of the initial mesh image and the mapping vertices corresponding to the measurement information are calculated to obtain at least one mapping vertex corresponding to the initial mesh image; At least one of the initial mesh images is stretched from a corresponding mesh vertex to a corresponding mapping vertex to obtain a target mesh image corresponding to the at least one initial mesh image.

8. The method according to any one of claims 1 to 4, wherein: Before extracting the mapping relationship between contour information of the edited object in the image to be edited and mapping it to the measurement information based on the image to be edited, the method further includes: In response to a clothing selection operation triggered by a user, obtaining a target clothing selected by the user; Rendering the target garment to a preset standard object model to obtain the edited object; Based on the editing object, the image to be edited is generated.

9. The method according to claim 8, further comprising: A clothing display page is generated according to the target image, and the clothing display page is displayed so that a user can view the target image.

10. The method according to claim 9, wherein: The clothing display page includes a clothing display area, the clothing display area includes at least one replacement clothing, and the method further includes: In response to a clothing selection operation performed by the user on the clothing display area, obtaining a target replacement clothing corresponding to the clothing selection operation; Rendering the target replacement garment to a preset standard object model to obtain a new editing object; The step of generating the image to be edited based on the editing object comprises: Based on the new editing object, the image to be edited is generated.

11. The method according to any one of claims 1-4, 9-10, further comprising: In response to a measurement input request triggered by a user, obtaining object measurement data input by the user; The measurement information set for the edited object is determined according to the object measurement data.

12. An image editing device, comprising: An extraction unit, configured to extract, based on an editing object in an image to be edited, a mapping relationship between contour information of the editing object and measurement information, wherein the contour information includes at least one contour key point, and the measurement information is used to represent an editing target of the editing object; A division unit, used for dividing the image to be edited into at least one initial grid image; a stretching unit, configured to stretch at least one of the initial grid images into a target grid image corresponding to the measurement information according to the mapping relationship; A determination unit, configured to determine a target image obtained after editing of the image to be edited based on a target grid image respectively corresponding to at least one of the initial grid images; The division unit comprises: A strategy division module, used to divide the image to be edited into a plurality of sub-images on an even basis according to a preset image division strategy; An image segmentation module, used to determine the limb type of at least one contour key point according to at least one contour key point in the contour information, and determine a target contour key point belonging to the target limb type among the at least one contour key point according to a preset target limb type; Based on the image vertices respectively corresponding to the plurality of sub-images, determining at least two rows of sub-images adjacent to the target contour key points; Based on the at least two rows of sub-images, determining sub-images belonging to the same column as at least two sub-images satisfying a merging condition, and obtaining at least one image group; An image merging module, used to stitch at least two sub-images in at least one of the image groups to obtain a merged image corresponding to at least one of the image groups; The initial image module is used to determine at least one of the initial grid images based on the merged images corresponding to at least one of the image groups and the sub-images that are not involved in the merge among the multiple sub-images.

13. The device according to claim 12, wherein: The extraction unit comprises: An information acquisition module, used to extract contour information of an editing object from the image to be edited, and determine measurement information set for the editing object; A mapping extraction module is used to extract a corresponding mapping relationship when the contour information of the editing object is mapped to the measurement information based on the contour information and the measurement information.

14. The device according to claim 13, wherein: The contour information includes at least one contour key point, the measurement information includes at least one measurement key point, and the mapping extraction module includes: A point pair matching submodule, configured to determine at least one set of matching point pairs according to at least one of the contour key points and at least one of the measurement key points, wherein the matching point pairs include contour key points and measurement key points with mapping associations; A mapping solver module, for solving a mapping function from the contour key points of each group of matching point pairs to the measurement key points of the same group based on at least one group of matching point pairs, to obtain a coordinate mapping function; The mapping determination submodule is used to determine the mapping relationship corresponding to the coordinate mapping function for the editing object.

15. The device according to claim 14, wherein: The mapping operator module is specifically used for: The objective function corresponding to the thin plate spline algorithm is used as a mapping function for mapping the contour key points of each group of matching point pairs to the same group of measurement key points; the objective function is solved using at least one group of the matching point pairs to obtain the coordinate mapping function.

16. The device according to claim 14 or 15, wherein: The point pair matching submodule is specifically used for: Based on an algorithm for obtaining matching point pairs, at least one set of matching point pairs from at least one contour key point and at least one measurement key point is extracted.

17. The device according to any one of claims 13 to 15, wherein: The information acquisition module comprises: A contour detection submodule, configured to extract at least one contour key point of the editing object from the image to be edited based on a contour detection algorithm, and determine at least one contour key point as contour information of the editing object; A data acquisition submodule, used to acquire object measurement data provided by a user, wherein the object measurement data is object size data obtained by field measurement; The key detection submodule is used to extract at least one key measurement point based on the object measurement data, and determine that at least one key measurement point is the measurement information set for the editing object.

18. The device according to any one of claims 12 to 15, wherein: The stretching unit comprises: A vertex determination module, used to determine mesh vertices corresponding to at least one of the initial mesh images; A vertex mapping module, used to calculate the mesh vertices of the initial mesh image and the mapping vertices corresponding to the measurement information according to the mapping relationship, and obtain at least one mapping vertex corresponding to the initial mesh image; The target determination module is used to stretch at least one of the initial grid images from the corresponding grid vertices to the corresponding mapping vertices to obtain a target grid image corresponding to the at least one initial grid image.

19. The device according to any one of claims 12 to 15, further comprising: A clothing selection unit, configured to obtain a target clothing selected by the user in response to a clothing selection operation triggered by the user; An object rendering unit, used for rendering the target garment to a preset standard object model to obtain the edited object; An image generating unit is used to generate the image to be edited based on the editing object.

20. The apparatus according to claim 19, further comprising: The page display unit is used to generate a clothing display page according to the target image, and display the clothing display page so that the user can view the target image.

21. The apparatus according to claim 20, further comprising: A clothing replacement unit, configured to obtain a target replacement clothing corresponding to a clothing selection operation performed by the user on the clothing display area in response to the clothing selection operation performed by the user on the clothing display area; An object updating unit, used for rendering the target replacement garment to a preset standard object model to obtain a new editing object; The image generating unit comprises: An image generation module is used to generate the image to be edited based on the new editing object.

22. The device according to any one of claims 12-15, 20-21, further comprising: A data input unit, configured to obtain object measurement data input by a user in response to a measurement input request triggered by the user; A measurement extraction unit is used to determine the measurement information set for the editing object according to the object measurement data.

23. An electronic device, comprising: 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 method according to any one of claims 1 to 11.

24. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-11.

25. A computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • System for virtual fitting service based on body size

    KR1020230043343A

  • Method and system for simulating superimposition of a non-linearly stretchable object upon a base object using representative images

    US20120127199A1