CN109166159B - Method and device for acquiring dominant tone of image and terminal - Google Patents

Method and device for acquiring dominant tone of image and terminal Download PDF

Info

Publication number
CN109166159B
CN109166159B CN201811192232.6A CN201811192232A CN109166159B CN 109166159 B CN109166159 B CN 109166159B CN 201811192232 A CN201811192232 A CN 201811192232A CN 109166159 B CN109166159 B CN 109166159B
Authority
CN
China
Prior art keywords
hue
saturation
interval
value
values
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811192232.6A
Other languages
Chinese (zh)
Other versions
CN109166159A (en
Inventor
邓朔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201811192232.6A priority Critical patent/CN109166159B/en
Publication of CN109166159A publication Critical patent/CN109166159A/en
Application granted granted Critical
Publication of CN109166159B publication Critical patent/CN109166159B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)

Abstract

The application discloses a method, a device and a terminal for obtaining a dominant hue of an image, and belongs to the technical field of computers. The method comprises the following steps: obtaining hue values and saturation values of pixel points in a target image; determining a main hue interval of the target image according to the distribution condition of the hue values in the plurality of hue intervals; determining a main saturation interval of the target image according to the distribution condition of the saturation values in a plurality of saturation intervals; inquiring to obtain a main hue value corresponding to the main hue interval and a main saturation value corresponding to the main saturation interval; and determining the dominant hue of the target image according to the dominant hue value and the dominant saturation value. According to the method and the device, the dominant hue of the target image is determined according to the distribution conditions of the hue value and the saturation value of the target image in the hue intervals and the saturation intervals, and the hue value and the saturation value with the highest occurrence frequency are not required to be accurately obtained by the terminal, so that the calculation overhead of the terminal is reduced.

Description

Method and device for acquiring dominant tone of image and terminal
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a terminal for obtaining a dominant hue of an image.
Background
The dominant hue is the color that appears most frequently in the image. On terminals such as smart phones, tablet computers, desktop computers, and the like, there are many application scenarios that require color analysis of images to obtain dominant hues of the images.
In the related art, a method of acquiring a dominant tone of an image includes: a Central Processing Unit (CPU) of the terminal traverses each pixel point in the target image, obtains a brightness value of each pixel point in each color channel in a Red Green Blue (RGB) color space, and obtains a dominant hue of the target image according to a brightness value with the highest occurrence frequency of each color channel.
In the related art, a central processing unit of a terminal is required to traverse each pixel point in a target image and count the distribution of the brightness value in the RGB color space in each pixel point, so that the calculation overhead of the central processing unit is high, and the time for obtaining the dominant hue of the image is long under certain conditions, for example, under the condition that the calculation capability of the central processing unit of the terminal is poor.
Disclosure of Invention
The embodiment of the application provides a method, a device and a terminal for acquiring a dominant tone of an image, which are used for solving the problem that the time for acquiring the dominant tone of the image is long in the related art. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a method for obtaining a dominant hue of an image, where the method is performed by a terminal, and the method includes:
obtaining hue values and saturation values of pixel points in a target image;
determining a main hue interval of the target image according to the distribution condition of the hue values in a plurality of hue intervals;
determining a main saturation interval of the target image according to the distribution condition of the saturation values in a plurality of saturation intervals;
inquiring to obtain a main hue value corresponding to the main hue interval and a main saturation value corresponding to the main saturation interval;
and determining a main hue interval main saturation interval of a main hue interval of the target image according to the main hue value and the main saturation value.
In one aspect, an embodiment of the present application provides an apparatus for obtaining a dominant color tone of an image, where the apparatus is applied in a terminal, and the apparatus includes:
the image processing module is used for performing down-sampling processing on a target image to obtain a reference image corresponding to the target image, wherein the resolution of the reference image is lower than that of the target image; acquiring a hue value and a saturation value of each pixel point in the reference image to obtain a hue interval corresponding to each hue value and a saturation interval corresponding to each saturation value, wherein the hue interval is a value interval of a hue value preset in the terminal, and the saturation interval is a value interval of a saturation value preset in the terminal;
the central processing module is used for counting to obtain a main hue interval with the largest number of corresponding hue values and a main saturation interval with the largest number of corresponding saturation values; inquiring to obtain a main hue value corresponding to the main hue interval and a main saturation value corresponding to the main saturation interval; and obtaining the main tone of the target image according to the main hue value, the main saturation value and a preset brightness value.
In one aspect, the present embodiments provide a terminal, which includes a processor and a memory, where the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the method for obtaining a dominant hue of an image as described above.
In one aspect, the present application provides a computer-readable storage medium having at least one instruction stored therein, which is loaded and executed by a processor to implement the method for obtaining a dominant hue of an image as described above.
The technical scheme provided by the embodiment of the application has the following beneficial effects that:
the method comprises the steps of obtaining hue values and saturation values of pixel points in a target image, determining a dominant hue interval and a dominant saturation interval according to the distribution condition of the hue values in a plurality of hue intervals and the distribution condition of the saturation values in a plurality of saturation intervals and the dominant saturation interval of the dominant hue interval, so as to obtain the dominant hue value corresponding to the dominant hue interval and the dominant saturation value corresponding to the dominant saturation interval through inquiry, and further obtain the dominant hue of the target image.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a block diagram of a terminal according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of an RGB color space;
FIG. 3 is a schematic diagram of an HSV color space;
FIG. 4 is a flow chart of a method of obtaining a dominant hue of an image provided by an exemplary embodiment of the present application;
FIG. 5 is a flow chart of a method of obtaining a dominant hue of an image provided by an exemplary embodiment of the present application;
FIG. 6 is a schematic illustration of a texture provided by an exemplary embodiment of the present application;
FIG. 7 is a block diagram of an apparatus for obtaining a dominant hue of an image according to an exemplary embodiment of the present application;
fig. 8 is a block diagram of a terminal according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
First, a number of terms related to the embodiments of the present application will be briefly described:
RGB color space: the color standard is a color standard for defining colors by acquiring the superposition of brightness values of three color channels of Red (R), Green (G) and Blue (B). Illustratively, each color channel in the RGB color space includes 256 levels of luminance values, the luminance value being the lowest when the luminance value is 0 and the luminance value being the highest when the luminance value is 255; when the brightness value of the red channel is 0, the brightness value of the green channel is 0, and the brightness value of the blue channel is 0, the corresponding color is black; when the brightness value of the red channel is 255, the brightness value of the green channel is 255 and the brightness value of the blue channel is 255, the corresponding color is white; when the luminance value of the red channel is 255, the luminance value of the green channel is 0, and the luminance value of the blue channel is 0, the corresponding color is red.
Hue (Hue): are spectral colors corresponding to different wavelengths of light. Illustratively, the hue may be defined by a hue circle. The hue circle takes the angle as a unit, the value range is [0 degrees and 360 degrees ], and from red, the red corresponds to 0 degree, the green corresponds to 120 degrees and the blue corresponds to 240 degrees in a counterclockwise sequence.
Saturation (Saturation): also known as chroma, purity, is a parameter used to indicate the purity of a color relative to a spectral color. Illustratively, the value range of the saturation is [0,1], and when the purity is the highest, the saturation is 1; at the lowest purity, the saturation is 0 and the color with saturation 0 has no hue. Usually, children's cartoon or children's book mostly adopt colors with higher saturation to adapt to the color sense of children.
Lightness (Value or Lightness): is a value representing the lightness and darkness of a color. Illustratively, the gray test card can be used as a reference for brightness, and the gray test card can be defined as 0 for black, 10 for white, and 10 gray intervals equally divided into 10 different grays between 0 and 10.
HSV color space: also known as HSL color space, is a color standard that defines colors in terms of hue, saturation, and lightness. Illustratively, a color having a hue of 0 °, a saturation of 1, and a lightness of 10 is red.
Graphics Processing Unit (GPU): the microprocessor is also called a display core, a visual processor and a display chip, and is a microprocessor which is specially used for image operation work on terminals such as smart phones, tablet computers and desktop computers. The graphics processor corresponds to a Frame Buffer memory (Frame Buffer).
Frame buffer memory: frame buffer or video memory for short, is a direct image of the picture displayed on the screen of the terminal, also called Bit Map or raster. Each storage unit of the frame buffer memory corresponds to one pixel on the screen, and the whole frame buffer memory corresponds to one frame of image.
Texture (Texture): is a continuum of pixels having hue attributes and/or region attributes that physically appears as a contiguous segment of space in the frame buffer memory. The graphics processor may classify hue values and saturation values of an image by constructing a texture that includes hue intervals and saturation intervals.
A central processing unit: the computer is an ultra-large scale integrated circuit, and is an operation Core (Core) and a Control Core (Control Unit) of a computer device. Its primary function is to interpret computer instructions and process data in computer software. The cpu mainly includes an Arithmetic Logic Unit (ALU), a Cache memory (Cache), and a Bus (Bus) for implementing Data, control and status of the connection between them.
The method for acquiring the dominant hue of the image in the embodiment of the present application may be applied to an application scene of file transmission between terminals, or an application scene of displaying the image in the terminal, and may also be applied to other scenes in which the dominant hue of the image needs to be acquired, which is not limited in the embodiment of the present application.
Application scenario for file transfer between terminals
The method comprises the steps that the transmission of files can be achieved through a wired or wireless network between terminals, after a receiving terminal receives a target file sent by a sending terminal through an application program, an icon of the target file is displayed on a user interface of the application program, the receiving terminal takes the icon or thumbnail of the target file as a target image, the main tone of the target image is obtained, and the color of the user interface is adjusted to be the main tone of the target image.
The main hue of the target image is obtained by the receiving terminal according to a hue value corresponding to a main hue interval, a saturation value corresponding to a main saturation interval and a preset brightness value, the main hue interval is a hue interval with the highest hue value distribution frequency of the reference image, the main saturation interval is a saturation interval with the highest saturation value distribution frequency of the reference image, the reference image is an image obtained by performing downsampling processing on the target image, and the resolution of the reference image is lower than that of the target image.
Application scene for displaying image in terminal
After an application program in the terminal is opened and a target image is displayed on an application interface of the application program, the terminal obtains the dominant hue of the target image and adjusts the color of the user interface to the dominant hue of the target image.
The dominant hue of the target image is obtained by the terminal according to a hue value corresponding to a dominant hue interval, a saturation value corresponding to a dominant saturation interval and a preset brightness value, the dominant hue interval is a hue interval with the highest hue value distribution frequency of the reference image, the dominant saturation interval is a saturation interval with the highest saturation value distribution frequency of the reference image, the reference image is an image obtained by performing downsampling processing on the target image, and the resolution of the reference image is lower than that of the target image.
Fig. 1 is a block diagram illustrating a terminal according to an exemplary embodiment of the present application. The terminal 100 includes: a processor 110 and a memory 120, the processor 110 and the memory 120 communicating via a bus or other means. The processor 110 includes a central processing unit 111 and a graphics processing unit 112, and the memory 120 stores an operating system 121 and an application program 122.
Operating system 121 is the base software that provides applications 122 with secure access to computer hardware.
The application 122 may be an application having a function of file transfer between terminals, where when the terminal 100 receives a target file sent by another terminal through the application 122, an icon of the target file is a target image, and when the target file is an image file, the target file is the target image; the application 122 may also be an application having a function of reading and displaying a target image.
The application program 122 has a user interface, a target image is displayed on the user interface, the application program 122 acquires hue values and saturation values of pixel points in the target image by calling the graphic processor 112, calls the central processor 111 to determine a main hue interval of the target image according to distribution conditions of the hue values in a plurality of hue intervals, determines a main saturation interval of the target image according to distribution conditions of the saturation values in a plurality of saturation intervals, queries to obtain hue values corresponding to the main hue interval and saturation values corresponding to the main saturation intervals, determines a main hue of the target image according to the main hue values and the main saturation values, and adjusts the color of the user interface to the main hue of the target image.
The terminal in the embodiment of the present application may be a desktop computer, a laptop computer, a mobile phone, a tablet computer, an e-book reader, an MP3(Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4) player, and the like. An application having a function of file transfer between terminals or an application having a function of reading and displaying a target image is installed and operated in the terminal.
Fig. 2 shows a schematic diagram of an RGB color space, and as shown in fig. 2, the RGB color space 200 may be regarded as a three-dimensional stereo space, where an X axis, a Y axis, and a Z axis of the three-dimensional stereo space respectively represent a red luminance value of a red channel, a blue luminance value of a blue channel, and a green luminance value of a green channel, and the corresponding color in the RGB color space may be determined by determining luminance values of the three color channels, i.e., the red channel, the blue channel, and the green channel.
The luminance value of each color channel in the RGB color space has 256 levels of intensity, and the value range of the intensity value is [0,255], so that the superposition combination of the colors of the three color channels in the RGB color space is 16777216(256 × 256 × 256) possibilities.
In the related art, a method of acquiring a dominant hue of an image is: the terminal calls a central processing unit to traverse each pixel point in the target image to obtain a red brightness value of each pixel point in a red channel, a blue brightness value of a blue channel and a green brightness value of a green channel, and the red brightness value with the highest occurrence frequency in the red channel, the blue brightness value with the highest occurrence frequency in the blue channel and the green brightness value with the highest occurrence frequency in the green channel are obtained through statistics, so that the dominant hue of the target image is determined according to the red brightness value, the blue brightness value and the green brightness value with the highest occurrence frequency.
The method of acquiring the dominant hue of an image in the related art has the following drawbacks:
(1) in the related art, a central processing unit needs to perform traversal statistics on a target image, which brings large calculation overhead, and thus, in some cases, for example, in the case that the central processing unit of a terminal has poor calculation capability, the time for acquiring the dominant hue of the image is long.
(2) In the related art, the dominant hue of the target image obtained by the terminal is determined by a set of exact brightness values, for example, the red brightness value with the highest occurrence frequency counted by the central processing unit is 255, the green brightness value is 64, and the blue brightness value is 64, and then the dominant hue is determined to be brown, so that the dominant hue color may be determined in 16777216 colors in the RGB color space in the related art, and the calculation amount of the central processing unit is large, so that a terminal with weak computing capability (for example, a mobile terminal such as a mobile phone and a tablet computer) needs a long time to obtain the dominant hue of the target image, or the dominant hue of the target image cannot be obtained.
(3) In the related art, because the dominant hue of the target image obtained by the terminal is determined by a set of exact brightness values, the dominant hue obtained by the terminal is different for target images with similar dominant hues but different dominant hues, in some scenes, for example, the terminal displays a plurality of target images with similar dominant hues but different hues on the user interface, and because the dominant hues obtained by the terminal are different, the terminal needs to adjust the color of the user interface for a plurality of times when displaying the target images, resulting in poor consistency of the displayed user interface.
Fig. 3 shows a schematic diagram of an HSV color space, which, as shown in fig. 3, can be regarded as a cylindrical coordinate system, where the height z in the cylindrical coordinate represents a lightness value, the radius r in the cylindrical coordinate represents a saturation value, and the radian Φ in the cylindrical coordinate system represents a hue value. Wherein, the value range of the brightness value is [0,1], the value range of the saturation value is [0,1], and the value range of the hue value is [0 degrees and 360 degrees ].
The HSV color space enables intuitive presentation of the relationships between colors. For example, colors with the same lightness and saturation values and different hues have the same height and radius in the HSV color space, but the cross-sectional angles of the cylinders are different, so that the two colors have different shapes in the HSV color space; the hue value and the saturation value are the same, and colors of different lightness have the same section angle and radius but different heights in the HSV space, and thus the two colors have the same shape but different heights in the HSV space.
Fig. 4 shows a flowchart of a method for obtaining a dominant hue of an image according to an exemplary embodiment of the present application. As shown in fig. 4, for example, the method may be applied to the terminal shown in fig. 1, and the method includes:
step 401, obtaining hue values and saturation values of pixel points in the target image.
The target image may be any one of an icon of a target file received by the terminal, an image received by the terminal, or an image stored in the terminal.
When the default color standard in the terminal is an HSV color space, the terminal obtains a hue value and a saturation value of a pixel point in a target image after obtaining the target image; when the default color standard in the terminal is an RGB color space, the terminal obtains the brightness value of the pixel point in the target image in each color channel after obtaining the target image, and the brightness value of the pixel point in each color channel is converted into a hue value, a saturation value and a brightness value in an HSV color space, so that the hue value and the saturation value of the pixel point in the target image are obtained.
Optionally, the terminal performs downsampling on the target image to obtain a downsampled image, and obtains hue values and saturation values of pixel points in the downsampled image.
The down-sampling is a process of performing resolution reduction processing on a target image by the terminal to obtain a down-sampled image. For example, the resolution of the target image is 1000 × 1000 pixels, the down-sampling rate is 1/2, and the terminal down-samples the target image according to the down-sampling rate to obtain a down-sampled image with a resolution of 500 × 500.
For example, the terminal may perform downsampling processing by performing interlaced sampling and/or interlaced sampling on the pixel points of the target image, and the specific implementation manner of downsampling is not limited in the present application.
After the down-sampling processing, the terminal only needs to process the image with lower resolution, and does not need to traverse the whole target image for processing, so that the calculation cost of the graphic processor is reduced.
And 402, determining a main hue interval of the target image according to the distribution condition of the hue values in the plurality of hue intervals.
The hue interval is a value interval divided according to a hue value range preset in the terminal. For example, the hue range preset in the terminal is the global hue value, and the value range of the global hue value is [0 ° and 360 ° ], the global hue value can be equally divided into 360 parts, which are [0 °,1 ° ], [1 °,2 ° ], … …, [358 °,359 ° ] and [359 °,360 ° ], and each value range is the hue range.
Alternatively, the hue intervals may be continuous or discontinuous. For example, the hue intervals in the above example are continuous hue intervals corresponding to the entire hue values; the discrete hue ranges corresponding to the total hue values may be set to [0 °,1 ° ], [2 °,3 ° ], … …, [357 °,358 ° ], and [359 °,360 ° ].
Optionally, the value range of the hue interval may include the global hue value, or may not include the global hue value. For example, when the preset background color is blue or green, a hue value interval [100 °,140 ° ] similar to blue and a hue value interval [220 °,260 ° ] similar to green may be used as the value ranges of the hue interval, and the two value ranges are subdivided into hue intervals, which may be continuous or discontinuous.
After obtaining hue values of pixel points in a target image, the terminal classifies each hue value into a corresponding hue interval to obtain the number of hue values corresponding to each hue interval, and determines the hue interval containing the largest number of hue values in the hue interval as a main hue interval.
For example, if the terminal obtains a hue value of 0.5 °, the hue value of 0.5 ° is classified into the hue interval of [0 °,1 ° ], and if only one hue value of 0.5 ° is included in the hue interval of [0 °,1 ° ], the terminal determines that the number of hue values included in the hue interval of [0 °,1 ° ] is 1.
And 403, determining a main saturation interval of the target image according to the distribution situation of the saturation values in the multiple saturation intervals.
The saturation interval is a value interval divided according to a saturation value range preset in the terminal. For example, the saturation value range preset in the terminal is a global saturation value, and the value range of the global saturation value is [0,1], the global hue value can be equally divided into 10 parts, which are [0,0.1], [0.1,0.2], … …, [0.8,0.9] and [0.9,1], respectively, and each part is a saturation range.
Optionally, the saturation intervals may be continuous or discontinuous. For example, the saturation intervals in the above example are consecutive saturation intervals corresponding to the global saturation values; the discrete saturation intervals corresponding to the global saturation values may be set to [0,0.1], [0.2,0.3], … …, [0.7,0.8], and [0.9,1 ].
Optionally, the value range of the saturation interval may include the global saturation value, or may not include the global saturation value. For example, an application developer may set a saturation range in the saturation range [0.3,0.7] without wishing to adjust the color of the user interface to a color that is too saturated or too low.
After the terminal obtains the saturation values of the pixel points in the target image, classifying each saturation value into a corresponding saturation interval to obtain the number of the saturation values corresponding to each saturation interval, and determining the saturation interval containing the maximum number of the saturation values in the saturation interval as a main saturation interval.
For example, if the terminal obtains a saturation value of 0.5 °, the terminal assigns a hue value of 0.5 ° to a hue interval of [0 °,1 ° ], and if only one hue value of 0.5 ° is included in the hue interval of [0 °,1 ° ], the terminal determines that the number of hue values included in the hue interval of [0 °,1 ° ] is 1.
In step 404, a main hue value corresponding to the main hue interval and a main saturation value corresponding to the main saturation interval are obtained through query.
Each hue interval corresponds to a hue value, and each saturation interval corresponds to a saturation value, for example, a hue interval of [0 °,1 ° ] corresponds to a hue value of 0.5 °, and a saturation interval of [0,0.1] corresponds to a saturation value of 0.05.
And the terminal obtains a hue value corresponding to the main hue interval according to the query, takes the hue value corresponding to the main hue interval as the main hue value, obtains a saturation value corresponding to the main saturation interval through the query, and takes the saturation value corresponding to the bead saturation interval as the main saturation value.
Step 405, determining the dominant hue of the target image according to the dominant hue value and the dominant saturation value.
And the terminal can determine the color in the HSV space according to the obtained dominant hue value, the dominant saturation value and the preset brightness value, so that the dominant hue of the target image is obtained.
In summary, in the embodiment of the present application, by obtaining hue values and saturation values of pixel points in a target image, according to distribution conditions of the hue values in a plurality of hue intervals and distribution conditions of the saturation values in the plurality of saturation intervals, a dominant hue interval and a dominant saturation interval are determined by a dominant hue interval and a dominant saturation interval, so as to obtain a dominant hue value corresponding to the dominant hue interval and a dominant saturation value corresponding to the dominant saturation interval through querying, and further obtain a dominant hue of the target image.
In the embodiment of the application, each hue interval corresponds to one hue value, each saturation interval corresponds to one saturation value, the hue values with similar hue values correspond to the same hue value, and the saturation values with similar saturation values correspond to the same saturation value.
Optionally, in the embodiment of the present application, the target image is subjected to downsampling to obtain a downsampled image, and the terminal obtains hue values and saturation values of pixel points in the downsampled image, so as to obtain a keytone of the target image.
Fig. 5 is a flowchart illustrating a method for obtaining a dominant hue of an image according to an exemplary embodiment of the present application. As shown in fig. 5, the method may be applied to the terminal shown in fig. 1, and the method includes:
step 501, the graphics processor performs down-sampling processing on the target image to obtain a down-sampled image.
The process of performing the down-sampling processing on the target image by the graphics processor may refer to step 401 in the embodiment of fig. 4, which is not described herein again.
For example, when the down-sampling rates of the length and the width are 1/2, if the resolution of the target image is 1000 × 1000, the resolution of the down-sampled image is 500 × 500, and the view port (the rasterization time) is set to be 500 × 500 in the graphics processor. When the display driver of the operating system of the terminal is an Open Graphics Library (OpenGL), rasterizing a reference image by adopting a glViewport instruction; when the display driver of the operating system of the terminal is Metal, the reference image is rasterized by using a glViewport instruction.
Step 502, the graphics processor obtains the brightness value of each pixel point in the down-sampled image in each color channel in the RGB color space.
Usually, the default color standard in the operating system of the terminal is an RGB color space, and the graphics processor obtains a red brightness value, a green brightness value, and a blue brightness value of each pixel point in the down-sampled image.
Illustratively, the image processor obtains that a purple pixel point with coordinates (1,1) in the reference image has a red brightness value of 128, a green brightness value of 0, and a blue brightness value of 128.
Step 503, the graphics processor calculates the hue value and saturation value of each pixel point according to the brightness value of each pixel point in each color channel.
After obtaining the brightness value of each pixel point in each color channel in the RGB color space, the graphic processor needs to perform a process of converting the RGB color space into the HSV color space for the brightness value of each color channel, that is, the graphic processor converts the brightness value of each pixel point in the reference image in each color channel in the RGB color space into a hue value and a saturation value in the HSV color space according to a preset algorithm.
For example, after obtaining that the red brightness value of a pixel point with coordinates (1,1) in the reference image is 128, the green brightness value is 0, and the blue brightness value is 128, the graphics processor obtains, through a preset algorithm, that the hue value of the pixel point is 300 ° and the saturation value is 1.
In step 504, the graphics processor divides the preset hue range into n hue intervals, where n is a positive integer.
The image processor divides the hue value range into n hue intervals according to a preset hue value range. Optionally, n hue intervals are continuous, or n hue intervals are discontinuous; the preset hue range is the global hue value, or the preset hue range is not the global hue value.
Illustratively, the preset hue range is a global hue value, the value range of the global hue value is [0 °,360 ° ], since the value in the frame buffer memory of the graphics processor is maximally 1, the graphics processor makes the value range of the global hue value be [0 °,1 ° ], equally divides the value range of [0 °,1 ° ] into 360 parts, respectively [0 °,1/360 ° ], [1 °,2/360 ° ], … …, [358/360 °,359/360 ° ] and [359/360 °,1 ° ], and each value range is a hue range, where n is 360 °.
Step 505, the graphics processor equally divides the preset saturation value range into m saturation intervals, where m is a positive integer.
And the graphics processor divides the saturation value range into m saturation intervals according to a preset saturation value range. Optionally, m saturation intervals are continuous, or m saturation intervals are discontinuous; the preset saturation value range is the global saturation value, or the preset saturation value range is not the global saturation value.
For example, the preset saturation value range is a global saturation value, and the global saturation value range is [0,1], the graphics processor equally divides the global hue value into 10 parts, which are [0,0.1], [0.1,0.2], … …, [0.8,0.9] and [0.9,1], respectively, each of which is a saturation range, where m is 10.
It should be noted that, the graphics processor may first execute step 504, and then execute step 505; step 505 may be executed first, and then step 504 may be executed, which is not limited herein.
Step 506, the graphics processor classifies the hue value of each pixel point into the hue interval to which the pixel point belongs, and counts to obtain the number of hue values falling into each hue interval.
And the image processor classifies the obtained hue value of each pixel point into the hue interval to which the pixel point belongs, and counts to obtain the number of hue values contained in each hue interval in the n hue intervals. For example, the terminal may classify the obtained 0.5/360 ° hue value into a hue interval of [0 °,1/360 ° ], and if the hue interval [0 °,1/360 ° ] includes only the hue value of 0.5/360 °, the number of hue values corresponding to the hue interval [0 °,1/360 ° ] is 1.
And 507, the graphics processor classifies the saturation value of each pixel point into the corresponding saturation interval, and counts to obtain the number of saturation values falling into each saturation interval.
And the image processor classifies the obtained hue value of each pixel point into the hue interval to which the pixel point belongs, and counts to obtain the number of saturation values contained in each saturation interval in m saturation intervals. For example, the terminal may classify the acquired saturation value of 0.45 into a saturation interval of [0.4,0.5], and if the saturation interval [0.4,0.5] only includes the saturation value of 0.45, the number of saturation values corresponding to the saturation interval [0.4,0.5] is 1.
It should be noted that, the graphics processor may perform step 506 first, and then perform step 507; alternatively, step 507 is executed first, and then step 506 is executed, which is not limited herein.
Step 508, the graphics processor constructs a texture of n rows of m +1 columns of texture elements according to the number of hue values contained in each hue interval and the number of saturation values contained in each saturation interval, i is a positive integer, j is an integer, i is greater than or equal to 1 and less than or equal to n, and j is greater than or equal to 1 and less than or equal to m.
The graphics processor constructs a texture of n rows and m +1 columns of texture elements in a frame buffer memory according to the obtained number of hue values contained in each hue interval and the obtained number of saturation values contained in each saturation interval, wherein the texture element T (i, j) in the texture represents the number of hue values contained in the ith hue interval and the number of saturation values contained in the jth-1 saturation interval. When j is 1, the 0 th saturation interval indicates that there is no saturation interval, that is, the first row of texture elements in the texture does not include a saturation interval and the number of saturation values included in the saturation interval.
Illustratively, when the display driver of the operating system of the terminal is OpenGL, the Texture type is OpenGL Texture; when the display driver of the operating system of the terminal is Metal, the Texture type is Metal Texture.
As shown in fig. 6, the texture 600 includes n rows and m +1 columns of texture elements, where the first column of texture elements T (i, 0) is from the 1 st hue interval to the nth hue interval, and the number of hue values included in each hue interval does not include the saturation interval and the number of saturation values included in the saturation interval. H in FIG. 6i(Pi) P represents the number of hue values corresponding to the ith hue intervali,Sj(Qj) Represents that the number of saturation values corresponding to the jth saturation interval is Qj
In step 509, the cpu reads the number of hue values included in each hue interval in the first column of the texture, and determines the hue interval having the largest number of hue values included in the first column as the main hue interval.
After the terminal generates the texture through the graphic processor, the terminal reads texture elements in a first row of the texture by calling the central processing unit to obtain the number of hue values contained in each hue interval, and the hue interval containing the largest number of hue values in the texture elements in the first row is determined as a main hue interval.
For example, the central processor may read the dominant hue interval by the following formula:
Figure BDA0001827796840000131
wherein,
Figure BDA0001827796840000132
represents that the number of hue values in the ith hue interval is Pi
Step 510, the central processing unit reads the number of saturation values contained in each saturation interval in the row where the main hue interval is located, and determines the saturation interval with the largest number of saturation values in the row where the main hue interval is located as the main saturation interval.
After the main hue interval is determined, the central processing unit reads texture elements in a row where the main hue interval is located in the texture, determines a saturation interval containing the maximum saturation value in the row, and determines the saturation interval containing the maximum saturation value as the main saturation interval.
Illustratively, in determining the dominant color interval is HiThen, the central processing unit can read the main hue interval and the main saturation interval by the following formulas:
Figure BDA0001827796840000141
Figure BDA0001827796840000142
wherein,
Figure BDA0001827796840000143
indicates the hue interval S in the ith row of the texturejThe number of hue values in is Qj
Step 511, the central processing unit queries and obtains the main hue value corresponding to the main hue interval and the main saturation value corresponding to the main saturation interval.
Each hue interval can be set with a corresponding hue value according to requirements, and each saturation interval can be set with a corresponding saturation value according to requirements. For example, the hue value corresponding to the hue range of [0 °,1/360 ° ] is 0.5 °, and the saturation value corresponding to the saturation range of [0,0.1] is 0.05.
The central processing unit queries and obtains a hue value corresponding to the main hue interval, the hue value corresponding to the main hue interval is used as the main hue value, a saturation value corresponding to the main saturation interval is obtained through query, and the saturation value corresponding to the bead saturation interval is used as the main saturation value.
And step 512, the central processing unit obtains the dominant hue of the target image according to the dominant hue value, the dominant saturation value and the preset lightness value.
And the central processing unit can determine the color in the HSV space according to the main hue value, the main saturation value and the preset brightness value, so that the main hue of the target image is obtained.
Optionally, the central processing unit adjusts the color of the user interface displayed on the display screen of the terminal to the main tone of the target image.
Illustratively, in a dialog interface application scene of the instant messaging application program, the terminal obtains a main tone of an icon of a target file sent by other terminals or a main tone of a target image sent by other terminals, and then adjusts the color of the dialog interface to the color of the main tone.
For example, in an application scenario of a music playing interface of a music playing application program, after obtaining a keytone of a cover image, the terminal adjusts the color of the music playing interface to the keytone of the cover image.
In summary, in the embodiment of the present application, by obtaining hue values and saturation values of pixel points in a target image, according to distribution conditions of the hue values in a plurality of hue intervals and distribution conditions of the saturation values in the plurality of saturation intervals, a dominant hue interval and a dominant saturation interval are determined by a dominant hue interval and a dominant saturation interval, so as to obtain a dominant hue value corresponding to the dominant hue interval and a dominant saturation value corresponding to the dominant saturation interval through querying, and further obtain a dominant hue of the target image.
In the embodiment of the application, each hue interval corresponds to one hue value, each saturation interval corresponds to one saturation value, the hue values with similar hue values correspond to the same hue value, and the saturation values with similar saturation values correspond to the same saturation value.
Optionally, in the embodiment of the present application, the target image is subjected to downsampling to obtain a downsampled image, and the terminal obtains hue values and saturation values of pixel points in the downsampled image, so as to obtain a keytone of the target image.
Optionally, in the embodiment of the present application, the target image is down-sampled by the graphics processor, after the hue value and the saturation value of each pixel point are obtained, each hue value and saturation value are classified into the hue interval and the saturation interval to which the hue value and the saturation value belong by creating a texture, and the texture is read by the central processing unit to obtain the dominant hue value and the dominant saturation value, so that the dominant hue of the target image is obtained.
Optionally, in this embodiment of the application, by not setting the preset hue value range to be the global hue value, and/or by not setting the preset saturation value range to be the global saturation value, since the terminal does not need to attribute each hue value to the hue interval corresponding to the global hue value, and/or the terminal does not need to attribute each saturation value to the saturation interval corresponding to the global saturation value, the amount of computation of the central processing unit is reduced, and the time for obtaining the main color tone of the image is reduced to a certain extent.
Optionally, in this embodiment of the application, by setting the hue intervals to be discontinuous and/or setting the saturation intervals to be discontinuous, since the terminal does not need to classify each hue value into a continuous hue interval and/or does not need to classify each saturation value into a continuous saturation interval, the amount of computation by the central processing unit is reduced, and the time for obtaining the dominant hue of the image is reduced to a certain extent.
Fig. 7 is a block diagram illustrating a structure of an apparatus for acquiring a dominant hue of an image according to an exemplary embodiment of the present application. The apparatus may be implemented as the terminal 100 in the embodiment of fig. 1 by software, hardware or a combination of both. The apparatus includes a graphics processing module 710 and a central processing module 720.
The image processing module 710 is configured to obtain hue values and saturation values of pixel points in the target image.
The central processing module 720 is configured to determine a dominant hue interval of the target image according to a distribution of hue values in the plurality of hue intervals; determining a main saturation interval of the target image according to the distribution condition of the saturation values in a plurality of saturation intervals; inquiring to obtain a main hue value corresponding to the main hue interval and a main saturation value corresponding to the main saturation interval; and determining the dominant hue of the target image according to the dominant hue value and the dominant saturation value.
In an optional embodiment, the graphics processing module 710 is further configured to determine a hue interval to which each hue value belongs, and count the number of hue values falling into each hue interval.
The central processing module 720 is further configured to determine, as the primary hue interval, the hue interval containing the largest number of hue values.
In an optional embodiment, the graphics processing module 710 is further configured to determine a saturation interval to which each saturation value belongs, and count the number of saturation values falling into each saturation interval.
The central processing module 720 is further configured to determine, as the main saturation interval, the one with the largest number of saturation values included in each saturation interval.
In an optional embodiment, the graphics processing module 710 is further configured to determine a saturation interval to which each saturation value belongs, and count the number of saturation values falling into each saturation interval.
The central processing module 720 is further configured to determine the saturation interval with the largest number of saturation values as the main saturation interval.
In an optional embodiment, the graphics processing module 710 is further configured to divide a preset saturation value range into m saturation intervals, where m is a positive integer; and classifying each saturation value into the corresponding saturation interval.
The central processing module 720 is further configured to count the number of saturation values falling into each of the m saturation intervals.
In an optional embodiment, the graphics processing module 710 is further configured to construct a texture according to the number of hue values included in each hue interval and the number of saturation values included in each saturation interval, where the texture includes n rows and m +1 columns of texture elements, a texture element in an ith row and a jth column in the texture indicates the number of hue values included in the ith hue interval and the number of saturation values included in a jth-1 saturation interval, i is a positive integer, j is an integer, i is greater than or equal to 1 and less than or equal to n, and j is greater than or equal to 1 and less than or equal to m.
The central processing module 710 is further configured to read the number of hue values included in each hue interval in the first column of the texture, and determine the hue interval including the largest number of hue values in the first column as the primary hue interval.
In an optional embodiment, the central processing module 720 is further configured to read the number of saturation values included in each saturation interval in the row where the primary hue interval is located in the texture, and determine the saturation interval with the largest number of saturation values included in the row where the primary hue interval is located as the primary saturation interval.
In an optional embodiment, the graphics processing module 710 is further configured to perform downsampling on the target image to obtain a downsampled image; and acquiring the hue value and the saturation value of each pixel point in the down-sampled image.
In an optional embodiment, the graphics processing module 710 is further configured to obtain a brightness value of each pixel point in each color channel in an RGB color space; and calculating to obtain the hue value and the saturation value of each pixel point in the HSV color space according to the brightness value of each pixel point in each color channel.
In an alternative embodiment, the central processing module 710 is further configured to adjust a color of a user interface displayed on a display screen of the terminal to a dominant hue.
Fig. 8 is a block diagram illustrating a terminal 800 according to an exemplary embodiment of the present application. The terminal 800 may be a portable mobile terminal such as: smart phones, tablet computers, MP3 players (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4). The terminal 800 may also be referred to by other names such as user equipment, portable terminal, etc.
The terminal 800 includes: a processor 801, a memory 802, and a display 803.
The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 801 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor, where the main processor is a processor, also called a CPU, for processing data in an awake state; a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 801 may be integrated with a graphics processor, which is responsible for rendering and drawing the content required to be displayed by the display screen; alternatively, the processor 801 includes a central processing and graphics processor. In some embodiments, the processor 801 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 802 may include one or more computer-readable storage media, which may be tangible and non-transitory. Memory 802 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 802 is used to store at least one instruction for execution by processor 801 to implement the method of obtaining a dominant hue for an image provided herein.
The display 803 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. The display screen 803 may also have the ability to capture touch signals on or over the surface of the touch display screen 803. The touch signal may be input to the processor 801 as a control signal for processing. The touch display 803 is used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the touch display 803 may be one, providing the front panel of the terminal 800; in other embodiments, the touch display 803 can be at least two, respectively disposed on different surfaces of the terminal 800 or in a folded design; in still other embodiments, the touch display 803 may be a flexible display, disposed on a curved surface or on a folded surface of the terminal 800. Even further, the touch screen 805 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The touch screen 805 can be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and other materials.
Those skilled in the art will appreciate that the configuration shown in fig. 8 is not intended to be limiting of terminal 800 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
The present application further provides a computer-readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by the processor to implement the method of acquiring a dominant hue of an image provided by the above method embodiments.
Optionally, the present application also provides a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of acquiring a dominant hue of an image according to the above aspects.
It should be understood that reference to "a plurality" herein means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (15)

1. A method of obtaining a dominant hue of an image, the method being performed by a terminal, the method comprising:
obtaining hue values and saturation values of pixel points in a target image;
determining a main hue interval of the target image according to the distribution condition of the hue values in a plurality of hue intervals, wherein the hue intervals are obtained by dividing a hue value range, and the hue value range comprises a part of the global hue value; the plurality of hue intervals are discontinuous;
determining a main saturation interval of the target image according to the distribution condition of the saturation values in a plurality of saturation intervals corresponding to the main hue interval, wherein the saturation intervals are obtained by dividing a saturation value range, and the saturation value range comprises a part of the global saturation value; the plurality of saturation intervals are discontinuous;
inquiring to obtain a main hue value corresponding to the main hue interval and a main saturation value corresponding to the main saturation interval;
and determining the dominant hue of the target image according to the dominant hue value and the dominant saturation value.
2. The method according to claim 1, wherein the determining the dominant hue interval of the target image according to the distribution of the hue values in a plurality of hue intervals comprises:
determining a hue interval to which each hue value belongs, and counting to obtain the number of hue values falling into each hue interval;
and determining the hue interval with the maximum number of hue values as the main hue interval.
3. The method of claim 2, wherein the determining the hue interval to which each of the hue values belongs and counting the number of hue values falling in each of the hue intervals comprises:
dividing a preset hue value range into n hue intervals, wherein n is a positive integer;
and classifying each hue value into the hue interval to which the hue value belongs, and counting to obtain the number of hue values falling into each hue interval in the n hue intervals.
4. The method of claim 3, wherein determining the hue interval having the largest number of hue values as the dominant hue interval comprises:
constructing a texture according to the number of hue values contained in each hue interval and the number of saturation values contained in each saturation interval, wherein the texture comprises texture elements in n rows and m +1 columns, the texture element in the ith row and the jth column in the texture represents the number of hue values contained in the ith hue interval and the number of saturation values contained in the jth-1 saturation interval, m is a positive integer, i is a positive integer, j is a positive integer, i is greater than or equal to 1 and less than or equal to n, and j is greater than or equal to 1 and less than or equal to m;
and reading the number of hue values contained in each hue interval in a first column of the texture, and determining the hue interval containing the largest number of hue values in the first column as the main hue interval.
5. The method according to claim 1, wherein the determining a main saturation interval of the target image according to the distribution of the saturation values in a plurality of saturation intervals comprises:
determining a saturation interval to which each saturation value belongs, and counting to obtain the number of the saturation values falling into each saturation interval;
and determining the saturation interval with the maximum saturation value number as the main saturation interval.
6. The method according to claim 5, wherein the determining the saturation interval to which each saturation value belongs and counting the number of saturation values falling into each saturation interval comprises:
dividing a preset saturation value range into m saturation intervals, wherein m is a positive integer;
and classifying each saturation value into the corresponding saturation interval, and counting to obtain the number of the saturation values falling into each saturation interval of the m saturation intervals.
7. The method of claim 6, wherein determining the saturation interval having the greatest number of saturation values as the primary saturation interval comprises:
constructing a texture according to the number of hue values contained in each hue interval and the number of saturation values contained in each saturation interval, wherein the texture comprises texture elements in n rows and m +1 columns, the texture element in the ith row and the jth column in the texture represents the number of hue values contained in the ith hue interval and the number of saturation values contained in the jth-1 saturation interval, n is a positive integer, i is a positive integer, j is a positive integer, i is greater than or equal to 1 and less than or equal to n, and j is greater than or equal to 1 and less than or equal to m;
and reading the number of saturation values contained in each saturation interval in the row where the main hue interval is positioned in the texture, and determining the saturation interval with the maximum number of saturation values contained in the row where the main hue interval is positioned as the main saturation interval.
8. The method according to any one of claims 1 to 7, wherein the obtaining hue values and saturation values of pixel points in the target image comprises:
performing down-sampling processing on the target image to obtain a down-sampled image;
and acquiring the hue value and the saturation value of each pixel point in the down-sampled image.
9. The method of claim 8, wherein the obtaining the hue value and saturation value of each pixel point in the down-sampled image comprises:
acquiring the brightness value of each pixel point in each color channel in a red, green and blue (RGB) color space;
and calculating to obtain the hue value and the saturation value of each pixel point in a hue saturation value HSV color space according to the brightness value of each pixel point in each color channel.
10. The method according to any one of claims 1 to 7, wherein after determining the dominant hue of the target image according to the dominant hue value and the dominant saturation value, further comprising:
and adjusting the color of the user interface displayed on the display screen of the terminal into the main tone.
11. An apparatus for obtaining a dominant hue of an image, the apparatus being applied to a terminal, the apparatus comprising:
the image processing module is used for acquiring hue values and saturation values of pixel points in the target image;
the central processing module is used for determining a main hue interval of the target image according to the distribution condition of the hue values in the hue intervals; determining a main saturation interval of the target image according to the distribution condition of the saturation values in a plurality of saturation intervals corresponding to the main hue interval; inquiring to obtain a main hue value corresponding to the main hue interval and a main saturation value corresponding to the main saturation interval; determining a main hue of the target image according to the main hue value and the main saturation value, wherein the hue intervals are obtained by dividing a hue value range, and the hue value range comprises a part of the global hue value; the plurality of hue intervals are discontinuous; the saturation intervals are obtained by dividing a saturation value range, and the saturation value range comprises a part of the global saturation value; the plurality of saturation intervals are discontinuous.
12. The apparatus according to claim 11, wherein the graphics processing module is further configured to determine a hue interval to which each of the hue values belongs, and count a number of hue values falling into each of the hue intervals;
the central processing module is further configured to determine, as the dominant hue interval, a determination that the hue interval contains the largest number of hue values.
13. The apparatus according to claim 12, wherein the graphics processing module is further configured to determine a saturation interval to which each of the saturation values belongs, and count a number of saturation values falling into each of the saturation intervals;
the central processing module is further configured to determine, as the main saturation interval, that the saturation interval includes the largest number of saturation values.
14. A terminal, characterized in that it comprises a processor and a memory, in which at least one instruction is stored, which is loaded and executed by the processor to implement the method of acquiring a dominant hue of an image according to any one of claims 1 to 10.
15. A computer-readable storage medium having stored therein at least one instruction, which is loaded and executed by a processor, to implement the method of acquiring a dominant hue of an image as claimed in any one of claims 1 to 10.
CN201811192232.6A 2018-10-12 2018-10-12 Method and device for acquiring dominant tone of image and terminal Active CN109166159B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811192232.6A CN109166159B (en) 2018-10-12 2018-10-12 Method and device for acquiring dominant tone of image and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811192232.6A CN109166159B (en) 2018-10-12 2018-10-12 Method and device for acquiring dominant tone of image and terminal

Publications (2)

Publication Number Publication Date
CN109166159A CN109166159A (en) 2019-01-08
CN109166159B true CN109166159B (en) 2021-04-30

Family

ID=64878161

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811192232.6A Active CN109166159B (en) 2018-10-12 2018-10-12 Method and device for acquiring dominant tone of image and terminal

Country Status (1)

Country Link
CN (1) CN109166159B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109783178B (en) * 2019-01-24 2022-08-23 北京字节跳动网络技术有限公司 Color adjusting method, device, equipment and medium for interface component
CN109884703B (en) * 2019-03-20 2021-03-26 中国石油化工股份有限公司 Color plane attribute graph digitalization method based on HSV color model
CN110210532B (en) * 2019-05-15 2022-03-01 北京字节跳动网络技术有限公司 Background color generation method and device and electronic equipment
CN110377860B (en) * 2019-07-18 2023-08-25 百度(中国)有限公司 Page color adjustment method and device and electronic equipment
CN113254690A (en) * 2020-02-10 2021-08-13 华为技术有限公司 Thumbnail display method and equipment
CN111612857B (en) * 2020-05-28 2024-03-26 北京明略昭辉科技有限公司 Color acquisition method and device, electronic equipment and readable storage medium
CN112015417B (en) * 2020-09-01 2023-08-08 中国银行股份有限公司 Method and device for determining theme colors of application programs
CN112887694B (en) * 2021-01-26 2023-03-10 腾讯音乐娱乐科技(深圳)有限公司 Video playing method, device and equipment and readable storage medium
CN113542869A (en) * 2021-06-24 2021-10-22 北京小米移动软件有限公司 Display control method, display control device, and storage medium
CN113630655B (en) * 2021-08-13 2023-05-05 海信视像科技股份有限公司 Method for changing color of peripheral equipment along with picture color and display equipment
CN117461318A (en) * 2021-07-13 2024-01-26 海信视像科技股份有限公司 Display apparatus and control method thereof
CN113610185B (en) * 2021-08-19 2022-03-22 江西应用技术职业学院 Wood color sorting method based on dominant hue identification
CN116883610A (en) * 2023-09-07 2023-10-13 园测信息科技股份有限公司 Digital twin intersection construction method and system based on vehicle identification and track mapping

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819821A (en) * 2012-07-24 2012-12-12 浙江大学 Method for rapidly rematching colors of product appearance based on color style transfer
CN103513946A (en) * 2012-06-26 2014-01-15 腾讯科技(深圳)有限公司 Display control method and device
CN103618886A (en) * 2013-12-13 2014-03-05 厦门美图网科技有限公司 Shooting method for intelligently decoloring according to main color tone
CN106780634A (en) * 2016-12-27 2017-05-31 努比亚技术有限公司 Picture dominant tone extracting method and device
JP2018134413A (en) * 2018-02-21 2018-08-30 株式会社島津製作所 Imaging apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103513946A (en) * 2012-06-26 2014-01-15 腾讯科技(深圳)有限公司 Display control method and device
CN102819821A (en) * 2012-07-24 2012-12-12 浙江大学 Method for rapidly rematching colors of product appearance based on color style transfer
CN103618886A (en) * 2013-12-13 2014-03-05 厦门美图网科技有限公司 Shooting method for intelligently decoloring according to main color tone
CN106780634A (en) * 2016-12-27 2017-05-31 努比亚技术有限公司 Picture dominant tone extracting method and device
JP2018134413A (en) * 2018-02-21 2018-08-30 株式会社島津製作所 Imaging apparatus

Also Published As

Publication number Publication date
CN109166159A (en) 2019-01-08

Similar Documents

Publication Publication Date Title
CN109166159B (en) Method and device for acquiring dominant tone of image and terminal
CN109472839B (en) Image generation method and device, computer equipment and computer storage medium
CN108701351B (en) Image display enhancement method and device
US20070253640A1 (en) Image manipulation method and apparatus
CN110865862B (en) Page background setting method and device and electronic equipment
US7342585B2 (en) Use of an input overscaled bitmap to generate emboldened overscaled bitmap
CN109493826B (en) Electronic display boundary gain system and method
US8830251B2 (en) Method and system for creating an image
CN112114929B (en) Display device and image display method thereof
WO2024094077A1 (en) Cloud desktop image processing method, image processing method, device, and storage medium
CN108694733B (en) MCU-based display system and display method for overlaying dynamic images on background image
KR20060007054A (en) Method and system for supersampling rasterization of image data
CN110858388B (en) Method and device for enhancing video image quality
CN114138215B (en) Display method and related equipment
CN112184538B (en) Image acceleration method, related device, equipment and storage medium
US20240037701A1 (en) Image processing and rendering
CN113487478A (en) Image processing method, image processing device, storage medium and electronic equipment
CN111562955B (en) Method and device for configuring theme colors of terminal equipment and terminal equipment
US11017505B2 (en) System and method for applying antialiasing to images
KR20180037837A (en) Method and apparatus for determining the number of bits assigned a channel based on a variation of the channel
CN111862271A (en) Display area filling method, device, equipment and storage medium
US20170263037A1 (en) Image processing device, image processing system, image processing method, and non-transitory computer readable medium
CN116823972A (en) Information processing method
JP4708885B2 (en) Encoding device, portable terminal device, and pixel color information encoding method used therefor
JP5941207B1 (en) User interface program and computer mounting method

Legal Events

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