Image processing method and apparatus, device, computer-readable storage medium and computer program

The image processing method dynamically determines mirror lines based on content to improve expressiveness and visual impact, addressing limitations of conventional methods by adapting to various scenes and objects.

JP2026513704APending Publication Date: 2026-04-30BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2024-06-06
Publication Date
2026-04-30

AI Technical Summary

Technical Problem

Conventional image processing methods lack strong expressiveness and visual impact, with limited mirroring effects often requiring specific scenes like water surfaces and being laborious to achieve.

Method used

An image processing method that determines a mirror line based on content information to divide an image into regions, applying mirrored content to enhance expressiveness and visual impact, adaptable to various scenes and objects.

Benefits of technology

The method provides personalized and dynamic mirroring effects, enhancing image expressiveness and visual impact by aligning mirror lines with image content, suitable for diverse scenes and objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026513704000001_ABST
    Figure 2026513704000001_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to image processing methods and apparatus, devices and media, wherein the method includes acquiring a target image awaiting processing; acquiring content information of the target image; determining the positions in the target image of mirror lines dividing the target image into a first region and a second region based on the content information; determining mirror content corresponding to the image content of the first region based on the positions of the mirror lines in the target image and the second region; and covering the image content of the second region with the mirror content so as to acquire a processed target image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] [Cross-reference to Related Applications] This application claims priority to Chinese Patent Application No. 202310768363.9, filed on June 27, 2023, with the title "Image Processing Method, Apparatus, Device, and Medium", the entire content of which is incorporated herein by reference.

[0002] [Technical Field] The present disclosure relates to the technical field of image processing, and in particular, to an image processing method, apparatus, device, and medium.

Background Art

[0003] Currently, the number of users who choose to process the original image using editing software, image design tools, etc. is increasing. The inventors have found through research that all conventional image processing methods are relatively good-looking, for example, they only stay at operations such as simple image beautification and filtering, so the expressiveness of the image is not strong and the visual impact effect is weak.

Summary of the Invention

[0004] To solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides an image processing method, apparatus, device, and medium.

[0005] Embodiments of the present disclosure provide an image processing method, the method including: obtaining a target image waiting to be processed; obtaining content information of the target image; determining a position of a mirror line in the target image that divides the target image into a first region and a second region based on the content information; determining mirror content corresponding to the image content of the first region based on the position of the mirror line in the target image and the second region; and covering the image content of the second region with the mirror content to obtain a processed target image.

[0006] The step of selecting the position of the mirror line in the target image based on the content information includes determining the target scene type to which the target image belongs from among a predetermined plurality of scene types based on the content information, and determining the position of the mirror line in the target image based on the target scene type.

[0007] Selectively, the step of determining the position of the mirror line in the target image based on the target scene type includes determining a target angle based on the target scene type, wherein the target angle is the angle between the mirror line and a predetermined reference line, and determining the position of the mirror line in the target image based on the target angle and the content information.

[0008] The step of determining the target angle based on the target scene type, which can be selected, includes determining the target angle corresponding to the target scene type based on a pre-set correspondence between scene types and mirror line angles.

[0009] Selectively determining the position of the mirror line in the target image based on the target angle and the content information includes obtaining a predetermined image division condition and determining the position of the mirror line in the target image based on the target angle, the content information, and the image division condition, wherein the first and second regions obtained by division by the mirror line satisfy the image division condition.

[0010] Selectively, the image segmentation conditions include one or more of the following: the area of ​​the first region is greater than or equal to the area of ​​the second region; the main object in the target image is located in the first region and the main object is determined based on the content information of the target image; and the ratio of the second region to the target image is within a predetermined ratio interval.

[0011] Selectively, the subject object is determined by generating a heatmap of the target image based on the content information of the target image, and then determining the subject object based on the heatmap.

[0012] The step of selecting the position of the mirror line in the target image based on the target angle, the content information, and the image division conditions includes determining the initial target position corresponding to the target angle based on a pre-set correspondence between the mirror line angle and the initial mirror line position, and, if the first and second regions divided by the mirror line at the initial target position do not satisfy the image division conditions, adjusting the position of the mirror line from the initial target position until the first and second regions divided by the adjusted mirror line satisfy the image division conditions.

[0013] The step of selectively adjusting the position of the mirror line from the initial target position includes translating the position of the mirror line from the initial target position according to a predetermined step size.

[0014] The step of selectively acquiring the target image awaiting processing includes acquiring the original image, acquiring the global main direction of the original image, and, if the global main direction of the original image does not coincide with a predetermined direction, modifying the original image to acquire the target image awaiting processing.

[0015] Embodiments of the present disclosure further provide an image processing apparatus, the apparatus including: an image acquisition module for acquiring a target image awaiting processing; a content acquisition module for acquiring content information of the target image; a mirror line determination module for determining the position of mirror lines in the target image that divide the target image into a first region and a second region based on the content information; a mirror content determination module for determining mirror content corresponding to the image content of the first region based on the position of the mirror lines in the target image and the second region; and a content cover module for covering the image content of the second region with the mirror content in order to acquire a processed target image.

[0016] Embodiments of the present disclosure further provide electronic equipment including a processor and a memory for storing instructions that can be executed by the processor, wherein the processor is used to read the executable instructions from the memory and to execute the instructions in order to implement an image processing method according to embodiments of the present disclosure.

[0017] Embodiments of the present disclosure further provide a computer-readable storage medium in which a computer program for performing an image processing method according to embodiments of the present disclosure is stored.

[0018] Embodiments of the present disclosure further provide a computer program product including a computer program, which, when executed by a processor, implements an image processing method according to embodiments of the present disclosure.

[0019] It should be understood that the content described in this section is not intended to identify any essential or important features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will be readily apparent from the following specification.

[0020] The drawings herein are incorporated into the specification and form a part of this specification, showing embodiments suitable for the present disclosure and used, together with the specification, for the interpretation of the principles of the present disclosure. To more clearly explain the technical solutions in the embodiments of the present disclosure or the prior art, the drawings necessary for the description of the embodiments or the prior art will be briefly described below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative efforts.

Brief Description of the Drawings

[0021] [Figure 1] It is a flowchart of an image processing method according to an embodiment of the present disclosure. [Figure 2] It is a schematic diagram of the main direction of an image according to an embodiment of the present disclosure. [Figure 3] It is a schematic diagram of the angles of a plurality of mirror lines according to an embodiment of the present disclosure. [Figure 4] It is a schematic diagram comparing the original image and the heat map according to an embodiment of the present disclosure. [Figure 5] It is a schematic diagram of the position adjustment of a mirror line according to an embodiment of the present disclosure. [Figure 6] It is a schematic diagram of the processed target image according to an embodiment of the present disclosure. [Figure 7] It is a schematic diagram of the processed target image according to an embodiment of the present disclosure. [Figure 8] It is a schematic diagram of the structure of an image processing apparatus according to an embodiment of the present disclosure. [Figure 9] It is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure.

Modes for Carrying Out the Invention

[0022] To more clearly understand the above objects, features, and advantages of the present disclosure, the technical solutions of the present disclosure will be further described below. Unless there is a contradiction, the embodiments of the present disclosure and the features in the embodiments can be combined with each other.

[0023] The following description includes many specific details to make the disclosure easier to understand, but the disclosure may be implemented in forms other than those described herein, and obviously the examples in the specification are only a selection of the examples of the disclosure, not all of them.

[0024] Conventional image processing methods lack strong image expressiveness and have weak visual impact. The inventors discovered that image mirroring effects usually possess a certain degree of expressiveness and can provide users with a strong visual impact. However, in reality, there are few scenes in which image mirroring effects can be achieved. For example, many users need to take reflection photographs in scenes with water surfaces to achieve image mirroring effects, which is time-consuming and laborious. Moreover, the achievable mirroring effect is usually limited to a single type, mostly horizontal mirroring, making it difficult to meet user needs. To improve at least one of these problems, embodiments of this disclosure provide image processing methods, apparatus, devices, and media that can directly achieve mirroring effects through image processing, not limited to water surface scenes. Furthermore, embodiments of this disclosure can directly perform mirroring based on image content, targeting specific objects. The resulting mirrored content is more closely suited to the actual scene, possesses stronger image expressiveness, provides users with a personalized viewing experience, and effectively enhances the visual impact. For easier understanding, the following provides a detailed explanation.

[0025] Figure 1 is a flowchart of an image processing method according to an embodiment of the present disclosure, the method being executable by an image processing device, which can be implemented using software and / or hardware and is generally integrable into electronic equipment. As shown in Figure 1, the method mainly comprises the following steps S102 to S110: In step S102, the target image awaiting processing is acquired.

[0026] The embodiments of this disclosure do not limit the image content of the target image or the method of acquiring the target image. For example, the target image may be an image taken by the user on-site, or an image selected by the user locally or in the cloud. Furthermore, the target image may be the original image, or an image obtained by pre-processing the original image. The pre-processing may be, for example, correction or beautification, and is not limited herein.

[0027] In step S104, the content information of the target image is obtained.

[0028] In some embodiments, various objects contained in a target image can be detected using one or more object detection algorithms, and these objects include, but are not limited to, any specified type of object such as people, animals, road signs, vehicles, buildings, trees, and water surfaces. The content information of the target image may include type information and location information of the objects contained in the target image, and may also include, but is not limited to, scene information obtained based on object recognition.

[0029] In step S106, the position of the mirror line in the target image is determined based on the content information, where the mirror line divides the target image into a first region and a second region. In other words, the mirror line is the boundary line between the first region and the second region.

[0030] For example, based on content information, the scene type to which the target image belongs can be identified, and different scene types correspond to different mirror line directions. Furthermore, based on content information, the main object in the target image can be identified, and then the specific position of the mirror line can be determined based on the type and / or position of the main object. The above method can directly determine the mirror line based on content information, and compared to methods in related technologies where the mirror line is fixedly set or where the mirror line must be specified by the user, the above method according to the embodiments of this disclosure is not only easier and faster, but can also effectively guarantee the mirror effect of the image.

[0031] In step S108, the mirror content corresponding to the image content of the first region is determined based on the position of the mirror line in the target image and the second region.

[0032] In practical applications, the first region can be mirrored along a mirror line to obtain mirrored content that conforms to the shape and size of the second region, based on the position of the mirror line in the target image. It should be noted that if the area of ​​the second region is smaller than the area of ​​the first region, the image content of the first region can be mirrored based only on the shape and size of the second region and the position of the mirror line, without mirroring all of the image content of the first region.

[0033] In step S110, the image content of the second region is covered with mirrored content in order to obtain the processed target image.

[0034] In some specific embodiments, the area of ​​the first region is greater than or equal to the area of ​​the second region, and the mirror content corresponding to the image content of the first region can completely cover the image content of the second region. The image content of the first region and the mirror content of the second region together constitute the processed target image.

[0035] The image processing method according to the embodiments of this disclosure can easily and quickly present a mirror visual effect to the user. Furthermore, since the position of the mirror lines is not fixed but is personalized and determined based on the image content information, the resulting mirror content is more closely suited to the actual scene, has stronger image expressive power, and can effectively improve the visual impact effect.

[0036] To further enhance the visual effect of the image, the embodiments of the present disclosure provide an embodiment of step S102, namely, acquiring a target image awaiting processing, which specifically includes acquiring the original image, acquiring the global main direction of the original image, and, if the global main direction of the original image does not coincide with a predetermined direction, modifying the original image to acquire a target image awaiting processing.

[0037] Here, the global main direction may be understood as the direction in which the original image was captured. To facilitate understanding, as shown in Figure 2, a schematic diagram of the main direction of the image, the direction in which the original image was captured is not the horizontal positive direction. Therefore, the resulting original image appears to have some degree of tilt, and in related technologies, it is usually necessary to manually adjust the orientation of the image. In the embodiments of this disclosure, the main direction of the image can be automatically detected and the image corrected. In practical applications, the global main direction of the original image can be obtained by an orientation detection algorithm or a deep learning model pre-trained on training samples in which the main direction of the image is marked. If the original image was captured by a device performing the current image processing method, the global main direction of the image can also be analyzed by directly obtaining information such as parameters at the time the original image was captured by the device, such as gyroscope information and camera parameters. The above are all illustrative descriptions, and any method for obtaining the global main direction may be used and is not limited herein.

[0038] If the global main direction of the original image does not match the predetermined direction, corrective operations such as rotating the original image can be performed to make the global main direction of the resulting target image match the predetermined direction. For example, the target image can be presented to the user with a horizontally positive visual effect, thereby effectively improving the user's viewing experience, facilitating the subsequent determination of the mirror line direction, and further determining the specific position of the mirror line.

[0039] In order to reasonably and reliably determine the mirror lines in the target image, in some embodiments, step S106, i.e., the step of determining the position of the mirror lines in the target image based on content information, can be performed by referring to steps 1 and 2 below: In Step 1, based on the content information, the target scene type to which the target image belongs is determined from among a predetermined set of multiple scene types. For example, the multiple scene types include scenes of water surfaces and roads, scenes of urban architecture, scenes of streets, scenes of pedestrians, and scenes of still life. Still life scenes can be further classified into still lifes with elongated shapes and still lifes with low, flat shapes based on the shape of the still lifes. In other words, multiple scene types can be flexibly set according to the actual needs, and there are no limitations here.

[0040] In step 2, the position of the mirror line in the target image is determined based on the target scene type.

[0041] To make it easier to understand, the position of the corresponding mirror lines also differs depending on the type of scene, as people perceive the screen differently.

[0042] For example, step 2 above can be performed by referring to steps A and B below.

[0043] In step A, the target angle is determined based on the target scene type, where the target angle is the angle between the mirror line and a predetermined reference line.

[0044] In several specific embodiments, an optimal mirror line angle corresponding to each scene type can be pre-set based on the characteristics of various scene types, and a target angle corresponding to a target scene type can be determined based on the correspondence between the pre-set scene types and mirror line angles. For example, taking the predetermined reference line as a horizontal line, the mirror line angle corresponding to a water surface or road surface scene may be 45 degrees, thereby presenting the user with a dramatic visual effect of the water surface or road surface being folded. The mirror line angle corresponding to a pedestrian scene may be 90 degrees, that is, presenting people with a visual effect of vertical mirror folding. However, the mirror line angle corresponding to a city building scene may be 0 degrees, presenting people with a visual effect of horizontal mirror folding. The above are all illustrative explanations, and in actual applications, the mirror line angles corresponding to various scene types can be flexibly set according to the effect to be achieved.

[0045] For easier understanding, you may refer to the schematic diagram of multiple mirror line angles shown in Figure 3. Assuming the reference line is horizontal, Figure 3(a) shows that the angle between the mirror line and a given reference line is 45 degrees, Figure 3(b) shows that the angle between the mirror line and a given reference line is 90 degrees, and Figure 3(c) shows that the angle between the mirror line and a given reference line is 0 degrees. It should be noted that Figure 3 simply illustrates three types of mirror line angles, and in actual applications, angles such as 60 degrees and 30 degrees can be flexibly set, and are not limited here. Based on the target scene type, the angle of the mirror line in the target image (target angle) can first be determined. As can be understood, there may be multiple positions for the mirror line with the target angle, and then the optimal position of the mirror line in the target image can be further determined.

[0046] In step B, the position of the mirror line in the target image is determined based on the target angle and content information.

[0047] If the mirror line angle is known, it can be analyzed in conjunction with content information in the target image to determine the optimal position of the mirror line, thereby presenting a better mirror visual effect to the user. This can be done by referring to steps B1-B2 below as an example: In step B1, a predetermined image segmentation condition is obtained. In some embodiments, the image segmentation condition includes one or more of the following conditions (1) to (3): (1) The area of ​​the first region is greater than or equal to the area of ​​the second region. The first region is the region that needs to be mirrored, and the second region is the region that needs to be covered by the mirrored content of the first region. Therefore, in order to ensure visual accessibility, the area of ​​the first region is greater than or equal to the area of ​​the second region.

[0048] (2) The main object in the target image is located in the first region, and the main object is determined based on the content information of the target image.

[0049] Exemplary, the subject object is identified by generating a heatmap of the target image based on the content information of the target image, and then identifying the subject object based on the heatmap. For easier understanding, you may refer to the schematic comparison of the original image and the heatmap shown in Figure 4, where the heatmap clearly shows the subject object in the image. In practical applications, strife detection of the image can be performed based on the content information of the target image, thereby generating a heatmap of the target image. The above is merely an illustrative explanation; in practical applications, each object contained in the target image can also be identified based on an object detection algorithm, and the subject object can be identified based on the type and / or position of each object.

[0050] By restricting the main object to being located in the first area, mirroring the main object becomes possible, enhancing the user's visual impact.

[0051] (3) The proportion of the second region to the target image is within a predetermined proportion interval.

[0052] By setting a percentage range for the second area, it is possible to avoid the second area being too large or too small, that is, to ensure that the percentage of mirrored content in the first area of ​​the target image is within an appropriate range, thereby guaranteeing a good viewing experience for the user.

[0053] In step B2, the position of the mirror line in the target image (which may be understood as the optimal position) is determined based on the target angle, content information, and image division conditions, where the first and second regions obtained by division by the mirror line satisfy the image division conditions.

[0054] In some specific examples, the following steps B2.1 to B2.2 can be followed: In step B2.1, the initial target position corresponding to the target angle is determined based on the correspondence between the pre-set mirror line angle and the initial mirror line position.

[0055] In practical applications, each mirror line angle can have its corresponding initial position pre-set. For example, if the reference line is horizontal, a mirror line angle of 90 degrees can set the initial position of the mirror line to the vertical center line of the target image; a mirror line angle of 0 degrees can set the initial position of the mirror line to the horizontal center line of the target image; and a mirror line angle of 45 degrees can set the endpoint of the mirror line to a specified vertex of the target image.

[0056] In step B2.2, if the first and second regions divided by the mirror line at the initial target position do not satisfy the image division condition, the position of the mirror line is adjusted from the initial target position until the first and second regions divided by the adjusted mirror line satisfy the image division condition.

[0057] If the first and second regions, separated by the mirror line at the initial target position, satisfy the image division conditions, the initial target position is set to the optimal position of the mirror line. If the image division conditions are not met, trial adjustments must be made from the initial target position until the optimal position of the mirror line is found, thereby ensuring that the first and second regions, separated by the adjusted mirror line, satisfy the image division conditions.

[0058] In a specific embodiment where the position of the mirror line is adjusted from the initial target position, the position of the mirror line can be translated from the initial target position according to a predetermined step size until the image division condition is met.

[0059] To facilitate understanding, let us refer to the schematic diagram of mirror line position adjustment shown in Figure 5. Assuming that the main object in the target image is a person, and that the reference line is a horizontal line, the angle between the mirror line and the predetermined reference line is 90 degrees, and the initial position of the mirror line is L0, however, the first and second regions obtained by division at this time do not satisfy the image division condition, that is, the main object is not completely located in the first region. Therefore, the mirror line can be moved according to a predetermined step size, the step size can be flexibly set according to the need, and a discrimination operation is performed each time the mirror line is moved until the first and second regions divided by the adjusted mirror line satisfy the image division condition, such as the mirror line position L1 in Figure 5. With the above method, the optimal position of the mirror line can be determined quickly and efficiently.

[0060] The image processing method described in the embodiments of this disclosure allows for the easy and rapid presentation of a mirror visual effect to the user. Since the position of the mirror lines is not fixed but personalized and determined based on the image content information, the resulting mirror content is more closely suited to the actual scene, possesses stronger visual expressiveness, and can effectively improve the visual impact effect. For ease of understanding, refer to the schematic diagrams of the processed target images shown in Figures 6 and 7, respectively. In the street scene shown in Figure 6 and the urban architecture scene shown in Figure 7, the mirror lines are marked in Figures 6 and 7 for ease of understanding, but in actual applications, the mirror lines do not need to be marked. The position of the mirror lines differs in different scenes, and the effects presented to the viewer also differ, but all have a strong visual impact. In fact, it even makes possible surrealistic expressions where the world appears folded, such as the sea being distorted at a 90-degree angle, water flowing simultaneously horizontally and vertically, or city architecture being inverted to present a futuristic view of a castle in the sky. Through this method, the dramatic and magical feeling of the screen is enhanced, and users are given an impactful new perspective for observing the world.

[0061] Corresponding to the image processing method described above, Figure 8 is a schematic diagram of the structure of an image processing apparatus according to an embodiment of the present disclosure, which can be implemented by software and / or hardware and can generally be integrated into electronic equipment, as shown in Figure 8, the apparatus is Image acquisition module 802 for obtaining target images awaiting processing, A content acquisition module 804 for obtaining content information of the target image, A mirror line determination module 806 for determining the position of mirror lines in the target image that divide the target image into a first region and a second region based on content information, A mirror content determination module 808 for determining the mirror content corresponding to the image content of the first region based on the position of the mirror line in the target image and a second region, The system includes a content cover module 810 for covering the image content of a second region using mirrored content to obtain a processed target image.

[0062] The image processing apparatus according to the embodiments of this disclosure can easily and quickly present a mirror visual effect to the user. Since the position of the mirror lines is not fixed but personalized and determined based on image content information, the resulting mirror content is more closely suited to the actual scene, has stronger image expressive power, and can effectively improve the visual impact effect.

[0063] In some embodiments, the mirror line determination module 806 is specifically used to determine, based on the content information, the target scene type to which the target image belongs from among a predetermined plurality of scene types, and to determine the position of the mirror line in the target image based on the target scene type.

[0064] In some embodiments, the mirror line determination module 806 specifically determines a target angle based on the target scene type, where the target angle is the angle between the mirror line and a predetermined reference line, and is used to determine the position of the mirror line in the target image based on the target angle and the content information.

[0065] In some embodiments, the mirror line determination module 806 is specifically used to determine a target angle corresponding to a target scene type based on a pre-set correspondence between a scene type and a mirror line angle.

[0066] In some embodiments, the mirror line determination module 806 specifically acquires predetermined image division conditions and determines the position of the mirror line in the target image based on the target angle, the content information, and the image division conditions, where the first and second regions obtained by division by the mirror line are used to satisfy the image division conditions.

[0067] In some embodiments, the image segmentation condition includes one or more of the following: the area of ​​the first region is greater than or equal to the area of ​​the second region; the main object in the target image is located in the first region and the main object is determined based on the content information of the target image; and the ratio of the second region to the target image is within a predetermined ratio interval.

[0068] In some embodiments, the subject object is determined by generating a heatmap of the target image based on the content information of the target image, and then determining the subject object based on the heatmap.

[0069] In some embodiments, the mirror line determination module 806 is used to determine the target initial position corresponding to the target angle based on a pre-set correspondence between the mirror line angle and the initial mirror line position, and, if the first and second regions divided by the mirror line at the initial target position do not satisfy the image division condition, to adjust the position of the mirror line from the initial target position until the first and second regions divided by the adjusted mirror line satisfy the image division condition.

[0070] In some embodiments, the mirror line determination module 806 is specifically used to move the position of the mirror line from the initial target position according to a predetermined step size.

[0071] In some embodiments, the image acquisition module 802 is specifically used to acquire the original image, acquire the global main direction of the original image, and, if the global main direction of the original image does not coincide with a predetermined direction, to acquire a target image awaiting processing.

[0072] The image processing apparatus according to the embodiments of the present disclosure can perform the image processing method according to any embodiment of the present disclosure and has corresponding functional modules and beneficial effects for performing the method.

[0073] As will be obvious to those skilled in the art, for the sake of clarity and conciseness, the specific operating processes of the embodiments of the apparatus described above can be referenced to the corresponding processes in the embodiments of the method and will not be repeated here.

[0074] Figure 9 is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. As shown in Figure 9, the electronic device 900 includes one or more processors 901 and memory 902.

[0075] The processor 901 may be a central processing unit (CPU) or another form of processing unit having data processing capability and / or instruction execution capability, and can control other components in the electronic device 900 to perform a desired function.

[0076] The memory 902 may include one or more computer program products, which may include various forms of computer-readable storage media such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or high-speed cache memory (cache). The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions can be stored in the computer-readable storage media, and the processor 901 can implement the image processing method and / or other desired functions of the embodiments of this disclosure described above by executing the program instructions. Various contents such as input signals, signal components, and noise components may be further stored in the computer-readable storage media.

[0077] In one example, the electronic device 900 may further include an input device 903 and an output device 904, and these components are interconnected by a bus system and / or other forms of connection mechanisms (not shown).

[0078] Furthermore, the input device 903 may include, for example, a keyboard, a mouse, and the like.

[0079] The output device 904 can output various information to the outside, including determined distance information and direction information. The output device 904 may include, for example, a display, a speaker, a printer, a communication network, and remote output devices connected thereto.

[0080] Of course, for the sake of simplification, Figure 9 shows only some of the components of the electronic device 900 relevant to this disclosure, omitting components such as buses and input / output interfaces. Beyond that, depending on the specific application, the electronic device 900 may further include any other appropriate components.

[0081] In addition to the above-described methods and apparatus, embodiments of this disclosure may also be computer program products including computer program instructions, which, when executed by a processor, cause the processor to execute the image processing method according to embodiments of this disclosure.

[0082] The computer program product may be composed of program code for performing the operations of the embodiments of this disclosure in any combination of one or more programming languages, the programming languages ​​including object-oriented programming languages ​​such as Java® and C++, and further including conventional procedural programming languages ​​such as C or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, executed as a standalone software package, partially on the user's computing device and partially on a remote computing device, or fully on a remote computing device or server.

[0083] Furthermore, the embodiments of this disclosure may also be computer-readable storage media in which computer program instructions are stored, and when the computer program instructions are executed by a processor, the processor is instructed to execute the image processing method according to the embodiments of this disclosure.

[0084] The computer-readable storage medium may employ any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium includes, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any combination of more than these. More specific examples of readable storage media (a non-exhaustive list) include electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.

[0085] Embodiments of the present disclosure further provide a computer program product including a computer program / instruction, which, when executed by a processor, implements the image processing method of the embodiment of the present disclosure.

[0086] In this specification, relational terms such as “first” and “second” are used merely to distinguish one entity or operation from another, and do not necessarily require or suggest that any such actual relationship or order exists between these entities or operations. Furthermore, terms such as “includes,” “comprising,” or any other variation thereof are intended to cover non-exclusive inclusion, meaning that a process, method, article, or apparatus containing a set of elements includes not only those elements but also other elements not explicitly listed, or further elements specific to such a process, method, article, or apparatus. Unless otherwise specified, an element limited by the phrase “includes one…” does not preclude the existence of another identical element in a process, method, article, or apparatus containing such element.

[0087] The above description is merely a specific embodiment of the Disclosure, intended to enable those skilled in the art to understand or implement the Disclosure. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the Disclosure. Accordingly, the Disclosure is not limited to these embodiments described herein, but rather conforms to the broadest extent to which the principles and novel features disclosed herein are consistent.

Claims

1. An image processing method, To obtain the target image awaiting processing, To obtain the content information of the aforementioned target image, Based on the content information, the position of the mirror line in the target image that divides the target image into a first region and a second region is determined. Based on the position of the mirror line in the target image and the second region, the mirror content corresponding to the image content of the first region is determined. An image processing method comprising covering the image content of a second region with the mirrored content in order to obtain a processed target image.

2. The step of determining the position of the mirror line in the target image based on the content information is: Based on the aforementioned content information, the target scene type to which the target image belongs is determined from among a predetermined number of scene types, The method according to claim 1, further comprising determining the position of the mirror line in the target image based on the target scene type.

3. The step of determining the position of the mirror line in the target image based on the target scene type is: Based on the aforementioned target scene type, the target angle is determined, where the target angle is the angle between the mirror line and a predetermined reference line. The method according to claim 2, further comprising determining the position of the mirror line in the target image based on the target angle and the content information.

4. The step of determining the target angle based on the target scene type is: The method according to claim 3, comprising determining the target angle corresponding to the target scene type based on the correspondence between a pre-set scene type and the mirror line angle.

5. The step of determining the position of the mirror line in the target image based on the target angle and the content information is: Obtaining the predetermined image segmentation conditions, The method according to claim 3, comprising determining the position of the mirror line in the target image based on the target angle, the content information, and the image division conditions, wherein the first region and the second region obtained by division by the mirror line satisfy the image division conditions.

6. The aforementioned image segmentation conditions are: The area of ​​the first region is greater than or equal to the area of ​​the second region, The subject object in the target image is located in the first region, and the subject object is determined based on the content information of the target image. The method according to claim 5, comprising one or more of the following: the ratio of the second region to the target image is within a predetermined ratio interval range.

7. The method according to claim 6, wherein the subject object is determined by generating a heatmap of the target image based on the content information of the target image, and determining the subject object based on the heatmap.

8. The step of determining the position of the mirror line in the target image based on the target angle, the content information, and the image division conditions is: Based on the correspondence between a pre-set mirror line angle and the initial mirror line position, the initial target position corresponding to the target angle is determined, The method according to claim 5, further comprising, if the first and second regions divided by the mirror line at the initial target position do not satisfy the image division condition, adjusting the position of the mirror line from the initial target position until the first and second regions divided by the adjusted mirror line satisfy the image division condition.

9. The step of adjusting the position of the mirror line from the initial position of the target is, The method according to claim 8, comprising moving the position of the mirror line in parallel from the initial position of the target according to a predetermined step size.

10. The step of obtaining the aforementioned target image awaiting processing is: Obtain the original image, and obtain the global main direction of the said original image, The method according to claim 1, further comprising modifying the original image to obtain a target image awaiting processing if the global main direction of the original image does not coincide with a predetermined direction.

11. An image processing device, An image acquisition module for obtaining target images awaiting processing, A content acquisition module for obtaining content information of the target image, A mirror line determination module for determining the position in the target image of the mirror lines that divide the target image into a first region and a second region based on the content information, A mirror content determination module for determining mirror content corresponding to the image content of the first region based on the position of the mirror line in the target image and the second region, An image processing apparatus, comprising a content cover module for covering the image content of a second region using the mirrored content to acquire a processed target image.

12. It is an electronic device, It includes a processor and a memory for storing instructions that can be executed by the processor, Electronic device wherein the processor is used to read the executable instructions from the memory and to execute the instructions in order to realize the image processing method described in any one of claims 1 to 10.

13. A computer-readable storage medium storing a computer program for executing the image processing method described in any one of claims 1 to 10.

14. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, realizes the image processing method described in any one of claims 1 to 10.