WO2020087968A1 - 一种图片显示方法、图片处理方法及其*** - Google Patents

一种图片显示方法、图片处理方法及其*** Download PDF

Info

Publication number
WO2020087968A1
WO2020087968A1 PCT/CN2019/094978 CN2019094978W WO2020087968A1 WO 2020087968 A1 WO2020087968 A1 WO 2020087968A1 CN 2019094978 W CN2019094978 W CN 2019094978W WO 2020087968 A1 WO2020087968 A1 WO 2020087968A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
background
original
transparent
rgb
Prior art date
Application number
PCT/CN2019/094978
Other languages
English (en)
French (fr)
Inventor
杨波
李政志
Original Assignee
***股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ***股份有限公司 filed Critical ***股份有限公司
Publication of WO2020087968A1 publication Critical patent/WO2020087968A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/14Transformations for image registration, e.g. adjusting or mapping for alignment of images
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present invention relates to a picture processing technology, and in particular to a picture display method, a picture processing method, and a picture processing system that can make necessary adjustments to the background of a picture.
  • the present invention aims to propose a picture display method, a picture processing method, and a picture processing system that can automatically extract the main color as the picture background according to the color form of the picture.
  • a method for realizing the "brand moment” is not found, that is, a method for adaptively adjusting the background (background color) of the picture.
  • the problem to be solved in this article is that, according to the color form of the picture, the main colors are automatically extracted, and the background of the picture is adaptively modified to make the fusion of the picture and the background more natural and coordinated.
  • the logo When applied to the logo, the "brand moment" effect is realized.
  • Time setting steps pre-set the specified time
  • Image processing steps processing the original image to generate the processed image
  • a displaying step displaying the processed picture at the prescribed time and displaying the original picture at a time other than the prescribed time
  • Picture reading step read the original picture
  • a transparency step performing transparency processing on the background of the read original picture to obtain a transparent background picture of the transparent background;
  • a background generation step for the read original picture, extract the main color as the background, and generate a background picture using the main color as the background;
  • the transparent background picture and the background picture are combined to generate a processed picture.
  • the step of transparency includes:
  • Transparency sub-step 1 read the original original image to determine whether it has an alpha channel, if the original image has an alpha channel, it will be recorded as ⁇ 0 , otherwise no processing will be done;
  • Transparency substep 2 Read the RGB value of the original picture and generate a transparent area mask corresponding to the picture information
  • Transparency substep 3 Based on the original alpha channel ⁇ 0 and the calculated mask value of the transparent area, calculate a new alpha channel value ⁇ 1 ;
  • the transparent sub-step 2 includes:
  • Reading said original image RGB values denoted as I rgb, wherein the dimension I rgb (row, col, 3);
  • C s represents the color threshold that needs to be transparent
  • represents the transition smoothness of the transparent area and the opaque area.
  • a new alpha channel value ⁇ 1 is calculated according to the following formula:
  • the main color is extracted based on the RGB three-channel image I rgb of the original image, and a background monochrome image I bg based on the main color is produced,
  • the background generation step includes:
  • the alpha channel ⁇ 0 of the original picture is used as the mask of the picture; otherwise, the mask value is used as the mask value of the picture, where 1 ⁇ means that when the condition is satisfied, 1 is taken, When the condition is not satisfied, 0 is taken, and C ⁇ represents the threshold of the alpha channel;
  • R bg R m * ⁇ + 255 * (1- ⁇ )
  • G bg G m * ⁇ + 255 * (1- ⁇ )
  • the picture I 1 of the transparent background and the background picture I bg are combined according to the following formula to generate the processed picture I:
  • the original picture is a brand logo picture.
  • the computer-readable storage medium of the present invention stores a computer program thereon, which is characterized in that when the program is executed by a processor, the above-mentioned picture display method is realized.
  • the computer device of the present invention includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and is characterized in that the processor realizes the above picture display method when executing the computer program.
  • Picture reading step read the original picture
  • a transparency step performing transparency processing on the background of the read original picture to obtain a transparent background picture of the transparent background;
  • a background generation step for the read original picture, extract the main color as the background, and generate a background picture using the main color as the background;
  • the transparent background picture and the background picture are combined to generate a processed picture.
  • the step of transparency includes:
  • Transparency sub-step 1 read the original original image to determine whether it has an alpha channel, if the original image has an alpha channel, it will be recorded as ⁇ 0 , otherwise no processing will be done;
  • Transparency substep 2 Read the RGB value of the original picture and generate a transparent area mask corresponding to the picture information
  • Transparency substep 3 Based on the original alpha channel ⁇ 0 and the calculated mask value of the transparent area, calculate a new alpha channel value ⁇ 1 ;
  • the transparent sub-step 2 includes:
  • Reading said original image RGB values denoted as I rgb, wherein the dimension I rgb (row, col, 3);
  • C s represents the color threshold that needs to be transparent
  • represents the transition smoothness of the transparent area and the opaque area.
  • a new alpha channel value ⁇ 1 is calculated according to the following formula:
  • the main color is extracted based on the RGB three-channel image I rgb of the original image, and a background monochrome image I bg based on the main color is produced,
  • the background generation step includes:
  • the alpha channel ⁇ 0 of the original picture is used as the mask of the picture; otherwise, the mask value is used as the mask value of the picture, where 1 ⁇ means that when the condition is satisfied, 1 is taken, When the condition is not satisfied, 0 is taken, and C ⁇ represents the threshold of the alpha channel;
  • R bg R m * ⁇ + 255 * (1- ⁇ )
  • G bg G m * ⁇ + 255 * (1- ⁇ )
  • the alpha 1 channel is used to combine the transparent background picture I 1 and the background picture I bg to generate the processed picture I according to the following formula:
  • the original picture is a brand logo picture.
  • Picture reading module used to read original pictures
  • a transparency module configured to perform transparency processing on the background of the original image read by the image reading module to obtain a transparent background image of the transparent background;
  • a background generation module for extracting the main color as the background from the original image read by the image reading module, and generating a background image using the main color as the background;
  • the synthesizing module is used to combine the picture of the transparent background generated by the transparentizing module and the background picture generated by the background generating module to generate the processed picture.
  • the transparent module includes:
  • the first transparency sub-module read the original original image, determine whether it has an alpha channel, if the original image has an alpha channel, it will be recorded as ⁇ 0 , otherwise no processing will be done;
  • the second transparency submodule read the RGB value of the original picture and generate a transparent area mask corresponding to the picture information;
  • the third transparency submodule based on the original alpha channel ⁇ 0 and the calculated mask value of the transparent area, calculate a new alpha channel value ⁇ 1 ;
  • the transparency of the second sub-module reads the RGB values of the original picture, referred to as I rgb, wherein the dimension I rgb (row, col, 3), is calculated for each pixel of RGB and the image, i.e.,
  • C s represents the color threshold value that needs to be transparent
  • represents the transition smoothness of the transparent area and the opaque area.
  • the third transparency submodule calculates a new alpha channel value ⁇ 1 according to the following formula:
  • the background generation module extracts the main color based on the RGB three-channel image I rgb of the original image, and produces a background monochrome image I bg based on the main color,
  • the background generation module
  • the alpha channel ⁇ 0 of the original picture is used as the mask of the picture; otherwise, the mask value is used as the mask value of the picture, where 1 ⁇ means that when the condition is satisfied, 1 is taken, When the condition is not satisfied, 0 is taken, and C ⁇ represents the threshold of the alpha channel;
  • R bg R m * ⁇ + 255 * (1- ⁇ )
  • G bg G m * ⁇ + 255 * (1- ⁇ )
  • the synthesis module uses the ⁇ 1 channel to combine the transparent background picture I 1 and the background picture I bg according to the following formula to generate the processed picture I:
  • the original picture is a brand logo picture.
  • the computer-readable storage medium of the present invention stores a computer program thereon, which is characterized in that the above-mentioned picture processing method is realized when the program is executed by a processor.
  • the computer device of the present invention includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and is characterized in that, when the processor executes the computer program, the above image processing method is realized.
  • the value of the transparent area of the transparent picture to be realized can be automatically calculated according to the color of the picture, and the value of the transparent area and the alpha channel value of the original picture are combined to generate a new
  • the alpha channel of the image can extract the main color of the image, and use the specified transparency to generate the background image with white as the background color according to the color synthesis formula, so that the original image, the new alpha channel, and the new image background are synthesized to form Finally, the background is replaced with a background image similar to the main color.
  • the processed image for example, the logo image of the brand
  • the predetermined time so that it is possible to display a brand image different from the usual at this moment.
  • the brand image displayed at any time can use the main color of the brand image as a background, thereby making the "brand moment" effect more prominent.
  • FIG. 1 is a flowchart showing a picture processing method according to an aspect of the present invention.
  • FIG. 2 is an explanatory diagram for explaining a mask.
  • FIG. 3 is a schematic diagram showing a specific flow of a transparency processing step.
  • FIG. 4 is a schematic diagram showing a specific flow of a background generation step.
  • FIG 5 is an effect diagram showing an image processing method according to an aspect of the present invention.
  • FIG. 6 is a structural block diagram of an image processing system according to an aspect of the present invention.
  • FIG. 7 is a schematic flowchart of a picture display method according to an embodiment of the present invention.
  • the brand logo is used as the processed image as an example for description.
  • the image processing method, image processing system, and image display method of the present invention can be applied to Images other than brand logo images that require similar processing.
  • FIG. 1 is a flowchart showing a picture processing method according to an aspect of the present invention.
  • an image processing method includes the following steps:
  • Picture reading step S100 read original pictures, such as brand logos;
  • Transparency step S200 performing transparency processing on the background of the read original picture to obtain a transparent background picture of the transparent background;
  • Background generation step S300 For the read original picture, extract the main color as the background, and generate a background picture using the main color as the background;
  • Synthesizing step S400 combining the transparent background picture and the background picture to generate a processed picture.
  • the transparency step S200 may be performed first and then the background generation step S300 may be performed, or the background generation step S300 may be performed first and then transparent Step S200, or two steps may be performed separately at the same time.
  • the original picture is read and recorded as I 1
  • the size of the original picture is recorded as (row, col, ch), where row and col are the rows and columns of the corresponding matrix of the picture, that is, the length and width of the picture
  • the size, ch represents the number of channels corresponding to the picture.
  • the value with the transparent alpha channel is 4, and the other values are 3.
  • Alpha is an 8-bit grayscale image channel. This channel uses 256 levels of gray to record transparency information in the image, defining transparent, opaque, and translucent areas, where black means transparent, white means opaque, and gray means translucent.
  • the alpha channel refers to the transparency and translucency of a picture.
  • a picture using 16-bit storage may have 5 bits for red, 5 bits for green, 5 bits for blue, and 1 bit for Alpha channel. In this case, it either means transparent or not.
  • a picture using 32-bit storage each 8 bits represent red, green and blue, and Alpha channel. In this case, not only can it indicate transparency or opacity, but the alpha channel can also indicate 256 levels of translucency.
  • any selection can be stored as a mask. You can edit the alpha channel, add or remove colors, and specify settings for mask colors and opacity. In layman's terms, it is the transparency effect in the picture above.
  • the unselected area When a part of an image is selected, the unselected area will be "masked” or protected from editing. Therefore, after creating a mask, when you want to change the color of an area of an image, or apply filters or other effects to that area, you can isolate and protect the rest of the image. You can also use masks for complex image editing, such as gradually applying colors or filter effects to the image.
  • FIG. 2 is an explanatory diagram for explaining a mask.
  • A represents an opaque mask used to protect the background and edit the "butterfly”
  • B is an opaque mask used to protect the "butterfly” and color the background.
  • FIG. 3 is a schematic diagram showing a specific flow of a transparency processing step.
  • the transparent step S200 specifically includes:
  • step S201 for the read original image, determine whether there is an alpha channel, if it is determined to be yes, then continue to step S202, in step S202 extract the alpha channel value and recorded as ⁇ 0 , on the other hand, If the judgment is no, if there is no alpha channel, no processing is performed.
  • step S203 the reading of the original image to extract the RGB channels, i.e., the read RGB values of the original picture, referred to as I rgb, wherein the dimension I rgb (row, col, 3), wherein, since R , G and B respectively represent single color values, so their dimensions only contain 2 dimensions, and the number of channels after combining is 3.
  • represents the transition smoothness of the transparent area and the opaque area.
  • a new alpha channel value ⁇ 1 is calculated, specifically, based on the original alpha channel and the calculated mask of the transparent area Value, calculate the new alpha channel value ⁇ 1 according to the following formula:
  • FIG. 4 is a schematic diagram showing a specific flow of a background generation step.
  • step S301 it is judged whether the picture contains an alpha channel. If the judgment is yes, the picture alpha channel is saved as ⁇ 0 and the picture RGB channel is saved as Irgb . If the judgment is no, no action Any processing.
  • step S302 for reading the original RGB image extraction channel, i.e., the extracted RGB image values, referred to as I rgb, wherein the dimension I rgb (row, col, 3), wherein, due to the R, G, B Respectively represent single-color values, so their dimensions only contain 2 dimensions, and the number of channels after combining is 3.
  • step S303 when the picture I 1 contains an alpha channel, use ⁇ 0 to calculate the mask of the picture; otherwise, use the mask value as the picture mask in step S304,
  • step S306 the color distribution is calculated according to the effective RGB values and the histogram statistics or clustering algorithm is used to extract the main colors of the picture (R m , G m , B m ) from the effective color information I new .
  • a monochromatic background picture I bg is made using the extracted main colors, with white as the base color and transparency as ⁇ , then the R bg , G bg and B bg components of the background picture I bg are:
  • R bg R m * ⁇ + 255 * (1- ⁇ )
  • G bg G m * ⁇ + 255 * (1- ⁇ )
  • the transparent background image generated in the transparency step S200 and the background image generated in the background generation step S300 are combined to generate the processed image, specifically using the ⁇ 1 channel, the transparent background image I 1 and the The picture I after the background picture I bg is merged and generated:
  • FIG. 5 is an effect diagram showing an image processing method according to an aspect of the present invention.
  • Figure (a) and Figure (c) represent the original picture
  • Figure (b) is the picture processed by the picture processing method of one aspect of the present invention
  • Figure (d) is the picture (c)
  • the processed picture is processed by the picture processing method of one aspect of the present invention.
  • Figure (a) shows the UnionPay logo image, and its background part A is light gray.
  • the main color (blue) of the UnionPay logo image is extracted.
  • the background part A 'of the logo picture after processing shown changes to light blue.
  • Figure (c) shows several pictures of red flowers, and the background part A is light gray.
  • the main color (red) of the flower pattern is extracted, as shown in ( d)
  • the background part A 'of the processed flower picture shown changes to light red.
  • FIG. 6 is a structural block diagram of an image processing system according to an aspect of the present invention.
  • an image processing system is characterized by including:
  • Picture reading module 100 used to read original pictures
  • a transparency module 200 configured to perform transparency processing on the background of the original picture read by the picture reading module 100 to obtain a transparent background picture of the transparent background;
  • the background generation module 300 is configured to extract the main color as the background of the original image read by the image reading module 100, and generate a background image using the main color as the background;
  • the synthesizing module 400 is configured to combine the transparent background image generated by the transparentization module 200 and the background image generated by the background generation module 300 to generate a processed image.
  • the picture reading module 100 reads the original picture and records it as I 1 , and records the size of the original picture as (row, col, ch), where row and col are the rows and columns of the corresponding matrix of the picture, that is, the length and width of the picture , Ch indicates the number of channels corresponding to the picture.
  • the transparent module 200 includes:
  • the first transparentization sub-module 210 read the original original image to determine whether it has an alpha channel, if the original image has an alpha channel, it is recorded as ⁇ 0 , otherwise no processing is performed;
  • the second transparency sub-module 220 read the RGB value of the original picture and generate a transparent area mask corresponding to the picture information;
  • the third transparency sub-module 230 based on the original alpha channel ⁇ 0 and the calculated mask value of the transparent area, calculate a new alpha channel value ⁇ 1 ;
  • the second transparent sub-module 220 reads the RGB values of the original picture, referred to as I rgb, wherein the dimension I rgb (row, col, 3), is calculated for each pixel of RGB and the image, i.e., color
  • I rgb row, col, 3
  • C s represents the color threshold that needs to be transparent
  • represents the transition smoothness of the transparent area and the opaque area.
  • the third transparency sub-module 230 calculates a new alpha channel value ⁇ 1 based on the original alpha channel and the calculated mask value of the transparent area according to the following formula:
  • the background generation module 300 extracts the main color based on the RGB three-channel image I rgb of the original image, and produces a background monochrome image I bg based on the main color,
  • the background generation module
  • the alpha channel ⁇ 0 of the original picture is used as the mask of the picture; otherwise, the mask value is used as the mask value of the picture, where 1 ⁇ means that when the condition is satisfied, 1 is taken, When the condition is not satisfied, 0 is taken, and C ⁇ represents the threshold of the alpha channel;
  • R bg R m * ⁇ + 255 * (1- ⁇ )
  • G bg G m * ⁇ + 255 * (1- ⁇ )
  • the synthesis module 400 uses the ⁇ 1 channel to combine the transparent background picture I 1 and the background picture I bg according to the following formula to generate the processed picture I:
  • the original picture is a brand logo picture.
  • Embodiment 1 is a picture processing method for processing pictures in PNG format
  • Embodiment 2 is a picture processing method for processing pictures in JPG format.
  • the image processing method of Embodiment 1 includes the following steps:
  • Picture reading step read the original PNG format picture
  • Transparency step Translate the background of the read original PNG format image to obtain a transparent background image
  • Background generation step For the read original PNG format image, extract the main color as the background and generate a background image using the main color as the background;
  • Synthesizing step combining the transparent background picture and the background picture to generate a processed picture.
  • the picture reading step read the original picture and record it as I 1 , and record the size of the original picture as (row, col, ch), where row and col are the rows and columns of the corresponding matrix of the picture, that is, the length and width of the picture , Ch indicates the number of channels corresponding to the picture.
  • the PNG format picture is with a transparent alpha channel, and its CH value is 4.
  • the transparency step specifically includes:
  • represents the transition smoothness of the transparent area and the opaque area
  • the new alpha channel value ⁇ 1 is calculated according to the following formula:
  • ⁇ 1 mask bg + mask value * ⁇ 0 ;
  • R bg R m * ⁇ + 255 * (1- ⁇ )
  • G bg G m * ⁇ + 255 * (1- ⁇ )
  • the transparent background image I 1 and Picture I after the background picture I bg is merged and generated:
  • the image processing method of Embodiment 2 includes the following steps:
  • Picture reading step read the original JPG format picture
  • Transparency step Transparency the background of the read original JPG format picture to obtain a transparent background picture
  • Background generation step For the read original JPG format image, extract the main color as the background and generate a background image using the main color as the background;
  • Synthesizing step combining the transparent background picture and the background picture to generate a processed picture.
  • the picture reading step read the original picture and record it as I 1 , and record the size of the original picture as (row, col, ch), where row and col are the rows and columns of the corresponding matrix of the picture, ie the length and width of the picture , Ch indicates the number of channels corresponding to the picture.
  • the picture in JPG format does not have a transparent alpha channel, and its CH value is 3.
  • the transparency step specifically includes:
  • the RGB channel is extracted for reading the original JPG format image, that is, the RGB value of the original image is read and recorded as I rgb , where the dimension of I rgb is (row, col, 3), where, because R, G, and B respectively represent single color values, so their dimensions only contain 2 dimensions, and the number of channels after combining is 3.
  • the JPG format does not have an alpha channel, steps equivalent to steps S201 and S202 in the above embodiment are omitted here;
  • represents the transition smoothness of the transparent area and the opaque area.
  • ⁇ 1 mask bg + mask value * 255.
  • R bg R m * ⁇ + 255 * (1- ⁇ )
  • G bg G m * ⁇ + 255 * (1- ⁇ )
  • the transparent background image I 1 and Picture I after the background picture I bg is merged and generated:
  • the main improvement of this embodiment is that the pictures processed by the picture processing method of the above embodiment are displayed at a preset prescribed time, and the original picture is displayed outside the prescribed time.
  • FIG. 7 is a schematic flowchart of a picture display method according to an embodiment of the present invention.
  • the image display method of this embodiment includes the following steps:
  • Time setting step S10 set a predetermined time in advance
  • Image processing step S20 processing the original image to generate the processed image
  • Display step S30 displaying the processed picture at the specified time and displaying the original picture at a time other than the specified time
  • the picture processing step S20 includes:
  • Picture reading step read the original picture
  • a transparency step performing transparency processing on the background of the read original picture to obtain a transparent background picture of the transparent background;
  • a background generation step for the read original picture, extract the main color as the background, and generate a background picture using the main color as the background;
  • the transparent background picture and the background picture are combined to generate a processed picture.
  • the picture reading step, the transparency step, the background generation step, and the synthesis step here are the same as the picture reading step S100, the transparency step S200, the background generation step S300, and the synthesis step S400 described in the previous embodiment, and the description is omitted here.
  • the original picture is a brand identity picture (ie logo picture).
  • a processed picture for example, a logo picture of a brand
  • a prescribed time a processed picture (for example, a logo picture of a brand) is displayed at a prescribed time, thereby being able to display a brand picture different from usual at the prescribed time
  • the brand image displayed in the predetermined time is based on the main color of the brand image as the background, which can particularly highlight the "brand moment" effect.
  • the invention also provides a computer-readable storage medium on which a computer program is stored, which is characterized in that the above-mentioned picture processing method is realized when the program is executed by a processor.
  • the present invention also provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the above-mentioned image processing method when executing the computer program .
  • the value of the transparent area of the transparent picture to be realized can be automatically calculated according to the color of the picture, and the value of the transparent area and the alpha channel value of the original picture are combined to generate a new
  • the alpha channel of the image can extract the main color of the image, and use the specified transparency to generate the background image with white as the background color according to the color synthesis formula, so that the original image, the new alpha channel, and the new image background are synthesized to form Finally, the background is replaced with a background image similar to the main color.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Color Image Communication Systems (AREA)
  • Image Analysis (AREA)

Abstract

本发明涉及一种图片显示方法及其***。该方法包括:时间设定步骤,预先设定规定时间;图片处理步骤,对原始图片进行处理,生成处理后的图片;以及显示步骤,在规定时间显示处理后的图片,在规定时间以外的时间显示原始图片,其中,图片处理步骤包括:读取原始图片;对于读取的原始图片的背景进行透明化处理得到透明背景的图片;对于读取的原始图片,提取主要颜色作为背景,生成使用主要颜色作为背景的背景图片;以及,将透明背景的图片和所述背景图片进行合并生成处理后的图片。根据本发明,如上所述,能够根据图片颜色,自动计算待实现透明图片的透明区域取值,能够提取图片主色,形成最终将背景替换为与主色相似的背景图。

Description

一种图片显示方法、图片处理方法及其*** 技术领域
本发明涉及图片处理技术,具体地涉及一种能够对图片的背景进行需要的调整的图片显示方法、图片处理方法以及图片处理***。
背景技术
在现有技术中,对于品牌的标识(logo)一般直接进行显示并没有进行任何特殊的处理。
发明内容
鉴于所述问题,本发明旨在提出一种能够根据图片的颜色形态并自动提取其主要颜色作为图片背景的图片显示方法、图片处理方法以及图片处理***。
当前技术中并未找到一种实现“品牌时刻”的方法,即一种自适应调整图片背景(底色)的方法。本文要解决的问题是,根据图片的颜色形态,自动提取其主要颜色、并自适应修改图片背景,使得图片与背景融合更自然、更协调。当应用于logo时,实现“品牌时刻”效果。
本发明的图片显示方法,其特征在于,包括下述步骤:
时间设定步骤,预先设定规定时间;
图片处理步骤,对原始图片进行处理,生成处理后的图片;以及
显示步骤,在所述规定时间显示所述处理后的图片,在所述规定时间以外的时间显示原始图片,
其中,所述图片处理步骤包括:
图片读取步骤,读取原始图片;
透明化步骤,对于读取的所述原始图片的背景进行透明化处理 得到透明背景的透明背景的图片;
背景生成步骤,对于读取的所述原始图片,提取主要颜色作为背景,生成使用主要颜色作为背景的背景图片;以及
合成步骤,将所述透明背景的图片和所述背景图片进行合并以生成处理后的图片。
可选地,在所述透明化步骤中包括:
透明化子步骤1:读取所述原始原图,判断是否具有alpha通道,若原始图片具有alpha通道则记为α 0,否则不做处理;
透明化子步骤2:读取所述原始图片的RGB值并生成与图片信息对应的透明区域蒙版;
透明化子步骤3:基于原alpha通道α 0和计算出的透明区域的蒙版值,计算新的alpha通道值α 1;以及
透明化子步骤4:组合所述原始图片的RGB值以及所述新的alpha通道值α 1生成透明背景的图片I 1=(R,G,B,α 1)。
可选地,在所述透明化子步骤2中包括:
读取所述原始图片的RGB值,记为I rgb,其中I rgb的维度为(row,col,3);
计算图片各像素RGB之和,即颜色值之和S为:S=R+G+B并计算有效颜色区域的蒙版为:
Figure PCTCN2019094978-appb-000001
其中C s表示需要透明化的颜色阈值,并且,透明部分的蒙版为mask transparent=1-mask value;以及
采用颜色值之和S和透明部分蒙版mask transparent按照下式计算透明区域的蒙版值为:
Figure PCTCN2019094978-appb-000002
其中,β表示透明区域与不透明区域的过渡平滑度。
可选地,在所述透明化子步骤3中包括:基于原alpha通道和 计算出的透明区域的蒙版值,按照下式计算新的alpha通道值α 1
Figure PCTCN2019094978-appb-000003
可选地,在所述背景生成步骤中,以原图的RGB三通道图I rgb为基础提取主色,并制作以主色为基础的背景单色图片I bg
其中,所述背景生成步骤包括:
读取所述原始原图,判断是否具有alpha通道,若原始图片具有alpha通道则记为α 0,并保存原始图片的RGB通道为I rgb
利用下述公式计算图片有效颜色区域的蒙版值mask:
Figure PCTCN2019094978-appb-000004
即,当原始图片包含alpha通道时,使用原始图片的alpha通道α 0作为图片的蒙版;否则,使用mask value作为图片的蒙版值,其中,1{}表示,当满足条件时取1,条件不满足时取0,C α表示alpha通道的阈值;
提取有效区域RGB值,即使用mask rgb筛选I rgb,保存有效颜色信息为I new=I rgb[mask rgb],其中符号[]表示筛选,当[]中条件满足时保留值,当[]中条件不满足时不保留;
采用直方图统计或聚类算法,对有效颜色信息I new提取图片主要颜色(R m,G m,B m);以及
采用提取出的主要颜色制作单色背景图片I bg,其中以白色为底色,透明度为τ,则背景图片I bg的R bg、G bg、B bg分量为:
R bg=R m*τ+255*(1-τ)
G bg=G m*τ+255*(1-τ)
B bg=B m*τ+255*(1-τ)。
可选地,在所述合成步骤中,利用α1通道,按照下述公式将所述透明背景的图片I 1和所述背景图片I bg进行合并生成处理后的图片I:
Figure PCTCN2019094978-appb-000005
可选地,所述原始图片为品牌标识图片。
本发明的计算机可读存储介质,其上存储计算机程序,其特征在于,该程序被处理器执行时实现如上所述的图片显示方法。
本发明的计算机设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现上述的图片显示方法。
本发明的图片处理方法,其特征在于,包括下述步骤:
图片读取步骤,读取原始图片;
透明化步骤,对于读取的所述原始图片的背景进行透明化处理得到透明背景的透明背景的图片;
背景生成步骤,对于读取的所述原始图片,提取主要颜色作为背景,生成使用主要颜色作为背景的背景图片;以及
合成步骤,将所述透明背景的图片和所述背景图片进行合并生成处理后的图片。
可选地,在所述透明化步骤中包括:
透明化子步骤1:读取所述原始原图,判断是否具有alpha通道,若原始图片具有alpha通道则记为α 0,否则不做处理;
透明化子步骤2:读取所述原始图片的RGB值并生成与图片信息对应的透明区域蒙版;
透明化子步骤3:基于原alpha通道α 0和计算出的透明区域的蒙版值,计算新的alpha通道值α 1;以及
透明化子步骤4:组合所述原始图片的RGB值以及所述新的alpha通道值α 1生成透明背景的图片I 1=(R,G,B,α 1)。
可选地,在所述透明化子步骤2中包括:
读取所述原始图片的RGB值,记为I rgb,其中I rgb的维度为(row,col,3);
计算图片各像素RGB之和,即颜色值之和S为:S=R+G+B并计算有效颜色区域的蒙版为:
Figure PCTCN2019094978-appb-000006
其中C s表示需要透明化的颜色阈值,并且,透明部分的蒙版为mask transparent=1-mask value;以及
采用颜色值之和S和透明部分蒙版mask transparent按照下式计算透明区域的蒙版值为:
Figure PCTCN2019094978-appb-000007
其中,β表示透明区域与不透明区域的过渡平滑度。
可选地,在所述透明化子步骤3中包括:基于原alpha通道和计算出的透明区域的蒙版值,按照下式计算新的alpha通道值α 1
Figure PCTCN2019094978-appb-000008
可选地,在所述背景生成步骤中,以原图的RGB三通道图I rgb为基础提取主色,并制作以主色为基础的背景单色图片I bg
其中,所述背景生成步骤包括:
读取所述原始原图,判断是否具有alpha通道,若原始图片具有alpha通道则记为α 0,并保存原始图片的RGB通道为I rgb
利用下述公式计算图片有效颜色区域的蒙版值mask:
Figure PCTCN2019094978-appb-000009
即,当原始图片包含alpha通道时,使用原始图片的alpha通道α 0作为图片的蒙版;否则,使用mask value作为图片的蒙版值,其中,1{}表示,当满足条件时取1,条件不满足时取0,C α表示alpha通道的阈值;
提取有效区域RGB值,即使用mask rgb筛选I rgb,保存有效颜色信息为I new=I rgb[mask rgb],其中符号[]表示筛选,当[]中条件满足时保留值,当[]中条件不满足时不保留;
采用直方图统计或聚类算法,对有效颜色信息I new提取图片主要颜色(R m,G m,B m);以及
采用提取出的主要颜色制作单色背景图片I bg,其中以白色为底色,透明度为τ,则背景图片I bg的R bg、G bg、B bg分量为:
R bg=R m*τ+255*(1-τ)
G bg=G m*τ+255*(1-τ)
B bg=B m*τ+255*(1-τ)。
可选地,在所述合成步骤中,利用α 1通道,按照下述公式将所述透明背景的图片I 1和所述背景图片I bg进行合并生成处理后的图片I:
Figure PCTCN2019094978-appb-000010
可选地,所述原始图片为品牌标识图片。
本发明的图片处理***,其特征在于,包括:
图片读取模块,用于读取原始图片;
透明化模块,用于对于所述图片读取模块读取的所述原始图片的背景进行透明化处理得到透明背景的透明背景的图片;
背景生成模块,用于对于所述图片读取模块读取的所述原始图片,提取主要颜色作为背景,生成使用主要颜色作为背景的背景图片;以及
合成模块,用于将所述透明化模块生成的所述透明背景的图片和所述背景生成模块生成的所述背景图片进行合并生成处理后的图片。
可选地,在所述透明化模块中包括:
第1透明化子模块:读取所述原始原图,判断是否具有alpha通道,若原始图片具有alpha通道则记为α 0,否则不做处理;
第2透明化子模块:读取所述原始图片的RGB值并生成与图片信息对应的透明区域蒙版;
第3透明化子模块:基于原alpha通道α 0和计算出的透明区域的蒙版值,计算新的alpha通道值α 1;以及
第4透明化子模块:组合所述原始图片的RGB值以及所述新的alpha通道值α 1生成透明背景的图片I 1=(R,G,B,α 1)。
可选地,所述第2透明化子模块读取所述原始图片的RGB值,记为I rgb,其中I rgb的维度为(row,col,3),计算图片各像素RGB之和,即颜色值之和S为:S=R+G+B并计算有效颜色区域的蒙版为:
Figure PCTCN2019094978-appb-000011
其中,C s表示需要透明化的颜色阈值,并且,透明部分的蒙版为mask transparent=1-mask value
采用颜色值之和S和透明部分蒙版mask transparent按照下式计算透明区域的蒙版值为:
Figure PCTCN2019094978-appb-000012
其中,β表示透明区域与不透明区域的过渡平滑度。
可选地,所述第3透明化子模块基于原alpha通道和计算出的透明区域的蒙版值,按照下式计算新的alpha通道值α 1
Figure PCTCN2019094978-appb-000013
可选地,所述背景生成模块以原图的RGB三通道图I rgb为基础提取主色,并制作以主色为基础的背景单色图片I bg
其中,所述背景生成模块
读取所述原始原图,判断是否具有alpha通道,若原始图片具有alpha通道则记为α 0,并保存原始图片的RGB通道为I rgb
利用下述公式计算图片有效颜色区域的蒙版值mask:
Figure PCTCN2019094978-appb-000014
即,当原始图片包含alpha通道时,使用原始图片的alpha通道α 0作为图片的蒙版;否则,使用mask value作为图片的蒙版值,其中,1{}表示,当满足条件时取1,条件不满足时取0,C α表示alpha通道的阈值;
提取有效区域RGB值,即使用mask rgb筛选I rgb,保存有效颜色信息为I new=I rgb[mask rgb],其中符号[]表示筛选,当[]中条件满足时保留值,当[]中条件不满足时不保留;
采用直方图统计或聚类算法,对有效颜色信息I new提取图片主要颜色(R m,G m,B m);以及
采用提取出的主要颜色制作单色背景图片I bg,其中以白色为 底色,透明度为τ,则背景图片I bg的R bg、G bg、B bg分量为:
R bg=R m*τ+255*(1-τ)
G bg=G m*τ+255*(1-τ)
B bg=B m*τ+255*(1-τ)。
可选地,所述合成模块利用α 1通道,按照下述公式将所述透明背景的图片I 1和所述背景图片I bg进行合并生成处理后的图片I:
Figure PCTCN2019094978-appb-000015
可选地,所述原始图片为品牌标识图片。
本发明的计算机可读存储介质,其上存储计算机程序,其特征在于,该程序被处理器执行时实现上述的图片处理方法。
本发明的计算机设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现上述的图片处理方法。
如上所述,在本发明的图片处理方法以及图片处理***中,能够根据图片颜色,自动计算待实现透明图片的透明区域取值,并将透明区域的取值与原图片alpha通道值合并生成新的alpha通道,另一方面,能够提取图片主色,并根据颜色合成公式,使用规定的透明度,以白色为底色生成背景图片,这样将原图片、新alpha通道、新的图片背景合成,形成最终将背景替换为与主色相似的背景图。
而且,根据本发明的图片处理方法以及图片处理***,通过设置规定时间,在规定时间显示经过处理的图片(例如品牌的logo图片),由此能够在该时刻显示不同于平时的品牌图片,该时刻显示的品牌图片能够以品牌图片的主色调作为背景,由此能够更加凸显“品牌时刻”效果。
附图说明
图1是表示本发明一方面的图片处理方法的流程图。
图2是表示用于说明蒙版的说明图。
图3是表示透明化处理步骤的具体流程的示意图。
图4是表示背景生成步骤的具体流程的示意图。
图5是表示本发明一方面的图片处理方法的效果图。
图6是本发明一方面的图片处理***的结构框图。
图7是本发明一实施方式的图片显示方法的流程示意图。
具体实施方式
下面介绍的是本发明的多个实施例中的一些,旨在提供对本发明的基本了解。并不旨在确认本发明的关键或决定性的要素或限定所要保护的范围。
在以下的说明中作为被处理的图片采用品牌标识为例进行说明,本领域技术人员可以明了处理品牌标识图片以外,本发明的图片处理方法以及图片处理***及其图片显示方法等能够适用于除了品牌标识图片之外的其他需要进行类似处理的图片。
首先,对于本发明的图片处理方法进行说明。
图1是表示本发明一方面的图片处理方法的流程图。
如图1所示,本发明的一方面的图片处理方法包括下述步骤:
图片读取步骤S100:读取原始图片,例如品牌标识;
透明化步骤S200:对于读取的所述原始图片的背景进行透明化处理得到透明背景的透明背景的图片;
背景生成步骤S300:对于读取的所述原始图片,提取主要颜色作为背景,生成使用主要颜色作为背景的背景图片;以及
合成步骤S400:将所述透明背景的图片和所述背景图片进行合并生成处理后的图片。
需要说明的是,透明化步骤S200和背景生成步骤S300之间没有先后关系,可以是先进行透明化步骤S200然后再进行背景生成步骤S300,也可以是先进行背景生成步骤S300然后再进行透明化步骤S200,或者也可以是两个步骤同时分别进行。
接着,对于这些步骤的具体内容进行说明。
在图片读取步骤S100中,读取原始图片并记录为I 1,并记录原始图片的尺寸为(row,col,ch),其中row、col为图片对应矩阵的行、列即图片的长宽尺寸,ch表示图片对应的通道数量,这里,带有透明alpha通道的取值为4,其他取值为3。
以下对于alpha通道以及后文中将会出现的蒙版进行说明。
首先,说明alpha通道。
alpha是一个8位的灰度图像通道,该通道用256级灰度来记录图像中的透明度信息,定义透明、不透明和半透明区域,其中黑表示透明,白表示不透明,灰表示半透明。
具体地,alpha通道(阿尔法通道,Alpha Channel)是指一张图片的透明和半透明度。例如:一个使用16位存储的图片,可能5位表示红色,5位表示绿色,5位表示蓝色,1位是Alpha通道。在这种情况下,它要么表示透明要么不是。一个使用32位存储的图片,每8位表示红绿蓝,和Alpha通道。在这种情况下,就不光可以表示透明还是不透明,Alpha通道还可以表示256级的半透明度。
在现有的alpha通道中,可以将任意选区存储为蒙版。可以编辑Alpha通道,添加或删除其中的颜色,并且可为蒙版颜色和不透明度指定设置。通俗的说就是上图时作透明效果的。
其次,对于蒙版进行简单说明。当选中某个图像的部分区域时,未选中区域将“被蒙版”或受保护以免被编辑。因此,创建了蒙版后,当您要改变图像某个区域的颜色,或者要对该区域应用滤镜或其它效果时,您可以隔离并保护图像的其余部分。您也可以在进行复杂的图像编辑时使用蒙版,比如将颜色或滤镜效果逐渐应用于图像。
图2是表示用于说明蒙版的说明图。
在图2中,A表示用于保护背景并编辑“蝴蝶”的不透明蒙版,B用于保护“蝴蝶”并为背景着色的不透明蒙版。
接着,说明透明化处理步骤S200。
图3是表示透明化处理步骤的具体流程的示意图。
如图3所示,所述透明化步骤S200中具体包括:
在步骤S201中,对于读取到的所述原始原图,判断是否具有alpha通道,若判断为是,则继续步骤S202,在步骤S202中提取alpha通道值并记为α 0,另一方面,若判断为否,若不具有alpha通道,则不做处理。
在步骤S203中,对于读取所述原始图片提取RGB通道,即读取所述原始图片的RGB值,记为I rgb,其中I rgb的维度为(row,col,3),其中,由于R、G、B分别表示单颜色值,故其维度都仅包含2维,组合在一后通道数为3。
在步骤S204中,计算图片各像素RGB颜色值之和,即颜色值之和S为:S=R+G+B,并计算有效颜色区域的蒙版为:
Figure PCTCN2019094978-appb-000016
其中C s表示需要透明化的颜色阈值,,例如作为一个示例,可取C s=700并且,透明部分的蒙版为mask transparent=1-mask value
采用颜色值之和S和透明部分蒙版mask transparent按照下式计算透明区域的蒙版值为:
Figure PCTCN2019094978-appb-000017
其中,β表示透明区域与不透明区域的过渡平滑度。
其中,作为一个示例,可取β=130,这样能够使得透明区域与不透明区域的过渡平滑度。
接着,在步骤S205中,根基于原alpha通道α 0和计算出的透明区域的蒙版值,计算新的alpha通道值α 1,具体地,基于原alpha通道和计算出的透明区域的蒙版值,按照下式计算新的alpha通道值α 1
Figure PCTCN2019094978-appb-000018
在步骤S206中,组合步骤S202得到的原始图片的RGB值及步骤S205生成的新的alpha通道值α 1,而生成新的透明背景的图片I 1=(R,G,B,α 1)。
接着,说明背景生成步骤。
图4是表示背景生成步骤的具体流程的示意图。
如图4所示背景生成步骤的具体流程如下:
对于读取的原始图片,在步骤S301中,判断图片是否包含alpha通道,若判断为是,则保存图片alpha通道为α 0,并保存图片RGB通道为I rgb,若判断为否,则不做任何处理。
在步骤S302中,对于读取所述原始图片提取RGB通道,即提取图片的RGB值,记为I rgb,其中I rgb的维度为(row,col,3),其中,由于R、G、B分别表示单颜色值,故其维度都仅包含2维,组合在一后通道数为3。
在步骤S303中,当图片I 1包含alpha通道时,使用α 0计算图片的mask;否则,在步骤S304中使用mask value作为图片的mask,
利用下述公式计算图片有效颜色区域的蒙版值mask:
Figure PCTCN2019094978-appb-000019
即,当原始图片包含alpha通道时,使用原始图片的alpha通道α 0作为图片的蒙版;否则,使用mask value作为图片的蒙版值,其中,1{}表示,当满足条件时取1,条件不满足时取0,C α表示alpha通道的阈值,其中,例如C α表示可取C α=50。
在步骤S305中,提取有效区域RGB值,即使用mask rgb筛选I rgb,保存有效颜色信息为I new=I rgb[mask rgb],其中符号[]表示筛选,当[]中条件满足时保留值,当[]中条件不满足时不保留。
在步骤S306中,根据有效RGB值计算颜色分布并采用直方图统计或聚类算法,对有效颜色信息I new提取图片主要颜色(R m,G m,B m)。
在步骤S307中,采用提取出的主要颜色制作单色背景图片I bg,其中以白色为底色,透明度为τ,则背景图片I bg的R bg、G bg、B bg分量为:
R bg=R m*τ+255*(1-τ)
G bg=G m*τ+255*(1-τ)
B bg=B m*τ+255*(1-τ),
为保证最终效果,τ的值不宜过大。
对于透明化步骤S200生成的透明背景的图片和背景生成步骤S300生成的背景图片进行合并生成处理后的图片,具体地利用α 1通道,按照下述公式将所述透明背景的图片I 1和所述背景图片I bg进行合并生成处理后的图片I:
Figure PCTCN2019094978-appb-000020
另外,在上述说明中,所说明的参数的值仅是一个示例,都可进行一定修改,这些修改也可以达到类似效果。
图5是表示本发明一方面的图片处理方法的效果图。其中,图(a)和图(c)表示原始图片,图(b)是对图(a)用本发明一方面的图片处理方法进行处理后的图片,图(d)是对图(c)用本发明一方面的图片处理方法进行处理后的图片。
由于在附图不能用颜色表示,这里用语言进行简单说明一下。图(a)表示银联的logo图片,其背景部分A为浅灰色,经过本发明的图片处理方法处理后,提取出该银联的logo图片的主要颜色(蓝色),这样,如图(b)所示处理后的logo图片的背景部分A’变化为浅蓝色。同样地,图(c)表示几朵红色的花朵图片,其背景部分A为浅灰色,经过本发明的图片处理方法处理后,提取出该花朵图形的主要颜色(红色),这样,如图(d)所示处理后的花朵图片的背景部分A’变化为浅红色。
接着,对于本发明一方面的图片处理***进行说明。
图6是本发明一方面的图片处理***的结构框图。
如图6,所示,本发明的一方面的图片处理***,其特征在于,包括:
图片读取模块100,用于读取原始图片;
透明化模块200,用于对于所述图片读取模块100读取的所述原始图片的背景进行透明化处理得到透明背景的透明背景的图片;
背景生成模块300,用于对于所述图片读取模块100读取的所述原始图片,提取主要颜色作为背景,生成使用主要颜色作为背景的背景图片;以及
合成模块400,用于将所述透明化模块200生成的所述透明背景的图片和所述背景生成模300块生成的所述背景图片进行合并生成处理后的图片。
其中,图片读取模块100读取原始图片并记录为I 1,并记录原始图片的尺寸为(row,col,ch),其中row、col为图片对应矩阵的行、列即图片的长宽尺寸,ch表示图片对应的通道数量。
所述透明化模块200包括:
第1透明化子模块210:读取所述原始原图,判断是否具有alpha通道,若原始图片具有alpha通道则记为α 0,否则不做处理;
第2透明化子模块220:读取所述原始图片的RGB值并生成与图片信息对应的透明区域蒙版;
第3透明化子模块230:基于原alpha通道α 0和计算出的透明区域的蒙版值,计算新的alpha通道值α 1;以及
第4透明化子模块240:组合所述原始图片的RGB值以及所述新的alpha通道值α 1生成透明背景的图片I 1=(R,G,B,α 1)。
其中,所述第2透明化子模块220读取所述原始图片的RGB值,记为I rgb,其中I rgb的维度为(row,col,3),计算图片各像素RGB之和,即颜色值之和S为:S=R+G+B并计算有效颜色区域的蒙版为:
Figure PCTCN2019094978-appb-000021
其中C s表示需要透明化的颜色阈值,并且,透明部分的蒙版为mask transparent=1-mask value
采用颜色值之和S和透明部分蒙版mask transparent按照下式计算透明区域的蒙版值为:
Figure PCTCN2019094978-appb-000022
其中,β表示透明区域与不透明区域的过渡平滑度。
其中,所述第3透明化子模块230基于原alpha通道和计算出的透明区域的蒙版值,按照下式计算新的alpha通道值α 1
Figure PCTCN2019094978-appb-000023
其中,所述背景生成模块300以原图的RGB三通道图I rgb为基础提取主色,并制作以主色为基础的背景单色图片I bg
其中,所述背景生成模块
读取所述原始原图,判断是否具有alpha通道,若原始图片具有alpha通道则记为α 0,并保存原始图片的RGB通道为I rgb
利用下述公式计算图片有效颜色区域的蒙版值mask:
Figure PCTCN2019094978-appb-000024
即,当原始图片包含alpha通道时,使用原始图片的alpha通道α 0作为图片的蒙版;否则,使用mask value作为图片的蒙版值,其中,1{}表示,当满足条件时取1,条件不满足时取0,C α表示alpha通道的阈值;
提取有效区域RGB值,即使用mask rgb筛选I rgb,保存有效颜色信息为I new=I rgb[mask rgb],其中符号[]表示筛选,当[]中条件满足 时保留值,当[]中条件不满足时不保留;
采用直方图统计或聚类算法,对有效颜色信息I new提取图片主要颜色(R m,G m,B m);以及
采用提取出的主要颜色制作单色背景图片I bg,其中以白色为底色,透明度为τ,则背景图片I bg的R bg、G bg、B bg分量为:
R bg=R m*τ+255*(1-τ)
G bg=G m*τ+255*(1-τ)
B bg=B m*τ+255*(1-τ)。
所述合成模块400利用α 1通道,按照下述公式将所述透明背景的图片I 1和所述背景图片I bg进行合并生成处理后的图片I:
Figure PCTCN2019094978-appb-000025
这里,作为一个示例,所述原始图片为品牌标识图片。
接着,对于本发明的图片处理方法的两个实施例进行说明,其中,实施例1是表示处理PNG格式图片的图片处理方法,实施例2是表示处理JPG格式图片的图片处理方法。
实施例1
实施例1的图片处理方法包括下述步骤:
图片读取步骤:读取原始PNG格式的图片;
透明化步骤:对于读取的原始PNG格式的图片的背景进行透明化处理得到透明背景的透明背景的图片;
背景生成步骤:对于读取的原始PNG格式的图片,提取主要颜色作为背景,生成使用主要颜色作为背景的背景图片;以及
合成步骤:将所述透明背景的图片和所述背景图片进行合并生成处理后的图片。
这里,接着,对于这些步骤的具体内容进行说明。
在图片读取步骤中,读取原始图片并记录为I 1,并记录原始图片的尺寸为(row,col,ch),其中row、col为图片对应矩阵的行、 列即图片的长宽尺寸,ch表示图片对应的通道数量,这里,PNG格式的图片是带有透明alpha通道的,其CH取值为4。
接着,说明透明化处理步骤。
其中,透明化步骤中具体包括:
(1)对于读取到的所述原始PNG格式的图片,提取alpha通道值并记为α 0
(2)对于读取所述原始PNG格式的图片提取RGB通道,即读取所述原始图片的RGB值,记为I rgb,其中I rgb的维度为(row,col,3),其中,由于R、G、B分别表示单颜色值,故其维度都仅包含2维,组合在一后通道数为3;
(3)计算图片各像素RGB颜色值之和,即颜色值之和S为:S=R+G+B,并计算有效颜色区域的蒙版为:
Figure PCTCN2019094978-appb-000026
其中C s表示需要透明化的颜色阈值,例如作为一个示例,可取C s=700并且,透明部分的蒙版为mask transparent=1-mask value
(4)采用颜色值之和S和透明部分蒙版mask transparent按照下式计算透明区域的蒙版值为:
Figure PCTCN2019094978-appb-000027
其中,β表示透明区域与不透明区域的过渡平滑度;
(5)基于原alpha通道α 0和计算出的透明区域的蒙版值,按照下式计算新的alpha通道值α 1
α 1=mask bg+mask value0
(6)组合原始图片的RGB值及生成的新的alpha通道值α 1,而生成新的透明背景的图片I 1=(R,G,B,α 1)
接着,对于背景生成步骤进行说明。
背景生成步骤的具体流程如下:
(1)对于读取的原始PNG格式的图片,保存图片alpha通道为α 0,并保存图片RGB通道为I rgb
(2)对于读取所述原始图片提取RGB通道,即提取图片的RGB值,记为I rgb,其中I rgb的维度为(row,col,3),其中,由于R、G、B分别表示单颜色值,故其维度都仅包含2维,组合在一后通道数为3;
(3)使用α 0利用下述公式计算图片有效颜色区域的蒙版值mask rgb
mask rgb=1{α 0>C a}
其中,1{}表示,当满足条件时取1,条件不满足时取0,C α表示alpha通道的阈值,其中,例如C α表示可取C α=50;
(4)提取有效区域RGB值,即使用mask rgb筛选I rgb,保存有效颜色信息为I new=I rgb[mask rgb],其中符号[]表示筛选,当[]中条件满足时保留值,当[]中条件不满足时不保留;
(5)根据有效RGB值计算颜色分布并采用直方图统计或聚类算法,对有效颜色信息I new提取图片主要颜色(R m,G m,B m);
(6)采用提取出的主要颜色制作单色背景图片I bg,其中以白色为底色,透明度为τ,则背景图片I bg的R bg、G bg、B bg分量为:
R bg=R m*τ+255*(1-τ)
G bg=G m*τ+255*(1-τ)
B bg=B m*τ+255*(1-τ),
其中,为保证最终效果,τ的值不宜过大。
最后,对于上述透明化步骤生成的透明背景的图片和背景生成步骤生成的背景图片进行合并生成处理后的图片,具体地利用α 1通道,按照下述公式将所述透明背景的图片I 1和所述背景图片I bg进行合并生成处理后的图片I:
Figure PCTCN2019094978-appb-000028
实施例2
实施例2的图片处理方法包括下述步骤:
图片读取步骤:读取原始JPG格式的图片;
透明化步骤:对于读取的原始JPG格式的图片的背景进行透明化处理得到透明背景的透明背景的图片;
背景生成步骤:对于读取的原始JPG格式的图片,提取主要颜色作为背景,生成使用主要颜色作为背景的背景图片;以及
合成步骤:将所述透明背景的图片和所述背景图片进行合并生成处理后的图片。
这里,接着,对于这些步骤的具体内容进行说明。
在图片读取步骤中,读取原始图片并记录为I 1,并记录原始图片的尺寸为(row,col,ch),其中row、col为图片对应矩阵的行、列即图片的长宽尺寸,ch表示图片对应的通道数量,这里,JPG格式的图片是不带有透明alpha通道的,其CH取值为3。
接着,说明透明化处理步骤。
其中,透明化步骤中具体包括:
(1)对于读取所述原始JPG格式的图片提取RGB通道,即读取所述原始图片的RGB值,记为I rgb,其中I rgb的维度为(row,col,3),其中,由于R、G、B分别表示单颜色值,故其维度都仅包含2维,组合在一后通道数为3。其中,由于JPG格式没有alpha通道,因此,这里省略了与上述实施方式中的步骤S201和S202相当的步骤;
(2)计算图片各像素RGB颜色值之和,即颜色值之和S为:S=R+G+B,并计算有效颜色区域的蒙版为:
Figure PCTCN2019094978-appb-000029
其中C s表示需要透明化的颜色阈值,例如作为一个示例,可取C s=700并且,透明部分的蒙版为mask transparent=1-mask value
(3)采用颜色值之和S和透明部分蒙版mask transparent按照下式 计算透明区域的蒙版值mask bg为:
Figure PCTCN2019094978-appb-000030
其中,β表示透明区域与不透明区域的过渡平滑度。
(4)按照下式计算新的alpha通道值α 1
α 1=mask bg+mask value*255。
(5)组合原始图片的RGB值及生成的新的alpha通道值α 1,而生成新的透明背景的图片I 1=(R,G,B,α 1)
接着,说明背景生成步骤。背景生成步骤的具体流程如下:
(1)对于读取所述原始图片提取RGB通道,即提取图片的RGB值,记为I rgb,其中I rgb的维度为(row,col,3),其中,由于R、G、B分别表示单颜色值,故其维度都仅包含2维,组合在一后通道数为3;
(2)计算图片有效颜色区域的蒙版值mask rgb
mask rgb=mask value
(3)提取有效区域RGB值,即使用mask rgb筛选I rgb,保存有效颜色信息为I new=I rgb[mask rgb],其中符号[]表示筛选,当[]中条件满足时保留值,当[]中条件不满足时不保留;
(4)根据有效RGB值计算颜色分布并采用直方图统计或聚类算法,对有效颜色信息I new提取图片主要颜色(R m,G m,B m);
(5)采用提取出的主要颜色制作单色背景图片I bg,其中以白色为底色,透明度为τ,则背景图片I bg的R bg、G bg、B bg分量为:
R bg=R m*τ+255*(1-τ)
G bg=G m*τ+255*(1-τ)
B bg=B m*τ+255*(1-τ),
其中,为保证最终效果,τ的值不宜过大。
最后,对于上述透明化步骤生成的透明背景的图片和背景生成步骤生成的背景图片进行合并生成处理后的图片,具体地利用α 1通道,按照下述公式将所述透明背景的图片I 1和所述背景图片I bg进 行合并生成处理后的图片I:
Figure PCTCN2019094978-appb-000031
接着,对于本发明的一实施方式的图片显示方法进行说明。该实施方式主要的改进之处在于,对于采用上述实施方式的图片处理方法进行处理的图片,在预设的规定时间进行显示,而在所述规定时间之外显示原始图片。
图7是本发明一实施方式的图片显示方法的流程示意图。
具体地,如图7所示该实施方式的图片显示方法包括下述步骤:
时间设定步骤S10:预先设定规定时间;
图片处理步骤S20:对原始图片进行处理,生成处理后的图片;以及
显示步骤S30:在所述规定时间显示所述处理后的图片,在所述规定时间以外的时间显示原始图片,
其中,所述图片处理步骤S20包括:
图片读取步骤,读取原始图片;
透明化步骤,对于读取的所述原始图片的背景进行透明化处理得到透明背景的透明背景的图片;
背景生成步骤,对于读取的所述原始图片,提取主要颜色作为背景,生成使用主要颜色作为背景的背景图片;以及
合成步骤,将所述透明背景的图片和所述背景图片进行合并以生成处理后的图片。
这里的图片读取步骤、透明化步骤、背景生成步骤以及合成步骤与之前实施方式中说明的图片读取步骤S100、透明化步骤S200、背景生成步骤S300以及合成步骤S400相同,这里就省略说明。
作为一个示例,所述原始图片为品牌标识图片(即logo图片)。
如上所述,根据本发明的图片显示方法,通过设置规定时间,在规定时间显示经过处理的图片(例如品牌的logo图片),由此能够在该规定时间显示不同于平时的品牌图片,并且在该规定时间中所显示的品牌图片是以品牌图片的主色调作为背景,由此能够特别地凸显“品牌时刻”效果。
本发明还提供一种计算机可读存储介质,其上存储计算机程序,其特征在于,该程序被处理器执行时实现上述的图片处理方法。
本发明还提供一种计算机设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现上述的图片处理方法。
如上所述,在本发明的图片处理方法以及图片处理***中,能够根据图片颜色,自动计算待实现透明图片的透明区域取值,并将透明区域的取值与原图片alpha通道值合并生成新的alpha通道,另一方面,能够提取图片主色,并根据颜色合成公式,使用规定的透明度,以白色为底色生成背景图片,这样将原图片、新alpha通道、新的图片背景合成,形成最终将背景替换为与主色相似的背景图。
以上例子主要说明了本发明的本发明的图片处理方法、图片处理***以及图片显示方法。尽管只对其中一些本发明的具体实施方式进行了描述,但是本领域普通技术人员应当了解,本发明可以在不偏离其主旨与范围内以许多其他的形式实施。因此,所展示的例子与实施方式被视为示意性的而非限制性的,在不脱离如所附各权利要求所定义的本发明精神及范围的情况下,本发明可能涵盖各种的修改与替换。

Claims (25)

  1. 一种图片显示方法,其特征在于,包括下述步骤:
    时间设定步骤,预先设定规定时间;
    图片处理步骤,对原始图片进行处理,生成处理后的图片;以及
    显示步骤,在所述规定时间显示所述处理后的图片,在所述规定时间以外的时间显示原始图片,
    其中,所述图片处理步骤包括:
    图片读取步骤,读取原始图片;
    透明化步骤,对于读取的所述原始图片的背景进行透明化处理得到透明背景的透明背景的图片;
    背景生成步骤,对于读取的所述原始图片,提取主要颜色作为背景,生成使用主要颜色作为背景的背景图片;以及
    合成步骤,将所述透明背景的图片和所述背景图片进行合并以生成处理后的图片。
  2. 如权利要求1所述的图片显示方法,其特征在于,
    在所述透明化步骤中包括:
    透明化子步骤1:读取所述原始原图,判断是否具有alpha通道,若原始图片具有alpha通道则记为α 0,否则不做处理;
    透明化子步骤2:读取所述原始图片的RGB值并生成与图片信息对应的透明区域蒙版;
    透明化子步骤3:基于原alpha通道α 0和计算出的透明区域的蒙版值,计算新的alpha通道值α 1;以及
    透明化子步骤4:组合所述原始图片的RGB值以及所述新的alpha通道值α 1生成透明背景的图片I 1=(R,G,B,α 1)。
  3. 如权利要求2所述的图片显示方法,其特征在于,
    在所述透明化子步骤2中包括:
    读取所述原始图片的RGB值,记为I rgb,其中I rgb的维度为(row, col,3);
    计算图片各像素RGB之和,即颜色值之和S为:S=R+G+B并计算有效颜色区域的蒙版为:
    Figure PCTCN2019094978-appb-100001
    其中C s表示需要透明化的颜色阈值,并且,透明部分的蒙版为mask transparent=1-mask value;以及
    采用颜色值之和S和透明部分蒙版mask transparent按照下式计算透明区域的蒙版值为:
    Figure PCTCN2019094978-appb-100002
    其中,β表示透明区域与不透明区域的过渡平滑度。
  4. 如权利要求3所述的图片显示方法,其特征在于,
    在所述透明化子步骤3中包括:基于原alpha通道和计算出的透明区域的蒙版值,按照下式计算新的alpha通道值α 1
    Figure PCTCN2019094978-appb-100003
  5. 如权利要求4所述的图片显示方法,其特征在于,
    在所述背景生成步骤中,以原图的RGB三通道图I rgb为基础提取主色,并制作以主色为基础的背景单色图片I bg
    其中,所述背景生成步骤包括:
    读取所述原始原图,判断是否具有alpha通道,若原始图片具有alpha通道则记为α 0,并保存原始图片的RGB通道为I rgb
    利用下述公式计算图片有效颜色区域的蒙版值mask:
    Figure PCTCN2019094978-appb-100004
    即,当原始图片包含alpha通道时,使用原始图片的alpha通 道α 0作为图片的蒙版;否则,使用mask value作为图片的蒙版值,其中,1{}表示,当满足条件时取1,条件不满足时取0,C α表示alpha通道的阈值;
    提取有效区域RGB值,即使用mask rgb筛选I rgb,保存有效颜色信息为I new=I rgb[mask rgb],其中符号[]表示筛选,当[]中条件满足时保留值,当[]中条件不满足时不保留;
    采用直方图统计或聚类算法,对有效颜色信息I new提取图片主要颜色(R m,G m,B m);以及
    采用提取出的主要颜色制作单色背景图片I bg,其中以白色为底色,透明度为τ,则背景图片I bg的R bg、G bg、B bg分量为:
    R bg=R m*τ+255*(1-τ)
    G bg=G m*τ+255*(1-τ)
    B bg=B m*τ+255*(1-τ)。
  6. 如权利要求5所述的图片显示方法,其特征在于,
    在所述合成步骤中,利用α 1通道,按照下述公式将所述透明背景的图片I 1和所述背景图片I bg进行合并生成处理后的图片I:
    Figure PCTCN2019094978-appb-100005
  7. 如权利要求1-6任意一项所述的图片显示方法,其特征在于,
    所述原始图片为品牌标识图片。
  8. 一种计算机可读存储介质,其上存储计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-7任意一项所述的图片显示方法。
  9. 一种计算机设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1-7任意一项所述的图片显示方法。
  10. 一种图片处理方法,其特征在于,包括下述步骤:
    图片读取步骤,读取原始图片;
    透明化步骤,对于读取的所述原始图片的背景进行透明化处理得到透明背景的透明背景的图片;
    背景生成步骤,对于读取的所述原始图片,提取主要颜色作为背景,生成使用主要颜色作为背景的背景图片;以及
    合成步骤,将所述透明背景的图片和所述背景图片进行合并生成处理后的图片。
  11. 如权利要求10所述的图片处理方法,其特征在于,在所述透明化步骤中包括:
    透明化子步骤1:读取所述原始原图,判断是否具有alpha通道,若原始图片具有alpha通道则记为α 0,否则不做处理;
    透明化子步骤2:读取所述原始图片的RGB值并生成与图片信息对应的透明区域蒙版;
    透明化子步骤3:基于原alpha通道α 0和计算出的透明区域的蒙版值,计算新的alpha通道值α 1;以及
    透明化子步骤4:组合所述原始图片的RGB值以及所述新的alpha通道值α 1生成透明背景的图片I 1=(R,G,B,α 1)。
  12. 如权利要求11所述的图片显示方法,其特征在于,
    在所述透明化子步骤2中包括:
    读取所述原始图片的RGB值,记为I rgb,其中I rgb的维度为(row,col,3);
    计算图片各像素RGB之和,即颜色值之和S为:S=R+G+B并计算有效颜色区域的蒙版为:
    Figure PCTCN2019094978-appb-100006
    其中C s表示需要透明化的颜色阈值,并且,透明部分的蒙版为mask transparent=1-mask value;以及
    采用颜色值之和S和透明部分蒙版mask transparent按照下式计算透明区域的蒙版值为:
    Figure PCTCN2019094978-appb-100007
    其中,β表示透明区域与不透明区域的过渡平滑度。
  13. 如权利要求12所述的图片显示方法,其特征在于,
    在所述透明化子步骤3中包括:基于原alpha通道和计算出的透明区域的蒙版值,按照下式计算新的alpha通道值α 1
    Figure PCTCN2019094978-appb-100008
  14. 如权利要求13所述的图片显示方法,其特征在于,
    在所述背景生成步骤中,以原图的RGB三通道图I rgb为基础提取主色,并制作以主色为基础的背景单色图片I bg
    其中,所述背景生成步骤包括:
    读取所述原始原图,判断是否具有alpha通道,若原始图片具有alpha通道则记为α 0,并保存原始图片的RGB通道为I rgb
    利用下述公式计算图片有效颜色区域的蒙版值mask:
    Figure PCTCN2019094978-appb-100009
    即,当原始图片包含alpha通道时,使用原始图片的alpha通道α 0作为图片的蒙版;否则,使用mask value作为图片的蒙版值,其中,1{}表示,当满足条件时取1,条件不满足时取0,C α表示alpha通道的阈值;
    提取有效区域RGB值,即使用mask rgb筛选I rgb,保存有效颜色信息为I new=I rgb[mask rgb],其中符号[]表示筛选,当[]中条件满足时保留值,当[]中条件不满足时不保留;
    采用直方图统计或聚类算法,对有效颜色信息I new提取图片主要颜色(R m,G m,B m);以及
    采用提取出的主要颜色制作单色背景图片I bg,其中以白色为底色,透明度为τ,则背景图片I bg的R bg、G bg、B bg分量为:
    R bg=R m*τ+255*(1-τ)
    G bg=G m*τ+255*(1-τ)
    B bg=B m*τ+255*(1-τ)。
  15. 如权利要求14所述的图片显示方法,其特征在于,
    在所述合成步骤中,利用α 1通道,按照下述公式将所述透明背景的图片I 1和所述背景图片I bg进行合并生成处理后的图片I:
    Figure PCTCN2019094978-appb-100010
  16. 如权利要求10-15任意一项所述的图片处理方法,其特征在于,
    所述原始图片为品牌标识图片。
  17. 一种图片处理***,其特征在于,包括:
    图片读取模块,用于读取原始图片;
    透明化模块,用于对于所述图片读取模块读取的所述原始图片的背景进行透明化处理得到透明背景的透明背景的图片;
    背景生成模块,用于对于所述图片读取模块读取的所述原始图片,提取主要颜色作为背景,生成使用主要颜色作为背景的背景图片;以及
    合成模块,用于将所述透明化模块生成的所述透明背景的图片和所述背景生成模块生成的所述背景图片进行合并生成处理后的图片。
  18. 如权利要求17所述的图片处理***,其特征在于,
    在所述透明化模块中包括:
    第1透明化子模块:读取所述原始原图,判断是否具有alpha 通道,若原始图片具有alpha通道则记为α 0,否则不做处理;
    第2透明化子模块:读取所述原始图片的RGB值并生成与图片信息对应的透明区域蒙版;
    第3透明化子模块:基于原alpha通道α 0和计算出的透明区域的蒙版值,计算新的alpha通道值α 1;以及
    第4透明化子模块:组合所述原始图片的RGB值以及所述新的alpha通道值α 1生成透明背景的图片I 1=(R,G,B,α 1)。
  19. 如权利要求18所述的图片处理***,其特征在于,
    所述第2透明化子模块读取所述原始图片的RGB值,记为I rgb,其中I rgb的维度为(row,col,3),计算图片各像素RGB之和,即颜色值之和S为:S=R+G+B并计算有效颜色区域的蒙版为:
    Figure PCTCN2019094978-appb-100011
    其中C s表示需要透明化的颜色阈值,并且,透明部分的蒙版为mask transparent=1-mask value
    采用颜色值之和S和透明部分蒙版mask transparent按照下式计算透明区域的蒙版值为:
    Figure PCTCN2019094978-appb-100012
    其中,β表示透明区域与不透明区域的过渡平滑度。
  20. 如权利要求19所述的图片处理***,其特征在于,
    所述第3透明化子模块基于原alpha通道和计算出的透明区域的蒙版值,按照下式计算新的alpha通道值α 1
    Figure PCTCN2019094978-appb-100013
  21. 如权利要求20所述的图片处理***,其特征在于,
    所述背景生成模块以原图的RGB三通道图I rgb为基础提取主色,并制作以主色为基础的背景单色图片I bg
    其中,所述背景生成模块
    读取所述原始原图,判断是否具有alpha通道,若原始图片具有alpha通道则记为α 0,并保存原始图片的RGB通道为I rgb
    利用下述公式计算图片有效颜色区域的蒙版值mask:
    Figure PCTCN2019094978-appb-100014
    即,当原始图片包含alpha通道时,使用原始图片的alpha通道α 0作为图片的蒙版;否则,使用mask value作为图片的蒙版值,其中,1{}表示,当满足条件时取1,条件不满足时取0,C α表示alpha通道的阈值;
    提取有效区域RGB值,即使用mask rgb筛选I rgb,保存有效颜色信息为I new=I rgb[mask rgb],其中符号[]表示筛选,当[]中条件满足时保留值,当[]中条件不满足时不保留;
    采用直方图统计或聚类算法,对有效颜色信息I new提取图片主要颜色(R m,G m,B m);以及
    采用提取出的主要颜色制作单色背景图片I bg,其中以白色为底色,透明度为τ,则背景图片I bg的R bg、G bg、B bg分量为:
    R bg=R m*τ+255*(1-τ)
    G bg=G m*τ+255*(1-τ)
    B bg=B m*τ+255*(1-τ)。
  22. 如权利要求21所述的图片处理***,其特征在于,
    所述合成模块利用α 1通道,按照下述公式将所述透明背景的图片I 1和所述背景图片I bg进行合并生成处理后的图片I:
    Figure PCTCN2019094978-appb-100015
  23. 如权利要求17-24中任意一项所述的图片处理***,其特征在于,
    所述原始图片为品牌标识图片。
  24. 一种计算机可读存储介质,其上存储计算机程序,其特征 在于,该程序被处理器执行时实现如权利要求10-15任意一项所述的图片处理方法。
  25. 一种计算机设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求10-15任意一项所述的图片处理方法。
PCT/CN2019/094978 2018-10-31 2019-07-08 一种图片显示方法、图片处理方法及其*** WO2020087968A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811285601.6A CN111127302B (zh) 2018-10-31 2018-10-31 一种图片显示方法、图片处理方法及其***
CN201811285601.6 2018-10-31

Publications (1)

Publication Number Publication Date
WO2020087968A1 true WO2020087968A1 (zh) 2020-05-07

Family

ID=70461970

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/094978 WO2020087968A1 (zh) 2018-10-31 2019-07-08 一种图片显示方法、图片处理方法及其***

Country Status (3)

Country Link
CN (1) CN111127302B (zh)
TW (1) TWI747006B (zh)
WO (1) WO2020087968A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113938572A (zh) * 2021-09-29 2022-01-14 广州虎牙科技有限公司 图片传输方法、显示方法、装置、电子设备及存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114078102A (zh) * 2020-08-11 2022-02-22 北京芯海视界三维科技有限公司 图像处理装置和虚拟现实设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030085907A1 (en) * 2001-11-02 2003-05-08 Nippon Telegraph And Telephone Corporation Image processing method and image processing apparatus for obtaining overlaid image
CN106201535A (zh) * 2016-07-14 2016-12-07 广州神马移动信息科技有限公司 工具栏背景颜色随着图片的主颜色而变换的方法和装置
CN106780635A (zh) * 2016-12-30 2017-05-31 深圳创维-Rgb电子有限公司 一种智能终端的图片适配方法及***
CN106934838A (zh) * 2017-02-08 2017-07-07 广州阿里巴巴文学信息技术有限公司 图片展示方法、设备及可编程设备

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI344061B (en) * 2007-09-28 2011-06-21 Hon Hai Prec Ind Co Ltd Image capturing and processing system and method
US8290252B2 (en) * 2008-08-28 2012-10-16 Microsoft Corporation Image-based backgrounds for images
CN101753851B (zh) * 2008-12-17 2011-12-28 华为终端有限公司 背景更换的方法、虚拟场景合成的方法及相关***和设备
US8379972B1 (en) * 2009-12-01 2013-02-19 Adobe Systems Incorporated Color decontamination for image compositing
CN104679380A (zh) * 2013-11-30 2015-06-03 富泰华工业(深圳)有限公司 用户界面背景色调整***及其方法
CN106503004B (zh) * 2015-09-07 2020-09-11 腾讯科技(深圳)有限公司 一种信息处理方法及装置、终端
CN107943546A (zh) * 2016-10-12 2018-04-20 阿里巴巴集团控股有限公司 一种背景的设置方法、装置、智能终端和操作***

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030085907A1 (en) * 2001-11-02 2003-05-08 Nippon Telegraph And Telephone Corporation Image processing method and image processing apparatus for obtaining overlaid image
CN106201535A (zh) * 2016-07-14 2016-12-07 广州神马移动信息科技有限公司 工具栏背景颜色随着图片的主颜色而变换的方法和装置
CN106780635A (zh) * 2016-12-30 2017-05-31 深圳创维-Rgb电子有限公司 一种智能终端的图片适配方法及***
CN106934838A (zh) * 2017-02-08 2017-07-07 广州阿里巴巴文学信息技术有限公司 图片展示方法、设备及可编程设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113938572A (zh) * 2021-09-29 2022-01-14 广州虎牙科技有限公司 图片传输方法、显示方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN111127302A (zh) 2020-05-08
CN111127302B (zh) 2023-08-01
TW202022810A (zh) 2020-06-16
TWI747006B (zh) 2021-11-21

Similar Documents

Publication Publication Date Title
KR101954851B1 (ko) 메타데이터 기반 영상 처리 방법 및 장치
JP3539539B2 (ja) 画像処理装置、画像処理方法および画像処理プログラムを記録した記録媒体
TW200903347A (en) Edge mapping using panchromatic pixels
CN107369145A (zh) 图像处理方法、装置及终端设备
WO2020087968A1 (zh) 一种图片显示方法、图片处理方法及其***
KR102084343B1 (ko) 배경 제거
JP4399462B2 (ja) 画像処理装置、方法、およびプログラム
CN113129391A (zh) 基于多曝光图像特征分布权重的多曝光融合方法
US9875678B2 (en) Image display method
CN115082328A (zh) 用于图像校正的方法和设备
JP3740351B2 (ja) 画像加工装置および方法およびこの方法の実行プログラムを記録した記録媒体
JP2006081151A (ja) キーヤ用グラフィカル・ユーザ・インターフェース
TWI364213B (zh)
JP2009038737A (ja) 画像処理装置
JP5385059B2 (ja) 画像表示方法、プログラム、画像表示装置、及び、撮像装置
CN106780402A (zh) 基于Bayer格式的图像动态范围扩展方法及装置
JP3986226B2 (ja) データ埋め込み装置,データ抽出装置およびそれらの方法ならびに該方法を記録した記録媒体
JP6396932B2 (ja) 画像合成装置、画像合成装置の動作方法およびコンピュータプログラム
JP2012510201A (ja) デジタル画像における記憶色の修正
JP5232107B2 (ja) 画像表示方法、プログラム、画像表示装置、及び、撮像装置
JP3798561B2 (ja) 画像表示制御装置
CN112132919A (zh) 一种模拟印泥效果的电子***呈现方法
CN116703794B (zh) 一种在hsv颜色空间上的多图像融合方法
JP3914895B2 (ja) 画像処理装置および画像処理方法
TW201508693A (zh) 圖形磚合成控制

Legal Events

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

Ref document number: 19878121

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19878121

Country of ref document: EP

Kind code of ref document: A1