Image processing method, device, computer readable storage medium and computer equipment
By decoding and mapping multiple convex deformation parameters of the image to be processed, combined with sampling offset technology, the problem of poor convex deformation effect caused by single deformation processing is solved, better deformation effect and continuity are achieved, and improved deformation effect and continuity are improved. The overall effect of image processing.
Patent Information
- Application Number
- CN201911075972.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-06
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2040-02-11
AI Technical Summary
In the prior art, when acquiring convex deformation images, a single deformation process leads to a poor convex deformation effect, especially a single point enlargement near the center point, resulting in poor deformation effect.
By obtaining at least two convex deformation parameters of the image to be processed, decoding and mapping them, the target parameters are obtained, and then sampling and offsetting the pixel points to generate convex deformation images, and taking into account multiple parameters to control the deformation. Effects to avoid distortion and faults caused by a single dimension.
The deformation effect of the convex deformation image is improved, the continuity of the deformation area and the undeformed area is ensured, single point amplification near the center point is avoided, the diffusion area change ability of the deformation area is enhanced, and the convex deformation effect is significantly improved.
Smart Images

Figure CN112767235B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, apparatus, computer-readable storage medium and computer equipment. Background Art
[0002] With the development of image processing technology, various deformed images emerge one after another, such as convex deformed images.
[0003] However, the current method for obtaining convex deformation images is to use the convex height to treat the image, such as Figure 1 As shown in (a), a single deformation process is performed to obtain the corresponding convex deformation image, as shown in Figure 1 However, if only the convex height is used to perform a single deformation process on the image to be processed, the obtained convex deformation image will produce a single point magnification near the center point, resulting in a poor convex deformation effect of the obtained convex deformation image. Summary of the invention
[0004] Based on this, it is necessary to provide an image processing method, apparatus, computer-readable storage medium and computer equipment to address the technical problem that the convex deformation effect of the obtained convex deformation image is poor.
[0005] An image processing method, comprising:
[0006] Acquire an image to be processed and at least two convex deformation parameters of the image to be processed;
[0007] Decoding the image to be processed to obtain an image to be deformed;
[0008] Mapping each of the convex deformation parameters to obtain corresponding target parameters;
[0009] According to the target parameters, pixel points of the image to be deformed are sampled and offset to obtain a convex deformed image of the image to be processed.
[0010] In one embodiment, the method further comprises:
[0011] Obtaining an image identifier of a convex deformation image of the image to be processed;
[0012] The convex deformation image of the image to be processed is saved according to the image identifier.
[0013] A static image display method, comprising:
[0014] Displaying an image to be processed and a convex deformation option on an image editing interface; the convex deformation option has a corresponding deformation template file, and the deformation template file includes at least two convex deformation parameters;
[0015] receiving a trigger instruction for the convex deformation option;
[0016] In response to the trigger instruction, a convex deformation image of the image to be processed is displayed on the image preview interface; the convex deformation image is obtained by decoding the image to be processed to obtain the image to be deformed; each convex deformation parameter is mapped to obtain a corresponding target parameter; according to the target parameter, the pixel points of the image to be deformed are sampled and offset.
[0017] A video image display method, comprising:
[0018] Displaying the video image to be processed and the bulge deformation option on the video image editing page; the bulge deformation option has deformation template files corresponding to different time periods, and the deformation template file includes at least two bulge deformation parameters;
[0019] receiving a trigger instruction for the convex deformation option;
[0020] In response to the trigger instruction, a convex deformation video image of the video image to be processed is displayed on a video image preview page; the convex deformation video image is generated according to the deformation template files corresponding to different time periods and the video image to be processed.
[0021] An image processing device, comprising:
[0022] An image acquisition module, used to acquire an image to be processed and at least two convex deformation parameters of the image to be processed;
[0023] A decoding processing module, used for decoding the image to be processed to obtain an image to be deformed;
[0024] A mapping processing module, used for mapping each of the bulge deformation parameters to obtain corresponding target parameters;
[0025] The sampling and shifting module is used to perform sampling and shifting on the pixel points of the image to be deformed according to the target parameters to obtain a convex deformation image of the image to be processed.
[0026] A static image display device, the device comprising:
[0027] A first image display module, used for displaying the image to be processed and the convex deformation option on the image editing interface; the convex deformation option has a corresponding deformation template file, and the deformation template file includes at least two convex deformation parameters;
[0028] An instruction receiving module, used for receiving a trigger instruction for the convex deformation option;
[0029] The second image display module is used to respond to the trigger instruction and display the convex deformation image of the image to be processed on the image preview interface; the convex deformation image is obtained by decoding the image to be processed to obtain the image to be deformed; each convex deformation parameter is mapped to obtain the corresponding target parameter; according to the target parameter, the pixel points of the image to be deformed are sampled and offset.
[0030] A video image display device, the device comprising:
[0031] A first video image display module is used to display the video image to be processed and the bulge deformation option on the video image editing page; the bulge deformation option has a deformation template file corresponding to different time periods, and the deformation template file includes at least two bulge deformation parameters;
[0032] A trigger instruction receiving module, used for receiving a trigger instruction for the convex deformation option;
[0033] The second video image display module is used to respond to the trigger instruction and display the convex deformation video image of the video image to be processed on the video image preview page; the convex deformation video image is generated according to the deformation template files corresponding to different time periods and the video image to be processed.
[0034] A computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the following steps:
[0035] Acquire an image to be processed and at least two convex deformation parameters of the image to be processed;
[0036] Decoding the image to be processed to obtain an image to be deformed;
[0037] Mapping each of the convex deformation parameters to obtain corresponding target parameters;
[0038] According to the target parameters, pixel points of the image to be deformed are sampled and offset to obtain a convex deformed image of the image to be processed.
[0039] A computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the following steps:
[0040] Displaying an image to be processed and a convex deformation option on an image editing interface; the convex deformation option has a corresponding deformation template file, and the deformation template file includes at least two convex deformation parameters;
[0041] receiving a trigger instruction for the convex deformation option;
[0042] In response to the trigger instruction, a convex deformation image of the image to be processed is displayed on the image preview interface; the convex deformation image is obtained by decoding the image to be processed to obtain the image to be deformed; each convex deformation parameter is mapped to obtain a corresponding target parameter; according to the target parameter, the pixel points of the image to be deformed are sampled and offset.
[0043] A computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the following steps:
[0044] Displaying the video image to be processed and the bulge deformation option on the video image editing page; the bulge deformation option has deformation template files corresponding to different time periods, and the deformation template file includes at least two bulge deformation parameters;
[0045] receiving a trigger instruction for the convex deformation option;
[0046] In response to the trigger instruction, a convex deformation video image of the video image to be processed is displayed on a video image preview page; the convex deformation video image is generated according to the deformation template files corresponding to different time periods and the video image to be processed.
[0047] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the following steps:
[0048] Acquire an image to be processed and at least two convex deformation parameters of the image to be processed;
[0049] Decoding the image to be processed to obtain an image to be deformed;
[0050] Mapping each of the convex deformation parameters to obtain corresponding target parameters;
[0051] According to the target parameters, pixel points of the image to be deformed are sampled and offset to obtain a convex deformed image of the image to be processed.
[0052] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the following steps:
[0053] Displaying an image to be processed and a convex deformation option on an image editing interface; the convex deformation option has a corresponding deformation template file, and the deformation template file includes at least two convex deformation parameters;
[0054] receiving a trigger instruction for the convex deformation option;
[0055] In response to the trigger instruction, a convex deformation image of the image to be processed is displayed on the image preview interface; the convex deformation image is obtained by decoding the image to be processed to obtain the image to be deformed; each convex deformation parameter is mapped to obtain a corresponding target parameter; according to the target parameter, the pixel points of the image to be deformed are sampled and offset.
[0056] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the following steps:
[0057] Displaying the video image to be processed and the bulge deformation option on the video image editing page; the bulge deformation option has deformation template files corresponding to different time periods, and the deformation template file includes at least two bulge deformation parameters;
[0058] receiving a trigger instruction for the convex deformation option;
[0059] In response to the trigger instruction, a convex deformation video image of the video image to be processed is displayed on a video image preview page; the convex deformation video image is generated according to the deformation template files corresponding to different time periods and the video image to be processed.
[0060] The above-mentioned image processing method, apparatus, computer-readable storage medium and computer equipment obtain the image to be deformed by decoding the image to be processed; map at least two convex deformation parameters of the image to be processed to obtain corresponding target parameters, and then sample and offset the pixel points of the deformed image according to the target parameters to obtain the convex deformation image of the image to be processed; the purpose of obtaining the convex deformation image of the image to be processed in real time according to the at least two convex deformation parameters of the image to be processed is achieved; and comprehensive consideration of multiple convex deformation parameters of the image to be processed is conducive to controlling the convex deformation of the image to be processed from multiple dimensions. The image to be processed will not be distorted to a large extent, thus avoiding the defect of poor convex deformation effect of the convex deformation image obtained by controlling the convex deformation effect of the image to be processed from a single dimension, thereby improving the convex deformation effect of the convex deformation image obtained; at the same time, through the target parameters corresponding to the multiple convex deformation parameters, the pixel points of the deformed image are sampled and offset, ensuring the continuous connection between the deformed area and the undeformed area, and no fault is generated, thus avoiding the defect of single-point magnification of the convex deformation image near the center point, further improving the convex deformation effect of the convex deformation image obtained. At the same time, the deformation area diffusion area change is supported, so that the convex deformation effect of the convex deformation image obtained is better, thereby improving the convex deformation effect of the convex deformation image obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 A schematic diagram of an image to be processed before single deformation processing and a convex deformation image after single deformation processing in the background technology;
[0062] Figure 2 A diagram showing an application environment of an image processing method in an embodiment;
[0063] Figure 3 is a structural block diagram of a computer device in one embodiment;
[0064] Figure 4 is a schematic flow chart of an image processing method in one embodiment;
[0065] Figure 5 A schematic flow chart of the steps of obtaining an image to be processed and at least two convex deformation parameters of the image to be processed in one embodiment;
[0066] Figure 6 A schematic flow chart of a step of mapping at least two bulge deformation parameters in one embodiment;
[0067] Figure 7 A schematic flow chart of a step of identifying whether an image to be deformed is within a deformation processing range in one embodiment;
[0068] Figure 8 A schematic flow chart of the steps of obtaining a convex deformation image of an image to be processed in one embodiment;
[0069] Fig. 9 It is a flowchart of the steps of redrawing the image to be deformed to obtain the redrawn image in one embodiment;
[0070] Fig.10 A schematic flow chart of a step of saving a convex deformation image of an image to be processed in one embodiment;
[0071] Fig.11 is a schematic flow chart of an image processing method in another embodiment;
[0072] Fig.12 is a schematic diagram of an image to be processed and a convex deformation image of the image to be processed in one embodiment;
[0073] Fig.13 is a flowchart of an image processing method in yet another embodiment;
[0074] Fig.14 is a schematic flow chart of a static image display method in one embodiment;
[0075] Fig.15A schematic diagram of an interface for image editing and image preview in one embodiment;
[0076] Fig.16 It is a flowchart of the steps of displaying a convex deformation image of a captured image in one embodiment;
[0077] Fig.17 A schematic diagram of an interface for image capture in one embodiment;
[0078] Fig.18 is a schematic flow chart of a video image display method in one embodiment;
[0079] Fig.19 A schematic diagram of an interface for video image editing and video image preview in one embodiment;
[0080] Fig. 20 It is a flowchart of the steps of displaying a convex deformation video image of a captured video image in one embodiment;
[0081] Fig.21 A schematic diagram of an interface for capturing a video image in one embodiment;
[0082] Fig. 22 is a structural block diagram of an image processing device in one embodiment;
[0083] Fig.23 is a structural block diagram of a static image display device in one embodiment;
[0084] Fig.24 FIG. 4 is a structural block diagram of a video image display device in one embodiment. DETAILED DESCRIPTION
[0085] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0086] Figure 2 FIG. 1 is an application environment diagram of an image processing method in an embodiment. Figure 2 , the application environment diagram includes a terminal 210. The terminal 210 is an electronic device with an image processing function, and the electronic device may be a smart phone, a tablet computer, a personal computer, or the like. Figure 2In the example, the terminal 210 is a smart phone. The terminal 210 obtains the image to be processed (as shown in Figure A) and the convex deformation option selected by the user. The convex deformation option has a corresponding deformation template file, and the deformation template file includes at least two convex deformation parameters; the image to be processed is decoded to obtain the image to be deformed; each convex deformation parameter is mapped to obtain the corresponding target parameter; according to the target parameter, the pixel points of the deformed image are sampled and offset to obtain the convex deformation image of the image to be processed, as shown in Figure B. In addition, the image processing method can also be applied to image beautification scenes, poster production scenes, video production scenes, etc., which are not specifically limited in this application.
[0087] Figure 3 The internal structure diagram of a computer device in one embodiment is shown. The computer device may specifically be Figure 2 Terminal 210 in. Figure 3 As shown, the computer device includes a processor, a memory, a network interface, an input device and a display screen connected through a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program, which, when executed by the processor, enables the processor to implement the image processing method. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to execute the image processing method. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a button, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0088] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the present application scheme, and does not constitute a limitation on the computer device to which the present application scheme is applied. The specific computer device may include Figure 3 More or fewer components may be shown, or certain components may be combined, or may have a different arrangement of components.
[0089] like Figure 4 As shown, in one embodiment, an image processing method is provided. This embodiment mainly applies the method to the above Figure 1 The terminal 210 in FIG. Figure 4 , the image processing method specifically comprises the following steps:
[0090] S402: Obtain an image to be processed and at least two convex deformation parameters of the image to be processed.
[0091] Among them, the image to be processed refers to a static image that needs to be convexly deformed. It can be a locally cached image, such as an image saved in a local album, or an image taken by a user in real time, or an image uploaded by a user, or an image on the Internet; as for the type of image, this application does not limit it.
[0092] Among them, the image to be processed may also refer to a video image that needs to be convexly deformed. It may be a locally cached video image, such as a video saved in a local album, or a video image shot by a user in real time, or a video image uploaded by a user, or a video image on the Internet. This application does not make any specific limitations.
[0093] It should be noted that the principle of the convex deformation of a static image is the same as that of the convex deformation of a video image, and this application mainly uses the convex deformation of a static image as an example for explanation.
[0094] Among them, the convex deformation parameters refer to parameters that can cause the image to undergo convex deformation, such as vertical radius, horizontal radius, convex center, convex height, cone radius, edge fixation, etc.; the deformation area of the image to be processed is determined by the vertical radius and the horizontal radius, and when the radius exceeds the range of the original image, the image edge transparency pixels are automatically filled, so that the convex deformation of the image to be processed can exceed the limit of its own size, thereby achieving the continuity of the convex deformation; and the deformation degree of the image to be processed is determined by the convex height, and the distribution mode of the transition effect of the deformation degree in the deformation area is determined by the cone radius, that is, the transition area adjustment can be supported by the cone radius to produce different convex deformation effects; in this way, in the process of generating convex deformation of the image to be processed, only the vertical radius, the horizontal radius, the convex center, the convex height, the cone radius and the edge fixation need to be controlled to achieve diverse convex deformation of the image, and at the same time, the image will not be distorted to a large extent, further improving the convex deformation effect of the convex deformation image obtained subsequently.
[0095] It should be noted that the at least two bulge deformation parameters refer to two or more bulge deformation parameters, which is not specifically limited in this application.
[0096] Specifically, the terminal obtains the image selected by the user as the image to be processed by responding to the image selection operation and the bulge deformation triggering operation of the user on the image deformation interface of the terminal; and obtains the bulge deformation option triggered by the user to obtain the corresponding at least two bulge deformation parameters as the at least two bulge deformation parameters of the image to be processed; wherein each bulge deformation option has the corresponding at least two bulge deformation parameters for generating different types of bulge deformation to be suitable for different scenes.
[0097] For example, an image selection button and a bulge deformation option are displayed on the image deformation interface of the terminal. The user clicks the image selection button to enter the local album, selects an image in the local album as the image to be processed, and displays the image to be processed on the image deformation interface through the terminal; the user clicks the bulge deformation option, and if at least two bulge deformation parameters corresponding to the bulge deformation option have been downloaded, the terminal obtains the at least two bulge deformation parameters corresponding to the bulge deformation option from the local database as the at least two bulge deformation parameters of the image to be processed; if the at least two bulge deformation parameters corresponding to the bulge deformation option have not been downloaded, the terminal sends a request to the corresponding server, and receives the at least two bulge deformation parameters returned by the server according to the request as the at least two bulge deformation parameters of the image to be processed.
[0098] Furthermore, after obtaining the image to be processed, the terminal may further preprocess the image to be processed, such as performing denoising, contrast enhancement, resolution enhancement, etc. on the image to be processed; specifically, the terminal performs image super-resolution reconstruction on the image to be processed to obtain a reconstructed image of the image to be processed, and the resolution of the reconstructed image is higher than the resolution of the image to be processed; wherein, image super-resolution reconstruction refers to obtaining a corresponding high-resolution image through reconstruction of a low-resolution image; the reconstructed image refers to a high-resolution image corresponding to the image to be processed.
[0099] In one embodiment, the terminal can also obtain images on the Internet that have not undergone bulge deformation based on big data technology as images to be processed, and pre-process the images to be processed; at the same time, respond to the bulge deformation triggering operation of the user on the image deformation interface of the terminal, obtain the bulge deformation option triggered by the user, and obtain corresponding at least two bulge deformation parameters as at least two bulge deformation parameters of the image to be processed.
[0100] S404, decoding the image to be processed to obtain the image to be deformed.
[0101] The image to be deformed refers to an object that needs to produce a convex deformation, such as a CGImageRef object obtained after image decoding, or a SampleBuffer object obtained after video decoding; wherein CGImageRef refers to a pixel bitmap, and SampleBuffer is a raw video data.
[0102] Specifically, the terminal obtains a preset image decoding file, and decodes the image to be processed according to the preset image decoding file to obtain a decoded image as the image to be deformed; this is conducive to the subsequent sampling offset processing of the image to be deformed to obtain the corresponding convex deformation image. Among them, the image decoding file is an image algorithm file that can automatically decode the image.
[0103] Furthermore, considering that the obtained image to be deformed belongs to the memory space data of the CPU (Central Processing Unit), it is necessary to transfer the data to the memory space of the GPU (Graphics Processing Unit) in a certain way. The terminal can also convert the obtained image to be deformed to obtain the image to be deformed that can be processed in the GPU; this is conducive to the subsequent sampling offset processing of the image to be deformed, and then obtain the corresponding convex deformation image.
[0104] For example, the terminal binds the image data of the image to be deformed in the CPU to the GPU FrameBuffer and associates it with a RenderBuffer through relevant function calls in OPENGL (Open Graphics Library), thereby generating a GPU texture drawing environment, thereby realizing the conversion processing of the image data of the image to be deformed in the CPU; wherein, GPU FrameBuffer refers to the frame buffer in the graphics processor, and RenderBuffer refers to the rendering buffer.
[0105] S406, mapping each bulge deformation parameter to obtain a corresponding target parameter.
[0106] The target parameters refer to the parameters that have been adjusted in the shading code and can be processed; they have a one-to-one correspondence with the bulge deformation parameters.
[0107] Specifically, the terminal obtains a mapping processing file corresponding to each bulge deformation parameter, and performs mapping processing on each bulge deformation parameter according to the mapping processing file corresponding to each bulge deformation parameter, so as to obtain a target parameter corresponding to each bulge deformation parameter; in this way, it is beneficial to subsequently sample and offset the pixel points of the deformed image according to the target parameter, so as to obtain a bulge deformation image of the image to be processed.
[0108] The mapping processing file is a mapping algorithm file that can automatically map the convex deformation parameters to obtain corresponding target parameters. Different convex deformation parameters have different corresponding mapping processing files.
[0109] For example, the terminal maps the protrusion height according to the protrusion height mapping processing file to obtain a target parameter corresponding to the protrusion height. For example, if the protrusion height is a value between 0.0 and 1.0, after mapping, the obtained target parameter is a value between 0.0 and 0.3.
[0110] S408, performing sampling offset on the pixel points of the image to be deformed according to the target parameters to obtain a convex deformed image of the image to be processed.
[0111] The sampling offset refers to offsetting the coordinates of the pixel points of the deformed image to obtain the offsetted coordinates as the coordinates of the convex deformed image. Generally, the sampling offset is approximately infinitesimal at the convex center of the convex deformed image, and tends to be infinite at the convex edge of the convex deformed image.
[0112] Specifically, the terminal obtains a preset offset processing file, and performs sampling offset on the pixel points of the image to be deformed according to the preset offset processing file and the target parameters, obtains the coordinates after the offset processing, and then obtains the convex deformation image of the image to be processed. In this way, by comprehensively considering multiple convex deformation parameters of the image to be processed, it is beneficial to control the convex deformation effect of the image to be processed from multiple dimensions, and at the same time, the image to be processed will not be distorted to a large extent, further improving the convex deformation effect of the obtained convex deformation image.
[0113] Among them, the preset offset processing file is an algorithm file that can accumulate nonlinear deviations based on the original coordinates, and at the same time ensure that the calculation area is in the (0-1) interval, the calculation result is also in the (0-1) interval, and the deformed area and the undeformed area are perfectly closed.
[0114] Furthermore, the terminal may also input the target parameters and the image to be deformed into a pre-trained offset processing model, and perform sampling offset on the pixels of the image to be deformed according to the target parameters through the pre-trained offset processing model, thereby obtaining a convex deformed image of the image to be processed.
[0115] It should be noted that the above-mentioned image processing method is not only applicable to obtaining a convex deformation image of the image to be processed, but also applicable to obtaining a concave deformation image of the image to be processed; for example, the terminal obtains the image to be processed and at least two concave deformation parameters of the image to be processed; decodes the image to be processed to obtain the image to be deformed; maps each concave deformation parameter to obtain a corresponding target parameter; and according to the target parameter, samples and offsets the pixel points of the deformed image to obtain the concave deformation image of the image to be processed.
[0116] The above-mentioned image processing method obtains the image to be deformed by decoding the image to be processed; maps at least two convex deformation parameters of the image to be processed to obtain corresponding target parameters, and then samples and offsets the pixel points of the deformed image according to the target parameters to obtain the convex deformation image of the image to be processed; the purpose of obtaining the convex deformation image of the image to be processed in real time according to the at least two convex deformation parameters of the image to be processed is achieved; comprehensively considering multiple convex deformation parameters of the image to be processed is conducive to controlling the convex deformation effect of the image to be processed from multiple dimensions, and at the same time the image to be processed It will not produce a large degree of distortion, thus avoiding the defect of poor convex deformation effect of the convex deformation image obtained by controlling the convex deformation effect of the image to be processed from a single dimension, thereby improving the convex deformation effect of the convex deformation image obtained; at the same time, through the target parameters corresponding to multiple convex deformation parameters, the pixel points of the deformed image are sampled and offset, ensuring the continuous connection between the deformed area and the undeformed area, and no fault is generated, thus avoiding the defect of single-point magnification of the convex deformation image near the center point, further improving the convex deformation effect of the convex deformation image obtained. At the same time, it supports the change of the diffusion area of the deformation area, so that the convex deformation effect of the convex deformation image obtained is better, thereby improving the convex deformation effect of the convex deformation image obtained.
[0117] like Figure 5 As shown, in one embodiment, the above step S402, obtaining the image to be processed and at least two convex deformation parameters of the image to be processed, specifically includes the following steps:
[0118] S502, receiving a processing request for an image to be processed; the processing request carries the image to be processed and a deformation template file.
[0119] The deformation template file refers to an attribute file having at least two convex deformation parameters. Based on the deformation template file, the image to be processed can be convexly deformed, thereby obtaining a corresponding convex deformation image; different deformation template files have different corresponding convex deformation parameters.
[0120] The deformation template file is obtained by the terminal from the cloud server; for example, the designer uses the AE (Adobe After Effects, graphic video processing) tool to enable the protrusion effect for the picture layer within a certain time period in the video template, and sets the values of each protrusion deformation parameter within a time interval, and changes the values in different time intervals, and makes linear or nonlinear adjustments through curves to obtain the adjusted protrusion deformation parameters, and exports the adjusted protrusion deformation parameters into a custom attribute file, i.e., a deformation template file, through a corresponding plug-in, and uploads the deformation template file to the cloud server to store multiple deformation template files through the cloud server; wherein, the plug-in may be a PAG plug-in, and the exported attribute file may be a PAG attribute file.
[0121] Specifically, the user selects the image to be processed on the image deformation interface of the terminal and clicks the convex deformation option to trigger the generation of a processing request for the image to be processed; the terminal receives the processing request for the image to be processed, and parses the processing request for the image to be processed to obtain a deformation template file corresponding to the convex deformation option.
[0122] S504: Parse the deformation template file to obtain at least two convex deformation parameters of the image to be processed.
[0123] Specifically, the terminal parses the deformation template file to obtain at least two convex deformation parameters in the deformation template file as at least two convex deformation parameters of the image to be processed.
[0124] In this embodiment, according to receiving a processing request for an image to be processed, the image to be processed and at least two bulge deformation parameters of the image to be processed can be obtained, so that the bulge deformation effect of the image to be processed can be controlled according to multiple bulge deformation parameters, thereby obtaining a bulge deformation image with a better bulge deformation effect, and further improving the bulge deformation effect of the obtained bulge deformation image.
[0125] like Figure 6 As shown, in one embodiment, the above step S406, mapping the at least two bulge deformation parameters to obtain the corresponding at least two target parameters, specifically includes the following steps:
[0126] S602: Obtain a mapping relationship between each bulge deformation parameter and a target parameter.
[0127] The mapping relationship between the bulge deformation parameters and the target parameters records the one-to-one correspondence between the bulge deformation parameters and the target parameters.
[0128] Specifically, the terminal obtains the mapping relationship between each bulge deformation parameter and the target parameter based on the big data technology, or obtains the mapping relationship between each bulge deformation parameter and the target parameter from a local database.
[0129] S604: Obtain target parameters corresponding to the respective bulge deformation parameters according to the mapping relationships between the respective bulge deformation parameters and the target parameters.
[0130] Specifically, the terminal queries the mapping relationship between the corresponding bulge deformation parameter and the target parameter according to each bulge deformation parameter, and obtains the target parameter corresponding to each bulge deformation parameter.
[0131] In this embodiment, by mapping the bulge deformation parameters into corresponding target parameters, it is beneficial to convert the bulge deformation parameters into numerical values that are easy to process during the bulge deformation process, so as to facilitate the subsequent sampling and offset of the pixel points of the image to be deformed in real time according to the target parameters to obtain the bulge deformation image of the image to be processed; at the same time, the bulge deformation effect of the bulge deformation image obtained subsequently is better, and the bulge deformation effect of the obtained bulge deformation image is further improved.
[0132] In one embodiment, the above step S408, before sampling and offsetting the pixels of the image to be deformed according to the target parameters to obtain the convex deformed image of the image to be processed, further includes: identifying whether the image to be deformed is within the deformation processing range.
[0133] In this embodiment, by identifying whether the image to be deformed is within the deformation processing range, it is avoided that the image to be deformed is not within the deformation processing range, so that the image to be deformed cannot be deformed or the deformation cannot cover the entire image to be deformed, resulting in the defect of poor convex deformation effect of the obtained convex deformation image, and the convex deformation effect of the obtained convex deformation image is further improved.
[0134] like Figure 7 As shown, in one embodiment, the target parameter includes a cone radius; then, identifying whether the image to be deformed is within the deformation processing range specifically includes the following steps:
[0135] S702: If the cone radius is less than or equal to the width or height of the image to be deformed, it is determined that the image to be deformed is within the deformation processing range.
[0136] Specifically, the terminal obtains the width and height of the image to be deformed, and compares the target parameter cone radius with the width or height of the image to be deformed. If the cone radius is less than or equal to the width of the image to be deformed, or the cone radius is less than or equal to the height of the image to be deformed, it is confirmed that the image to be deformed is within the deformation processing range, indicating that the image to be deformed does not need to be redrawn.
[0137] S704: If the cone radius is greater than the width or height of the image to be deformed, it is determined that the image to be deformed is not within the deformation processing range.
[0138] Specifically, if the cone radius is greater than the width of the image to be deformed, or the cone radius is greater than the height of the image to be deformed, it is determined that the image to be deformed is not within the deformation processing range, indicating that the image to be deformed needs to be redrawn.
[0139] In this embodiment, by comparing the target parameter cone radius with the width or height of the image to be deformed, it is possible to accurately determine whether the image to be deformed is within the deformation processing range, which is convenient for subsequent determination of whether the image to be deformed needs to be redrawn, thereby avoiding the problem that the image to be deformed is not within the deformation processing range, so that the image to be deformed cannot be deformed or the deformation cannot cover the entire image to be deformed, resulting in a poor convex deformation effect of the obtained convex deformation image, and further improving the convex deformation effect of the subsequently obtained convex deformation image.
[0140] In one embodiment, Figure 8 As shown, the above step S408 performs sampling offset on the pixel points of the image to be deformed according to the target parameters to obtain a convex deformed image of the image to be processed, including:
[0141] S802: If the image to be deformed is within the deformation processing range, sampling and offsetting are performed on the pixel points of the image to be deformed according to the target parameters to obtain a convex deformation image of the image to be processed.
[0142] Specifically, the terminal recognizes that the image to be deformed is within the deformation processing range, indicating that the image to be deformed does not need to be redrawn, and then samples and offsets the pixels of the image to be deformed according to the preset offset processing file and target parameters to obtain the coordinates after the offset processing, and then obtains the convex deformation image of the image to be processed.
[0143] Furthermore, the coordinates of the image to be deformed after the offset processing can also be calculated in the following way:
[0144] dx = center.x - x0;
[0145] dy = center.y - y0;
[0146]
[0147]
[0148]
[0149] Among them, (x0, y0) are the coordinates of a point in the image to be deformed, (center.x, center.y) are the coordinates of the center point in the image to be deformed, and (x, y) are the coordinates of the sampling point obtained after the sampling offset processing of a point in the image to be deformed; dx and dy are the one-dimensional distances from a point in the image to be deformed to the center point, r is the two-dimensional distance from a point in the image to be deformed to the center point, and R is the radius of the deformation area, that is, a radius circle composed of the convex and concave range with the center; the size of cr can be used to change the slope of the nonlinear curve to simulate the effect of dynamic adjustment of the cone radius, so its size can be adjusted according to actual conditions.
[0150] S804: If the image to be deformed is not within the deformation processing range, the image to be deformed is redrawn to obtain a redrawn image; the redrawn image is within the deformation processing range.
[0151] The redrawing process refers to adjusting the image to be deformed so that the adjusted image to be deformed is within the deformation processing range, such as centering and scaling redrawing process.
[0152] S806: Perform sampling offset on the pixel points of the redrawn image according to the target parameters to obtain a convex deformation image of the image to be processed.
[0153] Specifically, the terminal recognizes that the image to be deformed is not within the deformation processing range, indicating that the image to be deformed needs to be redrawn, so the image to be deformed is redrawn to obtain a redrawn image within the deformation processing range; according to the preset offset processing file and target parameters, the pixel points of the redrawn image are sampled and offset to obtain the coordinates after the offset processing, and then the convex deformation image of the image to be processed is obtained.
[0154] In this embodiment, when the image to be deformed is not within the deformation processing range, the image to be deformed is redrawn so that the redrawn image is within the deformation processing range, the deformation area diffusion area of the image to be deformed is changed, and when the radius exceeds the original image range, the image edge transparency pixel filling is automatically performed, so that the convex deformation of the image to be deformed can exceed its own size limit, thereby achieving the continuity of the convex deformation; avoiding the defect that the image to be deformed cannot be deformed or the deformation cannot cover the entire image to be deformed when the image to be deformed is not within the deformation processing range, resulting in a poor convex deformation effect of the obtained convex deformation image; at the same time, when ensuring that the image to be deformed is within the deformation processing range, the pixel points of the image to be deformed are sampled and offset according to the target parameters to obtain the convex deformation image of the image to be processed, which is conducive to improving the convex deformation effect of the obtained convex deformation image.
[0155] like Fig. 9As shown, in one embodiment, the above step S804, redrawing the image to be deformed to obtain a redrawn image, specifically includes the following steps:
[0156] S902: If the image to be deformed is in a corner positioning state, a preset vertex mesh matrix is obtained, and the image to be deformed is redrawn according to the vertex mesh matrix to obtain a redrawn image.
[0157] For example, when the image to be deformed is in the state of corner positioning, the terminal opens a vertex and texture grid coordinate matrix of 11x11 through the vertex shader, and at the same time, according to the protrusion height, a decreasing sine function offset grid is constructed around the protrusion center in the vertex grid, where the offset height is constructed according to the square of the cone radius. After the construction is completed, the graphics are deformed into a grid in the vertex shading stage by creating opengl VBO (Vertex Buffer Object) and EBO (Element Buffer Object) for data transfer. At the same time, the intensity of the protrusion height in the fragment shader is reduced to 1 / 10 of the original, and the cone radius is kept at 1.0, so as to obtain a slightly deformed picture again, that is, the image is redrawn.
[0158] S904: If the image to be deformed is not in a corner positioning state, the image to be deformed is scaled and redrawn in the center to obtain a redrawn image.
[0159] For example, when the image to be deformed is not in a corner positioning state, the terminal calculates the vertical scaling factor and the horizontal scaling factor of the current screen based on the vertical radius and the horizontal radius, and combines an additional drawing command to perform center scaling and redrawing on the image to be deformed to obtain a redrawn image.
[0160] In this embodiment, different redrawing processes are performed on the image to be deformed according to whether it is in a corner positioning state, and when the corner positioning is turned on, an N×N deformation grid constructed by the vertex array and index array in OPENGL is used to realize the deformation of the area outside the radius, thereby realizing the change of the diffusion area of the deformation area of the image to be deformed, and automatically filling the image edge transparency pixels when the radius exceeds the range of the original image, so that the convex deformation of the image to be deformed can exceed its own size limit, thereby realizing the continuity of the convex deformation.
[0161] like Fig.10 As shown, in one embodiment, the image processing method of the present application further includes the step of saving the convex deformation image of the image to be processed, which specifically includes the following steps:
[0162] S1002, obtaining an image identifier of a convex deformation image of an image to be processed.
[0163] The image identifier refers to a unique identifier used to identify the convex deformation image of the image to be processed, such as an image name, an image number, etc.
[0164] Specifically, the terminal obtains the image name of the convex deformation image of the image to be processed as the image identification of the convex deformation image of the image to be processed, or obtains the image code of the convex deformation image of the image to be processed as the image identification of the convex deformation image of the image to be processed.
[0165] S1004: Save the convex deformation image of the image to be processed according to the image identifier.
[0166] Specifically, the terminal saves the convex deformation image of the image to be processed in the local database according to the image identifier, so as to store the convex deformation image of the image to be processed through the local database.
[0167] For example, in response to the user's saving operation on the convex deformed image of the image to be processed, the terminal saves the convex deformed image of the image to be processed in a local album.
[0168] In this embodiment, the convex deformation image of the image to be processed is saved according to the image identifier, so that the user can directly obtain the convex deformation image of the image to be processed without further processing the image to be processed.
[0169] like Fig.11 As shown, in one embodiment, another image processing method is provided, which specifically includes the following steps:
[0170] S1102, obtaining an image to be processed and at least two convex deformation parameters of the image to be processed.
[0171] Specifically, the terminal receives a processing request for an image to be processed; the processing request carries the image to be processed and a deformation template file; and the deformation template file is parsed to obtain at least two convex deformation parameters of the image to be processed.
[0172] S1104, decoding the image to be processed to obtain the image to be deformed.
[0173] S1106: Mapping the at least two bulge deformation parameters to obtain at least two corresponding target parameters.
[0174] Specifically, the terminal obtains a mapping relationship between each bulge deformation parameter and a target parameter; and obtains a target parameter corresponding to each bulge deformation parameter according to the mapping relationship between each bulge deformation parameter and the target parameter.
[0175] S1108, identifying whether the image to be deformed is within the deformation processing range; if so, jumping to step S1116.
[0176] Specifically, if the cone radius is less than or equal to the width or height of the image to be deformed, it is confirmed that the image to be deformed is within the deformation processing range; if the cone radius is greater than the width or height of the image to be deformed, it is confirmed that the image to be deformed is not within the deformation processing range.
[0177] S1110: If the image to be deformed is not within the deformation processing range, determine whether the image to be deformed is in a corner positioning state.
[0178] S1112: If the image to be deformed is in a corner positioning state, a preset vertex mesh matrix is obtained, and the image to be deformed is redrawn according to the vertex mesh matrix to obtain a redrawn image.
[0179] S1114: If the image to be deformed is not in a corner positioning state, the image to be deformed is scaled and redrawn at the center to obtain a redrawn image.
[0180] S1116, performing sampling offset on the pixel points of the image to be deformed or the redrawn image according to the target parameters to obtain a convex deformed image of the image to be processed.
[0181] For example, see Fig.12 , Figure (a) is the image to be processed, and Figure (b) is the convex deformation image of the image to be processed.
[0182] S1118, obtaining an image identifier of the convex deformation image of the image to be processed; and saving the convex deformation image of the image to be processed according to the image identifier.
[0183] In this embodiment, the purpose of obtaining the convex deformation image of the image to be processed in real time according to at least two convex deformation parameters of the image to be processed is achieved; comprehensive consideration of multiple convex deformation parameters of the image to be processed is conducive to controlling the convex deformation effect of the image to be processed from multiple dimensions, and the image to be processed will not be distorted to a large extent, thereby avoiding the defect of poor convex deformation effect of the convex deformation image obtained by controlling the convex deformation effect of the image to be processed from a single dimension, and improving the convex deformation effect of the convex deformation image obtained; at the same time, through the target parameters corresponding to the multiple convex deformation parameters, the pixel points of the image to be deformed are sampled and offset, ensuring the continuous connection between the deformed area and the undeformed area, and no fault is generated, avoiding the defect of single-point magnification of the convex deformation image near the center point, and further improving the convex deformation effect of the convex deformation image obtained. At the same time, the deformation area diffusion area change is supported, so that the convex deformation effect of the convex deformation image obtained is better, thereby improving the convex deformation effect of the convex deformation image obtained.
[0184] In actual applications, during the rendering process of video sources and image sources, the generation of video effects on the original image is mainly achieved through the two parts of coding, vertex shader and fragment shader in the GPU programmable pipeline. Therefore, the realization of protrusion effects is mainly based on the vertex part and fragment part in the GPU, and some more general computing performance will be pre-processed in the CPU side code.
[0185] like Fig.13 As shown, in one embodiment, another image processing method is provided, which specifically includes the following contents:
[0186] (1) Obtain the current screen image and input bulge deformation parameters.
[0187] (2) Open the open graphics library, create a frame buffer and a render buffer, and precompile them through shaders.
[0188] Specifically, open the OPENGL Context, create the FrameBuffer / RenderBuffer, and precompile it through the shader.
[0189] Among them, the protrusion effect is mainly used in the SampleBuffer object obtained after video decoding or the CGImageRef object obtained after picture decoding; the SampleBuffer object or the CGImageRef object belongs to the CPU memory space data, and it is necessary to transfer the CPU memory space data to the GPU memory space in a certain way; here, the image data of the current screen image in the CPU is bound to the GPU FrameBuffer and associated with a RenderBuffer mainly through the relevant function calls in OPENGL to generate a GPU texture drawing environment.
[0190] (3) Mapping the instantaneous value in the convex deformation parameter to convert the instantaneous value in the convex deformation parameter into a numerical value acceptable to the open graphics library and the shader, and transferring the variable through a preset function.
[0191] Specifically, the terminal maps the instantaneous value in the convex deformation parameter to convert the instantaneous value in the convex deformation parameter into a value acceptable to OPENGL and shader, and transfers the variable through the glUniform function, wherein the glUniform function can specify the value of the Uniform variable for the current value.
[0192] In one embodiment, the terminal parses the bulge deformation parameters at the current time point, and the fields obtained after parsing mainly include six bulge deformation parameters: vertical radius, horizontal radius, bulge center, bulge height, cone radius and edge fixation; and maps the bulge deformation parameters in AE to the adjusted parameter range in the shader code according to the corresponding value mapping function.
[0193] For example, when the cone height is (0-400), the convexity is mapped to (1.7-5.0) and the concave is mapped to (0.0-1.0); when the cone center is (0-width), the mapping is (0.0-0.5);
[0194] For example, the cone horizontal radius (0-horizontalwidth) and the cone vertical radius (0-verticalheight) are mapped to horizontalwidth / rendersize.width×0.5 respectively, and the vertical scaling ratio is (rendersize.height×horizontalwidth) / (verticalHeight×rendersize.width).
[0195] For example, when the protrusion height is (0.0-1.0), the protrusion mapping is (0.0-0.3); when the protrusion height is (-1.0-0.0), the protrusion mapping is (-0.8-0.0).
[0196] (4) Determine whether the cone radius is greater than the width or height of the current screen image. If not, jump to (9).
[0197] (5) If the cone radius is greater than the width or height of the current screen image, determine whether the current screen image has corner positioning enabled.
[0198] (6) If corner positioning is not enabled, a frame buffer object with a specified radius is enabled, and the current screen image is redrawn by centering and scaling the image on the frame buffer object to obtain a redrawn image.
[0199] Specifically, if corner positioning is not enabled, the terminal calculates the vertical scaling factor and the horizontal scaling factor of the current screen image based on the deformation vertical and horizontal radii, and redraws the current screen image through an additional drawing command to obtain a redrawn image.
[0200] For example, first determine the maximum canvas size that needs to be adjusted:
[0201] resizeRendersize.width=max(Rendersize.width, horizontalwidth×2.0);
[0202] resizeRendersize.height=max(Rendersize.height, verticalHeight×2.0);
[0203] Secondly, determine the horizontal screen offset and the vertical screen offset; wherein,
[0204] The horizontal screen offset is:
[0205] xoffset=(resizeRendersize.width-Rendersize.widht) / 2.0;
[0206] The vertical screen offset is:
[0207] yoffset=(resizeRendersize.height-Rendersize.height) / 2.0;
[0208] Finally, the screen offsets in these two directions are normalized within the resizeRendersize range, and the size of the current screen image is kept unchanged. Only the edge area of the current screen image is filled with transparent color through the upper left and lower right anchor points to perform a drawing process, thereby obtaining the corresponding redrawn image.
[0209] (7) If corner positioning is turned on, an 11×11 vertex grid matrix is constructed, and the current screen image is deformed accordingly based on the protrusion height and center point.
[0210] (8) Open the vertex array of the vertex buffer object, and pass the triangle vertices through the vertex index in the index buffer object. Use the preset triangle drawing method of the fast rendering function to perform vertex drawing in the graphics processor to obtain a redrawn image.
[0211] Specifically, open the vertex array in VBO, pass the triangle vertices through the vertex index in EBO, and then set glDrawElements to GL_TRIANGLE_STRIP for GPU vertex drawing to obtain the corresponding redrawn image.
[0212] For example, if the corner positioning function is turned on, you need to turn on an 11x11 vertex and texture grid coordinate matrix through the vertex shader. At the same time, based on the protrusion height, a decreasing sinusoidal function offset grid is constructed around the protrusion center in the vertex grid. The offset height is constructed according to the square of the cone radius. After the construction is completed, openglVBO and EBO objects are created for data transfer, so that the graphics produce a grid deformation in the vertex shading stage. At the same time, the protrusion height intensity in the fragment shader is reduced to 1 / 10 of the original, and the cone radius is kept at 1.0, so as to obtain a slightly deformed picture again, that is, the image is redrawn.
[0213] (9) The convex deformation shader performs offset sampling and shading on each pixel point in the current screen image or the redrawn image to obtain a convex deformation image of the current screen image.
[0214] For example, through the powerful parallel computing capability of OPENGL GPU, each pixel in the current screen image or the redrawn image is sampled and offset to complete the color value calculation of each pixel in the current screen image or the redrawn image. At the same time, the GPU will perform linear smoothing on the color value of the current screen image or the redrawn image during the shading process.
[0215] In this embodiment, the convex deformation effect of the convex deformation image is controlled by multiple convex parameters such as vertical radius, horizontal radius, convex center, convex height, cone radius and edge fixation. Compared with the original single convex deformation that only supports convex height, more interesting variability is added, so that the convex deformation effect of the obtained convex deformation image is better. At the same time, it supports automatic outward expansion deformation of the image and transparent area filling, and when edge positioning is turned on, an N×N deformation grid is constructed through the vertex array and index array in OPENGL to realize the deformation of the area outside the radius, further improving the convex deformation effect of the obtained convex deformation image.
[0216] like Fig.14 As shown, in one embodiment, a static image display method is provided, which specifically includes the following steps:
[0217] S1402, displaying the image to be processed and the bulge deformation option on the image editing interface; the bulge deformation option has a corresponding deformation template file, and the deformation template file includes at least two bulge deformation parameters.
[0218] Among them, different bulge deformation options correspond to different deformation template files; the deformation template file refers to a parameter file used to generate bulge deformation of the image to be processed.
[0219] For example, see Fig.15Figure (a) is the image editing interface, which displays the image to be processed (as shown in Figure A) and the bulge deformation options, namely bulge deformation option 1, bulge deformation option 2, bulge deformation option 3 and bulge deformation option 4.
[0220] S1404, receiving a trigger instruction for the bulge deformation option.
[0221] For example, the user selects a corresponding bulge deformation option, such as bulge deformation option 1, on the image editing interface according to his / her needs, which triggers the generation of a trigger instruction for the bulge deformation option, and the terminal receives the trigger instruction for the bulge deformation option.
[0222] S1406, in response to the trigger instruction, a convex deformation image of the image to be processed is displayed on the image preview interface; the convex deformation image is obtained by decoding the image to be processed to obtain the image to be deformed; each convex deformation parameter is mapped to obtain a corresponding target parameter; according to the target parameter, the pixel points of the image to be deformed are sampled and offset to obtain the image.
[0223] For example, see Fig.15 , Figure (b) is an image preview interface, which displays the convex deformation image of the image to be processed, such as Figure B.
[0224] In this embodiment, the purpose of automatically obtaining a convex deformation image of an image to be processed according to the selected convex deformation option is achieved, which is convenient and quick; at the same time, the purpose of obtaining a convex deformation image of an image to be processed in real time according to at least two convex deformation parameters of the image to be processed is achieved; comprehensive consideration of multiple convex deformation parameters of the image to be processed is conducive to controlling the convex deformation effect of the image to be processed from multiple dimensions, and at the same time, the image to be processed will not be distorted to a large extent, thereby avoiding the defect of poor convex deformation effect of the convex deformation image obtained by controlling the convex deformation effect of the image to be processed from a single dimension, and improving the convex deformation effect of the convex deformation image obtained; in addition, by sampling and offsetting the pixel points of the image to be deformed through the target parameters corresponding to the multiple convex deformation parameters, the continuous connection between the deformed area and the undeformed area is ensured, and no fault is generated, thereby avoiding the defect of single-point magnification of the convex deformation image near the center point, and further improving the convex deformation effect of the convex deformation image obtained. In addition, the deformation area diffusion area change is supported, so that the convex deformation effect of the obtained convex deformation image is better, thereby improving the convex deformation effect of the obtained convex deformation image.
[0225] like Fig.16 As shown, in one embodiment, the static image display method of the present application further includes a step of displaying a convex deformed image of the captured image, specifically including the following steps:
[0226] S1602, displaying a bulge deformation option and an image capture button on the image capture interface.
[0227] The image capture button is used to trigger the capture of a static image.
[0228] For example, see Fig.17 ,Figure (a) is the image shooting interface, which displays the bulge deformation option and the ,shooting button.
[0229] S1604, marking a convex deformation option on the image shooting interface.
[0230] Specifically, the user clicks to select the bulge deformation option on the image capture interface, triggering the generation of a trigger instruction for the bulge deformation option. The terminal receives and responds to the trigger instruction for the bulge deformation option, and simultaneously identifies the bulge deformation option selected by the user on the image capture interface.
[0231] S1606: Receive a trigger instruction for an image capture button.
[0232] S1608, in response to the trigger instruction, displaying the convex deformation image of the captured image on the image capturing interface.
[0233] Specifically, the user clicks the image capture button on the image capture interface to trigger the generation of a trigger instruction for the image capture button. The terminal receives and responds to the trigger instruction for the image capture button, captures the image in the current viewfinder, and decodes the captured image to obtain the image to be deformed; maps the convex deformation parameters corresponding to the convex deformation option to obtain the corresponding target parameters; samples and offsets the pixel points of the image to be deformed according to the target parameters to obtain the convex deformation image of the captured image, and displays the convex deformation image of the captured image on the image capture interface, such as Fig.17 (b) shows the graph C.
[0234] In this embodiment, the purpose of obtaining a convex deformation image of a captured image in real time is achieved without having to capture the image first and then enter the image editing page to perform convex deformation processing on the image, thereby further improving the efficiency of obtaining a convex deformation image of the captured image.
[0235] like Fig.18 As shown, in one embodiment, a video image display method is provided, which specifically includes the following steps:
[0236] S1802, displaying the video image to be processed and the bulge deformation option on the video image editing page; the bulge deformation option has a deformation template file corresponding to different time periods, and the deformation template file includes at least two bulge deformation parameters.
[0237] The video image to be processed may refer to a video image stored locally, or may refer to a video image on the network that has not undergone convex deformation.
[0238] For example, see Fig.19 , Figure (a) is a video image editing interface, which displays the video image to be processed (such as video image D) and bulge deformation options, namely bulge deformation option 1, bulge deformation option 2, bulge deformation option 3 and bulge deformation option 4.
[0239] S1804, receiving a trigger instruction for the bulge deformation option.
[0240] For example, the user selects a corresponding bulge deformation option, such as bulge deformation option 1, on the video image editing interface according to his / her needs, triggering the generation of a trigger instruction for the bulge deformation option, and the terminal receives the trigger instruction for the bulge deformation option.
[0241] S1806, in response to the trigger instruction, displaying the convex deformation video image of the video image to be processed on the video image preview page; the convex deformation video image is generated according to the deformation template files corresponding to different time periods and the video image to be processed.
[0242] Among them, the specific process of obtaining the convex deformation video image is the same as the specific process of obtaining the convex deformation image, and the specific details will not be repeated in this application.
[0243] For example, see Fig.19 , Figure (b) is a video image preview interface, which displays the convex deformed video image of the video image to be processed, such as video image E.
[0244] In this embodiment, the purpose of automatically obtaining the convex deformation video image of the video image to be processed according to the selected convex deformation option is achieved, which is convenient and quick; at the same time, the purpose of obtaining the convex deformation video image of the video image to be processed in real time according to at least two convex deformation parameters of the video image to be processed is achieved; comprehensively considering multiple convex deformation parameters of the video image to be processed is conducive to controlling the convex deformation effect of the video image to be processed from multiple dimensions, and at the same time, the video image to be processed will not produce a large degree of distortion, thereby avoiding the defect of poor convex deformation effect of the convex deformation video image obtained by controlling the convex deformation effect of the video image to be processed from a single dimension, and improving the convex deformation effect of the convex deformation video image obtained; in addition, by using the target parameters corresponding to the multiple convex deformation parameters, the pixel points of the video image to be deformed are sampled and offset, ensuring the continuous connection between the deformed area and the undeformed area, and no fault is generated, avoiding the defect of single-point magnification of the convex deformation video image near the center point, and further improving the convex deformation effect of the convex deformation video image obtained. In addition, the deformation area diffusion area change is supported, so that the convex deformation effect of the obtained convex deformation video image is better, thereby improving the convex deformation effect of the obtained convex deformation video image.
[0245] like Fig. 20 As shown, in one embodiment, the video image display method of the present application further includes a step of displaying a convex deformed video image of the captured video image, specifically including the following steps:
[0246] S2002, displaying a convex deformation option and a video shooting button on the video image shooting interface.
[0247] Among them, the video shooting button is used to trigger the shooting of video images.
[0248] For example, see Fig.21 ,Figure (a) is the video image shooting interface, which displays the bulge deformation option and the video shooting button.
[0249] S2004, marking a convex deformation option on the video image shooting interface.
[0250] Specifically, the user clicks to select the bulge deformation option on the video image shooting interface, triggering the generation of a trigger instruction for the bulge deformation option, and the terminal receives and responds to the trigger instruction for the bulge deformation option, and simultaneously marks the bulge deformation option selected by the user on the image shooting interface.
[0251] S2006, receiving a trigger instruction for a video shooting button.
[0252] S2008, in response to the trigger instruction, displaying the convex deformation video image of the captured video image on the video image shooting interface.
[0253] Specifically, the user clicks a video shooting button on the video image shooting interface to trigger the generation of a trigger instruction for the video shooting button. The terminal receives and responds to the trigger instruction for the video shooting button, shoots the video image in the current viewfinder, and decodes the shot video image to obtain the video image to be deformed; maps the convex deformation parameters corresponding to the convex deformation option to obtain the corresponding target parameters; samples and offsets the pixel points of the video image to be deformed according to the target parameters to obtain the convex deformation video image of the shot video image, and displays the convex deformation video image of the shot video image on the image shooting interface, such as Fig.21 (b) Displayed video image E.
[0254] In this embodiment, the purpose of obtaining a convex deformation video image of a captured video image in real time is achieved without having to capture the video image first and then enter the video image editing page to perform convex deformation processing on the video image, thereby further improving the efficiency of obtaining a convex deformation video image of the captured video image.
[0255] It should be understood that although Figure 4-11 The steps in the flowcharts of 1, 2, 3, 4, 5, 6, 7, 8, and 9 are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 4-11 At least part of the steps in 13, 14, 16, 18, and 20 may include multiple sub-steps or multiple stages. These sub-steps or stages do not necessarily have to be executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages does not necessarily have to be sequentially, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0256] like Fig. 22 As shown, in one embodiment, an image processing device 2200 is provided, the device 2200 includes: an image acquisition module 2202, a decoding processing module 2204, a mapping processing module 2206 and a sampling offset module 2208, wherein:
[0257] The image acquisition module 2202 is used to acquire the image to be processed and at least two convex deformation parameters of the image to be processed.
[0258] The decoding processing module 2204 is used to decode the image to be processed to obtain the image to be deformed.
[0259] The mapping processing module 2206 is used to map each bulge deformation parameter to obtain a corresponding target parameter.
[0260] The sampling and shifting module 2208 is used to perform sampling and shifting on the pixel points of the image to be deformed according to the target parameters to obtain a convex deformed image of the image to be processed.
[0261] In one embodiment, the image acquisition module 2202 is further used to receive a processing request for the image to be processed; the processing request carries the image to be processed and a deformation template file; and the deformation template file is parsed to obtain at least two convex deformation parameters of the image to be processed.
[0262] In one embodiment, the mapping processing module 2206 is further used to obtain the mapping relationship between each bulge deformation parameter and the target parameter; and obtain the target parameter corresponding to each bulge deformation parameter according to the mapping relationship between each bulge deformation parameter and the target parameter.
[0263] In one embodiment, the image processing device 2200 further includes: an image recognition module.
[0264] The image recognition module is used to identify whether the image to be deformed is within the deformation processing range.
[0265] In one embodiment, the sampling offset module 2208 is also used to, if the image to be deformed is within the deformation processing range, perform sampling offset on the pixel points of the image to be deformed according to the target parameters to obtain a convex deformation image of the image to be processed; if the image to be deformed is not within the deformation processing range, perform redrawing on the image to be deformed to obtain a redrawn image; the redrawn image is within the deformation processing range; according to the target parameters, perform sampling offset on the pixel points of the redrawn image to obtain a convex deformation image of the image to be processed.
[0266] In one embodiment, the target parameters include a cone radius, and the image recognition module is further used to confirm that the image to be deformed is within the deformation processing range if the cone radius is less than or equal to the width or height of the image to be deformed; if the cone radius is greater than the width or height of the image to be deformed, confirm that the image to be deformed is not within the deformation processing range.
[0267] In one embodiment, the sampling offset module 2208 is also used to obtain a preset vertex mesh matrix if the image to be deformed is in a corner positioning state, and redraw the image to be deformed according to the vertex mesh matrix to obtain a redrawn image; if the image to be deformed is not in a corner positioning state, the image to be deformed is redrawn by center scaling to obtain a redrawn image.
[0268] In one embodiment, the image processing device 2200 specifically further includes: an image saving module.
[0269] The image saving module is used to obtain the image identifier of the convex deformation image of the image to be processed; and save the convex deformation image of the image to be processed according to the image identifier.
[0270] In this embodiment, the image processing device obtains the image to be deformed by decoding the image to be processed; maps at least two convex deformation parameters of the image to be processed to obtain corresponding target parameters, and then samples and offsets the pixel points of the image to be deformed according to the target parameters to obtain the convex deformation image of the image to be processed; the purpose of obtaining the convex deformation image of the image to be processed in real time according to the at least two convex deformation parameters of the image to be processed is achieved; comprehensively considering multiple convex deformation parameters of the image to be processed is conducive to controlling the convex deformation effect of the image to be processed from multiple dimensions, and at the same time The image will not be distorted to a large extent, thus avoiding the defect of poor convex deformation effect of the convex deformation image obtained by controlling the convex deformation effect of the image to be processed from a single dimension, thereby improving the convex deformation effect of the convex deformation image obtained; at the same time, through the target parameters corresponding to the multiple convex deformation parameters, the pixel points of the deformed image are sampled and offset, thereby ensuring the continuous connection between the deformed area and the undeformed area, and no fault is generated, thereby avoiding the defect of single-point magnification of the convex deformation image near the center point, further improving the convex deformation effect of the convex deformation image obtained. At the same time, the deformation area diffusion area change is supported, so that the convex deformation effect of the convex deformation image obtained is better, thereby improving the convex deformation effect of the convex deformation image obtained.
[0271] like Fig.23 As shown, in one embodiment, a static image display device 2300 is provided, the device 2300 includes: a first image display module 2302, an instruction receiving module 2304 and a second image display module 2306, wherein:
[0272] The first image display module 2302 is used to display the image to be processed and the convex deformation option on the image editing interface; the convex deformation option has a corresponding deformation template file, and the deformation template file includes at least two convex deformation parameters.
[0273] The instruction receiving module 2304 is used to receive a trigger instruction for the convex deformation option.
[0274] The second image display module 2306 is used to respond to the trigger instruction and display the convex deformation image of the image to be processed on the image preview interface; the convex deformation image is obtained by decoding the image to be processed to obtain the image to be deformed; each convex deformation parameter is mapped to obtain the corresponding target parameter; according to the target parameter, the pixel points of the image to be deformed are sampled and offset to obtain it.
[0275] In one embodiment, the static image display device 2300 further includes: a third image display module.
[0276] The third image display module is used to display the convex deformation option and the image shooting button on the image shooting interface; mark the convex deformation option on the image shooting interface; receive a trigger instruction for the image shooting button; respond to the trigger instruction and display the convex deformation image of the captured image on the image shooting interface.
[0277] like Fig.24 As shown, in one embodiment, a video image display device 2400 is provided, the device 2400 includes: a first video image display module 2402, a trigger instruction receiving module 2404 and a second video image display module 2406, wherein:
[0278] The first video image display module 2402 is used to display the video image to be processed and the bulge deformation option on the video image editing page; the bulge deformation option has a deformation template file corresponding to different time periods, and the deformation template file includes at least two bulge deformation parameters.
[0279] The trigger instruction receiving module 2404 is used to receive a trigger instruction for the convex deformation option.
[0280] The second video image display module 2406 is used to respond to the trigger instruction and display the convex deformation video image of the video image to be processed on the video image preview page; the convex deformation video image is generated according to the deformation template files corresponding to different time periods and the video image to be processed.
[0281] In one embodiment, the video image display device 2400 specifically further includes: a third video image display module.
[0282] The third video image display module is used to display the convex deformation option and the video shooting button on the video image shooting interface; mark the convex deformation option on the video image shooting interface; receive a trigger instruction for the video shooting button; respond to the trigger instruction, and display the convex deformation video image of the captured video image on the video image shooting interface.
[0283] In one embodiment, the image processing apparatus provided by the present application can be implemented in the form of a computer program. The computer program can be Figure 3 The computer device shown in the figure is run on the computer device. The memory of the computer device can store various program modules constituting the image processing device, such as: Fig. 22The image acquisition module 2202, the decoding processing module 2204, the mapping processing module 2206 and the sampling offset module 2208 are shown. The computer program composed of various program modules enables the processor to execute the steps of the image processing method of each embodiment of the present application described in this specification.
[0284] For example, Figure 3 The computer device shown can be Fig. 22 The image acquisition module 2202 in the image processing device shown acquires the image to be processed and at least two convex deformation parameters of the image to be processed. The computer device can decode the image to be processed through the decoding processing module 2204 to obtain the image to be deformed. The computer device can map each convex deformation parameter through the mapping processing module 2206 to obtain the corresponding target parameter, and sample and offset the pixel points of the image to be deformed according to the target parameter through the sampling offset module 2208 to obtain the convex deformation image of the image to be processed.
[0285] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned image processing method. The steps of the image processing method here may be the steps of the image processing method in the above-mentioned various embodiments.
[0286] In one embodiment, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the above-mentioned image processing method. The steps of the image processing method here can be the steps in the image processing method of each of the above-mentioned embodiments.
[0287] In one embodiment, the static image display device provided by the present application can be implemented in the form of a computer program. The computer program can be Figure 3 The computer device shown in the figure is run. The memory of the computer device can store various program modules constituting the static image display device, such as: Fig.23 The first image display module 2302, the instruction receiving module 2304 and the second image display module 2306 are shown. The computer program composed of various program modules enables the processor to execute the steps of the static image display method of each embodiment of the present application described in this specification.
[0288] For example, Figure 3 The computer device shown can be Fig.23The first image display module 2302 in the static image display device shown displays the image to be processed and the convex deformation option on the image editing interface; the convex deformation option has a corresponding deformation template file, and the deformation template file includes at least two convex deformation parameters. The computer device can receive a trigger instruction for the convex deformation option through the instruction receiving module 2304, and respond to the trigger instruction through the second image display module 2306 to display the convex deformation image of the image to be processed on the image preview interface; the convex deformation image is obtained by decoding the image to be processed; mapping each convex deformation parameter to obtain the corresponding target parameter; according to the target parameter, the pixel points of the image to be deformed are sampled and offset.
[0289] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the static image display method described above. The steps of the static image display method here may be the steps of the static image display method described in each of the above embodiments.
[0290] In one embodiment, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the static image display method described above. The steps of the static image display method here may be the steps of the static image display method described in each of the above embodiments.
[0291] In one embodiment, the video image display device provided by the present application can be implemented in the form of a computer program. The computer program can be Fig.24 The computer device shown in the figure is run on the computer device. The memory of the computer device can store various program modules constituting the video image display device, such as, Fig.24 The first video image display module 2402, the trigger instruction receiving module 2404 and the second video image display module 2406 are shown. The computer program composed of various program modules enables the processor to execute the steps of the video image display method of each embodiment of the present application described in this specification.
[0292] For example, Figure 3 The computer device shown can be Fig.24The first video image display module 2402 in the video image display device shown displays the video image to be processed and the convex deformation option on the video image editing page; the convex deformation option has a deformation template file corresponding to different time periods, and the deformation template file includes at least two convex deformation parameters. The computer device can receive a trigger instruction for the convex deformation option through a trigger instruction receiving module 2404, and respond to the trigger instruction through a second video image display module 2406, and display the convex deformation video image of the video image to be processed on the video image preview page; the convex deformation video image is generated according to the deformation template files corresponding to different time periods and the video image to be processed.
[0293] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned video image display method. The steps of the video image display method here may be the steps of the video image display method in the above-mentioned various embodiments.
[0294] In one embodiment, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the above-mentioned video image display method. The steps of the video image display method here can be the steps of the video image display method in each of the above-mentioned embodiments.
[0295] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0296] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0297] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An image processing method, comprising: Acquire an image to be processed and at least two convex deformation parameters of the image to be processed; Decoding the image to be processed to obtain an image to be deformed; Mapping each of the convex deformation parameters to obtain corresponding target parameters; The target parameters include cone radius; Identifying whether the image to be deformed is within the deformation processing range by judging whether the cone radius is less than or equal to the width or height of the image to be deformed; If the image to be deformed is not within the deformation processing range, redrawing the image to be deformed to obtain a redrawn image; The redrawn image is within the deformation processing range; According to the target parameters, pixel points of the redrawn image are sampled and offset to obtain a convex deformation image of the image to be processed.
2. The method according to claim 1, characterized in that The obtaining of the image to be processed and at least two convex deformation parameters of the image to be processed includes: Receiving a processing request for the image to be processed; the processing request carries the image to be processed and a deformation template file; The deformation template file is parsed to obtain at least two convex deformation parameters of the image to be processed.
3. The method according to claim 1, characterized in that: The mapping process of each of the convex deformation parameters to obtain corresponding target parameters includes: Obtaining a mapping relationship between each of the bulge deformation parameters and the target parameter; According to the mapping relationship between each of the bulge deformation parameters and the target parameter, the target parameter corresponding to each of the bulge deformation parameters is obtained.
4. The method according to claim 1, characterized in that: The method further comprises: If the image to be deformed is within the deformation processing range, sampling and offsetting are performed on the pixel points of the image to be deformed according to the target parameters to obtain a convex deformation image of the image to be processed.
5. The method according to claim 4, characterized in that The step of identifying whether the image to be deformed is within the deformation processing range by judging whether the cone radius is less than or equal to the width or height of the image to be deformed includes: If the cone radius is less than or equal to the width or height of the image to be deformed, it is confirmed that the image to be deformed is within the deformation processing range; If the cone radius is greater than the width or height of the image to be deformed, it is determined that the image to be deformed is not within the deformation processing range.
6. The method according to claim 4, characterized in that The step of redrawing the image to be deformed to obtain a redrawn image includes: If the image to be deformed is in a corner positioning state, a preset vertex grid matrix is obtained, and the image to be deformed is redrawn according to the vertex grid matrix to obtain a redrawn image; If the image to be deformed is not in a corner positioning state, the image to be deformed is subjected to center scaling and redrawing processing to obtain a redrawn image.
7. A static image display method, comprising: Display the image to be processed and the bulge deformation options on the image editing interface; The convex deformation option has a corresponding deformation template file, and the deformation template file includes at least two convex deformation parameters; receiving a trigger instruction for the convex deformation option; In response to the trigger instruction, displaying a convex deformed image of the image to be processed on an image preview interface; Wherein, the convex deformation image is obtained by processing the image to be processed using the image processing method according to any one of claims 1 to 6.
8. The method according to claim 7, characterized in that The method further comprises: Displaying the convex deformation option and the image capture button on the image capture interface; marking the convex deformation option on the image capturing interface; receiving a trigger instruction for the image capture button; In response to the trigger instruction, a convex deformation image of the captured image is displayed on the image capturing interface.
9. A video image display method, comprising: Display the video image to be processed and the bulge deformation options on the video image editing page; The convex deformation option has deformation template files corresponding to different time periods, and the deformation template files include at least two convex deformation parameters; receiving a trigger instruction for the convex deformation option; In response to the trigger instruction, displaying the convex deformed video image of the video image to be processed on a video image preview page; The convex deformation video image is generated according to the deformation template files corresponding to different time periods and the video image to be processed; The convex deformation video image is a convex deformation image obtained by taking the video image to be processed as the image to be processed and processing the image to be processed by the image processing method as described in any one of claims 1 to 6.
10. The method according to claim 9, characterized in that The method further comprises: Displaying the convex deformation option and the video shooting button on the video image shooting interface; Marking the convex deformation option on the video image shooting interface; Receiving a trigger instruction for the video shooting button; In response to the trigger instruction, a convex deformation video image of the captured video image is displayed on the video image shooting interface.
11. An image processing device, characterized in that: The device comprises: An image acquisition module, used to acquire an image to be processed and at least two convex deformation parameters of the image to be processed; A decoding processing module, used for decoding the image to be processed to obtain an image to be deformed; A mapping processing module, used for mapping each of the convex deformation parameters to obtain corresponding target parameters; the target parameters include a cone radius; An image recognition module, used to identify whether the image to be deformed is within the deformation processing range by judging whether the cone radius is less than or equal to the width or height of the image to be deformed; The sampling and offset module is used to redraw the image to be deformed to obtain a redrawn image if the image to be deformed is not within the deformation processing range; the redrawn image is within the deformation processing range; and according to the target parameters, the pixel points of the redrawn image are sampled and offset to obtain a convex deformation image of the image to be processed.
12. The device according to claim 11, characterized in that The image acquisition module is further used to receive a processing request for the image to be processed; the processing request carries the image to be processed and the deformation template file; The deformation template file is parsed to obtain at least two convex deformation parameters of the image to be processed.
13. The device according to claim 11, characterized in that The mapping processing module is further used to obtain a mapping relationship between each of the bulge deformation parameters and a target parameter; and obtain a target parameter corresponding to each of the bulge deformation parameters according to the mapping relationship between each of the bulge deformation parameters and the target parameter.
14. The device according to claim 11, characterized in that The sampling and shifting module is further used to perform sampling and shifting on the pixel points of the image to be deformed according to the target parameters if the image to be deformed is within the deformation processing range, so as to obtain a convex deformation image of the image to be processed.
15. The device according to claim 14, characterized in that The sampling offset module is also used to confirm that the image to be deformed is within the deformation processing range if the cone radius is less than or equal to the width or height of the image to be deformed; if the cone radius is greater than the width or height of the image to be deformed, confirm that the image to be deformed is not within the deformation processing range.
16. The device according to claim 14, characterized in that The sampling offset module is further used for obtaining a preset vertex grid matrix if the image to be deformed is in a corner positioning state, and redrawing the image to be deformed according to the vertex grid matrix to obtain a redrawn image; If the image to be deformed is not in a corner positioning state, the image to be deformed is subjected to center scaling and redrawing processing to obtain a redrawn image.
17. A static image display device, characterized in that: The device comprises: A first image display module, used for displaying the image to be processed and the convex deformation option on the image editing interface; the convex deformation option has a corresponding deformation template file, and the deformation template file includes at least two convex deformation parameters; An instruction receiving module, used for receiving a trigger instruction for the convex deformation option; A second image display module, configured to respond to the trigger instruction and display a convex deformed image of the image to be processed on an image preview interface; Wherein, the convex deformation image is obtained by processing the image to be processed using the image processing device as described in any one of claims 11 to 16.
18. The device according to claim 17, characterized in that The device also includes: The third image display module is used to display the convex deformation option and the image shooting button on the image shooting interface; mark the convex deformation option on the image shooting interface; receive a trigger instruction for the image shooting button; and respond to the trigger instruction to display the convex deformation image of the captured image on the image shooting interface.
19. A video image display device, characterized in that: The device comprises: A first video image display module is used to display the video image to be processed and the bulge deformation option on the video image editing page; the bulge deformation option has a deformation template file corresponding to different time periods, and the deformation template file includes at least two bulge deformation parameters; A trigger instruction receiving module, used for receiving a trigger instruction for the convex deformation option; A second video image display module, configured to respond to the trigger instruction and display a convex deformed video image of the video image to be processed on a video image preview page; the convex deformed video image is generated according to the deformation template files corresponding to different time periods and the video image to be processed; The convex deformation video image is a convex deformation image obtained by using the video image to be processed as the image to be processed and using the image processing device as described in any one of claims 11 to 16 to process the image to be processed.
20. The device according to claim 19, characterized in that The device also includes: A third video image display module, configured to display the convex deformation option and the video shooting button on the video image shooting interface; mark the convex deformation option on the video image shooting interface; and receive a trigger instruction for the video shooting button; In response to the trigger instruction, a convex deformation video image of the captured video image is displayed on the video image shooting interface.
21. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 10.
22. A computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Face image processing method and device, image processing device and medium
CN109859097A