技术领域technical field
本公开涉及图像显示技术领域,尤其涉及一种图片显示方法、图片显示装置、电子设备以及计算机可读存储介质。The present disclosure relates to the technical field of image display, and in particular, to a picture display method, a picture display device, an electronic device, and a computer-readable storage medium.
背景技术Background technique
在电脑、电子画屏等具备显示屏的电子设备上,经常需要全屏显示图片,例如全屏播放、图片展示、屏幕保护等场景下。然而图片与显示屏的尺寸或比例不匹配的情况也常常出现,目前常用的方法是将图片进行一定的拉伸,使其自适应屏幕的尺寸,但是这样会破坏图片原有的比例,导致图片中物体的失真以及视觉上的不协调,影响图片的美观性。On electronic devices with display screens such as computers and electronic picture screens, it is often necessary to display pictures in full screen, for example, in scenarios such as full screen playback, picture display, and screen saver. However, it often happens that the picture does not match the size or proportion of the display screen. The commonly used 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 and visual inconsistency of the objects in the picture will affect the aesthetics of the picture.
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。It should be noted that the information disclosed in the above Background section is only for enhancement of understanding of the background of the present disclosure, and therefore may contain information that does not form the prior art that is already known to a person 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 overcoming the problem of low aesthetics of the existing picture display method at least to a certain extent.
本公开的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本公开的实践而习得。Other features and advantages of the present disclosure will become apparent from the following detailed description, or be learned in part by 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, where 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 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, display the target picture in the display area; if the target picture does not match the size of the display area, display the target picture in the display area The target image is displayed in the display area, and a background image is displayed in at least one sub-area of the unfilled area around the target image.
在本公开的一种示例性实施例中,所述在所述显示区域中显示所述目标图片,并在所述目标图片周围未填充区域的至少一个子区域内显示背景图像,包括:在所述显示区域中显示所述目标图片,并在所述目标图片周围未填充区域显示所述背景图像,以使所述显示区域被所述目标图片与所述背景图像所填满。In an exemplary embodiment of the present disclosure, the displaying the target picture in the display area, and displaying the background image in at least one sub-area of the unfilled area around the target picture, includes: The target image is displayed in the display area, and the background image is displayed in an unfilled area around the target image, so that the display area is filled with the target image 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 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 appearing in the target picture and the appearance frequency of each color, And at least one color with the highest frequency of occurrence is selected as the representative color of the target picture.
在本公开的一种示例性实施例中,所述方法还包括:获取所述显示设备的边框的特征信息;所述根据所述目标图片的图片信息,确定与所述目标图片匹配的背景图像,包括:基于所述边框的特征信息与所述图片信息,确定与所述目标图片以及所述边框匹配的背景图像。In an exemplary embodiment of the present disclosure, the method further includes: acquiring feature information of the frame of the display device; determining, according to the picture information of the target picture, a background image matching the target picture , comprising: determining a background image matching the target picture and the frame based on the feature 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 feature information includes a color of the frame; the frame-based feature information and the picture information , determining the background image matching the target picture and the frame, including: determining the color of the frame and the middle color of the representative color; determining the frame matching the target picture and the frame based on the middle color. background image.
在本公开的一种示例性实施例中,所述代表颜色包括所述目标图片中出现频率最高的m种颜色;所述中间颜色通过以下公式确定:其中,i为[1,m]内的任意整数,Ci为所述m种颜色中的第i种颜色,fi为Ci在所述目标图片中的出现频率,F为所述边框的颜色,E为所述中间颜色。In an exemplary embodiment of the present disclosure, the representative color includes m colors with the highest frequency in the target picture; the intermediate color is determined by the following formula: Wherein, i is any integer in [1,m], Ci is the ith color among the m colors, fi is the frequency of occurrence of Ci in the target picture, and F is the frame size color, E is the intermediate color.
在本公开的一种示例性实施例中,所述m种颜色为所述目标图片中出现频率高于预设阈值的颜色。In an exemplary embodiment of the present disclosure, the m colors are colors whose frequency of occurrence in the target picture is higher than a preset threshold.
在本公开的一种示例性实施例中,所述根据所述目标图片的图片信息,确定与所述目标图片匹配的背景图像,包括:根据所述目标图片的图片信息,在效果素材库中查找与所述目标图片匹配的背景图像。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 image.
在本公开的一种示例性实施例中,所述方法还包括:获取多个样本图片和多个背景素材,所述背景素材包括以下任意一种或多种:纯色填充、渐变色填充、纹理填充或图案填充;对于每个所述样本图片,获取所述样本图片与一个或多个所述背景素材的匹配关系,以构建所述效果素材库。In an exemplary embodiment of the present disclosure, the method further includes: acquiring 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, obtain the matching relationship between the 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 matching relationship includes a matching degree; the acquiring a plurality of sample pictures and a plurality of background materials includes: searching the Internet for examples of matching sample pictures and background materials; the For each of the sample pictures, acquiring 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, obtaining each of the The degree of matching between the sample image 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 image in the effect material library according to the picture information of the target image includes: searching the effect material library for a background image that matches the target image. A sample image that is the same or similar to the target image is used as the target sample image; the background image is generated according to the background material in the effect material library that matches the target sample image.
在本公开的一种示例性实施例中,所述在所述效果素材库中查找与所述目标图片相同或相似的样本图片,作为目标样本图片,包括:计算所述目标图片与所述效果素材库中每个样本图片的相似度,将与所述目标图片相似度最高的样本图片作为所述目标样本图片。In an exemplary embodiment of the present disclosure, the searching the effect material library for a sample picture that is the same or similar to the target picture 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 with the target picture is used as the target sample picture.
在本公开的一种示例性实施例中,所述在所述显示区域中显示所述目标图片,并在所述目标图片周围未填充区域的至少一个子区域内显示背景图像,包括:将所述目标图片与所述背景图像合并为新图像,在所述显示区域中显示所述新图像。In an exemplary embodiment of the present disclosure, the displaying the target image in the display area and displaying the background image in at least one sub-area of the unfilled area around the target image includes: displaying the target image The target picture and the background image are combined 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, which is applied to a display device, the display device presents a display area, and the device includes: a picture acquisition module for acquiring a target picture to be displayed; a size detection module, for detecting whether the size of the target picture matches the display area; a first display module for displaying the target picture in the display area if the target picture matches the size of the display area The second display module is used to display the target picture in the display area if the size of the target picture does not match with the display area, and at least one subsection of the unfilled area around the target picture A background image is displayed in the 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 around the target picture, so that the The display area is filled with the target picture and the background image.
在本公开的一种示例性实施例中,所述装置还包括:背景确定模块,用于根据所述目标图片的图片信息,确定与所述目标图片匹配的背景图像。In an exemplary embodiment of the present disclosure, the apparatus further includes: a background determination 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 colors appearing in the target picture The category and the frequency of occurrence of each color are selected, and at least one color with the highest frequency of occurrence 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 feature information of the frame of the display device; the background determination module is configured to obtain the frame information based on the frame The feature information and the picture information determine a background image that matches 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 feature information includes a color of the frame; the background determination module includes: an intermediate color determination unit, configured to determining the color of the frame and an intermediate color of the representative color; a background image determining unit, configured to determine a background image matching the target picture and the frame based on the intermediate color.
在本公开的一种示例性实施例中,所述代表颜色包括所述目标图片中出现频率最高的m种颜色;所述中间颜色通过以下公式确定:其中,i为[1,m]内的任意整数,Ci为所述m种颜色中的第i种颜色,fi为Ci在所述目标图片中的出现频率,F为所述边框的颜色,E为所述中间颜色。In an exemplary embodiment of the present disclosure, the representative color includes m colors with the highest frequency in the target picture; the intermediate color is determined by the following formula: Wherein, i is any integer in [1,m], Ci is the ith color among the m colors, fi is the frequency of occurrence of Ci in the target picture, and F is the frame size color, E is the intermediate color.
在本公开的一种示例性实施例中,所述m种颜色为所述目标图片中出现频率高于预设阈值的颜色。In an exemplary embodiment of the present disclosure, the m colors are colors whose frequency of occurrence in the target picture is higher than a preset threshold.
在本公开的一种示例性实施例中,所述背景确定模块,还用于根据所述目标图片的图片信息,在效果素材库中查找与所述目标图片匹配的背景图像。In an exemplary embodiment of the present disclosure, the background determination 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 apparatus further includes a material library construction module, and the material library construction module further includes: a sample acquisition unit, configured to acquire multiple sample pictures and multiple background materials, the The background material includes any one or more of the following: solid color filling, gradient color filling, texture filling or pattern filling; a matching determination unit, configured to, for each of the sample pictures, obtain the sample picture and one or more of the The matching relationship of background materials is used to construct the effect material library.
在本公开的一种示例性实施例中,所述匹配关系包括匹配度;所述样本获取单元,用于从互联网搜索样本图片和背景素材搭配的样例;所述匹配确定单元,用于通过对所述样例进行分析,得到每个所述样本图片与一个或多个所述背景素材的匹配度,以构建所述效果素材库。In an exemplary embodiment of the present disclosure, the matching relationship includes a matching degree; the sample obtaining unit is configured to search the Internet for a sample matched with a sample image and a background material; the matching determining unit is configured to The samples are analyzed to obtain the degree of matching between each of the sample pictures 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 determination module includes: a target sample search unit, configured to search for a sample image that is the same or similar to the target image in the effect material library, as the target sample image ; a background image generating unit, configured 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 search unit is configured to calculate the similarity between the target picture and each sample picture in the effect material library, and the target picture has the highest similarity with the target picture. The sample picture is taken as the target sample picture.
在本公开的一种示例性实施例中,所述第二显示模块,还用于将所述目标图片与所述背景图像合并为新图像,在所述显示区域中显示所述新图像。In an exemplary embodiment of the present disclosure, the second display module is further configured to combine 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, comprising: 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 above 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, the method 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, implements any one of the picture display methods described above.
本公开的示例性实施例具有以下有益效果:Exemplary embodiments of the present disclosure have the following beneficial effects:
在目标图片与显示区域尺寸不匹配时,在目标图片周围的未填充区域添加背景图像的显示,以呈现图片全屏显示的效果,在视觉上具有较强的整体感与和谐感,提高了图片显示的美观性。此外,如果目标图片与显示区域的尺寸匹配则不添加背景图像,从而对不同尺寸的图片采取不同的显示方法,具有较高的灵活性。When the target picture does not match the size of the display area, add a background image display in the unfilled area around the target picture to present the effect of full-screen display of the picture, which has a strong sense of integrity and harmony visually, and improves the picture display. of aesthetics. 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 high flexibility.
在本公开的一种示例性实施例中,根据目标图片的图片信息确定与其匹配的背景图像,可以为不同的图片确定不同的背景图像,从而提高了图片显示的多样性。In an exemplary embodiment of the present disclosure, a background image that matches the target image is determined according to the image information of the target image, and different background images can be determined for different images, thereby improving the diversity of image display.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and for those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.
图1示出相关技术中全屏显示图片的示意图;1 shows a schematic diagram of a full-screen display picture in the related art;
图2示出本示例性实施例中一种图片显示方法的流程步骤图;FIG. 2 shows a flowchart of a method for displaying pictures 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 flowchart 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示出本示例性实施例中另一种用于实现上述方法的电子设备FIG. 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 method in this exemplary embodiment.
具体实施方式Detailed ways
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments, however, can be embodied in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
相关技术的一种方案中,如图1所示,在根据显示屏100的尺寸自适应调节图片110大小时,保留图片110原有的比例,如果图片110比例与显示屏100比例不同,则在图片110外围留出一定的“黑边”120(或“白边”)。这样虽然能够保证图片比例不被破坏,但是图片并非真正完整的全屏显示,“黑边”的存在会影响图片整体的观感,其美观性仍然较低。In a solution of the related art, 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 proportion of the picture 110 is retained. If the proportion of the picture 110 is different from the proportion of the display screen 100, the A certain "black border" 120 (or "white border") is left on the periphery of the picture 110 . Although this can ensure that the proportion of the picture is not destroyed, the picture is not truly complete full-screen display, and the existence of "black borders" will affect the overall look and feel of the picture, and its aesthetics are still low.
鉴于前述的各种问题,本公开的示例性实施例首先提供了一种图片显示方法,可以应用于显示设备,该显示设备呈现一显示区域。本示例性实施例中,显示设备是指具备显示屏的电子设备,例如电脑、手机、智能电视、电子相框、电子画屏等,显示屏中包括显示区域,是指可用于呈现图形用户界面的全部区域。如图2所示,该方法可以包括以下步骤:In view of the aforementioned various problems, 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 picture screen, etc. area. As shown in Figure 2, the method may include the following steps:
步骤S210,获取待显示的目标图片;Step S210, acquiring the 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, then display the target picture in the display area;
步骤S240,如果目标图片与显示区域的尺寸不匹配,则在显示区域中显示目标图片,并在目标图片周围未填充区域的至少一个子区域内显示背景图像。Step S240, if the size of the target image does not match the size of the display area, display the target image in the display area, and display the background image in at least one sub-area of the unfilled area around the target image.
其中,目标图片可以是用户指定的本地图片、从网络上下载的图片或者从其他电子设备上同步(通过有线或无线连接方式传输)得到的图片,本公开对此不做限定。目标图片与显示区域的尺寸匹配是指目标图片可以全屏(或接近于全屏)显示于显示区域中,本示例性实施例中,可以逐步缩放目标图片的大小,直到:目标图片放大到最大尺寸(再放大则可能出现图片模糊的情况),此时如果目标图片与显示区域的重合度低于预设值(例如可以是95%等),则二者尺寸不匹配;或者目标图片的长或宽与显示区域相等,此时如果目标图片与显示区域的重合度低于预设值,则二者尺寸不匹配。当然也可以基于目标图片的原始尺寸或像素信息计算其与显示区域是否匹配。The target picture may be a local picture designated by the user, a picture downloaded from a network, or a picture obtained by synchronization (transmission through a wired or wireless connection) from other electronic devices, which is not limited in the present disclosure. Matching the size of the target picture with the display area means that the target picture can be displayed in the full screen (or close to the full screen) in the display area. 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 coincidence of the target picture and the display area is lower than the preset value (for example, it can be 95%, etc.), the size of the two does not match; or the length or width of the target picture It is equal to the display area. At this time, if the coincidence of the target image and the display area is lower than the preset value, the sizes of the two do not match. Of course, whether the target image matches the display area can also be calculated based on the original size or pixel information of the target image.
如果二者尺寸匹配,则可以全屏显示目标图片,当然如果上述检测匹配时采用95%等预设值作为标准,则显示目标图片后,显示区域内可能剩余5%的未填充区域,其对美观度的影响较小,可以忽略。If the size of the two matches, the target image can be displayed in full screen. Of course, if the above-mentioned matching detection uses a preset value such as 95% as the standard, after the target image is displayed, there may be 5% of the unfilled area left in the display area, which is not good for aesthetics. The influence of degree is small and can be ignored.
如果二者尺寸不匹配,则正常显示目标图片,此时在目标图片的周围还剩余较多的未填充区域。通常为了美观,将目标图片显示于显示区域的正中央,未填充区域可能位于目标图片的四周,也可能位于上下两侧或左右两侧等,当然也可以将目标图片显示于显示区域的一侧,则未填充区域位于另一侧,本公开对此不做限定。未填充区域内可以显示背景图像,背景图像可以是纯色填充、渐变色填充、纹理填充或图案填充等,也可以是多种填充结合的效果,例如渐变色加纹理填充、渐变色加图案填充等。本示例性实施例中,可以在全部的未填充区域内显示背景图像,以使显示区域被目标图片与背景图像所填满,实现完全的全屏显示,也可以在未填充区域的至少一个子区域内显示背景图像,例如背景图像仅位于目标图片的一侧,或者背景图像周围还剩余一定的未填充区域等,从而可以满足特定的显示需要,例如显示区域的边框具有特定造型,配合背景图像以及一部分未填充区域可以呈现特别的效果,或者背景图像具有特定图案,不适合完全填充到未填充区域内等。If the sizes of the two do not match, the target image is displayed normally, and at this time, there are still many unfilled areas around the target image. 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 on the upper and lower sides or on 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 located 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 filled with solid color, gradient color, texture fill or pattern fill, etc., or it can be a combination of various filling effects, such as gradient color plus texture fill, gradient color plus pattern fill, 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 image and the background image, so as to realize a complete full-screen display, or at least one sub-area of the unfilled area can be displayed. The background image is displayed inside, for example, the background image is only on one side of the target image, or there is still a certain unfilled area around the background image, etc., so as to meet specific display needs, for example, the border of the display area has a specific shape, which matches the background image and A part of the unfilled area can have a special effect, or the background image has a specific pattern that is not suitable for filling the unfilled area completely, etc.
在一示例性实施例中,还可以将目标图片与背景图像合并为新图像,在显示区域中显示该新图像,可以直接拼接目标图片与背景图像得到新图像,也可以对二者的边界做一些淡化或虚化处理等,以新图像的方式处理目标图片与背景图像,可以增加整体感,也便于将新图像存储到本地,以供后续使用。In an exemplary embodiment, the target picture and the background image can also be merged into a new image, the new image can be displayed in the display area, the new image can be obtained by directly splicing the target picture and the background image, or the boundary between the two can be made. Some fading or blurring processing, etc., processing the target image and background image in the form of a new image, 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 image 310 and the background image 320 in the display area 300. The target image 310 can be adjusted to any size according to the size of the display area 300, or the original size of the target image 310 can be maintained. The target image 310 The background image 320 can be displayed in the surrounding unfilled area, and the two together form the effect of full-screen display.
在一示例性实施例中,图片显示方法的流程可以如图4所示,其中,在检测目标图片与显示区域的尺寸不匹配后,可以执行步骤S231:根据目标图片的图片信息,确定与目标图片匹配的背景图像。目标图片的图片信息可以指图片风格、颜色分布、颜色组成、色调搭配等多个方面的特征信息,本示例实施方式中,可以根据其中一个或多个方面的图片信息确定背景图像。背景图像与目标图片匹配具体是指背景图像与目标图片在视觉上呈现较强的整体感与和谐感,例如:根据目标图片边缘的颜色分布确定纯色或渐变色填充的背景图像,使得背景图像与目标图片的边缘具有一定的连续性;或者根据目标图片的风格确定与其风格一致或相近的背景图像,使得背景图像在视觉上呈现出目标图片的延伸感;或者根据目标图片的主色调提供多个与其色调匹配的背景图像作为备选,使用户可以从中选择一个作为最终的背景图像。对于不同的目标图片,由于其图片信息不同,可以匹配得到不同的背景图像。在确定背景图像后,可以执行步骤S240,将其与目标图片共同显示于显示区域内。In an exemplary embodiment, the flow of the picture display method can be as shown in FIG. 4 , wherein after detecting that the size of the target picture does not match the size of the display area, step S231 can be executed: according to the picture information of the target picture, determine the size of the target picture and the target picture. The image matches the background image. The picture information of the target picture may refer to the feature information of the picture style, color distribution, color composition, color matching, etc. In this example implementation, the background image may be determined according to the picture information of one or more aspects. The matching between the background image and the target image specifically means that the background image and the target image visually present a strong sense of integrity and harmony. The edge of the target picture has a certain continuity; or a background image that is consistent with or similar to the style of the target picture is determined, so that the background image visually presents a sense of extension of the target picture; or according to the main color of the target picture, multiple A background image that matches its hue is available as an alternative, allowing the user to choose one to use as the final background image. For different target images, different background images can be obtained by matching due to different image information. After the background image is determined, step S240 may be executed to display the background image together with the target image in the display area.
基于上述说明,本示例实施方式在目标图片与显示区域尺寸不匹配时,在目标图片周围的未填充区域添加背景图像的显示,以呈现图片全屏显示的效果,在视觉上具有较强的整体感与和谐感,提高了图片显示的美观性。此外,如果目标图片与显示区域的尺寸匹配则不添加背景图像,从而对不同尺寸的图片采取不同的显示方法,具有较高的灵活性。在本公开的一种示例性实施例中,根据目标图片的图片信息确定与其匹配的背景图像,可以为不同的图片确定不同的背景图像,从而提高了图片显示的多样性。Based on the above description, when the size of the target image does not match the size of the display area, the present exemplary embodiment adds a background image to the unfilled area around the target image, so as to present the effect of full-screen display of the image, which has a strong visual sense of integrity. With the sense of harmony, the aesthetics of the picture display is improved. 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 high flexibility. In an exemplary embodiment of the present disclosure, a background image that matches the target image is determined according to the image information of the target image, and different background images can be determined for different images, thereby improving the diversity of image display.
上述图片信息可以包括目标图片的代表颜色,代表颜色可以是目标图片的背景颜色或主色调的代表颜色等,能够概括性表示目标图片的主要颜色。在一示例性实施例中,代表颜色也可以是目标图片中出现频率最高的颜色,其可以通过以下步骤确定:The above picture information may include a 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 color, etc., which can generally represent the main color 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:
统计目标图片中所出现的颜色种类和每种颜色的出现频率,并选择其中出现频率最高的至少一种颜色,作为目标图片的代表颜色。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.
下面通过几种具体实施方式做进一步说明,但下述内容不应对本公开的保护范围造成限定:The following is further described by several specific embodiments, 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 image to determine the color value of each pixel, for example, it can be RGB color value or HSL color value, and count the types of colors that appear in the image and the number of occurrences of each color, The color that appears the most frequently, that is, the color that appears most frequently, is the representative color of the target image.
(2)同样利用频度序列法统计目标图片中所出现的颜色种类和每种颜色的出现次数,挑选其中出现频率最高、且属于同一色相的若干种颜色,作为代表颜色,或者取其平均值(或加权平均值)得到代表颜色,或者以该色相的主色为代表颜色。(2) The frequency sequence method is also used to count the types of colors that appear in the target picture and the number of occurrences of each color, and select several colors with the highest frequency of occurrence and belonging to the same hue as the representative colors, or take the average value thereof. (or weighted average) to get the representative color, or take the main color of the hue as the representative color.
(3)从目标图片中裁掉中间一定的区域,剩余部分为目标图片的边缘区域,对边缘区域执行上述(1)或(2)的方法。(3) Cut out a certain area in the middle from the target image, and the remaining part is the edge area of the target image, and the method (1) or (2) above is performed 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) Divide the target picture into several sub-regions, for example, it can be divided into 8*8, 16*16, 4*3 or 16*9 sub-regions according to experience. Count the frequency of the various colors of the target image appearing in each sub-area. The frequency refers to how many sub-areas appear a certain color in all sub-areas. For example, if the target image is divided into 16*9=144 sub-areas, There are 102 sub-regions where magenta (R255, G0, B255) appears, and the frequency of magenta 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 representative color, the image filled with the solid color of the representative color can be used as the background image of the target image, and the gradient color filling of the same color system of the representative color or the pattern filling of the same tone can also be used as the background image.
进一步的,如果选择目标图片中出现频率最高的m种颜色作为代表颜色,则步骤S231可以具体通过以下步骤实现:Further, if m colors with the highest frequency of occurrence in the target picture are selected as representative colors, step S231 can be specifically implemented by the following steps:
基于上述m种颜色,通过以下公式(1)确定与目标图片匹配的背景颜色D;Based on the above m colors, determine the background color D that matches the target image by the following formula (1);
根据背景颜色D生成与目标图片匹配的背景图像;Generate a background image matching the target image according to the background color D;
其中,m可以是任意自然数,i为[1,m]内的任意整数,Ci为上述m种颜色中的第i种颜色,fi为Ci在目标图片中的出现频率。公式(1)可看作是将m种颜色的出现频率作为其权重,对m种颜色进行加权平均,得到一个平均色,即背景颜色D,其是对目标图片颜色特征的高度概括。背景图像可以是以背景颜色D的纯色填充、D同色系的渐变色填充、D同色调的图案填充等,本公开对此不做限定。Among them, m can be any natural number, i is any integer in [1, m], Ci is the i-th color among the m colors, and fi is the frequency of Ci in the target image. Formula (1) can be regarded as taking the appearance frequency of m colors as its weight, and weighting the m colors to obtain an average color, that is, the background color D, which is a high degree of generalization of the color characteristics of the target image. The background image may be filled with a solid color of the background color D, filled with a gradient color of the same color of D, filled with a pattern of the same color of D, etc., which is not limited in the present disclosure.
需要说明的是,如果目标图片为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 for each component by formula (1); in HSL mode, the HSL components can be calculated separately , in the grayscale mode, the above calculation can be performed on the grayscale value. In addition, m can be a predetermined value. For example, it is determined to select the 5 or 10 colors with the highest frequency of occurrence in the target picture as the representative colors, or a preset threshold for the frequency of occurrence of colors can be determined, and the frequency of occurrence in the target picture is higher than that of the target picture. 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, then m is 3. This The disclosure does not specifically limit the preset threshold.
在一示例性实施例中,还可以获取显示设备的边框的特征信息,并基于该边框的特征信息与目标图片的图片信息,共同确定与目标图片以及边框匹配的背景图像。In an exemplary embodiment, 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 border refers to the physical border of the display device, and its color or texture is usually the same as the color of the shell of the device. Of course, there are exceptions. The characteristic information of the border can include the color, texture, pattern, shape and other aspects of the border. , which is not limited in the present disclosure. In this example implementation, an image of the frame area can be captured by an external camera to identify the frame features in the image. The external camera can also be replaced by another electronic device with a shooting function, for example, a 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 border is an ordinary solid-color border, its characteristic information mainly includes color, and the color can also be pre-selected by the user to determine the color. The color of the frame selection) or the edge preview (displaying the color selected by the user in the edge area near the border) allows the user to intuitively judge whether the color is consistent with the border color, so that the border color can be accurately selected, which is the default. Border color, if you change the display device or border of other colors later, you can reselect the border color.
在获取边框的特征信息与目标图片的图片信息后,可以根据两方面的信息共同确定背景图像,由于背景图像位于目标图片与边框之间,这样可以得到更加美观的显示效果。本示例性实施例中,可以生成从目标图片到边框的过渡效果,例如由目标图片的代表颜色到边框颜色的渐变色填充,或者考虑到边框与目标图片未处于同一平面上,可以呈现具有立体透视图效果的背景图像,使目标图片与边框的衔接更自然。After acquiring the feature information of the frame and the picture information of the target image, the background image can be jointly determined according to the two information. Since the background image is located between the target image and the frame, a more beautiful display effect can be obtained. In this exemplary embodiment, a transition effect from the target picture to the border can be generated, for example, a gradient color filling from the representative color of the target picture to the border color, or considering that the border and the target picture are not on the same plane, a stereoscopic effect can be presented. The background image of the perspective effect makes the connection between the target image and the border 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 feature information of the border mainly refers to the color of the border, then the color of the border and the middle color of the representative color can be determined, and based on the color of the border The middle color determines the background image that matches the target image.
其中,中间颜色是指介于边框的颜色与目标图片的代表颜色之间的颜色,可以是一个颜色,也可以是一组颜色。在全屏显示图片时,从显示屏的中间到边缘,依次为目标图片、背景图像、边框,为了表现出整体感,可以使背景图像起到从目标图片到边框的过渡作用,因此可以基于中间颜色确定背景图像。举例说明:如果边框颜色与代表颜色属于同一色相,中间颜色可以是上述两颜色之间的一组渐变色,背景图像可以是渐变色填充;如果边框颜色与代表颜色属于不同色相,可以以两颜色的均值得到中间颜色,背景图像可以是以中间颜色为主色,加入边框颜色与代表颜色(或两颜色的近似色)图案的效果;实际应用中,在确定中间颜色后,可以以中间颜色为主色,加入任意的图案形成背景图像。The intermediate color refers to a color between the color of the border and the representative color of the target image, which may be one color or a group of colors. When displaying a picture in full screen, from the middle of the display screen to the edge, the order is the target picture, background image, and border. 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 gradient colors; if the border color and the representative color belong to different hues, two colors can be used. The average value of , obtains the middle color, the background image can be the middle color as the main color, and the effect of adding the border color and the representative color (or the approximate color of the two colors) pattern; in practical applications, after the middle color is determined, the middle color can be used as Main color, add any pattern 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) Using RGB color mode, if the representative color is (R1, G1, B1) and the border color is (R2, G2, B2), the intermediate color can be calculated by formula (2) (including the following three formulas) as ( R3, G3, B3):
其中,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: first average the R, G, and B components representing the color and the frame color, and then mix R, G, and B in different proportions to obtain the intermediate color, a, b, c The value of is the mixing ratio, which can be determined according to experience, and can also be adjusted according to different hues and actual needs. For example, if the representative color and the border color both belong to the green hue, the value of b can be appropriately increased. As shown in the 12-color hue circle in Figure 5, it is usually advisable to use no more than three color combinations, that is, not more than 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 relatively uniform appearance color, such as red + orange red + orange, blue green + blue + blue violet, etc. The above method can be used to determine the intermediate color to achieve this purpose.
(2)如果代表颜色为(R1,G1,B1),边框颜色为(R2,G2,B2),则可以通过公式(3)(包括下面3个公式)计算中间颜色为(R3,G3,B3):(2) If the representative color is (R1, G1, B1) and the border color is (R2, G2, B2), the intermediate color can be calculated by formula (3) (including the following three formulas) as (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的数值。Wherein, neither p nor q is a constant greater than 0, and p+q=1. That is, the intermediate color can be obtained by the weighted average of the representative color and the border color, p and q are the weight values of the representative color and the border color, usually in order to emphasize that the background image matches the target image more, p can be greater than 0.5, of course, it can also be Adjust it 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 value of p can be appropriately reduced if the color represents a low proportion of the target image. .
(3)如果选择目标图片中出现频率最高的m种颜色作为代表颜色,记为C1~Cm,边框颜色为F,则可以通过公式(4)计算中间颜色E:(3) If m colors with the highest frequency in the target image are selected as the representative colors, denoted as C1 ~ Cm , and the border color is F, the intermediate color E can be calculated by formula (4):
换而言之,将目标图片的m种代表颜色与边框颜色F分别求平均,得到m个平均色,再以m种颜色在目标图片中的出现频率f作为权重,对m个平均色进行加权平均,得到中间颜色E。这样的计算方式可以充分考虑到目标图片的颜色分布特征以及边框颜色的影响,得到匹配程度较高的背景图像。In other words, the m representative colors of the target image and the border color F are averaged to obtain m average colors, and then the m average colors are weighted with the frequency f of m colors in the target image as the weight. Averaged to get the intermediate color E. Such a calculation method can fully consider the color distribution characteristics of the target image and the influence of the border color, and obtain a background image with a high degree of matching.
在一示例性实施例中,图片显示方法的流程可以如图6所示:步骤S610,获取目标图片;步骤S620,检测目标图片与显示区域的尺寸是否匹配;步骤S630,如果匹配,则可以正常的全屏显示目标图片,使其恰好充满整个显示区域;步骤S640,如果不匹配,则提取目标图片的代表颜色;步骤S650,同时检测显示设备的边框颜色;步骤S660,根据代表颜色与边框颜色确定中间颜色;步骤S670,再基于中间颜色确定背景图像,背景图像与目标图片及边框是匹配的;步骤S680,将目标图片与背景图像组合显示于显示区域内,从而实现了图片的全屏显示。In an exemplary embodiment, the flow of the picture display method can be as shown in FIG. 6 : step S610, obtaining the target picture; step S620, detecting whether the size of the target picture matches the size of the display area; step S630, if it matches, it can be normal. The full-screen display of the target picture, so that it just fills 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, and the background image matches the target image and the frame; Step S680, combine the target image and the background image to display in the display area, thereby realizing full-screen display of the image.
本公开还提供了另一种关于如何确定背景图像的示例性实施例,具体地,步骤S231可以通过以下步骤实现:The present disclosure also provides another exemplary embodiment on how to determine the background image. Specifically, step S231 may be implemented by the following steps:
根据目标图片的图片信息,在效果素材库中查找与目标图片匹配的背景图像。According to the image information of the target image, look for a background image that matches the target image in the effect material library.
其中,效果素材库是预先构建的一个集合了大量图片与素材之间搭配关系的数据库,例如颜色与颜色之间的搭配、颜色与图案或图片之间的搭配、图片与图案之间的搭配等等。从目标图片中提取图片信息,如代表颜色、边缘颜色等,可以在效果素材库中查找与其匹配的背景图像素材,从而得到背景图像。Among them, the effect material library is a pre-built database that collects the collocation relationship between a large number of pictures and materials, such as the collocation between colors and colors, the collocation between colors and patterns or pictures, the collocation between pictures and patterns, etc. Wait. Extract image information from the target image, 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 picture display method may further include the following steps of constructing an effect material library:
获取多个样本图片和多个背景素材,背景素材包括以下任意一种或多种:纯色填充、渐变色填充、纹理填充或图案填充;Obtain multiple sample images and multiple background materials, the background materials include any one or more of the following: solid color fill, gradient fill, texture fill or pattern fill;
对于每个样本图片,获取该样本图片与一个或多个背景素材的匹配关系,以构建上述效果素材库。For each sample image, the matching relationship between the sample image and one or more background materials is obtained to construct the above-mentioned effect material library.
其中,样本图片是预先收集的大量具有代表性的图片,例如可以包括典型的纯色图片,各种物体的静态图片,水墨画、油画、风景照片、人物肖像等各种风格的典型图片等;当然,根据应用场景的不同,可以缩小样本图片的覆盖范围,例如将本示例性实施例应用于人物自拍照的展示时,可以针对性地收集人物自拍主题的代表性图片,以构建小型的效果素材库。样本图片可以从互联网上搜索得到,也可以从本地或其他数据库中获得,本公开对此不做限定。Among them, the sample pictures are a large number of representative pictures collected in advance, such as typical solid 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 narrowed. For example, when this exemplary embodiment is applied to the display of self-portraits of people, representative pictures of the subject of self-portraits of people can be collected in a targeted manner to build a small effect material library . The sample pictures can be obtained by searching on the Internet, or obtained from local or other databases, which are 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 a certain mechanism, such as changing colors, textures, patterns, etc. 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 the background material, and a series of colors can be formed by changing the hue, saturation, and lightness of the single color. A matching relationship is established between colors, or a matching relationship is established by collecting color matching relationships, and then the colors are mapped to the sample images to obtain the matching relationship between the sample images and the background material, or the user's manual scoring establishes the sample image and the background material. Matching relationship, the matching relationship may include a quantitative representation of whether or not it is matched or the degree of matching. According to the above method, an effect material library can be constructed so as to facilitate the subsequent finding of suitable background images.
在一示例性实施例中,构建效果素材库的步骤可以包括:In an exemplary embodiment, the step of constructing the effect material library may include:
从互联网搜索样本图片和背景素材搭配的样例;Search for samples of sample images and background materials from the Internet;
通过对上述样例进行分析,得到每个样本图片与一个或多个背景素材的匹配度,以构建效果素材库。By analyzing the above samples, the matching degree between each sample image and one or more background materials is obtained, so as to construct an effect material library.
其中,样本图片和背景素材搭配的样例可以包括带边缘效果的图片(边缘效果作为背景素材),带图片镶嵌的海报(海报背景作为背景素材),带图片镶嵌的服装设计(服装底色作为背景素材)等,可以通过爬虫工具从互联网上爬取相关样例信息。在获取样例后,将其中的图片与背景拆分,图片作为样本图片,背景作为背景素材,再基于每个样例的热度、用户好评度、搜索频度等数据,综合分析得到样本图片与背景素材的匹配度,从而构建效果素材库。Among them, examples of collocation of sample pictures and background materials may include pictures with edge effects (edge effects are used as background materials), posters with picture mosaics (poster backgrounds are used as background materials), and clothing designs with picture mosaics (clothing background colors are used as background materials) Background material), etc., relevant sample information can be crawled from the Internet through crawler tools. After obtaining the samples, split the pictures and backgrounds, take the pictures as the sample pictures, and the background as the background material, and then based on the popularity of each sample, user praise, search frequency, etc. The matching degree of the background material to build the effect material library.
基于样本图片而构建的效果素材库,在实际应用中,可以通过以下步骤确定背景图像:The effect material library constructed based on the sample image, in practical application, the background image can be determined by the following steps:
在效果素材库中查找与目标图片相同或相似的样本图片,作为目标样本图片;Find the same or similar sample image as the target image in the effect material library as the target sample image;
根据效果素材库中与目标样本图片匹配的背景素材生成背景图像。Generate a background image based on the background material in the effect material library that matches the target sample image.
其中,可以计算目标图片与效果素材库中每个样本图片的相似度,例如SSIM(Structural Similarity Index,结构相似性)、余弦相似度等,将与目标图片相似度最高的样本图片作为目标样本图片,也可以对样本图片进行多个维度的分类,例如图片风格、代表颜色、主色调等,如果样本图像与目标图片的所有维度信息都相同,或相同的维度数最多,则为目标样本图片。在效果素材库中,查找目标样本图片匹配的背景素材,基于该素材可以进行适当的裁剪、美化、颜色调整等,可以得到背景图像,如果目标样本图片匹配多个背景素材,则可以选择其中匹配度最高的一个,生成背景图像。Among them, the similarity between the target image and each sample image in the effect material library can be calculated, such as SSIM (Structural Similarity Index, structural similarity), cosine similarity, etc., and the sample image with the highest similarity with the target image is used as the target sample image. , the sample image can also be classified in multiple dimensions, such as image style, representative color, main color, etc. If the sample image and the target image have the same dimension information in all dimensions, or the same dimension has the most number, it is the target sample image. In the effect material library, look for the background material that matches the target sample image. Based on this material, you can perform appropriate cropping, beautification, color adjustment, etc., and you can get the background image. If the target sample image matches multiple background materials, you can choose which match. The one with the highest degree, generates the background image.
在一示例性实施例中,图片显示方法的整体流程可以如图7所示:步骤S710,获取目标图片;步骤S720,检测目标图片与显示区域的尺寸是否匹配;步骤S730,如果匹配,则可以正常的全屏显示目标图片,使其恰好充满整个屏幕;步骤S740,如果不匹配,则提取目标图片的图片信息;步骤S750,将目标图片的图片信息输入效果素材库中,然后通过步骤S760或步骤S770确定背景图像;步骤S760,自动查找效果素材库与目标图片匹配的背景图像;步骤S770,用户手动选择合适的背景图像;步骤S780,在确定背景图像后,可以将目标图片与背景图像组合显示于显示区域内。In an exemplary embodiment, the overall flow of the picture display method can be shown in FIG. 7 : step S710, obtaining the target picture; step S720, detecting whether the size of the target picture matches the size of the display area; step S730, if it matches, you can Normal full-screen display of the target picture 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 pass the step S760 or step S750. S770, determine the background image; step S760, automatically search for the background image matching the effect material library and the target image; step S770, the user manually selects a suitable background image; step S780, after determining the background image, the target image and the background image can be combined and displayed in the display area.
在一示例性实施例中,背景图像可以是模拟画卷展开的效果;相应的,步骤S231可以通过以下步骤实现:In an exemplary embodiment, the background image may be an effect of simulating the unfolding of a picture scroll; correspondingly, step S231 may be implemented by the following steps:
根据目标图片的图片信息确定与目标图片匹配的边缘填充效果;Determine the edge filling effect matching the target image according to the image information of the target image;
以边缘填充效果为画卷背景,得到模拟画卷展开的效果。Use the edge filling effect as the background of the scroll to obtain the effect of simulating the unfolding of the scroll.
其中,模拟画卷展开的效果可以如图8中的背景图像820所示,左右两侧为画卷的效果,加上内部的画布填充效果,其与目标图片810共同形成了一幅画卷的视觉感,能够进一步提高美观性。本示例性实施例中,可以根据目标图片的图片信息确定背景填充效果,例如以匹配目标图片的颜色作为主色,添加一定的纹理,形成纸张、画布的填充效果,将其作为画卷背景,两侧添加画卷卷曲的图形,形成最终的背景图像,即模拟画卷展开的效果。当然,也可以在背景图像中增加一些镶嵌、点缀、文字等元素,以得到多样的效果,本公开对此不做特别限定。Among them, the effect of simulating the unfolding of the picture scroll can be shown as the background image 820 in FIG. 8 , the left and right sides are the effect of the picture scroll, plus the inner canvas filling effect, which together with the target picture 810 form a visual sense of a picture scroll, The aesthetics can be further improved. 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 background of the picture scroll. Add the curled graphics on the side to form the final background image, that is, to simulate the effect of the scroll unfolding. Of course, some elements such as mosaic, embellishment, and text may also be added to the background image to obtain various effects, which are not specifically limited in the present disclosure.
在一示例性实施例中,在确定上述背景填充效果时,还可以参考显示设备的边框的颜色,例如在图8中,可以根据显示区域800的边框830的颜色以及目标图片810的图片信息,共同确定背景填充效果(可以参考公式(2)~(4)部分的方法)。In an exemplary embodiment, when determining the above background filling effect, the color of the frame of the display device may also be referred to. For example, in FIG. 8 , according to the color of the frame 830 of the display area 800 and the picture information of the target picture 810, Determine the background filling effect together (refer to the methods in formulas (2) to (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 a book, the effect of simulating a drawing board, and the like can also be used.
本公开的示例性实施例还提供了一种图片显示装置,可以应用于显示设备,显示设备呈现一显示区域。如图9所示,该装置900可以包括:图片获取模块910,用于获取待显示的目标图片;尺寸检测模块920,用于检测目标图片与显示区域的尺寸是否匹配;第一显示模块930,用于如果目标图片与显示区域的尺寸匹配,则在显示区域内显示目标图片;第二显示模块940,用于如果目标图片与显示区域的尺寸不匹配,则在显示区域中显示目标图片,并在目标图片周围未填充区域的至少一个子区域内显示背景图像。Exemplary embodiments of the present disclosure also provide a picture display apparatus, which can be applied to a display device, and the display device presents a display area. As shown in FIG. 9 , the apparatus 900 may include: a picture acquisition module 910 for acquiring a target picture to be displayed; a size detection module 920 for detecting whether the size of the target picture matches the size of the display area; a first display module 930, for displaying the target picture in the display area if the size of the target picture matches the display area; the second display module 940 for displaying the target picture in the display area if the size of the target picture does not match the display area, and A background image is displayed in at least one sub-area of the unfilled area around the target image.
在一示例性实施例中,第二显示模块940可以用于在显示区域中显示目标图片,并在目标图片周围未填充区域显示背景图像,以使显示区域被目标图片与背景图像所填满。In an exemplary embodiment, the second display module 940 may be configured to display the target image in the display area, and display the background image in the unfilled area around the target image, so that the display area is filled with the target image and the background image.
在一示例性实施例中,图片显示装置900还可以包括:背景确定模块,用于根据目标图片的图片信息,确定与目标图片匹配的背景图像。In an exemplary embodiment, the picture display apparatus 900 may further include: a background determination module, configured to determine 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 further include: a picture information obtaining unit for counting the types of colors appearing in the target picture and the appearance 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 obtaining module 910 may further include: a frame information obtaining unit for obtaining feature information of the frame of the display device; Image and background image with matching borders.
在一示例性实施例中,上述图片信息可以包括目标图片的代表颜色,上述特征信息可以包括边框的颜色;背景确定模块可以包括:中间颜色确定单元,用于确定边框的颜色与代表颜色的中间颜色;背景图像确定单元,用于基于中间颜色确定与目标图片以及边框匹配的背景图像。In an exemplary embodiment, the above-mentioned picture information may include the representative color of the target picture, and the above-mentioned feature information may include the color of the frame; the background determination module may include: an intermediate color determination unit for determining the middle of the frame color and the representative color. Color; a background image determination unit, configured to determine a background image matching the target picture and the frame based on the intermediate color.
在一示例性实施例中,上述代表颜色可以包括目标图片中出现频率最高的m种颜色;上述中间颜色可以通过以下公式确定:其中,i为[1,m]内的任意整数,Ci为m种颜色中的第i种颜色,fi为Ci在目标图片中的出现频率,F为边框的颜色,E为中间颜色。In an exemplary embodiment, the above-mentioned representative colors may include m colors that appear most frequently in the target picture; the above-mentioned intermediate colors may be determined by the following formula: Among them, i is any integer in [1,m], Ci is the ith color among m colors, fi is the frequency of Ci in the target image, F is the color of the border, and E is the middle color .
在一示例性实施例中,上述m种颜色为目标图片中出现频率高于预设阈值的颜色。In an exemplary embodiment, the above-mentioned m colors are colors whose appearance frequency in the target picture is higher than a preset threshold.
在一示例性实施例中,背景确定模块还可以用于根据目标图片的图片信息,在效果素材库中查找与目标图片匹配的背景图像。In an exemplary embodiment, the background determination module may be further configured to search for a background image matching the target image in the effect material library according to the image information of the target image.
在一示例性实施例中,图片显示装置900还可以包括素材库构建模块,素材库构建模块又可以包括:样本获取单元,用于获取多个样本图片和多个背景素材,背景素材包括以下任意一种或多种:纯色填充、渐变色填充、纹理填充或图案填充;匹配确定单元,用于对于每个样本图片,获取样本图片与一个或多个背景素材的匹配关系,以构建效果素材库。In an exemplary embodiment, the picture display apparatus 900 may further include a material library building module, and the material library building module may further include: a sample obtaining unit, configured to obtain a plurality of sample pictures and a plurality of background materials, and the background materials include any of the following: One or more: solid color fill, gradient color fill, texture fill or pattern fill; matching determination unit, for each sample image, to obtain the matching relationship between the sample image and one or more background materials to construct 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 the Internet for samples that match the sample pictures and background materials; the matching determination unit may be used to obtain each sample by analyzing the samples. The matching degree of each sample image and one or more background materials to build the effect material library.
在一示例性实施例中,背景确定模块可以包括:目标样本查找单元,用于在效果素材库中查找与目标图片相同或相似的样本图片,作为目标样本图片;背景图像生成单元,用于根据效果素材库中与目标样本图片匹配的背景素材生成背景图像。In an exemplary embodiment, the background determination module may include: a target sample search unit for searching for a sample picture that is the same as or similar to the target picture in the effect material library as the target sample picture; a background image generation unit for A background image is generated from the background material in the effect material library that matches the target sample image.
在一示例性实施例中,目标样本查找单元可以用于计算目标图片与效果素材库中每个样本图片的相似度,将与目标图片相似度最高的样本图片作为目标样本图片。In an exemplary embodiment, the target sample search unit may be configured to calculate the similarity between the target image and each sample image in the effect material library, and use the sample image with the highest similarity with the target image as the target sample image.
在一示例性实施例中,第二显示模块940还可以用于将目标图片与背景图像合并为新图像,在显示区域中显示新图像。In an exemplary embodiment, the second display module 940 may also be configured to combine 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 apparatus have been described in detail in the corresponding method part of the embodiment, and thus will not be repeated.
本公开的示例性实施例还提供了一种能够实现上述方法的电子设备。Exemplary embodiments of the present disclosure also provide an electronic device capable of implementing the above method.
所属技术领域的技术人员能够理解,本公开的各个方面可以实现为系统、方法或程序产品。因此,本公开的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。As will be appreciated by one skilled in the art, various aspects of the present disclosure may be implemented as a system, method or program product. Therefore, various aspects of the present disclosure can be embodied in the following forms: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, which may be collectively referred to herein as implementations "circuit", "module" or "system".
下面参照图10来描述根据本公开的这种示例性实施例的电子设备1000。图10显示的电子设备1000仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。An electronic device 1000 according to such an exemplary embodiment of the present disclosure is described below with reference to FIG. 10 . The electronic device 1000 shown in FIG. 10 is only an example, and should not impose any limitation on the functions 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, wherein 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 To execute any method in this example embodiment by executing the executable instruction, for example, the method steps shown in FIG. 2 , FIG. 3 , FIG. 6 or FIG. 7 can be executed, and the instruction execution result is 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 picture screen, and so on.
在一示例性实施例中,电子设备还可以包括图像传感器,用于获取显示器的边框的特征信息,边框的特征信息用于与目标图片的图片信息共同确定背景图像。图像传感器可以是外接的摄像头,例如电子设备为电子画屏时,可以在其对面的墙壁上设置外接的摄像头,以拍摄电子画屏的边框,得到特征信息。In an exemplary embodiment, the electronic device may further include an image sensor for acquiring characteristic information of the frame of the display, where 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 may be an external camera. For example, when the electronic device is an electronic painting screen, an external camera may be set on the wall opposite to the electronic painting screen to capture the frame of the electronic painting 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 expressed 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 , connecting different system components The bus 1130 and the display unit 1140 (including the storage unit 1120 and the processing unit 1110).
其中,存储单元存储有程序代码,程序代码可以被处理单元1110执行,使得处理单元1110执行本说明书上述“示例性方法”部分中描述的根据本公开各示例实施方式的步骤。The storage unit stores program codes, which can be executed by the processing unit 1110, so that the processing unit 1110 executes the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Methods" 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 1124 having a set (at least one) of program modules 1125 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, An implementation of a network environment may be included in each or some combination of these examples.
总线1130可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。The bus 1130 may be representative of one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any of a variety of 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 (eg, keyboards, pointing devices, Bluetooth devices, etc.), with one or more devices that enable a user to interact with the electronic device 1100, and/or with Any device (eg, router, modem, etc.) that enables the electronic device 1100 to communicate with one or more other computing devices. Such communication may occur through input/output (I/O) interface 1150 . Also, the electronic device 1100 may communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN), and/or a public network such as the Internet) through a network adapter 1160 . As shown, network adapter 1160 communicates with other modules of electronic device 1100 via bus 1130 . It should be understood that, although not shown, other hardware and/or software modules may be used in conjunction with 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 systems.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本公开示例性实施例的方法。From the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein may be implemented by software, or may be implemented by software combined with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure may be embodied in the form of software products, and the software products may be stored in a non-volatile storage medium (which may be CD-ROM, U disk, mobile hard disk, etc.) or on the network , including several instructions to cause a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to an exemplary embodiment of the present disclosure.
本公开的示例性实施例还提供了一种计算机可读存储介质,其上存储有能够实现本说明书上述方法的程序产品。在一些可能的实施方式中,本公开的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当程序产品在终端设备上运行时,程序代码用于使终端设备执行本说明书上述“示例性方法”部分中描述的根据本公开各种示例性实施方式的步骤。Exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which a program product capable of implementing the above-described method of the present specification is stored. In some possible implementations, 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 cause the terminal device to execute the above-mentioned procedures in this specification. Steps according to various exemplary embodiments of the present disclosure are described in the "Example Methods" section.
参考图12所示,描述了根据本公开的示例性实施例的用于实现上述方法的程序产品1200,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本公开的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。Referring to FIG. 12 , a program product 1200 for implementing the above method is described according to an exemplary embodiment of the present disclosure, which can adopt a portable compact disk read only memory (CD-ROM) and include program codes, and can be stored in a terminal devices such as personal computers. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The program product may employ 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, apparatus 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 programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer readable signal medium may include a propagated data signal in baseband or as part of a carrier wave with readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable signal medium can also be any readable medium, other than a readable storage medium, that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。Program code embodied on a readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言的任意组合来编写用于执行本公开操作的程序代码,程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming Language - such as the "C" language or similar programming language. The program code may execute entirely on the user computing device, partly on the user device, as a stand-alone software package, partly on the user computing device and partly on a remote computing device, or entirely on the remote computing device or server execute on. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (eg, using an Internet service provider business via an Internet connection).
此外,上述附图仅是根据本公开示例性实施例的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。In addition, the above-mentioned figures are merely schematic illustrations of the processes included in the methods according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the chronological order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, in multiple modules.
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的示例性实施例,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。It should be noted that although several modules or units of the apparatus for action performance are mentioned in the above detailed description, this division is not mandatory. Indeed, 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 one module or unit described above may be further divided into multiple modules or units to be embodied.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其他实施例。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求指出。Other embodiments of the present disclosure will readily suggest themselves to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or techniques in the technical field not disclosed by the present disclosure . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the disclosure being indicated by the claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910325380.9ACN110060203A (en) | 2019-04-22 | 2019-04-22 | Image display method, image display apparatus, electronic equipment and storage medium |
| PCT/CN2020/075654WO2020215861A1 (en) | 2019-04-22 | 2020-02-18 | Picture display method, picture display apparatus, electronic device and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910325380.9ACN110060203A (en) | 2019-04-22 | 2019-04-22 | Image display method, image display apparatus, electronic equipment and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN110060203Atrue CN110060203A (en) | 2019-07-26 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910325380.9APendingCN110060203A (en) | 2019-04-22 | 2019-04-22 | Image display method, image display apparatus, electronic equipment and storage medium |
| Country | Link |
|---|---|
| CN (1) | CN110060203A (en) |
| WO (1) | WO2020215861A1 (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111047653A (en)* | 2019-11-11 | 2020-04-21 | 北京奇艺世纪科技有限公司 | Dominant hue determination method, device, equipment and readable medium |
| CN111460929A (en)* | 2020-03-17 | 2020-07-28 | 稿定(厦门)科技有限公司 | Method and device for filling unspecified frame image |
| CN111526407A (en)* | 2020-04-03 | 2020-08-11 | 华为技术有限公司 | Display method and device for screen content |
| WO2020215861A1 (en)* | 2019-04-22 | 2020-10-29 | 京东方科技集团股份有限公司 | Picture display method, picture display apparatus, electronic device and storage medium |
| CN112529765A (en)* | 2019-09-02 | 2021-03-19 | 阿里巴巴集团控股有限公司 | Image processing method, apparatus and storage medium |
| CN113660495A (en)* | 2021-08-11 | 2021-11-16 | 易谷网络科技股份有限公司 | Real-time video stream compression method, device, electronic device and storage medium |
| CN113934873A (en)* | 2020-06-29 | 2022-01-14 | 阿里巴巴集团控股有限公司 | A method, device and electronic device for generating multimedia information |
| CN115984420A (en)* | 2021-10-15 | 2023-04-18 | 腾讯数码(天津)有限公司 | Image processing method, device, computer equipment and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113837928A (en)* | 2021-09-17 | 2021-12-24 | 平安普惠企业管理有限公司 | Object color adjustment method, device, electronic device and storage medium |
| CN114035762B (en) | 2021-11-10 | 2024-06-11 | Tcl华星光电技术有限公司 | Spliced screen image display method, related device and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101221740A (en)* | 2007-01-08 | 2008-07-16 | 鸿富锦精密工业(深圳)有限公司 | Digital Photo Frames |
| CN101369414A (en)* | 2007-08-14 | 2009-02-18 | 三星Techwin株式会社 | Method of displaying image and display apparatus using the same |
| CN101521004A (en)* | 2008-02-29 | 2009-09-02 | 鹏智科技(深圳)有限公司 | Electronic device with image processing function and image processing method thereof |
| CN102077587A (en)* | 2008-06-30 | 2011-05-25 | 惠普开发有限公司 | Compositing video streams |
| US20120229489A1 (en)* | 2006-09-05 | 2012-09-13 | Apple Inc. | Pillarboxing Correction |
| CN103151022A (en)* | 2013-01-31 | 2013-06-12 | 广东欧珀移动通信有限公司 | A method and system for automatically changing font color according to background color |
| CN105719591A (en)* | 2014-12-18 | 2016-06-29 | 三星电子株式会社 | Display Apparatus And 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 |
| CN109491726A (en)* | 2018-11-16 | 2019-03-19 | 掌阅科技股份有限公司 | It spreads its tail rendering method, electronic equipment and the computer storage medium of file |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7765060B1 (en)* | 2006-12-20 | 2010-07-27 | The Boeing Company | 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 |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20120229489A1 (en)* | 2006-09-05 | 2012-09-13 | Apple Inc. | Pillarboxing Correction |
| CN101221740A (en)* | 2007-01-08 | 2008-07-16 | 鸿富锦精密工业(深圳)有限公司 | Digital Photo Frames |
| CN101369414A (en)* | 2007-08-14 | 2009-02-18 | 三星Techwin株式会社 | Method of displaying image and display apparatus using the same |
| CN101521004A (en)* | 2008-02-29 | 2009-09-02 | 鹏智科技(深圳)有限公司 | 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 | 广东欧珀移动通信有限公司 | A method and system for automatically changing font color according to background color |
| CN105719591A (en)* | 2014-12-18 | 2016-06-29 | 三星电子株式会社 | Display Apparatus And 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 |
| CN109491726A (en)* | 2018-11-16 | 2019-03-19 | 掌阅科技股份有限公司 | It spreads its tail rendering method, electronic equipment and the computer storage medium of file |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2020215861A1 (en)* | 2019-04-22 | 2020-10-29 | 京东方科技集团股份有限公司 | Picture display method, picture display apparatus, electronic device 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 |
| CN111460929A (en)* | 2020-03-17 | 2020-07-28 | 稿定(厦门)科技有限公司 | Method and device for filling unspecified frame image |
| CN111460929B (en)* | 2020-03-17 | 2022-07-19 | 稿定(厦门)科技有限公司 | Method and device for filling unspecified frame image |
| CN111526407A (en)* | 2020-04-03 | 2020-08-11 | 华为技术有限公司 | Display method and device for screen content |
| CN111526407B (en)* | 2020-04-03 | 2022-05-10 | 荣耀终端有限公司 | Display method and device for screen content |
| CN113934873A (en)* | 2020-06-29 | 2022-01-14 | 阿里巴巴集团控股有限公司 | A method, device and electronic device for generating multimedia information |
| CN113660495A (en)* | 2021-08-11 | 2021-11-16 | 易谷网络科技股份有限公司 | Real-time video stream compression method, device, electronic device and storage medium |
| CN115984420A (en)* | 2021-10-15 | 2023-04-18 | 腾讯数码(天津)有限公司 | Image processing method, device, computer equipment and storage medium |
| Publication number | Publication date |
|---|---|
| WO2020215861A1 (en) | 2020-10-29 |
| Publication | Publication Date | Title |
|---|---|---|
| CN110060203A (en) | Image display method, image display apparatus, electronic equipment and storage medium | |
| CN109618222B (en) | A kind of splicing video generation method, device, terminal device and storage medium | |
| US10452905B2 (en) | System and method for detecting objects in an image | |
| Fang et al. | Bottom-up saliency detection model based on human visual sensitivity and amplitude spectrum | |
| Rizzi et al. | From retinex to automatic color equalization: issues in developing a new algorithm for unsupervised color equalization | |
| US9558591B2 (en) | Method of providing augmented reality and terminal supporting the same | |
| 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 | |
| WO2021164550A1 (en) | Image classification method and apparatus | |
| CN112150347A (en) | Image modification patterns learned from a limited set of modified images | |
| US20150317510A1 (en) | Rating photos for tasks based on content and adjacent signals | |
| CN108351896A (en) | Content file image analysis | |
| US12063335B2 (en) | Image processing method, image processing device, and computer device | |
| CN108416066A (en) | Image searching method, user equipment, storage medium and picture searching device | |
| Zhu et al. | Grey conversion via perceived-contrast | |
| CN114138215A (en) | A display method and related equipment | |
| CN116668838A (en) | Image processing method and electronic equipment | |
| CN115546010B (en) | Image processing method and electronic equipment | |
| EP3161599A1 (en) | Computerized systems and methods for rendering a user interface element | |
| CN110444181A (en) | Display methods, device, terminal and computer readable storage medium | |
| CN113538601B (en) | Image processing method, device, computer equipment and storage medium | |
| CN115908596B (en) | Image processing method and electronic equipment | |
| US20230385980A1 (en) | Generating content adaptive watermarks for digital images | |
| CN112748829B (en) | Picture editing method, device, equipment and storage medium | |
| CN116304396A (en) | Page rendering method, device, electronic device and storage medium |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |