[go: up one dir, main page]

WO2016127671A1 - 图像滤镜生成方法及装置 - Google Patents

图像滤镜生成方法及装置 Download PDF

Info

Publication number
WO2016127671A1
WO2016127671A1 PCT/CN2015/093400 CN2015093400W WO2016127671A1 WO 2016127671 A1 WO2016127671 A1 WO 2016127671A1 CN 2015093400 W CN2015093400 W CN 2015093400W WO 2016127671 A1 WO2016127671 A1 WO 2016127671A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
similar
color
effect
filter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2015/093400
Other languages
English (en)
French (fr)
Inventor
王百超
陈志军
侯文迪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to JP2016526183A priority Critical patent/JP6335289B2/ja
Priority to MX2016000844A priority patent/MX356153B/es
Priority to KR1020167000127A priority patent/KR101727169B1/ko
Priority to RU2016107731A priority patent/RU2628494C1/ru
Publication of WO2016127671A1 publication Critical patent/WO2016127671A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20016Hierarchical, coarse-to-fine, multiscale or multiresolution image processing; Pyramid transform
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/469Contour-based spatial representations, e.g. vector-coding
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour

Definitions

  • the present disclosure relates to the field of image processing technologies, and in particular, to an image filter generating method and apparatus.
  • some image processing application allows the user to obtain a custom filter by adjusting the relevant parameters of the filter.
  • the user can process the image with a custom filter to get the customization.
  • the image of the effect of the filter is not limited to a custom filter by adjusting the relevant parameters of the filter.
  • the present disclosure provides a method and apparatus for generating an image filter.
  • the technical solution is as follows:
  • an image filter generating method comprising:
  • the similar image group including at least one similar image having a similar structure to the effect image but having no filter effect;
  • an image filter generating apparatus comprising:
  • a first acquiring module configured to acquire a selected effect image
  • a second obtaining module configured to acquire a similar image group by using the effect image, the similar image group including at least one similar image having a similar structure to the effect image but having no filter effect;
  • the calculation module is configured to calculate a mapping relationship between the similar image group acquired by the second acquisition module and the effect image acquired by the first acquisition module, and use the mapping relationship as an image filter.
  • an image filter generating apparatus comprising:
  • a memory for storing the processor executable instructions
  • processor is configured to:
  • the similar image group including at least one similar image having a similar structure to the effect image but having no filter effect;
  • the mapping relationship between the similar image group and the effect image is calculated by acquiring a similar image group having a similar structure to the effect image, and the mapping relationship is used as an image filter; and the parameter adjusted by the user is solved due to low professionalism of the user.
  • the obtained custom filter does not solve the problem that the processed image achieves the desired effect of the user; the effect of improving the accuracy of the custom generated image filter is achieved.
  • FIG. 1 is a flowchart of an image filter generating method according to an exemplary embodiment
  • FIG. 2A is a flowchart of an image filter generating method according to another exemplary embodiment
  • FIG. 2B is a flowchart of a similar image determining method according to an exemplary embodiment
  • FIG. 3 is a block diagram of an image filter generating apparatus according to an exemplary embodiment
  • FIG. 4 is a block diagram of an image filter generating apparatus according to another exemplary embodiment
  • FIG. 5 is a block diagram of an apparatus for generating an image filter, according to an exemplary embodiment.
  • FIG. 1 is a flowchart of a method for generating an image filter according to an exemplary embodiment.
  • the image filter generating method is applied to an electronic device, which may be a smart phone or a tablet. , smart TV, e-book reader, multimedia player, laptop portable computer and desktop computer, and so on.
  • the image filter generating method includes the following steps.
  • step 101 the selected effect image is acquired.
  • a similar image group is acquired using the effect image, the similar image group including at least one similar image having a similar structure to the effect image but having no filter effect.
  • a similar structure here refers to a scene in which a similar image has a similar scene and/or a similar composition structure.
  • the scene of the effect image is mainly composed of beach and ocean, and the composition structure of the effect image is: the ratio of beach to ocean is 1:1, the beach is in the lower half of the effect image, and the ocean is in the upper part of the effect image.
  • the similar images obtained with the similar structure of the effect image also have the beach and the ocean, and the ratio of the beach to the ocean in the similar image is also 1:1 or close to 1:1, and the position of the beach in the similar image is similar. In the lower part of the image, the position occupied by the ocean is the upper part of the similar image.
  • step 103 a mapping relationship of the similar image group transformation to the effect image is calculated, and the mapping relationship is used as an image filter.
  • the image filter generating method calculates a mapping relationship between the similar image group and the effect image by acquiring a similar image group having a similar structure to the effect image, and uses the mapping relationship as an image.
  • the filter solves the problem that the custom filter obtained by the user adjustment parameter cannot make the processed image reach the desired effect of the user due to the low professionalism of the user; the image filter for improving the custom generated image is achieved. The effect of accuracy.
  • FIG. 2A is a flowchart of an image filter generating method according to another exemplary embodiment.
  • the image filter generating method is applied to an electronic device, and the electronic device may be a smart phone or a tablet.
  • the image filter generating method includes the following steps.
  • step 201 the selected effect image is acquired.
  • the effect image here is selected by the user, and the effect image may be an image with a filter effect photographed by a professional photographer, or an image with a filter effect downloaded by the user.
  • the filter effect of the effect image is a filter effect that the user wants to process the image to be processed.
  • the electronic device may generate an image filter according to the effect image, and use the image filter to process the image to be processed, so that the image The image to be processed reaches the filter effect of the effect image.
  • the electronic device can use the effect image to match the sample image in the image library to obtain a similar image having a similar structure to the effect image but no filter effect. See steps 202 through 205 below.
  • step 202 a first feature vector of the effect image is calculated.
  • the electronic device may calculate the first feature vector of the effect image by using a spatial pyramid matching algorithm.
  • the electronic device can continuously reduce the effect image to obtain a series of images of different sizes, and form the pyramid model from the bottom to the top, and the effect image is a gold tower model.
  • the image obtained by each reduced order sampling is a layer of the pyramid model.
  • the electronic device divides each layer of the image of the pyramid model, and statistically summarizes the feature histogram in each block, and finally combines all the blocks of all layers into one feature vector, and uses the feature vector as The first feature vector.
  • the first feature vector obtained here can be used to indicate structural information in the effect image, the structural information mainly including the scene and/or the composition structure in the effect image.
  • the feature vector is fused by the spatial pyramid matching algorithm to global and local information of the image, the feature vector can be used to indicate structural information in the image, and the feature vector can also be used to perform structural information in the image. match.
  • step 203 a second feature vector of each sample image in the image library is obtained, and the sample image is an image without a filter effect.
  • the image library here may be stored in the electronic device or may be stored in the server, which is not limited in this embodiment.
  • the image library contains multiple sample images covering multiple scenes, and these sample images do not have a filter effect.
  • the electronic device may directly read the pre-computed feature vector of each sample image, and read the feature vector of each sample image. As a second feature vector for each sample image.
  • step 204 the first feature vector is compared with each of the second feature vectors to determine at least one similar image from the sample image.
  • the electronic device may determine the effect from the sample images by comparing the first feature vector with each of the second feature vectors. A similar image with similar structure but no filter effect.
  • the electronic device may calculate the first feature vector of the effect image and the second feature vector of the sample image. The distance between them determines whether the sample image is a similar image. See steps 204a and 204b below.
  • FIG. 2B is a flowchart of a similar image determining method, according to an exemplary embodiment.
  • step 204a for each sample image, the distance between the first feature vector of the effect image and the second feature vector of the sample image is calculated.
  • the electronic device calculates a distance between the second feature vector of the sample image and the first feature vector of the effect image, where the distance may be an Euclidean distance, a Manhattan distance, or the like.
  • step 204b if the calculated distance is less than the predetermined distance threshold, the sample image is determined to be a similar image.
  • the sample image is determined to have a similar structure to the effect image but has no filter effect. Similar images.
  • step 205 the determined at least one similar image constitutes a similar image group.
  • the similar images can be grouped into a similar image group for storage.
  • steps 202 to 205 describe a graph search algorithm using a similar image group obtained by matching the effect image.
  • the electronic device may also use other graph search algorithms to obtain and effect the graph.
  • the image has a similar structure but a similar image without a filter effect, which is not limited in this embodiment.
  • the mapping relationship of the similar image group transformation to the effect image can be calculated, and the mapping relationship is used as an image filter to preprocess The image is processed such that the preprocessed image has a filter effect of the effect image after being processed. See steps 206 through 209 below.
  • step 206 the color mean and color variance of all the pixels of all similar images in the similar image group are calculated, the calculated color mean is determined as the first color mean, and the calculated color variance is determined as the first color variance.
  • the electronic device calculates the color mean value and the color variance of all the pixels of all similar images in the similar image group, and determines the calculated color mean value as the first color mean value, and determines the calculated color variance. Is the variance of the first color.
  • step 207 the color mean and the color variance of all the pixels of the effect image are calculated, the calculated color mean is determined as the second color mean, and the calculated color variance is determined as the second color variance.
  • a mapping relationship is generated based on the first color mean, the first color variance, the second color mean, and the second color variance.
  • the electronic device may generate a mapping relationship of the similar image group transformation to the effect image according to the values, and use the mapping relationship as the image filtering. mirror.
  • mapping relationship here is mG is the first color mean, vG is the first color variance, mA is the second color mean, vA is the second color variance, and (l, a, b) is the pixel value before a pixel point transformation, (L, A, B) is the pixel value after the pixel point changes.
  • the pixel value of the pixel is represented by a color space.
  • step 209 the pixel values of the respective pixels of the image to be processed are transformed according to the mapping relationship to obtain an image processed by the image filter.
  • the electronic device After the electronic device obtains the mapping relationship between the similar image group and the effect image, that is, after the electronic device generates the image filter, the pixel value of each pixel of the image to be processed may be transformed according to the mapping relationship, thereby obtaining the The image processed by the image filter.
  • the image obtained by the electronic device is an image having a filter effect of the effect image.
  • steps 206 to 208 describe a color migration algorithm for calculating a mapping relationship between a similar image group and an effect image.
  • the electronic device may also use other color migration algorithms to obtain a similar image group transformation.
  • the mapping relationship to the effect image is not limited in this embodiment.
  • the image filter generating method calculates a mapping relationship between the similar image group and the effect image by acquiring a similar image group having a similar structure to the effect image, and uses the mapping relationship as an image.
  • the filter solves the problem that the custom filter obtained by the user adjustment parameter cannot make the processed image reach the desired effect of the user due to the low professionalism of the user; the image filter for improving the custom generated image is achieved. The effect of accuracy.
  • the image filter generating method obtaineds an image processed by the image filter by transforming the pixel values of the respective pixel points of the image to be processed according to the mapping relationship;
  • the filter effect of the user-selected effect image can be achieved, thus solving the problem that the custom filter obtained by the user adjustment parameter can not make the processed image achieve the desired effect of the user;
  • the effect of the use of the mirror is obtained by transforming the pixel values of the respective pixel points of the image to be processed according to the mapping relationship
  • the configuration of the image filter generally requires a basic method such as color conversion, contrast adjustment, vignetting, and the color conversion method is mainly described in the above embodiment.
  • the color migration algorithm described in steps 206 to 208 in the above embodiment may be replaced with other basic algorithms, such as a contrast transformation algorithm, to implement different filter effects.
  • FIG. 3 is a block diagram of an image filter generating apparatus according to an exemplary embodiment.
  • the image filter generating apparatus is applied to an electronic device, and the electronic device may be a smart phone, a tablet, or Smart TVs, e-book readers, multimedia players, laptop portable computers and desktop computers, to name a few.
  • the image filter generating device may include, but is not limited to, a first obtaining module 301, a second obtaining module 302, and a calculating module 303.
  • the first obtaining module 301 is configured to acquire the selected effect image.
  • the second obtaining module 302 is configured to acquire a similar image group using the effect image, the similar image group including at least one similar image having a similar structure to the effect image but having no filter effect.
  • the calculation module 303 is configured to calculate a mapping relationship between the similar image group acquired by the second acquisition module 302 and the effect image acquired by the first acquisition module 301, and use the mapping relationship as an image filter.
  • the image filter generating apparatus calculates a mapping relationship between the similar image group and the effect image by acquiring a similar image group having a similar structure to the effect image, and uses the mapping relationship as an image.
  • the filter solves the problem that the custom filter obtained by the user adjustment parameter cannot make the processed image reach the desired effect of the user due to the low professionalism of the user; the image filter for improving the custom generated image is achieved. The effect of accuracy.
  • FIG. 4 is a block diagram of an image filter generating apparatus according to another exemplary embodiment.
  • the image filter generating apparatus is applied to an electronic device, and the electronic device may be a smart phone or a tablet. , smart TV, e-book reader, multimedia player, laptop portable computer and desktop computer, and so on.
  • the image filter generating device may include, but is not limited to, a first obtaining module 401, a second obtaining module 402, and a calculating module 403.
  • the first obtaining module 401 is configured to acquire the selected effect image.
  • the second obtaining module 402 is configured to acquire a similar image group using the effect image, the similar image group including at least one similar image having a similar structure to the effect image but having no filter effect.
  • the calculation module 403 is configured to calculate a mapping relationship between the similar image group acquired by the second acquisition module 402 and the effect image acquired by the first acquisition module 401, and use the mapping relationship as an image filter.
  • the second obtaining module 402 may include: a first calculating submodule 402a, an obtaining submodule 402b, a determining submodule 402c, and a composing submodule 402d.
  • the first calculation sub-module 402a is configured to calculate a first feature vector of the effect image.
  • the acquisition sub-module 402b is configured to acquire a second feature vector of each sample image in the image library, the sample image being an image without a filter effect.
  • the determining sub-module 402c is configured to compare the first feature vector calculated by the first calculating sub-module 402a with each second feature vector acquired by the obtaining sub-module 402b, and determine at least one similar image from the sample image.
  • the component sub-module 402d is configured to form at least one similar image determined by the determination sub-module 402c into a similar image group.
  • the calculation module 403 can include: a second calculation submodule 403a, a third calculation submodule 403b, and a generation submodule 403c.
  • the second calculation sub-module 403a is configured to calculate a color mean and a color variance of all the pixels of all similar images in the similar image group, determine the calculated color mean as the first color mean, and determine the calculated color variance. Is the variance of the first color.
  • the third calculating sub-module 403b is configured to calculate a color mean value and a color variance of all pixel points of the effect image, determine the calculated color mean value as a second color mean value, and determine the calculated color variance as the second color variance .
  • the generating submodule 403c is configured to generate a mapping relationship according to the first color mean, the first color variance, the second color mean, and the second color variance.
  • mapping relationship here is mG is the first color mean, vG is the first color variance, mA is the second color mean, vA is the second color variance, and (l, a, b) is the pixel value before a pixel point transformation, (L, A, B) is the pixel value after the pixel point changes.
  • the image filter generating device may further include: a transform module 404.
  • the transform module 404 is configured to convert pixel values of respective pixels of the image to be processed according to a mapping relationship to obtain an image processed by the image filter.
  • the image filter generating apparatus calculates a mapping relationship between the similar image group and the effect image by acquiring a similar image group having a similar structure to the effect image, and uses the mapping relationship as an image.
  • Filter The mirror solves the problem that the custom filter obtained by the user adjustment parameter cannot make the processed image reach the desired effect of the user due to the low professionalism of the user; the accuracy of the image filter for improving the custom generation is improved. Sexual effect.
  • the image filter generating apparatus obtains an image processed by the image filter by transforming pixel values of respective pixels of the image to be processed according to a mapping relationship;
  • the filter effect of the user-selected effect image can be achieved, thus solving the problem that the custom filter obtained by the user adjustment parameter can not make the processed image achieve the desired effect of the user;
  • the effect of the use of the mirror is obtained by transforming pixel values of respective pixels of the image to be processed according to a mapping relationship
  • An exemplary embodiment of the present disclosure provides an image filter generating apparatus capable of implementing the image filter generating method provided by the present disclosure, the image filter generating apparatus comprising: a processor, a memory for storing processor executable instructions ;
  • processor is configured to:
  • the similar image group including at least one similar image having a similar structure to the effect image but having no filter effect;
  • mapping relationship of the similar image group transformation to the effect image is calculated, and the mapping relationship is used as an image filter.
  • FIG. 5 is a block diagram of an apparatus for generating an image filter, according to an exemplary embodiment.
  • device 500 can be provided as an electronic device such as a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a personal digital assistant, and the like.
  • apparatus 500 can include one or more of the following components: processing component 502, memory 504, power component 506, multimedia component 508, audio component 510, input/output (I/O) interface 512, sensor component 514, and Communication component 516.
  • Processing component 502 typically controls the overall operation of device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • Processing component 502 can include one or more processors 518 to execute instructions to perform all or part of the steps described above.
  • processing component 502 can include one or more modules to facilitate interaction between component 502 and other components.
  • processing component 502 can include a multimedia module to facilitate interaction between multimedia component 508 and processing component 502.
  • Memory 504 is configured to store various types of data to support operation at device 500. Examples of such data include instructions for any application or method operating on device 500, contact data, phone book data, messages, pictures, videos, and the like.
  • the memory 504 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM Electrically erasable programmable read only memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Disk Disk or Optical Disk.
  • Power component 506 provides power to various components of device 500.
  • Power component 506 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for device 500.
  • the multimedia component 508 includes a screen between the device 500 and the user that provides an output interface.
  • the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can sense not only the boundaries of the touch or sliding action, but also the duration and pressure associated with the touch or slide operation.
  • the multimedia component 508 includes a front camera and/or a rear camera. When the device 500 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 510 is configured to output and/or input an audio signal.
  • audio component 510 includes a microphone (MIC) that is configured to receive an external audio signal when device 500 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode.
  • the received audio signal may be further stored in memory 504 or transmitted via communication component 516.
  • audio component 510 also includes a speaker for outputting an audio signal.
  • the I/O interface 512 provides an interface between the processing component 502 and the peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.
  • Sensor assembly 514 includes one or more sensors for providing device 500 with various aspects of status assessment.
  • sensor component 514 can detect an open/closed state of device 500, relative positioning of components, such as a display and keypad of device 500, and sensor component 514 can also detect a change in position of device 500 or a component of device 500, user The presence or absence of contact with device 500, device 500 orientation or acceleration/deceleration and temperature variation of device 500.
  • Sensor assembly 514 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
  • Sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 514 can also include an acceleration sensor, a gyroscope Sensor, magnetic sensor, pressure sensor or temperature sensor.
  • Communication component 516 is configured to facilitate wired or wireless communication between device 500 and other devices.
  • the device 500 can access a wireless network based on a communication standard, such as Wi-Fi, 2G or 3G, or a combination thereof.
  • communication component 516 receives broadcast signals or broadcast associated information from an external broadcast management system via a broadcast channel.
  • communication component 516 also includes a near field communication (NFC) module to facilitate short range communication.
  • NFC near field communication
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • apparatus 500 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the image filter generation method described above.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A gate array
  • controller microcontroller, microprocessor or other electronic component implementation for performing the image filter generation method described above.
  • non-transitory computer readable storage medium comprising instructions, such as a memory 504 comprising instructions executable by processor 518 of apparatus 500 to perform the image filter generation method described above.
  • the non-transitory computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

本公开揭示了一种图像滤镜生成方法及装置,属于图像处理领域。所述图像滤镜生成方法包括:获取选定的效果图像;利用所述效果图像获取相似图像组,所述相似图像组包括至少一张与所述效果图像具有相似结构但不具有滤镜效果的相似图像;计算所述相似图像组变换到所述效果图像的映射关系,将所述映射关系作为图像滤镜。通过获取与效果图像具有相似结构的相似图像组,计算该相似图像组变换到效果图像的映射关系,将该映射关系作为图像滤镜;解决了由于用户的专业性较低,导致由用户调节参数获得的自定义滤镜无法使得处理后的图像达到用户想要的效果的问题;达到了提高自定义生成的图像滤镜的准确性的效果。

Description

图像滤镜生成方法及装置
相关申请的交叉引用
本申请基于申请号为201510072609.4、申请日为2015年2月11日的中国申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及图像处理技术领域,特别涉及一种图像滤镜生成方法及装置。
背景技术
目前,有很多图像处理类的应用程序提供滤镜功能,这些应用程序大多提供一组由专业设计人员定义的滤镜,用户可以用这些滤镜来对图像进行处理,进而改变该图像的风格。但这些滤镜都是预先定义好的,用户并不能通过修改这些滤镜来达到自己想要的效果。
为了更好地满足用户,某些图像处理类的应用程序允许用户通过调节滤镜的相关参数来获得自定义滤镜,用户可以用自定义滤镜来对图像进行处理,进而得到具有该自定义滤镜的效果的图像。
发明内容
本公开提供一种图像滤镜生成方法及装置。所述技术方案如下:
根据本公开实施例的第一方面,提供一种图像滤镜生成方法,所述方法包括:
获取选定的效果图像;
利用所述效果图像获取相似图像组,所述相似图像组包括至少一张与所述效果图像具有相似结构但不具有滤镜效果的相似图像;
计算所述相似图像组变换到所述效果图像的映射关系,将所述映射关系作为图像滤镜。
根据本公开实施例的第二方面,提供一种图像滤镜生成装置,所述装置包括:
第一获取模块,被配置为获取选定的效果图像;
第二获取模块,被配置为利用所述效果图像获取相似图像组,所述相似图像组包括至少一张与所述效果图像具有相似结构但不具有滤镜效果的相似图像;
计算模块,被配置为计算所述第二获取模块获取的所述相似图像组变换到所述第一获取模块获取的所述效果图像的映射关系,将所述映射关系作为图像滤镜。
根据本公开实施例的第三方面,提供一种图像滤镜生成装置,所述装置包括:
处理器;
用于存储所述处理器可执行指令的存储器;
其中,所述处理器被配置为:
获取选定的效果图像;
利用所述效果图像获取相似图像组,所述相似图像组包括至少一张与所述效果图像具有相似结构但不具有滤镜效果的相似图像;
计算所述相似图像组变换到所述效果图像的映射关系,将所述映射关系作为图像滤镜。
本公开的实施例提供的技术方案可以包括以下有益效果:
通过获取与效果图像具有相似结构的相似图像组,计算该相似图像组变换到效果图像的映射关系,将该映射关系作为图像滤镜;解决了由于用户的专业性较低,导致由用户调节参数获得的自定义滤镜无法使得处理后的图像达到用户想要的效果的问题;达到了提高自定义生成的图像滤镜的准确性的效果。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并于说明书一起用于解释本公开的原理。
图1是根据一示例性实施例示出的一种图像滤镜生成方法的流程图;
图2A是根据另一示例性实施例示出的一种图像滤镜生成方法的流程图;
图2B是根据一示例性实施例示出的一种相似图像确定方法的流程图;
图3是根据一示例性实施例示出的一种图像滤镜生成装置的框图;
图4是根据另一示例性实施例示出的一种图像滤镜生成装置的框图;
图5是根据一示例性实施例示出的一种用于生成图像滤镜的装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
图1是根据一示例性实施例示出的一种图像滤镜生成方法的流程图,如图1所示,该图像滤镜生成方法应用于电子设备中,该电子设备可以是智能手机、平板电脑、智能电视、电子书阅读器、多媒体播放器、膝上型便携计算机和台式计算机等等。该图像滤镜生成方法包括以下步骤。
在步骤101中,获取选定的效果图像。
在步骤102中,利用效果图像获取相似图像组,该相似图像组包括至少一张与该效果图像具有相似结构但不具有滤镜效果的相似图像。
这里的相似结构是指相似图像与该效果图像有着相似的场景和/或相似的构图结构。比如,效果图像的场景主要是由沙滩和海洋组成,且效果图像中构图结构特点为:沙滩和海洋的比例为1:1,沙滩在效果图像的下半部分,海洋在效果图像的上半部分。而获取的与效果图像具有相似结构的相似图像中同样具有沙滩和海洋,且相似图像中沙滩和海洋的比例也为1:1或者接近于1:1,相似图像中沙滩所占的位置为相似图像的下部,海洋所占的位置为相似图像的上部。
在步骤103中,计算相似图像组变换到效果图像的映射关系,将该映射关系作为图像滤镜。
综上所述,本公开实施例中提供的图像滤镜生成方法,通过获取与效果图像具有相似结构的相似图像组,计算该相似图像组变换到效果图像的映射关系,将该映射关系作为图像滤镜;解决了由于用户的专业性较低,导致由用户调节参数获得的自定义滤镜无法使得处理后的图像达到用户想要的效果的问题;达到了提高自定义生成的图像滤镜的准确性的效果。
图2A是根据另一示例性实施例示出的一种图像滤镜生成方法的流程图,如图2A所示,该图像滤镜生成方法应用于电子设备中,该电子设备可以是智能手机、平板电脑、智能电视、电子书阅读器、多媒体播放器、膝上型便携计算机和台式计算机等等。该图像滤镜生成方法包括以下步骤。
在步骤201中,获取选定的效果图像。
这里的效果图像是由用户选定的,该效果图像可以是由专业摄影师拍摄好的具有滤镜效果的图像,也可以是用户下载收藏的具有滤镜效果的图像。
一般的,该效果图像的滤镜效果是用户想要将待处理图像进行处理后所达到的滤镜效果。电子设备可以根据该效果图像生成图像滤镜,并用该图像滤镜处理待处理图像,使得该 待处理图像达到该效果图像的滤镜效果。
电子设备在获取效果图像后,可以利用该效果图像与图像库中的样本图像进行匹配,得到一组与该效果图像具有相似结构但不具有滤镜效果的相似图像。请参见下述步骤202至205。
在步骤202中,计算效果图像的第一特征向量。
电子设备在获取效果图像后,可以采用空间金字塔匹配算法来计算得到该效果图像的第一特征向量。
可选的,电子设备可以不断地将效果图像进行降阶采样,得到一系列大小不一的图像,将这些图像由大到小,从下到上构成金字塔模型,该效果图像为金子塔模型的第一层,每次降阶采样得到的图像为该金字塔模型的一层。电子设备在得到金字塔模型后,对该金字塔模型的每层图像进行分块,并在每个块内统计特征直方图,最终将所有层的所有块组合成一个特征向量,并将该特征向量作为第一特征向量。
这里得到的第一特征向量可以用于指示效果图像中的结构信息,该结构信息主要包括该效果图像中的场景和/或构图结构。
需要说明的是,由于通过空间金字塔匹配算法得到特征向量融合了图像的全局和局部信息,因此该特征向量可以用于指示图像中的结构信息,也可以利用该特征向量对图像中的结构信息进行匹配。
在步骤203中,获取图像库中每张样本图像的第二特征向量,该样本图像为不具有滤镜效果的图像。
这里的图像库可以存储在电子设备中,也可以存储在服务器中,本实施例对此不作限定。
该图像库中包含有覆盖多种场景的多张样本图像,且这些样本图像都不具有滤镜效果。
可选的,电子设备在获取图像库中每张样本图像的第二特征向量时,可以直接读取预先计算好的每张样本图像的特征向量,并将读取的每张样本图像的特征向量作为每张样本图像的第二特征向量。
在步骤204中,将第一特征向量与各个第二特征向量进行比较,从样本图像中确定出至少一张相似图像。
电子设备在得到效果图像的第一特征向量以及每张样本图像的第二特征向量后,可以通过将该第一特征向量与各个第二特征向量进行比较来从这些样本图像中确定出与该效果图像具有相似结构但不具有滤镜效果的相似图像。
可选的,电子设备可以通过计算效果图像的第一特征向量与样本图像的第二特征向量之 间的距离来确定该样本图像是否为相似图像。请参见下述步骤204a和204b。图2B是根据一示例性实施例示出的一种相似图像确定方法的流程图。
在步骤204a中,对于每张样本图像,计算效果图像的第一特征向量与该样本图像的第二特征向量之间的距离。
对于每张样本图像,电子设备计算该样本图像的第二特征向量与效果图像的第一特征向量之间的距离,这里的距离可以是欧氏距离、曼哈顿距离等。
在步骤204b中,若计算得到的距离小于预定距离阈值,则将该样本图像确定为相似图像。
电子设备在计算得到某个样本图像的第二特征向量与效果图像的第一特征向量之间的距离小于预定距离阈值时,将该样本图像确定为与效果图像具有相似结构但不具有滤镜效果的相似图像。
需要说明的是,样本图像的第二特征向量与效果图像的第一特征向量之间的距离越小,说明样本图像与效果图像的结构越相似。
在步骤205中,将确定的至少一张相似图像组成相似图像组。
电子设备在确定出图像库中所有的相似图像后,可以将这些相似图像组成一个相似图像组进行存储。
需要说明的是,上述步骤202至205描述了一种利用效果图像匹配得到的相似图像组的以图搜图算法,在实际应用中,电子设备也可以采用其它以图搜图算法来得到与效果图像具有相似的结构但不具有滤镜效果的相似图像,本实施例对此不作限定。
由于利用效果图像匹配得到的相似图像组中的相似图像与效果图像具有相似的结构,因此可以计算相似图像组变换到该效果图像的映射关系,并将该映射关系作为图像滤镜来对预处理图像进行处理,从而使得该预处理图像在被处理后具有该效果图像的滤镜效果。请参见下述步骤206至209。
在步骤206中,计算相似图像组中所有相似图像的所有像素点的颜色均值和颜色方差,将计算得到的颜色均值确定为第一颜色均值,将计算得到的颜色方差确定为第一颜色方差。
电子设备在得到相似图像组后,计算该相似图像组中所有相似图像的所有像素点的颜色均值以及颜色方差,并将计算得到的颜色均值确定为第一颜色均值,将计算得到的颜色方差确定为第一颜色方差。
在步骤207中,计算效果图像的所有像素点的颜色均值和颜色方差,将计算得到的颜色均值确定为第二颜色均值,将计算得到的颜色方差确定为第二颜色方差。
在步骤208中,根据第一颜色均值、第一颜色方差、第二颜色均值和第二颜色方差生成映射关系。
电子设备在计算得到第一颜色均值、第一颜色方差、第二颜色均值和第二颜色方差后,可以根据这些值生成相似图像组变换到效果图像的映射关系,并将该映射关系作为图像滤镜。
这里的映射关系为
Figure PCTCN2015093400-appb-000001
mG为第一颜色均值,vG为第一颜色方差,mA为第二颜色均值,vA为第二颜色方差,(l,a,b)为一个像素点变换前的像素值,(L,A,B)为该像素点变化后的像素值。
需要说明的是,这里的像素点的像素值是用颜色空间来表示的。
在步骤209中,将待处理图像的各个像素点的像素值按照映射关系进行变换,得到经过图像滤镜处理后的图像。
电子设备在得到相似图像组变换到效果图像的映射关系后,也即电子设备在生成图像滤镜后,可以将待处理图像的各个像素点的像素值按照该映射关系进行变换,进而得到经过该图像滤镜处理后的图像。此时,电子设备得到的图像为具有效果图像的滤镜效果的图像。
需要说明的是,上述步骤206至208描述了一种计算相似图像组变换到效果图像的映射关系的颜色迁移算法,在实际应用中,电子设备也可以采用其它颜色迁移算法来得到相似图像组变换到效果图像的映射关系,本实施例对此不作限定。
综上所述,本公开实施例中提供的图像滤镜生成方法,通过获取与效果图像具有相似结构的相似图像组,计算该相似图像组变换到效果图像的映射关系,将该映射关系作为图像滤镜;解决了由于用户的专业性较低,导致由用户调节参数获得的自定义滤镜无法使得处理后的图像达到用户想要的效果的问题;达到了提高自定义生成的图像滤镜的准确性的效果。
另外,本公开实施例中提供的图像滤镜生成方法,通过将待处理图像的各个像素点的像素值按照映射关系进行变换,得到经过图像滤镜处理后的图像;由于待处理图像被处理后能够达到用户选定的效果图像的滤镜效果,因此解决了由用户调节参数获得的自定义滤镜无法使得处理后的图像达到用户想要的效果的问题;达到了提高自定义生成的图像滤镜的使用效果的效果。
需要说明的是,图像滤镜的构造通常需要颜色变换、对比度调节、渐晕等基础方法,上述实施例中主要描述了颜色变换方法。在实际应用中,可以将上述实施例中的步骤206至208描述的颜色迁移算法替换为其他的基础算法,如对比度变换算法等,以实现不同的滤镜效果。
下述为本公开装置实施例,可以用于执行本公开方法实施例。对于本公开装置实施例中未披露的细节,请参照本公开方法实施例。
图3是根据一示例性实施例示出的一种图像滤镜生成装置的框图,如图3所示,该图像滤镜生成装置应用于电子设备中,该电子设备可以是智能手机、平板电脑、智能电视、电子书阅读器、多媒体播放器、膝上型便携计算机和台式计算机等等。该图像滤镜生成装置可以包括但不限于:第一获取模块301、第二获取模块302和计算模块303。
该第一获取模块301,被配置为获取选定的效果图像。
该第二获取模块302,被配置为利用效果图像获取相似图像组,该相似图像组包括至少一张与该效果图像具有相似结构但不具有滤镜效果的相似图像。
该计算模块303,被配置为计算第二获取模块302获取的相似图像组变换到第一获取模块301获取的效果图像的映射关系,将该映射关系作为图像滤镜。
综上所述,本公开实施例中提供的图像滤镜生成装置,通过获取与效果图像具有相似结构的相似图像组,计算该相似图像组变换到效果图像的映射关系,将该映射关系作为图像滤镜;解决了由于用户的专业性较低,导致由用户调节参数获得的自定义滤镜无法使得处理后的图像达到用户想要的效果的问题;达到了提高自定义生成的图像滤镜的准确性的效果。
图4是根据另一示例性实施例示出的一种图像滤镜生成装置的框图,如图4所示,该图像滤镜生成装置应用于电子设备中,该电子设备可以是智能手机、平板电脑、智能电视、电子书阅读器、多媒体播放器、膝上型便携计算机和台式计算机等等。该图像滤镜生成装置可以包括但不限于:第一获取模块401、第二获取模块402和计算模块403。
该第一获取模块401,被配置为获取选定的效果图像。
该第二获取模块402,被配置为利用效果图像获取相似图像组,该相似图像组包括至少一张与该效果图像具有相似结构但不具有滤镜效果的相似图像。
该计算模块403,被配置为计算第二获取模块402获取的相似图像组变换到第一获取模块401获取的效果图像的映射关系,将该映射关系作为图像滤镜。
在一种可能的实施例中,该第二获取模块402可以包括:第一计算子模块402a、获取子模块402b、确定子模块402c和组成子模块402d。
该第一计算子模块402a,被配置为计算效果图像的第一特征向量。
该获取子模块402b,被配置为获取图像库中每张样本图像的第二特征向量,该样本图像为不具有滤镜效果的图像。
该确定子模块402c,被配置为将第一计算子模块402a计算得到的第一特征向量与获取子模块402b获取的各个第二特征向量进行比较,从样本图像中确定出至少一张相似图像。
该组成子模块402d,被配置为将确定子模块402c确定的至少一张相似图像组成相似图像组。
在一种可能的实施例中,该计算模块403可以包括:第二计算子模块403a、第三计算子模块403b和生成子模块403c。
该第二计算子模块403a,被配置为计算相似图像组中所有相似图像的所有像素点的颜色均值和颜色方差,将计算得到的颜色均值确定为第一颜色均值,将计算得到的颜色方差确定为第一颜色方差。
该第三计算子模块403b,被配置为计算效果图像的所有像素点的颜色均值和颜色方差,将计算得到的颜色均值确定为第二颜色均值,将计算得到的颜色方差确定为第二颜色方差。
该生成子模块403c,被配置为根据第一颜色均值、第一颜色方差、第二颜色均值和第二颜色方差生成映射关系。
这里的映射关系为
Figure PCTCN2015093400-appb-000002
mG为第一颜色均值,vG为第一颜色方差,mA为第二颜色均值,vA为第二颜色方差,(l,a,b)为一个像素点变换前的像素值,(L,A,B)为该像素点变化后的像素值。
在一种可能的实施例中,该图像滤镜生成装置还可以包括:变换模块404。
该变换模块404,被配置为将待处理图像的各个像素点的像素值按照映射关系进行变换,得到经过图像滤镜处理后的图像。
综上所述,本公开实施例中提供的图像滤镜生成装置,通过获取与效果图像具有相似结构的相似图像组,计算该相似图像组变换到效果图像的映射关系,将该映射关系作为图像滤 镜;解决了由于用户的专业性较低,导致由用户调节参数获得的自定义滤镜无法使得处理后的图像达到用户想要的效果的问题;达到了提高自定义生成的图像滤镜的准确性的效果。
另外,本公开实施例中提供的图像滤镜生成装置,通过将待处理图像的各个像素点的像素值按照映射关系进行变换,得到经过图像滤镜处理后的图像;由于待处理图像被处理后能够达到用户选定的效果图像的滤镜效果,因此解决了由用户调节参数获得的自定义滤镜无法使得处理后的图像达到用户想要的效果的问题;达到了提高自定义生成的图像滤镜的使用效果的效果。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
本公开一示例性实施例提供了一种图像滤镜生成装置,能够实现本公开提供的图像滤镜生成方法,该图像滤镜生成装置包括:处理器、用于存储处理器可执行指令的存储器;
其中,处理器被配置为:
获取选定的效果图像;
利用效果图像获取相似图像组,该相似图像组包括至少一张与该效果图像具有相似结构但不具有滤镜效果的相似图像;
计算相似图像组变换到效果图像的映射关系,将该映射关系作为图像滤镜。
图5是根据一示例性实施例示出的一种用于生成图像滤镜的装置的框图。例如,装置500可以被提供为一电子设备,比如可以为移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,个人数字助理等。
参照图5,装置500可以包括以下一个或多个组件:处理组件502,存储器504,电源组件506,多媒体组件508,音频组件510,输入/输出(I/O)接口512,传感器组件514,以及通信组件516。
处理组件502通常控制装置500的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件502可以包括一个或多个处理器518来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件502可以包括一个或多个模块,便于处理组件502和其他组件之间的交互。例如,处理组件502可以包括多媒体模块,以方便多媒体组件508和处理组件502之间的交互。
存储器504被配置为存储各种类型的数据以支持在装置500的操作。这些数据的示例包括用于在装置500上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器504可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件506为装置500的各种组件提供电力。电源组件506可以包括电源管理系统,一个或多个电源,及其他与为装置500生成、管理和分配电力相关联的组件。
多媒体组件508包括在装置500和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件508包括一个前置摄像头和/或后置摄像头。当装置500处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件510被配置为输出和/或输入音频信号。例如,音频组件510包括一个麦克风(MIC),当装置500处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器504或经由通信组件516发送。在一些实施例中,音频组件510还包括一个扬声器,用于输出音频信号。
I/O接口512为处理组件502和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件514包括一个或多个传感器,用于为装置500提供各个方面的状态评估。例如,传感器组件514可以检测到装置500的打开/关闭状态,组件的相对定位,例如组件为装置500的显示器和小键盘,传感器组件514还可以检测装置500或装置500一个组件的位置改变,用户与装置500接触的存在或不存在,装置500方位或加速/减速和装置500的温度变化。传感器组件514可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件514还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件514还可以包括加速度传感器,陀螺仪 传感器,磁传感器,压力传感器或温度传感器。
通信组件516被配置为便于装置500和其他设备之间有线或无线方式的通信。装置500可以接入基于通信标准的无线网络,如Wi-Fi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件516经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,通信组件516还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,装置500可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述图像滤镜生成方法。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器504,上述指令可由装置500的处理器518执行以完成上述图像滤镜生成方法。例如,非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。

Claims (9)

  1. 一种图像滤镜生成方法,其特征在于,所述方法包括:
    获取选定的效果图像;
    利用所述效果图像获取相似图像组,所述相似图像组包括至少一张与所述效果图像具有相似结构但不具有滤镜效果的相似图像;
    计算所述相似图像组变换到所述效果图像的映射关系,将所述映射关系作为图像滤镜。
  2. 根据权利要求1所述的方法,其特征在于,所述利用所述效果图像获取相似图像组,包括:
    计算所述效果图像的第一特征向量;
    获取图像库中每张样本图像的第二特征向量,所述样本图像为不具有滤镜效果的图像;
    将所述第一特征向量与各个所述第二特征向量进行比较,从所述样本图像中确定出至少一张所述相似图像;
    将确定的至少一张所述相似图像组成所述相似图像组。
  3. 根据权利要求1所述的方法,其特征在于,所述计算所述相似图像组变换到所述效果图像的映射关系,包括:
    计算所述相似图像组中所有相似图像的所有像素点的颜色均值和颜色方差,将计算得到的所述颜色均值确定为第一颜色均值,将计算得到的所述颜色方差确定为第一颜色方差;
    计算所述效果图像的所有像素点的颜色均值和颜色方差,将计算得到的所述颜色均值确定为第二颜色均值,将计算得到的所述颜色方差确定为第二颜色方差;
    根据所述第一颜色均值、所述第一颜色方差、所述第二颜色均值和所述第二颜色方差生成所述映射关系;
    其中,所述映射关系为
    Figure PCTCN2015093400-appb-100001
    mG为所述第一颜色均值,vG为所述第一颜色方差,mA为所述第二颜色均值,vA为所述第二颜色方差,(l,a,b)为一个像素点变换前的像素值,(L,A,B)为所述像素点变化后的像素值。
  4. 根据权利要求1至3中任一所述的方法,其特征在于,所述方法还包括:
    将待处理图像的各个像素点的像素值按照所述映射关系进行变换,得到经过所述图像滤镜处理后的图像。
  5. 一种图像滤镜生成装置,其特征在于,所述装置包括:
    第一获取模块,被配置为获取选定的效果图像;
    第二获取模块,被配置为利用所述效果图像获取相似图像组,所述相似图像组包括至少一张与所述效果图像具有相似结构但不具有滤镜效果的相似图像;
    计算模块,被配置为计算所述第二获取模块获取的所述相似图像组变换到所述第一获取模块获取的所述效果图像的映射关系,将所述映射关系作为图像滤镜。
  6. 根据权利要求5所述的装置,其特征在于,所述第二获取模块,包括:
    第一计算子模块,被配置为计算所述效果图像的第一特征向量;
    获取子模块,被配置为获取图像库中每张样本图像的第二特征向量,所述样本图像为不具有滤镜效果的图像;
    确定子模块,被配置为将所述第一计算子模块计算得到的所述第一特征向量与所述获取子模块获取的各个所述第二特征向量进行比较,从所述样本图像中确定出至少一张所述相似图像;
    组成子模块,被配置为将所述确定子模块确定的至少一张所述相似图像组成所述相似图像组。
  7. 根据权利要求5所述的装置,其特征在于,所述计算模块,包括:
    第二计算子模块,被配置为计算所述相似图像组中所有相似图像的所有像素点的颜色均值和颜色方差,将计算得到的所述颜色均值确定为第一颜色均值,将计算得到的所述颜色方差确定为第一颜色方差;
    第三计算子模块,被配置为计算所述效果图像的所有像素点的颜色均值和颜色方差,将计算得到的所述颜色均值确定为第二颜色均值,将计算得到的所述颜色方差确定为第二颜色方差;
    生成子模块,被配置为根据所述第一颜色均值、所述第一颜色方差、所述第二颜色均值和所述第二颜色方差生成所述映射关系;
    其中,所述映射关系为
    Figure PCTCN2015093400-appb-100002
    mG为所述第一颜色均值,vG为所述第一颜色方差,mA为所述第二颜色均值,vA为所述第二颜色方差,(l,a,b)为一个像素点变换前的像素值,(L,A,B)为所述像素点变化后的像素值。
  8. 根据权利要求5至7中任一所述的装置,其特征在于,所述装置还包括:
    变换模块,被配置为将待处理图像的各个像素点的像素值按照所述映射关系进行变换,得到经过所述图像滤镜处理后的图像。
  9. 一种图像滤镜生成装置,其特征在于,所述装置包括:
    处理器;
    用于存储所述处理器可执行指令的存储器;
    其中,所述处理器被配置为:
    获取选定的效果图像;
    利用所述效果图像获取相似图像组,所述相似图像组包括至少一张与所述效果图像具有相似结构但不具有滤镜效果的相似图像;
    计算所述相似图像组变换到所述效果图像的映射关系,将所述映射关系作为图像滤镜。
PCT/CN2015/093400 2015-02-11 2015-10-30 图像滤镜生成方法及装置 Ceased WO2016127671A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2016526183A JP6335289B2 (ja) 2015-02-11 2015-10-30 画像フィルタを生成する方法及び装置
MX2016000844A MX356153B (es) 2015-02-11 2015-10-30 Método y aparato para generar un filtro de imagen.
KR1020167000127A KR101727169B1 (ko) 2015-02-11 2015-10-30 이미지 필터를 생성하기 위한 방법 및 장치
RU2016107731A RU2628494C1 (ru) 2015-02-11 2015-10-30 Способ и устройство для генерирования фильтра изображения

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510072609.4A CN104700353B (zh) 2015-02-11 2015-02-11 图像滤镜生成方法及装置
CN201510072609.4 2015-02-11

Publications (1)

Publication Number Publication Date
WO2016127671A1 true WO2016127671A1 (zh) 2016-08-18

Family

ID=53347442

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/093400 Ceased WO2016127671A1 (zh) 2015-02-11 2015-10-30 图像滤镜生成方法及装置

Country Status (8)

Country Link
US (1) US9959484B2 (zh)
EP (1) EP3057304B1 (zh)
JP (1) JP6335289B2 (zh)
KR (1) KR101727169B1 (zh)
CN (1) CN104700353B (zh)
MX (1) MX356153B (zh)
RU (1) RU2628494C1 (zh)
WO (1) WO2016127671A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018036960A (ja) * 2016-09-01 2018-03-08 株式会社リコー 画像類似度算出装置、画像処理装置、画像処理方法、及び記録媒体

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104700353B (zh) 2015-02-11 2017-12-05 小米科技有限责任公司 图像滤镜生成方法及装置
CN104992416B (zh) * 2015-06-30 2018-04-27 小米科技有限责任公司 图像增强方法和装置、智能设备
CN106791756A (zh) * 2017-01-17 2017-05-31 维沃移动通信有限公司 一种多媒体数据处理方法及移动终端
US11074250B2 (en) * 2017-06-27 2021-07-27 OWOX Limted Technologies for implementing ontological models for natural language queries
US10425593B2 (en) 2017-10-19 2019-09-24 Paypal, Inc. Digital image filtering and post-capture processing using user specific data
KR102495008B1 (ko) * 2018-05-11 2023-02-06 삼성전자주식회사 영상 편집 지원 방법 및 이를 지원하는 전자 장치
CN109961102B (zh) * 2019-03-30 2021-06-22 北京市商汤科技开发有限公司 图像处理方法、装置、电子设备及存储介质
WO2020235862A1 (en) 2019-05-17 2020-11-26 Samsung Electronics Co., Ltd. Image manipulation
KR102706932B1 (ko) * 2020-02-10 2024-09-13 삼성전자주식회사 이미지의 생성 방법 및 그 전자 장치
CN113256504A (zh) 2020-02-11 2021-08-13 北京三星通信技术研究有限公司 图像处理的方法和电子设备
CN113947532B (zh) * 2020-07-16 2025-06-10 腾讯科技(深圳)有限公司 滤镜效果校验方法、系统、装置和存储介质
CN114416240A (zh) * 2021-12-29 2022-04-29 中国电信股份有限公司 滤镜界面的生成方法、装置、电子设备以及存储介质
CN114596372B (zh) * 2022-05-07 2022-07-29 武汉天际航信息科技股份有限公司 一种影像颜色迁移方法、影像一致性改善方法和装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102360506A (zh) * 2011-09-30 2012-02-22 北京航空航天大学 一种基于局部线性保持的场景颜色风格一致化处理方法
CN103870828A (zh) * 2012-12-17 2014-06-18 富泰华工业(深圳)有限公司 图像相似度判断系统及方法
US20140176732A1 (en) * 2012-12-21 2014-06-26 Google Inc. Recommending transformations for photography
CN104700353A (zh) * 2015-02-11 2015-06-10 小米科技有限责任公司 图像滤镜生成方法及装置

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1225547A3 (en) * 2001-01-10 2003-11-19 Monolith Co., Ltd. Image-effect method and image interpolation method
US7493614B2 (en) * 2003-03-31 2009-02-17 Microsoft Corporation System architecture and related methods for dynamically adding software components to extend functionality of system processes
US8320641B2 (en) * 2004-10-28 2012-11-27 DigitalOptics Corporation Europe Limited Method and apparatus for red-eye detection using preview or other reference images
US7136536B2 (en) * 2004-12-22 2006-11-14 Telefonaktiebolaget L M Ericsson (Publ) Adaptive filter
KR101160365B1 (ko) * 2006-04-28 2012-06-26 삼성전자주식회사 이동 통신 단말기에서 나만의 이미지를 생성하는 방법
DE602007010514D1 (de) * 2006-12-18 2010-12-23 Koninkl Philips Electronics Nv Bildkomprimierung und dekomprimierung
US8175382B2 (en) * 2007-05-10 2012-05-08 Microsoft Corporation Learning image enhancement
JP5493456B2 (ja) * 2009-05-01 2014-05-14 ソニー株式会社 画像処理装置、画像処理方法、プログラム
US8520956B2 (en) 2009-06-09 2013-08-27 Colorado State University Research Foundation Optimized correlation filters for signal processing
US8913827B1 (en) * 2010-05-10 2014-12-16 Google Inc. Image color correction with machine learning
US20120033888A1 (en) * 2010-08-09 2012-02-09 Tetsuya Takamori Image processing system, image processing method, and computer readable medium
CN102625043B (zh) * 2011-01-25 2014-12-10 佳能株式会社 图像处理设备、成像设备和图像处理方法
CN102651136B (zh) * 2011-02-28 2014-11-26 国际商业机器公司 图像的颜色映射方法及装置
CN102521807B (zh) * 2011-12-02 2013-09-25 中国科学院自动化研究所 利用颜色空间分布对颜色进行传递的方法
US9191635B2 (en) 2012-03-19 2015-11-17 Semiconductor Components Industries, Llc Imaging systems with clear filter pixels
JP2014067129A (ja) * 2012-09-25 2014-04-17 Kddi Corp スケール毎の特徴量と色分布との関係を考慮した色変換処理プログラム、装置及び方法
JP2015011585A (ja) * 2013-06-28 2015-01-19 株式会社リコー 画像処理装置、画像形成装置、画像形成システム、画像処理方法およびプログラム
GB2516110B (en) 2013-07-12 2020-01-08 Barco Nv Guided image filtering for image content
US9508130B2 (en) * 2014-10-17 2016-11-29 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and storage medium for performing image restoration

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102360506A (zh) * 2011-09-30 2012-02-22 北京航空航天大学 一种基于局部线性保持的场景颜色风格一致化处理方法
CN103870828A (zh) * 2012-12-17 2014-06-18 富泰华工业(深圳)有限公司 图像相似度判断系统及方法
US20140176732A1 (en) * 2012-12-21 2014-06-26 Google Inc. Recommending transformations for photography
CN104700353A (zh) * 2015-02-11 2015-06-10 小米科技有限责任公司 图像滤镜生成方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018036960A (ja) * 2016-09-01 2018-03-08 株式会社リコー 画像類似度算出装置、画像処理装置、画像処理方法、及び記録媒体

Also Published As

Publication number Publication date
CN104700353B (zh) 2017-12-05
JP2017513075A (ja) 2017-05-25
KR20160108827A (ko) 2016-09-20
US9959484B2 (en) 2018-05-01
EP3057304A1 (en) 2016-08-17
RU2628494C1 (ru) 2017-08-17
CN104700353A (zh) 2015-06-10
KR101727169B1 (ko) 2017-04-14
JP6335289B2 (ja) 2018-05-30
MX2016000844A (es) 2016-10-13
US20160232426A1 (en) 2016-08-11
EP3057304B1 (en) 2019-04-03
MX356153B (es) 2018-05-16

Similar Documents

Publication Publication Date Title
WO2016127671A1 (zh) 图像滤镜生成方法及装置
JP6134446B2 (ja) 画像分割方法、画像分割装置、画像分割デバイス、プログラム及び記録媒体
CN108289169A (zh) 拍摄方法、装置、电子设备及存储介质
WO2016011747A1 (zh) 肤色调整方法和装置
WO2017031901A1 (zh) 人脸识别方法、装置及终端
WO2016090829A1 (zh) 图像拍摄方法及装置
WO2017016146A1 (zh) 图像显示方法及装置
WO2017084182A1 (zh) 图片处理方法及装置
CN107992848B (zh) 获取深度图像的方法、装置及计算机可读存储介质
WO2017092289A1 (zh) 图像处理方法及装置
WO2017088266A1 (zh) 图片处理方法及装置
CN105631803B (zh) 滤镜处理的方法和装置
CN107944367B (zh) 人脸关键点检测方法及装置
CN110910304B (zh) 图像处理方法、装置、电子设备及介质
CN108462833B (zh) 拍摄方法、装置及计算机可读存储介质
CN106534951B (zh) 视频分割方法和装置
WO2016192325A1 (zh) 视频文件的标识处理方法及装置
CN106327473A (zh) 前景图像的获取方法及装置
CN107426489A (zh) 拍摄图像时的处理方法、装置及终端
WO2018098860A1 (zh) 照片合成方法及装置
CN107729880A (zh) 人脸检测方法及装置
CN107341509A (zh) 卷积神经网络的训练方法及装置
CN109034150B (zh) 图像处理方法及装置
CN111586296A (zh) 图像拍摄方法、图像拍摄装置及存储介质
WO2015196715A1 (zh) 图像重定位方法、装置及终端

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 20167000127

Country of ref document: KR

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: MX/A/2016/000844

Country of ref document: MX

ENP Entry into the national phase

Ref document number: 2016107731

Country of ref document: RU

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2016526183

Country of ref document: JP

Kind code of ref document: A

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112016003260

Country of ref document: BR

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

Ref document number: 15881820

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 112016003260

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20160216

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15881820

Country of ref document: EP

Kind code of ref document: A1