CN113284040A - Picture processing method and device - Google Patents

Picture processing method and device Download PDF

Info

Publication number
CN113284040A
CN113284040A CN202010104777.8A CN202010104777A CN113284040A CN 113284040 A CN113284040 A CN 113284040A CN 202010104777 A CN202010104777 A CN 202010104777A CN 113284040 A CN113284040 A CN 113284040A
Authority
CN
China
Prior art keywords
overexposure
picture
area
pixel
point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010104777.8A
Other languages
Chinese (zh)
Inventor
王政
王永杰
张凯旋
李冰洁
罗维
杨刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010104777.8A priority Critical patent/CN113284040A/en
Publication of CN113284040A publication Critical patent/CN113284040A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a picture processing method and device, and relates to the technical field of computers. One embodiment of the method comprises: acquiring a picture to be processed, and extracting a plurality of pixel points of the picture to be processed, wherein the pixel points comprise color value information; searching overexposure pixel points from a plurality of pixel points according to a preset overexposure value interval and color value information; determining a placement area for a preset basic graph according to the overexposure pixel points; and placing the basic graph in the placing area, and combining the basic graph and the picture to be processed. The embodiment realizes the automatic special effect addition for the pictures, and can effectively improve the efficiency of adding the special effect for the pictures.

Description

Picture processing method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for processing an image.
Background
In order to highlight the characteristics of pictures, such as pictures of commodities displayed on shopping websites, and the like, so as to attract the attention of a viewer, some special effects, such as a flickering special effect, are often required to be added to the pictures.
Currently, users add special effects to pictures mainly by manual methods.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
the efficiency of adding special effects to pictures manually by users is low.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for processing a picture, which implement to automatically add a special effect to the picture, and can effectively improve efficiency of adding the special effect to the picture.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a picture processing method including:
acquiring a picture to be processed, and extracting a plurality of pixel points of the picture to be processed, wherein the pixel points comprise color value information;
searching overexposure pixel points from the plurality of pixel points according to a preset overexposure value interval and the color value information;
determining a placement area for a preset basic graph according to the overexposure pixel points;
and placing the basic graph in the placement area, and combining the basic graph and the picture to be processed.
Preferably, the first and second electrodes are formed of a metal,
after extracting a plurality of pixel points of the picture to be processed, the method further comprises the following steps:
mapping each pixel point to a preset coordinate system, and determining the position coordinate of each pixel point;
determining the position center point of the placement area according to the position coordinates of the overexposure pixel points;
placing the basic graph in the placement area, including: and controlling the distance between the center point of the basic graph and the position center point not to be larger than a preset distance threshold value.
Preferably, the determining the position center point of the placement area includes:
when the number of the over-exposed pixel points is at least two,
dividing at least one overexposure area for the picture to be processed according to the position coordinate of each overexposure pixel point;
and in each overexposure area, selecting a position center point for a preset basic graph.
Preferably, dividing at least one overexposure area for the picture to be processed includes:
aiming at unselected overexposure pixel points, executing:
selecting a first overexposure pixel point from the unselected overexposure pixel points;
searching a second overexposure pixel point meeting a first region limiting condition for the first overexposure pixel point according to the position coordinates of the unselected overexposure pixel points and the position coordinates of the first overexposure pixel point;
after the searching is finished, if the second overexposure pixel point is searched, the second overexposure pixel point is selected, and the maximum area defined by the position coordinate of the second overexposure pixel point and the position coordinate of the first overexposure pixel point is determined to be an overexposure area.
Preferably, the image processing method further includes:
and if the second overexposure pixel point is not found, taking the position coordinate of the first overexposure pixel point as the position center point.
Preferably, dividing at least one overexposure area for the picture to be processed includes:
taking each over-exposure pixel point as a third over-exposure pixel point, and executing the following steps aiming at each third over-exposure pixel point:
searching a fourth overexposure pixel point meeting a second area limiting condition for the third overexposure pixel point, and determining that a maximum area defined by the position coordinates of the third overexposure pixel point and the fourth overexposure pixel point is an overexposure area;
when the number of the over-exposed regions is at least two,
and fusing overexposure areas with the same overexposure pixel points into one overexposure area, so that the overexposure pixel points only belong to one overexposure area.
Preferably, searching for a second overexposure pixel point meeting the first area limiting condition for the first overexposure pixel point includes:
and circularly executing the following steps until the search is finished:
searching a fifth overexposure pixel point adjacent to the position coordinate of the first overexposure pixel point from the unselected overexposure pixel points; if the fifth overexposure pixel point is found, taking the fifth overexposure pixel point as the first overexposure pixel point; if not, ending the search;
and determining all the found fifth overexposure pixel points as the second overexposure pixel points meeting the first area limiting condition.
Preferably, in each of the overexposure areas, selecting a position center point for a preset basic pattern, including:
and determining the limit edge point included by the overexposure area as the position center point.
Preferably, in each of the overexposure areas, selecting a position center point for a preset basic pattern, including:
and circularly executing the following steps for each overexposure area until all position center points of the overexposure areas are determined:
judging whether the theoretical center point of the overexposure area is located in the overexposure area or not,
if so, determining the theoretical central point as the position central point, and ending the current process;
otherwise, drawing a straight line parallel to the coordinate axis of the coordinate system at the theoretical central point to cut the overexposure area into at least two new overexposure areas, and taking the new overexposure areas as the overexposure areas.
Preferably, after the basic graph is placed in the placement area, before the basic graph and the to-be-processed picture are combined, the method further includes:
and adjusting the basic graph according to preset mapping parameters and parameter thresholds.
A picture processing apparatus comprising: an extraction unit, a search unit and a merging unit, wherein,
the extraction unit is used for acquiring a picture to be processed and extracting a plurality of pixel points of the picture to be processed, wherein the pixel points comprise color value information;
the searching unit is used for searching overexposed pixel points from the plurality of pixel points according to a preset overexposed value interval and the color value information;
the merging unit is used for determining a placement area for a preset basic graph according to the overexposure pixel points found by the searching unit; and placing the basic graph in the placement area, and combining the basic graph and the picture to be processed.
One embodiment of the above invention has the following advantages or benefits: since the overexposed pixel points of the picture can affect the overall impression of the picture, the impression of the picture can be improved by overlapping basic graphs in the overexposed pixel point region. According to the embodiment of the invention, the overexposure pixel points are searched from the plurality of pixel points by extracting the plurality of pixel points of the picture to be processed and according to the preset overexposure value interval and the color value information, the placement area is determined for the preset basic graph according to the overexposure pixel points, the basic graph is placed in the placement area, and the basic graph and the picture to be processed are combined.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a picture processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a picture A to be processed according to an embodiment of the present invention after partial pixel point distribution is enlarged;
FIG. 3 is a schematic diagram of mapping a part of pixel points of a picture A to be processed to a coordinate system according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a theoretical center point located in an overexposed region B according to an embodiment of the present invention;
FIG. 5 is a diagram of an overexposed region C being divided into new overexposed regions according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a special effect picture according to an embodiment of the invention;
FIG. 7 is a schematic diagram of the main units of a picture processing apparatus according to an embodiment of the present invention;
FIG. 8 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 9 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The overexposed pixel generally refers to a pixel which accumulates white and a color close to white seen by naked eyes, and the color value range of the overexposed pixel is generally (225, 225, 225) - (255, 255, 255), where the color value refers to the RGB value of the pixel, that is, the color value of the overexposed pixel is between RGB (225, 225, 225) and RGB (255, 255, 255), and may include two pixels with color values of (225, 225, 225) and (255, 255, 255).
The position center point refers to a position coordinate capable of controlling a position where the basic graph is placed, and may be a distance between the center point of the basic graph and the position center point after the center point of the basic graph is placed on the picture to be processed, which is not greater than a preset deviation threshold.
Fig. 1 is a method for processing a picture according to an embodiment of the present invention, and as shown in fig. 1, the steps of the method for processing a picture may include:
s101: acquiring a picture to be processed, and extracting a plurality of pixel points of the picture to be processed, wherein the pixel points comprise color value information;
s102: searching overexposure pixel points from a plurality of pixel points according to a preset overexposure value interval and color value information;
s103: determining a placement area for a preset basic graph according to the overexposure pixel points;
s104: and placing the basic graph in the placing area, and combining the basic graph and the picture to be processed.
The plurality of pixel points for extracting the picture to be processed may be all pixel points on the picture to be processed, or pixel points in an area of the picture to be processed selected by the user.
The preset overexposure value interval may be an RGB value interval set by a user according to the specific situation of the picture, and preferably, the RGB value interval is between RGB (225, 225, 225) and RGB (255, 255, 255).
The obtaining of the to-be-processed picture may also be importing the to-be-processed picture into the canvas.
One specific implementation of searching for overexposure pixels from the plurality of pixels may be that the canvas traverses the plurality of pixels, searches for pixels within a preset overexposure value interval, and determines that the pixels within the preset overexposure value interval are overexposure pixels.
In the embodiment shown in fig. 1, since the overexposed pixel of the picture may affect the overall appearance of the picture, the appearance of the picture may be improved by overlapping the basic pattern in the overexposed pixel region. According to the embodiment of the invention, the overexposure pixel points are searched from the plurality of pixel points by extracting the plurality of pixel points of the picture to be processed and according to the preset overexposure value interval and the color value information, the placement area is determined for the preset basic graph according to the overexposure pixel points, the basic graph is placed in the placement area, and the basic graph and the picture to be processed are combined.
In an embodiment of the present invention, a specific implementation manner of the step S101 may be that, starting from the top left corner of the to-be-processed picture, pixel points are sequentially extracted from left to right and from top to bottom, and the pixel points are sorted according to the order of extraction. As shown in fig. 2, a part of the pixels in the picture a to be processed are extracted and sorted to obtain a pixel set, where the pixels in the pixel set include color value information (color value information of pixel 1, color value information of pixel 2, color value information of pixel 3, color value information of pixel 4, …, color value information of pixel 10, color value information of pixel 11, and color value information of pixel 12, …). The color value information may be RGB and transparent values, and the RGB and transparent values of each pixel point may be sorted in the set according to the extracted order. RGB is a color standard in the industry, and various colors are obtained by changing three color channels of red (R), green (G) and blue (B) and superimposing the three color channels on each other, and RGB is a color representing three color channels of red, green and blue.
In an embodiment of the present invention, after extracting a plurality of pixel points of the to-be-processed picture, the method may further include: mapping each pixel point to a preset coordinate system, and determining the position coordinate of each pixel point; determining a position center point of the placement area according to the position coordinates of the overexposure pixel points; accordingly, placing the basic graph in the placement area comprises: and controlling the distance between the central point of the basic graph and the position central point not to be larger than a preset distance threshold value. Preferably, the preset distance threshold is 0, that is, the center point of the basic pattern coincides with the position center point or the center point of the basic pattern is superposed on the position center point. The mapping process and the coordinate system realize accurate positioning of the overexposure pixel points, so that the central point of the position center is accurately positioned, and the accurate placement position of the basic graph is ensured.
In an embodiment of the present invention, the specific implementation of mapping each of the pixel points to a preset coordinate system and determining the position coordinate of each of the pixel points may be that, taking the upper left corner of the picture as the origin of coordinates, the extracted pixel points are mapped to the coordinate system, so that the coordinates corresponding to the y-axes of the pixel points belonging to the same row/the same column are the same, and correspondingly, the coordinates corresponding to the x-axes of the pixel points belonging to the same column/the same row are the same. One mapping method may be, as shown in fig. 3, mapping a part of the pixels shown in fig. 2 to a coordinate system, mapping pixel 1 to (0, 0), mapping pixel 2 to (1, 0), mapping pixel 3 to (2, 0), mapping pixel 4 to (3, 0), …, mapping pixel 10 to (9, 0), mapping pixel 11 to (0, 1), mapping pixel 12 to (1, 1), and mapping pixel 13 to (2, 1), …. By the above-mentioned coordinate system construction and mapping mode, the real state of the picture to be processed can be reflected to a large extent after mapping, so that the position determination of the overexposure pixel point is more accurate.
In addition, it should be noted that, in the mapping process, in the horizontal direction/in the same row, the distance between two adjacent pixels may be the difference between the abscissa and the abscissa by 1, or may be the difference between the abscissa and other predetermined values such as 0.1, 0.2, 0.5, 2, etc., but the distance between two adjacent pixels needs to be kept equal. In the vertical direction/the same column, the distance between two adjacent pixels may be the difference of 1 between the abscissa and may also be the difference of other predetermined values such as 0.1, 0.2, 0.5, 2, etc. between the ordinate, but the distance between two adjacent pixels needs to be kept equal. In addition, the coordinate of the first pixel point at the upper left corner can also be other coordinate values, and only the relative position of each pixel point on the coordinate system is required to be consistent with the relative position of each pixel point in the picture to be processed.
In addition, it should be noted that, after each pixel is mapped onto the preset coordinate system, the difference between the maximum abscissa and the minimum abscissa of any row of pixels is in a fixed multiple relation with the actual length formed by the row of pixels on the picture to be processed, preferably, the difference between the maximum abscissa and the minimum abscissa of any row of pixels is consistent with the actual length formed by the row of pixels on the picture to be processed, that is, the fixed multiple is 1.
In an embodiment of the present invention, when the number of the overexposed pixel is one, the position coordinate of the overexposed pixel is the position center point.
In one embodiment of the invention, when the number of the over-exposure pixel points is at least two, at least one over-exposure area is divided for the picture to be processed according to the position coordinates of each over-exposure pixel point; in each overexposure area, a position center point is selected for a preset basic graph. The influence of the basic graph on the non-overexposure area of the picture to be processed can be effectively reduced, and the special effect of the synthesized picture is improved. Clustering is realized by the following two specific implementation modes, namely the overexposure pixel points with similar positions are gathered in the same overexposure area, so that a continuous overexposure area can be effectively prevented from being split, and the phenomenon that the discontinuous overexposure areas are combined to ensure that the display effect of the synthesized picture is better is also avoided.
In an embodiment of the present invention, the above-mentioned dividing at least one overexposed region for the picture to be processed can be implemented by two specific implementations. The user can select different specific implementation modes according to the actual situation of the picture to be processed, so that the picture to be processed is divided into at least one overexposure area with certain flexibility.
The first embodiment of dividing at least one overexposed region for a picture to be processed is as follows: aiming at unselected overexposure pixel points, executing: selecting a first overexposure pixel point from unselected overexposure pixel points; searching a second overexposure pixel point meeting the first area limiting condition for the first overexposure pixel point according to the position coordinates of the unselected overexposure pixel points and the position coordinates of the first overexposure pixel point; after the searching is finished, if the second overexposure pixel point is searched, the second overexposure pixel point is selected, and the maximum area defined by the position coordinate of the second overexposure pixel point and the position coordinate of the first overexposure pixel point is determined to be an overexposure area.
One specific implementation manner of searching for a second overexposure pixel point satisfying the first region definition condition for the first overexposure pixel point may include:
the following steps N1 to N3 are executed in a loop until the search is finished:
n1: searching a fifth overexposure pixel point adjacent to the position coordinate of the first overexposure pixel point from the unselected overexposure pixel points; if so, execute N2; if not found, execute N3;
the adjacent pixels in this step are pixels that have a difference of 1 from the x value of the position coordinate of the first overexposure pixel or have a difference of 1 from the y value of the position coordinate of the first overexposure pixel when the coordinate system is an xy two-dimensional coordinate system, for example, for an overexposure pixel whose position coordinate is (1, 1), the position coordinates of pixels adjacent to the overexposure pixel are (0, 0), (1, 0), (0, 1), (2, 2), (2, 1), (1, 2), (2, 0), (0, 2).
N2: taking the fifth overexposure pixel point as the first overexposure pixel point, and executing N1;
n3: and finishing the search.
Accordingly, all the fifth overexposure pixel points found by the loop execution of the N1 are determined to be the second overexposure pixel points meeting the first area limiting condition. For example, after the selected first overexposure pixel point is pixel point 1, and N1 is executed, the adjacent overexposure pixel points are found to be pixel point 2, pixel point 10, and pixel point 25 for pixel point 1, and the above N1 is executed in a loop to continue to search for the adjacent overexposure pixel points for pixel point 2, pixel point 10, and pixel point 25, respectively, where the adjacent overexposure pixel point found for pixel point 2 is pixel point 8 and pixel point 26, the adjacent overexposure pixel point found for pixel point 10 is pixel point 12 and pixel point 30, the adjacent overexposure pixel point found for pixel point 25 is pixel point 32 and pixel point 40, the adjacent overexposure pixel point found for pixel point 8 is pixel point 27, and the adjacent overexposure pixel points 26, 12, 30, 32, 40, and 27 are all not found. Pixel 2, pixel 10, pixel 25, pixel 8, pixel 26, pixel 12, pixel 30, pixel 32, pixel 40, and pixel 27 are overexposed pixels that satisfy the first area constraint for pixel 1.
In an embodiment of the present invention, if the second overexposure pixel is not found, the position coordinate of the first overexposure pixel is used as a position center point.
In an embodiment of the present invention, it is determined that a maximum area enclosed by the position coordinates of the second overexposure pixel point and the position coordinates of the first overexposure pixel point is an overexposure area, and if the determined position coordinates of the second overexposure pixel point are (1, 0), (0, 1), (2, 2), (2, 1), (1, 2), (2, 0), (0, 2), and the position coordinates of the first overexposure pixel point are (1, 1), then an area enclosed by (1, 0), (0, 1), (2, 2), (2, 1), (1, 2), (2, 0), (0, 2) is an overexposure area; for another example, (2, 2), (2, 1), (1, 2), (2, 0), (0, 2), and the position coordinate of the first overexposed pixel is (1, 1), and then the area enclosed by (2, 2), (2, 1), (1, 2), (2, 0), (0, 2), and (1, 1) is an overexposed area.
A second embodiment of dividing at least one overexposed region for a picture to be processed may include: taking each over-exposure pixel point as a third over-exposure pixel point, and executing the following steps aiming at each third over-exposure pixel point: searching a fourth overexposure pixel point meeting the second area limiting condition for the third overexposure pixel point, and determining a maximum area defined by the position coordinates of the third overexposure pixel point and the fourth overexposure pixel point as an overexposure area; when the number of the over-exposure areas is at least two, the over-exposure areas with the same over-exposure pixel points are fused into one over-exposure area, so that the over-exposure pixel points only belong to one over-exposure area.
The second area limitation condition is that when the coordinate system is an xy two-dimensional coordinate system, the overexposure pixel point whose difference between the x value of the position coordinate of the third overexposure pixel point and the y value of the position coordinate of the third overexposure pixel point is 1 or 1, for example, for the overexposure pixel point whose position coordinate is (1, 1), the position coordinates of the pixel points adjacent to the overexposure pixel point are (0, 0), (1, 0), (0, 1), (2, 2), (2, 1), (1, 2), (2, 0), (0, 2). Wherein, the overexposure pixel points meeting the second region limiting condition corresponding to the overexposure pixel points (1, 1) are (2, 2), (2, 1), then (1, 1), (2, 2) and (2, 1) enclose the overexposure region 1, the overexposure pixel points meeting the second region limiting condition corresponding to the overexposure pixel points (2, 2) are (1, 1), (3, 2), (3, 3), then (1, 1), (2, 2), (3, 2) and (3, 3) enclose the overexposure region 2, wherein the overexposure region 1 and the overexposure region 2 have the same overexposure pixel points, then the overexposure region 1 and the overexposure region 2 are fused into an overexposure region, so that the overexposure pixel points only belong to one overexposure region.
In one embodiment of the present invention, there are two implementations of selecting the center point for the preset basic pattern. Different implementation modes can be flexibly selected according to different basic graphs or pictures to be processed, so that the obtained processing result is more attractive, better appearance can be presented, and the requirements of users are met.
The first implementation mode of selecting the position center point for the preset basic graph is as follows:
and determining the limit edge point included by the overexposure area as the position center point. The limit edge point is an overexposure pixel point located on the edge curve of the overexposure area. Such as: in the overexposure region surrounded by (0, 0), (1, 1), (2, 2), (3, 2) and (3, 3), the limit edge points are (0, 0), (3, 2) and (3, 3). Such as the extreme edge points given by way of example in fig. 4. The implementation mode mainly aims at the boundary with larger chromatic aberration of the picture to be processed. The process can reduce the abrupt feeling of the boundary with larger chromatic aberration to a certain extent, thereby increasing the aesthetic feeling of the picture.
The second implementation mode of selecting the position center point for the preset basic graph is as follows:
for each of the overexposure areas, the following steps M1 to M3 are executed in a loop until all the position center points of the overexposure areas are determined:
m1: judging whether the theoretical center point of the overexposure area is located in the overexposure area, if so, executing M2; otherwise, M3 is executed;
m2: determining the theoretical central point as the position central point, and finishing the current process;
m3: drawing a straight line parallel to coordinate axes of the coordinate system at the theoretical center point to cut the overexposed region into at least two new overexposed regions, regarding the new overexposed regions as overexposed regions, and performing M1.
The position coordinates corresponding to the theoretical center points can be calculated according to the following calculation formula group:
Figure BDA0002388175380000111
wherein the content of the first and second substances,
Figure BDA0002388175380000121
representing the position coordinates corresponding to the theoretical central point; INT () represents a rounding function; x is the number ofiRepresenting an abscissa value in the position coordinate of the ith overexposure pixel point in one overexposure area; y isiRepresenting a longitudinal coordinate value in the position coordinate of the ith overexposure pixel point in one overexposure area; i is a positive integer; n represents the total number of overexposed pixel points in one overexposed region, and the n is a positive integer not less than 2.
The rounding can be performed by rounding up or down the average value of the abscissa values in the position coordinates of all over-exposed pixel points in the over-exposed area; rounding up or down the mean value of longitudinal coordinate values in the position coordinates of all over-exposed pixel points in the over-exposed area; the mean value of the abscissa values in the position coordinates of all over-exposed pixel points in the over-exposed area can be rounded in a rounding mode, and the mean value of the ordinate values in the position coordinates of all over-exposed pixel points in the over-exposed area can be rounded in a rounding mode.
The mode of selecting the position center point for the preset basic graph can realize mapping processing on the overexposed area, and reduce the influence of the overexposed area on picture display.
For example, in an overexposed area B shown in fig. 4, the theoretical center point is located in the overexposed area, and then the theoretical center point is the position center point.
If the theoretical center point of an overexposed region C shown in fig. 5 is located outside the overexposed region, a straight line parallel to the coordinate axes of the coordinate system is drawn at the theoretical center point to cut the overexposed region into at least two new overexposed regions C1, C2, and C3, and then it is continuously determined whether the theoretical center points of the overexposed regions C1, C2, and C3 are located within the overexposed region, and if yes, the theoretical center point of C1 is determined to be the position center point of C1, the theoretical center point of C2 is determined to be the position center point of C2, and the theoretical center point of C3 is determined to be the position center point of C3; otherwise, the cutting of the overexposed regions C1, C2, and C3, respectively, is continued.
In an embodiment of the present invention, after the basic graphics are placed on the picture to be processed, before the basic graphics and the picture to be processed are merged, the method further includes: and adjusting the basic graph according to the preset mapping parameters and the parameter threshold. The basic graph is adjusted, so that the synthesized picture has better display effect and is more attractive.
The picture processing method provided by the embodiment of the invention is used for processing a picture to be processed (part of the keyboard picture), and the obtained processing result, namely the special effect picture, can be shown in fig. 6. The position of the central point of the position determined by the graph, namely the position of the center of the basic graph is the limit edge point included by the overexposure area. The processing result can attract the user to pay more attention to the picture.
The mapping parameters may include transparency of the basic graphic and size of the basic graphic. In a preferred embodiment, the transparency of the basic pattern ranges from 0.3 to 0.7. The transparency can be determined according to the area of the overexposed region and the overexposed intensity. Wherein, the relationship rule between the area of the overexposure area and the overexposure intensity and the transparency is as follows: the larger the area of the overexposure area is, the smaller the value of the transparency is, and the smaller the area of the overexposure area is, the larger the value of the transparency is; the larger the overexposure intensity is, the larger the value of the transparency is, and the smaller the overexposure intensity is, the smaller the value of the transparency is; based on the overexposure area and the relation rule between the overexposure intensity and the transparency, the user can set the numerical relation between the overexposure area and the transparency and the numerical relation between the overexposure intensity and the transparency by himself.
In an embodiment of the present invention, a specific implementation manner of adjusting the basic pattern is to adjust the size of the basic pattern so that the adjusted size of the basic pattern meets the following condition for limiting the size of the cabernet pattern.
Basic pattern size limitation condition:
the adjusted basic pattern size is twice of the theoretical size of the overexposure area, is not more than 20 pixels and is not less than 4 pixels.
The theoretical size of the overexposure area refers to the maximum abscissa x of all overexposure pixel points contained in the overexposure areamaxWith the smallest abscissa xmixThe difference (x distance as shown in FIG. 4) and the maximum ordinate y of all over-exposed pixels contained in the over-exposed areamaxWith the smallest ordinate ymixThe difference (y-distance as shown in fig. 4).
When the adjusted basic graph size is two times of the theoretical size of the overexposure area and is larger than 20 pixels, adjusting the adjusted basic graph size to 20 pixels;
and when the adjusted basic graph size is twice of the theoretical size of the overexposure area and is smaller than 4 pixels, adjusting the adjusted basic graph size to be 4 pixels.
The basic graph can be a quadrangle star, a pentagram, a heart-shaped basic graph and the like provided by a user.
In addition, the special effect picture obtained by the picture processing method can be directly sent to a related application system, so that the application system can use the special effect picture. For example, the special effect picture obtained by processing the picture of the commodity sold by the merchant on line by the picture processing method provided by the embodiment of the invention can be directly issued to a selling platform system of the merchant to be used as a commodity display picture. In addition, the special effect picture can also be output to a printing device, so that the printing device can print the special effect picture.
In addition, the to-be-processed picture used in the picture processing method provided by the embodiment of the invention can be derived from other application systems such as an e-commerce platform system and the like, for example, the to-be-processed picture can be a commodity original picture directly derived from the e-commerce platform system. The decoration method is used for decorating shops in a mall, beautifying commodities and the like.
In an embodiment of the present invention, the image processing method may be implemented in the form of a web page plug-in, such as an H5 plug-in, an HTML plug-in, or the like.
In an embodiment of the present invention, the above-mentioned picture processing method can be implemented based on H5 or canvas in HTML. Namely, the canvas is used as a part of the H5 plug-in or the HTML plug-in for implementing the picture processing method, or the picture processing method provided by the embodiment of the present invention is implemented by improving the canvas.
Correspondingly, the specific process of acquiring the picture to be processed may be to call H5 or a picture input [ file ] in HTML to acquire a picture file to be processed, or to acquire the picture to be processed using img src picture link.
In an embodiment of the present invention, the image processing method may further include: and recording the position coordinates of the theoretical center point in the overexposure area, the theoretical size of the overexposure area and the limit edge point of the overexposure area in the drawn array paintar so as to conveniently manage the overexposure pixel points and the overexposure area. When the basic graph is placed subsequently, the position center point and the size of the basic graph can be directly determined according to the position coordinates of the theoretical center point given by the array and the theoretical size of the overexposure area, or the position center point and the size of the basic graph can be directly determined according to the position coordinates of the limit edge point given by the array and the theoretical size of the overexposure area.
In an embodiment of the present invention, the specific implementation of merging the basic graphics and the to-be-processed picture may be merging the pictures by using a canvas drawImage method.
In an embodiment of the present invention, a specific implementation manner of combining the basic graphic and the to-be-processed picture to obtain the special effect picture includes: initializing the transparency and increasing and decreasing marks of an initial basic graph by using a random number in the same overexposure area; basic graphs are added to the overexposure area, and after each basic graph is added, the transparency is adjusted to be 0.1 according to the increase and decrease identification; when the transparency is equal to a first preset transparency threshold or greater than a second preset transparency threshold, increasing or decreasing the identifier for turning; and when the frame number of the basic graph in the overexposure area is increased to a preset frame number, merging the basic graph with the preset frame number and the picture to be processed by using a gif.js open source library to obtain a gif dynamic graph, and exporting the gif dynamic graph to other systems. In a preferred embodiment, the preset transparency first threshold is 0.3. In a preferred embodiment, the preset transparency second threshold is 1. In a preferred embodiment, the preset frame number is 15.
Wherein, the transparency is adjusted to 0.1 according to the increase and decrease marks; when the transparency is less than 0.3 or more than 1, the increase or decrease of the identifier is turned over; for example, initializing the transparency and increasing or decreasing the logo of the first basic graph are respectively: if the transparency of the basic pattern is 0.5 and the increase and decrease marks are minus marks, adding a second basic pattern, wherein the transparency of the added basic pattern is 0.5-0.1-0.4, and the increase and decrease marks are minus marks; adding a third basic graph, wherein the transparency of the added basic graph is 0.5-0.1-0.3, and the increase and decrease marks are plus marks "+"; adding a fourth basic graph, wherein the transparency of the added basic graph is 0.3+ 0.1-0.4, and the increase and decrease marks are plus marks "+"; adding a fifth basic graph, wherein the transparency of the added basic graph is 0.4+ 0.1-0.5, and the increase and decrease marks are plus marks "+"; adding a sixth basic graph, wherein the transparency of the added basic graph is 0.5+ 0.1-0.6, and the increase and decrease marks are plus marks "+"; adding a seventh basic graph, wherein the transparency of the added basic graph is 0.6+ 0.1-0.7, and the increase and decrease marks are plus marks "+"; adding an eighth basic graph, wherein the transparency of the added basic graph is 0.7+ 0.1-0.8, and the increase and decrease marks are plus marks "+"; adding a ninth basic graph, wherein the transparency of the added basic graph is 0.8+ 0.1-0.9, and the increase and decrease marks are plus marks "+"; and adding a tenth basic graph, wherein the transparency of the added basic graph is 0.9+ 0.1-1, the increase and decrease marks are marks of adding "-", and the like, until the frame number of the basic graph placed in the overexposure area reaches the preset frame number.
The picture processing method provided by the embodiment of the invention increases the entertainment and interest of the user in processing the pictures.
The image processing method provided by the embodiment of the invention can also be used for increasing the image special effect when the user in the mall evaluates the order, so as to highlight the characteristics of the commodity.
The picture processing method provided by the embodiment of the invention can also be used for increasing the sparkling special effect display of the commodity picture searched and hit by the user when the user searches for the picture and purchases the picture, increasing the visual characteristic of the picture and improving the user experience.
As shown in fig. 7, an embodiment of the invention provides a picture processing apparatus 700, where the picture processing apparatus 700 includes: an extraction unit 701, a look-up unit 702 and a merging unit 703, wherein,
the extracting unit 701 is configured to acquire a to-be-processed picture, and extract a plurality of pixel points of the to-be-processed picture, where the pixel points include color value information;
the searching unit 702 is configured to search an overexposed pixel point from the plurality of pixel points extracted by the extracting unit 701 according to a preset overexposed value interval and the color value information;
a merging unit 703, configured to determine a placement area for a preset basic pattern according to the overexposure pixel points found by the searching unit 702; and placing the basic graph in the placement area, and combining the basic graph and the picture to be processed.
In an embodiment of the present invention, the picture processing apparatus 700 further includes: a mapping unit (not shown in the figure),
the mapping unit is configured to map each pixel point extracted by the extraction unit 701 to a preset coordinate system, and determine a position coordinate of each pixel point;
the merging unit 703 is further configured to determine a position center point of the placement area according to the position coordinates of the overexposed pixel points mapped by the mapping unit; and controlling the distance between the central point of the basic graph and the position central point not to be larger than a preset distance threshold value.
In an embodiment of the present invention, the merging unit 703 is configured to, when the number of over-exposure pixel points found by the searching unit 702 is at least two, mark out at least one over-exposure region for the to-be-processed picture according to the position coordinate of each over-exposure pixel point; in each overexposure area, a position center point is selected for a preset basic graph.
In an embodiment of the present invention, the merging unit 703 is further configured to, for unselected overexposed pixel points, perform: selecting a first overexposure pixel point from unselected overexposure pixel points; searching a second overexposure pixel point meeting the first area limiting condition for the first overexposure pixel point according to the position coordinates of the unselected overexposure pixel points and the position coordinates of the first overexposure pixel point; after the searching is finished, if the second overexposure pixel point is searched, the second overexposure pixel point is selected, and the maximum area defined by the position coordinate of the second overexposure pixel point and the position coordinate of the first overexposure pixel point is determined to be an overexposure area.
In an embodiment of the present invention, the merging unit 703 is further configured to, if the second overexposed pixel is not found, take the position coordinate of the first overexposed pixel as one of the position center points.
In an embodiment of the present invention, the merging unit 703 is further configured to use each over-exposed pixel point as a third over-exposed pixel point, and for each third over-exposed pixel point, perform: searching a fourth overexposure pixel point meeting the second area limiting condition for the third overexposure pixel point, and determining a maximum area defined by the position coordinates of the third overexposure pixel point and the fourth overexposure pixel point as an overexposure area; when the number of the over-exposure areas is at least two, the over-exposure areas with the same over-exposure pixel points are fused into one over-exposure area, so that the over-exposure pixel points only belong to one over-exposure area.
In an embodiment of the present invention, the merging unit 703 is further configured to perform, in a loop: searching a fifth overexposure pixel point adjacent to the position coordinate of the first overexposure pixel point from the unselected overexposure pixel points; if the pixel is found, the fifth overexposure pixel point is used as the first overexposure pixel point; if not, ending the search; until finishing searching; and determining all the found fifth overexposure pixel points as second overexposure pixel points meeting the first area limiting condition.
In an embodiment of the present invention, the merging unit 703 is further configured to determine that the extreme edge point included in the overexposed area is the position center point.
In an embodiment of the present invention, the merging unit 703 is further configured to, for each overexposed area, cyclically perform the following steps until all position center points of the overexposed area are determined:
judging whether the theoretical center point of the overexposure area is located in the overexposure area,
if so, determining the theoretical central point as a position central point, and ending the current process;
otherwise, drawing a straight line parallel to the coordinate axes of the coordinate system at the theoretical central point to cut the overexposed area into at least two new overexposed areas, and taking the new overexposed areas as the overexposed areas.
In an embodiment of the present invention, the merging unit 703 is further configured to adjust the basic graph according to a preset mapping parameter and a parameter threshold.
In an embodiment of the present invention, the image processing apparatus 700 may be an H5 plug-in or an HTML plug-in.
In an embodiment of the present invention, the image processing apparatus 700 may be applied to a terminal or a server.
The terminal where the image processing apparatus 700 is located may be connected to other systems, such as an e-commerce platform, to provide support for image processing for shops of the e-commerce platform.
Fig. 8 shows an exemplary system architecture 800 to which the picture processing method or the picture processing apparatus of the embodiments of the present invention can be applied.
As shown in fig. 8, the system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. The network 804 serves to provide a medium for communication links between the terminal devices 801, 802, 803 and the server 805. Network 804 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
The user can use the terminal devices 801, 802, 803 to interact with the server 805 through the network 804 to receive or transmit a picture to be processed, a special effect picture, or the like. The terminal devices 801, 802, 803 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 801, 802, 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The terminal devices 801, 802, and 803 may process the acquired to-be-processed picture through the picture processing device, and send the special effect picture to the server 805 through the various communication client applications.
The server 805 may be a server providing various services, such as a background management server (for example only) providing support for shopping-type websites or search-type applications browsed by users using the terminal devices 801, 802, 803. The background management server may allocate the received special effect pictures to corresponding positions according to user settings, and feed back the allocation results (for example, a prompt of success/failure of deployment of the special effect pictures — just an example) to the terminal device. The background management server may further receive the to-be-processed picture and the basic graph sent by the terminal, perform picture processing on the to-be-processed picture and the basic graph to obtain a special effect picture, and feed back a processing result (for example, the special effect picture — only an example) to the terminal device.
It should be noted that the image processing method provided in the embodiment of the present invention can be executed by the terminal devices 801, 802, and 803, or can be executed by the server 805, and accordingly, the image processing apparatus can be disposed in the terminal devices 801, 802, and 803, or can be disposed in the server 805.
It should be understood that the number of terminal devices, networks, and servers in fig. 8 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 9, a block diagram of a computer system 900 suitable for use with a terminal device/server implementing an embodiment of the present invention is shown. The terminal device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 9, the computer system 900 includes a Central Processing Unit (CPU)901 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the system 900 are also stored. The CPU 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
The following components are connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The above-described functions defined in the system of the present invention are executed when the computer program is executed by a Central Processing Unit (CPU) 901.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an extraction unit, a lookup unit, and a merging unit. The names of these units do not form a limitation to the unit itself under certain circumstances, for example, an extraction unit may also be described as "a unit that extracts a plurality of pixel points of the picture to be processed".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: acquiring a picture to be processed, and extracting a plurality of pixel points of the picture to be processed, wherein the pixel points comprise color value information; searching overexposure pixel points from a plurality of pixel points according to a preset overexposure value interval and color value information; determining a placement area for a preset basic graph according to the overexposure pixel points; and placing the basic graph in the placing area, and combining the basic graph and the picture to be processed.
The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: after extracting a plurality of pixel points of the picture to be processed, the method further comprises the following steps: mapping each pixel point to a preset coordinate system, and determining the position coordinate of each pixel point; determining a position center point of the placement area according to the position coordinates of the overexposure pixel points; placing a basic graph in a placement area, comprising: and controlling the distance between the central point of the basic graph and the position central point not to be larger than a preset distance threshold value.
The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: when the number of the over-exposure pixel points is at least two, marking off at least one over-exposure area for the picture to be processed according to the position coordinates of each over-exposure pixel point; in each overexposure area, a position center point is selected for a preset basic graph.
The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: aiming at unselected overexposure pixel points, executing: selecting a first overexposure pixel point from unselected overexposure pixel points; searching a second overexposure pixel point meeting the first area limiting condition for the first overexposure pixel point according to the position coordinates of the unselected overexposure pixel points and the position coordinates of the first overexposure pixel point; after the searching is finished, if the second overexposure pixel point is searched, the second overexposure pixel point is selected, and the maximum area defined by the position coordinate of the second overexposure pixel point and the position coordinate of the first overexposure pixel point is determined to be an overexposure area.
The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: aiming at unselected overexposure pixel points, executing: taking each over-exposure pixel point as a third over-exposure pixel point, and executing the following steps aiming at each third over-exposure pixel point: searching a fourth overexposure pixel point meeting the second area limiting condition for the third overexposure pixel point, and determining a maximum area defined by the position coordinates of the third overexposure pixel point and the fourth overexposure pixel point as an overexposure area; when the number of the over-exposure areas is at least two, the over-exposure areas with the same over-exposure pixel points are fused into one over-exposure area, so that the over-exposure pixel points only belong to one over-exposure area.
The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: and circularly executing the following steps until the search is finished:
searching a fifth overexposure pixel point adjacent to the position coordinate of the first overexposure pixel point from the unselected overexposure pixel points; if the fifth overexposure pixel point is found, taking the fifth overexposure pixel point as the first overexposure pixel point; if not, ending the search;
and determining all the found fifth overexposure pixel points as the second overexposure pixel points meeting the first area limiting condition.
The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: and circularly executing the following steps for each overexposure area until all position center points of the overexposure areas are determined:
judging whether the theoretical center point of the overexposure area is located in the overexposure area or not,
if so, determining the theoretical central point as the position central point, and ending the current process;
otherwise, drawing a straight line parallel to the coordinate axis of the coordinate system at the theoretical central point to cut the overexposure area into at least two new overexposure areas, and taking the new overexposure areas as the overexposure areas.
According to the technical scheme of the embodiment of the invention, because the overexposed pixel points of the picture can influence the overall impression of the picture, the impression of the picture can be improved by superposing basic graphs in the overexposed pixel point region. According to the embodiment of the invention, the overexposure pixel points are searched from the plurality of pixel points by extracting the plurality of pixel points of the picture to be processed and according to the preset overexposure value interval and the color value information, the placement area is determined for the preset basic graph according to the overexposure pixel points, the basic graph is placed in the placement area, and the basic graph and the picture to be processed are combined.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (13)

1. An image processing method, comprising:
acquiring a picture to be processed, and extracting a plurality of pixel points of the picture to be processed, wherein the pixel points comprise color value information;
searching overexposure pixel points from the plurality of pixel points according to a preset overexposure value interval and the color value information;
determining a placement area for a preset basic graph according to the overexposure pixel points;
and placing the basic graph in the placement area, and combining the basic graph and the picture to be processed.
2. The picture processing method according to claim 1,
after extracting a plurality of pixel points of the picture to be processed, the method further comprises the following steps:
mapping each pixel point to a preset coordinate system, and determining the position coordinate of each pixel point;
determining the position center point of the placement area according to the position coordinates of the overexposure pixel points;
placing the basic graph in the placement area, including: and controlling the distance between the center point of the basic graph and the position center point not to be larger than a preset distance threshold value.
3. The method according to claim 2, wherein the determining the center point of the position of the placement area comprises:
when the number of the over-exposed pixel points is at least two,
dividing at least one overexposure area for the picture to be processed according to the position coordinate of each overexposure pixel point;
and in each overexposure area, selecting a position center point for a preset basic graph.
4. The method according to claim 3, wherein dividing at least one overexposed region for the picture to be processed comprises:
aiming at unselected overexposure pixel points, executing:
selecting a first overexposure pixel point from the unselected overexposure pixel points;
searching a second overexposure pixel point meeting a first region limiting condition for the first overexposure pixel point according to the position coordinates of the unselected overexposure pixel points and the position coordinates of the first overexposure pixel point;
after the searching is finished, if the second overexposure pixel point is searched, the second overexposure pixel point is selected, and the maximum area defined by the position coordinate of the second overexposure pixel point and the position coordinate of the first overexposure pixel point is determined to be an overexposure area.
5. The picture processing method according to claim 4, further comprising:
and if the second overexposure pixel point is not found, taking the position coordinate of the first overexposure pixel point as the position center point.
6. The method according to claim 3, wherein dividing at least one overexposed region for the picture to be processed comprises:
taking each over-exposure pixel point as a third over-exposure pixel point, and executing the following steps aiming at each third over-exposure pixel point:
searching a fourth overexposure pixel point meeting a second area limiting condition for the third overexposure pixel point, and determining that a maximum area defined by the position coordinates of the third overexposure pixel point and the fourth overexposure pixel point is an overexposure area;
when the number of the over-exposed regions is at least two,
and fusing overexposure areas with the same overexposure pixel points into one overexposure area, so that the overexposure pixel points only belong to one overexposure area.
7. The method according to claim 4, wherein searching for a second overexposed pixel satisfying a first region constraint condition for the first overexposed pixel comprises:
and circularly executing the following steps until the search is finished:
searching a fifth overexposure pixel point adjacent to the position coordinate of the first overexposure pixel point from the unselected overexposure pixel points; if the fifth overexposure pixel point is found, taking the fifth overexposure pixel point as the first overexposure pixel point; if not, ending the search;
and determining all the found fifth overexposure pixel points as the second overexposure pixel points meeting the first area limiting condition.
8. The method according to any one of claims 4 to 7, wherein selecting a center point for a predetermined basic pattern in each of the overexposure regions comprises:
and determining the limit edge point included by the overexposure area as the position center point.
9. The method according to any one of claims 4 to 7, wherein selecting a center point for a predetermined basic pattern in each of the overexposure regions comprises:
and circularly executing the following steps for each overexposure area until all position center points of the overexposure areas are determined:
judging whether the theoretical center point of the overexposure area is located in the overexposure area or not,
if so, determining the theoretical central point as the position central point, and ending the current process;
otherwise, drawing a straight line parallel to the coordinate axis of the coordinate system at the theoretical central point to cut the overexposure area into at least two new overexposure areas, and taking the new overexposure areas as the overexposure areas.
10. The method according to claim 1, wherein after the basic graphics are placed in the placement area, and before the basic graphics and the to-be-processed picture are merged, the method further comprises:
and adjusting the basic graph according to preset mapping parameters and parameter thresholds.
11. A picture processing apparatus, comprising: an extraction unit, a search unit and a merging unit, wherein,
the extraction unit is used for acquiring a picture to be processed and extracting a plurality of pixel points of the picture to be processed, wherein the pixel points comprise color value information;
the searching unit is used for searching overexposed pixel points from the plurality of pixel points according to a preset overexposed value interval and the color value information;
the merging unit is used for determining a placement area for a preset basic graph according to the overexposure pixel points found by the searching unit; and placing the basic graph in the placement area, and combining the basic graph and the picture to be processed.
12. An image processing electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-10.
13. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-10.
CN202010104777.8A 2020-02-20 2020-02-20 Picture processing method and device Pending CN113284040A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010104777.8A CN113284040A (en) 2020-02-20 2020-02-20 Picture processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010104777.8A CN113284040A (en) 2020-02-20 2020-02-20 Picture processing method and device

Publications (1)

Publication Number Publication Date
CN113284040A true CN113284040A (en) 2021-08-20

Family

ID=77275134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010104777.8A Pending CN113284040A (en) 2020-02-20 2020-02-20 Picture processing method and device

Country Status (1)

Country Link
CN (1) CN113284040A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150293466A1 (en) * 2014-04-15 2015-10-15 Canon Kabushiki Kaisha Image forming apparatus and image forming method
CN105872394A (en) * 2015-12-08 2016-08-17 乐视移动智能信息技术(北京)有限公司 Method and device for processing pictures
CN106485668A (en) * 2015-09-02 2017-03-08 汤姆逊许可公司 Mthods, systems and devices for overexposure correction
CN108198152A (en) * 2018-02-07 2018-06-22 广东欧珀移动通信有限公司 Image processing method and device, electronic equipment, computer readable storage medium
CN110221516A (en) * 2019-05-17 2019-09-10 中国科学院微电子研究所 Adding method, adding set, storage medium and the processor of secondary graphics
CN110719407A (en) * 2019-10-18 2020-01-21 北京字节跳动网络技术有限公司 Picture beautifying method, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150293466A1 (en) * 2014-04-15 2015-10-15 Canon Kabushiki Kaisha Image forming apparatus and image forming method
CN106485668A (en) * 2015-09-02 2017-03-08 汤姆逊许可公司 Mthods, systems and devices for overexposure correction
CN105872394A (en) * 2015-12-08 2016-08-17 乐视移动智能信息技术(北京)有限公司 Method and device for processing pictures
WO2017096859A1 (en) * 2015-12-08 2017-06-15 乐视控股(北京)有限公司 Photo processing method and apparatus
CN108198152A (en) * 2018-02-07 2018-06-22 广东欧珀移动通信有限公司 Image processing method and device, electronic equipment, computer readable storage medium
CN110221516A (en) * 2019-05-17 2019-09-10 中国科学院微电子研究所 Adding method, adding set, storage medium and the processor of secondary graphics
CN110719407A (en) * 2019-10-18 2020-01-21 北京字节跳动网络技术有限公司 Picture beautifying method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨洪飞;夏晖;陈忻;孙胜利;饶鹏;: "图像融合在空间目标三维重建中的应用", 红外与激光工程, no. 09, 30 September 2018 (2018-09-30) *

Similar Documents

Publication Publication Date Title
US11037275B2 (en) Complex architecture for image processing
CN107749077B (en) Card ventilation grid shadow rendering method, device, equipment and medium
US10755153B2 (en) Method of generating 3-dimensional code based on gaussian modulating function
CN110865862B (en) Page background setting method and device and electronic equipment
US11462002B2 (en) Wallpaper management method, apparatus, mobile terminal, and storage medium
CN112700513A (en) Image processing method and device
CN112102442A (en) Image-text walking setting method and device for LED display screen
US9519977B2 (en) Letterbox coloring with color detection
CN113989396A (en) Picture rendering method, device, equipment, storage medium and program product
CN111275777A (en) Automatic color matching method, device, medium and electronic equipment
US20230360286A1 (en) Image processing method and apparatus, electronic device and storage medium
US9460544B2 (en) Device, method and computer program for generating a synthesized image from input images representing differing views
CN113284040A (en) Picture processing method and device
US10679383B2 (en) Interface color branding
CN113837181B (en) Screening method, screening device, computer equipment and computer readable storage medium
CN111383289A (en) Image processing method, image processing device, terminal equipment and computer readable storage medium
CN113112422B (en) Image processing method, device, electronic equipment and computer readable medium
CN112927321B (en) Intelligent image design method, device, equipment and storage medium based on neural network
CN114494036A (en) Image saturation adjusting method and device, computer equipment and storage medium
CN112218006B (en) Multimedia data processing method and device, electronic equipment and storage medium
CN115035006A (en) Image processing method, image processing apparatus, and readable storage medium
CN112581565B (en) Method and device for generating multimedia material graph
US10713792B1 (en) System and apparatus for image processing
CN112508774B (en) Image processing method and device
CN113989404B (en) Picture processing method, apparatus, device, storage medium, and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination