Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
A mobile terminal implementing various embodiments of the present invention will now be described with reference to the accompanying drawings. In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
The mobile terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a navigation device, and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. In the following, it is assumed that the terminal is a mobile terminal. However, it will be understood by those skilled in the art that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for moving purposes.
Fig. 1 is a schematic hardware structure of an optional mobile terminal for implementing various embodiments of the present invention.
The mobile terminal 100 may include a wireless communication unit 110, an a/V (audio/video) input unit 120, a user input unit 130, a sensing unit 140, an output unit 150, a memory 160, an interface unit 170, a controller 180, and a power supply unit 190, etc. Fig. 1 illustrates a mobile terminal having various components, but it is to be understood that not all illustrated components are required to be implemented. More or fewer components may alternatively be implemented. Elements of the mobile terminal will be described in detail below.
The wireless communication unit 110 typically includes one or more components that allow radio communication between the mobile terminal 100 and a wireless communication system or network. For example, the wireless communication unit may include at least one of a broadcast receiving module 111, a mobile communication module 112, a wireless internet module 113, a short-range communication module 114, and a location information module 115.
The broadcast receiving module 111 receives a broadcast signal and/or broadcast associated information from an external broadcast management server via a broadcast channel. The broadcast channel may include a satellite channel and/or a terrestrial channel. The broadcast management server may be a server that generates and transmits a broadcast signal and/or broadcast associated information or a server that receives a previously generated broadcast signal and/or broadcast associated information and transmits it to a terminal. The broadcast signal may include a TV broadcast signal, a radio broadcast signal, a data broadcast signal, and the like. Also, the broadcast signal may further include a broadcast signal combined with a TV or radio broadcast signal. The broadcast associated information may also be provided via a mobile communication network, and in this case, the broadcast associated information may be received by the mobile communication module 112. The broadcast signal may exist in various forms, for example, it may exist in the form of an Electronic Program Guide (EPG) of Digital Multimedia Broadcasting (DMB), an Electronic Service Guide (ESG) of digital video broadcasting-handheld (DVB-H), and the like. The broadcast receiving module 111 may receive a signal broadcast by using various types of broadcasting systems. In particular, the broadcast receiving module 111 may receive digital broadcasting by using a digital broadcasting system such as a digital broadcasting-terrestrial (DMB-T), digital multimedia broadcasting-satellite (DMB-S), digital video broadcasting-handheld (DVB-H), a data broadcasting system of forward link media (MediaFLO), a terrestrial digital broadcasting integrated service (ISDB-T), and the like. The broadcast receiving module 111 may be constructed to be suitable for various broadcasting systems that provide broadcast signals as well as the above-mentioned digital broadcasting systems. The broadcast signal and/or broadcast associated information received via the broadcast receiving module 111 may be stored in the memory 160 (or other type of storage medium).
The mobile communication module 112 transmits and/or receives radio signals to and/or from at least one of a base station (e.g., access point, node B, etc.), an external terminal, and a server. Such radio signals may include voice call signals, video call signals, or various types of data transmitted and/or received according to text and/or multimedia messages.
The wireless internet module 113 supports wireless internet access of the mobile terminal. The module may be internally or externally coupled to the terminal. The wireless internet access technology to which the module relates may include WLAN (wireless LAN) (Wi-Fi), Wibro (wireless broadband), Wimax (worldwide interoperability for microwave access), HSDPA (high speed downlink packet access), and the like.
The short-range communication module 114 is a module for supporting short-range communication. Some examples of short-range communication technologies include bluetoothTMRadio Frequency Identification (RFID), infrared data association (IrDA), Ultra Wideband (UWB), zigbeeTMAnd so on.
The location information module 115 is a module for checking or acquiring location information of the mobile terminal. A typical example of the location information module is a GPS (global positioning system). According to the current technology, the GPS module calculates distance information and accurate time information from three or more satellites and applies triangulation to the calculated information, thereby accurately calculating three-dimensional current location information according to longitude, latitude, and altitude. Currently, a method for calculating position and time information uses three satellites and corrects an error of the calculated position and time information by using another satellite. In addition, the GPS module can calculate speed information by continuously calculating current position information in real time.
The a/V input unit 120 is used to receive an audio or video signal. The a/V input unit 120 may include a camera 121 and a microphone 122, and the camera 121 processes image data of still pictures or video obtained by an image capturing apparatus in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 151. The image frames processed by the camera 121 may be stored in the memory 160 (or other storage medium) or transmitted via the wireless communication unit 110, and two or more cameras 1210 may be provided according to the construction of the mobile terminal. The microphone 122 may receive sounds (audio data) via the microphone in a phone call mode, a recording mode, a voice recognition mode, or the like, and can process such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the mobile communication module 112 in case of a phone call mode. The microphone 122 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The user input unit 130 may generate key input data according to a command input by a user to control various operations of the mobile terminal. The user input unit 130 allows a user to input various types of information, and may include a keyboard, dome sheet, touch pad (e.g., a touch-sensitive member that detects changes in resistance, pressure, capacitance, and the like due to being touched), scroll wheel, joystick, and the like. In particular, when the touch pad is superimposed on the display unit 151 in the form of a layer, a touch screen may be formed.
The sensing unit 140 detects a current state of the mobile terminal 100 (e.g., an open or closed state of the mobile terminal 100), a position of the mobile terminal 100, presence or absence of contact (i.e., touch input) by a user with the mobile terminal 100, an orientation of the mobile terminal 100, acceleration or deceleration movement and direction of the mobile terminal 100, and the like, and generates a command or signal for controlling an operation of the mobile terminal 100. For example, when the mobile terminal 100 is implemented as a slide-type mobile phone, the sensing unit 140 may sense whether the slide-type phone is opened or closed. In addition, the sensing unit 140 can detect whether the power supply unit 190 supplies power or whether the interface unit 170 is coupled with an external device.
The interface unit 170 serves as a connection through which at least one external device can be connected to the mobile terminal 100
And (4) a mouth. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The identification module may store various information for authenticating a user using the mobile terminal 100 and may include a User Identity Module (UIM), a Subscriber Identity Module (SIM), a Universal Subscriber Identity Module (USIM), and the like. In addition, a device having an identification module (hereinafter, referred to as an "identification device") may take the form of a smart card, and thus, the identification device may be connected with the mobile terminal 100 via a port or other connection means. The interface unit 170 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal and the external device.
In addition, when the mobile terminal 100 is connected with an external cradle, the interface unit 170 may serve as a path through which power is supplied from the cradle to the mobile terminal 100 or may serve as a path through which various command signals input from the cradle are transmitted to the mobile terminal. Various command signals or power input from the cradle may be used as signals for recognizing whether the mobile terminal is accurately mounted on the cradle. The output unit 150 is configured to provide output signals (e.g., audio signals, video signals, alarm signals, vibration signals, etc.) in a visual, audio, and/or tactile manner. The output unit 150 may include a display unit 151, an audio output module 152, and the like.
The display unit 151 may display information processed in the mobile terminal 100. For example, when the mobile terminal 100 is in a phone call mode, the display unit 151 may display a User Interface (UI) or a Graphical User Interface (GUI) related to a call or other communication (e.g., text messaging, multimedia file downloading, etc.). When the mobile terminal 100 is in a video call mode or an image capturing mode, the display unit 151 may display a captured image and/or a received image, a UI or GUI showing a video or an image and related functions, and the like.
Meanwhile, when the display unit 151 and the touch pad are overlapped with each other in the form of a layer to form a touch screen, the display unit 151 may serve as an input device and an output device. The display unit 151 may include at least one of a Liquid Crystal Display (LCD), a thin film transistor LCD (TFT-LCD), an Organic Light Emitting Diode (OLED) display, a flexible display, a three-dimensional (3D) display, and the like. Some of these displays may be configured to be transparent to allow a user to view from the outside, which may be referred to as transparent displays, and a typical transparent display may be, for example, a TOLED (transparent organic light emitting diode) display or the like. Depending on the particular desired implementation, the mobile terminal 100 may include two or more display units (or other display devices), for example, the mobile terminal may include an external display unit (not shown) and an internal display unit (not shown). The touch screen may be used to detect a touch input pressure as well as a touch input position and a touch input area.
The audio output module 152 may convert audio data received by the wireless communication unit 110 or stored in the memory 160 into an audio signal and output as sound when the mobile terminal is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output module 152 may provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output module 152 may include a speaker, a buzzer, and the like.
The memory 160 may store software programs and the like for processing and controlling operations performed by the controller 180, or may temporarily store data (e.g., a phonebook, messages, still images, videos, and the like) that has been or will be output. Also, the memory 160 may store data regarding various ways of vibration and audio signals output when a touch is applied to the touch screen.
The memory 160 may include at least one type of storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. Also, the mobile terminal 100 may cooperate with a network storage device that performs a storage function of the memory 160 through a network connection.
The controller 180 generally controls the overall operation of the mobile terminal. For example, the controller 180 performs control and processing related to voice calls, data communications, video calls, and the like. In addition, the controller 180 may include a multimedia module 181 for reproducing (or playing back) multimedia data, and the multimedia module 181 may be constructed within the controller 180 or may be constructed separately from the controller 180. The controller 180 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as a character or an image.
The power supply unit 190 receives external power or internal power and provides appropriate power required to operate various elements and components under the control of the controller 180.
The various embodiments described herein may be implemented in a computer-readable medium using, for example, computer software, hardware, or any combination thereof. For a hardware implementation, the embodiments described herein may be implemented using at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a processor, a controller, a microcontroller, a microprocessor, an electronic unit designed to perform the functions described herein, and in some cases, such embodiments may be implemented in the controller 180. For a software implementation, the implementation such as a process or a function may be implemented with a separate software module that allows performing at least one function or operation. The software codes may be implemented by software applications (or programs) written in any suitable programming language, which may be stored in the memory 160 and executed by the controller 180.
Up to this point, mobile terminals have been described in terms of their functionality. Hereinafter, a slide-type mobile terminal among various types of mobile terminals, such as a folder-type, bar-type, swing-type, slide-type mobile terminal, and the like, will be described as an example for the sake of brevity. Accordingly, the present invention can be applied to any type of mobile terminal, and is not limited to a slide type mobile terminal.
The mobile terminal 100 as shown in fig. 1 may be configured to operate with communication systems such as wired and wireless communication systems and satellite-based communication systems that transmit data via frames or packets.
A communication system in which a mobile terminal according to the present invention is operable will now be described with reference to fig. 2.
Such communication systems may use different air interfaces and/or physical layers. For example, the air interface used by the communication system includes, for example, Frequency Division Multiple Access (FDMA), Time Division Multiple Access (TDMA), Code Division Multiple Access (CDMA), and Universal Mobile Telecommunications System (UMTS) (in particular, Long Term Evolution (LTE)), global system for mobile communications (GSM), and the like. By way of non-limiting example, the following description relates to a CDMA communication system, but such teachings are equally applicable to other types of systems.
Referring to fig. 2, the CDMA wireless communication system may include a plurality of mobile terminals 100, a plurality of Base Stations (BSs) 270, Base Station Controllers (BSCs) 275, and a Mobile Switching Center (MSC) 280. The MSC280 is configured to interface with a Public Switched Telephone Network (PSTN) 290. The MSC280 is also configured to interface with a BSC275, which may be coupled to the base station 270 via a backhaul. The backhaul may be constructed according to any of several known interfaces including, for example, E1/T1, ATM, IP, PPP, frame Relay, HDSL, ADSL, or xDSL. It will be understood that a system as shown in fig. 2 may include multiple BSCs 2750.
Each BS270 may serve one or more sectors (or regions), each sector covered by a multi-directional antenna or an antenna pointing in a particular direction being radially distant from the BS 270. Alternatively, each partition may be covered by two or more antennas for diversity reception. Each BS270 may be configured to support multiple frequency allocations, with each frequency allocation having a particular frequency spectrum (e.g., 1.25MHz,5MHz, etc.).
The intersection of partitions with frequency allocations may be referred to as a CDMA channel. The BS270 may also be referred to as a Base Transceiver Subsystem (BTS) or other equivalent terminology. In such a case, the term "base station" may be used to generically refer to a single BSC275 and at least one BS 270. The base stations may also be referred to as "cells". Alternatively, each sector of a particular BS270 may be referred to as a plurality of cell sites.
As shown in fig. 2, a Broadcast Transmitter (BT)295 transmits a broadcast signal to the mobile terminal 100 operating within the system. A broadcast receiving module 111 as shown in fig. 1 is provided at the mobile terminal 100 to receive a broadcast signal transmitted by the BT 295. In fig. 2, several Global Positioning System (GPS) satellites 300 are shown. The satellite 300 assists in locating at least one of the plurality of mobile terminals 100.
In fig. 2, a plurality of satellites 300 are depicted, but it is understood that useful positioning information may be obtained with any number of satellites. The location information module 115 as shown in fig. 1 is generally configured to cooperate with satellites 300 to obtain desired positioning information, and a typical example of the location information module 115 is GPS. Other techniques that can track the location of the mobile terminal may be used instead of or in addition to GPS tracking techniques. In addition, at least one GPS satellite 300 may selectively or additionally process satellite DMB transmission.
As a typical operation of the wireless communication system, the BS270 receives reverse link signals from various mobile terminals 100. The mobile terminal 100 is generally engaged in conversations, messaging, and other types of communications. Each reverse link signal received by a particular base station 270 is processed within the particular BS 270. The obtained data is forwarded to the associated BSC 275. The BSC provides call resource allocation and mobility management functions including coordination of soft handoff procedures between BSs 270. The BSCs 275 also route the received data to the MSC280, which provides additional routing services for interfacing with the PSTN 290. Similarly, the PSTN290 interfaces with the MSC280, the MSC interfaces with the BSCs 275, and the BSCs 275 accordingly control the BS270 to transmit forward link signals to the mobile terminal 100.
Based on the above mobile terminal hardware structure and communication system, the present invention provides various embodiments of the method.
Referring to fig. 3, a schematic diagram of a functional module of a mobile terminal according to a first embodiment of the present invention includes:
an obtaining module 301, configured to obtain a screenshot picture of a display interface according to an operation performed by a user if it is detected that the operation performed by the user is a preset color extraction trigger operation;
in the embodiment of the present invention, a user may trigger the mobile terminal to execute a corresponding function in an interactive manner with the mobile terminal, specifically, the user may operate the display interface of the mobile terminal through actions such as clicking, sliding, long pressing, and the like, and after detecting an operation executed by the user, the mobile terminal executes a function corresponding to the operation, for example, when the mobile terminal detects that the user clicks an icon of an application program on the display interface of the mobile terminal, the application program is started.
If the mobile terminal detects that the operation performed by the user is a preset color extraction triggering operation, the obtaining module 301 obtains a screenshot picture of the display interface according to the operation performed by the user.
An extracting module 302, configured to extract a target color from the screenshot picture;
in the embodiment of the present invention, the preset color extraction triggering operation may be a function of only triggering the obtaining module 301 to obtain the screenshot picture of the display interface and the extracting module 302 to extract the target color from the screenshot picture, for example, a virtual button for triggering color extraction may be set on the display interface, and a user may execute the color extraction triggering operation by clicking the virtual button, or an entity button for triggering color extraction may be set on the mobile terminal, and a user may execute the color extraction triggering operation by pressing the entity button in a preset manner.
Alternatively, the preset color extraction triggering operation may be an operation of additionally triggering a color extraction function on the basis of one or more functions already provided. For example, when the user performs an operation of closing an application, the general function is that the mobile terminal closes the application, and the operation of closing the application is further provided with a function of triggering color extraction, that is, the operation of closing the application is also a color extraction triggering operation.
The replacing module 303 is configured to, if the starting operation of the first application program is detected, replace the theme color of the first application program according to the target color when the first application program is started.
In this embodiment of the present invention, after the extracting module 302 extracts the target color, if the user clicks an icon of the first application on the display interface, that is, the user executes the starting operation of the first application, the mobile terminal starts the first application after detecting the starting operation of the first application, and in the starting process of the first application, the replacing module 303 replaces the target color with the theme color of the first application, so that the displayed theme color is the target color extracted by the extracting module 302 after the first application is started.
Optionally, after extracting the target color, the extracting module 302 may further cache the target color in the cache space, so that the replacing module 303 may read the target color from the cache space and implement the replacement of the theme color of the first application.
It should be noted that, in the embodiment of the present invention, after the extraction module 302 extracts the target color, if the mobile terminal detects that the operation performed by the user is the preset color extraction triggering operation, the operation returns to the acquisition module 301, the target module 301 acquires the screenshot picture, the extraction module 302 extracts the target color from the screenshot picture, and the target color extracted this time is replaced by the target color extracted last time.
In the embodiment of the present invention, when it is detected that the operation performed by the user is the preset color extraction triggering operation, the obtaining module 301 in the mobile terminal obtains the screenshot picture of the display interface according to the operation performed by the user, and the extracting module 302 extracts the target color from the screenshot picture, and if the starting operation of the first application is detected, the replacing module 303 replaces the theme color of the first application according to the target color when the first application is started, so that the theme color of the application changes when the application is started each time, thereby effectively adjusting the theme color and improving the user experience.
Referring to fig. 4, a schematic diagram of a detailed functional module of the obtaining module 301 in the first embodiment shown in fig. 3 is shown, which includes:
the obtaining module 301 includes:
the first capture module 401 is configured to capture a picture of a display interface after the desktop wallpaper, the lock screen wallpaper, or the desktop theme color is changed, and use the captured picture as a capture picture, if it is detected that the operation performed by the user is a change operation of the desktop wallpaper, the lock screen wallpaper, or the desktop theme color.
A second capture module 402, configured to capture, if it is detected that the operation performed by the user is a closing operation of a second application running in the foreground, a picture of the display interface before the second application is closed, and use the captured picture as a screenshot picture.
In the embodiment of the present invention, the preset color extraction triggering operation may be a replacement operation of a desktop wallpaper, a lock screen wallpaper, or a desktop theme color, or a closing operation of a second application program running in the foreground.
When it is detected that the operation performed by the user is a change operation of desktop wallpaper, lock screen wallpaper, or desktop theme color, the first capture module 401 captures a picture of the display interface after the change of the desktop wallpaper, lock screen wallpaper, or desktop theme color, and takes the captured picture as a capture picture. Because the user changes the desktop wallpaper or the lock screen wallpaper or the desktop theme color according to personal preference, the screenshot picture obtained based on the above-mentioned change operation of the user also includes the color preferred by the user, so that the extraction module 302 can extract the color preferred by the user from the screenshot picture as the target color, and the extracted color is changed into the first application program after being started by the change module 303, so that the theme color displayed after the first application program is started is the color preferred by the user, and better use experience is provided for the user.
When it is detected that the operation performed by the user is a closing operation of the second application running in the foreground, the second capture module 402 captures a picture of the display interface before the second application is closed, the captured picture is used as a screenshot picture, and the extraction module 302 extracts a target color from the screenshot picture, so that the theme color of the started application can be determined based on the screenshot picture before the previous closed application is closed, and better use experience can be provided for the user.
In the embodiment of the present invention, the preset color extraction triggering operation is a replacement operation of a desktop wallpaper, a lock screen wallpaper, or a desktop theme color, or a closing operation of a second application program running in a foreground, and when a user performs the above operations, the first capture module 401 or the second capture module 402 captures a picture of a display interface, and the extraction module 302 extracts a target color, so that when the second application program is started, the theme color of the second application program can be replaced by using the extracted target color, thereby effectively implementing adjustment of the theme color and improving user experience.
Referring to fig. 5, a schematic diagram of a refinement function module of the extraction module 302 in the embodiment of fig. 3 of the present invention is shown, wherein the extraction module 302 includes:
the processing module 501 is configured to count the occurrence frequency of each color in the screenshot picture by using a preset graph quantization algorithm, and use a color whose occurrence frequency is ranked in the top N in the screenshot picture as a color to be selected, where N is a positive integer;
in this embodiment of the present invention, after the obtaining module 301 obtains the screenshot picture, the processing module 501 uses a preset graph quantization algorithm to count the occurrence frequency of each color in the screenshot picture, and uses the color whose occurrence frequency is listed in the top N in the screenshot picture as the color to be selected, where N is a positive integer.
The preset graph quantization algorithm is to extract the color of each pixel point on the screenshot picture and calculate the times of the same color.
A calculating module 502, configured to calculate a weight value of a color to be selected according to vividness and color heat of the color to be selected;
in the embodiment of the invention, the mobile terminal can take the saturation and the chroma of the color to be selected as parameters and calculate the vividness of the color to be selected by utilizing the preset RGB model. Or, a corresponding relation table between the color value and the vividness is preset in the mobile terminal, and the vividness of the color to be selected can be determined by searching the corresponding relation table between the preset color value and the vividness through the color value of the color to be selected.
The mobile terminal is also preset with a corresponding relation table between the color value and the color heat, and the corresponding relation table between the color value and the color heat can be searched through the color value of the color to be selected to determine the color heat of the color to be selected.
The color heat is a popularity of a color obtained based on the frequency of use of all colors in the palette.
In the embodiment of the present invention, the calculating module 502 calculates the weight value of the color to be selected according to the vividness and the color heat of the color to be selected.
Specifically, the method comprises the following steps: the mobile terminal pre-stores a first corresponding relation table between the vividness of the color and the first weight coefficient and a second corresponding relation table between the color heat of the color and the second weight coefficient, and the mobile terminal searches the first corresponding relation table by using the vividness of the color to be selected, determines the first weight coefficient of the color to be selected, searches the second corresponding relation table by using the color heat of the color to be selected, determines a second weight system of the color to be selected, and calculates the weight value of the color to be selected according to the first weight coefficient and the second weight coefficient.
The color determining module 503 is configured to determine a target color according to a weight value of the color to be selected.
In this embodiment of the present invention, after the calculating module 502 obtains the weight value of the color to be selected, the color determining module 503 determines the target color according to the weight value of the color to be selected, which may specifically be: and selecting the color with the largest weight value from the colors to be selected as the target color, or selecting the color obtained by mixing the color with the largest weight value and the color with the second largest weight value from the colors to be selected as the target color.
In the embodiment of the present invention, the processing module 501 counts the occurrence frequency of each color in the screenshot picture by using a preset graph quantization algorithm, uses the color whose occurrence frequency is ranked in the top N in the screenshot picture as the color to be selected, calculates the weight value of the color to be selected by the calculating module 502 according to the vividness and the color heat of the color to be selected, and finally determines the target color by the color determining module 503 according to the weight value of the color to be selected, so as to effectively achieve the purpose of extracting the target color from the screenshot picture.
Please refer to fig. 6, which is a flowchart illustrating a color adjustment method according to a second embodiment of the present invention, the method includes:
601, if the operation executed by the user is detected to be a preset color extraction triggering operation, acquiring a screenshot picture of a display interface according to the operation executed by the user;
in the embodiment of the present invention, a user may trigger the mobile terminal to execute a corresponding function in an interactive manner with the mobile terminal, specifically, the user may operate the display interface of the mobile terminal through actions such as clicking, sliding, long pressing, and the like, and after detecting an operation executed by the user, the mobile terminal executes a function corresponding to the operation, for example, when the mobile terminal detects that the user clicks an icon of an application program on the display interface of the mobile terminal, the application program is started.
If the mobile terminal detects that the operation executed by the user is the preset color extraction triggering operation, the mobile terminal acquires the screenshot picture of the display interface according to the operation executed by the user.
Step 602, extracting a target color from the screenshot picture;
in the embodiment of the present invention, the preset color extraction triggering operation may only have a function of triggering the mobile terminal to execute step 601 and step 602, for example, a virtual button for triggering color extraction may be set on the display interface, and a user clicks the virtual button to execute the color extraction triggering operation, or an entity button with color extraction triggering function may be set on the mobile terminal, and a user presses the entity button in a preset manner to execute the color extraction triggering operation.
Alternatively, the preset color extraction triggering operation may be an operation of additionally triggering a color extraction function on the basis of one or more functions already provided. For example, when the user performs an operation of closing an application, the general function is that the mobile terminal closes the application, and the operation of closing the application is further provided with a function of triggering color extraction, that is, the operation of closing the application is also a color extraction triggering operation.
Step 603, if the starting operation of the first application program is detected, when the first application program is started, replacing the theme color of the first application program according to the target color.
In the embodiment of the present invention, after the mobile terminal extracts the target color, if the user clicks an icon of the first application program on the display interface, that is, the user executes the start operation of the first application program, the mobile terminal starts the first application program after detecting the start operation of the first application program, and in the start process of the first application program, the mobile terminal replaces the target color with the theme color of the first application program, so that the theme color displayed after the first application program is started is the extracted target color.
Optionally, after the target color is extracted, the target color may be cached in the cache space, so that the mobile terminal may read the target color from the cache space and implement the replacement of the theme color of the first application.
It should be noted that, in the embodiment of the present invention, if the mobile terminal detects that the operation performed by the user is the preset color extraction trigger operation after completing the extraction of the target color once, the process returns to step 601, and executes step 601 and step 602 to complete the extraction of the target color and replace the target color extracted this time with the target color extracted last time.
In the embodiment of the invention, when the operation executed by the user is detected to be the preset color extraction triggering operation, the mobile terminal acquires the screenshot picture of the display interface according to the operation executed by the user, extracts the target color from the screenshot picture, and if the starting operation of the first application program is detected, the theme color of the first application program is replaced according to the target color when the first application program is started, so that the theme color of the application program is changed when the application program is started every time, the adjustment of the theme color is effectively realized, and the user experience is improved.
Optionally, in the embodiment of the present invention, if the preset color extraction triggering operation is an operation for additionally triggering a color extraction function on the basis of one or more functions, the preset color extraction triggering operation may be a replacing operation of a desktop wallpaper, a lock screen wallpaper, or a desktop theme color, and after the user performs the replacing operation, the user may not only replace the desktop wallpaper, the lock screen wallpaper, or the desktop theme color, but also trigger the mobile terminal to capture a picture of a replaced display interface, so step 601 in the second embodiment shown in fig. 6 specifically is:
if the operation executed by the user is detected to be the replacement operation of the desktop wallpaper, the screen locking wallpaper or the desktop theme color, the picture of the display interface after the desktop wallpaper, the screen locking wallpaper or the desktop theme color is replaced is captured, and the captured picture is used as the screenshot picture.
In the embodiment of the invention, because the user changes the desktop wallpaper or the screen locking wallpaper or the desktop theme color according to personal preference, the screenshot picture obtained based on the user's changing operation also contains the preferred color of the user, so that the mobile terminal can extract the preferred color of the user from the screenshot picture as the target color, and change the target color into the theme color of the started first application program, so that the theme color displayed after the first application program is started is the preferred color of the user, and better use experience is provided for the user.
Optionally, in this embodiment of the present invention, if the preset color extraction triggering operation is an operation for additionally triggering a color extraction function on the basis of one or more functions, the preset color extraction triggering operation may be a closing operation of a second application running in the foreground, and after the user executes the closing operation of the second application, the user will not only close the second application, but also trigger the mobile terminal to capture a picture of a display interface before the second application is closed, so step 601 in the second embodiment shown in fig. 6 is specifically:
and if the operation executed by the user is detected to be the closing operation of the second application program running in the foreground, intercepting the picture of the display interface before the second application program is closed, and taking the intercepted picture as the screenshot picture.
In the embodiment of the invention, by intercepting the picture of the display interface before the second application program is closed and extracting the target color based on the intercepted picture, the theme color of the started first application program can be determined based on the intercepted picture before the second application program is closed, and the user experience is effectively improved.
Referring to fig. 7, a flowchart of a refining step for extracting a target color from a screenshot picture in step 602 in the embodiment shown in fig. 6 of the present invention includes:
701, counting the occurrence frequency of each color in the screenshot picture by using a preset graph quantization algorithm, and taking the color with the occurrence frequency arranged in the front N in the screenshot picture as a color to be selected, wherein N is a positive integer;
in the embodiment of the invention, after the screenshot picture is obtained, the mobile terminal utilizes a preset graph quantization algorithm to count the occurrence times of each color in the screenshot picture, and takes the color with the occurrence times arranged in the front N in the screenshot picture as the color to be selected, wherein N is a positive integer.
The preset graph quantization algorithm is to extract the color of each pixel point on the screenshot picture and calculate the times of the same color.
Step 702, calculating a weight value of the color to be selected according to the vividness and the heat of the color to be selected;
and 703, determining a target color according to the weight value of the color to be selected.
In the embodiment of the invention, the mobile terminal can take the saturation and the chroma of the color to be selected as parameters and calculate the vividness of the color to be selected by utilizing the preset RGB model. Or, a corresponding relation table between the color value and the vividness is preset in the mobile terminal, and the vividness of the color to be selected can be determined by searching the corresponding relation table between the preset color value and the vividness through the color value of the color to be selected.
The mobile terminal is also preset with a corresponding relation table between the color value and the color heat, and the corresponding relation table between the color value and the color heat can be searched through the color value of the color to be selected to determine the color heat of the color to be selected.
The color heat is a popularity of a color obtained based on the frequency of use of all colors in the palette.
In the embodiment of the invention, the mobile terminal calculates the weight value of the color to be selected according to the vividness and the heat of the color to be selected.
Specifically, the method comprises the following steps: the mobile terminal pre-stores a first corresponding relation table between the vividness of the color and the first weight coefficient and a second corresponding relation table between the color heat of the color and the second weight coefficient, and the mobile terminal searches the first corresponding relation table by using the vividness of the color to be selected, determines the first weight coefficient of the color to be selected, searches the second corresponding relation table by using the color heat of the color to be selected, determines a second weight system of the color to be selected, and calculates the weight value of the color to be selected according to the first weight coefficient and the second weight coefficient.
In the embodiment of the present invention, after obtaining the weight value of the color to be selected, the mobile terminal determines the target color according to the weight value of the color to be selected, which may specifically be: and selecting the color with the largest weight value from the colors to be selected as the target color, or selecting the color obtained by mixing the color with the largest weight value and the color with the second largest weight value from the colors to be selected as the target color.
In the embodiment of the invention, the mobile terminal utilizes a preset graph quantization algorithm to count the occurrence frequency of each color in the screenshot picture, takes the color with the occurrence frequency arranged in the front N in the screenshot picture as the color to be selected, calculates the weight value of the color to be selected according to the vividness and the color heat of the color to be selected, and determines the target color according to the weight value of the color to be selected, so that the aim of extracting the target color from the screenshot picture can be effectively realized.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.