Image processing method, device, electronic device and computer storage medium
By processing and superimposing images to be processed and combined with user specific operations, the dynamic changes of images are achieved, the problem of users neglecting advertising information is solved, and the click-through rate and user experience of advertisements is improved.
Patent Information
- Application Number
- CN202010188288.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-17
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2040-03-17
AI Technical Summary
When users face huge amounts of advertising information, they usually ignore or feel disgusted, resulting in low click-through rates of advertising and require a display method that can attract users' attention.
By processing the image to be processed, at least two layers of images are generated, and the internal area is cropped and superimposed, and the movement of each layer of images in the superimposed image except the image to be processed is controlled according to the specific operation of the user.
Without modeling and distortion of the image, the processed image presents dynamic changes according to the user's specific operations, enriching the image display form, attracting users to interact, and improving user experience.
Smart Images

Figure CN113409180B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more specifically, to an image processing method, device, electronic device and computer storage medium. Background Art
[0002] With the development of Internet technology and mobile communication technology, more and more businesses publish advertisements through various advertising platforms, directing users to the corresponding pages of the advertisements and displaying product-related information to users.
[0003] As the national brand awareness increases, brands pay more and more attention to the number of advertisements and the communication effect. However, faced with such a huge amount of advertising information, users usually tend to ignore it or even feel disgusted. Therefore, a way to display advertising information that can attract users' attention is needed to increase the click-through rate of advertisements. Summary of the invention
[0004] The embodiments of the present application provide an image processing method, device, electronic device and computer storage medium, which can solve the problems existing in the prior art.
[0005] The specific technical solutions provided by the embodiments of this application are as follows:
[0006] In a first aspect, an embodiment of the present application provides an image processing method, the method comprising:
[0007] Based on the image to be processed, at least two layers of images are obtained, wherein the at least two layers of images include the image to be processed, the image size of the image to be processed is the smallest among the at least two layers of images, and the image sizes of the images of each layer are increased in sequence;
[0008] Performing internal region cropping on each layer of images except the image with the largest size in at least two layers of images to obtain cropped images;
[0009] In the order of image size from large to small, the cropped images and the image with the largest size are superimposed from bottom to top to obtain a superimposed image and send it to the terminal for the terminal to display. When the terminal detects a specific operation of the user, the movement of each layer of images in the superimposed image except the image to be processed is controlled according to the specific operation.
[0010] In a possible implementation, at least two layers of images are obtained based on the image to be processed, including:
[0011] Determine the image enlargement size;
[0012] Perform at least one magnification process on the image to be processed according to the image magnification size to obtain an image after each magnification process, wherein at least two layers of images include the image after the magnification process;
[0013] Crop the internal regions of at least two layers of images except for the image with the largest size, including:
[0014] The internal regions of the images of each layer except the image with the largest size after each magnification process are cropped, wherein the smaller the size of the image after the magnification process is, the larger the size of the cropped region of the image is.
[0015] In a possible implementation, each layer of images except for the image with the largest size in each enlarged image is subjected to internal region cropping, including:
[0016] According to at least one of a preset region shape or a cropping size corresponding to each layer of the image, the designated region of each layer of the image except the image with the largest size in each enlarged image is cropped.
[0017] In a possible implementation manner, in the superimposed image, the upper layer image is located in the central area of the lower layer image.
[0018] In a possible implementation, the specific operation includes any of the following:
[0019] A first designated action of a user on a terminal displaying an overlay image;
[0020] a second designated action of the user on the display page where the overlay image is located;
[0021] A third designated action of the user on the overlay image.
[0022] In a second aspect, an embodiment of the present application provides an image processing method, the method comprising:
[0023] receiving a superimposed image sent by a server and displaying the superimposed image, wherein the superimposed image includes an image to be processed and at least one layer of image obtained based on the image to be processed;
[0024] When a specific operation of the user is detected, each layer of images in the superimposed image except the image to be processed is controlled to move according to the specific operation.
[0025] In a possible implementation, controlling the movement of each layer of images except the image to be processed in the superimposed image according to a specific operation includes:
[0026] Determine the action direction and action amplitude information of a specific operation;
[0027] Determine the moving distance of each layer of images in the superimposed image except the image to be processed according to the motion amplitude information;
[0028] According to the movement direction and movement distance, the movement of each layer of images in the superimposed image except the image to be processed is controlled.
[0029] In a possible implementation, the specific operation includes any of the following:
[0030] A first designated action of a user on a terminal displaying an overlay image;
[0031] a second designated action of the user on the display page where the overlay image is located;
[0032] A third designated action of the user on the overlay image.
[0033] In a possible implementation, if the specific operation is a third specified action, the method further includes:
[0034] When the moving distance meets the preset conditions, jump to the advertising information display page corresponding to the image to be processed;
[0035] When the moving distance does not meet the preset condition and cancellation of the third designated action is detected, the display state of the superimposed image is controlled to be restored to the state before the third designated action is detected.
[0036] In a third aspect, an embodiment of the present invention provides an image processing device, the device comprising:
[0037] A processing module, used for obtaining at least two layers of images based on the image to be processed, wherein the at least two layers of images include the image to be processed, the image size of the image to be processed is the smallest among the at least two layers of images, and the image sizes of the images of each layer increase in sequence;
[0038] A cropping module, used for cropping the internal area of each layer of images except the image with the largest size in at least two layers of images to obtain cropped images;
[0039] The superposition module is used to superimpose the cropped images and the image with the largest size from bottom to top in the order of image size from large to small, obtain the superimposed image and send it to the terminal so that the terminal can display it. When the terminal detects a specific operation of the user, the movement of each layer of images in the superimposed image except the image to be processed is controlled according to the specific operation.
[0040] In a fourth aspect, an embodiment of the present invention provides an image processing device, the device comprising:
[0041] A display module, used for receiving and displaying the superimposed image sent by the server, wherein the superimposed image includes the image to be processed and at least one layer of image obtained based on the image to be processed;
[0042] The control module is used to control the movement of each layer of images in the superimposed image except the image to be processed according to the specific operation when a specific operation of the user is detected.
[0043] In the fifth aspect, an embodiment of the present invention further provides an electronic device, comprising one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method as shown in the first aspect or the second aspect of the present application.
[0044] In the sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which is used to store a computer program. When the computer program runs on a processor, the processor can execute the method shown in the first aspect or the second aspect of the present application.
[0045] The beneficial effects of the technical solution provided by this application are:
[0046] The present application provides an image processing method, device, electronic device and computer storage medium. The server obtains at least two layers of images based on the image to be processed, wherein the image to be processed is included in the at least two layers of images, the image size of the image to be processed is the smallest among the at least two layers of images, and the image size of each layer of images increases in sequence; the internal area of each layer of images except the image with the largest size in the at least two layers of images is cropped to obtain each cropped image; the cropped images and the image with the largest size are superimposed from bottom to top in the order of image size from large to small to obtain a superimposed image and send it to the terminal for display. When the terminal detects a specific operation of the user, the movement of each layer of images except the image to be processed in the superimposed image is controlled according to the specific operation. The technical solution provided by the present application processes the static image, without the need for modeling and without causing the image to be distorted, so that the processed image presents a dynamic change effect according to the specific operation of the user, enriches the image display form, attracts users to interact, and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in describing the embodiments of the present application.
[0048] Figure 1 A flowchart of an image processing method provided in an embodiment of the present application;
[0049] Figure 2 A schematic diagram of an image overlay processing process provided in an embodiment of the present application;
[0050] Figure 3a-3d A schematic diagram of the dynamic change process of an image provided in an embodiment of the present application;
[0051] Figure 4 A flowchart of an image processing method provided in an embodiment of the present application;
[0052] Figure 5 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application;
[0053] Figure 6 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application;
[0054] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.
[0056] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0057] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0058] The present application embodiment provides an image processing method, such as Figure 1 As shown, the method includes:
[0059] Step S101, obtaining at least two layers of images based on the image to be processed, wherein the at least two layers of images include the image to be processed, the image size of the image to be processed is the smallest among the at least two layers of images, and the image sizes of the images of each layer increase in sequence;
[0060] The execution subject of the method provided in the embodiment of the present application may be a server. The image to be processed may be an image related to the advertising information, and may be a static display image of the advertising information, a preview image of a video file, etc. In the prior art, the image to be processed is displayed on the page in a static display manner. In order to make the static image present a dynamic effect, the present application processes the image to be processed into at least two layers of images as each frame image of the dynamic change of the image.
[0061] The size of the image to be processed is equal to the maximum image size that can be displayed by the page display container. Each layer of images is processed into images with successively increasing sizes, and parts of the image that exceed the size range that can be displayed by the container are not displayed.
[0062] In one example, assuming that the image to be processed is a preview image of a video file, and the size of the image in the video is 1280×720 pixels, the size of the image to be processed is equal to 1280×720 pixels, and the size of each layer of images after processing the image to be processed is larger than the size of the image to be processed.
[0063] The more levels the image to be processed is processed into, the better the dynamic effect of the image is. However, considering the loading speed of the terminal, the image to be processed can generally be processed into 7-10 levels.
[0064] Step S102, cropping the internal regions of the at least two layers of images except the image with the largest size to obtain cropped images;
[0065] After the image to be processed is processed into images of each layer with increasing sizes, the internal areas of the images except the image with the largest size are cropped, and the internal areas of the image to be processed are also cropped to obtain the cropped images.
[0066] For a specific method of processing the image to be processed into each layer of images, see the following embodiment:
[0067] In a possible implementation, at least two layers of images are obtained based on the image to be processed, including:
[0068] Determine the image enlargement size;
[0069] Perform at least one magnification process on the image to be processed according to the image magnification size to obtain an image after each magnification process, wherein at least two layers of images include the image after the magnification process;
[0070] Crop the internal regions of at least two layers of images except for the image with the largest size, including:
[0071] The internal regions of the images of each layer except the image with the largest size after each magnification process are cropped, wherein the smaller the size of the image after the magnification process is, the larger the size of the cropped region of the image is.
[0072] In practical applications, the shape of the image to be processed can be any shape, and the shapes of the images of each layer obtained by processing the image to be processed are the same as the image to be processed. When processing the image to be processed into each layer of images, the image magnification size is first determined, wherein the image magnification size can refer to at least one of the magnification size of the image width or the magnification size of the image height. For example, the image magnification size is the magnification size of the image width, which can specifically be the number of image pixels magnified on the image width during each processing (such as N pixels magnified on both sides of the image width). When performing a magnification process based on the image magnification size, the width of the image can be magnified according to the size. In addition, the aspect ratio of the magnified image can be controlled to be equal to the aspect ratio of the image to be processed, thereby obtaining an image after a magnification process. When performing a magnification process again, the same image magnification process can be performed again on the basis of the image after the previous magnification process to obtain a magnified image again. For example, when the image to be processed is a rectangle, the images of each layer after processing are all rectangles. The width and height of each layer of the image after magnification are determined, and the image to be processed is magnified according to the width and height after magnification.
[0073] When each layer of image is rectangular, the size of each layer of image can be calculated according to the following formula:
[0074] The width of the Lth layer image = W + L*2*N(1)
[0075] Lth layer image height = Lth layer image width / W*H (2)
[0076] Among them, W represents the width of the image to be processed; H represents the height of the image to be processed; L represents the number of layers; 2N represents the spacing between each layer of images, that is, the number of pixels between adjacent layer images.
[0077] It can be seen that in this example, the aspect ratios of the images in each layer remain unchanged and are equal to the aspect ratio of the image to be processed, and the difference in the number of pixels in the image width between adjacent layer images is 2N.
[0078] In an example, assuming that the size of the image to be processed is 1280×720, and each layer of images includes 4 layers of images. According to the size of the image from large to small, the 4 layers of images can be recorded as the 0th layer image, the 1st layer image, ..., the 3rd layer image. Assuming N=200, according to formula (1), the width of each layer of images from the bottom layer to the top layer is as follows:
[0079] Layer 0 image width: 1280 = 1280 + 0
[0080] The width of the first layer image: 1680 = 1280 + (200 + 200)
[0081] Layer 2 image width: 2080 = 1280 + (200 + 200 + 200 + 200)
[0082] Layer 3 image width: 2480 = 1280 + (200 + 200 + 200 + 200 + 200 + 200)
[0083] The 0th layer image is the image to be processed. The height of each layer image is obtained according to formula (2). The image to be processed is enlarged into each layer image according to the width and height of each layer image.
[0084] Then, the internal areas of each layer of images except the image with the largest size after each magnification process are cropped. The shapes of the cropped areas of each layer of images are the same but the sizes are different. The smaller the size of the image after the magnification process, the larger the size of the cropped area of the image. From the lower layer to the upper layer, the size of the cropped area of each layer can be increased proportionally.
[0085] In this embodiment, the cropped layers of images are superimposed, so that the layers of images can move in three-dimensional space according to specific operations of the user, thereby showing a three-dimensional dynamic effect.
[0086] For the specific implementation method of cropping the internal area of each layer image, see the following embodiment.
[0087] In a possible implementation, each layer of images except for the image with the largest size after each magnification process is subjected to internal region cropping, including:
[0088] According to at least one of a preset region shape or a cropping size corresponding to each layer of the image, the designated region of each layer of the image except the image with the largest size in each enlarged image is cropped.
[0089] In actual applications, the designated area may be the internal area of the image, and the shape of the cropped internal area of each layer of the image may be any shape. The shapes of the cropped internal areas of each layer of the image are the same but different in size. The smaller the size of the image after the enlargement process, the larger the size of the cropped area of the image. From the lower layer to the upper layer, the size of the cropped area of each layer may increase proportionally. The designated area of each layer of the image may be cropped according to the preset area shape and / or cropping size of each layer, wherein the centers of the cropped areas of each layer of the image may coincide and the sides may be parallel to each other, so as to present a better three-dimensional dynamic effect to the user when controlling the movement of each layer of the image in the superimposed image.
[0090] For example, in the above example, assuming that each layer of images is rectangular, the size of the cropped internal area of the 0th layer image accounts for 80% of the size of the image of this layer; the size of the cropped internal area of the 1st layer image accounts for 60% of the size of the image of this layer; the size of the cropped internal area of the 2nd layer image accounts for 40% of the size of the image of this layer; the 3rd layer image is the largest image, and the internal area is not cropped.
[0091] Step S103, in the order of image size from large to small, the cropped images and the image with the largest size are superimposed from bottom to top to obtain a superimposed image and send it to the terminal for the terminal to display. When the terminal detects a specific operation of the user, the layers of images in the superimposed image except the image to be processed are controlled to move according to the specific operation.
[0092] The cropped images and the largest image are stacked from bottom to top in descending order of size to form a pyramid. Since the image to be processed is the smallest in size, it is at the top of the pyramid. The server sends the stacked image to the terminal for display.
[0093] When the terminal detects a specific operation by the user, it controls the movement of each layer of images except the image to be processed in the same direction according to the specific operation. Based on this method, the dynamic change effect of the image can be presented on the page without modeling and without causing image distortion. Processing advertising-related images in this way enriches the image display form, avoids users' antipathy to advertising, attracts users to interact, and improves user experience.
[0094] When the layers of images are superimposed, they need to be superimposed in a certain manner to ensure that the superimposed image obtained after the superposition is displayed to the user has the same content as the image to be processed displayed to the user.
[0095] In a possible implementation manner, in the superimposed image, the upper layer image is located in the central area of the lower layer image.
[0096] In practical applications, each layer of images is superimposed from bottom to top in order from large to small. When the shape of each layer of images is a regular geometric figure, the center position of the image can be determined according to the position of each vertex of the image. The position inside the image with the same distance to each vertex of the image is the center position (if the shape of the image is a circle, the center of the circle is the center position). According to the center position, the central area of the image can be determined, and the smaller upper layer image in the superimposed image is placed in the central area of the larger lower layer image. The centers of each layer of images are overlapped, and the sides of the smaller upper layer image are superimposed in parallel with the corresponding sides of the larger lower layer image. In this way, it can be ensured that the superimposed image and the content displayed to the user by the image to be processed are the same, and the user's browsing of the original image (that is, the content of the image to be processed) is not affected.
[0097] In addition, the user's specific operation may be directed to the terminal, to a display page, or to an overlay image, and the specific contents are shown in the following embodiments.
[0098] In a possible implementation, the specific operation includes any of the following:
[0099] A first designated action of a user on a terminal displaying an overlay image;
[0100] a second designated action of the user on the display page where the overlay image is located;
[0101] A third designated action of the user on the overlay image.
[0102] In actual applications, the first specified action of the user on the terminal displaying the superimposed image may be an action that can trigger the angle change of the terminal's built-in gyroscope, such as shaking the terminal; the second specified action of the user on the display page where the superimposed image is located may specifically be an action that triggers the display page to move up and down / left and right, such as sliding the display page up and down / left and right through a gesture, scrolling the page up and down through a mouse, etc.; the third specified action of the user on the superimposed image may specifically be sliding up and down, left and right, dragging, etc. on the superimposed image. When the terminal detects any of the specified actions for the terminal, the display page, and the superimposed image, it triggers the movement of each layer of the image to present a dynamic change effect.
[0103] The image processing method provided by the present application is that the server obtains at least two layers of images based on the image to be processed, wherein the image to be processed is included in the at least two layers of images, the image size of the image to be processed is the smallest among the at least two layers of images, and the image size of each layer of images increases in sequence; the internal area of each layer of images except the image with the largest size among the at least two layers of images is cropped to obtain each cropped image; the cropped images and the image with the largest size are superimposed from bottom to top in the order of image size from large to small to obtain a superimposed image and send it to the terminal for display, and when the terminal detects a specific operation of the user, the movement of each layer of images except the image to be processed in the superimposed image is controlled according to the specific operation. The technical solution provided by the present application processes the static image, without the need for modeling and without causing image distortion, so that the processed image presents a dynamic change effect according to the specific operation of the user, enriches the image display form, attracts users to interact, and improves the user experience.
[0104] The technical solution of the present application is described in detail below with the terminal as the execution entity.
[0105] The present application embodiment provides an image processing method, such as Figure 4 As shown, the method includes:
[0106] Step S401, receiving and displaying a superimposed image sent by a server, wherein the superimposed image includes an image to be processed and at least one layer of image obtained based on the image to be processed;
[0107] The execution subject of the method provided in the embodiment of the present application may be a user's terminal, such as a user's computer, mobile phone, etc. The image to be processed may be an image related to the advertising information, and may be a static display image of the advertising information, a preview image of a video file, etc. In the prior art, the image to be processed is displayed on the page in a static display manner. In order to make the static image present a dynamic effect, the present application processes the image to be processed into at least two layers of images as each frame image of the dynamic change of the image.
[0108] The superimposed image includes the image to be processed and at least one layer of image obtained based on the image to be processed. The specific process of obtaining the superimposed image based on the image to be processed includes:
[0109] Based on the image to be processed, at least two layers of images are obtained, wherein the at least two layers of images include the image to be processed, the image size of the image to be processed in the at least two layers of images is the smallest, and the image size of each layer of images increases sequentially; the internal area of each layer of images except the image with the largest size in the at least two layers of images is cropped to obtain each cropped image; and the cropped images and the image with the largest size are superimposed from bottom to top in order of image size from large to small to obtain a superimposed image.
[0110] Step S402: when a specific operation of the user is detected, each layer of images in the superimposed image except the image to be processed is controlled to move according to the specific operation.
[0111] When the terminal detects a specific operation by the user, it controls the movement of each layer of images except the image to be processed in the same direction according to the specific operation. Based on this method, the dynamic change effect of the image can be presented on the page without modeling and without causing image distortion. Processing advertising-related images in this way enriches the image display form, avoids users' antipathy to advertising, attracts users to interact, and improves user experience.
[0112] The user's specific operation may be directed to the terminal, the display page, or the superimposed image, and the specific contents are shown in the following embodiments.
[0113] In a possible implementation, the specific operation includes any of the following:
[0114] A first designated action of a user on a terminal displaying an overlay image;
[0115] a second designated action of the user on the display page where the overlay image is located;
[0116] A third designated action of the user on the overlay image.
[0117] In actual applications, the first specified action of the user on the terminal displaying the superimposed image may be an action that can trigger the angle change of the terminal's built-in gyroscope, such as shaking the terminal; the second specified action of the user on the display page where the superimposed image is located may specifically be an action that triggers the display page to move up and down / left and right, such as sliding the display page up and down / left and right through a gesture, scrolling the page up and down through a mouse, etc.; the third specified action of the user on the superimposed image may specifically be sliding up and down, left and right, dragging, etc. on the superimposed image. When the terminal detects any of the specified actions for the terminal, the display page, and the superimposed image, it triggers the movement of each layer of the image to present a dynamic change effect.
[0118] The actions of the specific operation detected by the terminal are different, and the display effects of the dynamic changes of the images of each layer may be different. The specific implementation method is shown in the following embodiment.
[0119] In a possible implementation, controlling the movement of each layer of images except the image to be processed in the superimposed image according to a specific operation includes:
[0120] Determine the action direction and action amplitude information of a specific operation;
[0121] Determine the moving distance of each layer of images in the superimposed image except the image to be processed according to the motion amplitude information;
[0122] According to the movement direction and movement distance, the movement of each layer of images in the superimposed image except the image to be processed is controlled.
[0123] In actual applications, the action amplitude information of the user's specific operation is associated with the distance moved by each layer of images in the superimposed image except the image to be processed in advance. When the terminal detects a specific operation, the action direction and action amplitude information of the specific operation can be determined, and based on the above-mentioned association relationship, the distance moved by each layer of images in the superimposed image except the image to be processed corresponding to the action amplitude information of the current specific operation is determined, and the movement of each layer of images is controlled according to the action direction and movement distance. The direction of movement of each layer of images can be the same as the action direction of the specific operation, or it can be different, and the distance moved by each layer of images can be the same, which is the distance determined according to the above-mentioned association relationship. In the embodiment of the present application, the movement of each layer of images in the superimposed image except the image to be processed can be controlled according to the action direction and action amplitude information of the user's specific action, presenting a dynamic change effect and attracting the user's attention.
[0124] In a possible implementation, if the specific operation is a third specified action, the method further includes:
[0125] When the moving distance meets the preset conditions, jump to the advertising information display page corresponding to the image to be processed;
[0126] When the moving distance does not meet the preset condition and cancellation of the third designated action is detected, the display state of the superimposed image is controlled to be restored to the state before the third designated action is detected.
[0127] In actual applications, the action direction and action amplitude of the user's third designated action on the superimposed image are pre-associated with the direction and distance of movement of each layer of images in the superimposed image except the image to be processed. When the terminal detects the third designated action on the superimposed image, the action direction and action amplitude information of the third designated action is determined. According to the above association relationship, the movement distance of each layer of images in the superimposed image except the image to be processed corresponding to the action amplitude information of the third designated action is determined. The direction of movement of each layer of images is determined according to the action direction of the third designated action. The direction of movement of each layer of images may be the same as or different from the action direction of the third designated action.
[0128] When the moving distance meets the preset conditions, for example, when the distance moved by each layer of images in a certain direction is greater than or equal to the preset distance threshold, it jumps to the advertising information display page corresponding to the image to be processed or other corresponding pages.
[0129] When the moving distance does not meet the preset conditions, for example, the moving distance of each layer of images in a certain direction is less than the preset distance threshold, and the cancellation of the third specified action is detected, the terminal controls the display state of the superimposed image to be restored to the state before the third specified action is detected. In one example, when the user clicks on the superimposed image with a finger and drags (or clicks on the image with a mouse and presses and drags), the moving distance of each layer of images is less than the preset distance threshold, and the user's finger leaves the terminal display screen (or the mouse stops pressing) and does not continue to drag, that is, the action is canceled, and each layer of images moves in the opposite direction of the dragging back to the position before the movement.
[0130] In an optional example, the moving area of each layer of images can also be determined based on the moving distance, and how each layer of images is moved can be determined by whether the moving area meets the preset conditions. It can be determined by whether the moving area of each layer of images meets the preset conditions to jump to the advertising information display page or return to the initial position before the movement in the opposite direction.
[0131] In the image processing method provided in this embodiment, the terminal receives and displays the superimposed image sent by the server, and the superimposed image includes the image to be processed and at least one layer of image obtained based on the image to be processed; when a specific operation of the user is detected, the layers of images in the superimposed image except the image to be processed are controlled to move according to the specific operation. The technical solution provided in this application processes the static image, and without modeling and without causing image distortion, the processed image presents a dynamic change effect according to the specific operation of the user, enriches the image display form, attracts users to interact, and improves the user experience.
[0132] In order to facilitate understanding of the implementation process of the technical solution of the present application, the process of processing and overlaying the image to be processed is described in detail below through a specific embodiment.
[0133] like Figure 2 As shown, Figure 2 A in the figure is an image to be processed (such as A, an advertisement picture). The image to be processed is enlarged to obtain 7 enlarged images of each layer, and the internal area of each layer of images except the image with the largest size is cropped. As the size of each layer of images increases, the size of the cropped internal area decreases to obtain the cropped images of each layer. The cropped images of each layer are arranged in the manner that the upper layer image is located in the central area of the lower layer image (such as Figure 2 B. Spatial layered processing in the figure), the images of each layer are superimposed to obtain a superimposed image. When the front view of the superimposed image is displayed on the page, such as Figure 2 C. Front view synthesis effect.
[0134] Figure 3a-3d Shows Figure 2The synthesized image in the process of dynamic change according to the user's specific operation. Figure 2 The synthesized image is displayed on the terminal page, such as Figure 3a As shown in ; when the user clicks on the superimposed image and slides to the right, each layer of image except the image to be processed moves to the right in turn, as shown in Figure 3b As shown in ; when the user clicks on the superimposed image and slides to the left, each layer of image except the image to be processed moves to the left in turn, as shown in Figure 3c As shown in ; when the user clicks on the superimposed image and slides upward, each layer of image except the image to be processed moves upward in sequence, as shown in Figure 3d shown.
[0135] Based on Figure 1 Based on the same principle as the method shown in , the present application also provides an image processing device 20, such as Figure 5 As shown, the image processing device 20 includes:
[0136] A processing module 21 is used to obtain at least two layers of images based on the image to be processed, wherein the at least two layers of images include the image to be processed, the image size of the image to be processed is the smallest among the at least two layers of images, and the image size of each layer of images increases in sequence;
[0137] A cropping module 22, configured to crop the internal regions of each layer of images except the image with the largest size among the at least two layers of images to obtain cropped images;
[0138] The superposition module 23 is used to superimpose the cropped images and the image with the largest size from bottom to top in the order of image size from large to small, obtain a superimposed image and send it to the terminal so that the terminal can display it. When the terminal detects a specific operation of the user, the terminal controls the movement of each layer of images in the superimposed image except the image to be processed according to the specific operation.
[0139] In a possible implementation, the processing module 21 is configured to:
[0140] Determine the image enlargement size;
[0141] Perform at least one magnification process on the image to be processed according to the image magnification size to obtain an image after each magnification process, wherein at least two layers of images include the image after the magnification process;
[0142] The cutting module 22 is used for:
[0143] The internal regions of the images of each layer except the image with the largest size after each magnification process are cropped, wherein the smaller the size of the image after the magnification process is, the larger the size of the cropped region of the image is.
[0144] In a possible implementation, when performing internal region cropping on each layer of images except the image with the largest size in each enlarged image, the cropping module 22 is configured to:
[0145] According to at least one of a preset region shape or a cropping size corresponding to each layer of the image, the designated region of each layer of the image except the image with the largest size in each enlarged image is cropped.
[0146] In a possible implementation manner, in the superimposed image, the upper layer image is located in the central area of the lower layer image.
[0147] In a possible implementation, the specific operation includes any of the following:
[0148] A first designated action of a user on a terminal displaying an overlay image;
[0149] a second designated action of the user on the display page where the overlay image is located;
[0150] A third designated action of the user on the overlay image.
[0151] The image processing device of the embodiment of the present application can execute the image processing method provided by the embodiment of the present application, and the implementation principle is similar. The actions performed by each module in the image processing device in each embodiment of the present application correspond to the steps in the image processing method in each embodiment of the present application. For the detailed functional description of each module of the image processing device, please refer to the description in the corresponding image processing method shown in the previous text, which will not be repeated here.
[0152] The image processing device provided in this embodiment obtains at least two layers of images based on the image to be processed, wherein the image to be processed is included in at least two layers of images, the image size of the image to be processed is the largest among the at least two layers of images, and the image sizes of the layers of images decrease in sequence; the layers of images are superimposed from bottom to top in the order of image size from large to small to obtain a superimposed image and display it to the user; when a specific operation of the user is detected, the movement of the layers of images in the superimposed image except the image to be processed is controlled according to the specific operation to display an image with a dynamic change effect to the user. The technical solution provided in this application processes a static image without modeling and without causing image distortion, so that the processed image presents a dynamic change effect according to the specific operation of the user, enriches the image display form, attracts users to interact, and improves the user experience.
[0153] Based on Figure 4 Based on the same principle as the method shown in , the present application also provides an image processing device 30, such as Figure 6 As shown, the image processing device 30 includes:
[0154] A display module 31 is used to receive and display the superimposed image sent by the server, where the superimposed image includes the image to be processed and at least one layer of image obtained based on the image to be processed;
[0155] The control module 32 is used to control the movement of each layer of images in the superimposed image except the image to be processed according to the specific operation when a specific operation of the user is detected.
[0156] In a possible implementation, the control module 32 is configured to:
[0157] Determine the action direction and action amplitude information of a specific operation;
[0158] Determine the moving distance of each layer of images in the superimposed image except the image to be processed according to the motion amplitude information;
[0159] According to the movement direction and movement distance, the movement of each layer of images in the superimposed image except the image to be processed is controlled.
[0160] In a possible implementation, the specific operation includes any of the following:
[0161] A first designated action of a user on a terminal displaying an overlay image;
[0162] a second designated action of the user on the display page where the overlay image is located;
[0163] A third designated action of the user on the overlay image.
[0164] In a possible implementation, if the specific operation is the third designated action, the image processing device 30 further includes a jump module, and the jump module is used to:
[0165] When the moving distance meets the preset conditions, jump to the advertising information display page corresponding to the image to be processed;
[0166] When the moving distance does not meet the preset condition and cancellation of the third designated action is detected, the display state of the superimposed image is controlled to be restored to the state before the third designated action is detected.
[0167] The image processing device of the embodiment of the present application can execute the image processing method provided by the embodiment of the present application, and the implementation principle is similar. The actions performed by each module in the image processing device in each embodiment of the present application correspond to the steps in the image processing method in each embodiment of the present application. For the detailed functional description of each module of the image processing device, please refer to the description in the corresponding image processing method shown in the previous text, which will not be repeated here.
[0168] The image processing device provided in this embodiment, the terminal receives and displays the superimposed image sent by the server, the superimposed image includes the image to be processed and at least one layer of image obtained based on the image to be processed; when a specific operation of the user is detected, the layers of images in the superimposed image except the image to be processed are controlled to move according to the specific operation. The technical solution provided in this application processes the static image, without the need for modeling and without causing image distortion, so that the processed image presents a dynamic change effect according to the specific operation of the user, enriches the image display form, attracts users to interact, and improves the user experience.
[0169] The above embodiment introduces an image processing device from the perspective of a virtual module. The following describes an electronic device from the perspective of a physical module, as shown below:
[0170] The present application embodiment provides an electronic device, such as Figure 7 As shown, Figure 7 The electronic device 9000 shown includes: a processor 9001 and a memory 9003. The processor 9001 and the memory 9003 are connected, such as through a bus 9002. Optionally, the electronic device 9000 may also include a transceiver 9004. It should be noted that in actual applications, the transceiver 9004 is not limited to one, and the structure of the electronic device 9000 does not constitute a limitation on the embodiments of the present application.
[0171] The processor 9001 may be a CPU, a general-purpose processor, a GPU, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor 9001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0172] The bus 9002 may include a path to transmit information between the above components. The bus 9002 may be a PCI bus or an EISA bus, etc. The bus 9002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0173] The memory 9003 may be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an EEPROM, a CD-ROM or other optical disk storage, an optical disk storage (including a compressed optical disk, a laser disk, an optical disk, a digital versatile disk, a Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.
[0174] The memory 9003 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 9001. The processor 9001 is used to execute the application code stored in the memory 9003 to implement the content shown in any of the above method embodiments.
[0175] An embodiment of the present application provides an electronic device, and the electronic device in the embodiment of the present application includes: one or more processors; a memory; one or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and when the one or more programs are executed by the processor, at least two layers of images are obtained based on the image to be processed, wherein the image to be processed is included in at least two layers of images, and the image size of the image to be processed in at least two layers of images is the smallest, and the image size of each layer of images increases in sequence; the internal area of each layer of images except the image with the largest size in the at least two layers of images is cropped to obtain each cropped image; the cropped images and the image with the largest size are superimposed from bottom to top in order of image size from large to small to obtain a superimposed image and send it to the terminal for the terminal to display, and when the terminal detects a specific operation of the user, the layers of images in the superimposed image except the image to be processed are controlled to move according to the specific operation. Or
[0176] An overlay image sent by a server is received and displayed, wherein the overlay image includes an image to be processed and at least one layer of image obtained based on the image to be processed; when a specific operation of a user is detected, each layer of image in the overlay image except the image to be processed is controlled to move according to the specific operation.
[0177] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program runs on a processor, the processor can execute the corresponding content in the aforementioned method embodiment.
[0178] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0179] The above descriptions are only some embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. An image processing method, characterized in that: The method comprises: Based on the image to be processed, at least two layers of images are obtained, wherein the at least two layers of images include the image to be processed, the image size of the image to be processed is the smallest among the at least two layers of images, and the image size of each layer of images increases in sequence; Performing internal region cropping on each layer of images except the image with the largest size in the at least two layers of images to obtain cropped images; In the order of image size from large to small, the cropped images and the image with the largest size are superimposed from bottom to top to obtain a superimposed image and send it to the terminal so that the terminal can display it. When the terminal detects a specific operation of the user, the terminal controls the movement of each layer of images in the superimposed image except the image to be processed according to the specific operation.
2. The method according to claim 1, characterized in that The step of obtaining at least two layers of images based on the image to be processed includes: Determine the image enlargement size; Performing at least one magnification process on the image to be processed according to the image magnification size to obtain an image after each magnification process, wherein the at least two layers of images include the image after the magnification process; The step of performing internal region cropping on each layer of images except the image with the largest size in the at least two layers of images includes: The internal regions of the images of each layer except the image with the largest size after each magnification process are cropped, wherein the smaller the size of the image after the magnification process is, the larger the size of the cropped region of the image is.
3. The method according to claim 2, characterized in that The step of performing internal region cropping on each layer of images except the image with the largest size after each magnification process comprises: According to at least one of a preset region shape or a cropping size corresponding to each layer of the image, the designated region of each layer of the image except the image with the largest size in each enlarged image is cropped.
4. The method according to any one of claims 1 to 3, characterized in that In the superimposed image, the upper layer image is located in the central area of the lower layer image.
5. The method according to any one of claims 1 to 3, characterized in that The specific operation includes any of the following: a first designated action of a user on a terminal displaying the overlay image; a second designated action of the user on the display page where the overlay image is located; A third designated action of the user on the overlay image.
6. An image processing method, characterized in that: The method comprises: Receiving and displaying a superimposed image sent by a server, wherein the superimposed image is obtained by processing using the method described in any one of claims 1 to 5; When a specific operation of the user is detected, each layer of images in the superimposed image except the image to be processed is controlled to move according to the specific operation.
7. The method according to claim 6, characterized in that The controlling, according to the specific operation, to move each layer of images in the superimposed image except the image to be processed includes: Determining the action direction and action amplitude information of the specific operation; Determine the moving distance of each layer of images in the superimposed image except the image to be processed according to the motion amplitude information; According to the movement direction and the movement distance, the movement of each layer of images in the superimposed image except the image to be processed is controlled.
8. An image processing device, characterized in that: The device comprises: A processing module, configured to obtain at least two layers of images based on the image to be processed, wherein the at least two layers of images include the image to be processed, the image size of the image to be processed is the smallest among the at least two layers of images, and the image size of each layer of images increases in sequence; A cropping module, used for cropping the internal area of each layer of images except the image with the largest size in the at least two layers of images to obtain cropped images; The superposition module is used to superimpose the cropped images and the image with the largest size from bottom to top in the order of image size from large to small, obtain the superimposed image and send it to the terminal so that the terminal can display it. When the terminal detects a specific operation of the user, the terminal controls the movement of each layer of images in the superimposed image except the image to be processed according to the specific operation.
9. The device according to claim 8, characterized in that The processing module is used for: Determine the image enlargement size; Performing at least one magnification process on the image to be processed according to the image magnification size to obtain an image after each magnification process, wherein the at least two layers of images include the image after the magnification process; The cutting module is used to: The internal regions of the images of each layer except the image with the largest size after each magnification process are cropped, wherein the smaller the size of the image after the magnification process is, the larger the size of the cropped region of the image is.
10. The device according to claim 9, characterized in that The cutting module is used to: According to at least one of a preset region shape or a cropping size corresponding to each layer of the image, the designated region of each layer of the image except the image with the largest size in each enlarged image is cropped.
11. The device according to any one of claims 8 to 10, characterized in that In the superimposed image, the upper layer image is located in the central area of the lower layer image.
12. The device according to any one of claims 8 to 10, characterized in that The specific operation includes any of the following: a first designated action of a user on a terminal displaying the overlay image; a second designated action of the user on the display page where the overlay image is located; A third designated action of the user on the overlay image.
13. An image processing device, characterized in that: The device comprises: A display module, used for receiving and displaying a superimposed image sent by a server, wherein the superimposed image is obtained by processing using the method according to any one of claims 1 to 5; The control module is used for controlling the movement of each layer of images in the superimposed image except the image to be processed according to the specific operation when a specific operation of the user is detected.
14. The device according to claim 13, characterized in that The control module is used for: Determining the action direction and action amplitude information of the specific operation; Determine the moving distance of each layer of images in the superimposed image except the image to be processed according to the motion amplitude information; According to the movement direction and the movement distance, the movement of each layer of images in the superimposed image except the image to be processed is controlled.
15. An electronic device, characterized in that: The electronic device comprises: one or more processors; Memory; One or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 7.
16. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program. When the computer program runs on a processor, the processor can execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Virtual reality device and corresponding display method
CN106681512A
Staggered layer display method for picture, electronic equipment and storage medium
CN108845737A