WO2016023407A1 - 一种实现图像的滤镜效果的方法、装置及服务器 - Google Patents

一种实现图像的滤镜效果的方法、装置及服务器 Download PDF

Info

Publication number
WO2016023407A1
WO2016023407A1 PCT/CN2015/083492 CN2015083492W WO2016023407A1 WO 2016023407 A1 WO2016023407 A1 WO 2016023407A1 CN 2015083492 W CN2015083492 W CN 2015083492W WO 2016023407 A1 WO2016023407 A1 WO 2016023407A1
Authority
WO
WIPO (PCT)
Prior art keywords
filter effect
algorithm
basic algorithm
basic
user
Prior art date
Application number
PCT/CN2015/083492
Other languages
English (en)
French (fr)
Inventor
包立
Original Assignee
北京金山网络科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京金山网络科技有限公司 filed Critical 北京金山网络科技有限公司
Publication of WO2016023407A1 publication Critical patent/WO2016023407A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration

Definitions

  • the present application relates to the field of image processing technologies, and in particular, to a method, an apparatus, and a server for implementing a filter effect of an image.
  • the present application provides a method, device and server for realizing a filter effect of an image, which can improve the development efficiency of the filter effect.
  • the present application provides a method of implementing a filter effect of an image, comprising:
  • the basic algorithm for implementing the selected filter effect and the execution sequence of the basic algorithm executing the basic algorithm to process the image to be processed, thereby generating the user The image of the selected filter effect.
  • performing the basic algorithm to process the image to be processed according to a basic algorithm for implementing the selected filter effect and an execution sequence of the basic algorithm Determining, according to the filter effect selected by the user, a basic algorithm for implementing the selected filter effect and an execution sequence of the basic algorithm; The determined execution sequence of the underlying algorithm executes the determined underlying algorithm to process the image to be processed.
  • determining, according to the filter effect selected by the user, a basic algorithm for implementing the selected filter effect and an execution sequence of the basic algorithm including: according to the filter effect selected by the user, Finding a basic algorithm for implementing the filter effect and an execution sequence of the basic algorithm in a preset local database; performing the determined basic algorithm according to an execution order of the determined basic algorithm to thereby process an image to be processed
  • the processing includes: performing, according to the searched basic algorithm and the execution order of the basic algorithm, the basic algorithm of the search according to the executed execution order of the found basic algorithm to process the image to be processed.
  • determining, according to the filter effect selected by the user, a basic algorithm for implementing the selected filter effect and an execution sequence of the basic algorithm including: according to the filter effect selected by the user, The server sends a filter effect implementation request; the filter effect implementation carries an identifier of the filter effect selected by the user; and receives response information returned by the server, where the response information carries the server according to the Determining, by the identifier of the filter effect selected by the user, a basic algorithm required to implement the filter effect selected by the user and an execution sequence of the basic algorithm; parsing the response information to obtain the user The underlying algorithm required for the selected filter effect and the execution order of the underlying algorithm.
  • the method for implementing a filter effect of an image further includes: the response message is set to a form of a text file, wherein the text file records a basis required to implement a filter effect selected by the user.
  • the algorithm and the execution order of the underlying algorithm are described in detail below.
  • the method for implementing a filter effect of an image further includes: locally storing the obtained basic algorithm required to implement the filter effect selected by the user and the execution order of the basic algorithm locally.
  • the method for implementing a filter effect of an image further includes: receiving a filter effect update message sent by the server; performing a locally saved basic algorithm required to implement a filter effect and/or performing the basic algorithm Update in order.
  • executing the determined basic algorithm according to the determined execution order of the basic algorithm to process the image to be processed includes: according to the determined basic algorithm, from a locally pre-stored basic algorithm library Acquiring the determined basic algorithm, and executing the acquired basic algorithm in accordance with the determined execution order of the basic algorithm to process the image to be processed.
  • the basic algorithm includes at least one of the following algorithms: a saturation algorithm, a tone algorithm, a superposition algorithm, a linear dodge algorithm, a color dodge algorithm, a positive film bottom algorithm, a soft light algorithm, a strong light algorithm, Tone curve algorithm.
  • the basic algorithm for realizing the filter effect selected by the user processes the image to be processed according to the execution order of the basic algorithm to generate an image with a corresponding filter effect.
  • the basic algorithm is reused, and the new filter effect is realized by processing the basic algorithms in different execution orders, thereby It can quickly and easily develop different filter effects and improve the development efficiency of filter effects.
  • the present application provides an apparatus for implementing a filter effect of an image, comprising: a receiving unit for receiving an instruction for a user to select a filter effect; and a processing unit for selecting a filter according to the user Effects, in accordance with a base algorithm implementing the selected filter effect and an execution order of the base algorithm, executing the base algorithm to process an image to be processed, thereby generating an image having the filter effect selected by the user.
  • the processing unit includes: a determining module, configured to determine, according to the filter effect selected by the user, a basic algorithm for implementing the selected filter effect and an execution sequence of the basic algorithm;
  • the determined base algorithm is executed in accordance with the determined execution order of the base algorithm to process the image to be processed.
  • the determining module includes: a searching submodule, configured to search, according to the filter effect selected by the user, a basic algorithm for implementing the filter effect and execution of the basic algorithm from a preset local database.
  • a processing module configured to execute, according to the executed basic algorithm and the execution order of the basic algorithm, the basic algorithm of the search according to the executed execution order of the found basic algorithm, thereby performing an image to be processed Process it.
  • the determining module includes: a sending submodule, configured to send a filter effect implementation request to the server according to the filter effect selected by the user; and the filter effect implementation request carries the user selected An identifier of the filter effect; the receiving submodule is configured to receive the response information returned by the server, where the response information carries the identifier that is found by the server according to the identifier of the filter effect selected by the user, and implements the user a basic algorithm required for the selected filter effect and an execution order of the basic algorithm; a parsing sub-module for parsing the response information to obtain a basic algorithm required to implement the filter effect of the household selection and The execution order of the basic algorithm.
  • the receiving submodule is configured to receive a response message in the form of a text file returned by the server, where the text file records a basic algorithm required to implement the filter effect selected by the user, and the The order in which the underlying algorithms are executed.
  • the determining module further includes: a storage submodule, configured to locally save the obtained basic algorithm required to implement the filter effect selected by the user and an execution sequence of the basic algorithm.
  • the receiving submodule is further configured to receive a filter effect update message sent by the server, where the determining module further includes: an update submodule, configured to save the local update according to the filter effect The underlying algorithm required for the filter effect and/or the execution order of the underlying algorithm is updated.
  • the processing module includes: an obtaining submodule, configured to obtain the determined basic algorithm from a locally pre-stored basic algorithm library according to the determined basic algorithm; and execute a submodule for performing according to the The execution sequence of the determined underlying algorithm executes the acquired underlying algorithm to process the image to be processed.
  • the basic algorithm includes at least one of the following algorithms: a saturation algorithm, a tone algorithm, a superposition algorithm, a linear dodge algorithm, a color dodge algorithm, a positive film bottom algorithm, a soft light algorithm, a strong light algorithm, Tone curve algorithm.
  • the processing unit processes the image to be processed according to the execution order of the basic algorithm to generate a filter having the corresponding filter effect.
  • Image so that when there is a new filter effect
  • the basic algorithm is reused, and the new algorithm is implemented by processing the images in different execution orders, thereby enabling different filters to be developed quickly and easily.
  • the mirror effect improves the development efficiency of the filter effect.
  • the present application provides a method of implementing a filter effect of an image, comprising:
  • the receiving client device implements a request according to the filter effect selected by the user, and the filter effect implements the identifier of the filter effect carried by the user in the request;
  • a response message carrying the found basic algorithm required to implement the filter effect of the user selection and the execution order of the basic algorithm is returned.
  • the response message carrying the searched basic algorithm required to implement the filter effect of the user selection and the execution sequence of the basic algorithm is returned, including: the search will be carried
  • the response message to the basic algorithm required to implement the filter effect selected by the user and the execution order of the basic algorithm is returned in the form of a text file.
  • the method for implementing a filter effect of an image further includes: updating a basic algorithm required to implement a filter effect and/or an execution order of the basic algorithm.
  • the method includes: sending a filter effect update message to the client device, the filter effect
  • the update message indicates the underlying algorithm required for the updated filter effect and/or the execution order of the underlying algorithm.
  • the basic algorithm includes at least one of the following algorithms: a saturation algorithm, a tone algorithm, a superposition algorithm, a linear dodge algorithm, a color dodge algorithm, a positive film bottom algorithm, a soft light algorithm, a strong light algorithm, Tone curve algorithm.
  • a method for implementing a filter effect of an image searching for a basic algorithm required to implement the filter effect and an execution sequence of the basic algorithm according to an identifier of a filter effect selected by a user, and returning to the client device
  • For the client device to enter the image to be processed Line processing to generate an image with the corresponding filter effect, so that when there is a new filter effect, there is no need to update the lengthy code, but the basic algorithm is reused, and the basic algorithms are arranged in different execution orders.
  • the image is processed and the corresponding filter effect is generated, so that different filter effects can be developed quickly and conveniently, and the development efficiency of the filter effect of the image is improved.
  • the application provides a server, including: a receiving unit, configured to receive a filter effect implementation request sent by a client device according to a filter effect selected by a user, where the filter effect implementation request carries a user An identifier of the selected filter effect; a searching unit, configured to search for a basic algorithm required to implement the filter effect selected by the user and an execution sequence of the basic algorithm according to the identifier of the filter effect in the request; And returning a response message carrying the found-up basic algorithm required to implement the filter effect of the user selection and the execution order of the basic algorithm.
  • the returning unit is configured to carry a response message of the basic algorithm required to implement the searched filter effect and the execution sequence of the basic algorithm to a text file The form returns.
  • the server further includes: an updating unit, configured to update a basic algorithm required to implement the filter effect and/or an execution order of the basic algorithm.
  • an updating unit configured to update a basic algorithm required to implement the filter effect and/or an execution order of the basic algorithm.
  • the server further includes: the returning unit, configured to send a filter effect update message to the client device, where the filter effect update message indicates a basic algorithm required for the updated filter effect and/or Or the execution order of the underlying algorithm.
  • the returning unit configured to send a filter effect update message to the client device, where the filter effect update message indicates a basic algorithm required for the updated filter effect and/or Or the execution order of the underlying algorithm.
  • the basic algorithm includes at least one of the following algorithms: a saturation algorithm, a tone algorithm, a superposition algorithm, a linear dodge algorithm, a color dodge algorithm, a positive film bottom algorithm, a soft light algorithm, a strong light algorithm, Tone curve algorithm.
  • the searching unit searches for the basic algorithm required to implement the filter effect and the execution sequence of the basic algorithm according to the identifier of the filter effect selected by the user, and returns to the client device by the return unit.
  • the client device processes the image to be processed to generate an image with a corresponding filter effect, so that when there is a new filter effect, it is not necessary to update the lengthy code, but instead, the basic algorithm is reused.
  • Foundation The algorithm processes the image according to different execution order and generates corresponding filter effects, so that different filter effects can be developed quickly and conveniently, and the development efficiency of the filter effect of the image is improved.
  • an embodiment of the present application further provides a storage medium, where the storage medium is used to store an application for executing an image implementing filter described in the present application at runtime.
  • the method for implementing the filter effect of the image described in the present application includes:
  • the basic algorithm for implementing the selected filter effect and the execution sequence of the basic algorithm executing the basic algorithm to process the image to be processed, thereby generating the user The image of the selected filter effect.
  • an embodiment of the present application further provides an application, where the application is used to execute a method for implementing a filter effect of an image according to the present application at runtime.
  • the method for implementing the filter effect of the image described in the present application includes:
  • the basic algorithm for implementing the selected filter effect and the execution sequence of the basic algorithm executing the basic algorithm to process the image to be processed, thereby generating the user The image of the selected filter effect.
  • the embodiment of the present application further provides a terminal, including:
  • processor a memory, a communication interface, and a bus
  • the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
  • the basic algorithm for implementing the selected filter effect and the execution sequence of the basic algorithm executing the basic algorithm to process the image to be processed, thereby generating the user The image of the selected filter effect.
  • an embodiment of the present application further provides a storage medium, where the storage medium is used to store an application for executing an image implementing filter described in the present application at runtime.
  • the method for implementing the filter effect of the image described in the present application includes:
  • the receiving client device implements a request according to the filter effect selected by the user, and the filter effect implements the identifier of the filter effect carried by the user in the request;
  • a response message carrying the found basic algorithm required to implement the filter effect of the user selection and the execution order of the basic algorithm is returned.
  • an embodiment of the present application further provides an application, where the application is used to execute a method for implementing a filter effect of an image according to the present application at runtime.
  • the method for implementing the filter effect of the image described in the present application includes:
  • the receiving client device implements a request according to the filter effect selected by the user, and the filter effect implements the identifier of the filter effect carried by the user in the request;
  • a response message carrying the found basic algorithm required to implement the filter effect of the user selection and the execution order of the basic algorithm is returned.
  • the embodiment of the present application further provides a server, including:
  • processor a memory, a communication interface, and a bus
  • the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
  • the receiving client device implements a request according to the filter effect selected by the user, and the filter effect implements the identifier of the filter effect carried by the user in the request;
  • a response message carrying the found basic algorithm required to implement the filter effect of the user selection and the execution order of the basic algorithm is returned.
  • FIG. 1 is a schematic flow chart of an embodiment of a method for implementing a filter effect of an image according to the present application
  • FIG. 2 is a schematic structural diagram of an apparatus for implementing a filter effect of an image according to an embodiment of the present application
  • FIG. 3 is a schematic structural diagram of another embodiment of an apparatus for implementing a filter effect of an image according to the present application
  • FIG. 4 is a schematic structural diagram of another embodiment of an apparatus for implementing a filter effect of an image according to the present application
  • FIG. 5 is a schematic flowchart diagram of an embodiment of a method for implementing a filter effect of an image according to the present application
  • FIG. 6 is a schematic structural diagram of an embodiment of a server according to the present application.
  • FIG. 7 is a schematic structural diagram of another embodiment of a server according to the present application.
  • a specific implementation manner of a method for implementing a filter effect of an image includes:
  • filter algorithms can be composed of a series of basic algorithms.
  • the basic algorithms can be: saturation algorithm, tone algorithm, overlay algorithm, linear dodge algorithm, color. Doduce algorithm, positive film bottom algorithm, soft light algorithm, strong light algorithm, tone curve algorithm, etc.
  • These basic algorithms can achieve different filter effects according to different execution order. Therefore, as long as the developer writes the basic algorithm, different filter effects can be achieved by adjusting the combination and execution order of the underlying algorithms.
  • the basic algorithm for realizing the filter effect selected by the user processes the image to be processed according to the execution order of the basic algorithm to generate a corresponding filter effect.
  • the image so that when there is a new filter effect, there is no need to update the lengthy code.
  • the basic algorithm is reused, and the new algorithm is implemented by processing the basic algorithms in different execution orders. Therefore, it is possible to quickly and conveniently develop different filter effects and improve the development efficiency of the filter effect.
  • the filter effect according to the user selection is performed according to a basic algorithm for implementing the selected filter effect and an execution sequence of the basic algorithm.
  • the processing of the image to be processed by the basic algorithm (S12) may include: determining, according to the filter effect selected by the user, a basic algorithm for implementing the selected filter effect and an execution sequence of the basic algorithm, ie Determining which filter effect to use for the selection is used Some basic algorithms, the order of these basic algorithms; then, the determined basic algorithm is executed in accordance with the determined execution order of the basic algorithm to process the image to be processed.
  • the determining, according to the filter effect selected by the user, a basic algorithm for implementing the selected filter effect and an execution sequence of the basic algorithm include: Determining, according to the filter effect selected by the user, a basic algorithm for implementing the filter effect and an execution sequence of the basic algorithm from a preset local database; performing the execution order according to the determined execution order of the basic algorithm Determining the determined basic algorithm to process the image to be processed includes: performing the basic algorithm of the searching according to the executed execution order of the found basic algorithm according to the searched basic algorithm and the execution order of the basic algorithm Thereby processing the image to be processed.
  • the database may be preset locally by the user, where the database stores a large number of basic algorithms required for processing the filter effect of the image, and an execution sequence of the basic algorithm required to implement each filter; for example
  • the name of the filter effect is used as an index to search the database for the required basic algorithm and the execution order of the basic algorithm, that is, which filter effect for implementing the selection is used.
  • the base algorithm the order of these basic algorithms, and then performs the found base algorithm in the found execution order, thereby implementing a user-selected filter effect in the image to be processed.
  • the method includes: sending, according to the filter effect selected by the user, a filter effect implementation request to the server; the filter effect implementation identifier carries an identifier of the filter effect selected by the user; and receiving response information returned by the server
  • the response information carries a basic algorithm required by the server to find a filter effect selected by the user according to the identifier of the filter effect selected by the user, and an execution sequence of the basic algorithm;
  • the response information is parsed to obtain a basic algorithm required to implement the filter effect selected by the user and an execution sequence of the basic algorithm.
  • the image is implemented
  • the method of filtering the effect further comprising: the response message being set in the form of a text file in which a basic algorithm required to implement the filter effect selected by the user and an execution sequence of the basic algorithm are recorded .
  • the basic algorithm required to implement various filter effects and the execution order of the basic algorithm are respectively edited into a text file on the server side, so that each text file corresponds to a filter effect.
  • Implementation when you need to update the filter effect (such as adding a new filter effect or improving the existing filter effect), you only need to update the text file.
  • the method for implementing a filter effect of an image may further include: a basic algorithm and a solution required to implement the filter effect selected by the user The execution order of the underlying algorithm is saved locally.
  • the user is asked whether to save, and if the user selects to save, the basic algorithm needed to implement the filter effect and the basic algorithm are obtained.
  • the execution order of the basic algorithm is saved so that the next time the user uses it, the local search can be performed, thereby saving the user's network traffic.
  • the method for implementing the filter effect of the image may further include: receiving the filter sent by the server.
  • the mirror effect update message is updated according to the filter effect update message to the locally saved base algorithm required to implement the filter effect and/or the execution order of the base algorithm.
  • the user is reminded, if receiving the instruction that the user agrees to update, the locally saved basic algorithm and/or the basic algorithm required to implement the filter effect The execution order is updated.
  • executing the determined basic algorithm according to an execution order of the determined basic algorithm to process an image to be processed includes: Determining the basic algorithm, acquiring the determined basic algorithm from a local pre-stored basic algorithm library, and executing the acquired basic algorithm according to the determined execution order of the basic algorithm to process the image to be processed .
  • the execution code of the basic algorithm may be stored locally in advance, and when the basic algorithms are executed in the order of execution of the basic algorithm that implements the selected filter effect, The execution code of the underlying algorithm is obtained locally and executed.
  • a developer may write information such as basic algorithm code into the application installation package when writing an application of the application software corresponding to the method; when the client device downloads and installs the application, The base algorithm is also downloaded and installed on the client device; when the user receives an instruction to select a filter effect, the filter effect selected by the user can be obtained from the locally stored basic algorithm code.
  • the basic algorithm, and the corresponding basic algorithm can be executed according to the execution order of the basic algorithm of the filter effect.
  • a Vintage filter effect is taken as an example to describe a method for implementing a filter effect of an image in the present application.
  • the basic algorithm corresponding to the Vintage filter effect is the tone curve algorithm and the superposition algorithm.
  • the execution order is to execute the tone curve algorithm first, and then the overlay algorithm.
  • the tone curve algorithm is executed first, and then the overlay algorithm is executed to generate the final image, thereby processing the user.
  • the image is processed with a Vintage filter effect to obtain an image with a Vintage filter effect.
  • the method of implementing the filter effect of the image is described by taking the Sunshine filter effect as an example.
  • the basic algorithm corresponding to the Sunshine filter effect is the tone curve algorithm and the stack
  • the bottom algorithm the execution order is to execute the tone curve algorithm first, and then the positive film algorithm.
  • the tone curve algorithm is executed first, and then the positive film algorithm is executed, thereby performing the image to be processed by the user.
  • the Sunshine filter effect is processed to obtain an image with a Sunshine filter effect.
  • the method of implementing the filter effect of the image is described by taking the effect of the London filter as an example.
  • the basic algorithm corresponding to the London filter effect is the tone curve algorithm, the saturation algorithm and the positive film stacking algorithm.
  • the execution order is to execute the positive film stacking algorithm first, then the tone curve algorithm and finally the saturation algorithm.
  • the positive film stacking algorithm is executed first, followed by the tone curve algorithm, and finally the saturation algorithm is executed, thereby
  • the image to be processed by the user is processed by the London filter effect to obtain an image with a London filter effect.
  • the Diana filter effect is taken as an example to describe the method for realizing the filter effect of the image in the present application.
  • the basic algorithm corresponding to the Diana filter effect is the tone curve algorithm and the positive film stacking algorithm.
  • the execution order is to execute the positive film stacking algorithm first, and then execute the tone curve algorithm.
  • the basic algorithm of the effect and its execution order first perform the positive and negative algorithm, and then execute the tone curve algorithm, so that the Diana filter effect is processed on the image to be processed by the user, and the image with the Diana filter effect is obtained.
  • the method of implementing the filter effect of the image is described by taking the Sunshine filter effect as an example.
  • the basic algorithm and the execution order of the basic algorithm required to implement each filter effect are set in advance on the server side.
  • the execution sequence of the basic algorithm and the basic algorithm required for each filter effect is set to a text file.
  • each text file corresponds to a filter effect.
  • the Sunshine filter effect implementation request is sent to the server, and the text file corresponding to the Sunshine filter effect returned by the server is received, and after the text file is obtained, the description described in the text file is parsed.
  • the base algorithm and the execution order of the base algorithm for example, the parsed text form is:
  • a specific implementation of an apparatus for implementing a filter effect of an image includes: a receiving unit 11 for receiving an instruction for a user to select a filter effect; and a processing unit 12 for Determining a filter effect selected by the user, performing a basic algorithm to process an image to be processed according to a basic algorithm for implementing the selected filter effect and an execution sequence of the basic algorithm, thereby generating the user-selected The image of the filter effect.
  • the processing unit 12 processes the image to be processed according to the execution order of the basic algorithm to generate a corresponding filter effect according to the execution sequence of the filter effect selected by the user.
  • the image so that when there is a new filter effect, there is no need to update the lengthy code. Instead, the basic algorithm is reused, and the new algorithm is implemented by processing the basic algorithms in different execution orders. So that it can be opened quickly and easily Different filter effects are emitted, which improves the development efficiency of the filter effect.
  • the processing unit 12 includes: a determining module 121, configured to determine, according to the filter effect selected by the user, a basic algorithm for implementing the selected filter effect and an execution sequence of the basic algorithm; the processing module 122, configured to execute the determined basic algorithm according to the determined execution order of the basic algorithm to perform an image to be processed deal with.
  • the determining module 121 includes: a searching sub-module 1211, configured to search for an implementation from a preset local database according to the filter effect selected by the user. a basic algorithm of the filter effect and an execution sequence of the basic algorithm; the processing module 122, configured to perform, according to the searched basic algorithm and the execution order of the basic algorithm, according to the searched basic algorithm The execution executes the basic algorithm of the lookup to process the image to be processed.
  • the database may be preset locally by the user, where the database stores a large number of basic algorithms required for processing the filter effect of the image, and an execution sequence of the basic algorithm required to implement each filter; for example
  • the corresponding basic algorithm and the execution order of the basic algorithm are searched in the database by using the filter effect name as an index, and the found basic algorithm is executed according to the search execution order.
  • the filter effect selected by the user is implemented in the image to be processed.
  • the determining module 121 may include: a sending submodule 1212, configured to send to the server according to the filter effect selected by the user. Sending a filter effect to implement the request; the filter effect implementation carries an identifier of the filter effect selected by the user; the receiving sub-module 1213 is configured to receive response information returned by the server, where the response information is Carrying a basic algorithm required to implement the filter effect selected by the user according to the identifier of the filter effect selected by the server, and an execution sequence of the basic algorithm; the parsing sub-module 1214 is configured to The response information is parsed to obtain a basic algorithm required to implement the filter effect selected by the user and an execution sequence of the basic algorithm.
  • the receiving sub-module 1213 is configured to receive a response message in the form of a text file returned by the server, where the text file is recorded to implement the user.
  • the underlying algorithm required for the selected filter effect and the execution order of the underlying algorithm is configured to implement the user.
  • the basic algorithm required to implement various filter effects and the execution order of the basic algorithm are respectively edited into a text file on the server side, so that each text file corresponds to a filter effect.
  • Implementation when you need to update the type of filter effect (such as adding a new filter effect), you only need to update the text file.
  • the determining module 121 may further include: a storage submodule 1215, configured to obtain a basic algorithm required to implement the filter effect selected by the user. And the execution order of the basic algorithm is saved locally.
  • the user is asked whether to save, and if the user selects to save, the basic algorithm needed to implement the filter effect and the basic algorithm are obtained.
  • the execution order of the basic algorithm is saved so that the next time the user uses it, the local search can be performed, thereby saving the user's network traffic.
  • the receiving sub-module 1213 is further configured to receive the server to send The filter effect update message;
  • the determining module 121 further includes: an update sub-module 1216, configured to perform a base algorithm and/or the basic algorithm required for the locally saved filter effect according to the filter effect update message The execution order is updated.
  • the user is reminded, if receiving the instruction that the user agrees to update, the locally saved basic algorithm and/or the basic algorithm required to implement the filter effect The execution order is updated.
  • the processing module 122 includes: an obtaining submodule 1221, configured to acquire the basic algorithm library from a local pre-stored according to the determined basic algorithm.
  • the determined basic algorithm the execution sub-module 1222 is configured to execute the acquired basic algorithm according to the determined execution order of the basic algorithm to process the image to be processed.
  • a developer may write an application corresponding to the method.
  • information such as the basic algorithm and the basic algorithm corresponding to each filter and the execution order are written into the application; when the client device downloads and installs the application, the basic algorithm and each filter Information such as the basic algorithm corresponding to the mirror and the execution order are also downloaded and installed on the client device; when the user receives an instruction to select a filter effect, according to the filter effect described in the application
  • the execution sequence of the basic algorithm can be executed in the corresponding basic algorithm.
  • a specific implementation manner of a method for implementing a filter effect of an image includes:
  • the receiving client device sends a request for implementing a filter effect according to a filter effect selected by the user, where the filter effect implementation carries an identifier of a filter effect selected by the user;
  • a method for implementing a filter effect of an image searching for a basic algorithm required to implement the filter effect and an execution sequence of the basic algorithm according to an identifier of a filter effect selected by a user, and returning to the client device For the client device to process the image to be processed to generate an image with the corresponding filter effect, so that when there is a new filter effect, it is not necessary to update the lengthy code, but to reuse the basic algorithm,
  • These basic algorithms process the images according to different execution orders and generate corresponding filter effects, so that different filter effects can be developed quickly and conveniently, and the development efficiency of the filter effect of the images is improved.
  • the response message of the execution order includes: a response message carrying the searched basic algorithm required to implement the filter effect selected by the user and the execution order of the basic algorithm, and returning as a text file .
  • the basic algorithm required to implement various filter effects and the execution order of the basic algorithm are separately edited into a text file, so that each text file corresponds to an implementation of a filter effect.
  • the method for implementing a filter effect of an image further includes: required to implement a filter effect
  • the underlying algorithm and/or the execution order of the underlying algorithm are updated.
  • the method may include: transmitting a filter effect update message to the client device, the filter effect update message indicating a base algorithm required for the updated filter effect and/or an execution order of the base algorithm.
  • a specific implementation of a server includes: a receiving unit 21, configured to receive, by a client device, a filter effect implementation request according to a filter effect selected by a user, where the filter effect is implemented.
  • the searching unit 22 is configured to search, according to the identifier of the filter effect in the request, a basic algorithm required to implement the filter effect selected by the user, and the basic algorithm The execution sequence;
  • the returning unit 23 is configured to return a response message carrying the searched basic algorithm required to implement the filter effect of the user selection and the execution order of the basic algorithm.
  • the searching unit 22 searches for the basic algorithm required to implement the filter effect and the execution order of the basic algorithm according to the filter effect selected by the user, and returns The unit 23 returns to the client device for processing, by the client device, the image to be processed according to the text file to generate an image with a corresponding filter effect, so that when there is a new filter effect, the update is not required to be lengthy
  • the code instead, reuses the underlying algorithms, processes the images in different execution orders and generates corresponding filter effects, thereby enabling quick and easy development of different filter effects and improved filters. The efficiency of development of the effect.
  • the returning unit 23 is configured to carry the basic algorithm and the required algorithm for implementing the filter effect of the user selection.
  • the response message describing the execution order of the underlying algorithm is returned as a text file.
  • the basic algorithm required to implement various filter effects and the execution order of the basic algorithm are separately edited into a text file, so that each text file corresponds to an implementation of a filter effect.
  • the server further includes: an updating unit 24, configured to perform a basic algorithm and/or execution of the basic algorithm required to implement a filter effect. Update in order.
  • the server may further include: the returning unit 23, configured to send a filter effect update to the client device.
  • the message, the filter effect update message indicates the underlying algorithm required for the updated filter effect and the execution order of the underlying algorithm.
  • the basic algorithm includes at least one of the following algorithms: a saturation algorithm, a tone algorithm, a superposition algorithm, a linear dodge algorithm, and a color. Dodge algorithm, positive film bottom algorithm, soft light algorithm, strong light algorithm, tone curve algorithm.
  • each filter effect is composed of a series of basic algorithms, and the basic algorithms are separately implemented, and then the basic algorithms are executed according to a preset processing sequence.
  • the filter effect when these basic algorithms are executed in different processing order, can get different filter effects.
  • the embodiments of the present application can be applied to image processing on smart mobile devices such as Android, Symbian, IOS operating system, mobile phones, tablet computers, etc., and can also be applied to image processing on a computer.
  • an embodiment of the present application further provides a storage medium, wherein the storage medium
  • the storage medium is used to store an application for performing a method of implementing a filter effect of an image described in the embodiments of the present application at runtime.
  • the method for implementing the filter effect of the image described in the present application includes:
  • the basic algorithm for implementing the selected filter effect and the execution sequence of the basic algorithm executing the basic algorithm to process the image to be processed, thereby generating the user The image of the selected filter effect.
  • the embodiment of the present application further provides an application, where the application is used to execute a method for implementing a filter effect of an image according to an embodiment of the present application at runtime.
  • the method for implementing the filter effect of the image described in the present application includes:
  • the basic algorithm for implementing the selected filter effect and the execution sequence of the basic algorithm executing the basic algorithm to process the image to be processed, thereby generating the user The image of the selected filter effect.
  • the embodiment of the present application further provides a terminal, including:
  • processor a memory, a communication interface, and a bus
  • the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
  • the basic algorithm for implementing the selected filter effect and the execution sequence of the basic algorithm executing the basic algorithm to process the image to be processed, thereby generating the user The image of the selected filter effect.
  • the embodiment of the present application further provides a storage medium, where the storage medium is used to store an application, and the application is used to execute an image implemented by an embodiment of the present application at runtime.
  • the method of the filter effect includes:
  • the receiving client device implements a request according to the filter effect selected by the user, and the filter effect implements the identifier of the filter effect carried by the user in the request;
  • a response message carrying the found basic algorithm required to implement the filter effect of the user selection and the execution order of the basic algorithm is returned.
  • the embodiment of the present application further provides an application, where the application is used to execute a method for implementing a filter effect of an image according to an embodiment of the present application at runtime.
  • the method for implementing the filter effect of the image described in the present application includes:
  • the receiving client device implements a request according to the filter effect selected by the user, and the filter effect implements the identifier of the filter effect carried by the user in the request;
  • a response message carrying the found basic algorithm required to implement the filter effect of the user selection and the execution order of the basic algorithm is returned.
  • the embodiment of the present application further provides a server, including:
  • processor a memory, a communication interface, and a bus
  • the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
  • the receiving client device implements a request according to the filter effect selected by the user, and the filter effect implements the identifier of the filter effect carried by the user in the request;
  • a response message carrying the found basic algorithm required to implement the filter effect of the user selection and the execution order of the basic algorithm is returned.
  • the program may be implemented by a computer program to instruct related hardware, and the program may be stored in a computer readable storage medium, which, when executed, may include the flow of an embodiment of the methods described above.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

一种实现图像的滤镜效果的方法、装置及服务器,所述方法包括:根据用户选择的滤镜效果,按照实现所述选择的滤镜效果的基础算法以及所述基础算法的执行顺序,执行所述基础算法对要处理的图像进行处理,从而生成具有所述用户选择的滤镜效果的图像。该方法能够提高滤镜效果的开发效率。

Description

一种实现图像的滤镜效果的方法、装置及服务器
本申请要求于2014年08月15日提交中国专利局、申请号为201410404749.2发明名称为“一种实现图像的滤镜效果的方法、装置及服务器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像处理技术领域,尤其涉及一种实现图像的滤镜效果的方法、装置及服务器。
背景技术
目前在计算机和移动终端领域,有各种各样的图像处理应用,在大部分图像处理应用中,都提供为图片添加滤镜,即滤镜效果的功能。
由于各种滤镜效果有各自的实现方法,因此,在功能开发时,实现不同的滤镜效果往往需要重写不同的代码,开发人员将会耗费很多的精力来一一实现各种滤镜;每种实现出来的滤镜算法无法再和其他的滤镜算法结合起来使用,这样,当有新的滤镜效果产生时,开发人员需要对该新的滤镜效果进行独立的开发与实现,使得开发效率较低。
发明内容
本申请提供一种实现图像的滤镜效果的方法、装置及服务器,能够提高滤镜效果的开发效率。
一方面,本申请提供了一种实现图像的滤镜效果的方法,包括:
接收用户选择一种滤镜效果的指令;
根据所述用户选择的滤镜效果,按照实现所述选择的滤镜效果的基础算法以及所述基础算法的执行顺序,执行所述基础算法对要处理的图像进行处理,从而生成具有所述用户选择的滤镜效果的图像。
可选地,所述根据所述用户选择的滤镜效果,按照实现所述选择的滤镜效果的基础算法以及所述基础算法的执行顺序,执行所述基础算法对要处理的图像进行处理包括:根据所述用户选择的滤镜效果,确定实现所述选择的滤镜效果的基础算法及所述基础算法的执行顺序;按照所 述确定的基础算法的执行顺序执行所述确定的基础算法从而对要处理的图像进行处理。
可选地,所述根据所述用户选择的滤镜效果,确定实现所述选择的滤镜效果的基础算法及所述基础算法的执行顺序,包括:根据所述用户选择的滤镜效果,从预先设置的本地数据库中查找实现所述滤镜效果的基础算法及所述基础算法的执行顺序;所述按照所述确定的基础算法的执行顺序执行所述确定的基础算法从而对要处理的图像进行处理包括:根据所述查找到的基础算法及所述基础算法的执行顺序,按照所述查找到的基础算法的执行顺序执行所述查找的基础算法从而对要处理的图像进行处理。
可选地,所述根据所述用户选择的滤镜效果,确定实现所述选择的滤镜效果的基础算法及所述基础算法的执行顺序,包括:根据所述用户选择的滤镜效果,向服务器发送滤镜效果实现请求;所述滤镜效果实现请求中携带有所述用户选择的滤镜效果的标识;接收所述服务器返回的响应信息,所述响应信息中携带有所述服务器根据所述用户选择的滤镜效果的标识查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序;对所述响应信息进行解析,从而获得实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序。
可选地,所述实现图像的滤镜效果的方法,还包括:所述响应消息被设置为文本文件的形式,所述文本文件中记录有实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序。
可选地,所述实现图像的滤镜效果的方法,还包括:将所述获得的实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序在本地进行保存。
可选地,所述实现图像的滤镜效果的方法,还包括:接收服务器发送的滤镜效果更新消息;对本地保存的实现滤镜效果所需要的基础算法和/或所述基础算法的执行顺序进行更新。
可选地,所述按照所述确定的基础算法的执行顺序执行所述确定的基础算法从而对要处理的图像进行处理包括:根据所述确定的基础算法,从本地预先存储的基础算法库中获取所述确定的基础算法,并按照所述确定的基础算法的执行顺序执行所述获取的基础算法从而对要处理的图像进行处理。
可选地,所述基础算法包括以下算法中的至少一种:饱和度算法、色调算法、叠加算法、线性减淡算法、颜色减淡算法、正片叠底算法、柔光算法、强光算法、色调曲线算法。
本申请实施例的实现图像的滤镜效果的方法,将实现用户选择的滤镜效果的基础算法按照该基础算法的执行顺序对要处理的图像进行处理,以生成具有相应滤镜效果的图像,这样,当有新的滤镜效果时,不需要更新冗长的代码,而是,重复使用基础算法,通过将这些基础算法按照不同的执行顺序对图像进行处理来实现新的滤镜效果,从而,能够快速方便的开发出不同的滤镜效果,提高了滤镜效果的开发效率。
另一方面,本申请提供了一种实现图像的滤镜效果的装置,包括:接收单元,用于接收用户选择一种滤镜效果的指令;处理单元,用于根据所述用户选择的滤镜效果,按照实现所述选择的滤镜效果的基础算法以及所述基础算法的执行顺序,执行所述基础算法对要处理的图像进行处理,从而生成具有所述用户选择的滤镜效果的图像。
可选地,所述处理单元包括:确定模块,用于根据所述用户选择的滤镜效果,确定实现所述选择的滤镜效果的基础算法及所述基础算法的执行顺序;处理模块,用于根据所述确定的基础算法的执行顺序执行所述确定的基础算法从而对要处理的图像进行处理。
可选地,所述确定模块包括:查找子模块,用于根据所述用户选择的滤镜效果,从预先设置的本地数据库中查找实现所述滤镜效果的基础算法及所述基础算法的执行顺序;所述处理模块,用于根据所述查找到的基础算法及所述基础算法的执行顺序,按照所述查找到的基础算法的执行顺序执行所述查找的基础算法从而对要处理的图像进行处理。
可选地,所述确定模块包括:发送子模块,用于根据所述用户选择的滤镜效果,向服务器发送滤镜效果实现请求;所述滤镜效果实现请求中携带有所述用户选择的滤镜效果的标识;接收子模块,用于接收所述服务器返回的响应信息,所述响应信息中携带有所述服务器根据所述用户选择的滤镜效果的标识查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序;解析子模块,用于对所述响应信息进行解析,从而获得实现所述户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序。
可选地,所述接收子模块,用于接收所述服务器返回的文本文件的形式的响应消息,所述文本文件中记录有实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序。
可选地,所述确定模块还包括:存储子模块,用于将所述获得的实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序在本地进行保存。
可选地,所述接收子模块,还用于接收所述服务器发送的滤镜效果更新消息;所述确定模块还包括:更新子模块,用于根据所述滤镜效果更新消息,对本地保存的滤镜效果所需要的基础算法和/或所述基础算法的执行顺序进行更新。
可选地,所述处理模块包括:获取子模块,用于根据所述确定的基础算法,从本地预先存储的基础算法库中获取所述确定的基础算法;执行子模块,用于按照所述确定的基础算法的执行顺序执行所述获取的基础算法从而对要处理的图像进行处理。
可选地,所述基础算法包括以下算法中的至少一种:饱和度算法、色调算法、叠加算法、线性减淡算法、颜色减淡算法、正片叠底算法、柔光算法、强光算法、色调曲线算法。
本申请实施例的实现图像的滤镜效果的装置,处理单元将实现用户选择的滤镜效果的基础算法按照该基础算法的执行顺序对要处理的图像进行处理,以生成具有相应滤镜效果的图像,这样,当有新的滤镜效果 时,不需要更新冗长的代码,而是,重复使用基础算法,通过将这些基础算法按照不同的执行顺序对图像进行处理来实现新的滤镜效果,从而,能够快速方便的开发出不同的滤镜效果,提高了滤镜效果的开发效率。
又一方面,本申请提供了一种实现图像的滤镜效果的方法,包括:
接收客户端装置根据用户选择的滤镜效果,发送的滤镜效果实现请求,所述滤镜效果实现请求中携带有用户选择的滤镜效果的标识;
根据所述请求中的滤镜效果的标识,查找实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序;
将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息返回。
可选地,所述将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息返回,包括:将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息,以文本文件的形式返回。
可选地,所述实现图像的滤镜效果的方法还包括:对实现滤镜效果所需要的基础算法和/或所述基础算法的执行顺序进行更新。
可选地,在对实现滤镜效果所需要的基础算法和/或所述基础算法的执行顺序进行更新之后,所述方法包括:向客户端装置发送滤镜效果更新消息,所述滤镜效果更新消息指示了更新的滤镜效果所需要的基础算法和/或所述基础算法的执行顺序。
可选地,所述基础算法包括以下算法中的至少一种:饱和度算法、色调算法、叠加算法、线性减淡算法、颜色减淡算法、正片叠底算法、柔光算法、强光算法、色调曲线算法。
本申请实施例的实现图像的滤镜效果的方法,根据用户选择的滤镜效果的标识查找实现所述滤镜效果所需要的基础算法以及所述基础算法的执行顺序,并返回至客户端装置,用于客户端装置对要处理的图像进 行处理,从而生成具有相应滤镜效果的图像,这样,当有新的滤镜效果时,不需要再更新冗长的代码,而是,重复使用基础算法,将这些基础算法按照不同的执行顺序对图像进行处理并生成相应的滤镜效果,从而,能够快速方便的开发出不同的滤镜效果,提高了图片的滤镜效果的开发效率。
再一方面,本申请提供了一种服务器,包括:接收单元,用于接收客户端装置根据用户选择的滤镜效果,发送的滤镜效果实现请求,所述滤镜效果实现请求中携带有用户选择的滤镜效果的标识;查找单元,用于根据请求中的滤镜效果的标识,查找实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序;返回单元,用于将将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息返回。
可选地,所述返回单元,用于将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息,以文本文件的形式返回。
可选地,所述服务器还包括:更新单元,用于对实现滤镜效果所需要的基础算法和/或所述基础算法的执行顺序进行更新。
可选地,所述服务器还包括:所述返回单元,还用于向客户端装置发送滤镜效果更新消息,所述滤镜效果更新消息指示了更新的滤镜效果所需要的基础算法和/或所述基础算法的执行顺序。
可选地,所述基础算法包括以下算法中的至少一种:饱和度算法、色调算法、叠加算法、线性减淡算法、颜色减淡算法、正片叠底算法、柔光算法、强光算法、色调曲线算法。
本申请实施例的服务器,查找单元根据用户选择的滤镜效果的标识查找实现所述滤镜效果所需要的基础算法以及所述基础算法的执行顺序,并由返回单元返回至客户端装置,用于客户端装置对要处理的图像进行处理,从而生成具有相应滤镜效果的图像,这样,当有新的滤镜效果时,不需要更新冗长的代码,而是,重复使用基础算法,将这些基础 算法按照不同的执行顺序对图像进行处理并生成相应的滤镜效果,从而,能够快速方便的开发出不同的滤镜效果,提高了图片的滤镜效果的开发效率。
为了实现上述目的,本申请实施例还提供了一种存储介质,其中,该存储介质用于存储应用程序,所述应用程序用于在运行时执行本申请所述的一种实现图像的滤镜效果的方法。其中,本申请所述的一种实现图像的滤镜效果的方法,包括:
接收用户选择一种滤镜效果的指令;
根据所述用户选择的滤镜效果,按照实现所述选择的滤镜效果的基础算法以及所述基础算法的执行顺序,执行所述基础算法对要处理的图像进行处理,从而生成具有所述用户选择的滤镜效果的图像。
为了实现上述目的,本申请实施例还提供了一种应用程序,其中,该应用程序用于在运行时执行本申请所述的一种实现图像的滤镜效果的方法。其中,本申请所述的一种实现图像的滤镜效果的方法,包括:
接收用户选择一种滤镜效果的指令;
根据所述用户选择的滤镜效果,按照实现所述选择的滤镜效果的基础算法以及所述基础算法的执行顺序,执行所述基础算法对要处理的图像进行处理,从而生成具有所述用户选择的滤镜效果的图像。
为了实现上述目的,本申请实施例还提供了一种终端,包括:
处理器、存储器、通信接口和总线;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;
所述存储器存储可执行程序代码;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于:
接收用户选择一种滤镜效果的指令;
根据所述用户选择的滤镜效果,按照实现所述选择的滤镜效果的基础算法以及所述基础算法的执行顺序,执行所述基础算法对要处理的图像进行处理,从而生成具有所述用户选择的滤镜效果的图像。
为了实现上述目的,本申请实施例还提供了一种存储介质,其中,该存储介质用于存储应用程序,所述应用程序用于在运行时执行本申请所述的一种实现图像的滤镜效果的方法。其中,本申请所述的一种实现图像的滤镜效果的方法,包括:
接收客户端装置根据用户选择的滤镜效果,发送的滤镜效果实现请求,所述滤镜效果实现请求中携带有用户选择的滤镜效果的标识;
根据所述请求中的滤镜效果的标识,查找实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序;
将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息返回。
为了实现上述目的,本申请实施例还提供了一种应用程序,其中,该应用程序用于在运行时执行本申请所述的一种实现图像的滤镜效果的方法。其中,本申请所述的一种实现图像的滤镜效果的方法,包括:
接收客户端装置根据用户选择的滤镜效果,发送的滤镜效果实现请求,所述滤镜效果实现请求中携带有用户选择的滤镜效果的标识;
根据所述请求中的滤镜效果的标识,查找实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序;
将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息返回。
为了实现上述目的,本申请实施例还提供了一种服务器,包括:
处理器、存储器、通信接口和总线;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;
所述存储器存储可执行程序代码;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于:
接收客户端装置根据用户选择的滤镜效果,发送的滤镜效果实现请求,所述滤镜效果实现请求中携带有用户选择的滤镜效果的标识;
根据所述请求中的滤镜效果的标识,查找实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序;
将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息返回。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为本申请的实现图像的滤镜效果的方法一实施例的流程示意图;
图2为本申请的实现图像的滤镜效果的装置一实施例的结构示意图;
图3为本申请的实现图像的滤镜效果的装置另一实施例的结构示意图;
图4为本申请的实现图像的滤镜效果的装置另一实施例的结构示意图;
图5为本申请的实现图像的滤镜效果的方法一实施例的流程示意图;
图6为本申请的服务器一实施例的结构示意图;
图7为本申请的服务器另一实施例的结构示意图。
具体实施方式
下面结合附图对本申请实施例一种实现图像的滤镜效果的方法、装置及服务器进行详细描述。
应当明确,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。
参看图1所示,本申请一种实现图像的滤镜效果的方法的具体实施方式,包括:
S11、接收用户选择一种滤镜效果的指令;
S12、根据所述用户选择的滤镜效果,按照实现所述选择的滤镜效果的基础算法以及所述基础算法的执行顺序,执行所述基础算法对要处理的图像进行处理,从而生成具有所述用户选择的滤镜效果的图像。
申请人经过研究和分析发现,各种不同的滤镜算法可以由一系列的基础算法组合而成的,其中,基础算法可以有:饱和度算法、色调算法、叠加算法、线性减淡算法、颜色减淡算法、正片叠底算法、柔光算法、强光算法、色调曲线算法等等,这些基础算法按照不同的执行顺序可以实现不同的滤镜效果。因此,只要开发人员编写好基础算法,就可通过调整基础算法的组合和执行顺序实现不同的滤镜效果。
基于此,本申请实施例的实现图像的滤镜效果的方法,将实现用户选择的滤镜效果的基础算法按照该基础算法的执行顺序对要处理的图像进行处理,以生成具有相应滤镜效果的图像,这样,当有新的滤镜效果时,不需要更新冗长的代码,而是,重复使用基础算法,通过将这些基础算法按照不同的执行顺序对图像进行处理来实现新的滤镜效果,从而,能够快速方便的开发出不同的滤镜效果,提高了滤镜效果的开发效率。
在前述实现图像的滤镜效果的方法的具体实施方式中,所述根据所述用户选择的滤镜效果,按照实现所述选择的滤镜效果的基础算法以及所述基础算法的执行顺序,执行所述基础算法对要处理的图像进行处理(S12),可以包括:根据所述用户选择的滤镜效果,确定实现所述选择的滤镜效果的基础算法及所述基础算法的执行顺序,即确定出实现所述选择的滤镜效果使用哪 些基础算法,这些基础算法的顺序如何;然后,按照所述确定的基础算法的执行顺序执行所述确定的基础算法从而对要处理的图像进行处理。
在前述实现图像的滤镜效果的方法的具体实施方式中,所述根据所述用户选择的滤镜效果,确定实现所述选择的滤镜效果的基础算法及所述基础算法的执行顺序包括:根据所述用户选择的滤镜效果,从预先设置的本地数据库中查找实现所述滤镜效果的基础算法及所述基础算法的执行顺序;所述按照所述确定的基础算法的执行顺序执行所述确定的基础算法从而对要处理的图像进行处理包括:根据所述查找到的基础算法及所述基础算法的执行顺序,按照所述查找到的基础算法的执行顺序执行所述查找的基础算法从而对要处理的图像进行处理。
本申请实施例中,可以在用户本地预设数据库,所述数据库中存储了大量用于处理图像的滤镜效果所需要的基础算法、实现每个滤镜所需要的基础算法的执行顺序;例如,当用户选择一个滤镜效果时,以所述滤镜效果的名称为索引在数据库中查找所需要的基础算法及该基础算法的执行顺序,即查找出实现所述选择的滤镜效果使用哪些基础算法,这些基础算法的顺序如何,然后按照所述查找到的执行顺序执行所述查找到的基础算法,从而在要处理的图像中实现用户选择的滤镜效果。
在前述实现图像的滤镜效果的方法的具体实施方式中,所述根据所述用户选择的滤镜效果,确定实现所述选择的滤镜效果的基础算法及所述基础算法的执行顺序,可以包括:根据所述用户选择的滤镜效果,向服务器发送滤镜效果实现请求;所述滤镜效果实现请求中携带有所述用户选择的滤镜效果的标识;接收所述服务器返回的响应信息,所述响应信息中携带有所述服务器根据所述用户选择的滤镜效果的标识查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序;对所述响应信息进行解析,从而获得实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序。
本申请实施例中,预先在服务器端设置了大量用于处理图像的滤镜效果所需要的基础算法、实现每个滤镜所需要的基础算法的执行顺序。
在前述实现图像的滤镜效果的方法的具体实施方式中,所述实现图像的 滤镜效果的方法,还包括:所述响应消息被设置为文本文件的形式,所述文本文件中记录有实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序。
本申请实施例中,预先在服务器端,分别将实现各种滤镜效果所需要的基础算法及所述基础算法的执行顺序编辑成文本文件,这样,每个文本文件对应一种滤镜效果的实现方式;在需要更新滤镜效果(如增加新的滤镜效果或者改良现有的滤镜效果)时,只需要更新文本文件就可以了。
在前述实现图像的滤镜效果的方法的具体实施方式中,所述实现图像的滤镜效果的方法,还可以包括:将获得的实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序在本地进行保存。
例如,获得实现该滤镜效果所需要的基础算法及所述基础算法的执行顺序后,询问用户是否保存,若是用户选择保存,则将获取的实现该滤镜效果所需要的基础算法及所述基础算法的执行顺序进行保存,以便于下次用户使用时,能够从本地查找,从而,节省用户的网络流量。
在前述实现图像的滤镜效果的方法的具体实施方式中,为了使用户本地所保存的滤镜效果的种类更丰富,所述实现图像的滤镜效果的方法还可以包括:接收服务器发送的滤镜效果更新消息;根据所述滤镜效果更新消息,对本地保存的实现滤镜效果所需要的基础算法和/或所述基础算法的执行顺序进行更新。
优选地,在接收服务器发送的滤镜效果更新消息之后,对用户进行提醒,若接收到用户同意更新的指令,则对本地保存的实现滤镜效果所需要的基础算法和/或所述基础算法的执行顺序进行更新。
在前述实现图像的滤镜效果的方法的具体实施方式中,可选地,所述按照所述确定的基础算法的执行顺序执行所述确定的基础算法从而对要处理的图像进行处理包括:根据所述确定的基础算法,从本地预先存储的基础算法库中获取所述确定的基础算法,并按照所述确定的基础算法的执行顺序执行所述获取的基础算法从而对要处理的图像进行处理。
本申请的一个实施例中,基础算法的执行代码可以预先进行本地存储,在按照实现所述选择的滤镜效果的基础算法执行顺序执行这些基础算法时, 从本地获取基础算法的执行代码并进行执行。
例如,开发人员可以在编写与所述方法相对应的应用软件的应用程序时,将基础算法代码等信息写入所述应用程序安装包中;当客户端装置下载并安装所述应用程序时,基础算法也会被下载并安装在所述客户端装置上;当接收到用户选择一种滤镜效果的指令时,就可从本地存储的基础算法代码中,获取到用户选择的滤镜效果的基础算法,并按照该滤镜效果的基础算法的执行顺序执行相应的基础算法即可。
下面举例说明本申请实现图像的滤镜效果的方法。
实施例1:
本实施例以Vintage滤镜效果为例,对本申请实现图像的滤镜效果的方法进行说明。
在图像处理软件的应用程序安装包中,写入实现各滤镜效果所需要的基础算法及基础算法的执行顺序,还有各个基础算法代码,并在图像处理软件安装在终端后,在终端本地保存实现各滤镜效果所需要的基础算法及基础算法的执行顺序以及各个基础算法代码。
其中,假设Vintage滤镜效果对应的基础算法为色调曲线算法和叠加算法,执行顺序为先执行色调曲线算法,再执行叠加算法。
在接收到用户选择Vintage滤镜效果的指令后,根据本地存储的Vintage滤镜效果的基础算法及其执行顺序,先执行色调曲线算法,再执行叠加算法生成最终图像,从而,对用户要处理的图像进行Vintage滤镜效果处理,获得具有Vintage滤镜效果的图像。
实施例2:
本实施例以Sunshine滤镜效果为例,对本申请实现图像的滤镜效果的方法进行说明。
在图像处理软件的应用程序安装包中,写入实现各滤镜效果所需要的基础算法及基础算法的执行顺序,还有各个基础算法代码,并在图像处理软件安装在终端后,在终端本地保存实现各滤镜效果所需要的基础算法及基础算法的执行顺序以及各个基础算法代码。
其中,假设Sunshine滤镜效果对应的基础算法为色调曲线算法和正片叠 底算法,执行顺序为先执行色调曲线算法,再执行正片叠底算法。
接收到用户选择Sunshine滤镜效果的指令后,根据本地存储的Sunshine滤镜效果的基础算法及其执行顺序,先执行色调曲线算法,再执行正片叠底算法,从而,对用户要处理的图像进行Sunshine滤镜效果处理,获得具有Sunshine滤镜效果的图像。
实施例3:
本实施例以London滤镜效果为例,对本申请实现图像的滤镜效果的方法进行说明。
在图像处理软件的应用程序安装包中,写入实现各滤镜效果所需要的基础算法及基础算法的执行顺序,还有各个基础算法代码,并在图像处理软件安装在终端后,在终端本地保存实现各滤镜效果所需要的基础算法及基础算法的执行顺序以及各个基础算法代码。
其中,假设London滤镜效果对应的基础算法为色调曲线算法、饱和度算法和正片叠底算法,执行顺序为先执行正片叠底算法,再执行色调曲线算法、最后执行饱和度算法。
接收到用户选择London滤镜效果的指令后,根据本地存储的London滤镜效果的基础算法及其执行顺序,先执行正片叠底算法,其次为色调曲线算法,最后执行饱和度算法,从而,对用户要处理的图像进行London滤镜效果处理,获得具有London滤镜效果的图像。
实施例4:
本实施例以Diana滤镜效果为例,对本申请实现图像的滤镜效果的方法进行说明。
在图像处理软件的应用程序安装包中,写入实现各滤镜效果所需要的基础算法及基础算法的执行顺序,还有各个基础算法代码,并在图像处理软件安装在终端后,在终端本地保存实现各滤镜效果所需要的基础算法及基础算法的执行顺序以及各个基础算法代码。
其中,假设Diana滤镜效果对应的基础算法为色调曲线算法和正片叠底算法,执行顺序为先执行正片叠底算法,再执行色调曲线算法。
接收到用户选择Diana滤镜效果的指令后,根据本地存储的Diana滤镜 效果的基础算法及其执行顺序,先执行正片叠底算法,再执行色调曲线算法,从而,对用户要处理的图像进行Diana滤镜效果处理,获得具有Diana滤镜效果的图像。
实施例5:
本实施例以Sunshine滤镜效果为例,对本申请实现图像的滤镜效果的方法进行说明。
预先在服务器端设置好了实现各滤镜效果所需要的基础算法及基础算法的执行顺序,其中,在服务器端,各滤镜效果所需要的基础算法及基础算法的执行顺序被设置为文本文件的形式,每个文本文件对应一种滤镜效果。
在接收到用户选择Sunshine滤镜效果的指令后,向服务器发送Sunshine滤镜效果实现请求,接收服务器返回的Sunshine滤镜效果对应的文本文件,获取该文本文件之后,解析出该文本文件中描述的基础算法及该基础算法的执行顺序;例如,解析后的文本形式为:
滤镜效果的名字:Sunshine
基础算法:色调曲线算法
基础算法:正片叠底算法;
然后,按照基础算法在文本中显示的先后顺序,执行这些基础算法,从而对要进行滤镜效果处理的图像进行处理,生成具有Sunshine滤镜效果的图像。
参看图2所示,本申请一种实现图像的滤镜效果的装置的具体实施方式,包括:接收单元11,用于接收用户选择一种滤镜效果的指令;处理单元12,用于根据所述用户选择的滤镜效果,按照实现所述选择的滤镜效果的基础算法以及所述基础算法的执行顺序,执行所述基础算法对要处理的图像进行处理,从而生成具有所述用户选择的滤镜效果的图像。
本申请实施例的实现图像的滤镜效果的装置,处理单元12将实现用户选择的滤镜效果的基础算法按照该基础算法的执行顺序对要处理的图像进行处理,以生成具有相应滤镜效果的图像,这样,当有新的滤镜效果时,不需要更新冗长的代码,而是,重复使用基础算法,通过将这些基础算法按照不同的执行顺序对图像进行处理来实现新的滤镜效果,从而,能够快速方便的开 发出不同的滤镜效果,提高了滤镜效果的开发效率。
参看图3所示,在前述实现图像的滤镜效果的装置的具体实施方式中,可选地,所述处理单元12包括:确定模块121,用于根据所述用户选择的滤镜效果,确定实现所述选择的滤镜效果的基础算法及所述基础算法的执行顺序;处理模块122,用于根据所述确定的基础算法的执行顺序执行所述确定的基础算法从而对要处理的图像进行处理。
在前述实现图像的滤镜效果的装置的具体实施方式中,所述确定模块121包括:查找子模块1211,用于根据所述用户选择的滤镜效果,从预先设置的本地数据库中查找实现所述滤镜效果的基础算法及所述基础算法的执行顺序;所述处理模块122,用于根据所述查找到的基础算法及所述基础算法的执行顺序,按照所述查找到的基础算法的执行顺序执行所述查找的基础算法从而对要处理的图像进行处理。
本申请实施例中,可以在用户本地预设数据库,所述数据库中存储了大量用于处理图像的滤镜效果所需要的基础算法、实现每个滤镜所需要的基础算法的执行顺序;例如,当用户选择一个滤镜效果时,以滤镜效果名称为索引在数据库中查找相应的基础算法及该基础算法的执行顺序,按照所述查找到的执行顺序执行所述查找到的基础算法,从而在要处理的图像中实现用户选择的滤镜效果。
参看图4所示,在前述实现图像的滤镜效果的装置的具体实施方式中,所述确定模块121,可以包括:发送子模块1212,用于根据所述用户选择的滤镜效果,向服务器发送滤镜效果实现请求;所述滤镜效果实现请求中携带有所述用户选择的滤镜效果的标识;接收子模块1213,用于接收所述服务器获返回的响应信息,所述响应信息中携带有所述服务器根据所述用户选择的滤镜效果的标识查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序;解析子模块1214,用于对所述响应信息进行解析,从而获得实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序。
本申请实施例中,预先在服务器端设置了大量用于处理图像的滤镜效果所需要的基础算法、实现每个滤镜所需要的基础算法的执行顺序。
在前述实现图像的滤镜效果的装置的具体实施方式中,所述接收子模块1213,用于接收所述服务器返回的文本文件的形式的响应消息,所述文本文件中记录有实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序。
本申请实施例中,预先在服务器端,分别将实现各种滤镜效果所需要的基础算法及所述基础算法的执行顺序编辑成文本文件,这样,每个文本文件对应一种滤镜效果的实现方式;在需要更新滤镜效果的种类(如增加新的滤镜效果)时,只需要更新文本文件就可以了。
在前述实现图像的滤镜效果的装置的具体实施方式中,所述确定模块121,还可以包括:存储子模块1215,用于将获得的实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序在本地进行保存。
例如,获得实现该滤镜效果所需要的基础算法及所述基础算法的执行顺序后,询问用户是否保存,若是用户选择保存,则将获取的实现该滤镜效果所需要的基础算法及所述基础算法的执行顺序进行保存,以便于下次用户使用时,能够从本地查找,从而,节省用户的网络流量。
在前述实现图像的滤镜效果的装置的具体实施方式中,为了使用户本地所保存的滤镜效果的种类更丰富,可选地,所述接收子模块1213,还用于接收所述服务器发送的滤镜效果更新消息;所述确定模块121还包括:更新子模块1216,用于根据所述滤镜效果更新消息,对本地保存的滤镜效果所需要的基础算法和/或所述基础算法的执行顺序进行更新。
优选地,在接收服务器发送的滤镜效果更新消息之后,对用户进行提醒,若接收到用户同意更新的指令,则对本地保存的实现滤镜效果所需要的基础算法和/或所述基础算法的执行顺序进行更新。
在前述实现图像的滤镜效果的装置的具体实施方式中,所述处理模块122包括:获取子模块1221,用于根据所述确定的基础算法,从本地预先存储的基础算法库中获取所述确定的基础算法;执行子模块1222,用于按照所述确定的基础算法的执行顺序执行所述获取的基础算法从而对要处理的图像进行处理。
本申请实施例中,例如,开发人员可以在编写与所述方法相对应的应用 软件的应用程序时,将基础算法和每个滤镜对应的基础算法以及执行顺序等信息写入所述应用程序中;当客户端装置下载并安装所述应用程序时,基础算法和每个滤镜对应的基础算法以及执行顺序等信息也会被下载并安装在所述客户端装置上;当接收到用户选择一种滤镜效果的指令时,按照所述应用程序中所述滤镜效果的基础算法的执行顺序执行相应的基础算法即可。
参看图5所示,本申请一种实现图像的滤镜效果的方法的具体实施方式,包括:
S21、接收客户端装置根据用户选择的滤镜效果,发送的滤镜效果的实现请求,所述滤镜效果实现请求中携带有用户选择的滤镜效果的标识;
S22、根据所述请求中的滤镜效果的标识,查找实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序;
S23、将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息返回。
本申请实施例的实现图像的滤镜效果的方法,根据用户选择的滤镜效果的标识查找实现所述滤镜效果所需要的基础算法以及所述基础算法的执行顺序,并返回至客户端装置,用于客户端装置对要处理的图像进行处理,从而生成具有相应滤镜效果的图像,这样,当有新的滤镜效果时,不需要更新冗长的代码,而是,重复使用基础算法,将这些基础算法按照不同的执行顺序对图像进行处理并生成相应的滤镜效果,从而,能够快速方便的开发出不同的滤镜效果,提高了图片的滤镜效果的开发效率。
在前述实现图像的滤镜效果的方法的具体实施方式中,可选地,所述将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息返回包括:将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息,以文本文件的形式返回。
本申请实施例中,预先分别将实现各种滤镜效果所需要的基础算法及所述基础算法的执行顺序编辑成文本文件,这样,每个文本文件对应一种滤镜效果的实现方式。
可选地,所述实现图像的滤镜效果的方法还包括:对实现滤镜效果所需 要的基础算法和/或所述基础算法的执行顺序进行更新。
本实施例中,在需要更新滤镜效果的种类(如增加新的滤镜效果)时,只需要更新根据实现滤镜效果所需要的基础算法和/或所述基础算法的执行顺序编辑的文本文件,不需要更新冗长的代码,因此在服务器端可以不断地提供各种新的滤镜效果;相对于所有的滤镜效果都在客户端通过程序的形式实现(更新滤镜效果时,需要更新代码),这种滤镜效果实现方式比较灵活,不仅方便开发人员开发,而且不需要更新代码用户就可以使用最新的滤镜效果。
在前述实现图像的滤镜效果的方法的具体实施方式中,为了使客户端装置本地所保存的滤镜效果的种类更丰富,在对实现滤镜效果所需要的基础算法以及所述基础算法的执行顺序进行更新之后,可以包括:向客户端装置发送滤镜效果更新消息,所述滤镜效果更新消息指示了更新的滤镜效果所需要的基础算法和/或所述基础算法的执行顺序。
参看图6所示,本申请一种服务器的具体实施方式,包括:接收单元21,用于接收客户端装置根据用户选择的滤镜效果,发送滤镜效果实现请求,所述滤镜效果实现请求中携带有用户选择的滤镜效果的标识;查找单元22,用于根据所述请求中的滤镜效果的标识,查找实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序;返回单元23,用于将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息返回。
本申请实施例的实现图像的滤镜效果的方法,查找单元22根据所述用户选择的滤镜效果查找实现所述滤镜效果所需要的基础算法以及所述基础算法的执行顺序,并由返回单元23返回至客户端装置,用于客户端装置根据该文本文件对要处理的图像进行处理,以生成具有相应滤镜效果的图像,这样,当有新的滤镜效果时,不需要更新冗长的代码,而是,重复使用基础算法,将这些基础算法按照不同的执行顺序对图像进行处理并生成相应的滤镜效果,从而,能够快速方便的开发出不同的滤镜效果,提高了滤镜效果的开发效率。
在前述服务器的具体实施方式中,可选地,所述返回单元23,用于将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所 述基础算法的执行顺序的响应消息,以文本文件的形式返回。
本申请实施例中,预先分别将实现各种滤镜效果所需要的基础算法及所述基础算法的执行顺序编辑成文本文件,这样,每个文本文件对应一种滤镜效果的实现方式。
参看图7所示,在前述服务器的具体实施方式中,可选地,所述服务器还包括:更新单元24,用于对实现滤镜效果所需要的基础算法和/或所述基础算法的执行顺序进行更新。
本实施例中,在需要更新滤镜效果的种类(如增加新的滤镜效果)时,只需要更新根据实现滤镜效果所需要的基础算法和/或所述基础算法的执行顺序编辑的文本文件,不需要更新冗长的代码,因此在服务器端可以不断地提供各种新的滤镜效果;相对于所有的滤镜效果都在客户端通过程序的形式实现(更新滤镜效果时,需要更新代码),这种滤镜效果实现方式比较灵活,不仅方便开发人员开发,而且不需要更新代码用户就可以使用最新的滤镜效果。
在前述服务器的具体实施方式中,为了使客户端装置本地所保存的滤镜效果的种类更丰富,所述服务器还可以包括:所述返回单元23,用于向客户端装置发送滤镜效果更新消息,所述滤镜效果更新消息指示了更新的滤镜效果所需要的基础算法以及所述基础算法的执行顺序。
前述各实施例所述的实现图像的滤镜效果的方法、装置及服务器中,所述基础算法包括以下算法中的至少一种:饱和度算法、色调算法、叠加算法、线性减淡算法、颜色减淡算法、正片叠底算法、柔光算法、强光算法、色调曲线算法。
本申请实施例中,每个滤镜效果都是由一系列的基础算法组合而成的,分别单独实现这些基础算法,然后将这些基础算法按照预先设置好的处理顺序进行执行就可以获得一种滤镜效果,当将这些基础算法按照不同放入处理顺序执行时,能够得到不同的滤镜效果。
本申请的各实施例可以应用于基于安卓、塞班、IOS操作系统的手机、平板电脑等智能移动设备上的图片处理过程中,也可以应用于计算机上的图片处理过程中。
为了实现上述目的,本申请实施例还提供了一种存储介质,其中,该存 储介质用于存储应用程序,所述应用程序用于在运行时执行本申请实施例所述的一种实现图像的滤镜效果的方法。其中,本申请所述的一种实现图像的滤镜效果的方法,包括:
接收用户选择一种滤镜效果的指令;
根据所述用户选择的滤镜效果,按照实现所述选择的滤镜效果的基础算法以及所述基础算法的执行顺序,执行所述基础算法对要处理的图像进行处理,从而生成具有所述用户选择的滤镜效果的图像。
为了实现上述目的,本申请实施例还提供了一种应用程序,其中,该应用程序用于在运行时执行本申请实施例所述的一种实现图像的滤镜效果的方法。其中,本申请所述的一种实现图像的滤镜效果的方法,包括:
接收用户选择一种滤镜效果的指令;
根据所述用户选择的滤镜效果,按照实现所述选择的滤镜效果的基础算法以及所述基础算法的执行顺序,执行所述基础算法对要处理的图像进行处理,从而生成具有所述用户选择的滤镜效果的图像。
为了实现上述目的,本申请实施例还提供了一种终端,包括:
处理器、存储器、通信接口和总线;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;
所述存储器存储可执行程序代码;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于:
接收用户选择一种滤镜效果的指令;
根据所述用户选择的滤镜效果,按照实现所述选择的滤镜效果的基础算法以及所述基础算法的执行顺序,执行所述基础算法对要处理的图像进行处理,从而生成具有所述用户选择的滤镜效果的图像。
为了实现上述目的,本申请实施例还提供了一种存储介质,其中,该存储介质用于存储应用程序,所述应用程序用于在运行时执行本申请实施例所述的一种实现图像的滤镜效果的方法。其中,本申请所述的一种实现图像的滤镜效果的方法,包括:
接收客户端装置根据用户选择的滤镜效果,发送的滤镜效果实现请求,所述滤镜效果实现请求中携带有用户选择的滤镜效果的标识;
根据所述请求中的滤镜效果的标识,查找实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序;
将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息返回。
为了实现上述目的,本申请实施例还提供了一种应用程序,其中,该应用程序用于在运行时执行本申请实施例所述的一种实现图像的滤镜效果的方法。其中,本申请所述的一种实现图像的滤镜效果的方法,包括:
接收客户端装置根据用户选择的滤镜效果,发送的滤镜效果实现请求,所述滤镜效果实现请求中携带有用户选择的滤镜效果的标识;
根据所述请求中的滤镜效果的标识,查找实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序;
将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息返回。
为了实现上述目的,本申请实施例还提供了一种服务器,包括:
处理器、存储器、通信接口和总线;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;
所述存储器存储可执行程序代码;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于:
接收客户端装置根据用户选择的滤镜效果,发送的滤镜效果实现请求,所述滤镜效果实现请求中携带有用户选择的滤镜效果的标识;
根据所述请求中的滤镜效果的标识,查找实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序;
将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息返回。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流 程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (28)

  1. 一种实现图像的滤镜效果的方法,其特征在于,包括:
    接收用户选择一种滤镜效果的指令;
    根据所述用户选择的滤镜效果,按照实现所述选择的滤镜效果的基础算法以及所述基础算法的执行顺序,执行所述基础算法对要处理的图像进行处理,从而生成具有所述用户选择的滤镜效果的图像。
  2. 根据权利要求1所述的实现图像的滤镜效果的方法,其特征在于,所述根据所述用户选择的滤镜效果,按照实现所述选择的滤镜效果的基础算法以及所述基础算法的执行顺序,执行所述基础算法对要处理的图像进行处理包括:
    根据所述用户选择的滤镜效果,确定实现所述选择的滤镜效果的基础算法及所述基础算法的执行顺序;
    按照所述确定的基础算法的执行顺序执行所述确定的基础算法从而对要处理的图像进行处理。
  3. 根据权利要求2所述的方法,其特征在于,
    所述根据所述用户选择的滤镜效果,确定实现所述选择的滤镜效果的基础算法及所述基础算法的执行顺序包括:
    根据所述用户选择的滤镜效果,从预先设置的本地数据库中查找实现所述滤镜效果的基础算法及所述基础算法的执行顺序;
    所述按照所述确定的基础算法的执行顺序执行所述确定的基础算法从而对要处理的图像进行处理包括:
    根据所述查找到的基础算法及所述基础算法的执行顺序,按照所述查找到的基础算法的执行顺序执行所述查找的基础算法从而对要处理的图像进行处理。
  4. 根据权利要求2所述的方法,其特征在于,
    所述根据所述用户选择的滤镜效果,确定实现所述选择的滤镜效果 的基础算法及所述基础算法的执行顺序,包括:
    根据所述用户选择的滤镜效果,向服务器发送滤镜效果实现请求,所述滤镜效果实现请求中携带有所述用户选择的滤镜效果的标识;
    接收所述服务器返回的响应信息,所述响应信息中携带有所述服务器根据所述用户选择的滤镜效果的标识查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序;
    对所述响应信息进行解析,从而获得实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序。
  5. 根据权利要求4所述的方法,其特征在于,还包括:
    所述响应消息被设置为文本文件的形式,所述文本文件中记录有实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序。
  6. 根据权利要求4或5所述的方法,其特征在于,还包括:
    将所述获得的实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序在本地进行保存。
  7. 根据权利要求6所述的方法,其特征在于,还包括:
    接收服务器发送的滤镜效果更新消息;
    根据所述滤镜效果更新消息,对本地保存的实现滤镜效果所需要的基础算法和/或所述基础算法的执行顺序进行更新。
  8. 根据权利要求2所述的方法,其特征在于,所述按照所述确定的基础算法的执行顺序执行所述确定的基础算法从而对要处理的图像进行处理包括:
    根据所述确定的基础算法,从本地预先存储的基础算法库中获取所述确定的基础算法,并按照所述确定的基础算法的执行顺序执行所述获取的基础算法从而对要处理的图像进行处理。
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述基础算 法包括以下算法中的至少一种:
    饱和度算法、色调算法、叠加算法、线性减淡算法、颜色减淡算法、正片叠底算法、柔光算法、强光算法、色调曲线算法。
  10. 一种实现图像的滤镜效果的装置,其特征在于,包括:
    接收单元,用于接收用户选择一种滤镜效果的指令;
    处理单元,用于根据所述用户选择的滤镜效果,按照实现所述选择的滤镜效果的基础算法以及所述基础算法的执行顺序,执行所述基础算法对要处理的图像进行处理,从而生成具有所述用户选择的滤镜效果的图像。
  11. 根据权利要求10所述的实现图像的滤镜效果的装置,其特征在于,所述处理单元包括:
    确定模块,用于根据所述用户选择的滤镜效果,确定实现所述选择的滤镜效果的基础算法及所述基础算法的执行顺序;
    处理模块,用于根据所述确定的基础算法的执行顺序执行所述确定的基础算法从而对要处理的图像进行处理。
  12. 根据权利要求11所述的实现图像的滤镜效果的装置,其特征在于,所述确定模块包括:
    查找子模块,用于根据所述用户选择的滤镜效果,从预先设置的本地数据库中查找实现所述滤镜效果的基础算法及所述基础算法的执行顺序;
    所述处理模块,用于根据所述查找到的基础算法及所述基础算法的执行顺序,按照所述查找到的基础算法的执行顺序执行所述查找的基础算法从而对要处理的图像进行处理。
  13. 根据权利要求11所述的实现图像的滤镜效果的装置,其特征在于,所述确定模块包括:
    发送子模块,用于根据所述用户选择的滤镜效果,向服务器发送滤 镜效果实现请求;所述滤镜效果实现请求中携带有所述用户选择的滤镜效果的标识;
    接收子模块,用于接收所述服务器返回的响应信息,所述响应信息中携带有所述服务器根据所述用户选择的滤镜效果的标识查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序;
    解析子模块,用于对所述响应信息进行解析,从而获得实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序。
  14. 根据权利要求13所述的实现图像的滤镜效果的装置,其特征在于:
    所述接收子模块,用于接收所述服务器返回的文本文件的形式的响应消息,所述文本文件中记录有实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序。
  15. 根据权利要求13或14所述的实现图像的滤镜效果的装置,其特征在于,所述确定模块还包括:
    存储子模块,用于将所述获得的实现所述用户选择的滤镜效果所需要的基础算法及所述基础算法的执行顺序在本地进行保存。
  16. 根据权利要求15所述的实现图像的滤镜效果的装置,其特征在于:
    所述接收子模块,还用于接收所述服务器发送的滤镜效果更新消息;
    所述确定模块还包括:
    更新子模块,用于根据所述滤镜效果更新消息,对本地保存的滤镜效果所需要的基础算法和/或所述基础算法的执行顺序进行更新。
  17. 根据权利要求11所述的实现图像的滤镜效果的装置,其特征在于,所述处理模块包括:
    获取子模块,用于根据所述确定的基础算法,从本地预先存储的基 础算法库中获取所述确定的基础算法;
    执行子模块,用于按照所述确定的基础算法的执行顺序执行所述获取的基础算法从而对要处理的图像进行处理。
  18. 根据权利要求10-17任一项所述的实现图像的滤镜效果的装置,其特征在于,所述基础算法包括以下算法中的至少一种:
    饱和度算法、色调算法、叠加算法、线性减淡算法、颜色减淡算法、正片叠底算法、柔光算法、强光算法、色调曲线算法。
  19. 一种实现图像的滤镜效果的方法,其特征在于,包括:
    接收客户端装置根据用户选择的滤镜效果,发送的滤镜效果实现请求,所述滤镜效果实现请求中携带有用户选择的滤镜效果的标识;
    根据所述请求中的滤镜效果的标识,查找实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序;
    将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息返回。
  20. 根据权利要求19所述的实现图像的滤镜效果的方法,其特征在于,所述将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息返回包括:
    将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息,以文本文件的形式返回。
  21. 根据权利要求19所述的实现图像的滤镜效果的方法,其特征在于,所述方法还包括:
    对实现滤镜效果所需要的基础算法和/或所述基础算法的执行顺序进行更新。
  22. 根据权利要求21所述的实现图像的滤镜效果的方法,其特征在于,在对实现滤镜效果所需要的基础算法以及所述基础算法的执行顺序 进行更新之后,所述方法包括:
    向客户端装置发送滤镜效果更新消息,所述滤镜效果更新消息指示了更新的滤镜效果所需要的基础算法和/或所述基础算法的执行顺序。
  23. 根据权利要求19-22任一项所述的实现图像的滤镜效果的方法,其特征在于,所述基础算法包括以下算法中的至少一种:
    饱和度算法、色调算法、叠加算法、线性减淡算法、颜色减淡算法、正片叠底算法、柔光算法、强光算法、色调曲线算法。
  24. 一种服务器,其特征在于,包括:
    接收单元,用于接收客户端装置根据用户选择的滤镜效果,发送的滤镜效果实现请求,所述滤镜效果实现请求中携带有用户选择的滤镜效果的标识;
    查找单元,用于根据所述请求中的滤镜效果的标识,查找实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序;
    返回单元,用于将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息返回。
  25. 根据权利要求24所述的服务器,其特征在于:
    所述返回单元,用于将携带有所述查找到的、实现所述用户选择的滤镜效果所需要的基础算法以及所述基础算法的执行顺序的响应消息,以文本文件的形式返回。
  26. 根据权利要求24所述的服务器,其特征在于,还包括:
    更新单元,用于对实现滤镜效果所需要的基础算法和/或所述基础算法的执行顺序进行更新。
  27. 根据权利要求26所述的服务器,其特征在于,还包括:
    所述返回单元还用于向客户端装置发送滤镜效果更新消息,所述滤镜效果更新消息指示了更新的滤镜效果所需要的基础算法和/或所述基础算法的执行顺序。
  28. 根据权利要求24-27任一项所述的服务器,其特征在于,所述基础算法包括以下算法中的至少一种:
    饱和度算法、色调算法、叠加算法、线性减淡算法、颜色减淡算法、正片叠底算法、柔光算法、强光算法、色调曲线算法。
PCT/CN2015/083492 2014-08-15 2015-07-07 一种实现图像的滤镜效果的方法、装置及服务器 WO2016023407A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410404749.2A CN105335940A (zh) 2014-08-15 2014-08-15 一种实现图像的滤镜效果的方法、装置及服务器
CN201410404749.2 2014-08-15

Publications (1)

Publication Number Publication Date
WO2016023407A1 true WO2016023407A1 (zh) 2016-02-18

Family

ID=55286450

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/083492 WO2016023407A1 (zh) 2014-08-15 2015-07-07 一种实现图像的滤镜效果的方法、装置及服务器

Country Status (2)

Country Link
CN (1) CN105335940A (zh)
WO (1) WO2016023407A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114071181A (zh) * 2021-11-26 2022-02-18 上海米哈游天命科技有限公司 一种图像处理方法、系统、设备及计算机可读存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106557559B (zh) * 2016-11-10 2020-06-02 北京小米移动软件有限公司 一种图像处理的方法和装置
CN107295251B (zh) * 2017-06-09 2018-09-25 腾讯科技(深圳)有限公司 图像处理方法、装置、终端及存储介质
CN112561827A (zh) * 2020-12-22 2021-03-26 Oppo广东移动通信有限公司 图像处理方法、装置、电子设备和计算机可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1758702A (zh) * 2004-10-08 2006-04-12 诺日士钢机株式会社 摄影图像处理装置
US7263221B1 (en) * 1999-06-25 2007-08-28 Minolta Co., Ltd. Image processing for image correction
CN102811313A (zh) * 2011-05-31 2012-12-05 奥林巴斯映像株式会社 摄像装置和摄像方法
CN102811306A (zh) * 2011-05-31 2012-12-05 奥林巴斯映像株式会社 摄像装置和摄像方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102810200A (zh) * 2012-06-15 2012-12-05 成都平行视野科技有限公司 一种图像批处理的方法
CN103533241B (zh) * 2013-10-14 2017-05-10 厦门美图网科技有限公司 一种智能滤镜的拍照方法
CN103916597A (zh) * 2014-03-17 2014-07-09 厦门美图之家科技有限公司 一种模拟场景的拍摄方法
CN103927720A (zh) * 2014-04-09 2014-07-16 厦门美图之家科技有限公司 一种天空图像的识别及优化方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7263221B1 (en) * 1999-06-25 2007-08-28 Minolta Co., Ltd. Image processing for image correction
CN1758702A (zh) * 2004-10-08 2006-04-12 诺日士钢机株式会社 摄影图像处理装置
CN102811313A (zh) * 2011-05-31 2012-12-05 奥林巴斯映像株式会社 摄像装置和摄像方法
CN102811306A (zh) * 2011-05-31 2012-12-05 奥林巴斯映像株式会社 摄像装置和摄像方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114071181A (zh) * 2021-11-26 2022-02-18 上海米哈游天命科技有限公司 一种图像处理方法、系统、设备及计算机可读存储介质

Also Published As

Publication number Publication date
CN105335940A (zh) 2016-02-17

Similar Documents

Publication Publication Date Title
EP3333704B1 (en) Method and apparatus for repairing kernel vulnerability
WO2016023407A1 (zh) 一种实现图像的滤镜效果的方法、装置及服务器
CN111190924A (zh) 跨域的数据查询方法及装置
US11269902B2 (en) Time series data management method, device, and apparatus
CN106528124B (zh) 页面模板发布方法和系统
CN103984582A (zh) 一种热更新方法和装置
RU2014104582A (ru) Система среды выполнения
CN104113576A (zh) 一种客户端的更新方法及装置
US20170270106A1 (en) Methods and apparatuses for storing file path and accessing local file
CN109976743B (zh) 一种代码提示的方法及装置
WO2019041891A1 (zh) 升级包的生成方法及装置
CN115098062A (zh) 一种代码生成方法及装置
CN107357691B (zh) 镜像文件的处理方法及装置
CN105577707B (zh) 一种远程调用方法与设备
CN110955712A (zh) 基于多数据源的开发api处理方法及装置
CN116467433A (zh) 面向多源数据的知识图谱可视化方法、装置、设备及介质
CN114819631A (zh) 一种多任务的可视化方法、装置、计算机设备及存储介质
CN107977459A (zh) 报表生成方法及装置
JP2015081918A (ja) 走行中のナビゲーションデータの部分アップデート装置及び方法
CN111104144A (zh) 一种锚点更新的方法及装置
CN107770265B (zh) 一种数据同步方法、数据同步装置及移动终端
CN107180107B (zh) Ionic框架下的手机附件上传选择文件的方法及系统
CN104572097A (zh) 一种拍照数据回调处理方法以及装置
CN106682221B (zh) 问答交互的响应方法、装置及问答系统
CN110209885A (zh) 一种图查询方法及系统

Legal Events

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

Ref document number: 15831756

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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

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

122 Ep: pct application non-entry in european phase

Ref document number: 15831756

Country of ref document: EP

Kind code of ref document: A1