WO2020215861A1 - Picture display method, picture display apparatus, electronic device and storage medium - Google Patents

Picture display method, picture display apparatus, electronic device and storage medium Download PDF

Info

Publication number
WO2020215861A1
WO2020215861A1 PCT/CN2020/075654 CN2020075654W WO2020215861A1 WO 2020215861 A1 WO2020215861 A1 WO 2020215861A1 CN 2020075654 W CN2020075654 W CN 2020075654W WO 2020215861 A1 WO2020215861 A1 WO 2020215861A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
target picture
color
target
display
Prior art date
Application number
PCT/CN2020/075654
Other languages
French (fr)
Chinese (zh)
Inventor
李咸珍
管恩慧
赵天月
李志超
王志懋
Original Assignee
京东方科技集团股份有限公司
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 京东方科技集团股份有限公司 filed Critical 京东方科技集团股份有限公司
Publication of WO2020215861A1 publication Critical patent/WO2020215861A1/en

Links

Images

Classifications

    • G06T3/04

Definitions

  • the present disclosure relates to the field of image display technology, and in particular to a picture display method, picture display device, electronic equipment, and computer-readable storage medium.
  • the present disclosure provides a picture display method, a picture display device, an electronic device, and a computer-readable storage medium, thereby at least to some extent overcome the problem of low aesthetics of the existing picture display method.
  • a picture display method applied to a display device the display device presents a display area; the method includes: acquiring a target picture to be displayed; detecting the target picture and the display area If the size of the target picture matches the size of the display area, display the target picture in the display area; if the target picture does not match the size of the display area and the target picture If the degree of overlap between the picture and the display area is lower than a preset value, the target picture is displayed in the display area, and a background image is displayed in at least one sub-area of an unfilled area where the target picture is not displayed.
  • the displaying the target picture in the display area and displaying a background image in at least one sub-region of an unfilled area where the target picture is not displayed includes: The target picture is displayed in the display area, and the background image is displayed in an unfilled area where the target picture is not displayed, so that the display area is filled with the target picture and the background image.
  • the method further includes: determining a background image matching the target picture according to the picture information of the target picture.
  • the picture information includes a representative color of the target picture; the method further includes: counting the types of colors that appear in the target picture and the appearance frequency of each color, At least one color with the highest frequency is selected as the representative color of the target picture.
  • the method further includes: acquiring characteristic information of the frame of the display device; and determining a background image matching the target picture according to the picture information of the target picture , Including: determining a background image matching the target picture and the frame based on the characteristic information of the frame and the picture information.
  • the picture information includes a representative color of the target picture, and the characteristic information includes the color of the frame; the characteristic information based on the frame and the picture information , Determining a background image that matches the target picture and the frame includes: determining an intermediate color between the color of the frame and the representative color; and determining the background image that matches the target picture and the frame based on the intermediate color Background image.
  • the representative color includes m colors that appear most frequently in the target picture; the intermediate color is determined by the following formula: Where i is any integer within [1, m], C i is the value of the i-th color in the m colors, f i is the frequency of occurrence of C i in the target picture, and F is the The value of the color of the border, and E is the value of the middle color.
  • the m colors are colors that appear more frequently than a preset threshold in the target picture.
  • the determining a background image matching the target picture according to the picture information of the target picture includes: according to the picture information of the target picture, in the effect material library Find a background image that matches the target picture.
  • the method further includes: acquiring a plurality of sample pictures and a plurality of background materials, the background materials including any one or more of the following: solid color filling, gradient color filling, texture Filling or pattern filling; for each of the sample pictures, a matching relationship between the sample picture and one or more of the background materials is obtained to construct the effect material library.
  • the matching relationship includes a degree of matching
  • the acquiring a plurality of sample pictures and a plurality of background materials includes: searching the Internet for examples of matching the sample pictures and background materials;
  • obtaining the matching relationship between the sample picture and one or more of the background materials to construct the effect material library includes: analyzing the samples to obtain each of the The degree of matching between the sample picture and one or more of the background materials is used to construct the effect material library.
  • the searching for a background image matching the target picture in an effect material library according to the picture information of the target picture includes: searching and Sample pictures with the same or similar target pictures are used as target sample pictures; the background image is generated according to background materials in the effect material library that match the target sample pictures.
  • the searching for a sample picture identical or similar to the target picture in the effect material library as the target sample picture includes: calculating the target picture and the effect For the similarity of each sample picture in the material library, the sample picture with the highest similarity to the target picture is taken as the target sample picture.
  • the displaying the target picture in the display area and displaying a background image in at least one sub-region of an unfilled area where the target picture is not displayed includes: The target picture and the background image are merged into a new image, and the new image is displayed in the display area.
  • a picture display device applied to a display device, the display device presents a display area, the device includes: a picture acquisition module for acquiring a target picture to be displayed; a size detection module, It is used to detect whether the size of the target picture matches the display area; the first display module is used to display the target picture in the display area if the target picture matches the size of the display area ; A second display module, configured to display the target picture in the display area if the target picture does not match the size of the display area, and display the target picture in at least the unfilled area where the target picture is not displayed The background image is displayed in a sub area.
  • the second display module is configured to display the target picture in the display area, and display the background image in an unfilled area where the target picture is not displayed, So that the display area is filled with the target picture and the background image.
  • the device further includes: a background determining module, configured to determine a background image matching the target picture according to the picture information of the target picture.
  • the picture information includes a representative color of the target picture;
  • the picture acquisition module further includes: a picture information acquisition unit configured to count the colors appearing in the target picture The type and frequency of each color, and at least one color with the highest frequency is selected as the representative color of the target picture.
  • the picture obtaining module further includes: a frame information obtaining unit, configured to obtain characteristic information of the frame of the display device; and the background determining module is configured to obtain information based on the frame The feature information and the picture information determine a background image matching the target picture and the frame.
  • the picture information includes a representative color of the target picture, and the characteristic information includes the color of the frame;
  • the background determining module includes: an intermediate color determining unit for Determine an intermediate color between the color of the frame and the representative color; a background image determination unit is configured to determine a background image matching the target picture and the frame based on the intermediate color.
  • the representative color includes m colors that appear most frequently in the target picture; the intermediate color is determined by the following formula: Where i is any integer within [1, m], C i is the value of the i-th color in the m colors, f i is the frequency of occurrence of C i in the target picture, and F is the The color of the border, E is the value of the middle color.
  • the m colors are colors that appear more frequently than a preset threshold in the target picture.
  • the background determining module is further configured to search for a background image matching the target picture in the effect material library according to the picture information of the target picture.
  • the device further includes a material library construction module
  • the material library construction module further includes: a sample acquisition unit for acquiring multiple sample pictures and multiple background materials,
  • the background material includes any one or more of the following: pure color filling, gradient color filling, texture filling or pattern filling; a matching determination unit for obtaining the sample picture and one or more of the sample pictures The matching relationship of the background materials to construct the effect material library.
  • the matching relationship includes a degree of matching; the sample acquisition unit is used to search the Internet for examples of matching sample pictures and background materials; and the matching determination unit is used to pass The samples are analyzed to obtain the degree of matching between each sample picture and one or more of the background materials, so as to construct the effect material library.
  • the background determining module includes: a target sample searching unit, configured to find a sample picture that is the same or similar to the target picture in the effect material library, as the target sample picture
  • the background image generating unit is used to generate the background image according to the background material matching the target sample picture in the effect material library.
  • the target sample searching unit is configured to calculate the similarity between the target picture and each sample picture in the effect material library, which will have the highest similarity with the target picture As the target sample picture.
  • the second display module is further configured to merge the target picture and the background image into a new image, and display the new image in the display area.
  • an electronic device including: a processor; a memory for storing executable instructions of the processor; and a display for presenting a display area; wherein the processor is configured to The image display method described in any one of the foregoing is executed by executing the executable instruction, and the execution result of the executable instruction is displayed in the display area.
  • it further includes: an image sensor for acquiring characteristic information of the frame of the display.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the picture display method described in any one of the above is implemented.
  • the background image is added to the unfilled area where the target picture is not displayed to show the effect of full-screen display of the picture, which has a strong sense of overallness and harmony in the vision, and improves the picture The aesthetics of the display.
  • the size of the target picture matches the size of the display area, no background image is added, so that different display methods are adopted for pictures of different sizes, which has higher flexibility.
  • the matching background image is determined according to the picture information of the target picture, and different background images can be determined for different pictures, thereby increasing the diversity of picture display.
  • Figure 1 shows a schematic diagram of a full-screen display of pictures in the related art
  • Fig. 2 shows a flow chart of a picture display method in this exemplary embodiment
  • Fig. 3 shows a schematic diagram of a picture display effect in this exemplary embodiment
  • Fig. 4 shows a flow chart of another picture display method in this exemplary embodiment
  • Figure 5 shows a schematic diagram of the hue circle
  • FIG. 6 shows a schematic flowchart of a picture display method in this exemplary embodiment
  • FIG. 7 shows a schematic flowchart of another picture display method in this exemplary embodiment
  • FIG. 8 shows a schematic diagram of another picture display effect in this exemplary embodiment
  • Fig. 9 shows a structural block diagram of a picture display device in this exemplary embodiment
  • FIG. 10 shows an electronic device for implementing the above method in this exemplary embodiment
  • Figure 11 shows another electronic device for implementing the above method in this exemplary embodiment
  • Fig. 12 shows a computer-readable storage medium for implementing the above-mentioned method in this exemplary embodiment.
  • Example embodiments will now be described more fully with reference to the accompanying drawings.
  • the example embodiments can be implemented in various forms, and should not be construed as being limited to the examples set forth herein; on the contrary, the provision of these embodiments makes the present disclosure more comprehensive and complete, and fully conveys the concept of the example embodiments To those skilled in the art.
  • the described features, structures or characteristics may be combined in one or more embodiments in any suitable way.
  • a display device refers to an electronic device with a display screen, such as a computer, a mobile phone, a smart TV, an electronic photo frame, an electronic drawing screen, etc.
  • the display screen includes a display area, which refers to all that can be used to present a graphical user interface area.
  • the method may include the following steps:
  • Step S210 obtaining a target picture to be displayed
  • Step S220 detecting whether the size of the target picture matches the size of the display area
  • Step S230 if the target picture matches the size of the display area, display the target picture in the display area;
  • step S240 if the size of the target picture does not match the size of the display area, display the target picture in the display area, and display the background image in at least one sub-region of the unfilled area where the target picture is not displayed.
  • the target picture may be a local picture designated by the user, a picture downloaded from the network, or a picture synchronized (transmitted through a wired or wireless connection) from other electronic devices, which is not limited in the present disclosure.
  • the size matching of the target picture and the display area means that the target picture can be displayed in the display area in full screen (or close to full screen).
  • the size of the target picture can be gradually scaled until: the target picture is enlarged to the maximum size ( If you zoom in again, the picture may be blurred).
  • the preset value for example, 95%, etc.
  • the two sizes do not match; or the length or width of the target picture It is equal to the display area.
  • the preset value for example, 95%, etc.
  • the two sizes do not match; or the length or width of the target picture It is equal to the display area.
  • the sizes of the two do not match.
  • the target image can be displayed in full screen.
  • the preset value such as 95% is used as the standard when the above detection matches, then after the target image is displayed, there may be 5% unfilled area remaining in the display area, which is beautiful The degree of influence is small and can be ignored.
  • the target picture is displayed normally, and there are still more unfilled areas (that is, the area where the target picture is not displayed). For example, more unfilled areas may remain around the target picture.
  • the hollow area may also be regarded as an unfilled area.
  • the target image is displayed in the center of the display area.
  • the unfilled area may be located around the target image, or may be located on the upper and lower sides or the left and right sides.
  • the target image can also be displayed on one side of the display area.
  • the unfilled area is on the other side, which is not limited in the present disclosure.
  • the background image can be displayed in the unfilled area.
  • the background image can be solid color filling, gradient color filling, texture filling or pattern filling, etc., or a combination of multiple filling effects, such as gradient color plus texture filling, gradient color plus pattern filling, etc. .
  • the background image can be displayed in all the unfilled areas, so that the display area is filled with the target picture and the background image to achieve complete full-screen display, or in at least one sub-region of the unfilled area Internal display background image, for example, the background image is only located on one side of the target picture, or there is a certain unfilled area around the background image, etc., so as to meet specific display needs.
  • the frame of the display area has a specific shape to match the background image and Part of the unfilled area can present special effects, or the background image has a specific pattern, which is not suitable for filling the unfilled area completely.
  • the target picture and the background image can also be merged into a new image, and the new image is displayed in the display area.
  • the target picture and the background image can be directly joined to obtain the new image, or the boundary between the two can be Some fading or blurring processing, etc., process the target picture and background image in the form of a new image, which can increase the overall sense, and it is also convenient to store the new image locally for subsequent use.
  • FIG. 3 shows the display effect of displaying the target picture 310 and the background image 320 in the display area 300.
  • the target picture 310 can be adjusted to any size according to the size of the display area 300, or the original size of the target picture 310 can be maintained, and the target is not displayed.
  • the unfilled area of the picture 310 can display the background image 320, and the two together form a full-screen display effect.
  • the flow of the picture display method may be as shown in FIG. 4, wherein after detecting that the size of the target picture does not match the display area, step S231 may be performed: according to the picture information of the target picture, determine the Picture matching background image.
  • the picture information of the target picture may refer to multiple aspects of feature information such as picture style, color distribution, color composition, and color matching.
  • the background image may be determined based on one or more aspects of picture information.
  • the matching of the background image and the target picture specifically refers to the visual presentation of a strong sense of integrity and harmony between the background image and the target picture.
  • the background image filled with a pure color or a gradient color is determined according to the color distribution of the edge of the target picture, so that the background image and the target picture
  • the edge of the target picture has a certain degree of continuity; or according to the style of the target picture, determine a background image that is consistent or similar to its style, so that the background image visually presents the extension of the target picture; or provide multiple according to the main color of the target picture
  • the background image that matches its hue is used as an alternative, allowing the user to select one as the final background image. For different target pictures, because of their different picture information, different background images can be matched.
  • step S240 can be executed to display it together with the target image in the display area.
  • this exemplary embodiment adds a background image display to the unfilled area where the target picture is not displayed, so as to present the effect of full-screen display of the picture, which has a strong visual overall Sense and harmony, improve the beauty of the picture display.
  • the size of the target picture matches the size of the display area, no background image is added, so that different display methods are adopted for pictures of different sizes, which has higher flexibility.
  • the matching background image is determined according to the picture information of the target picture, and different background images can be determined for different pictures, thereby increasing the diversity of picture display.
  • the above picture information may include the representative color of the target picture, and the representative color may be the background color of the target picture or the representative color of the main tone, etc., which can generally represent the main colors of the target picture.
  • the representative color may also be the color with the highest frequency in the target picture, which may be determined by the following steps:
  • an image filled with a pure color of the representative color can be used as a background image of the target picture, or a gradient fill of the same color system of the representative color, or a pattern fill of the same hue as the background image.
  • step S231 can be specifically implemented through the following steps:
  • the value D of the background color matching the target picture is determined by the following formula (1);
  • m can be any natural number, i is any integer within [1, m], C i is the value of the i-th color among the m colors (for example, it can be an RGB color value or an HSL color value), f i is the frequency of C i in the target picture.
  • the formula (1) can be regarded as taking the appearance frequency of m colors as its weight, and weighting and averaging the m colors to obtain an average color value, that is, the value D of the background color, which is a high summary of the color characteristics of the target image .
  • the background image may be filled with a pure color of the value D of the background color, a gradient filled with the same color of D, a pattern filled with the same hue of D, etc. The present disclosure does not limit this.
  • the colors in it can be expressed as RGB components, and the RGB components of the background color D can be calculated by formula (1) for each component; HSL components can be calculated separately in HSL mode ,
  • the gray value can be calculated in gray mode.
  • m can be a predetermined value, for example, it is determined to select the 5 or 10 colors with the highest frequency in the target picture as the representative color, or a preset threshold value for the frequency of color appearance can be determined to make the frequency of appearance in the target picture higher than All colors of the preset threshold are used as representative colors, and the value of m is uncertain. For example, all colors with a frequency higher than 10% are used as representative colors. If there are 3 colors that meet the requirements, m is 3. Disclosure does not specifically limit the preset threshold.
  • the characteristic information of the frame of the display device may also be acquired, and based on the characteristic information of the frame and the picture information of the target picture, a background image matching the target picture and the frame may be jointly determined.
  • the frame refers to the physical frame of the display device, and its color or texture is usually the same as the color of the housing of the device.
  • the characteristic information of the frame can include the color, texture, pattern, shape and other aspects of the frame.
  • This disclosure does not limit this.
  • the image of the frame area can be captured by an external camera to identify the frame characteristics in the image.
  • the external camera can also be replaced by another electronic device with a shooting function, for example, the frame image of an electronic photo frame can be captured by a mobile phone. Then the image is transmitted to the electronic photo frame through Bluetooth, USB, wireless network, etc., so that it can recognize the characteristics of the frame.
  • the frame is an ordinary solid color frame
  • its characteristic information mainly includes color
  • the color can also be determined by the user in advance.
  • a color palette can be provided to enable the user to select a color in the frame, and preview it through full screen (full screen display user The color of the frame selection) or the edge preview (display the color selected by the user in the edge area near the frame) allows the user to intuitively judge whether the color is consistent with the frame color, so that the frame color can be accurately selected, which is the default The border color. If you change the display device or border of another color later, you can reselect the border color.
  • the background image After obtaining the characteristic information of the frame and the picture information of the target picture, the background image can be determined jointly based on the two aspects of information. Since the background image is located between the target picture and the frame, a more beautiful display effect can be obtained.
  • a transition effect from the target picture to the frame can be generated, for example, a gradient fill from the representative color of the target picture to the frame color, or considering that the frame and the target picture are not on the same plane, it can present a three-dimensional
  • the background image with perspective effect makes the connection between the target image and the frame more natural.
  • the picture information of the target picture mainly refers to the representative color of the target picture
  • the characteristic information of the frame mainly refers to the color of the frame. Then, the intermediate color between the color of the frame and the representative color can be determined, and based on this The middle color determines the background image that matches the target picture.
  • the intermediate color refers to the color between the color of the border and the representative color of the target image, and it can be a color or a group of colors.
  • the target picture, the background image, and the frame are in sequence.
  • the background image can be used to transition from the target picture to the frame, so it can be based on the middle color Determine the background image.
  • the middle color can be a set of gradient colors between the above two colors, and the background image can be filled with a gradient color; if the border color and the representative color belong to different hues, two colors can be used The average value of, the intermediate color can be obtained.
  • the background image can be based on the intermediate color as the main color, adding the effect of the border color and the representative color (or the approximate color of the two colors) pattern; in practical applications, after determining the intermediate color, the intermediate color can be The main color, add arbitrary patterns to form a background image.
  • RGB color mode is adopted. If the value of the representative color is (R1, G1, B1) and the value of the border color is (R2, G2, B2), it can be calculated by formula (2) (including the following 3 formulas) The value of the middle color is (R3, G3, B3):
  • the calculation process of formula (2) can be expressed as: firstly, the R, G, and B components of the value of the representative color and the value of the border color are averaged, and then R, G, and B are mixed in different proportions to obtain the intermediate color, a
  • the value of, b, c is the mixing ratio, which can be determined based on experience, or adjusted according to different hues and actual needs. For example, if the representative color and the border color are both green, the value of b can be increased appropriately.
  • the color matching should not exceed three, that is, the range of three hues, because when determining the background image, you can use the same hue, the same brightness, and the same saturation. , To ensure that the target image, background image, and frame show a more uniform appearance color, such as red + orange red + orange, blue green + blue + blue purple, etc.
  • the above method can be used to determine the intermediate color to achieve this goal.
  • the value of the intermediate color can be calculated by formula (3) (including the following 3 formulas) (R3, G3, B3):
  • R3 p ⁇ R1+q ⁇ R2;
  • p and q are the weight values of the value of the representative color and the value of the border color, usually in order to emphasize the background image more and the target image Match, p can be greater than 0.5, of course, it can also be adjusted according to the actual situation. For example, when the representative color belongs to the dark color system and the border color belongs to the light color system, the value of p can be appropriately reduced, or the percentage of the color in the target image If it is low, the value of p can also be appropriately reduced.
  • the values of m representative colors of the target picture and the value F of the border color are averaged to obtain m average colors, and then the frequency f of the m colors in the target picture is used as the weight, and the m The average color value is weighted and averaged to obtain the value E of the intermediate color.
  • the process of the picture display method may be as shown in FIG. 6: Step S610, obtain the target picture; Step S620, detect whether the size of the target picture and the display area match; Step S630, if they match, it can be normal Display the target picture in full screen to make it fill the entire display area; step S640, if it does not match, extract the representative color of the target picture; step S650, detect the border color of the display device at the same time; step S660, determine according to the representative color and the border color Intermediate color; Step S670, determine the background image based on the intermediate color, the background image matches the target picture and the frame; Step S680, combine the target picture and the background image to display in the display area, thereby realizing the full screen display of the picture.
  • step S231 can be implemented through the following steps:
  • the effect material library is a pre-built database that gathers a large number of matching relationships between pictures and materials, such as the matching of colors and colors, the matching of colors and patterns or pictures, the matching of pictures and patterns, etc. Wait. Extract picture information from the target picture, such as representative color, edge color, etc., and search for the matching background image material in the effect material library to obtain the background image.
  • the image display method may further include the following steps of constructing an effect material library:
  • the background materials include any one or more of the following: solid color filling, gradient color filling, texture filling or pattern filling;
  • the matching relationship between the sample picture and one or more background materials is obtained to construct the aforementioned effect material library.
  • the sample pictures are a large number of representative pictures collected in advance, for example, it can include typical pure color pictures, static pictures of various objects, ink paintings, oil paintings, landscape photos, portraits and other typical pictures of various styles; of course, According to different application scenarios, the coverage of sample pictures can be reduced.
  • representative pictures of the subject of character selfies can be collected specifically to construct a small effect material library .
  • the sample pictures can be searched on the Internet, and can also be obtained from local or other databases, which is not limited in the present disclosure.
  • the background materials needed to build the effect material library can also be obtained from the Internet, local or other databases, and background materials can also be generated based on certain mechanisms, such as changing colors, textures, and patterns from a seed material. Generate a series of materials.
  • a single color matching method, an approximate color matching method, etc. can be used to extract a single color from a background material, and form a series of colors by changing the hue, saturation, and lightness of the single color.
  • Establish a matching relationship between colors, or establish a matching relationship by collecting color matching relationships, and then map the colors to a sample image to obtain the matching relationship between the sample image and the background material, or establish the relationship between the sample image and the background material through the user’s manual rating
  • the matching relationship, the matching relationship may include a quantitative expression of whether or not it matches or the degree of matching.
  • an effect material library can be constructed to facilitate the subsequent search for a suitable background image.
  • the step of constructing an effect material library may include:
  • sample pictures and background materials can include pictures with edge effects (edge effects as background materials), posters with picture inlays (poster backgrounds as background materials), and clothing designs with picture inlays (clothing background colors are used as background materials). Background material), etc., you can use crawler tools to crawl relevant sample information from the Internet. After obtaining the samples, separate the pictures from the background, use the pictures as the sample pictures, and the background as the background material. Then, based on the popularity of each sample, user praise, search frequency and other data, comprehensively analyze the sample pictures and The matching degree of the background material to build the effect material library.
  • the effect material library constructed based on sample pictures, in practical applications, the background image can be determined through the following steps:
  • the similarity between the target picture and each sample picture in the effect material library can be calculated, such as SSIM (Structural Similarity Index, structural similarity), cosine similarity, etc., and the sample picture with the highest similarity to the target picture is used as the target sample picture ,
  • the sample picture can also be classified in multiple dimensions, such as picture style, representative color, main color, etc. If all the dimensional information of the sample image and the target picture are the same, or the same number of dimensions is the largest, then it is the target sample picture.
  • the overall process of the picture display method may be as shown in FIG. 7: Step S710, obtain the target picture; Step S720, detect whether the size of the target picture and the display area match; Step S730, if they match, then Normally display the target picture in full screen so that it just fills the entire screen; step S740, if it does not match, extract the picture information of the target picture; step S750, input the picture information of the target picture into the effect material library, and then go through step S760 or step S770 determines the background image; step S760, automatically finds the background image matching the effect material library with the target picture; step S770, the user manually selects an appropriate background image; step S780, after the background image is determined, the target picture and the background image can be combined and displayed In the display area.
  • the background image may be the effect of simulating the expansion of the scroll; correspondingly, step S231 may be implemented through the following steps:
  • the unfolding effect of the simulated scroll can be as shown in the background image 820 in Figure 8.
  • the left and right sides are the scroll effect, plus the internal canvas filling effect, which together with the target picture 810 form a visual sense of the scroll. Can further improve the aesthetics.
  • the background filling effect can be determined according to the picture information of the target picture. For example, the color matching the target picture is used as the main color, and a certain texture is added to form the filling effect of paper and canvas, which is used as the scroll background. Add the curled image of the scroll on the side to form the final background image, which simulates the effect of scrolling.
  • some elements such as mosaics, embellishments, text, etc. can also be added to the background image to obtain various effects, which are not particularly limited in the present disclosure.
  • the color of the frame of the display device when determining the above-mentioned background filling effect, may also be referred to.
  • the color of the frame 830 of the display area 800 and the picture information of the target picture 810 may be used. Determine the background filling effect together (refer to the method in formulas (2) ⁇ (4)).
  • the effect of the picture scroll simulation is only an example of the background image.
  • the effect of simulating the opening of the book the effect of simulating the drawing board, etc. can also be used.
  • Exemplary embodiments of the present disclosure also provide a picture display device, which can be applied to a display device, and the display device presents a display area.
  • the device 900 may include: a picture acquisition module 910, configured to acquire a target picture to be displayed; a size detection module 920, configured to detect whether the target picture matches the size of the display area; and a first display module 930, If the target picture matches the size of the display area, display the target picture in the display area; the second display module 940 is used to display the target picture in the display area if the size of the target picture does not match the display area, and The background image is displayed in at least one subregion of the unfilled region where the target picture is not displayed.
  • the second display module 940 may be used to display the target picture in the display area, and display the background image in the unfilled area where the target picture is not displayed, so that the display area is filled with the target picture and the background image. full.
  • the picture display device 900 may further include: a background determining module for determining a background image matching the target picture according to picture information of the target picture.
  • the above-mentioned picture information may include the representative color of the target picture; the picture obtaining module 910 may also include: a picture information obtaining unit for counting the types of colors appearing in the target picture and the frequency of each color , And select at least one color with the highest frequency as the representative color of the target image.
  • the picture acquiring module 910 may further include: a frame information acquiring unit for acquiring feature information of the frame of the display device; the background determining module may be configured to determine the target information based on the feature information and picture information of the frame Picture and background image with matching border.
  • the above-mentioned picture information may include the representative color of the target picture, and the above-mentioned characteristic information may include the color of the frame;
  • the background determining module may include: an intermediate color determining unit for determining the middle between the color of the frame and the representative color Color; a background image determining unit for determining a background image matching the target picture and the frame based on the intermediate color.
  • the foregoing representative colors may include m colors with the highest frequency in the target picture; the foregoing intermediate colors may be determined by the following formula: Among them, i is any integer within [1,m], Ci is the value of the i-th color among m colors, fi is the frequency of appearance of Ci in the target image, F is the value of the color of the frame, and E is the middle The value of the color.
  • the aforementioned m colors are colors in the target picture whose frequency of appearance is higher than a preset threshold.
  • the background determining module may also be used to search for a background image matching the target picture in the effect material library according to the picture information of the target picture.
  • the picture display device 900 may further include a material library building module, and the material library building module may further include: a sample acquisition unit for acquiring multiple sample pictures and multiple background materials, the background materials include any of the following One or more types: solid color filling, gradient color filling, texture filling or pattern filling; matching determination unit for obtaining the matching relationship between the sample image and one or more background materials for each sample image to build an effect material library .
  • the above-mentioned matching relationship may include a degree of matching; the sample acquisition unit may be used to search for examples of sample images and background materials from the Internet; the matching determination unit may be used to analyze the examples to obtain each The matching degree of a sample picture with one or more background materials to construct an effect material library.
  • the background determining module may include: a target sample searching unit, which is used to find a sample picture that is the same or similar to the target picture in the effect material library, as the target sample picture;
  • the background material matching the target sample image in the effect material library generates a background image.
  • the target sample searching unit may be used to calculate the similarity between the target picture and each sample picture in the effect material library, and the sample picture with the highest similarity to the target picture is used as the target sample picture.
  • the second display module 940 may also be used to merge the target picture and the background image into a new image, and display the new image in the display area.
  • Exemplary embodiments of the present disclosure also provide an electronic device capable of implementing the above method.
  • the electronic device 1000 according to this exemplary embodiment of the present disclosure will be described below with reference to FIG. 10.
  • the electronic device 1000 shown in FIG. 10 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
  • the electronic device 1000 may include a processor 1010, a memory 1020, and a display 1030, where the memory 1020 is used to store executable instructions of the processor 1010, the display 1030 is used to present a display area, and the processor 1010 is configured In order to execute any method in this exemplary embodiment by executing the executable instruction, for example, the method steps shown in FIG. 2, FIG. 3, FIG. 6 or FIG. 7 may be executed, and the instruction execution result may be displayed in the display area.
  • the electronic device 1000 may be a computer, a mobile phone, a tablet computer, a smart TV, an electronic photo frame, or an electronic drawing screen, etc.
  • the electronic device may further include an image sensor for acquiring characteristic information of the frame of the display, and the characteristic information of the frame is used to determine the background image together with the picture information of the target picture.
  • the image sensor can be an external camera.
  • an external camera can be set on the opposite wall to capture the frame of the electronic drawing screen to obtain characteristic information.
  • the electronic device 1100 may be in the form of a general-purpose computing device, and its components may include but are not limited to: at least one processing unit 1110, at least one storage unit 1120, and connection to different system components (Including the storage unit 1120 and the processing unit 1110) bus 1130 and the display unit 1140.
  • the storage unit stores program codes, and the program codes can be executed by the processing unit 1110, so that the processing unit 1110 executes the steps according to the exemplary embodiments of the present disclosure described in the "Exemplary Method" section of this specification.
  • the storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 1121 and/or a cache storage unit 1122, and may further include a read-only storage unit (ROM) 1123.
  • RAM random access storage unit
  • ROM read-only storage unit
  • the storage unit 1120 may also include a program/utility tool 1124 having a set of (at least one) program module 1125.
  • program module 1125 includes but is not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples or some combination may include the implementation of a network environment.
  • the bus 1130 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any bus structure among multiple bus structures. bus.
  • the electronic device 1100 may also communicate with one or more external devices 1300 (such as keyboards, pointing devices, Bluetooth devices, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 1100, and/or communicate with Any device (such as a router, modem, etc.) that enables the electronic device 1100 to communicate with one or more other computing devices. This communication can be performed through an input/output (I/O) interface 1150.
  • the electronic device 1100 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 1160.
  • networks for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet
  • the network adapter 1160 communicates with other modules of the electronic device 1100 through the bus 1130. It should be understood that although not shown in the figure, other hardware and/or software modules can be used in conjunction with the electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
  • the exemplary embodiments described herein can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the exemplary embodiment of the present disclosure.
  • a computing device which may be a personal computer, a server, a terminal device, or a network device, etc.
  • Exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which is stored a program product capable of implementing the above method of this specification.
  • various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code.
  • the program product runs on a terminal device, the program code is used to make the terminal device execute the above-mentioned instructions in this specification.
  • the steps according to various exemplary embodiments of the present disclosure are described in the "Exemplary Methods" section.
  • a program product 1200 for implementing the above method according to an exemplary embodiment of the present disclosure is described. It may adopt a portable compact disk read-only memory (CD-ROM) and include program codes, and may be used in a terminal Running on equipment, such as a personal computer.
  • CD-ROM compact disk read-only memory
  • the program product of the present disclosure is not limited thereto.
  • the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, device, or device.
  • the program product can adopt any combination of one or more readable media.
  • the readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • the computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with the instruction execution system, apparatus, or device.
  • the program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
  • the program code for performing the operations of the present disclosure can be written in any combination of one or more programming languages.
  • the programming languages include object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming. Language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on.
  • the remote computing device can be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using Internet service providers) Business to connect via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service providers Internet service providers
  • modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory.
  • the features and functions of two or more modules or units described above may be embodied in one module or unit.
  • the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.

Abstract

Provided are a picture display method, a picture display apparatus, an electronic device and a computer-readable storage medium, belonging to the technical field of image display. The method is applied to a display device, and the display device presents a display area. The method comprises: acquiring a target picture to be displayed (S210); detecting whether the size of the target picture matches that of the display area (S220); if the size of the target picture matches that of the display area, displaying the target picture in the display area (S230); and if the size of the target picture does not match that of the display area, displaying the target picture in the display area, and displaying a background image in at least one sub-area of an unfilled area where the target picture is not displayed (S240). By means of the method, the aesthetics and flexibility of picture display can be improved.

Description

图片显示方法、图片显示装置、电子设备及存储介质Picture display method, picture display device, electronic equipment and storage medium
本申请要求于2019年4月22日提交的中国专利申请201910325380.9的优先权,其内容通过引用的方式全文并入于此。This application claims the priority of the Chinese patent application 201910325380.9 filed on April 22, 2019, the content of which is incorporated herein by reference in its entirety.
技术领域Technical field
本公开涉及图像显示技术领域,尤其涉及一种图片显示方法、图片显示装置、电子设备以及计算机可读存储介质。The present disclosure relates to the field of image display technology, and in particular to a picture display method, picture display device, electronic equipment, and computer-readable storage medium.
背景技术Background technique
在电脑、电子画屏等具备显示屏的电子设备上,经常需要全屏显示图片,例如全屏播放、图片展示、屏幕保护等场景下。然而图片与显示屏的尺寸或比例不匹配的情况也常常出现,目前常用的方法是将图片进行一定的拉伸,使其自适应屏幕的尺寸,但是这样会破坏图片原有的比例,导致图片中物体的失真以及视觉上的不协调,影响图片的美观性。On electronic devices with display screens such as computers and electronic drawing screens, it is often necessary to display pictures in full screen, such as full-screen playback, picture display, screen protection and other scenarios. However, the size or proportion of the picture and the display screen often do not match. The current common method is to stretch the picture to make it adapt to the size of the screen, but this will destroy the original proportion of the picture and cause the picture Distortion of objects in the middle and visual inconsistency affect the aesthetics of the picture.
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。It should be noted that the information disclosed in the above background section is only used to strengthen the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to those of ordinary skill in the art.
发明内容Summary of the invention
本公开提供了一种图片显示方法、图片显示装置、电子设备以及计算机可读存储介质,进而至少在一定程度上克服现有的图片显示方法美观性较低的问题。The present disclosure provides a picture display method, a picture display device, an electronic device, and a computer-readable storage medium, thereby at least to some extent overcome the problem of low aesthetics of the existing picture display method.
本公开的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本公开的实践而习得。Other characteristics and advantages of the present disclosure will become apparent through the following detailed description, or partly learned through the practice of the present disclosure.
根据本公开的一个方面,提供一种图片显示方法,应用于显示设备,所述显示设备呈现一显示区域;所述方法包括:获取待显示的目标图片;检测所述目标图片与所述显示区域的尺寸是否匹配;如果所述目标图片与所述显示区域的尺寸匹配,则在所述显示区域中显示所述目标图片;如果所述目标图片与所述显示区域的尺寸不匹配且所述目标图片与所述显示区域的重合度低于预设值,则在所述显示区域中显示所述目标图片,并在未显示所述目标图片的未填充区域的至少一个子区域内显示背景图像。According to one aspect of the present disclosure, there is provided a picture display method applied to a display device, the display device presents a display area; the method includes: acquiring a target picture to be displayed; detecting the target picture and the display area If the size of the target picture matches the size of the display area, display the target picture in the display area; if the target picture does not match the size of the display area and the target picture If the degree of overlap between the picture and the display area is lower than a preset value, the target picture is displayed in the display area, and a background image is displayed in at least one sub-area of an unfilled area where the target picture is not displayed.
在本公开的一种示例性实施例中,所述在所述显示区域中显示所述目标图片,并在未显示所述目标图片的未填充区域的至少一个子区域内显示背景图像,包括:在所述显示区域中显示所述目标图片,并在未显示所述目标图片的未填充区域显示所述背景图像,以使所述显示区域被所述目标图片与所述背景图像所填满。In an exemplary embodiment of the present disclosure, the displaying the target picture in the display area and displaying a background image in at least one sub-region of an unfilled area where the target picture is not displayed includes: The target picture is displayed in the display area, and the background image is displayed in an unfilled area where the target picture is not displayed, so that the display area is filled with the target picture and the background image.
在本公开的一种示例性实施例中,所述方法还包括:根据所述目标图片的图片信息, 确定与所述目标图片匹配的背景图像。In an exemplary embodiment of the present disclosure, the method further includes: determining a background image matching the target picture according to the picture information of the target picture.
在本公开的一种示例性实施例中,所述图片信息包括所述目标图片的代表颜色;所述方法还包括:统计所述目标图片中所出现的颜色种类和每种颜色的出现频率,并选择其中出现频率最高的至少一种颜色,作为所述目标图片的代表颜色。In an exemplary embodiment of the present disclosure, the picture information includes a representative color of the target picture; the method further includes: counting the types of colors that appear in the target picture and the appearance frequency of each color, At least one color with the highest frequency is selected as the representative color of the target picture.
在本公开的一种示例性实施例中,所述方法还包括:获取所述显示设备的边框的特征信息;所述根据所述目标图片的图片信息,确定与所述目标图片匹配的背景图像,包括:基于所述边框的特征信息与所述图片信息,确定与所述目标图片以及所述边框匹配的背景图像。In an exemplary embodiment of the present disclosure, the method further includes: acquiring characteristic information of the frame of the display device; and determining a background image matching the target picture according to the picture information of the target picture , Including: determining a background image matching the target picture and the frame based on the characteristic information of the frame and the picture information.
在本公开的一种示例性实施例中,所述图片信息包括所述目标图片的代表颜色,所述特征信息包括所述边框的颜色;所述基于所述边框的特征信息与所述图片信息,确定与所述目标图片以及所述边框匹配的背景图像,包括:确定所述边框的颜色与所述代表颜色的中间颜色;基于所述中间颜色确定与所述目标图片以及所述边框匹配的背景图像。In an exemplary embodiment of the present disclosure, the picture information includes a representative color of the target picture, and the characteristic information includes the color of the frame; the characteristic information based on the frame and the picture information , Determining a background image that matches the target picture and the frame includes: determining an intermediate color between the color of the frame and the representative color; and determining the background image that matches the target picture and the frame based on the intermediate color Background image.
在本公开的一种示例性实施例中,所述代表颜色包括所述目标图片中出现频率最高的m种颜色;所述中间颜色通过以下公式确定:
Figure PCTCN2020075654-appb-000001
其中,i为[1,m]内的任意整数,C i为所述m种颜色中的第i种颜色的值,f i为C i在所述目标图片中的出现频率,F为所述边框的颜色的值,E为所述中间颜色的值。
In an exemplary embodiment of the present disclosure, the representative color includes m colors that appear most frequently in the target picture; the intermediate color is determined by the following formula:
Figure PCTCN2020075654-appb-000001
Where i is any integer within [1, m], C i is the value of the i-th color in the m colors, f i is the frequency of occurrence of C i in the target picture, and F is the The value of the color of the border, and E is the value of the middle color.
在本公开的一种示例性实施例中,所述m种颜色为所述目标图片中出现频率高于预设阈值的颜色。In an exemplary embodiment of the present disclosure, the m colors are colors that appear more frequently than a preset threshold in the target picture.
在本公开的一种示例性实施例中,所述根据所述目标图片的图片信息,确定与所述目标图片匹配的背景图像,包括:根据所述目标图片的图片信息,在效果素材库中查找与所述目标图片匹配的背景图像。In an exemplary embodiment of the present disclosure, the determining a background image matching the target picture according to the picture information of the target picture includes: according to the picture information of the target picture, in the effect material library Find a background image that matches the target picture.
在本公开的一种示例性实施例中,所述方法还包括:获取多个样本图片和多个背景素材,所述背景素材包括以下任意一种或多种:纯色填充、渐变色填充、纹理填充或图案填充;对于每个所述样本图片,获取所述样本图片与一个或多个所述背景素材的匹配关系,以构建所述效果素材库。In an exemplary embodiment of the present disclosure, the method further includes: acquiring a plurality of sample pictures and a plurality of background materials, the background materials including any one or more of the following: solid color filling, gradient color filling, texture Filling or pattern filling; for each of the sample pictures, a matching relationship between the sample picture and one or more of the background materials is obtained to construct the effect material library.
在本公开的一种示例性实施例中,所述匹配关系包括匹配度;所述获取多个样本图片和多个背景素材,包括:从互联网搜索样本图片和背景素材搭配的样例;所述对于每个所述样本图片,获取所述样本图片与一个或多个所述背景素材的匹配关系,以构建所述效果素材库,包括:通过对所述样例进行分析,得到每个所述样本图片与一个或多个所述背景素材的匹配度,以构建所述效果素材库。In an exemplary embodiment of the present disclosure, the matching relationship includes a degree of matching; the acquiring a plurality of sample pictures and a plurality of background materials includes: searching the Internet for examples of matching the sample pictures and background materials; For each of the sample pictures, obtaining the matching relationship between the sample picture and one or more of the background materials to construct the effect material library includes: analyzing the samples to obtain each of the The degree of matching between the sample picture and one or more of the background materials is used to construct the effect material library.
在本公开的一种示例性实施例中,所述根据所述目标图片的图片信息,在效果素材库中查找与所述目标图片匹配的背景图像,包括:在所述效果素材库中查找与所述目标图片相同或相似的样本图片,作为目标样本图片;根据所述效果素材库中与所述目标样本图片 匹配的背景素材生成所述背景图像。In an exemplary embodiment of the present disclosure, the searching for a background image matching the target picture in an effect material library according to the picture information of the target picture includes: searching and Sample pictures with the same or similar target pictures are used as target sample pictures; the background image is generated according to background materials in the effect material library that match the target sample pictures.
在本公开的一种示例性实施例中,所述在所述效果素材库中查找与所述目标图片相同或相似的样本图片,作为目标样本图片,包括:计算所述目标图片与所述效果素材库中每个样本图片的相似度,将与所述目标图片相似度最高的样本图片作为所述目标样本图片。In an exemplary embodiment of the present disclosure, the searching for a sample picture identical or similar to the target picture in the effect material library as the target sample picture includes: calculating the target picture and the effect For the similarity of each sample picture in the material library, the sample picture with the highest similarity to the target picture is taken as the target sample picture.
在本公开的一种示例性实施例中,所述在所述显示区域中显示所述目标图片,并在未显示所述目标图片的未填充区域的至少一个子区域内显示背景图像,包括:将所述目标图片与所述背景图像合并为新图像,在所述显示区域中显示所述新图像。In an exemplary embodiment of the present disclosure, the displaying the target picture in the display area and displaying a background image in at least one sub-region of an unfilled area where the target picture is not displayed includes: The target picture and the background image are merged into a new image, and the new image is displayed in the display area.
根据本公开的一个方面,提供一种图片显示装置,应用于显示设备,所述显示设备呈现一显示区域,所述装置包括:图片获取模块,用于获取待显示的目标图片;尺寸检测模块,用于检测所述目标图片与所述显示区域的尺寸是否匹配;第一显示模块,用于如果所述目标图片与所述显示区域的尺寸匹配,则在所述显示区域内显示所述目标图片;第二显示模块,用于如果所述目标图片与所述显示区域的尺寸不匹配,则在所述显示区域中显示所述目标图片,并在未显示所述目标图片的未填充区域的至少一个子区域内显示背景图像。According to one aspect of the present disclosure, there is provided a picture display device applied to a display device, the display device presents a display area, the device includes: a picture acquisition module for acquiring a target picture to be displayed; a size detection module, It is used to detect whether the size of the target picture matches the display area; the first display module is used to display the target picture in the display area if the target picture matches the size of the display area ; A second display module, configured to display the target picture in the display area if the target picture does not match the size of the display area, and display the target picture in at least the unfilled area where the target picture is not displayed The background image is displayed in a sub area.
在本公开的一种示例性实施例中,所述第二显示模块用于在所述显示区域中显示所述目标图片,并在未显示所述目标图片的未填充区域显示所述背景图像,以使所述显示区域被所述目标图片与所述背景图像所填满。In an exemplary embodiment of the present disclosure, the second display module is configured to display the target picture in the display area, and display the background image in an unfilled area where the target picture is not displayed, So that the display area is filled with the target picture and the background image.
在本公开的一种示例性实施例中,所述装置还包括:背景确定模块,用于根据所述目标图片的图片信息,确定与所述目标图片匹配的背景图像。In an exemplary embodiment of the present disclosure, the device further includes: a background determining module, configured to determine a background image matching the target picture according to the picture information of the target picture.
在本公开的一种示例性实施例中,所述图片信息包括所述目标图片的代表颜色;所述图片获取模块还包括:图片信息获取单元,用于统计所述目标图片中所出现的颜色种类和每种颜色的出现频率,并选择其中出现频率最高的至少一种颜色,作为所述目标图片的代表颜色。In an exemplary embodiment of the present disclosure, the picture information includes a representative color of the target picture; the picture acquisition module further includes: a picture information acquisition unit configured to count the colors appearing in the target picture The type and frequency of each color, and at least one color with the highest frequency is selected as the representative color of the target picture.
在本公开的一种示例性实施例中,所述图片获取模块还包括:边框信息获取单元,用于获取所述显示设备的边框的特征信息;所述背景确定模块用于基于所述边框的特征信息与所述图片信息,确定与所述目标图片以及所述边框匹配的背景图像。In an exemplary embodiment of the present disclosure, the picture obtaining module further includes: a frame information obtaining unit, configured to obtain characteristic information of the frame of the display device; and the background determining module is configured to obtain information based on the frame The feature information and the picture information determine a background image matching the target picture and the frame.
在本公开的一种示例性实施例中,所述图片信息包括所述目标图片的代表颜色,所述特征信息包括所述边框的颜色;所述背景确定模块包括:中间颜色确定单元,用于确定所述边框的颜色与所述代表颜色的中间颜色;背景图像确定单元,用于基于所述中间颜色确定与所述目标图片以及所述边框匹配的背景图像。In an exemplary embodiment of the present disclosure, the picture information includes a representative color of the target picture, and the characteristic information includes the color of the frame; the background determining module includes: an intermediate color determining unit for Determine an intermediate color between the color of the frame and the representative color; a background image determination unit is configured to determine a background image matching the target picture and the frame based on the intermediate color.
在本公开的一种示例性实施例中,所述代表颜色包括所述目标图片中出现频率最高的m种颜色;所述中间颜色通过以下公式确定:
Figure PCTCN2020075654-appb-000002
其中,i为[1,m]内的任意整数,C i为所述m种颜色中的第i种颜色的值,f i为C i在所述目标图片中的出现频率, F为所述边框的颜色,E为所述中间颜色的值。
In an exemplary embodiment of the present disclosure, the representative color includes m colors that appear most frequently in the target picture; the intermediate color is determined by the following formula:
Figure PCTCN2020075654-appb-000002
Where i is any integer within [1, m], C i is the value of the i-th color in the m colors, f i is the frequency of occurrence of C i in the target picture, and F is the The color of the border, E is the value of the middle color.
在本公开的一种示例性实施例中,所述m种颜色为所述目标图片中出现频率高于预设阈值的颜色。In an exemplary embodiment of the present disclosure, the m colors are colors that appear more frequently than a preset threshold in the target picture.
在本公开的一种示例性实施例中,所述背景确定模块,还用于根据所述目标图片的图片信息,在效果素材库中查找与所述目标图片匹配的背景图像。In an exemplary embodiment of the present disclosure, the background determining module is further configured to search for a background image matching the target picture in the effect material library according to the picture information of the target picture.
在本公开的一种示例性实施例中,所述装置还包括素材库构建模块,所述素材库构建模块又包括:样本获取单元,用于获取多个样本图片和多个背景素材,所述背景素材包括以下任意一种或多种:纯色填充、渐变色填充、纹理填充或图案填充;匹配确定单元,用于对于每个所述样本图片,获取所述样本图片与一个或多个所述背景素材的匹配关系,以构建所述效果素材库。In an exemplary embodiment of the present disclosure, the device further includes a material library construction module, and the material library construction module further includes: a sample acquisition unit for acquiring multiple sample pictures and multiple background materials, The background material includes any one or more of the following: pure color filling, gradient color filling, texture filling or pattern filling; a matching determination unit for obtaining the sample picture and one or more of the sample pictures The matching relationship of the background materials to construct the effect material library.
在本公开的一种示例性实施例中,所述匹配关系包括匹配度;所述样本获取单元,用于从互联网搜索样本图片和背景素材搭配的样例;所述匹配确定单元,用于通过对所述样例进行分析,得到每个所述样本图片与一个或多个所述背景素材的匹配度,以构建所述效果素材库。In an exemplary embodiment of the present disclosure, the matching relationship includes a degree of matching; the sample acquisition unit is used to search the Internet for examples of matching sample pictures and background materials; and the matching determination unit is used to pass The samples are analyzed to obtain the degree of matching between each sample picture and one or more of the background materials, so as to construct the effect material library.
在本公开的一种示例性实施例中,所述背景确定模块包括:目标样本查找单元,用于在所述效果素材库中查找与所述目标图片相同或相似的样本图片,作为目标样本图片;背景图像生成单元,用于根据所述效果素材库中与所述目标样本图片匹配的背景素材生成所述背景图像。In an exemplary embodiment of the present disclosure, the background determining module includes: a target sample searching unit, configured to find a sample picture that is the same or similar to the target picture in the effect material library, as the target sample picture The background image generating unit is used to generate the background image according to the background material matching the target sample picture in the effect material library.
在本公开的一种示例性实施例中,所述目标样本查找单元,用于计算所述目标图片与所述效果素材库中每个样本图片的相似度,将与所述目标图片相似度最高的样本图片作为所述目标样本图片。In an exemplary embodiment of the present disclosure, the target sample searching unit is configured to calculate the similarity between the target picture and each sample picture in the effect material library, which will have the highest similarity with the target picture As the target sample picture.
在本公开的一种示例性实施例中,所述第二显示模块,还用于将所述目标图片与所述背景图像合并为新图像,在所述显示区域中显示所述新图像。In an exemplary embodiment of the present disclosure, the second display module is further configured to merge the target picture and the background image into a new image, and display the new image in the display area.
根据本公开的一个方面,提供一种电子设备,包括:处理器;存储器,用于存储所述处理器的可执行指令;以及显示器,用于呈现一显示区域;其中,所述处理器配置为经由执行所述可执行指令来执行上述任意一项所述的图片显示方法,在所述显示区域内显示所述可执行指令的执行结果。According to one aspect of the present disclosure, there is provided an electronic device including: a processor; a memory for storing executable instructions of the processor; and a display for presenting a display area; wherein the processor is configured to The image display method described in any one of the foregoing is executed by executing the executable instruction, and the execution result of the executable instruction is displayed in the display area.
在本公开的一种示例性实施例中,还包括:图像传感器,用于获取所述显示器的边框的特征信息。In an exemplary embodiment of the present disclosure, it further includes: an image sensor for acquiring characteristic information of the frame of the display.
根据本公开的一个方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任意一项所述的图片显示方法。According to one aspect of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the picture display method described in any one of the above is implemented.
本公开的示例性实施例具有以下有益效果:The exemplary embodiments of the present disclosure have the following beneficial effects:
在目标图片与显示区域尺寸不匹配时,在未显示目标图片的未填充区域添加背景图像的显示,以呈现图片全屏显示的效果,在视觉上具有较强的整体感与和谐感,提高了图片 显示的美观性。此外,如果目标图片与显示区域的尺寸匹配则不添加背景图像,从而对不同尺寸的图片采取不同的显示方法,具有较高的灵活性。When the size of the target picture and the display area do not match, the background image is added to the unfilled area where the target picture is not displayed to show the effect of full-screen display of the picture, which has a strong sense of overallness and harmony in the vision, and improves the picture The aesthetics of the display. In addition, if the size of the target picture matches the size of the display area, no background image is added, so that different display methods are adopted for pictures of different sizes, which has higher flexibility.
在本公开的一种示例性实施例中,根据目标图片的图片信息确定与其匹配的背景图像,可以为不同的图片确定不同的背景图像,从而提高了图片显示的多样性。In an exemplary embodiment of the present disclosure, the matching background image is determined according to the picture information of the target picture, and different background images can be determined for different pictures, thereby increasing the diversity of picture display.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure.
附图说明Description of the drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。The drawings herein are incorporated into the specification and constitute a part of the specification, show embodiments in accordance with the disclosure, and together with the specification are used to explain the principle of the disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1示出相关技术中全屏显示图片的示意图;Figure 1 shows a schematic diagram of a full-screen display of pictures in the related art;
图2示出本示例性实施例中一种图片显示方法的流程步骤图;Fig. 2 shows a flow chart of a picture display method in this exemplary embodiment;
图3示出本示例性实施例中一种图片显示效果的示意图;Fig. 3 shows a schematic diagram of a picture display effect in this exemplary embodiment;
图4示出本示例性实施例中另一种图片显示方法的流程步骤图;Fig. 4 shows a flow chart of another picture display method in this exemplary embodiment;
图5示出色相环示意图;Figure 5 shows a schematic diagram of the hue circle;
图6示出本示例性实施例中一种图片显示方法的流程示意图;FIG. 6 shows a schematic flowchart of a picture display method in this exemplary embodiment;
图7示出本示例性实施例中另一种图片显示方法的流程示意图;FIG. 7 shows a schematic flowchart of another picture display method in this exemplary embodiment;
图8示出本示例性实施例中另一种图片显示效果的示意图;FIG. 8 shows a schematic diagram of another picture display effect in this exemplary embodiment;
图9示出本示例性实施例中一种图片显示装置的结构框图;Fig. 9 shows a structural block diagram of a picture display device in this exemplary embodiment;
图10示出本示例性实施例中一种用于实现上述方法的电子设备;FIG. 10 shows an electronic device for implementing the above method in this exemplary embodiment;
图11示出本示例性实施例中另一种用于实现上述方法的电子设备Figure 11 shows another electronic device for implementing the above method in this exemplary embodiment
图12示出本示例性实施例中一种用于实现上述方法的计算机可读存储介质。Fig. 12 shows a computer-readable storage medium for implementing the above-mentioned method in this exemplary embodiment.
具体实施方式Detailed ways
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms, and should not be construed as being limited to the examples set forth herein; on the contrary, the provision of these embodiments makes the present disclosure more comprehensive and complete, and fully conveys the concept of the example embodiments To those skilled in the art. The described features, structures or characteristics may be combined in one or more embodiments in any suitable way.
相关技术的一种方案中,如图1所示,在根据显示屏100的尺寸自适应调节图片110大小时,保留图片110原有的比例,如果图片110比例与显示屏100比例不同,则在图片110外围留出一定的“黑边”120(或“白边”)。这样虽然能够保证图片比例不被破坏,但是图片并非真正完整的全屏显示,“黑边”的存在会影响图片整体的观感,其美观性仍然较低。In a related art solution, as shown in FIG. 1, when the size of the picture 110 is adaptively adjusted according to the size of the display screen 100, the original ratio of the picture 110 is retained. A certain "black border" 120 (or "white border") is left outside the picture 110. Although this can ensure that the ratio of the picture is not destroyed, the picture is not really complete full-screen display. The existence of "black borders" will affect the overall look and feel of the picture, and its aesthetics is still low.
鉴于前述的各种问题,本公开的示例性实施例首先提供了一种图片显示方法,可以应用于显示设备,该显示设备呈现一显示区域。本示例性实施例中,显示设备是指具备显示屏的电子设备,例如电脑、手机、智能电视、电子相框、电子画屏等,显示屏中包括显示区域,是指可用于呈现图形用户界面的全部区域。如图2所示,该方法可以包括以下步骤:In view of the foregoing various problems, the exemplary embodiments of the present disclosure first provide a picture display method, which can be applied to a display device that presents a display area. In this exemplary embodiment, a display device refers to an electronic device with a display screen, such as a computer, a mobile phone, a smart TV, an electronic photo frame, an electronic drawing screen, etc. The display screen includes a display area, which refers to all that can be used to present a graphical user interface area. As shown in Figure 2, the method may include the following steps:
步骤S210,获取待显示的目标图片;Step S210, obtaining a target picture to be displayed;
步骤S220,检测目标图片与显示区域的尺寸是否匹配;Step S220, detecting whether the size of the target picture matches the size of the display area;
步骤S230,如果目标图片与显示区域的尺寸匹配,则在显示区域中显示目标图片;Step S230, if the target picture matches the size of the display area, display the target picture in the display area;
步骤S240,如果目标图片与显示区域的尺寸不匹配,则在显示区域中显示目标图片,并在未显示目标图片的未填充区域的至少一个子区域内显示背景图像。In step S240, if the size of the target picture does not match the size of the display area, display the target picture in the display area, and display the background image in at least one sub-region of the unfilled area where the target picture is not displayed.
其中,目标图片可以是用户指定的本地图片、从网络上下载的图片或者从其他电子设备上同步(通过有线或无线连接方式传输)得到的图片,本公开对此不做限定。目标图片与显示区域的尺寸匹配是指目标图片可以全屏(或接近于全屏)显示于显示区域中,本示例性实施例中,可以逐步缩放目标图片的大小,直到:目标图片放大到最大尺寸(再放大则可能出现图片模糊的情况),此时如果目标图片与显示区域的重合度低于预设值(例如可以是95%等),则二者尺寸不匹配;或者目标图片的长或宽与显示区域相等,此时如果目标图片与显示区域的重合度低于预设值,则二者尺寸不匹配。当然也可以基于目标图片的原始尺寸或像素信息计算其与显示区域是否匹配。The target picture may be a local picture designated by the user, a picture downloaded from the network, or a picture synchronized (transmitted through a wired or wireless connection) from other electronic devices, which is not limited in the present disclosure. The size matching of the target picture and the display area means that the target picture can be displayed in the display area in full screen (or close to full screen). In this exemplary embodiment, the size of the target picture can be gradually scaled until: the target picture is enlarged to the maximum size ( If you zoom in again, the picture may be blurred). At this time, if the overlap between the target picture and the display area is lower than the preset value (for example, 95%, etc.), the two sizes do not match; or the length or width of the target picture It is equal to the display area. At this time, if the overlap between the target picture and the display area is lower than the preset value, the sizes of the two do not match. Of course, it is also possible to calculate whether it matches the display area based on the original size or pixel information of the target picture.
如果二者尺寸匹配,则可以全屏显示目标图片,当然如果上述检测匹配时采用95%等预设值作为标准,则显示目标图片后,显示区域内可能剩余5%的未填充区域,其对美观度的影响较小,可以忽略。If the two sizes match, the target image can be displayed in full screen. Of course, if the preset value such as 95% is used as the standard when the above detection matches, then after the target image is displayed, there may be 5% unfilled area remaining in the display area, which is beautiful The degree of influence is small and can be ignored.
如果二者尺寸不匹配,则正常显示目标图片,此时还剩余较多的未填充区域(即未显示目标图片的区域)。例如,在目标图片的周围可能剩余较多的未填充区域。又例如,如果目标图片存在镂空区域,则该镂空区域也可以看作是未填充区域。通常为了美观,将目标图片显示于显示区域的正中央,未填充区域可能位于目标图片的四周,也可能位于上下两侧或左右两侧等,当然也可以将目标图片显示于显示区域的一侧,则未填充区域位于另一侧,本公开对此不做限定。未填充区域内可以显示背景图像,背景图像可以是纯色填充、渐变色填充、纹理填充或图案填充等,也可以是多种填充结合的效果,例如渐变色加纹理填充、渐变色加图案填充等。本示例性实施例中,可以在全部的未填充区域内显示背景图像,以使显示区域被目标图片与背景图像所填满,实现完全的全屏显示,也可以在未填充区域的至少一个子区域内显示背景图像,例如背景图像仅位于目标图片的一侧,或者背景图像周围还剩余一定的未填充区域等,从而可以满足特定的显示需要,例如显示区域的边框具有特定造型,配合背景图像以及一部分未填充区域可以呈现特别的效果,或者背景图像具有特定图案,不适合完全填充到未填充区域内等。If the sizes of the two do not match, the target picture is displayed normally, and there are still more unfilled areas (that is, the area where the target picture is not displayed). For example, more unfilled areas may remain around the target picture. For another example, if there is a hollow area in the target picture, the hollow area may also be regarded as an unfilled area. Usually, for the sake of beauty, the target image is displayed in the center of the display area. The unfilled area may be located around the target image, or may be located on the upper and lower sides or the left and right sides. Of course, the target image can also be displayed on one side of the display area. , The unfilled area is on the other side, which is not limited in the present disclosure. The background image can be displayed in the unfilled area. The background image can be solid color filling, gradient color filling, texture filling or pattern filling, etc., or a combination of multiple filling effects, such as gradient color plus texture filling, gradient color plus pattern filling, etc. . In this exemplary embodiment, the background image can be displayed in all the unfilled areas, so that the display area is filled with the target picture and the background image to achieve complete full-screen display, or in at least one sub-region of the unfilled area Internal display background image, for example, the background image is only located on one side of the target picture, or there is a certain unfilled area around the background image, etc., so as to meet specific display needs. For example, the frame of the display area has a specific shape to match the background image and Part of the unfilled area can present special effects, or the background image has a specific pattern, which is not suitable for filling the unfilled area completely.
在一示例性实施例中,还可以将目标图片与背景图像合并为新图像,在显示区域中显 示该新图像,可以直接拼接目标图片与背景图像得到新图像,也可以对二者的边界做一些淡化或虚化处理等,以新图像的方式处理目标图片与背景图像,可以增加整体感,也便于将新图像存储到本地,以供后续使用。In an exemplary embodiment, the target picture and the background image can also be merged into a new image, and the new image is displayed in the display area. The target picture and the background image can be directly joined to obtain the new image, or the boundary between the two can be Some fading or blurring processing, etc., process the target picture and background image in the form of a new image, which can increase the overall sense, and it is also convenient to store the new image locally for subsequent use.
图3示出了在显示区域300内显示目标图片310与背景图像320的显示效果,根据显示区域300的尺寸可以调整目标图片310到任意尺寸,也可以保持目标图片310的原始尺寸,未显示目标图片310的未填充区域即可显示背景图像320,二者共同形成了全屏显示的效果。FIG. 3 shows the display effect of displaying the target picture 310 and the background image 320 in the display area 300. The target picture 310 can be adjusted to any size according to the size of the display area 300, or the original size of the target picture 310 can be maintained, and the target is not displayed. The unfilled area of the picture 310 can display the background image 320, and the two together form a full-screen display effect.
在一示例性实施例中,图片显示方法的流程可以如图4所示,其中,在检测目标图片与显示区域的尺寸不匹配后,可以执行步骤S231:根据目标图片的图片信息,确定与目标图片匹配的背景图像。目标图片的图片信息可以指图片风格、颜色分布、颜色组成、色调搭配等多个方面的特征信息,本示例实施方式中,可以根据其中一个或多个方面的图片信息确定背景图像。背景图像与目标图片匹配具体是指背景图像与目标图片在视觉上呈现较强的整体感与和谐感,例如:根据目标图片边缘的颜色分布确定纯色或渐变色填充的背景图像,使得背景图像与目标图片的边缘具有一定的连续性;或者根据目标图片的风格确定与其风格一致或相近的背景图像,使得背景图像在视觉上呈现出目标图片的延伸感;或者根据目标图片的主色调提供多个与其色调匹配的背景图像作为备选,使用户可以从中选择一个作为最终的背景图像。对于不同的目标图片,由于其图片信息不同,可以匹配得到不同的背景图像。在确定背景图像后,可以执行步骤S240,将其与目标图片共同显示于显示区域内。In an exemplary embodiment, the flow of the picture display method may be as shown in FIG. 4, wherein after detecting that the size of the target picture does not match the display area, step S231 may be performed: according to the picture information of the target picture, determine the Picture matching background image. The picture information of the target picture may refer to multiple aspects of feature information such as picture style, color distribution, color composition, and color matching. In this exemplary embodiment, the background image may be determined based on one or more aspects of picture information. The matching of the background image and the target picture specifically refers to the visual presentation of a strong sense of integrity and harmony between the background image and the target picture. For example, the background image filled with a pure color or a gradient color is determined according to the color distribution of the edge of the target picture, so that the background image and the target picture The edge of the target picture has a certain degree of continuity; or according to the style of the target picture, determine a background image that is consistent or similar to its style, so that the background image visually presents the extension of the target picture; or provide multiple according to the main color of the target picture The background image that matches its hue is used as an alternative, allowing the user to select one as the final background image. For different target pictures, because of their different picture information, different background images can be matched. After the background image is determined, step S240 can be executed to display it together with the target image in the display area.
基于上述说明,本示例实施方式在目标图片与显示区域尺寸不匹配时,在未显示目标图片的未填充区域添加背景图像的显示,以呈现图片全屏显示的效果,在视觉上具有较强的整体感与和谐感,提高了图片显示的美观性。此外,如果目标图片与显示区域的尺寸匹配则不添加背景图像,从而对不同尺寸的图片采取不同的显示方法,具有较高的灵活性。在本公开的一种示例性实施例中,根据目标图片的图片信息确定与其匹配的背景图像,可以为不同的图片确定不同的背景图像,从而提高了图片显示的多样性。Based on the above description, when the target picture does not match the size of the display area, this exemplary embodiment adds a background image display to the unfilled area where the target picture is not displayed, so as to present the effect of full-screen display of the picture, which has a strong visual overall Sense and harmony, improve the beauty of the picture display. In addition, if the size of the target picture matches the size of the display area, no background image is added, so that different display methods are adopted for pictures of different sizes, which has higher flexibility. In an exemplary embodiment of the present disclosure, the matching background image is determined according to the picture information of the target picture, and different background images can be determined for different pictures, thereby increasing the diversity of picture display.
上述图片信息可以包括目标图片的代表颜色,代表颜色可以是目标图片的背景颜色或主色调的代表颜色等,能够概括性表示目标图片的主要颜色。在一示例性实施例中,代表颜色也可以是目标图片中出现频率最高的颜色,其可以通过以下步骤确定:The above picture information may include the representative color of the target picture, and the representative color may be the background color of the target picture or the representative color of the main tone, etc., which can generally represent the main colors of the target picture. In an exemplary embodiment, the representative color may also be the color with the highest frequency in the target picture, which may be determined by the following steps:
统计目标图片中所出现的颜色种类和每种颜色的出现频率,并选择其中出现频率最高的至少一种颜色,作为目标图片的代表颜色。Count the types of colors that appear in the target picture and the frequency of each color, and select at least one color with the highest frequency as the representative color of the target picture.
下面通过几种具体实施方式做进一步说明,但下述内容不应对本公开的保护范围造成限定:The following will further illustrate through several specific implementations, but the following content should not limit the protection scope of the present disclosure:
(1)利用频度序列法,先扫描目标图片,确定每个像素点的颜色数值,例如可以是RGB颜色值或HSL颜色值,统计图片中所出现的颜色种类和每种颜色的出现次数,其中 出现次数最多的颜色,即出现频率最高的颜色,为目标图片的代表颜色。(1) Using the frequency sequence method, first scan the target picture to determine the color value of each pixel, for example, RGB color value or HSL color value, and count the types of colors that appear in the picture and the number of times each color appears. Among them, the color that appears most frequently, that is, the color that appears most frequently, is the representative color of the target image.
(2)同样利用频度序列法统计目标图片中所出现的颜色种类和每种颜色的出现次数,挑选其中出现频率最高、且属于同一色相的若干种颜色,作为代表颜色,或者取其平均值(或加权平均值)得到代表颜色,或者以该色相的主色为代表颜色。(2) Also use the frequency sequence method to count the types of colors that appear in the target picture and the number of times each color appears, and select several colors with the highest frequency and belong to the same hue as the representative colors, or take the average value (Or weighted average) to get the representative color, or use the main color of the hue as the representative color.
(3)从目标图片中裁掉中间一定的区域,剩余部分为目标图片的边缘区域,对边缘区域执行上述(1)或(2)的方法。(3) Cut a certain area in the middle from the target picture, and the remaining part is the edge area of the target picture, and perform the method (1) or (2) above on the edge area.
(4)将目标图片分割成若干个子区域,例如可以根据经验分割为8*8、16*16、4*3或16*9个子区域。统计目标图片的各种颜色在各子区域中出现的频率,该频率是指在全部子区域中有多少个子区域出现了某个颜色,例如若将目标图片分割为16*9=144个子区域,其中有102个子区域内都出现了品红色(R255,G0,B255),则品红色出现的频率为102/144=70.8%。按照该方法,频率最高的颜色为目标图片的代表颜色。(4) The target picture is divided into several sub-regions, for example, it can be divided into 8*8, 16*16, 4*3 or 16*9 sub-regions based on experience. Count the frequency of occurrence of various colors of the target picture in each sub-region. The frequency refers to how many sub-regions in all sub-regions have a certain color. For example, if the target picture is divided into 16*9=144 sub-regions, Magenta (R255, G0, B255) appears in 102 sub-regions, and the frequency of magenta appearance is 102/144=70.8%. According to this method, the color with the highest frequency is the representative color of the target image.
基于上述代表颜色,可以以该代表颜色纯色填充的图像作为目标图片的背景图像,也可以以该代表颜色同色系的渐变色填充、或相同色调的图案填充等作为背景图像。Based on the above-mentioned representative colors, an image filled with a pure color of the representative color can be used as a background image of the target picture, or a gradient fill of the same color system of the representative color, or a pattern fill of the same hue as the background image.
进一步的,如果选择目标图片中出现频率最高的m种颜色作为代表颜色,则步骤S231可以具体通过以下步骤实现:Further, if the m colors with the highest occurrence frequency in the target picture are selected as the representative colors, step S231 can be specifically implemented through the following steps:
基于上述m种颜色,通过以下公式(1)确定与目标图片匹配的背景颜色的值D;Based on the above m colors, the value D of the background color matching the target picture is determined by the following formula (1);
Figure PCTCN2020075654-appb-000003
Figure PCTCN2020075654-appb-000003
根据背景颜色的值D生成与目标图片匹配的背景图像;Generate a background image matching the target image according to the value D of the background color;
其中,m可以是任意自然数,i为[1,m]内的任意整数,C i为上述m种颜色中的第i种颜色的值(例如,可以是RGB颜色值或HSL颜色值),f i为C i在目标图片中的出现频率。公式(1)可看作是将m种颜色的出现频率作为其权重,对m种颜色进行加权平均,得到一个平均色值,即背景颜色的值D,其是对目标图片颜色特征的高度概括。背景图像可以是以背景颜色的值D的纯色填充、D同色系的渐变色填充、D同色调的图案填充等,本公开对此不做限定。 Among them, m can be any natural number, i is any integer within [1, m], C i is the value of the i-th color among the m colors (for example, it can be an RGB color value or an HSL color value), f i is the frequency of C i in the target picture. The formula (1) can be regarded as taking the appearance frequency of m colors as its weight, and weighting and averaging the m colors to obtain an average color value, that is, the value D of the background color, which is a high summary of the color characteristics of the target image . The background image may be filled with a pure color of the value D of the background color, a gradient filled with the same color of D, a pattern filled with the same hue of D, etc. The present disclosure does not limit this.
需要说明的是,如果目标图片为RGB模式,则可以将其中的颜色表示为RGB分量,对每个分量通过公式(1)计算出背景颜色D的RGB分量;HSL模式下可以对HSL分量分别计算,灰度模式下可以对灰度值进行上述计算。此外,m可以是预先确定的数值,例如确定选择目标图片中出现频率最高的5种或10种颜色为代表颜色,也可以确定关于颜色出现频率的预设阈值,将目标图片中出现频率高于该预设阈值的所有颜色作为代表颜色,则m的数值是不确定的,例如,将出现频率高于10%的所有颜色作为代表颜色,如果有3种颜色符合要求,则m为3,本公开对于预设阈值不做特别限定。It should be noted that if the target image is in RGB mode, the colors in it can be expressed as RGB components, and the RGB components of the background color D can be calculated by formula (1) for each component; HSL components can be calculated separately in HSL mode , The gray value can be calculated in gray mode. In addition, m can be a predetermined value, for example, it is determined to select the 5 or 10 colors with the highest frequency in the target picture as the representative color, or a preset threshold value for the frequency of color appearance can be determined to make the frequency of appearance in the target picture higher than All colors of the preset threshold are used as representative colors, and the value of m is uncertain. For example, all colors with a frequency higher than 10% are used as representative colors. If there are 3 colors that meet the requirements, m is 3. Disclosure does not specifically limit the preset threshold.
在一示例性实施例中,还可以获取显示设备的边框的特征信息,并基于该边框的特征信息与目标图片的图片信息,共同确定与目标图片以及边框匹配的背景图像。In an exemplary embodiment, the characteristic information of the frame of the display device may also be acquired, and based on the characteristic information of the frame and the picture information of the target picture, a background image matching the target picture and the frame may be jointly determined.
其中,边框是指显示设备的实体边框,其颜色或纹理等通常与设备的壳体颜色相同,当然也有例外的情况,边框的特征信息可以包括边框的颜色、纹理、图案、形状等各方面信息,本公开对此不做限定。本示例实施方式中,可以通过外置摄像头拍摄边框区域的图像,识别图像中的边框特征,外置摄像头也可以由另一具备拍摄功能的电子设备代替,例如通过手机拍摄电子相框的边框图像,再通过蓝牙、USB、无线网络等方式将图像传输至电子相框,使其识别出边框的特征。如果边框为普通的纯色边框,其特征信息主要包括颜色,还可以由用户预先选定而确定该颜色,例如可以提供调色板,使用户在其中框选出颜色,通过全屏预览(全屏显示用户框选的颜色)或边缘预览(在靠近边框的边缘区域显示用户框选的颜色)的方式使用户可以直观的判断该颜色与边框颜色是否一致,从而能够准确的选定边框颜色,为默认的边框颜色,后续如果更换其他颜色的显示设备或者边框,可以重新选定边框颜色。Among them, the frame refers to the physical frame of the display device, and its color or texture is usually the same as the color of the housing of the device. Of course, there are exceptions. The characteristic information of the frame can include the color, texture, pattern, shape and other aspects of the frame. , This disclosure does not limit this. In this example embodiment, the image of the frame area can be captured by an external camera to identify the frame characteristics in the image. The external camera can also be replaced by another electronic device with a shooting function, for example, the frame image of an electronic photo frame can be captured by a mobile phone. Then the image is transmitted to the electronic photo frame through Bluetooth, USB, wireless network, etc., so that it can recognize the characteristics of the frame. If the frame is an ordinary solid color frame, its characteristic information mainly includes color, and the color can also be determined by the user in advance. For example, a color palette can be provided to enable the user to select a color in the frame, and preview it through full screen (full screen display user The color of the frame selection) or the edge preview (display the color selected by the user in the edge area near the frame) allows the user to intuitively judge whether the color is consistent with the frame color, so that the frame color can be accurately selected, which is the default The border color. If you change the display device or border of another color later, you can reselect the border color.
在获取边框的特征信息与目标图片的图片信息后,可以根据两方面的信息共同确定背景图像,由于背景图像位于目标图片与边框之间,这样可以得到更加美观的显示效果。本示例性实施例中,可以生成从目标图片到边框的过渡效果,例如由目标图片的代表颜色到边框颜色的渐变色填充,或者考虑到边框与目标图片未处于同一平面上,可以呈现具有立体透视图效果的背景图像,使目标图片与边框的衔接更自然。After obtaining the characteristic information of the frame and the picture information of the target picture, the background image can be determined jointly based on the two aspects of information. Since the background image is located between the target picture and the frame, a more beautiful display effect can be obtained. In this exemplary embodiment, a transition effect from the target picture to the frame can be generated, for example, a gradient fill from the representative color of the target picture to the frame color, or considering that the frame and the target picture are not on the same plane, it can present a three-dimensional The background image with perspective effect makes the connection between the target image and the frame more natural.
进一步的,在一示例性实施例中,目标图片的图片信息主要指目标图片的代表颜色,边框的特征信息主要指边框的颜色,则可以确定边框的颜色与代表颜色的中间颜色,并基于该中间颜色确定与目标图片匹配的背景图像。Further, in an exemplary embodiment, the picture information of the target picture mainly refers to the representative color of the target picture, and the characteristic information of the frame mainly refers to the color of the frame. Then, the intermediate color between the color of the frame and the representative color can be determined, and based on this The middle color determines the background image that matches the target picture.
其中,中间颜色是指介于边框的颜色与目标图片的代表颜色之间的颜色,可以是一个颜色,也可以是一组颜色。在全屏显示图片时,从显示屏的中间到边缘,依次为目标图片、背景图像、边框,为了表现出整体感,可以使背景图像起到从目标图片到边框的过渡作用,因此可以基于中间颜色确定背景图像。举例说明:如果边框颜色与代表颜色属于同一色相,中间颜色可以是上述两颜色之间的一组渐变色,背景图像可以是渐变色填充;如果边框颜色与代表颜色属于不同色相,可以以两颜色的均值得到中间颜色,背景图像可以是以中间颜色为主色,加入边框颜色与代表颜色(或两颜色的近似色)图案的效果;实际应用中,在确定中间颜色后,可以以中间颜色为主色,加入任意的图案形成背景图像。Among them, the intermediate color refers to the color between the color of the border and the representative color of the target image, and it can be a color or a group of colors. When the picture is displayed on the full screen, from the middle to the edge of the display, the target picture, the background image, and the frame are in sequence. In order to show the overall sense, the background image can be used to transition from the target picture to the frame, so it can be based on the middle color Determine the background image. For example: if the border color and the representative color belong to the same hue, the middle color can be a set of gradient colors between the above two colors, and the background image can be filled with a gradient color; if the border color and the representative color belong to different hues, two colors can be used The average value of, the intermediate color can be obtained. The background image can be based on the intermediate color as the main color, adding the effect of the border color and the representative color (or the approximate color of the two colors) pattern; in practical applications, after determining the intermediate color, the intermediate color can be The main color, add arbitrary patterns to form a background image.
本公开提供了下面几种计算中间颜色的示例性实施例,但下述内容不应对本公开的保护范围造成限定:The present disclosure provides the following exemplary embodiments for calculating intermediate colors, but the following content should not limit the protection scope of the present disclosure:
(1)采用RGB颜色模式,如果代表颜色的值为(R1,G1,B1),边框颜色的值为(R2,G2,B2),则可以通过公式(2)(包括下面3个公式)计算中间颜色的值为(R3,G3,B3):(1) RGB color mode is adopted. If the value of the representative color is (R1, G1, B1) and the value of the border color is (R2, G2, B2), it can be calculated by formula (2) (including the following 3 formulas) The value of the middle color is (R3, G3, B3):
Figure PCTCN2020075654-appb-000004
Figure PCTCN2020075654-appb-000004
Figure PCTCN2020075654-appb-000005
Figure PCTCN2020075654-appb-000005
Figure PCTCN2020075654-appb-000006
Figure PCTCN2020075654-appb-000006
其中,a、b、c均为大于0的常数,且a+b+c=1。公式(2)的计算过程可以表述为:先分别对代表颜色的值与边框颜色的值的R、G、B分量求平均,再对R、G、B按照不同的比例混合得到中间颜色,a、b、c的值即混合比例,可以根据经验确定,也可以按照不同的色相与实际需求进行调整,例如代表颜色与边框颜色都属于绿色色相,则可以适当增大b的数值。如图5的12色相环所示,通常颜色搭配以不超过三种为宜,即不超过三种色相的范围,因为在确定背景图像时,可以采用同色相、同明度、同饱和度的搭配,保证目标图片、背景图像与边框表现出较为统一的外观色,例如红+橙红+橙,蓝绿+蓝+蓝紫等,采用上述方法确定中间颜色可以实现该目的。Among them, a, b, and c are all constants greater than 0, and a+b+c=1. The calculation process of formula (2) can be expressed as: firstly, the R, G, and B components of the value of the representative color and the value of the border color are averaged, and then R, G, and B are mixed in different proportions to obtain the intermediate color, a The value of, b, c is the mixing ratio, which can be determined based on experience, or adjusted according to different hues and actual needs. For example, if the representative color and the border color are both green, the value of b can be increased appropriately. As shown in the 12-hue circle in Figure 5, usually the color matching should not exceed three, that is, the range of three hues, because when determining the background image, you can use the same hue, the same brightness, and the same saturation. , To ensure that the target image, background image, and frame show a more uniform appearance color, such as red + orange red + orange, blue green + blue + blue purple, etc. The above method can be used to determine the intermediate color to achieve this goal.
(2)如果代表颜色的值为(R1,G1,B1),边框颜色的值为(R2,G2,B2),则可以通过公式(3)(包括下面3个公式)计算中间颜色的值为(R3,G3,B3):(2) If the value of the representative color is (R1, G1, B1) and the value of the border color is (R2, G2, B2), the value of the intermediate color can be calculated by formula (3) (including the following 3 formulas) (R3, G3, B3):
R3=p·R1+q·R2;R3=p·R1+q·R2;
G3=p·G1+q·G2;G3=p·G1+q·G2;
B3=p·B1+q·B2;(3)B3=p·B1+q·B2; (3)
其中,p、q均未大于0的常数,且p+q=1。即可以通过代表颜色的值与边框颜色的值的加权平均得到中间颜色的值,p与q分别为代表颜色的值与边框颜色的值的权重值,通常为了强调背景图像更多地与目标图片匹配,p可以大于0.5,当然也可以根据实际情况进行调整,例如代表颜色属于深色系、边框颜色属于浅色系时,可以适当减小p的数值,或者代表颜色在目标图片中的占比较低,也可以适当减小p的数值。Among them, p and q are not constants greater than 0, and p+q=1. That is, the value of the intermediate color can be obtained by the weighted average of the value of the representative color and the value of the border color. p and q are the weight values of the value of the representative color and the value of the border color, usually in order to emphasize the background image more and the target image Match, p can be greater than 0.5, of course, it can also be adjusted according to the actual situation. For example, when the representative color belongs to the dark color system and the border color belongs to the light color system, the value of p can be appropriately reduced, or the percentage of the color in the target image If it is low, the value of p can also be appropriately reduced.
(3)如果选择目标图片中出现频率最高的m种颜色作为代表颜色,记为C 1~C m,边框颜色的值为F,则可以通过公式(4)计算中间颜色的值E: (3) If the m colors with the highest frequency in the target picture are selected as the representative colors, denoted as C 1 ~C m , and the value of the border color is F, then the value E of the intermediate color can be calculated by formula (4):
Figure PCTCN2020075654-appb-000007
Figure PCTCN2020075654-appb-000007
换而言之,将目标图片的m种代表颜色的值与边框颜色的值F分别求平均,得到m个平均色,再以m种颜色在目标图片中的出现频率f作为权重,对m个平均色值进行加权平均,得到中间颜色的值E。这样的计算方式可以充分考虑到目标图片的颜色分布特征以及边框颜色的影响,得到匹配程度较高的背景图像。In other words, the values of m representative colors of the target picture and the value F of the border color are averaged to obtain m average colors, and then the frequency f of the m colors in the target picture is used as the weight, and the m The average color value is weighted and averaged to obtain the value E of the intermediate color. Such a calculation method can fully consider the color distribution characteristics of the target image and the influence of the border color to obtain a background image with a higher degree of matching.
在一示例性实施例中,图片显示方法的流程可以如图6所示:步骤S610,获取目标图片;步骤S620,检测目标图片与显示区域的尺寸是否匹配;步骤S630,如果匹配,则可以正常的全屏显示目标图片,使其恰好充满整个显示区域;步骤S640,如果不匹配,则提取目标图片的代表颜色;步骤S650,同时检测显示设备的边框颜色;步骤S660,根据代表颜色与边框颜色确定中间颜色;步骤S670,再基于中间颜色确定背景图像,背景图像与目标图片及边框是匹配的;步骤S680,将目标图片与背景图像组合显示于显示区域内,从而实现了图片的全屏显示。In an exemplary embodiment, the process of the picture display method may be as shown in FIG. 6: Step S610, obtain the target picture; Step S620, detect whether the size of the target picture and the display area match; Step S630, if they match, it can be normal Display the target picture in full screen to make it fill the entire display area; step S640, if it does not match, extract the representative color of the target picture; step S650, detect the border color of the display device at the same time; step S660, determine according to the representative color and the border color Intermediate color; Step S670, determine the background image based on the intermediate color, the background image matches the target picture and the frame; Step S680, combine the target picture and the background image to display in the display area, thereby realizing the full screen display of the picture.
本公开还提供了另一种关于如何确定背景图像的示例性实施例,具体地,步骤S231可以通过以下步骤实现:The present disclosure also provides another exemplary embodiment on how to determine the background image. Specifically, step S231 can be implemented through the following steps:
根据目标图片的图片信息,在效果素材库中查找与目标图片匹配的背景图像。According to the picture information of the target picture, search for a background image matching the target picture in the effect material library.
其中,效果素材库是预先构建的一个集合了大量图片与素材之间搭配关系的数据库,例如颜色与颜色之间的搭配、颜色与图案或图片之间的搭配、图片与图案之间的搭配等等。从目标图片中提取图片信息,如代表颜色、边缘颜色等,可以在效果素材库中查找与其匹配的背景图像素材,从而得到背景图像。Among them, the effect material library is a pre-built database that gathers a large number of matching relationships between pictures and materials, such as the matching of colors and colors, the matching of colors and patterns or pictures, the matching of pictures and patterns, etc. Wait. Extract picture information from the target picture, such as representative color, edge color, etc., and search for the matching background image material in the effect material library to obtain the background image.
在一示例性实施例中,图片显示方法还可以包括以下构建效果素材库的步骤:In an exemplary embodiment, the image display method may further include the following steps of constructing an effect material library:
获取多个样本图片和多个背景素材,背景素材包括以下任意一种或多种:纯色填充、渐变色填充、纹理填充或图案填充;Obtain multiple sample pictures and multiple background materials. The background materials include any one or more of the following: solid color filling, gradient color filling, texture filling or pattern filling;
对于每个样本图片,获取该样本图片与一个或多个背景素材的匹配关系,以构建上述效果素材库。For each sample picture, the matching relationship between the sample picture and one or more background materials is obtained to construct the aforementioned effect material library.
其中,样本图片是预先收集的大量具有代表性的图片,例如可以包括典型的纯色图片,各种物体的静态图片,水墨画、油画、风景照片、人物肖像等各种风格的典型图片等;当然,根据应用场景的不同,可以缩小样本图片的覆盖范围,例如将本示例性实施例应用于人物自拍照的展示时,可以针对性地收集人物自拍主题的代表性图片,以构建小型的效果素材库。样本图片可以从互联网上搜索得到,也可以从本地或其他数据库中获得,本公开对此不做限定。Among them, the sample pictures are a large number of representative pictures collected in advance, for example, it can include typical pure color pictures, static pictures of various objects, ink paintings, oil paintings, landscape photos, portraits and other typical pictures of various styles; of course, According to different application scenarios, the coverage of sample pictures can be reduced. For example, when the exemplary embodiment is applied to the display of character selfies, representative pictures of the subject of character selfies can be collected specifically to construct a small effect material library . The sample pictures can be searched on the Internet, and can also be obtained from local or other databases, which is not limited in the present disclosure.
类似的,构建效果素材库所需的背景素材也可以从互联网、本地或其他数据库中获取,还可以基于一定的机制生成背景素材,例如从一个种子素材中通过改变颜色、改变纹理、改变图案等生成一系列素材。Similarly, the background materials needed to build the effect material library can also be obtained from the Internet, local or other databases, and background materials can also be generated based on certain mechanisms, such as changing colors, textures, and patterns from a seed material. Generate a series of materials.
本示例性实施例中,可以利用单色搭配法、近似色搭配法等,从背景素材中提取单色,通过改变单色的色相、饱和度、明度形成一系列颜色,在该背景素材与这些颜色之间建立匹配关系,或者通过搜集颜色搭配关系以建立匹配关系,再将颜色映射到样本图片,从而得到样本图片与背景素材的匹配关系,或者通过用户的人工评分建立样本图片与背景素材的匹配关系,匹配关系可以包括是否匹配或者匹配程度的定量表示。依据上述方法可以构建效果素材库,以便于后续查找合适的背景图像。In this exemplary embodiment, a single color matching method, an approximate color matching method, etc. can be used to extract a single color from a background material, and form a series of colors by changing the hue, saturation, and lightness of the single color. Establish a matching relationship between colors, or establish a matching relationship by collecting color matching relationships, and then map the colors to a sample image to obtain the matching relationship between the sample image and the background material, or establish the relationship between the sample image and the background material through the user’s manual rating The matching relationship, the matching relationship may include a quantitative expression of whether or not it matches or the degree of matching. According to the above method, an effect material library can be constructed to facilitate the subsequent search for a suitable background image.
在一示例性实施例中,构建效果素材库的步骤可以包括:In an exemplary embodiment, the step of constructing an effect material library may include:
从互联网搜索样本图片和背景素材搭配的样例;Search for examples of sample pictures and background materials from the Internet;
通过对上述样例进行分析,得到每个样本图片与一个或多个背景素材的匹配度,以构建效果素材库。Through the analysis of the above samples, the matching degree of each sample picture with one or more background materials is obtained to construct an effect material library.
其中,样本图片和背景素材搭配的样例可以包括带边缘效果的图片(边缘效果作为背景素材),带图片镶嵌的海报(海报背景作为背景素材),带图片镶嵌的服装设计(服装底色作为背景素材)等,可以通过爬虫工具从互联网上爬取相关样例信息。在获取样例后,将其中的图片与背景拆分,图片作为样本图片,背景作为背景素材,再基于每个样例的热度、用户好评度、搜索频度等数据,综合分析得到样本图片与背景素材的匹配度,从而构建效果素材库。Among them, examples of sample pictures and background materials can include pictures with edge effects (edge effects as background materials), posters with picture inlays (poster backgrounds as background materials), and clothing designs with picture inlays (clothing background colors are used as background materials). Background material), etc., you can use crawler tools to crawl relevant sample information from the Internet. After obtaining the samples, separate the pictures from the background, use the pictures as the sample pictures, and the background as the background material. Then, based on the popularity of each sample, user praise, search frequency and other data, comprehensively analyze the sample pictures and The matching degree of the background material to build the effect material library.
基于样本图片而构建的效果素材库,在实际应用中,可以通过以下步骤确定背景图像:The effect material library constructed based on sample pictures, in practical applications, the background image can be determined through the following steps:
在效果素材库中查找与目标图片相同或相似的样本图片,作为目标样本图片;Find sample pictures that are the same or similar to the target picture in the effect material library as the target sample picture;
根据效果素材库中与目标样本图片匹配的背景素材生成背景图像。Generate a background image based on the background material matching the target sample image in the effect material library.
其中,可以计算目标图片与效果素材库中每个样本图片的相似度,例如SSIM(Structural Similarity Index,结构相似性)、余弦相似度等,将与目标图片相似度最高的样本图片作为目标样本图片,也可以对样本图片进行多个维度的分类,例如图片风格、代表颜色、主色调等,如果样本图像与目标图片的所有维度信息都相同,或相同的维度数最多,则为目标样本图片。在效果素材库中,查找目标样本图片匹配的背景素材,基于该素材可以进行适当的裁剪、美化、颜色调整等,可以得到背景图像,如果目标样本图片匹配多个背景素材,则可以选择其中匹配度最高的一个,生成背景图像。Among them, the similarity between the target picture and each sample picture in the effect material library can be calculated, such as SSIM (Structural Similarity Index, structural similarity), cosine similarity, etc., and the sample picture with the highest similarity to the target picture is used as the target sample picture , The sample picture can also be classified in multiple dimensions, such as picture style, representative color, main color, etc. If all the dimensional information of the sample image and the target picture are the same, or the same number of dimensions is the largest, then it is the target sample picture. In the effect material library, find the background material that matches the target sample image. Based on the material, you can perform appropriate cropping, beautification, color adjustment, etc., to get the background image. If the target sample image matches multiple background materials, you can choose which one to match The one with the highest degree generates a background image.
在一示例性实施例中,图片显示方法的整体流程可以如图7所示:步骤S710,获取目标图片;步骤S720,检测目标图片与显示区域的尺寸是否匹配;步骤S730,如果匹配,则可以正常的全屏显示目标图片,使其恰好充满整个屏幕;步骤S740,如果不匹配,则提取目标图片的图片信息;步骤S750,将目标图片的图片信息输入效果素材库中,然后通过步骤S760或步骤S770确定背景图像;步骤S760,自动查找效果素材库与目标图片匹配的背景图像;步骤S770,用户手动选择合适的背景图像;步骤S780,在确定背景图像后,可以将目标图片与背景图像组合显示于显示区域内。In an exemplary embodiment, the overall process of the picture display method may be as shown in FIG. 7: Step S710, obtain the target picture; Step S720, detect whether the size of the target picture and the display area match; Step S730, if they match, then Normally display the target picture in full screen so that it just fills the entire screen; step S740, if it does not match, extract the picture information of the target picture; step S750, input the picture information of the target picture into the effect material library, and then go through step S760 or step S770 determines the background image; step S760, automatically finds the background image matching the effect material library with the target picture; step S770, the user manually selects an appropriate background image; step S780, after the background image is determined, the target picture and the background image can be combined and displayed In the display area.
在一示例性实施例中,背景图像可以是模拟画卷展开的效果;相应的,步骤S231可以通过以下步骤实现:In an exemplary embodiment, the background image may be the effect of simulating the expansion of the scroll; correspondingly, step S231 may be implemented through the following steps:
根据目标图片的图片信息确定与目标图片匹配的边缘填充效果;Determine the edge filling effect matching the target picture according to the picture information of the target picture;
以边缘填充效果为画卷背景,得到模拟画卷展开的效果。Take the edge filling effect as the background of the scroll to get the effect of simulating the expansion of the scroll.
其中,模拟画卷展开的效果可以如图8中的背景图像820所示,左右两侧为画卷的效果,加上内部的画布填充效果,其与目标图片810共同形成了一幅画卷的视觉感,能够进一步提高美观性。本示例性实施例中,可以根据目标图片的图片信息确定背景填充效果, 例如以匹配目标图片的颜色作为主色,添加一定的纹理,形成纸张、画布的填充效果,将其作为画卷背景,两侧添加画卷卷曲的图形,形成最终的背景图像,即模拟画卷展开的效果。当然,也可以在背景图像中增加一些镶嵌、点缀、文字等元素,以得到多样的效果,本公开对此不做特别限定。The unfolding effect of the simulated scroll can be as shown in the background image 820 in Figure 8. The left and right sides are the scroll effect, plus the internal canvas filling effect, which together with the target picture 810 form a visual sense of the scroll. Can further improve the aesthetics. In this exemplary embodiment, the background filling effect can be determined according to the picture information of the target picture. For example, the color matching the target picture is used as the main color, and a certain texture is added to form the filling effect of paper and canvas, which is used as the scroll background. Add the curled image of the scroll on the side to form the final background image, which simulates the effect of scrolling. Of course, some elements such as mosaics, embellishments, text, etc. can also be added to the background image to obtain various effects, which are not particularly limited in the present disclosure.
在一示例性实施例中,在确定上述背景填充效果时,还可以参考显示设备的边框的颜色,例如在图8中,可以根据显示区域800的边框830的颜色以及目标图片810的图片信息,共同确定背景填充效果(可以参考公式(2)~(4)部分的方法)。In an exemplary embodiment, when determining the above-mentioned background filling effect, the color of the frame of the display device may also be referred to. For example, in FIG. 8, the color of the frame 830 of the display area 800 and the picture information of the target picture 810 may be used. Determine the background filling effect together (refer to the method in formulas (2) ~ (4)).
画卷模拟的效果仅是背景图像的一种示例,还可以采用例如模拟书本打开的效果、模拟画板的效果等等。The effect of the picture scroll simulation is only an example of the background image. For example, the effect of simulating the opening of the book, the effect of simulating the drawing board, etc. can also be used.
本公开的示例性实施例还提供了一种图片显示装置,可以应用于显示设备,显示设备呈现一显示区域。如图9所示,该装置900可以包括:图片获取模块910,用于获取待显示的目标图片;尺寸检测模块920,用于检测目标图片与显示区域的尺寸是否匹配;第一显示模块930,用于如果目标图片与显示区域的尺寸匹配,则在显示区域内显示目标图片;第二显示模块940,用于如果目标图片与显示区域的尺寸不匹配,则在显示区域中显示目标图片,并在未显示目标图片的未填充区域的至少一个子区域内显示背景图像。Exemplary embodiments of the present disclosure also provide a picture display device, which can be applied to a display device, and the display device presents a display area. As shown in FIG. 9, the device 900 may include: a picture acquisition module 910, configured to acquire a target picture to be displayed; a size detection module 920, configured to detect whether the target picture matches the size of the display area; and a first display module 930, If the target picture matches the size of the display area, display the target picture in the display area; the second display module 940 is used to display the target picture in the display area if the size of the target picture does not match the display area, and The background image is displayed in at least one subregion of the unfilled region where the target picture is not displayed.
在一示例性实施例中,第二显示模块940可以用于在显示区域中显示目标图片,并在未显示目标图片的未填充区域显示背景图像,以使显示区域被目标图片与背景图像所填满。In an exemplary embodiment, the second display module 940 may be used to display the target picture in the display area, and display the background image in the unfilled area where the target picture is not displayed, so that the display area is filled with the target picture and the background image. full.
在一示例性实施例中,图片显示装置900还可以包括:背景确定模块,用于根据目标图片的图片信息,确定与目标图片匹配的背景图像。In an exemplary embodiment, the picture display device 900 may further include: a background determining module for determining a background image matching the target picture according to picture information of the target picture.
在一示例性实施例中,上述图片信息可以包括目标图片的代表颜色;图片获取模块910还可以包括:图片信息获取单元,用于统计目标图片中所出现的颜色种类和每种颜色的出现频率,并选择其中出现频率最高的至少一种颜色,作为目标图片的代表颜色。In an exemplary embodiment, the above-mentioned picture information may include the representative color of the target picture; the picture obtaining module 910 may also include: a picture information obtaining unit for counting the types of colors appearing in the target picture and the frequency of each color , And select at least one color with the highest frequency as the representative color of the target image.
在一示例性实施例中,图片获取模块910还可以包括:边框信息获取单元,用于获取显示设备的边框的特征信息;背景确定模块可以用于基于边框的特征信息与图片信息,确定与目标图片以及边框匹配的背景图像。In an exemplary embodiment, the picture acquiring module 910 may further include: a frame information acquiring unit for acquiring feature information of the frame of the display device; the background determining module may be configured to determine the target information based on the feature information and picture information of the frame Picture and background image with matching border.
在一示例性实施例中,上述图片信息可以包括目标图片的代表颜色,上述特征信息可以包括边框的颜色;背景确定模块可以包括:中间颜色确定单元,用于确定边框的颜色与代表颜色的中间颜色;背景图像确定单元,用于基于中间颜色确定与目标图片以及边框匹配的背景图像。In an exemplary embodiment, the above-mentioned picture information may include the representative color of the target picture, and the above-mentioned characteristic information may include the color of the frame; the background determining module may include: an intermediate color determining unit for determining the middle between the color of the frame and the representative color Color; a background image determining unit for determining a background image matching the target picture and the frame based on the intermediate color.
在一示例性实施例中,上述代表颜色可以包括目标图片中出现频率最高的m种颜色;上述中间颜色可以通过以下公式确定:
Figure PCTCN2020075654-appb-000008
其中,i为[1,m]内的任意整数,Ci为m种颜色中的第i种颜色的值,fi为Ci在目标图片中的出现频率,F为边框的 颜色的值,E为中间颜色的值。
In an exemplary embodiment, the foregoing representative colors may include m colors with the highest frequency in the target picture; the foregoing intermediate colors may be determined by the following formula:
Figure PCTCN2020075654-appb-000008
Among them, i is any integer within [1,m], Ci is the value of the i-th color among m colors, fi is the frequency of appearance of Ci in the target image, F is the value of the color of the frame, and E is the middle The value of the color.
在一示例性实施例中,上述m种颜色为目标图片中出现频率高于预设阈值的颜色。In an exemplary embodiment, the aforementioned m colors are colors in the target picture whose frequency of appearance is higher than a preset threshold.
在一示例性实施例中,背景确定模块还可以用于根据目标图片的图片信息,在效果素材库中查找与目标图片匹配的背景图像。In an exemplary embodiment, the background determining module may also be used to search for a background image matching the target picture in the effect material library according to the picture information of the target picture.
在一示例性实施例中,图片显示装置900还可以包括素材库构建模块,素材库构建模块又可以包括:样本获取单元,用于获取多个样本图片和多个背景素材,背景素材包括以下任意一种或多种:纯色填充、渐变色填充、纹理填充或图案填充;匹配确定单元,用于对于每个样本图片,获取样本图片与一个或多个背景素材的匹配关系,以构建效果素材库。In an exemplary embodiment, the picture display device 900 may further include a material library building module, and the material library building module may further include: a sample acquisition unit for acquiring multiple sample pictures and multiple background materials, the background materials include any of the following One or more types: solid color filling, gradient color filling, texture filling or pattern filling; matching determination unit for obtaining the matching relationship between the sample image and one or more background materials for each sample image to build an effect material library .
在一示例性实施例中,上述匹配关系可以包括匹配度;样本获取单元可以用于从互联网搜索样本图片和背景素材搭配的样例;匹配确定单元可以用于通过对样例进行分析,得到每个样本图片与一个或多个背景素材的匹配度,以构建效果素材库。In an exemplary embodiment, the above-mentioned matching relationship may include a degree of matching; the sample acquisition unit may be used to search for examples of sample images and background materials from the Internet; the matching determination unit may be used to analyze the examples to obtain each The matching degree of a sample picture with one or more background materials to construct an effect material library.
在一示例性实施例中,背景确定模块可以包括:目标样本查找单元,用于在效果素材库中查找与目标图片相同或相似的样本图片,作为目标样本图片;背景图像生成单元,用于根据效果素材库中与目标样本图片匹配的背景素材生成背景图像。In an exemplary embodiment, the background determining module may include: a target sample searching unit, which is used to find a sample picture that is the same or similar to the target picture in the effect material library, as the target sample picture; The background material matching the target sample image in the effect material library generates a background image.
在一示例性实施例中,目标样本查找单元可以用于计算目标图片与效果素材库中每个样本图片的相似度,将与目标图片相似度最高的样本图片作为目标样本图片。In an exemplary embodiment, the target sample searching unit may be used to calculate the similarity between the target picture and each sample picture in the effect material library, and the sample picture with the highest similarity to the target picture is used as the target sample picture.
在一示例性实施例中,第二显示模块940还可以用于将目标图片与背景图像合并为新图像,在显示区域中显示新图像。In an exemplary embodiment, the second display module 940 may also be used to merge the target picture and the background image into a new image, and display the new image in the display area.
上述装置中各模块/单元的具体细节已经在对应的方法部分实施例中进行了详细的描述,因此不再赘述。The specific details of each module/unit in the above-mentioned device have been described in detail in the corresponding method part of the embodiment, and therefore will not be repeated.
本公开的示例性实施例还提供了一种能够实现上述方法的电子设备。Exemplary embodiments of the present disclosure also provide an electronic device capable of implementing the above method.
所属技术领域的技术人员能够理解,本公开的各个方面可以实现为系统、方法或程序产品。因此,本公开的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。Those skilled in the art can understand that various aspects of the present disclosure can be implemented as systems, methods, or program products. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "Circuit", "Module" or "System".
下面参照图10来描述根据本公开的这种示例性实施例的电子设备1000。图10显示的电子设备1000仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。The electronic device 1000 according to this exemplary embodiment of the present disclosure will be described below with reference to FIG. 10. The electronic device 1000 shown in FIG. 10 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
如图10所示,电子设备1000可以包括:处理器1010、存储器1020与显示器1030,其中,存储器1020用于存储处理器1010的可执行指令,显示器1030用于呈现一显示区域,处理器1010配置为经由执行该可执行指令来执行本示例实施方式中的任意方法,例如可以执行图2、图3、图6或图7所示的方法步骤,并在显示区域内显示指令执行结果。该电子设备1000可以是电脑、手机、平板电脑、智能电视、电子相框或电子画屏等等。As shown in FIG. 10, the electronic device 1000 may include a processor 1010, a memory 1020, and a display 1030, where the memory 1020 is used to store executable instructions of the processor 1010, the display 1030 is used to present a display area, and the processor 1010 is configured In order to execute any method in this exemplary embodiment by executing the executable instruction, for example, the method steps shown in FIG. 2, FIG. 3, FIG. 6 or FIG. 7 may be executed, and the instruction execution result may be displayed in the display area. The electronic device 1000 may be a computer, a mobile phone, a tablet computer, a smart TV, an electronic photo frame, or an electronic drawing screen, etc.
在一示例性实施例中,电子设备还可以包括图像传感器,用于获取显示器的边框的特征信息,边框的特征信息用于与目标图片的图片信息共同确定背景图像。图像传感器可以 是外接的摄像头,例如电子设备为电子画屏时,可以在其对面的墙壁上设置外接的摄像头,以拍摄电子画屏的边框,得到特征信息。In an exemplary embodiment, the electronic device may further include an image sensor for acquiring characteristic information of the frame of the display, and the characteristic information of the frame is used to determine the background image together with the picture information of the target picture. The image sensor can be an external camera. For example, when the electronic device is an electronic drawing screen, an external camera can be set on the opposite wall to capture the frame of the electronic drawing screen to obtain characteristic information.
在一示例性实施例中,如图11所示,电子设备1100可以以通用计算设备的形式表现,其组件可以包括但不限于:至少一个处理单元1110、至少一个存储单元1120、连接不同系统组件(包括存储单元1120和处理单元1110)的总线1130、显示单元1140。In an exemplary embodiment, as shown in FIG. 11, the electronic device 1100 may be in the form of a general-purpose computing device, and its components may include but are not limited to: at least one processing unit 1110, at least one storage unit 1120, and connection to different system components (Including the storage unit 1120 and the processing unit 1110) bus 1130 and the display unit 1140.
其中,存储单元存储有程序代码,程序代码可以被处理单元1110执行,使得处理单元1110执行本说明书上述“示例性方法”部分中描述的根据本公开各示例实施方式的步骤。The storage unit stores program codes, and the program codes can be executed by the processing unit 1110, so that the processing unit 1110 executes the steps according to the exemplary embodiments of the present disclosure described in the "Exemplary Method" section of this specification.
存储单元1120可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)1121和/或高速缓存存储单元1122,还可以进一步包括只读存储单元(ROM)1123。The storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 1121 and/or a cache storage unit 1122, and may further include a read-only storage unit (ROM) 1123.
存储单元1120还可以包括具有一组(至少一个)程序模块1125的程序/实用工具1124,这样的程序模块1125包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。The storage unit 1120 may also include a program/utility tool 1124 having a set of (at least one) program module 1125. Such program module 1125 includes but is not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples or some combination may include the implementation of a network environment.
总线1130可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。The bus 1130 may represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any bus structure among multiple bus structures. bus.
电子设备1100也可以与一个或多个外部设备1300(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备1100交互的设备通信,和/或与使得该电子设备1100能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口1150进行。并且,电子设备1100还可以通过网络适配器1160与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器1160通过总线1130与电子设备1100的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备1100使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The electronic device 1100 may also communicate with one or more external devices 1300 (such as keyboards, pointing devices, Bluetooth devices, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 1100, and/or communicate with Any device (such as a router, modem, etc.) that enables the electronic device 1100 to communicate with one or more other computing devices. This communication can be performed through an input/output (I/O) interface 1150. In addition, the electronic device 1100 may also communicate with one or more networks (for example, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 1160. As shown in the figure, the network adapter 1160 communicates with other modules of the electronic device 1100 through the bus 1130. It should be understood that although not shown in the figure, other hardware and/or software modules can be used in conjunction with the electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本公开示例性实施例的方法。Through the description of the foregoing embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software, or can be implemented by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network , Including several instructions to make a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the exemplary embodiment of the present disclosure.
本公开的示例性实施例还提供了一种计算机可读存储介质,其上存储有能够实现本说明书上述方法的程序产品。在一些可能的实施方式中,本公开的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当程序产品在终端设备上运行时,程序代码用于使 终端设备执行本说明书上述“示例性方法”部分中描述的根据本公开各种示例性实施方式的步骤。Exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which is stored a program product capable of implementing the above method of this specification. In some possible implementation manners, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to make the terminal device execute the above-mentioned instructions in this specification. The steps according to various exemplary embodiments of the present disclosure are described in the "Exemplary Methods" section.
参考图12所示,描述了根据本公开的示例性实施例的用于实现上述方法的程序产品1200,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本公开的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。Referring to FIG. 12, a program product 1200 for implementing the above method according to an exemplary embodiment of the present disclosure is described. It may adopt a portable compact disk read-only memory (CD-ROM) and include program codes, and may be used in a terminal Running on equipment, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, device, or device.
程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The program product can adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。The computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with the instruction execution system, apparatus, or device.
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。The program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言的任意组合来编写用于执行本公开操作的程序代码,程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。The program code for performing the operations of the present disclosure can be written in any combination of one or more programming languages. The programming languages include object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming. Language-such as "C" language or similar programming language. The program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on. In the case of a remote computing device, the remote computing device can be connected to a user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using Internet service providers) Business to connect via the Internet).
此外,上述附图仅是根据本公开示例性实施例的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。In addition, the above-mentioned drawings are merely schematic illustrations of the processing included in the method according to the exemplary embodiments of the present disclosure, and are not intended for limitation. It is easy to understand that the processing shown in the above drawings does not indicate or limit the time sequence of these processings. In addition, it is easy to understand that these processes can be executed synchronously or asynchronously in multiple modules, for example.
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的示例性实施例,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个 模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其他实施例。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求指出。Those skilled in the art will easily think of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure . The description and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限。It should be understood that the present disclosure is not limited to the precise structure that has been described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims (19)

  1. 一种图片显示方法,应用于显示设备,其中,所述显示设备呈现一显示区域;所述方法包括:A picture display method applied to a display device, wherein the display device presents a display area; the method includes:
    获取待显示的目标图片;Get the target picture to be displayed;
    检测所述目标图片与所述显示区域的尺寸是否匹配;Detecting whether the size of the target picture matches the size of the display area;
    如果所述目标图片与所述显示区域的尺寸匹配,则在所述显示区域中显示所述目标图片;If the target picture matches the size of the display area, displaying the target picture in the display area;
    如果所述目标图片与所述显示区域的尺寸不匹配且所述目标图片与所述显示区域的重合度低于预设值,则在所述显示区域中显示所述目标图片,并在未显示所述目标图片的未填充区域的至少一个子区域内显示背景图像。If the size of the target picture does not match the size of the display area and the degree of overlap between the target picture and the display area is lower than a preset value, the target picture is displayed in the display area, and if it is not displayed A background image is displayed in at least one sub-region of the unfilled region of the target picture.
  2. 根据权利要求1所述的方法,其中,所述在所述显示区域中显示所述目标图片,并在未显示所述目标图片的未填充区域的至少一个子区域内显示背景图像,包括:The method of claim 1, wherein the displaying the target picture in the display area and displaying a background image in at least one sub-region of an unfilled area where the target picture is not displayed comprises:
    在所述显示区域中显示所述目标图片,并在未显示所述目标图片的未填充区域显示所述背景图像,以使所述显示区域被所述目标图片与所述背景图像所填满。The target picture is displayed in the display area, and the background image is displayed in an unfilled area where the target picture is not displayed, so that the display area is filled with the target picture and the background image.
  3. 根据权利要求1所述的方法,其中,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    根据所述目标图片的图片信息,确定与所述目标图片匹配的背景图像。According to the picture information of the target picture, a background image matching the target picture is determined.
  4. 根据权利要求3所述的方法,其中,所述图片信息包括所述目标图片的代表颜色;所述方法还包括:The method according to claim 3, wherein the picture information includes a representative color of the target picture; the method further comprises:
    统计所述目标图片中所出现的颜色种类和每种颜色的出现频率,并选择其中出现频率最高的至少一种颜色,作为所述目标图片的代表颜色。The types of colors appearing in the target picture and the appearance frequency of each color are counted, and at least one color with the highest appearance frequency is selected as the representative color of the target picture.
  5. 根据权利要求4所述的方法,其中,如果选择所述目标图片中出现频率最高的m种颜色作为所述代表颜色,则所述根据所述目标图片的图片信息,确定与所述目标图片匹配的背景图像,包括:The method according to claim 4, wherein if the m colors with the highest occurrence frequency in the target picture are selected as the representative colors, then the determination is made to match the target picture according to the picture information of the target picture The background image includes:
    基于所述m种颜色确定与所述目标图片匹配的背景颜色值
    Figure PCTCN2020075654-appb-100001
    根据背景颜色值D生成与所述目标图片匹配的背景图像;
    Determine a background color value matching the target image based on the m colors
    Figure PCTCN2020075654-appb-100001
    Generating a background image matching the target picture according to the background color value D;
    其中,i为[1,m]内的任意整数,C i为所述m种颜色中的第i种颜色的值,f i为C i在所述目标图片中的出现频率。 Wherein, i is any integer within [1, m], C i is the value of the i-th color in the m colors, and f i is the frequency of occurrence of C i in the target picture.
  6. 根据权利要求3所述的方法,其中,所述方法还包括:The method according to claim 3, wherein the method further comprises:
    获取所述显示设备的边框的特征信息;Acquiring characteristic information of the frame of the display device;
    所述根据所述目标图片的图片信息,确定与所述目标图片匹配的背景图像,包括:The determining a background image matching the target picture according to the picture information of the target picture includes:
    基于所述边框的特征信息与所述图片信息,确定与所述目标图片以及所述边框 匹配的背景图像。Based on the characteristic information of the frame and the picture information, a background image that matches the target picture and the frame is determined.
  7. 根据权利要求6所述的方法,其中,所述图片信息包括所述目标图片的代表颜色,所述特征信息包括所述边框的颜色;The method according to claim 6, wherein the picture information includes a representative color of the target picture, and the characteristic information includes the color of the frame;
    所述基于所述边框的特征信息与所述图片信息,确定与所述目标图片以及所述边框匹配的背景图像,包括:The determining a background image matching the target picture and the frame based on the characteristic information of the frame and the picture information includes:
    确定所述边框的颜色与所述代表颜色的中间颜色;Determining an intermediate color between the color of the frame and the representative color;
    基于所述中间颜色确定与所述目标图片以及所述边框匹配的背景图像。Determine a background image matching the target picture and the frame based on the intermediate color.
  8. 根据权利要求7所述的方法,其中,所述代表颜色包括所述目标图片中出现频率最高的m种颜色;所述中间颜色通过以下公式确定:8. The method according to claim 7, wherein the representative colors include m colors with the highest frequency in the target picture; the intermediate colors are determined by the following formula:
    Figure PCTCN2020075654-appb-100002
    Figure PCTCN2020075654-appb-100002
    其中,i为[1,m]内的任意整数,C i为所述m种颜色中的第i种颜色的值,f i为C i在所述目标图片中的出现频率,F为所述边框的颜色的值,E为所述中间颜色的值。 Where i is any integer within [1, m], C i is the value of the i-th color in the m colors, f i is the frequency of occurrence of C i in the target picture, and F is the The value of the color of the border, and E is the value of the middle color.
  9. 根据权利要求5或8所述的方法,其中,所述m种颜色为所述目标图片中出现频率高于预设阈值的颜色。The method according to claim 5 or 8, wherein the m colors are colors in the target picture whose frequency of occurrence is higher than a preset threshold.
  10. 根据权利要求3所述的方法,其中,所述根据所述目标图片的图片信息,确定与所述目标图片匹配的背景图像,包括:The method according to claim 3, wherein the determining a background image matching the target picture according to the picture information of the target picture comprises:
    根据所述目标图片的图片信息,在效果素材库中查找与所述目标图片匹配的背景图像。According to the picture information of the target picture, search for a background image matching the target picture in the effect material library.
  11. 根据权利要求10所述的方法,其中,所述方法还包括:The method according to claim 10, wherein the method further comprises:
    获取多个样本图片和多个背景素材,所述背景素材包括以下任意一种或多种:纯色填充、渐变色填充、纹理填充或图案填充;Acquire multiple sample pictures and multiple background materials, where the background materials include any one or more of the following: solid color filling, gradient color filling, texture filling or pattern filling;
    对于每个样本图片,获取所述样本图片与一个或多个所述背景素材的匹配关系,以构建所述效果素材库。For each sample picture, a matching relationship between the sample picture and one or more of the background materials is obtained to construct the effect material library.
  12. 根据权利要求11所述的方法,其中,所述匹配关系包括匹配度;所述获取多个样本图片和多个背景素材,包括:The method according to claim 11, wherein the matching relationship includes a matching degree; and the obtaining multiple sample pictures and multiple background materials includes:
    从互联网搜索样本图片和背景素材搭配的样例;Search for examples of sample pictures and background materials from the Internet;
    所述对于每个样本图片,获取所述样本图片与一个或多个所述背景素材的匹配关系,以构建所述效果素材库,包括:The acquiring, for each sample picture, the matching relationship between the sample picture and one or more of the background materials to construct the effect material library includes:
    通过对所述样例进行分析,得到每个样本图片与一个或多个所述背景素材的匹配度,以构建所述效果素材库。By analyzing the samples, the degree of matching between each sample picture and one or more of the background materials is obtained to construct the effect material library.
  13. 根据权利要求11所述的方法,其中,所述根据所述目标图片的图片信息,在效果素材库中查找与所述目标图片匹配的背景图像,包括:The method according to claim 11, wherein the searching for a background image matching the target picture in an effect material library according to the picture information of the target picture comprises:
    在所述效果素材库中查找与所述目标图片相同或相似的样本图片,作为目标样 本图片;Search for a sample picture identical or similar to the target picture in the effect material library, as the target sample picture;
    根据所述效果素材库中与所述目标样本图片匹配的背景素材生成所述背景图像。The background image is generated according to the background material matching the target sample picture in the effect material library.
  14. 根据权利要求13所述的方法,其中,所述在所述效果素材库中查找与所述目标图片相同或相似的样本图片,作为目标样本图片,包括:The method according to claim 13, wherein the searching for a sample picture that is the same or similar to the target picture in the effect material library as the target sample picture comprises:
    计算所述目标图片与所述效果素材库中每个样本图片的相似度,将与所述目标图片相似度最高的样本图片作为所述目标样本图片。The similarity between the target picture and each sample picture in the effect material library is calculated, and the sample picture with the highest similarity to the target picture is used as the target sample picture.
  15. 根据权利要求1所述的方法,其中,所述在所述显示区域中显示所述目标图片,并在未显示所述目标图片的未填充区域的至少一个子区域内显示背景图像,包括:The method of claim 1, wherein the displaying the target picture in the display area and displaying a background image in at least one sub-region of an unfilled area where the target picture is not displayed comprises:
    将所述目标图片与所述背景图像合并为新图像,在所述显示区域中显示所述新图像。The target picture and the background image are merged into a new image, and the new image is displayed in the display area.
  16. 一种图片显示装置,应用于显示设备,其中,所述显示设备呈现一显示区域;所述装置包括:A picture display device applied to a display device, wherein the display device presents a display area; the device includes:
    图片获取器,用于获取待显示的目标图片;Picture getter, used to get the target picture to be displayed;
    尺寸检测器,用于检测所述目标图片与所述显示区域的尺寸是否匹配;A size detector for detecting whether the target picture matches the size of the display area;
    第一显示模块,用于如果所述目标图片与所述显示区域的尺寸匹配,则在所述显示区域内显示所述目标图片;A first display module, configured to display the target picture in the display area if the target picture matches the size of the display area;
    第二显示模块,用于如果所述目标图片与所述显示区域的尺寸不匹配且所述目标图片与所述显示区域的重合度低于预设值,则在所述显示区域中显示所述目标图片,并在未显示所述目标图片的未填充区域的至少一个子区域内显示背景图像。The second display module is configured to display the target picture in the display area if the size of the target picture and the display area do not match and the degree of overlap between the target picture and the display area is lower than a preset value. A target picture, and display a background image in at least one sub-region of an unfilled area where the target picture is not displayed.
  17. 一种电子设备,包括:An electronic device including:
    处理器;processor;
    存储器,用于存储所述处理器的可执行指令;以及A memory for storing executable instructions of the processor; and
    显示器,用于呈现一显示区域;The display is used to present a display area;
    其中,所述处理器配置为经由执行所述可执行指令来执行权利要求1-15任一项所述的方法,在所述显示区域内显示所述可执行指令的执行结果。Wherein, the processor is configured to execute the method according to any one of claims 1-15 by executing the executable instruction, and display the execution result of the executable instruction in the display area.
  18. 根据权利要求17所述的电子设备,还包括:The electronic device according to claim 17, further comprising:
    图像传感器,用于获取所述显示器的边框的特征信息。The image sensor is used to obtain characteristic information of the frame of the display.
  19. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现权利要求1-15任一项所述的方法。A computer-readable storage medium with a computer program stored thereon, wherein the computer program is executed by a processor to implement the method of any one of claims 1-15.
PCT/CN2020/075654 2019-04-22 2020-02-18 Picture display method, picture display apparatus, electronic device and storage medium WO2020215861A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910325380.9 2019-04-22
CN201910325380.9A CN110060203A (en) 2019-04-22 2019-04-22 Image display method, image display apparatus, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2020215861A1 true WO2020215861A1 (en) 2020-10-29

Family

ID=67320021

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/075654 WO2020215861A1 (en) 2019-04-22 2020-02-18 Picture display method, picture display apparatus, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN110060203A (en)
WO (1) WO2020215861A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113837928A (en) * 2021-09-17 2021-12-24 平安普惠企业管理有限公司 Object color adjusting method and device, electronic equipment and storage medium
CN114035762A (en) * 2021-11-10 2022-02-11 Tcl华星光电技术有限公司 Spliced screen image display method, related device and storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110060203A (en) * 2019-04-22 2019-07-26 京东方科技集团股份有限公司 Image display method, image display apparatus, electronic equipment and storage medium
CN112529765A (en) * 2019-09-02 2021-03-19 阿里巴巴集团控股有限公司 Image processing method, apparatus and storage medium
CN111047653A (en) * 2019-11-11 2020-04-21 北京奇艺世纪科技有限公司 Dominant hue determination method, device, equipment and readable medium
CN111460929B (en) * 2020-03-17 2022-07-19 稿定(厦门)科技有限公司 Method and device for filling unspecified frame image
CN111526407B (en) * 2020-04-03 2022-05-10 荣耀终端有限公司 Screen content display method and device
CN113660495A (en) * 2021-08-11 2021-11-16 易谷网络科技股份有限公司 Real-time video stream compression method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100185383A1 (en) * 2006-12-20 2010-07-22 Kennedy Brian B System and method for identifying changes on navigation procedure charts
CN106959964A (en) * 2016-01-12 2017-07-18 阿里巴巴集团控股有限公司 Interface background display methods
CN107729099A (en) * 2017-09-25 2018-02-23 联想(北京)有限公司 Background method of adjustment and its system
CN109597664A (en) * 2018-09-21 2019-04-09 北京字节跳动网络技术有限公司 Background configuration method, device, equipment and the readable medium of display area
CN110060203A (en) * 2019-04-22 2019-07-26 京东方科技集团股份有限公司 Image display method, image display apparatus, electronic equipment and storage medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8098261B2 (en) * 2006-09-05 2012-01-17 Apple Inc. Pillarboxing correction
CN101221740B (en) * 2007-01-08 2010-06-09 鸿富锦精密工业(深圳)有限公司 Electronic photo frame
KR101411324B1 (en) * 2007-08-14 2014-06-25 삼성전자주식회사 Method of displaying images and Display apparatus applying the same
CN101521004B (en) * 2008-02-29 2011-12-14 鹏智科技(深圳)有限公司 Electronic device with image processing function and image processing method thereof
CN102077587A (en) * 2008-06-30 2011-05-25 惠普开发有限公司 Compositing video streams
CN103151022A (en) * 2013-01-31 2013-06-12 广东欧珀移动通信有限公司 Method for automatically changing font colors according to background color and system
KR20160074288A (en) * 2014-12-18 2016-06-28 삼성전자주식회사 Display apparatus and the controlling method
CN106294501A (en) * 2015-06-09 2017-01-04 腾讯科技(深圳)有限公司 web animation effect display method and device
CN109254815A (en) * 2018-08-21 2019-01-22 奇酷互联网络科技(深圳)有限公司 Display methods, mobile terminal and the storage medium of display interface
CN109491726B (en) * 2018-11-16 2021-11-09 掌阅科技股份有限公司 Method for presenting open screen file, electronic device and computer storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100185383A1 (en) * 2006-12-20 2010-07-22 Kennedy Brian B System and method for identifying changes on navigation procedure charts
CN106959964A (en) * 2016-01-12 2017-07-18 阿里巴巴集团控股有限公司 Interface background display methods
CN107729099A (en) * 2017-09-25 2018-02-23 联想(北京)有限公司 Background method of adjustment and its system
CN109597664A (en) * 2018-09-21 2019-04-09 北京字节跳动网络技术有限公司 Background configuration method, device, equipment and the readable medium of display area
CN110060203A (en) * 2019-04-22 2019-07-26 京东方科技集团股份有限公司 Image display method, image display apparatus, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113837928A (en) * 2021-09-17 2021-12-24 平安普惠企业管理有限公司 Object color adjusting method and device, electronic equipment and storage medium
CN114035762A (en) * 2021-11-10 2022-02-11 Tcl华星光电技术有限公司 Spliced screen image display method, related device and storage medium

Also Published As

Publication number Publication date
CN110060203A (en) 2019-07-26

Similar Documents

Publication Publication Date Title
WO2020215861A1 (en) Picture display method, picture display apparatus, electronic device and storage medium
US20200186714A1 (en) Estimating hdr lighting conditions from a single ldr digital image
Fang et al. Bottom-up saliency detection model based on human visual sensitivity and amplitude spectrum
KR100667663B1 (en) Image processing apparatus, image processing method and computer readable recording medium which records program therefore
WO2018072271A1 (en) Image display optimization method and device
RU2450476C2 (en) Device and method to determine optimal backlighting
CN111654635A (en) Shooting parameter adjusting method and device and electronic equipment
CN106898026B (en) A kind of the dominant hue extracting method and device of picture
US8094935B2 (en) Representative color extracting method and apparatus based on human color sense and data histogram distributions
WO2017152762A1 (en) Interface color adjustment method and apparatus, and webpage color adjustment method and apparatus
US20140212037A1 (en) Image processing apparatus, image processing method, and computer readable medium
WO2021164550A1 (en) Image classification method and apparatus
JP2011192091A (en) Image attribute determination apparatus, attribute determination support apparatus, image attribute determination method, attribute determination support apparatus control method, and control program
US20230105393A1 (en) Image processing method, image processing device, and computer device
US20220328019A1 (en) Display terminal adjustment method and display terminal
CN113132696B (en) Image tone mapping method, image tone mapping device, electronic equipment and storage medium
US8830251B2 (en) Method and system for creating an image
CN112102422B (en) Image processing method and device
US20150371411A1 (en) Computerized systems and methods for rendering a user interface element
Yu et al. Color scheme adaptation to enhance user experience on smartphone displays leveraging ambient light
CN114512094B (en) Screen color adjusting method, device, terminal and computer readable storage medium
CN113537233B (en) Method and device for extracting typical target material attribute by combining visible light and near infrared information
JP6154545B2 (en) Information processing device
AU2022100086A4 (en) Systems and methods for automatically adjusting design element attributes
KR102215607B1 (en) Electronic device capable of correction to improve the brightness of dark images and operating method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20794411

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20794411

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20794411

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10.05.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20794411

Country of ref document: EP

Kind code of ref document: A1