Line special effect processing method and device, electronic equipment, storage medium and product
By collecting object contour points in the image and performing point expansion processing, a texture curve is generated and mapped to the special effects line box, which solves the problems of gaps and unevenness at the transition of line effects, and achieves higher accuracy and smoothness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FACE CUTE CO LTD
- Filing Date
- 2022-03-08
- Publication Date
- 2026-06-02
AI Technical Summary
In existing technologies, when constructing line effects using human body feature points, there are problems such as gaps at transitions and uneven lines, resulting in low accuracy of line effects and poor display effects.
The process involves acquiring object contour points from the image to be processed, performing point expansion processing to obtain multiple vertices, generating texture curves for adjacent vertices, using the texture curves to generate special effect line frames, and mapping them onto the image to achieve accurate special effect line settings for the object contour.
The accuracy of line effects settings has been improved, avoiding gaps and unevenness at transition points, thus enhancing the display effect.
Smart Images

Figure CN114596383B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus, electronic device, storage medium, and product for processing line effects. Background Technology
[0002] With the rapid development of live streaming and short video platforms, video effects are being used more and more widely. Among these, constructing line effects based on human body feature points is a common rendering technique. A common approach involves dynamically building a suitable strip model using human feature points and then smoothing the width and curve of the strip to obtain the effect lines. However, line effects constructed in this way often suffer from gaps and unevenness at transitions, resulting in low accuracy and poor display quality. Summary of the Invention
[0003] This disclosure provides a method, apparatus, electronic device, storage medium, and product for processing line effects, in order to overcome the technical problems of gaps and uneven lines at the transition points of line effects, which result in low accuracy and poor display effects of line effects.
[0004] In a first aspect, embodiments of this disclosure provide a method for processing line effects, including:
[0005] Collect multiple contour points formed by the object contour of the target object in the image to be processed;
[0006] Perform point expansion processing on multiple contour points to obtain multiple vertices;
[0007] At least one texture curve is generated based on pairs of adjacent vertices among the plurality of vertices;
[0008] Using at least one of the texture curves, generate a special effect line frame;
[0009] The special effect line frame is mapped onto the image to be processed to obtain the target image corresponding to the image to be processed.
[0010] Secondly, embodiments of this disclosure provide a line effect processing device, comprising:
[0011] The contour acquisition unit is used to acquire multiple contour points formed by the object contour of the target object in the image to be processed.
[0012] A vertex expansion unit is used to perform point expansion processing on multiple contour points to obtain multiple vertices;
[0013] A curve generation unit is used to generate at least one texture curve based on pairs of adjacent vertices among the plurality of vertices;
[0014] The special effects generation unit is used to generate a special effects line frame using at least one of the texture curves;
[0015] The line mapping unit is used to map the special effect line frame to the image to be processed, so as to obtain the target image corresponding to the image to be processed.
[0016] Thirdly, embodiments of this disclosure provide an electronic device, including: a processor and a memory;
[0017] The memory stores computer-executed instructions;
[0018] The processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the line effect processing method as described in the first aspect and various possible designs of the first aspect.
[0019] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the line effect processing method described in the first aspect and various possible designs of the first aspect.
[0020] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the line effect processing method described in the first aspect and various possible designs of the first aspect.
[0021] The pop-up display method provided in this embodiment, after acquiring multiple contour points formed by the object contour of the target object in the image to be processed, can perform point expansion processing on the multiple contour points to obtain multiple vertices. These multiple vertices form the basis for constructing special effect lines. Through these multiple vertices, texture curves corresponding to each pair of adjacent vertices can be generated to obtain at least one curve. This at least one curve can be at least one curve surrounding the object contour of the target object. Based on at least one texture curve, a special effect line frame can be generated, achieving accurate generation of the special effect line frame for the object contour. After obtaining the special effect line frame, it can be mapped to the image to be processed to obtain the target image corresponding to the image to be processed, realizing effective and accurate setting of the special effect lines for the image to be processed, and improving the accuracy of line effect setting. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 A system architecture diagram of a line effect processing method provided in this disclosure embodiment;
[0024] Figure 2 A flowchart illustrating a line effect processing method provided in this embodiment of the disclosure;
[0025] Figure 3 An example diagram of contour point expansion provided in an embodiment of this disclosure;
[0026] Figure 4 Another flowchart of a line effect processing method provided in this disclosure embodiment;
[0027] Figure 5 Another flowchart of a line effect processing method provided in this disclosure embodiment;
[0028] Figure 6 A schematic diagram of a line effect processing device provided in this embodiment of the present disclosure;
[0029] Figure 7 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0031] The technical solution disclosed herein can be applied to video playback scenarios, including live videos, short videos, and audio-visual videos. By performing contour point detection and expansion on the images in the video, a wider range of vertices can be obtained. This allows for the generation of texture curves using more vertices, resulting in more accurate special effects line frames. This enables continuous and smooth display of special effects lines, improving the accuracy and effect of the display.
[0032] In related technologies, special effects lines are typically constructed based on human body feature points. Usually, a strip model can be directly constructed from the detected human feature points, and the special effects lines can be obtained by smoothing the width and curves of the strip model. However, this method of directly constructing strip models using human feature points results in numerous gaps and uneven lines, leading to low accuracy and poor display quality.
[0033] To solve the above-mentioned technical problems, the inventors considered expanding the collected feature points to obtain more vertices. With more vertices, the lines can be expanded. By expanding the lines, special effect lines that better match the object's outline can be obtained, thus improving the precision and accuracy of the special effect lines.
[0034] In the embodiments of this disclosure, after acquiring multiple contour points formed by the object contour of the target object in the image to be processed, point expansion processing can be performed on the multiple contour points to obtain multiple vertices. These multiple vertices form the basis for constructing special effect lines. Texture curves corresponding to adjacent vertices can be generated from these multiple vertices to obtain at least one curve. This at least one curve can be at least one curve surrounding the object contour of the target object. Based on at least one texture curve, a special effect line frame can be generated, achieving accurate generation of the special effect line frame for the object contour. After obtaining the special effect line frame, it can be mapped to the image to be processed to obtain the target image corresponding to the image to be processed, achieving effective and accurate setting of the special effect lines for the image to be processed, and improving the accuracy of line effect setting.
[0035] The technical solutions of this disclosure and how they solve the aforementioned technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0036] Figure 1 This is a network architecture diagram based on the line effect processing method of this disclosure. The application network architecture according to embodiments of this disclosure may include an electronic device and a client connected to the electronic device via a local area network (LAN) or wide area network (WAN). It is assumed that the electronic device can be a personal computer, a regular server, a supercomputer, a cloud server, or other similar server; this disclosure does not impose excessive limitations on the specific type of electronic device. The client can be, for example, a mobile phone, tablet computer, personal computer, smart home appliance, wearable device, or other terminal device; this disclosure does not impose excessive limitations on the specific type of client. Figure 1As shown, taking cloud server 1 as an electronic device and mobile phone 21 and tablet computer 22 as user devices 2, either user device can send a request to cloud server 1 to play line effects. Cloud server 1 can obtain the target video sent by the user device and capture the image to be processed from the target video. After setting the effect line frame on the image to be processed using this technical solution, the corresponding target image is obtained. After sending the target image to user device 2, it can be rendered and displayed on user device 2.
[0037] certainly, Figure 1 The example shown illustrates that electronic device 1 and user device 2 are different devices. In practical applications, electronic device 1 and user device 2 can be the same device, such as mobile phones. The mobile phone can be configured with this technical solution to directly set special effects lines for the played video.
[0038] refer to Figure 2 , Figure 2 A flowchart of one embodiment of a special effects line processing method provided by this disclosure is shown. The method may include the following steps:
[0039] 201: Collect multiple contour points formed by the object contour of the target object in the image to be processed.
[0040] Optionally, the image to be processed can be an image captured from a video. This video can include live streams, short videos, and other similar types. The target object can refer to objects such as people, scenery, items, or vehicles in the image to be processed, especially faces. The object contour can refer to the edge lines formed by the shape of the target object, especially the contours of a face and facial features in the image. Multiple contour points can refer to the key points formed when the object contour is created. Connecting multiple contour points forms the object contour.
[0041] In this example, when the target object refers to a face or facial features, acquiring multiple contour points formed by the object's outline in the image to be acquired can include: identifying multiple contour points formed by the object's outline in the image based on a human key boundary recognition algorithm; or using a skeletal positioning and tracking algorithm to identify multiple contour points formed by the object's outline in the image.
[0042] 202: Perform point expansion processing on multiple contour points to obtain multiple vertices.
[0043] Multiple vertices can be obtained by expanding contour points. A contour point can expand one or more vertices.
[0044] 203: Generate at least one texture curve based on pairs of adjacent vertices among multiple vertices.
[0045] Texture curves can be obtained from pairs of adjacent vertices. Connecting pairs of adjacent vertices yields a line segment; connecting pairs of adjacent vertices from multiple vertices yields multiple line segments. Connecting two line segments and smoothing the lines yields a texture curve; connecting two adjacent line segments from multiple line segments and smoothing the lines yields at least one texture curve.
[0046] Texture curves can be set with curve colors and light curve attributes, and have a certain texture.
[0047] 204: Use at least one texture curve to generate a special effect line frame.
[0048] The special effects line frame can be generated from at least one texture curve. At least one texture curve can be joined to obtain a continuous curve, and this continuous curve can be smoothed to obtain a smooth curve. Mapping the smooth curve onto the wireframe model yields the curved line frame. After applying special effects to the curved line frame, the special effects line frame is obtained.
[0049] 205: Map the special effect line frame to the image to be processed to obtain the target image corresponding to the image to be processed.
[0050] Optionally, mapping the effect line frame to the image to be processed to obtain the target image corresponding to the image to be processed may include: mapping the effect line frame to the object outline of the target object in the image to be processed, matching the effect line frame with the object outline, and obtaining the target image corresponding to the image to be processed.
[0051] In the embodiments of this disclosure, after acquiring multiple contour points formed by the object contour of the target object in the image to be processed, point expansion processing can be performed on the multiple contour points to obtain multiple vertices. These multiple vertices form the basis for constructing special effect lines. Texture curves corresponding to adjacent vertices can be generated from these multiple vertices to obtain at least one curve. This at least one curve can be at least one curve surrounding the object contour of the target object. Based on at least one texture curve, a special effect line frame can be generated, achieving accurate generation of the special effect line frame for the object contour. After obtaining the special effect line frame, it can be mapped to the image to be processed to obtain the target image corresponding to the image to be processed, achieving effective and accurate setting of the special effect lines for the image to be processed, and improving the accuracy of line effect setting.
[0052] As one example, performing point expansion processing on multiple contour points to obtain multiple vertices may include:
[0053] Connect two contour points that satisfy the adjacent condition among multiple contour points to obtain at least one contour line segment;
[0054] Based on the line width, determine the extended line segments corresponding to the contour line segments to obtain at least one extended line segment corresponding to each contour line segment.
[0055] Using the extended line segments corresponding to at least one contour line segment, the two endpoints of the extended line segment are determined as two extended points, so as to obtain multiple extended points formed by the two extended points corresponding to at least one extended line segment.
[0056] Multiple contour points and multiple extension points are deduplicated to obtain multiple vertices.
[0057] By expanding multiple contour points, multiple vertices can be obtained. The set of points corresponding to multiple vertices can represent multiple line segments. Multiple line segments can include at least one contour line segment and at least one extended line segment corresponding to each contour line segment.
[0058] The line width can be set to expand the width of the outline segment so that the width of the special effect line meets the requirements of the special effect line.
[0059] In this embodiment of the disclosure, when performing point expansion processing on multiple contour points, two points among the multiple contour points that satisfy the adjacent condition can be connected first. By connecting the contour points, the contour of the target object can be accurately connected to obtain at least one contour line segment. Based on the line width, the corresponding expansion line segment can be determined, obtaining the expansion line segment corresponding to each of the at least one contour line segment. Using the expansion line segment corresponding to each of the at least one contour line segment, the two endpoints of the expansion line segment can be determined as two expansion points. Using the contour line segment as the expansion basis, the line segment expansion of the special effect line is realized. Through the line segment expansion of the special effect line, expansion points that better match the special effect line can be obtained, realizing accurate expansion of points related to the special effect line, improving expansion precision and accuracy.
[0060] In one possible design, determining the extended line segment corresponding to the outline line segment based on the line width can include:
[0061] Detect whether the two vertices corresponding to the contour line segment include the tail point;
[0062] If the tail point is included, then for the non-tail points of the two vertices, draw a perpendicular line to the contour line segment according to the line width, and determine the other end point of the perpendicular line as the extension point corresponding to the contour line segment.
[0063] The line segment formed by connecting the extension point and the tail point is determined to be the extension line segment corresponding to the contour line segment;
[0064] If the tail point is not included, then draw perpendicular lines to the two contour points of the contour line segment according to the line width, and determine the line segment formed by the other endpoints of the two perpendicular lines as the extended line segment.
[0065] The tail point can refer to the two endpoints of a contour. For ease of understanding, as... Figure 3 As shown, in Figure 3 The multiple contour points shown can be labeled as 301-305, where contour points 301 and 305 can refer to the tail points of the contour. Contour points 302-304 can be non-tail points of the contour.
[0066] When expanding a non-tail point, you can directly draw a perpendicular line along the line width to obtain the corresponding expansion point. When expanding a tail point, you can directly connect the expansion point to the contour point to obtain the corresponding expansion line segment. (Reference) Figure 3 For the line segments with one tail point 301 and one non-tail point 302, draw perpendicular lines to each other. The other endpoints of these two perpendicular lines, 306 and 307, are both extension points. Connecting these two extension points forms the extension line segments of the outline segments of 302 and 303. For a line segment with one tail point 301 and one non-tail point 302, draw a perpendicular line from the non-tail point to the outline segment according to the line width. The other endpoint of this perpendicular line, 308, is the extension point. Connecting the tail point 305 and the extension point 308 forms the corresponding extension line segment. Extension points 306 and 308 are also adjacent endpoints; connecting 306 and 308 also yields the corresponding extension line segment. It should be noted that... Figure 3 The diagram shows extension points 306-308; other extension points are not shown. Figure 3 The extension points shown are merely illustrative and should not constitute a specific limitation on the number and manner of extension of contour points.
[0067] Of course, in some embodiments, for both tail points and non-tail points among the vertices, a perpendicular line can be drawn directly along the line width, and the other end of the perpendicular line will be an extension point. Connecting two extension points will yield an extension line segment. At the same time, connecting the tail point to its extension point will yield the corresponding extension line segment.
[0068] In this embodiment, it is detected whether the two vertices corresponding to the contour line segment include a tail point. If a tail point is included, a perpendicular line can be drawn from the non-tail point of the two vertices according to the line width, and the other end of the perpendicular line is the extension point of the contour line segment. The length of the perpendicular line is the line width. By using a perpendicular line, the contour point can be translated, and the line segment formed by connecting the extension point and the tail point is the extension line segment of the contour line segment. If a tail point is not included, perpendicular lines can be drawn from the two contour points of the contour line segment according to the line width, and the line segment formed by the other ends of the two perpendicular lines is the extension line segment. By detecting the tail point of the two vertices of the contour line segment, when a tail point exists, a special line segment extension for the tail point can be achieved. The line segment connecting the other ends of the perpendicular lines corresponding to the tail point and the non-tail point is used as the extension line segment, achieving targeted line segment extension for the tail point. If a tail point is not included, the corresponding extension line segment can be obtained by direct translation, achieving the width extension of the special effect line. By detecting the tail point and the non-tail point, the special effect line can be accurately extended, improving the extension efficiency and accuracy.
[0069] To achieve smoother special effects lines, the intersection points between two line segments can be smoothed. For example... Figure 4 The diagram shown is a flowchart of another embodiment of a special effects line processing method provided in this disclosure. The method may include the following steps:
[0070] 401: Collect multiple contour points formed by the object contour of the target object in the image to be processed.
[0071] Some steps in this embodiment are the same as some steps in the previous embodiments, and for the sake of brevity, they will not be repeated here.
[0072] 402: Perform point expansion processing on multiple contour points to obtain multiple vertices.
[0073] 403: Determine multiple line segments corresponding to multiple vertices.
[0074] Optionally, multiple line segments may include at least one outline line segment and at least one extended line segment. Multiple line segments corresponding to multiple vertices can also be obtained by connecting two vertices among the multiple vertices that satisfy the connection conditions. Furthermore, multiple line segments may also include line segments formed by connecting two adjacent extended points. Multiple line segments can be obtained by connecting pairwise adjacent vertices among the multiple vertices.
[0075] 404: Calculate the intersection point of any two line segments that meet the line segment intersection condition from multiple line segments, and obtain the intersection point corresponding to at least one group of line segments from the multiple line segments.
[0076] 405: Based on any group of line segments, perform intersection smoothing on the two line segments and their intersection points to obtain the smooth curve corresponding to the group of line segments.
[0077] Smoothing the intersection of two line segments can create a smooth curve between the two line segments and their connecting lines, thus obtaining a smooth curve for the line segment group.
[0078] Obtain smooth curves corresponding to at least one line segment group.
[0079] 406: Set the line segment properties for the smooth curve of the line segment group to obtain the texture curve of each of at least one line segment group after the property setting is completed.
[0080] Setting line segment attributes for a smooth curve of a line segment group to obtain a texture curve after attribute settings are completed can include: calling a line position setting function to set the curve position of the smooth curve. The curve position can be represented by vertices within the curve. To facilitate accurate setting of the curve position, a Mesh (network) from Unity (the game engine) can be used to record the curve position. A mesh is a data structure that can record information such as vertices and vertex indices. Afterwards, the curve corners of the smooth curve can be set, and the curve position, width, and color can also be set separately. Upon completion of the settings, a refresh mechanism can be triggered, setting the refresh flag to true. After the settings are complete, the texture curve generation step can be initiated. Specifically, when the refresh flag is true, the line construction interface can refresh the vertex data and vertex index data of the input `mseh`, specifically refreshing the vertex position, color, UV (image horizontal and vertical axis coordinates) and other attributes to complete the texture curve generation.
[0081] 407: Generate special effect line frames using at least one texture curve.
[0082] 408: Map the special effect line frame to the image to be processed to obtain the target image corresponding to the image to be processed.
[0083] In this embodiment, by determining the intersection point, the connection point of two line segments can be smoothed to obtain a smooth curve corresponding to the two line segments. This smooth curve can include two intersecting line segments, thus achieving a smooth connection of the line segments. By setting the line segment attributes of the smooth curves corresponding to at least one group of line segments, at least one texture curve can be obtained after the attribute settings are completed. The at least one texture curve can be two line segments connected by a smooth curve. After all line segment groups obtain their corresponding smooth curves, the initial connection of all line segments can be completed. Subsequently, after setting the line segment attributes of the smooth curves of each group of line segments, the main lines of the special effect lines can be obtained, and the obtained at least one texture curve can be used to generate the special effect line frame. By determining the intersection point of two connectable line segments and connecting the two line segments by a smooth curve, the curves of the line segments can be made smoother, resulting in a better display effect.
[0084] As one embodiment, line segment attributes are set on the smooth curve of a group of line segments to obtain the texture curve of each of at least one group of line segments after the attribute setting is completed, including:
[0085] Set the color and / or width attributes of the smooth curve of the line segment group to obtain the texture curve of at least one line segment group after the attribute setting is completed.
[0086] Texture curves can be smooth curves with color and / or width attributes set.
[0087] The settings for the curve's color and / or width attributes can be found in the descriptions in the above embodiments, and will not be repeated here.
[0088] In this embodiment of the disclosure, by setting color attributes and / or width attributes for the smooth curve, the color or width of the smooth curve can be accurately set, and the color and width of the obtained texture curve are more in line with the actual usage requirements, thus enabling accurate setting of the texture curve.
[0089] In one possible design, generating an effect line frame using at least one texture curve could include:
[0090] Map at least one texture curve to the line box model to obtain the curve line box corresponding to the object outline;
[0091] Set rendering properties for the area corresponding to the curved line frame to obtain the special effect line frame.
[0092] The lineframe model can be a pre-defined lineframe control. At least one texture curve can be mapped to the lineframe model. The texture curve can be represented by information such as the vertex set and vertex index defined in the Mesh. Rendering attributes can include using special effects functions, such as HDR (High-Dynamic Range) and BLOOM (full-screen bloom) functions, to achieve bloom and other selectable rendering attributes, resulting in a lineframe with special effects.
[0093] In this embodiment of the disclosure, at least one texture curve can be mapped onto a line frame model to obtain a curved line frame corresponding to the object outline. By setting rendering attributes for the line frame area corresponding to the curved line frame, the rendering settings for the curved line frame can be completed, and a special effect line frame with rendering effects can be obtained, thus completing the effective acquisition of the rendered lines.
[0094] In one possible design, mapping the special effects outline to the image to be processed to obtain the target image corresponding to the image to be processed can include:
[0095] Determine the image positions of multiple contour points in the image to be processed.
[0096] And determine the corresponding wireframe positions of multiple contour points within the special effects line frame.
[0097] By matching the wireframe positions corresponding to multiple contour points with the image positions, the positional matching relationships of multiple contour points can be obtained.
[0098] Based on the positional matching relationship of multiple contour points, the special effect line box is mapped onto the image to be processed, and the target image corresponding to the image to be processed is obtained when the special effect line box mapping ends.
[0099] Multiple contour points can each correspond to an image position in the image to be processed. These contour points also correspond to specific wireframe positions within the special effects line boxes. By matching the image position of any contour point in the image to its wireframe position, the positional matching relationship for that contour point can be obtained. Through this positional matching, the special effects line boxes can be mapped onto the image to be processed, thus obtaining the target image corresponding to the image to be processed.
[0100] In this embodiment, after determining the image positions of multiple contour points in the image to be processed and their wireframe positions within the special effects line frame, the image positions of the contour points can be mapped one-to-one with the wireframe positions. This allows the special effects line frame to be mapped to the corresponding image positions according to the wireframe positions of the multiple contour points, resulting in the target image at the end of the mapping. By mapping the image positions to the wireframe positions, accurate mapping from the special effects line frame to the image to be processed can be achieved, obtaining an accurate target image.
[0101] In one possible design, after obtaining the target image corresponding to the image to be processed at the end of the special effects line box mapping, the process also includes:
[0102] The position of the special effect line box in the target image is corrected to obtain the corrected target image.
[0103] Optionally, correcting the position of the special effects line box may include correcting the vertex position, vertex angle, vertex direction, vertex normal, and / or vertex UV0-3 of multiple vertices corresponding to the special effects line box in the image. Here, UV0-3 can refer to the image's coordinates in the horizontal and vertical directions of the display, with values between 0 and 3, i.e., the U-th pixel in the horizontal direction / image width, and the V-th pixel in the vertical direction / image height.
[0104] In this embodiment of the disclosure, after mapping the special effect line box to the image to be processed, the position of the special effect line box in the target image can be corrected. The position of the special effect line box can be matched more accurately with the image, and the target image after correction is more accurate.
[0105] In practical applications, the image to be processed can be captured from a target video played on a user device. For example... Figure 5 The diagram shown is a flowchart of another embodiment of a line effect processing method provided by this disclosure. The method may include the following steps:
[0106] 501: During the playback of the target video by the user device, receive a line effect processing request sent by the user device for the target video.
[0107] The user device can play the target video. The target video can be a live video. Line effect processing controls can be set in the video player or playback page. The user watches the target video through their device. The user device can detect the user's line setting requests for the line effect processing controls. These line setting requests can then initiate line effect processing on the target video.
[0108] 502: In response to a line effect processing request, obtain the timestamp of the line effect processing request being initiated.
[0109] 503: Based on timestamps, acquire the corresponding images to be processed from the target video according to the acquisition frequency.
[0110] The timestamp can be obtained from the target video timestamp or from the system timer.
[0111] 504: Collects multiple contour points formed by the object contour of the target object in the image to be processed.
[0112] 505: Perform point expansion processing on multiple contour points to obtain multiple vertices.
[0113] 506: Generate at least one texture curve based on pairs of adjacent vertices among multiple vertices.
[0114] 507: Use at least one texture curve to generate a special effect line frame.
[0115] 508: Map the special effect line frame to the image to be processed to obtain the target image corresponding to the image to be processed.
[0116] 509: When the user device plays the image to be processed, render the target image corresponding to the special effect line frame according to the rendering attributes corresponding to the special effect line frame.
[0117] 510: Controls the display of the rendered target image on the user device.
[0118] Controlling the rendering of a target image by a user device may include sending rendering instructions for the target image to the user device. Upon receiving the rendering instructions, the user device can respond by rendering the target image. In this disclosure, the user device and the electronic device can be the same device or different devices. This disclosure does not impose excessive limitations on the connection and assembly methods of the user device and the electronic device. For example, the user device can be a mobile phone, and the electronic device can be a cloud server. Where the user device has strong processing power, the technical solution of this disclosure can also be directly configured in the user device. For example, when the user device is a computer, the technical solution of this disclosure can be directly configured in the computer, and the computer can perform the specific rendering of the target image.
[0119] Some steps in this embodiment are the same as some steps in the previous embodiments, and for the sake of brevity, they will not be repeated here.
[0120] In this embodiment, during the playback of a target video by a user device, a line effect processing request sent by the user device for the target video can be received. In response to this line effect processing request, the timestamp of the request can be obtained. Based on this timestamp, the corresponding image to be processed is acquired from the target video according to the acquisition frequency. After setting the effect lines on the image to be processed and obtaining the target image, when the user device plays the video to be processed, the target image corresponding to the effect line frame is rendered according to the rendering attributes corresponding to the effect line frame, so as to display the rendered target image. By detecting the user's line effect processing request, corresponding effect lines can be set for the image to be processed in the target video, achieving accurate setting of the effect lines, improving the setting effect and accuracy of the effect lines. Through interaction with the user device, the rendered target image is displayed, improving the smoothness of the effect lines, avoiding gaps and other phenomena, and improving the display accuracy of the effect lines.
[0121] like Figure 6 The diagram shown is a structural schematic of one embodiment of a line effect processing device provided in this disclosure. The line effect processing device 600 may include the following units:
[0122] Contour acquisition unit 601: Used to acquire multiple contour points formed by the object contour of the target object in the image to be processed.
[0123] Vertex expansion unit 602: used to perform point expansion processing on multiple contour points to obtain multiple vertices.
[0124] Curve generation unit 603: used to generate at least one texture curve based on pairs of adjacent vertices among a plurality of vertices.
[0125] Effects generation unit 604: Used to generate effect line frames using at least one texture curve.
[0126] Line mapping unit 605: used to map the special effect line frame to the image to be processed, so as to obtain the target image corresponding to the image to be processed.
[0127] In the embodiments of this disclosure, after acquiring multiple contour points formed by the object contour of the target object in the image to be processed, point expansion processing can be performed on the multiple contour points to obtain multiple vertices. These multiple vertices form the basis for constructing special effect lines. Texture curves corresponding to adjacent vertices can be generated from these multiple vertices to obtain at least one curve. This at least one curve can be at least one curve surrounding the object contour of the target object. Based on at least one texture curve, a special effect line frame can be generated, achieving accurate generation of the special effect line frame for the object contour. After obtaining the special effect line frame, it can be mapped to the image to be processed to obtain the target image corresponding to the image to be processed, achieving effective and accurate setting of the special effect lines for the image to be processed, and improving the accuracy of line effect setting.
[0128] As one embodiment, the vertex expansion unit includes:
[0129] The line segment generation module is used to connect two contour points that meet the adjacent conditions among multiple contour points to obtain at least one contour line segment.
[0130] The line segment extension module is used to determine the extension line segment corresponding to the outline line segment based on the line width, so as to obtain the extension line segment corresponding to at least one outline line segment respectively.
[0131] The endpoint determination module is used to determine the two endpoints of the extension line segment as two extension points by using the extension line segment corresponding to at least one contour line segment, so as to obtain multiple extension points formed by the two extension points corresponding to at least one extension line segment.
[0132] The vertex determination module is used to obtain multiple vertices by deduplicating multiple contour points and multiple extension points.
[0133] In one possible design, the line segment extension module includes:
[0134] The tail point detection subunit is used to detect whether the two vertices corresponding to the contour line segment include the tail point.
[0135] The first processing subunit is used to, if the tail point is included, draw a perpendicular line to the contour line segment for the non-tail points of the two vertices according to the line width, and determine the other end point of the perpendicular line as the extension point corresponding to the contour line segment; and determine the line segment formed by connecting the extension point and the tail point as the extension line segment corresponding to the contour line segment.
[0136] The second processing subunit is used to draw perpendicular lines to the contour line segment from the two contour points of the contour line segment according to the line width, if the tail point is not included, and determine the line segment formed by the other endpoints of the two perpendicular lines as the extended line segment.
[0137] As another embodiment, the curve generation unit includes:
[0138] The line segment determination module is used to determine multiple line segments corresponding to multiple vertices;
[0139] The intersection point determination module is used to calculate the intersection point of any two line segments that meet the line segment intersection conditions among multiple line segments, and obtain the intersection points corresponding to at least one group of line segments among multiple line segments.
[0140] The curve smoothing module is used to perform intersection smoothing on two line segments and their intersection points based on any line segment group, to obtain the smooth curve corresponding to the line segment group.
[0141] The attribute setting module is used to set the line segment attributes for the smooth curve of the line segment group, so as to obtain the texture curve of at least one line segment group after the attribute setting is completed.
[0142] In some embodiments, the attribute setting module includes:
[0143] The attribute setting submodule is used to set the color and / or width attributes of the smooth curve of the line segment group, and obtain the texture curve of each of at least one line segment group after the attribute setting is completed.
[0144] In one possible design, the special effects generation unit includes:
[0145] The line determination module is used to map at least one texture curve to the line box model to obtain the curve line box corresponding to the object outline.
[0146] The rendering settings module is used to set rendering properties for the line frame area corresponding to the curved line frame to obtain the special effect line frame.
[0147] In one possible design, the line mapping unit includes:
[0148] The first position module is used to determine the image positions of multiple contour points in the image to be processed;
[0149] The second position module is used to determine the position of the wireframe corresponding to multiple contour points in the special effect line frame;
[0150] The position matching module is used to match the wireframe positions corresponding to multiple contour points with the image positions to obtain the position matching relationship of multiple contour points.
[0151] The position mapping module is used to map the special effect line box onto the image to be processed based on the position matching relationship of multiple contour points, and obtain the target image corresponding to the image to be processed when the special effect line box mapping is completed.
[0152] In some embodiments, the line mapping unit further includes:
[0153] The position correction module is used to correct the position of the special effect line boxes in the target image to obtain the corrected target image.
[0154] In one possible design, the device also includes:
[0155] The request receiving unit is used to receive line effect processing requests sent by the user equipment for the target video during the playback of the target video.
[0156] The request-response unit is used to respond to the line effect processing request and obtain the timestamp of the line effect processing request being initiated.
[0157] The image acquisition unit is used to acquire corresponding images to be processed from the target video according to the acquisition frequency based on the timestamp;
[0158] The image rendering unit is used to detect when the user device plays the image to be processed, and to render the target image corresponding to the special effect line frame according to the rendering attributes corresponding to the special effect line frame.
[0159] The image display unit is used to control the user device to display the rendered target image.
[0160] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.
[0161] To implement the above embodiments, this disclosure also provides an electronic device.
[0162] refer to Figure 7 The diagram illustrates a structural schematic of an electronic device 700 suitable for implementing embodiments of the present disclosure. The electronic device 70 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0163] like Figure 7As shown, the electronic device 700 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0164] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 700 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0165] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 709, or installed from storage device 708, or installed from ROM 702. When the computer program is executed by processing device 701, it performs the functions defined in the methods of embodiments of this disclosure.
[0166] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0167] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0168] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
[0169] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0170] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0171] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".
[0172] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0173] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0174] In a first aspect, according to one or more embodiments of this disclosure, a method for processing line effects is provided, comprising:
[0175] Collect multiple contour points formed by the object contour of the target object in the image to be processed;
[0176] Multiple contour points are expanded to obtain multiple vertices;
[0177] Based on multiple vertices, generate texture curves corresponding to each pair of adjacent vertices to obtain at least one texture curve;
[0178] Generate special effect line frames using at least one texture curve;
[0179] Map the special effects line frame to the image to be processed to obtain the target image corresponding to the image to be processed.
[0180] According to one or more embodiments of this disclosure, point expansion processing is performed on multiple contour points to obtain multiple vertices, including:
[0181] Connect two contour points that satisfy the adjacent condition among multiple contour points to obtain at least one contour line segment;
[0182] Based on the line width, determine the extended line segments corresponding to the contour line segments to obtain at least one extended line segment corresponding to each contour line segment.
[0183] Using the extended line segments corresponding to at least one contour line segment, determine the two endpoints of the extended line segment as two extended points, so as to obtain multiple extended points formed by the two extended points corresponding to at least one extended line segment.
[0184] Multiple vertices are obtained by removing duplicates from multiple contour points and multiple extension points.
[0185] According to one or more embodiments of this disclosure, determining the extended line segment corresponding to the contour line segment based on the line width includes:
[0186] Detect whether the two vertices corresponding to the contour line segment include the tail point;
[0187] If the tail point is included, then for the non-tail points of the two vertices, draw a perpendicular line to the contour line segment according to the line width, and obtain the other end of the perpendicular line as the extension point corresponding to the contour line segment.
[0188] The line segment formed by connecting the extension point and the tail point is determined to be the extension line segment corresponding to the contour line segment;
[0189] If the tail point is not included, then draw perpendicular lines to the two contour points of the contour line segment according to the line width, and obtain the line segment formed by the other endpoints of the two perpendicular lines as the extended line segment.
[0190] According to one or more embodiments of this disclosure, texture curves corresponding to each pair of vertices are generated based on multiple vertices to obtain multiple texture curves, including:
[0191] Determine multiple line segments corresponding to multiple vertices;
[0192] For any two line segments that meet the line segment intersection condition among multiple line segments, calculate the line segment intersection point to obtain the intersection point corresponding to at least one group of line segments among the multiple line segments;
[0193] Based on any group of line segments, perform intersection smoothing on the two line segments and their intersection points to obtain the smooth curve corresponding to the group of line segments, so as to obtain at least one smooth curve corresponding to each group of line segments.
[0194] Set the line segment attributes for the smooth curves corresponding to at least one group of line segments to obtain at least one texture curve after the attribute setting is completed.
[0195] According to one or more embodiments of this disclosure, line segment attributes are set for smooth curves corresponding to at least one group of line segments to obtain at least one texture curve after the attribute setting is completed, including:
[0196] Determine the smooth curve corresponding to at least one group of line segments to obtain at least one smooth curve;
[0197] Set the color and / or width attributes of at least one smooth curve in sequence to obtain at least one texture curve at the end of the attribute setting.
[0198] According to one or more embodiments of this disclosure, generating a special effects line frame using at least one texture curve includes:
[0199] Map at least one texture curve to the line box model to obtain the curve line box corresponding to the object outline;
[0200] Set rendering properties for the area corresponding to the curved line frame to obtain the special effect line frame.
[0201] According to one or more embodiments of this disclosure, mapping a special effects line frame to an image to be processed to obtain a target image corresponding to the image to be processed includes:
[0202] Determine the image positions of multiple contour points in the image to be processed;
[0203] Determine the positions of multiple outline points within the special effects line frame;
[0204] The positional matching relationship of multiple contour points is obtained by matching the wireframe positions corresponding to the image positions of the multiple contour points.
[0205] Based on the positional matching relationship of multiple contour points, the special effect line box is mapped onto the image to be processed, and the target image corresponding to the image to be processed is obtained when the special effect line box mapping ends.
[0206] According to one or more embodiments of this disclosure, after obtaining the target image corresponding to the image to be processed at the end of the special effects line box mapping, the method further includes:
[0207] The position of the special effect line box in the target image is corrected to obtain the corrected target image.
[0208] According to one or more embodiments of this disclosure, before acquiring multiple contour points formed by the object contour of a target object in the image to be processed, the method further includes:
[0209] While the user device is playing the target video, receive the line effect processing request sent by the user device for the target video;
[0210] In response to a line effect processing request, obtain the timestamp of the line effect processing request being initiated.
[0211] Based on timestamps, corresponding images to be processed are collected from the target video according to the collection frequency;
[0212] Mapping the special effects outline to the image to be processed yields the target image corresponding to the image to be processed. This process also includes:
[0213] When the user device plays the image to be processed, render the target image corresponding to the special effect line frame according to the rendering attributes corresponding to the special effect line frame;
[0214] Control the user device to display the rendered target image.
[0215] Secondly, according to one or more embodiments of this disclosure, a line effect processing device is provided, comprising:
[0216] The contour acquisition unit is used to acquire multiple contour points formed by the object contour of the target object in the image to be processed.
[0217] Vertex expansion unit is used to expand multiple contour points to obtain multiple vertices;
[0218] The curve generation unit is used to generate texture curves corresponding to each pair of adjacent vertices based on multiple vertices, thereby obtaining at least one texture curve;
[0219] The special effects generation unit is used to generate special effects line frames using at least one texture curve;
[0220] The line mapping unit is used to map the special effect line frame to the image to be processed, thereby obtaining the target image corresponding to the image to be processed.
[0221] Thirdly, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;
[0222] The memory stores the instructions that the computer executes;
[0223] At least one processor executes computer execution instructions stored in memory, causing at least one processor to perform the line effect processing method as described in the first aspect above and various possible designs of the first aspect.
[0224] Fourthly, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, which stores computer-executable instructions that, when executed by a processor, implement the line effect processing method of the first aspect and various possible designs of the first aspect.
[0225] Fifthly, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the line effect processing method as described in the first aspect above and various possible designs of the first aspect.
[0226] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0227] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0228] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for processing line effects, characterized in that, include: Collect multiple contour points formed by the object contour of the target object in the image to be processed; Perform point expansion processing on multiple contour points to obtain multiple vertices; Based on the pairwise adjacent vertices among the multiple vertices, the pairwise adjacent vertices among the multiple vertices are connected to obtain multiple line segments. At least one texture curve is generated by connecting two adjacent line segments among the multiple line segments and by line smoothing. Using at least one of the texture curves, generate a special effect line frame; The special effect line frame is mapped to the image to be processed to obtain the target image corresponding to the image to be processed; The point expansion process for the plurality of contour points includes: Connect two contour points that satisfy the adjacent condition among the multiple contour points to obtain at least one contour line segment. Detect whether the two vertices corresponding to the contour line segment include the tail point; If the tail point is included, then draw a perpendicular line to the contour line segment for the non-tail points of the two vertices according to the line width, and determine the other end point of the perpendicular line as the extension point corresponding to the contour line segment. The line segment formed by connecting the extension point and the tail point is determined to be the extension line segment corresponding to the contour line segment; If the tail point is not included, then draw perpendicular lines to the contour line segment from the two contour points of the contour line segment according to the line width, and determine the line segment formed by the other endpoints of the two perpendicular lines as the extended line segment.
2. The method according to claim 1, characterized in that, The process of obtaining multiple vertices includes: Using at least one of the extended line segments corresponding to the outline line segments respectively, the two endpoints of the extended line segments are determined as two extended points, so as to obtain a plurality of extended points formed by the two extended points corresponding to at least one of the extended line segments respectively; The multiple contour points and the multiple extension points are deduplicated to obtain the multiple vertices.
3. The method according to claim 1 or 2, characterized in that, The process of connecting pairwise adjacent vertices among a plurality of vertices to obtain multiple line segments, and generating at least one texture curve by connecting two adjacent line segments and performing line smoothing, includes: Determine multiple line segments corresponding to multiple vertices; For any two line segments that satisfy the line segment intersection condition among multiple line segments, calculate the line segment intersection point to obtain the intersection point corresponding to at least one group of line segments among the multiple line segments; Based on any group of line segments, perform intersection smoothing on the two line segments and their intersection points of the group of line segments to obtain the smooth curve corresponding to the group of line segments. The smooth curves of the line segment groups are configured with line segment attributes to obtain the texture curves of at least one of the line segment groups after the attribute settings are completed.
4. The method according to claim 3, characterized in that, The step of setting line segment attributes for the smoothed curves of the line segment groups to obtain the texture curves of at least one of the line segment groups after the attribute setting is completed includes: Set the color and / or width attributes of the smooth curve of the line segment group to obtain the texture curve of at least one of the line segment groups after the attribute setting is completed.
5. The method according to claim 1, characterized in that, The step of generating a special effects line frame using at least one of the texture curves includes: At least one of the texture curves is mapped to the line frame model to obtain the curve line frame corresponding to the object outline; Set rendering properties for the line frame area corresponding to the curved line frame to obtain the special effect line frame.
6. The method according to claim 1, characterized in that, The step of mapping the special effect line frame to the image to be processed to obtain the target image corresponding to the image to be processed includes: Determine the image positions corresponding to the multiple contour points in the image to be processed; Determine the positions of the outline points corresponding to the line frames within the special effects line frames; The positions of the wireframes corresponding to the multiple contour points are matched with the image positions to obtain the position matching relationships of the multiple contour points. Based on the positional matching relationship of multiple contour points, the special effect line box is mapped onto the image to be processed, and the target image corresponding to the image to be processed is obtained when the special effect line box mapping ends.
7. The method according to claim 6, characterized in that, After obtaining the target image corresponding to the image to be processed at the end of the special effect line box mapping, the process further includes: The position of the special effect line frame in the target image is corrected to obtain the corrected target image.
8. The method according to claim 1, characterized in that, Before acquiring multiple contour points formed by the object contour of the target object in the image to be processed, the process further includes: During the playback of the target video on the user device, a line effect processing request sent by the user device for the target video is received; In response to the line effect processing request, obtain the timestamp of the line effect processing request being initiated; Based on the timestamp, corresponding images to be processed are collected from the target video according to the collection frequency; The process of mapping the special effect line frame to the image to be processed to obtain the target image corresponding to the image to be processed further includes: When the user device plays the image to be processed, the target image corresponding to the special effect line frame is rendered according to the rendering attribute corresponding to the special effect line frame; The user device is controlled to display the rendered target image.
9. A line effect processing device, characterized in that, include: The contour acquisition unit is used to acquire multiple contour points formed by the object contour of the target object in the image to be processed. A vertex expansion unit is used to perform point expansion processing on multiple contour points to obtain multiple vertices; The curve generation unit is used to connect two adjacent vertices among the multiple vertices to obtain multiple line segments, and to generate at least one texture curve by connecting two adjacent line segments among the multiple line segments and performing line smoothing processing. The special effects generation unit is used to generate a special effects line frame using at least one of the texture curves; A line mapping unit is used to map the special effect line frame to the image to be processed, thereby obtaining the target image corresponding to the image to be processed. A vertex expansion unit is used to connect two contour points that satisfy the adjacent condition among a plurality of contour points to obtain at least one contour line segment; and to detect whether the two vertices corresponding to the contour line segment include a tail point. If the tail point is included, then for the non-tail points of the two vertices, draw a perpendicular line to the contour line segment according to the line width, and determine the other endpoint of the perpendicular line as the extension point corresponding to the contour line segment; determine the line segment formed by connecting the extension point and the tail point as the extension line segment corresponding to the contour line segment; if the tail point is not included, then for the two contour points of the contour line segment, draw a perpendicular line to the contour line segment according to the line width, and determine the line segment formed by the other endpoints of the two perpendicular lines as the extension line segment.
10. An electronic device, characterized in that, include: Processor, memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, such that the processor is configured with the line effect processing method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the line effect processing method as described in any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that, The computer program is executed by a processor to be configured with the line effect processing method as described in any one of claims 1 to 8.