CN110852938B - Display picture generation method, device and storage medium - Google Patents

Display picture generation method, device and storage medium Download PDF

Info

Publication number
CN110852938B
CN110852938B CN201911029971.8A CN201911029971A CN110852938B CN 110852938 B CN110852938 B CN 110852938B CN 201911029971 A CN201911029971 A CN 201911029971A CN 110852938 B CN110852938 B CN 110852938B
Authority
CN
China
Prior art keywords
picture
pixel point
filling
display
pixel
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.)
Active
Application number
CN201911029971.8A
Other languages
Chinese (zh)
Other versions
CN110852938A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911029971.8A priority Critical patent/CN110852938B/en
Publication of CN110852938A publication Critical patent/CN110852938A/en
Application granted granted Critical
Publication of CN110852938B publication Critical patent/CN110852938B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention relates to the technical field of image processing, in particular to a method and a device for generating a display picture and a storage medium, wherein the method comprises the following steps: acquiring an original picture and a picture target size; determining a region to be filled of a display picture corresponding to the original picture according to the original picture and the picture target size; reading pixel point information in the original picture; determining the dispersion degree of the pixel point colors in the original picture according to the pixel point information; selecting a picture filling mode of a display picture corresponding to the original picture according to the dispersion; and filling the region to be filled according to the picture filling mode to generate the display picture. According to the display picture generation method, the picture filling mode of the display picture is selected according to the dispersion degree of the pixel point colors in the original picture, and the region to be filled of the display picture is filled, so that the color transition of the filled display picture is more natural, and the display effect of the picture is improved.

Description

Display picture generation method, device and storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and apparatus for generating a display picture, and a storage medium.
Background
Artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use the knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision.
In order to meet the requirements of internet users, the existing network platforms such as resource management platforms need to display various resources (such as picture resources, report cover resources and the like), and as the platforms have strict requirements on the display proportion of pictures, incomplete picture information display is easy to occur, the original picture resources need to be intelligently processed to generate display pictures and then display the display pictures.
In the prior art, one method is to fill the outer edges of at least one of the four sides of the picture with the main base color of the picture, so that the size of the filled picture is the same as the size required by the front end display, and the filled picture is displayed. The method is easy to lead the filled picture to have abrupt cracking sense for the picture with complex color value, and has poor user experience. The other method is to calculate the optimal offset of the picture based on a short-side compression logic algorithm and combining the position information of the picture main body object, optimally cut the picture, and display the cut picture. The method has good picture display effect on the salient objects such as faces, articles and the like, but cannot recognize the text information such as titles, subtitles, reporting mechanism identifications and the like in the report for the resources mainly comprising the text, so that the situation that important text contents of the report cover are cut out can occur in practical application, and the display effect is poor.
Disclosure of Invention
Aiming at the problems in the prior art, the invention aims to provide a display picture generation method, a display picture generation device and a storage medium, which can make the color transition of a display picture more natural and improve the display effect of the picture.
In order to solve the above problems, the present invention provides a method for generating a display picture, comprising:
acquiring an original picture and a picture target size;
determining a region to be filled of a display picture corresponding to the original picture according to the original picture and the picture target size;
reading pixel point information in the original picture;
determining the dispersion degree of the pixel point colors in the original picture according to the pixel point information;
selecting a picture filling mode of a display picture corresponding to the original picture according to the dispersion;
and filling the region to be filled according to the picture filling mode to generate the display picture.
Another aspect of the present invention provides a display picture generating apparatus, including:
the acquisition module is used for acquiring an original picture and a picture target size;
the first determining module is used for determining a region to be filled of a display picture corresponding to the original picture according to the original picture and the picture target size;
The reading module is used for reading pixel point information in the original picture;
the second determining module is used for determining the dispersion degree of the pixel point colors in the original picture according to the pixel point information;
the selection module is used for selecting a picture filling mode of the display picture corresponding to the original picture according to the dispersion;
and the filling module is used for filling the region to be filled according to the picture filling mode to generate the display picture.
In another aspect, the present invention provides an electronic device including a processor and a memory having at least one instruction, at least one program, a set of codes, or a set of instructions stored therein, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by the processor to implement a method as described above.
In another aspect, the present invention provides a computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by a processor to implement a method as described above.
Due to the technical scheme, the invention has the following beneficial effects:
according to the display picture generation method, the display picture generation device and the storage medium, the region to be filled of the display picture corresponding to the original picture is determined according to the original picture and the picture target size, the picture filling mode of the display picture is selected according to the dispersion of the pixel point colors in the original picture, and the region to be filled of the display picture is filled. According to the display picture generation method, the original picture is not required to be cut, the condition that the content of the picture is not displayed completely can be avoided, a proper picture filling mode is selected according to the dispersion of the pixel point colors in the original picture, the color transition of the filled display picture is more natural, the display effect of the picture is improved, and further user experience is improved.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the following description will make a brief introduction to the drawings used in the description of the embodiments or the prior art. It is evident that the drawings in the following description are only some embodiments of the present invention and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is a flowchart of a method for generating a presentation picture according to an embodiment of the present invention;
fig. 2 is a schematic diagram showing an example of a picture generation method according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for generating a presentation picture according to another embodiment of the present invention;
fig. 4 is a flowchart of a method for generating a presentation picture according to another embodiment of the present invention;
FIG. 5 is a flowchart of a method for generating a presentation picture according to another embodiment of the present invention;
fig. 6 is a schematic diagram showing an example of a picture generation method according to another embodiment of the present invention;
fig. 7 is a schematic diagram showing an example of a picture generation method according to another embodiment of the present invention;
FIG. 8 is a schematic diagram of a picture presentation interface provided by an embodiment of the present invention;
FIG. 9 is a schematic diagram of a picture display interface according to another embodiment of the present invention;
FIG. 10A is a diagram illustrating the effects of displaying pictures according to the prior art according to an embodiment of the present invention;
fig. 10B is a schematic diagram of a picture display effect according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a display picture generating device according to an embodiment of the present invention;
Fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, article, or device that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or device.
Referring to fig. 1 of the specification, a flow of a method for generating a display picture according to an embodiment of the present invention is shown, where the method for generating a display picture may be applied to a device for generating a display picture according to an embodiment of the present invention, where the device for generating a display picture may be configured in an electronic device, and the electronic device may be a terminal or a server. The terminal can be a hardware device with various operating systems, such as a smart phone, a desktop computer, a tablet computer, a notebook computer and the like. The server may comprise a single independently operating server, or a distributed server, or a server cluster consisting of a plurality of servers.
It is noted that the present specification provides method operational steps as described in the examples or flowcharts, but may include more or fewer operational steps based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one way of performing the order of steps and does not represent a unique order of execution. In actual system or product execution, the methods illustrated in the embodiments or figures may be performed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment). As shown in fig. 1, the method may include the steps of:
S110: and acquiring the original picture and the picture target size.
In the embodiment of the present invention, the target size of the picture is the size of the picture required for displaying, and the original picture may include a local picture specified by the user, a picture downloaded from a network, or a picture obtained synchronously (transmitted through a wired or wireless connection manner) from other electronic devices.
In practical application, the display picture generation method can be applied to various resource management platforms with a picture display function, such as a picture resource aggregation platform, a report resource management platform and the like. The picture target size may also be different due to the different resource management platforms. Because the area of the resource management platform displaying the picture is generally a fixed size and a fixed proportion (for example, 4:3), and the original picture can include various sizes and proportions (for example, 4:3-16:9, >16:9, and unresolved proportions), the original picture needs to be processed to obtain a display picture with the same size and the same proportion as those of the picture required for display, and then the display picture is displayed.
In one possible embodiment, after the obtaining the original picture and the target size of the picture, the method may further include:
Extracting size information of the original picture;
and when the size information accords with a picture filling condition, executing the step of determining the region to be filled of the display picture corresponding to the original picture according to the original picture and the picture target size.
Specifically, the picture filling condition may include that the picture proportion is within a preset proportion range (for example, 4:3-16:9 and 16:9), after the size information of the original picture is extracted, the picture proportion of the original picture may be calculated according to the size information (for example, the aspect ratio of the original picture is calculated), and when the picture proportion of the original picture is within the preset proportion range, the display picture is obtained by processing the original picture by adopting the display picture generating method of the present invention, and the display picture is displayed.
In practical application, for example, in the report resource management platform, when the proportion of the original picture does not meet the picture filling condition, a picture with the same picture size as the target size of the picture can be randomly selected from a preset picture library to be displayed as a report cover.
S120: and determining a region to be filled of the display picture corresponding to the original picture according to the original picture and the picture target size.
In the embodiment of the present invention, the picture size of the display picture is the same as the target size of the picture, and the display picture may include the content of the original picture and at least one region to be filled.
In one possible embodiment, the determining, according to the original picture and the target size of the picture, the region to be filled of the display picture corresponding to the original picture may include:
creating a blank picture with the picture size identical to the picture target size;
scaling the original picture so that the picture size of the scaled original picture is smaller than or equal to the picture target size;
superposing the scaled original picture and the blank picture to generate a display picture corresponding to the original picture;
and taking the blank area in the display picture as the area to be filled.
Specifically, when the scaled original picture is overlapped with the blank picture, the scaled original picture may be centrally placed above the blank picture to be overlapped, so as to generate the display picture.
In an example, when the original picture is scaled in conjunction with fig. 2 of the specification, the width dimension of the scaled original picture may be equal to the width dimension of the blank picture, and the height dimension is smaller than the height dimension of the blank picture. When the scaled original picture and the blank picture are overlapped, the scaled original picture can be placed above the blank picture in a centered manner to be overlapped, so that an upper blank area and a lower blank area are obtained and serve as areas to be filled.
It should be noted that, according to the difference between the size information of the original picture and the target size of the picture, the determined positions of the regions to be filled of the display picture corresponding to the original picture may be different, for example, the positions may be an upper region, a lower region, a left region, a right region, or an annular region around the original picture.
S130: and reading pixel point information in the original picture.
In the embodiment of the present invention, the pixel information may include a color value of the pixel, where the color value of the pixel may be represented by a vector formed by a Red Green Blue (RGB) value and transparency of the pixel, and if transparency of the picture is not considered, the color value may also be directly represented by a vector of RGB color values of the pixel.
In one possible embodiment, the reading the pixel information in the original picture may include reading a preset number of rows of pixel information near a boundary in the original picture. Specifically, the method may include reading pixel point information of a preset number of rows (e.g., 5 rows) in the original picture, which is close to a boundary adjacent to the region to be filled. For example, if the region to be filled is an upper region and a lower region, pixel point information of preset rows of the upper boundary and the lower boundary of the original picture can be read; if the region to be filled is a left region and a right region, pixel point information of preset rows of left and right boundaries in the original picture can be read; if the region to be filled is an annular region around the original picture, pixel point information of preset rows of all boundaries of the original picture can be read.
It should be noted that, in some possible embodiments, the reading the pixel information in the original picture may also include reading pixel information of a certain area inside the original picture.
S140: and determining the dispersion degree of the pixel colors in the original picture according to the pixel information.
In the embodiment of the invention, the pixel point information may include a color value of the pixel point, and the dispersion of the color of the pixel point in the original picture may be used to represent the color complexity of the original picture, where the larger the dispersion of the color of the pixel point is, the more complex the color of the original picture is.
In one possible embodiment, as shown in fig. 3, the determining the dispersion of the pixel color in the original picture according to the pixel information may include:
s310: and clustering the pixel point information to obtain a plurality of clustering sets.
In the embodiment of the invention, each clustering set may include a plurality of pixel points, the pixel point information of the pixel points in different clustering sets is different, the pixel point information of each pixel point in the same clustering set is the same, if the pixel point information of the pixel point A and the pixel point B is the same, it indicates that the pixel point A and the pixel point B are the same color, and the pixel point A and the pixel point B may be clustered into one clustering set.
S320: and acquiring pixel point information corresponding to the clustering set with the largest number of pixel points, and calculating the pixel point information as first pixel point information.
In the embodiment of the invention, the number of the pixels in each cluster set can be counted respectively, and the pixel information corresponding to the cluster set with the largest number of the pixels is counted as the first pixel information.
S330: and determining the dispersion degree of the pixel colors in the original picture according to the pixel information and the first pixel information.
In one possible embodiment, as shown in fig. 4, the determining the dispersion of the pixel color in the original picture according to the pixel information and the first pixel information may include:
s331: and calculating the distance between the pixel point information and the first pixel point information.
In the embodiment of the invention, the Euclidean distance between each pixel point information and the first pixel point information can be calculated respectively, and the Euclidean distance can be used for measuring the difference between the colors of the pixel points.
S332: and acquiring pixel point information of which the distance meets preset conditions, and generating a target pixel point information set.
In the embodiment of the invention, all the pixel point information can be ordered according to the distance between the pixel point information and the first pixel point information to obtain an ordering result, and the first 90% of the pixel point information (namely, the pixel point information with the minimum distance between the pixel point information and the first pixel point information) in the ordering result is acquired to form a target pixel point information set, so that the influence of some high-contrast patterns on the determination of the filling mode of the picture can be removed.
S333: and calculating a second moment of the target pixel information set and the first pixel information, and taking the second moment as the dispersion of the pixel colors in the original picture.
In the embodiment of the invention, the second moment can represent the fluctuation of the pixel point information in the target pixel point information set near the first pixel point information, can be used for measuring the dispersion of all the pixel point information in the target pixel point information set, and can be used as the dispersion of the pixel point colors in the original picture.
S150: and selecting a picture filling mode of the display picture corresponding to the original picture according to the dispersion.
In the embodiment of the invention, the picture filling mode of the display picture corresponding to the original picture can be selected from a preset method library according to the complexity degree of the pixel point color in the original picture. The preset method library comprises fuzzy filling and solid-color filling, when the color of the pixel points in the original picture is single, the solid-color filling is adopted, so that the filling part and the content of the original picture are seamlessly connected and fused, and when the color of the pixel points in the original picture is complex, the fuzzy filling is adopted, so that the filled display picture is softer, and abrupt cracking sense is avoided.
In the embodiment of the present invention, the picture filling method for selecting the display picture corresponding to the original picture according to the dispersion may include:
when the dispersion is smaller than or equal to a first preset threshold value, determining that a picture filling mode of the display picture corresponding to the original picture is solid color filling;
and when the dispersion is larger than a first preset threshold value, determining that the picture filling mode of the display picture corresponding to the original picture is fuzzy filling.
The first preset threshold may be set according to an empirical value, for example, may be set to 300. When the dispersion is smaller than or equal to a first preset threshold value, the pixel point color in the original picture is illustrated to be single, so that the picture filling mode of the display picture corresponding to the original picture can be determined to be solid color filling. When the dispersion is larger than a first preset threshold, the pixel point color in the original picture is described as complex, so that the picture filling mode of the display picture corresponding to the original picture can be determined to be fuzzy filling.
S160: and filling the region to be filled according to the picture filling mode to generate the display picture.
In the embodiment of the invention, the region to be filled can be filled according to the determined picture filling mode to obtain the display picture, and the picture size of the display picture is the same as the picture target size.
In one possible embodiment, as shown in fig. 5, the filling the region to be filled according to the picture filling manner, and generating the display picture may include:
s1611: and when the picture filling mode is solid color filling, clustering the pixel point information to obtain a plurality of clustering sets.
In the embodiment of the invention, each cluster set may include a plurality of pixels, and the pixel information of the pixels in different cluster sets is different, and the pixel information of each pixel in the same cluster set is the same.
S1621: and acquiring pixel point information corresponding to the clustering set with the largest number of pixel points, and calculating the pixel point information as second pixel point information.
In the embodiment of the invention, the number of the pixel points in each cluster set can be counted respectively, and the pixel point information corresponding to the cluster set with the largest number of the pixel points is counted as the second pixel point information.
S1631: and filling the region to be filled with the pixel point color corresponding to the second pixel point information to generate the display picture.
In the embodiment of the invention, the pixel point color corresponding to the second pixel point information can be used as the filling color to fill all the areas to be filled, and the original picture and the areas to be filled can be spliced to generate the display picture.
In an example, referring to fig. 6 of the specification, the display picture includes an upper region and a lower region to be filled, and when the solid color filling method is used, the region to be filled can be directly filled with the pixel point color corresponding to the second pixel point information, so as to generate the display picture.
In another possible embodiment, as shown in fig. 5, the filling the region to be filled according to the picture filling manner, generating the display picture may further include:
s1641: and obtaining the total number of the pixel points corresponding to the pixel point information.
S1651: and calculating the ratio of the number of the pixels of the clustering set corresponding to the second pixel information to the total number of the pixels.
S1661: and when the ratio is smaller than or equal to a second preset threshold value, replacing the pixel point information by using the second pixel point information.
In the embodiment of the present invention, the second preset threshold may be set empirically, for example, may be set to 0.8. If the ratio is smaller than or equal to a second preset threshold, the number of boundary noise of the original picture is larger, and the pixel color corresponding to the second pixel information can be used for covering all pixel colors in a certain range (such as a 5-row pixel range) on the boundary of the original picture.
In another possible embodiment, as shown in fig. 5, the filling the region to be filled according to the picture filling manner, and generating the display picture may include:
s1612: and when the picture filling mode is fuzzy filling, generating a fuzzy picture based on the original picture according to a preset fuzzy algorithm.
S1622: and filling the region to be filled with the blurred image to generate the display image.
In the embodiment of the present invention, the preset blurring algorithm may include a gaussian blurring algorithm, and the parameter selection may be a blurring radius r=50, and a normal distribution standard deviation σ=50. The size information of the blurred picture may be identical to the size information of the original picture, and the number of blurred pictures may be identical to the number of regions to be filled.
In an example, referring to fig. 7 of the specification, the display picture includes an upper region and a lower region to be filled, when using fuzzy filling, two fuzzy pictures with size information equal to that of the original picture can be generated according to a gaussian fuzzy algorithm (the parameter selection may be fuzzy radius r=50 and normal distribution standard deviation σ=50), and then the upper region and the lower region to be filled are filled by using the fuzzy pictures, so as to generate the display picture.
In one possible embodiment, after the display picture is generated, the display picture may be displayed in a specified picture display interface.
In one example, referring to fig. 8 of the drawings, a schematic diagram of a picture display interface provided by an embodiment of the present invention is shown, where the resource management interface 81, the resource interface 82 and the resource detail page 83 of the report resource management platform on the personal computer (Personal Computer, PC) side each include a plurality of picture display areas 84, and the picture display areas 84 are used to display the display pictures.
In another example, referring to fig. 9 of the drawings, a schematic diagram of a picture display interface provided by another embodiment of the present invention is shown, where the report resource management platform includes a plurality of picture display areas 94 on the resource management interface 91, the resource interface 92, and the resource detail page 93 of the mobile terminal, where the picture display areas 94 are used to display the display pictures.
It should be noted that, the method of the present invention not only has a good effect for generating the display picture of the picture with the main body such as the face and the object, but also can completely reserve the text information such as the title, the subheading, the reporting mechanism identifier, etc. in the report for the resource picture with the main text as the original picture, and can avoid the incomplete display of the content of the resource picture in combination with the reference to fig. 10A and fig. 10B of the specification.
In summary, according to the display picture generation method, the region to be filled of the display picture corresponding to the original picture is determined according to the original picture and the picture target size, the picture filling mode of the display picture is selected according to the dispersion of the pixel point colors in the original picture, and the region to be filled of the display picture is filled. According to the display picture generation method, the original picture is not required to be cut, the condition that the content of the picture is not displayed completely can be avoided, a proper picture filling mode is selected according to the dispersion of the pixel point colors in the original picture, the color transition of the filled display picture is more natural, the display effect of the picture is improved, and further user experience is improved.
In addition, in the process of filling with pure colors, the display picture generation method can cover all pixel points in the boundary by using the pixel point color with the largest number in the boundary of the original picture, can eliminate the noise and color-changing boundary of the original picture caused by scaling or cutting, and further improves the display effect.
Referring to fig. 11 of the present disclosure, a structure of a display picture generation apparatus 1100 according to an embodiment of the present disclosure is shown, where the display picture generation apparatus 1100 may include:
An acquisition module 1110, configured to acquire an original picture and a target size of the picture;
a first determining module 1120, configured to determine a region to be filled of a display picture corresponding to the original picture according to the original picture and the target size of the picture;
a reading module 1130, configured to read pixel information in the original picture;
a second determining module 1140, configured to determine a dispersion of pixel colors in the original picture according to the pixel information;
a selecting module 1150, configured to select a picture filling mode of the display picture corresponding to the original picture according to the dispersion;
and the filling module 1160 is configured to fill the region to be filled according to the picture filling mode, and generate the display picture.
In one possible embodiment, the second determining module 1140 may include:
the clustering unit is used for clustering the pixel point information to obtain a plurality of clustering sets;
the acquisition unit is used for acquiring pixel point information corresponding to the clustering set with the largest pixel point number and counting the pixel point information as first pixel point information;
and the determining unit is used for determining the dispersion degree of the pixel point colors in the original picture according to the pixel point information and the first pixel point information.
In another possible embodiment, the determining unit may include:
a first calculating subunit, configured to calculate a distance between the pixel point information and the first pixel point information;
the acquisition subunit is used for acquiring the pixel point information of which the distance meets the preset condition and generating a target pixel point information set;
the second calculating subunit is configured to calculate a second moment of the target pixel point information set and the first pixel point information, and use the second moment as a dispersion of pixel point colors in the original picture.
It should be noted that, in the apparatus provided in the foregoing embodiment, when implementing the functions thereof, only the division of the foregoing functional modules is used as an example, in practical application, the foregoing functional allocation may be implemented by different functional modules, that is, the internal structure of the device is divided into different functional modules, so as to implement all or part of the functions described above.
An embodiment of the present invention further provides an electronic device, where the electronic device includes a processor and a memory, where the memory stores at least one instruction, at least one section of program, a code set, or an instruction set, and the at least one instruction, the at least one section of program, the code set, or the instruction set is loaded and executed by the processor to implement a presentation picture generation method as provided in the foregoing method embodiment.
The memory may be used to store software programs and modules that the processor executes to perform various functional applications and to generate presentation pictures by running the software programs and modules stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required for functions, and the like; the storage data area may store data created according to the use of the device, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide access to the memory by the processor.
In a specific embodiment, as shown in fig. 12, a schematic structural diagram of an electronic device running a method for generating a presentation image according to an embodiment of the present invention is shown. As shown in fig. 12, the device 1200 may include one or more computer-readable storage media memory 1210, one or more processing cores processor 1220, input unit 1230, display unit 1240, radio Frequency (RF) circuit 1250, wireless fidelity (wireless fidelity, wiFi) module 1260, and power supply 1270, among other components. Those skilled in the art will appreciate that the device structure shown in fig. 12 is not limiting of the device 1200 and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
The memory 1210 may be used to store software programs and modules, and the processor 1220 may execute various functional applications and data processing by executing or executing the software programs and modules stored in the memory 1210 and invoking data stored in the memory 1210. The memory 1210 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the device, etc. In addition, the memory 1210 may include high-speed random access memory, and may also include nonvolatile memory, such as a hard disk, memory, plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory 1210 may also include a memory controller to provide processor 1220 with access to memory 1210.
The processor 1220 is a control center of the device 1200, connects various parts of the entire device using various interfaces and lines, and performs various functions of the device 1200 and processes data by running or executing software programs and/or modules stored in the memory 1210, and invoking data stored in the memory 1210, thereby performing overall monitoring of the device 1200. The processor 1220 may be a central processing unit, but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input unit 1230 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 1230 may include an image input device 1231 and other input devices 1232. The image input device 1231 may be a camera or an optoelectronic scanning device. The input unit 1230 may include other input devices 1232 in addition to the image input device 1231. In particular, other input devices 1232 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 1240 may be used to display information input by a user or information provided to the user and various graphical user interfaces of the device, which may be composed of graphics, text, icons, video, and any combination thereof. The display unit 1240 may include a display panel 1241, and alternatively, the display panel 1241 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The RF circuit 1250 can be used for receiving and transmitting signals during the process of receiving and transmitting information or communication, in particular, after receiving the downlink information of the base station, the downlink information is processed by one or more processors 1220; in addition, data relating to uplink is transmitted to the base station. Typically, RF circuitry 1250 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, and the like. In addition, the RF circuitry 1250 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol including, but not limited to, global system for mobile communications (Global System of Mobile communication, GSM), general packet radio service (General Packet Radio Service, GPRS), code division multiple access (Code Division Multiple Access, CDMA), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), long term evolution (Long Term Evolution, LTE), email, short message service (Short Messaging Service, SMS), and the like.
WiFi is a short-range wireless transmission technology, and the device 1200 can help users send and receive e-mail, browse web pages, access streaming media, etc. through the WiFi module 1260, which provides wireless broadband Internet access to the users. Although fig. 12 shows a WiFi module 1260, it is to be understood that it does not belong to the essential constitution of the device 1200 and can be omitted entirely as desired within the scope of not changing the essence of the invention.
The device 1200 also includes a power supply 1270 (e.g., a battery) for powering the various components, which may preferably be logically connected to the processor 1220 via a power management system so as to perform functions such as managing charge, discharge, and power consumption via the power management system. The power supply 1270 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
It should be noted that, although not shown, the device 1200 may further include a bluetooth module, etc., which is not described herein.
An embodiment of the present invention also provides a computer-readable storage medium that can be set in a server to store at least one instruction, at least one program, a set of codes, or a set of instructions for implementing a presentation picture generation method, where the at least one instruction, the at least one program, the set of codes, or the set of instructions can be loaded and executed by a processor of the server to implement the various steps of the presentation picture generation method as provided in the above-described method embodiments.
Alternatively, in an embodiment of the present invention, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device, terminal and server embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and references to the parts of the description of the method embodiments are only needed.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (10)

1. A display picture generation method, characterized by comprising:
acquiring an original picture and a picture target size;
determining a region to be filled of a display picture corresponding to the original picture according to the original picture and the picture target size; the display picture comprises the content of the original picture and the blank region to be filled;
reading pixel point information in the original picture;
determining the dispersion degree of the pixel point colors in the original picture according to the pixel point information; the dispersion characterizes the color complexity of the original picture;
selecting a picture filling mode of a display picture corresponding to the original picture according to the dispersion; the picture filling mode is solid color filling or fuzzy filling;
and filling the region to be filled according to the picture filling mode, and generating a filled display picture.
2. The method of claim 1, further comprising, after the obtaining the original picture and the picture target size:
Extracting size information of the original picture;
and when the size information accords with a picture filling condition, executing the step of determining the region to be filled of the display picture corresponding to the original picture according to the original picture and the picture target size.
3. The method of claim 1, wherein determining the dispersion of pixel colors in the original picture from the pixel information comprises:
clustering the pixel point information to obtain a plurality of clustering sets;
acquiring pixel point information corresponding to a clustering set with the largest number of pixel points, and calculating the pixel point information as first pixel point information;
and determining the dispersion degree of the pixel colors in the original picture according to the pixel information and the first pixel information.
4. A method according to claim 3, wherein said determining the dispersion of pixel colors in the original picture from the pixel information and the first pixel information comprises:
calculating the distance between the pixel point information and the first pixel point information;
acquiring pixel point information of which the distance meets preset conditions, and generating a target pixel point information set;
And calculating a second moment of the target pixel information set and the first pixel information, and taking the second moment as the dispersion of the pixel colors in the original picture.
5. The method of claim 1, wherein selecting the picture filling mode of the display picture corresponding to the original picture according to the dispersion comprises:
when the dispersion is smaller than or equal to a first preset threshold value, determining that a picture filling mode of the display picture corresponding to the original picture is solid color filling;
and when the dispersion is larger than a first preset threshold value, determining that the picture filling mode of the display picture corresponding to the original picture is fuzzy filling.
6. The method according to claim 1, wherein the filling the region to be filled in the picture filling manner, and generating the display picture comprises:
when the picture filling mode is solid color filling, clustering the pixel point information to obtain a plurality of clustering sets;
acquiring pixel point information corresponding to the clustering set with the largest pixel point number, and calculating the pixel point information as second pixel point information;
and filling the region to be filled with the pixel point color corresponding to the second pixel point information to generate the display picture.
7. The method of claim 6, wherein the filling the region to be filled in the picture filling manner, generating the display picture further comprises:
acquiring the total number of the pixel points corresponding to the pixel point information;
calculating the ratio of the number of pixels of the clustering set corresponding to the second pixel information to the total number of pixels;
and when the ratio is smaller than or equal to a second preset threshold value, replacing the pixel point information by using the second pixel point information.
8. The method according to claim 1, wherein the filling the region to be filled in the picture filling manner, and generating the display picture comprises:
when the picture filling mode is fuzzy filling, generating a fuzzy picture based on the original picture according to a preset fuzzy algorithm;
and filling the region to be filled with the blurred image to generate the display image.
9. A display picture generation apparatus, characterized by comprising:
the acquisition module is used for acquiring an original picture and a picture target size;
the first determining module is used for determining a region to be filled of a display picture corresponding to the original picture according to the original picture and the picture target size; the display picture comprises the content of the original picture and the blank region to be filled;
The reading module is used for reading pixel point information in the original picture;
the second determining module is used for determining the dispersion degree of the pixel point colors in the original picture according to the pixel point information; the dispersion characterizes the color complexity of the original picture;
the selection module is used for selecting a picture filling mode of the display picture corresponding to the original picture according to the dispersion; the picture filling mode is solid color filling or fuzzy filling;
and the filling module is used for filling the region to be filled according to the picture filling mode to generate a filled display picture.
10. A computer readable storage medium having stored therein at least one instruction, at least one program, code set, or instruction set, the at least one instruction, the at least one program, the code set, or instruction set being loaded and executed by a processor to implement the method of any of claims 1-8.
CN201911029971.8A 2019-10-28 2019-10-28 Display picture generation method, device and storage medium Active CN110852938B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911029971.8A CN110852938B (en) 2019-10-28 2019-10-28 Display picture generation method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911029971.8A CN110852938B (en) 2019-10-28 2019-10-28 Display picture generation method, device and storage medium

Publications (2)

Publication Number Publication Date
CN110852938A CN110852938A (en) 2020-02-28
CN110852938B true CN110852938B (en) 2024-03-19

Family

ID=69597999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911029971.8A Active CN110852938B (en) 2019-10-28 2019-10-28 Display picture generation method, device and storage medium

Country Status (1)

Country Link
CN (1) CN110852938B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111339465A (en) * 2020-03-04 2020-06-26 北京字节跳动网络技术有限公司 Picture processing method and device, computer equipment and storage medium
CN113301414B (en) * 2020-07-07 2023-06-02 阿里巴巴集团控股有限公司 Interface generation processing method and device, electronic equipment and computer storage medium
CN111862271B (en) * 2020-07-24 2024-04-26 广州市百果园信息技术有限公司 Display area filling method, device, equipment and storage medium
CN113760153A (en) * 2020-10-20 2021-12-07 北京沃东天骏信息技术有限公司 Image processing method and device
CN112381799B (en) * 2020-11-16 2024-01-23 广东电网有限责任公司肇庆供电局 Wire strand breakage confirmation method and device, electronic equipment and computer readable storage medium
CN112632422B (en) * 2020-12-29 2024-02-02 中国平安财产保险股份有限公司 Intelligent graph cutting method and device, electronic equipment and storage medium
CN113238692B (en) * 2021-06-08 2023-04-18 北京字跳网络技术有限公司 Region selection method, map division method, device and computer equipment
CN113449128B (en) * 2021-06-29 2024-04-05 平安资产管理有限责任公司 Picture generation method and related device for displaying key equity structure
CN113778585A (en) * 2021-08-09 2021-12-10 杭州当贝网络科技有限公司 Icon generation method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461439A (en) * 2014-12-29 2015-03-25 联想(北京)有限公司 Information processing method and electronic equipment
CN106340023A (en) * 2016-08-22 2017-01-18 腾讯科技(深圳)有限公司 Image segmentation method and image segmentation device
CN107368295A (en) * 2017-06-07 2017-11-21 努比亚技术有限公司 A kind of terminal wallpaper generation method, terminal and computer-readable recording medium
CN108924557A (en) * 2018-06-11 2018-11-30 青岛海信电器股份有限公司 Image processing method, device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106296578B (en) * 2015-05-29 2020-04-28 阿里巴巴集团控股有限公司 Image processing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461439A (en) * 2014-12-29 2015-03-25 联想(北京)有限公司 Information processing method and electronic equipment
CN106340023A (en) * 2016-08-22 2017-01-18 腾讯科技(深圳)有限公司 Image segmentation method and image segmentation device
CN107368295A (en) * 2017-06-07 2017-11-21 努比亚技术有限公司 A kind of terminal wallpaper generation method, terminal and computer-readable recording medium
CN108924557A (en) * 2018-06-11 2018-11-30 青岛海信电器股份有限公司 Image processing method, device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于分块阈值LBP算法的光学薄膜表面缺陷分割;李浩然;陆金桂;;南京工业大学学报(自然科学版)(第05期) *

Also Published As

Publication number Publication date
CN110852938A (en) 2020-02-28

Similar Documents

Publication Publication Date Title
CN110852938B (en) Display picture generation method, device and storage medium
CN109189289B (en) Method and device for generating icon based on screen capture image
CN110389696B (en) Method and device for controlling screen color gamut, electronic equipment and storage medium
CN109062715B (en) Method and device for determining memory clock frequency and terminal
CN107436712B (en) Method, device and terminal for setting skin for calling menu
CN111866976B (en) Network switching method and device
US11216644B2 (en) Method, device, and medium for processing image
CN110569008B (en) Screen data processing method and device and electronic equipment
CN106101374A (en) The display packing of notification message and device, terminal
CN106330681B (en) Method, system and related equipment for sharing film watching information
CN107872533B (en) Information-pushing method, device, server and storage medium
CN111190634B (en) Layout information processing method and device and electronic equipment
CN112840305B (en) Font switching method and related product
CN110912801B (en) Method, system and terminal device for detecting electronic red packet
CN109495876A (en) A kind of transmission method and mobile terminal of mobile terminal data
CN114125139A (en) Information processing method and electronic device
CN110096190B (en) Method and terminal for displaying two-dimensional code
CN112953813A (en) Message sending method and device, electronic equipment and readable storage medium
WO2024078615A1 (en) Model selection method, terminal and network-side device
EP3637783A1 (en) Method and apparatus for processing video resource
CN108596270A (en) Picture control methods, device, equipment and computer readable storage medium
CN110874222A (en) Template deployment method and device of smart television and server
US20240178900A1 (en) Method and Apparatus for Determining Beam Application Time, Terminal, and Network-Side Device
WO2023011532A1 (en) Method for determining beam application time, and terminal and network side device
CN114237783A (en) Signal grid display method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40021708

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant