WO2022073516A1 - 生成图像的方法、装置、电子设备及介质 - Google Patents

生成图像的方法、装置、电子设备及介质 Download PDF

Info

Publication number
WO2022073516A1
WO2022073516A1 PCT/CN2021/122885 CN2021122885W WO2022073516A1 WO 2022073516 A1 WO2022073516 A1 WO 2022073516A1 CN 2021122885 W CN2021122885 W CN 2021122885W WO 2022073516 A1 WO2022073516 A1 WO 2022073516A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
modified
sample
sample image
database
Prior art date
Application number
PCT/CN2021/122885
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 WO2022073516A1 publication Critical patent/WO2022073516A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
    • G06T7/337Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods involving reference images or patches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/5838Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Definitions

  • the present application relates to technologies for processing images, in particular to a method, apparatus, electronic device and medium for generating images.
  • the inventor realizes that, for different shooting scenes and different shooting objects, using the same tone mapping curve to tone-map the captured images will lead to a problem of mismatched image retouching, thereby affecting the user experience.
  • the embodiments of the present application provide a method, an apparatus, an electronic device, and a medium for generating an image, and the embodiments of the present application are used to solve the problem of mismatching image modification in the related art.
  • a method for generating an image comprising: acquiring an image to be modified generated by a target user, the image to be modified includes at least one object to be modified; based on the object to be modified , determine a sample image whose similarity with the image to be modified exceeds a first preset threshold from a preset sample image database; determine the tone parameter of the sample image, and adjust the tone parameter of the image to be modified to Same as the hue parameter of the sample image.
  • an apparatus for generating an image comprising: an acquisition module configured to acquire an image to be modified generated by a target user, the image to be modified includes at least one object to be modified; determining a module configured to determine, from a preset sample image database, a sample image whose similarity with the image to be modified exceeds a first preset threshold based on the object to be modified; an adjustment module configured to determine the sample image The tone parameter of the image is adjusted to be the same as the tone parameter of the sample image.
  • an electronic device including: a memory for storing executable instructions; and a display for displaying with the memory to execute the executable instructions to realize the above-mentioned generated image
  • the method for generating an image includes: acquiring an image to be modified generated by a target user, and the image to be modified includes at least one object to be modified; The similarity of the image to be modified exceeds a first preset threshold; the color tone parameter of the sample image is determined, and the color tone parameter of the image to be modified is adjusted to be the same as the color tone parameter of the sample image.
  • a computer-readable storage medium for storing computer-readable instructions, and when the instructions are executed, the above-mentioned method for generating an image is executed, and the method for generating an image includes: Acquire an image to be modified generated by the target user, the image to be modified includes at least one object to be modified; based on the object to be modified, it is determined from a preset sample image database that the similarity with the image to be modified exceeds the first A sample image with a preset threshold; determining the tone parameter of the sample image, and adjusting the tone parameter of the image to be modified to be the same as the tone parameter of the sample image.
  • the image captured by the user this time can be identified first, the most similar sample image can be found from the sample image database, and the color bar of the image captured this time can be adjusted to be the same as the sample image. Therefore, in the prior art, for different shooting scenes and different shooting objects, the same tone mapping curve is used to perform tone mapping on the captured images, which will lead to the problem of image modification mismatch.
  • FIG. 1 is a schematic diagram of a system architecture for generating an image proposed by the present application.
  • FIG. 2 is a schematic diagram of a method for generating an image proposed by this application.
  • FIG. 3 is a schematic structural diagram of an apparatus for generating an image in the present application.
  • FIG. 4 is a schematic diagram showing the structure of an electronic device according to the present application.
  • the present application may relate to the field of artificial intelligence technology, such as image processing technology.
  • relevant data can be acquired and processed based on artificial intelligence technology, such as using image detection models to identify the characteristic parameters of objects to be modified in images, etc., so as to promote the construction of smart cities.
  • the technical solutions of the present application can be applied to various image processing scenarios, such as image processing scenarios for medical images in digital medicine, and image processing scenarios for landscape images, and so on.
  • image processing scenarios for medical images in digital medicine and image processing scenarios for landscape images, and so on.
  • data involved in this application such as images to be modified, sample images, etc., can be stored in the blockchain.
  • FIG. 1 shows a schematic diagram of an exemplary system architecture 100 to which the method for generating an image or the apparatus for generating an image according to an embodiment of the present application may be applied.
  • the system architecture 100 may include one or more of terminal devices 101 , 102 , and 103 , a network 104 and a server 105 .
  • the network 104 is a medium used to provide a communication link between the terminal devices 101 , 102 , 103 and the server 105 .
  • the network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
  • the numbers of terminal devices, networks and servers in FIG. 1 are merely illustrative. There can be any number of terminal devices, networks and servers according to implementation needs.
  • the server 105 may be a server cluster composed of multiple servers, or the like.
  • the user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages and the like.
  • the terminal devices 101, 102, 103 may be various electronic devices with display screens, including but not limited to smart phones, tablet computers, portable computers, desktop computers, and the like.
  • the terminal devices 101, 102, and 103 in this application may be terminal devices that provide various services.
  • the user obtains the image to be modified generated by the target user through the terminal device 103 (it may also be the terminal device 101 or 102 ), and the image to be modified includes at least one object to be modified; based on the object to be modified, from the preset sample A sample image whose similarity with the image to be modified exceeds a first preset threshold is determined in the image database; the tone parameter of the sample image is determined, and the tone parameter of the image to be modified is adjusted to match the sample image.
  • the hue parameters are the same.
  • the methods for generating images may be executed by one or more of the terminal devices 101, 102, and 103, and/or the server 105.
  • the methods of the embodiments of the present application The provided apparatus for generating an image is generally set in the corresponding terminal device, and/or in the server 105, but the present application is not limited thereto.
  • the present application also provides a method, device, target terminal and medium for generating an image.
  • FIG. 2 schematically shows a flow chart of a method for generating an image according to an embodiment of the present application. As shown in Figure 2, the method includes the following steps.
  • S101 Acquire an image to be modified generated by a target user, where the image to be modified includes at least one object to be modified.
  • the device for obtaining the image to be modified is not specifically limited in this application, for example, it may be a smart device or a server.
  • the smart device may be a PC (Personal Computer), a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group AudioLayer III, a moving picture expert compression standard audio layer 3) player, MP4 (Moving Picture Experts Group Audio Layer IV, moving image expert compression standard audio layer 4) Players, portable computers and other portable terminal devices with display functions, etc.
  • this application does not specifically limit the modified objects, for example, it can be Bluetooth, white clouds, streets, tables and chairs, buildings, characters and animals, and so on.
  • the number of objects to be modified may be one or more.
  • the to-be-modified image may be an image captured by a user using a mobile terminal carrying a camera capture device.
  • S102 based on the object to be modified, determine a sample image whose similarity with the image to be modified exceeds a first preset threshold from a preset sample image database.
  • the present application can use the object to be modified to search for other sample images with a certain degree of similarity from the sample image database. It can be understood that the sample image should also contain the same or similar objects as the corresponding object to be modified.
  • sample images of various objects to be modified that have been photographed and have been color modified are stored.
  • the present application can use the plurality of sample images that have undergone color modification to specifically select a sample image that is similar to the image to be modified this time as a color adjustment template, which can improve the modification level of the image to be shot. Improve user viewing experience.
  • the present application does not specifically limit the manner of how to determine the sample image whose similarity with the image to be modified exceeds the first preset threshold.
  • a preset neural network image detection model can be used to identify the characteristic parameters of the object to be modified, so as to match the characteristic parameters with the characteristic parameters corresponding to each sample image in the sample image database, so as to confirm the difference between the two. similarity.
  • the present application does not specifically limit the preset neural network image detection model.
  • it can be a convolutional neural network (Convolutional Neural Networks, CNN).
  • Convolutional neural network is a kind of feedforward neural network which contains convolutional computation and has deep structure.
  • Networks which is one of the representative algorithms of deep learning.
  • Convolutional Neural Networks with Representation Learning learning which can perform translation-invariant classification of input information according to its hierarchical structure. Thanks to the powerful feature representation ability of CNN (Convolutional Neural Network) for images, it has achieved remarkable results in image classification, object detection, semantic segmentation and other fields.
  • the present application can use the CNN neural network model to detect the characteristic parameters of the object to be modified in the image to be modified, and then perform feature recognition of the object to be modified.
  • the image to be modified needs to be input into the preset convolutional neural network model, and the output of the last fully connected layer (FC, fully connected layer) of the convolutional neural network model is used as the corresponding object to be modified.
  • FC fully connected layer
  • the present application does not specifically limit the first preset threshold, for example, it may be 70%, or 80%, and so on. Further, the present application does not specifically limit the number of sample images whose similarity with the image to be modified exceeds the first preset threshold, for example, it may be one or multiple.
  • S103 Determine the hue parameter of the sample image, and adjust the hue parameter of the image to be modified to be the same as the hue parameter of the sample image.
  • the present application can adjust the color bar corresponding to the image to be modified obtained this time to be the same as the sample image.
  • color modification for the image to be modified is realized.
  • the current smart camera can only optimize a set color tone when beautifying the photos taken by the user.
  • AI will automatically perform a post-processing according to the color tone of the street scene to obtain a preset street scene.
  • the user wants to take a photo with a blue-orange tone, but the camera takes a high-grade gray. adjusted photos. Therefore, for some users, when the photos they take have certain requirements, customized color tone processing cannot be achieved.
  • the present application can use the sample image database that stores images of various objects to be modified and has undergone color modification, to select sample images that are more similar to the image to be modified this time.
  • a color adjustment template So that the color parameters of the image to be modified obtained this time are adjusted to be the same as the sample image subsequently, the modification level of the image to be shot can be improved, and the viewing experience of the user can be improved.
  • the image to be modified when acquiring an image to be modified generated by a target user, includes at least one object to be modified; based on the object to be modified, it is determined from a preset sample image database that the similarity with the image to be modified exceeds the first preset A sample image with a threshold value; determine the tone parameter of the sample image, and adjust the tone parameter of the image to be modified to be the same as the tone parameter of the sample image.
  • the image captured by the user this time can be identified first, the most similar sample image can be found from the sample image database, and the color bar of the image captured this time can be adjusted to be the same as the sample image. Therefore, in the prior art, for different shooting scenes and different shooting objects, the same tone mapping curve is used to perform tone mapping on the captured images, which will lead to the problem of image modification mismatch.
  • a sample image whose similarity with the image to be modified exceeds a preset threshold is determined from a preset sample image database
  • an image detection model may be used to extract characteristic parameters of the object to be modified, and then feature identification of the object to be modified may be performed, so that a sample object whose similarity exceeds the second threshold is subsequently determined from the sample image database.
  • the present application also does not limit the second preset threshold, for example, it may be the same as the first preset threshold or may be different.
  • the embodiment of the present application may determine whether the sample image database contains a sample object whose similarity exceeds a threshold based on the color feature corresponding to the object to be modified. For example, when the object to be decorated is a wardrobe consisting of red, blue and yellow.
  • the color feature parameters corresponding to the wardrobe can be extracted, so that the sample image database can be subsequently searched for whether there is a sample image of the wardrobe that also includes the three color ranges. If found, the wardrobe in the sample image is determined as the sample object.
  • the embodiment of the present application may also determine whether the sample image database contains similar sample objects based on the contour features corresponding to the object to be modified. For example, when the object to be modified is a bicycle.
  • the contour feature parameters corresponding to the bicycle can be extracted, so that it can be subsequently searched from the sample image database whether there is a sample image of the bicycle that also includes the contour feature. If found, the bicycle in the sample image is determined as the sample object.
  • the embodiment of the present application may further determine whether the sample image database contains similar sample objects based on the quantitative features and contour features corresponding to the object to be modified. For example, when the objects to be modified are three human bodies.
  • the corresponding contour feature parameters of the three human bodies can be extracted respectively, and whether there is a sample image composed of a human body that also includes the three corresponding contour features can be searched from the sample image database. If found, the three human bodies in the sample image are determined as sample objects.
  • a set of hue circle columns is established, where the set of hue circle columns includes sets of a first number of different colors, wherein each color set is marked with a corresponding hue parameter range.
  • a set of hue circle columns for comparison with color standards may be established in advance.
  • the set may include a first number of sets of different colors. Further, the present application does not specifically limit the first number.
  • the set of hue circle columns may include all sets of colors.
  • the set is also marked with an RGB range corresponding to each color set.
  • RGB 222,131,111 to 214,119,79 between.
  • it can also be divided into several intervals for blue, such as 10 intervals, in which the range of R is (222-214) the range of G is (131-119)
  • the range of B is (111-79) color .
  • sample images contain at least one sample object; use a preset set of hue circle columns to label the sample objects in each sample image with corresponding hue parameters; the sample images marked with hue parameters will be included Store to the sample image database.
  • the present application can also obtain a plurality of sample images with different objects after establishing the set of hue circle columns, and after color-labeling the plurality of sample images, and then use the color-labeled samples. Images are stored into the sample image database. So that the to-be-modified image can be subsequently color-modified according to the sample image database.
  • the present application does not specifically limit the first quantity and the second quantity, for example, they may be the same or different.
  • the method further includes: acquiring the color tone parameter of the sample object in the sample image; adjusting the color tone parameter corresponding to the to-be-modified object in the to-be-modified image to the color tone of the sample image
  • the parameters are the same.
  • the following steps may be performed: acquiring the object type of the object to be modified; based on the object type of the object to be modified , determine a corresponding sample database; based on the object to be modified, determine a sample image whose similarity with the image to be modified exceeds a first preset threshold from the corresponding sample image database.
  • the present application may include multiple sample databases corresponding to different objects.
  • it may include a human body sample image database, a vehicle sample image database, a natural sample image database, a street sample image database, and the like. Therefore, in the process of determining a sample image whose similarity with the image to be modified exceeds the first preset threshold from a preset sample image database based on the object to be modified, it is possible to determine the object type of the object to be modified in a targeted manner.
  • Corresponding sample database may include a human body sample image database, a vehicle sample image database, a natural sample image database, a street sample image database, and the like. Therefore, in the process of determining a sample image whose similarity with the image to be modified exceeds the first preset threshold from a preset sample image database based on the object to be modified.
  • matching can be performed from a sample database including human body images.
  • matching can be performed from a sample database including street views.
  • the present application does not specifically limit the manner of how to determine whether there is a sample image whose similarity with the image to be modified exceeds the first preset threshold in the sample image database.
  • one or more of the color feature parameters, quantitative feature parameters, and contour feature parameters of the image to be modified can also be extracted according to a preset neural network model, so that the sample image database can be subsequently searched for whether There is a sample image that also includes the object composed of the corresponding color feature parameters, quantity feature parameters, and contour feature parameters. If found, use that image as a sample image.
  • the following steps may be performed:
  • the images to be retouched with the same tone parameters are stored in the sample database.
  • the tone parameter of the image to be modified after adjusting the tone parameter of the image to be modified to be the same as the tone parameter of the sample image, it can also be stored in the sample database, thereby increasing the number of samples in the database.
  • the present application further provides an apparatus for generating an image. It includes an acquisition module 301 , a determination module 302 , and an adjustment module 303 .
  • the acquiring module 301 is configured to acquire an image to be modified generated by a target user, where the image to be modified includes at least one object to be modified.
  • the determining module 302 is configured to determine, based on the object to be modified, a sample image whose similarity with the image to be modified exceeds a first preset threshold from a preset sample image database.
  • the adjustment module 303 is configured to determine the tone parameter of the sample image, and adjust the tone parameter of the image to be modified to be the same as the tone parameter of the sample image.
  • the image to be modified when acquiring an image to be modified generated by a target user, includes at least one object to be modified; based on the object to be modified, it is determined from a preset sample image database that the similarity with the image to be modified exceeds the first preset A sample image with a threshold value; determine the tone parameter of the sample image, and adjust the tone parameter of the image to be modified to be the same as the tone parameter of the sample image.
  • the image captured by the user this time can be identified first, the most similar sample image can be found from the sample image database, and the color bar of the image captured this time can be adjusted to be the same as the sample image. Therefore, in the prior art, for different shooting scenes and different shooting objects, the same tone mapping curve is used to perform tone mapping on the captured images, which will lead to the problem of image modification mismatch.
  • the acquisition module 301 further includes: an acquisition module 301, configured to use an image detection model to extract the characteristic parameters of the object to be modified; the acquisition module 301, configured to The characteristic parameters of the object to be modified are used to determine whether the sample image database contains a sample object whose similarity with the object to be modified exceeds a second preset threshold; the acquiring module 301 is configured to compare the object with the object to be modified.
  • the sample image where the sample object whose similarity degree of the modified object exceeds the second preset threshold is located is used as the sample image.
  • the obtaining module 301 further includes: the obtaining module 301 is configured to establish a hue circle column set, wherein the hue circle column set includes a first number of sets of different colors, wherein each Each color set is marked with the corresponding hue parameter range.
  • the acquisition module 301 further includes: an acquisition module 301, configured to acquire a second number of sample images, the sample images including at least one sample object; the acquisition module 301, configured to In order to use a preset set of hue circle columns, the corresponding hue parameters are marked on the sample objects in each of the sample images; the acquiring module 301 is configured to store the sample images containing the marked hue parameters in the sample image database. .
  • the determining module 302 further includes: a determining module 302 configured to acquire the hue parameters of the sample object in the sample image; the determining module 302 configured to convert the image to be modified The hue parameter corresponding to the object to be modified in is adjusted to be the same as the hue parameter of the sample image.
  • the determination module 302 further includes: a determination module 302 configured to acquire the object type of the object to be modified; the determination module 302 configured to be based on the object of the object to be modified type, and determine the corresponding sample database; the determination module 302 is configured to, based on the object to be modified, determine from the corresponding sample image database the similarity with the image to be modified that exceeds the first preset threshold Sample image.
  • the determination module 302 further includes: a determination module 302, configured to store the to-be-modified image adjusted to the same tone parameter as the sample image into the sample database .
  • a computer-readable storage medium is also provided, on which computer-readable instructions are stored, and when the instructions are executed, some or all of the steps of the methods in the foregoing embodiments are implemented, which will not be repeated here.
  • the storage medium involved in this application such as a computer-readable storage medium, may be non-volatile (non-transitory) or volatile (transitory).
  • an embodiment of the present application further provides a non-transitory computer-readable storage medium including instructions, such as a memory 402 including instructions, and the above-mentioned instructions can be executed by the processor 401 of the electronic device 400 to complete the above-mentioned method for generating an image.
  • the method includes: acquiring an image to be modified generated by a target user, the image to be modified includes at least one object to be modified; based on the object to be modified, determining from a preset sample image database that the similarity with the image to be modified exceeds a first predetermined level.
  • a sample image with a threshold value determine the tone parameter of the sample image, and adjust the tone parameter of the image to be modified to be the same as the tone parameter of the sample image.
  • the above-mentioned instructions may also be executed by the processor 401 of the electronic device 400 to complete other steps involved in the above-mentioned exemplary embodiments.
  • the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
  • an application program/computer program product including one or more instructions, which can be executed by the processor 401 of the electronic device 400 to complete the above-mentioned method of generating an image , the method includes: acquiring an image to be modified generated by a target user, the image to be modified includes at least one object to be modified; based on the object to be modified, determining from a preset sample image database that the similarity with the image to be modified exceeds a first preset A sample image with a threshold value; determine the tone parameter of the sample image, and adjust the tone parameter of the image to be modified to be the same as the tone parameter of the sample image.
  • the above instructions may also be executed by the processor 401 of the electronic device 400 to complete other steps involved in the above exemplary embodiments.
  • FIG. 4 is an example diagram of an electronic device 400 .
  • the schematic diagram 4 is only an example of the electronic device 400, and does not constitute a limitation on the electronic device 400. It may include more or less components than the one shown, or combine some components, or
  • the electronic device 400 may also include input and output devices, network access devices, buses, and the like.
  • the so-called processor 401 may be a central processing unit (Central Processing Unit, CPU), and may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor can be a microprocessor or the processor 401 can also be any conventional processor, etc.
  • the processor 401 is the control center of the electronic device 400, and uses various interfaces and lines to connect the entire electronic device 400. various parts.
  • the memory 402 can be used to store the computer-readable instructions, and the processor 401 implements the instructions by running or executing the computer-readable instructions or modules stored in the memory 402 and calling the data stored in the memory 402.
  • the memory 402 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may Data and the like created according to the use of the electronic device 400 are stored.
  • the memory 402 may include a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card (Flash Card), at least one disk storage device, a flash memory devices, Read-Only Memory (ROM), Random Access Memory (RAM), or other non-volatile/volatile storage devices.
  • SMC Smart Media Card
  • SD Secure Digital
  • Flash Card Flash Card
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • modules integrated in the electronic device 400 are implemented in the form of software functional modules and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium.
  • the computer-readable instructions when executed by the processor, can implement the steps of the above-mentioned method embodiments.

Abstract

本申请公开了一种生成图像的方法、装置、电子设备及介质。其中,本申请中,在获取目标用户生成的待修饰图像,并基于待修饰物体,从预设的样本图像数据库中确定与待修饰图像的相似度超过第一预设阈值的样本图像;确定样本图像的色调参数,并将待修饰图像的色调参数调整至与样本图像的色调参数相同。通过应用本申请的技术方案,可以首先识别用户本次拍摄的图像,并从样本图像数据库中找到与其最相似的样本图像,进而将本次拍摄的图像的色条调整至与样本图像相同。从而避免现有技术中,对于不同的拍摄场景以及不同的拍摄物体来说,利用相同的色调映射曲线对拍摄的图像进行色调映射,会导致存在出现图像修饰不匹配的问题。

Description

生成图像的方法、装置、电子设备及介质
本申请要求于2020年10月10日提交中国专利局、申请号为202011078062.6,发明名称为“生成图像的方法、装置、电子设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请中涉及处理图像的技术,尤其是一种生成图像的方法、装置、电子设备及介质。
背景技术
由于通信时代和社会的兴起,图像处理技术已经随着越来越多用户在浏览图像而不断发展。
进一步的,随着图像处理技术的快速发展,以及拍摄的图像数量越来越多,因此对拍摄的视频图像进行色调映射处理变得越来越必要。发明人发现,相关技术中,通常都是利用相同的色调映射曲线对拍摄的多张图像进行色调映射。
然而,发明人意识到,对于不同的拍摄场景以及不同的拍摄物体来说,利用相同的色调映射曲线对拍摄的图像进行色调映射,会导致存在出现图像修饰不匹配的问题,从而影响用户体验。
技术问题
本申请实施例提供一种生成图像的方法、装置、电子设备及介质,本申请实施例用于解决相关技术中存在的对图像修饰不匹配的问题。
技术解决方案
其中,根据本申请实施例的一个方面,提供的一种生成图像的方法,包括:获取目标用户生成的待修饰图像,所述待修饰图像中包含至少一个待修饰物体;基于所述待修饰物体,从预设的样本图像数据库中确定与所述待修饰图像的相似度超过第一预设阈值的样本图像;确定所述样本图像的色调参数,并将所述待修饰图像的色调参数调整至与所述样本图像的色调参数相同。
根据本申请实施例的另一个方面,提供的一种生成图像的装置,包括:获取模块,被设置为获取目标用户生成的待修饰图像,所述待修饰图像中包含至少一个待修饰物体;确定模块,被设置为基于所述待修饰物体,从预设的样本图像数据库中确定与所述待修饰图像的相似度超过第一预设阈值的样本图像;调整模块,被设置为确定所述样本图像的色调参数,并将所述待修饰图像的色调参数调整至与所述样本图像的色调参数相同。
根据本申请实施例的又一个方面,提供的一种电子设备,包括:存储器,用于存储可执行指令;以及显示器,用于与所述存储器显示以执行所述可执行指令以实现上述生成图像的方法,该生成图像的方法包括:获取目标用户生成的待修饰图像,所述待修饰图像中包含至少一个待修饰物体;基于所述待修饰物体,从预设的样本图像数据库中确定与所述待修饰图像的相似度超过第一预设阈值的样本图像;确定所述样本图像的色调参数,并将所述待修饰图像的色调参数调整至与所述样本图像的色调参数相同。
根据本申请实施例的还一个方面,提供的一种计算机可读存储介质,用于存储计算机可读取的指令,所述指令被执行时执行上述生成图像的方法,该生成图像的方法包括:获取目标用户生成的待修饰图像,所述待修饰图像中包含至少一个待修饰物体;基于所述待修饰物体,从预设的样本图像数据库中确定与所述待修饰图像的相似度超过第一预设阈值的样本图像;确定所述样本图像的色调参数,并将所述待修饰图像的色调参数调整至与所述样本图像的色调参数相同。
有益效果
通过应用本申请的技术方案,可以首先识别用户本次拍摄的图像,并从样本图像数据库中找到与其最相似的样本图像,进而将本次拍摄的图像的色条调整至与样本图像相同。从而避免现有技术中,对于不同的拍摄场景以及不同的拍摄物体来说,利用相同的色调映射曲线对拍摄的图像进行色调映射,会导致存在出现图像修饰不匹配的问题。
下面通过附图和实施例,对本申请的技术方案做进一步的详细描述。
附图说明
构成说明书的一部分的附图描述了本申请的实施例,并且连同描述一起用于解释本申请的原理。
参照附图,根据下面的详细描述,可以更加清楚地理解本申请。
图1为本申请提出的生成图像的系统架构示意图。
图2为本申请提出的一种生成图像的方法的示意图。
图3为本申请生成图像的装置的结构示意图。
图4为本申请显示电子设备结构示意图。
本发明的实施方式
现在将参照附图来详细描述本申请的各种示例性实施例。应注意到:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本申请的范围。
同时,应当明白,为了便于描述,附图中所示出的各个部分的尺寸并不是按照实际的比例关系绘制的。
以下对至少一个示例性实施例的描述实际上仅仅是说明性的,不作为对本申请及其应用或使用的任何限制。
对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为说明书的一部分。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。
另外,本申请各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。
需要说明的是,本申请实施例中所有方向性指示(诸如上、下、左、右、前、后……)仅用于解释在某一特定姿态(如附图所示)下各部件之间的相对位置关系、运动情况等,如果该特定姿态发生改变时,则该方向性指示也相应地随之改变。
本申请可涉及人工智能技术领域,如可具体涉及图像处理技术。例如,可以基于人工智能技术对相关的数据进行获取和处理,如利用图像检测模型来识别图像中待修饰物体的特征参数等等,从而推动智慧城市的建设。
可选的,本申请的技术方案可应用于各种图像处理场景,如针对数字医疗中的医疗图像的图像处理场景,又如针对风景图像的图像处理场景等等。进一步可选的,本申请涉及的数据如待修饰图像、样本图像等可存储于区块链中。
下面结合图1-图2来描述根据本申请示例性实施方式的用于进行生成图像的方法。需要注意的是,下述应用场景仅是为了便于理解本申请的精神和原理而示出,本申请的实施方式在此方面不受任何限制。相反,本申请的实施方式可以应用于适用的任何场景。
图1示出了可以应用本申请实施例的生成图像的方法或生成图像的装置的示例性系统架构100的示意图。
如图1所示,系统架构100可以包括终端设备101、102、103中的一种或多种,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。比如服务器105可以是多个服务器组成的服务器集群等。
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103可以是具有显示屏的各种电子设备,包括但不限于智能手机、平板电脑、便携式计算机和台式计算机等等。
本申请中的终端设备101、102、103可以为提供各种服务的终端设备。例如用户通过终端设备103(也可以是终端设备101或102)获取目标用户生成的待修饰图像,所述待修饰图像中包含至少一个待修饰物体;基于所述待修饰物体,从预设的样本图像数据库中确定与所述待修饰图像的相似度超过第一预设阈值的样本图像;确定所述样本图像的色调参数,并将所述待修饰图像的色调参数调整至与所述样本图像的色调参数相同。
在此需要说明的是,本申请实施例所提供的生成图像的方法可以由终端设备101、102、103中的一个或多个,和/或,服务器105执行,相应地,本申请实施例所提供的生成图像的装置一般设置于对应终端设备中,和/或,服务器105中,但本申请不限于此。
本申请还提出一种生成图像的方法、装置、目标终端及介质。
图2示意性地示出了根据本申请实施方式的一种生成图像的方法的流程示意图。如图2所示,该方法包括以下步骤。
S101,获取目标用户生成的待修饰图像,待修饰图像中包含至少一个待修饰物体。
首先需要说明的是,本申请中不对获取待修饰图像的设备做具体限定,例如可以为智能设备,也可以为服务器。其中,智能设备可以是PC(Personal Computer,个人电脑),也可以是智能手机、平板电脑、电子书阅读器、MP3(Moving Picture Experts Group AudioLayer III,动态影像专家压缩标准音频层面3)播放器、MP4(Moving Picture ExpertsGroup Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、便携计算机等具有显示功能的可移动式终端设备等等。
同样的,本申请也不对待修饰物体做具体限定,例如可以为蓝牙,白云,街道,桌椅,楼房,人物动物等等。另外,待修饰物体的数量可以为一个,也可以为多个。
一种方式中,该待修饰图像可以为用户利用携带有摄像采集装置的移动终端拍摄的图像。
S102,基于待修饰物体,从预设的样本图像数据库中确定与待修饰图像的相似度超过第一预设阈值的样本图像。
进一步的,本申请在获取到包含一个或多个待修饰物体的图像之后,即可以利用该待修饰物体,从样本图像数据库中查找与其具有一定相似度的其他样本图像。可以理解的,该样本图像中应该也包含与对应的待修饰物体相同或相似的物体。
需要说明的是,该样本图像数据库中,即为存储了拍摄各种待修饰物体,且已经经过色彩修饰的样本图像。本申请可以利用该多个已经经过色彩修饰的样本图像,来从中针对性的选择与本次待修饰图像较为相似的样本图像作为色彩调整模板,这样可以提高待拍摄图像的修饰水平。提高用户观看体验。
具体的,本申请不对如何确定与待修饰图像的相似度超过第一预设阈值的样本图像的方式做具体限定。一种方式中,可以利用预设的神经网络图像检测模型来识别待修饰物体的特征参数,从而根据该特征参数与样本图像数据库中的各个样本图像对应的特征参数进行匹配,从而确二者的相似度。
其中,本申请不对预设的神经网络图像检测模型做具体限定。例如可以为卷积神经网络(Convolutional Neural Networks, CNN)。卷积神经网络是一类包含卷积计算且具有深度结构的前馈神经网络(Feedforward Neural Networks),是深度学习的代表算法之一。卷积神经网络具有表征学习(representation learning)能力,能够按其阶层结构对输入信息进行平移不变分类。得益于CNN(卷积神经网络)对图像的强大特征表征能力,其在图像分类、目标检测、语义分割等领域都取得了令人瞩目的效果。
进一步的,本申请可以使用CNN神经网络模型来检测待修饰图像中待修饰物体的特征参数,进而对待修饰物体进行特征识别。其中,需要将该待修饰图像输入至预设的卷积神经网络模型中,并将卷积神经网络模型最后一层全连接层(FC,fully connected layer)的输出作为对该待修饰物体对应的特征数据的识别结果。
另外,本申请不对第一预设阈值做具体限定,例如可以为70%,也可以为80%等等。进一步的,本申请也不对与待修饰图像的相似度超过第一预设阈值的样本图像的数量做具体限定,例如可以为一个,也可以为多个。
S103,确定样本图像的色调参数,并将待修饰图像的色调参数调整至与样本图像的色调参数相同。
进一步的,本申请在确定与待修饰图像的相似度超过第一预设阈值的样本图像之后,即可以将本次获取的待修饰图像对应的色条调整至与样本图像相同。从而实现了针对待修饰图像的色彩修饰。
可以理解的,目前的智能相机在对用户拍摄的相片进行美化时,只能对一种设定的色调做一个优化,例如AI会自动根据街景的色调进行一个后期处理得出一个预设的街景照片,得出一种经过固定色调调整后的照片,并且这种照片已经进行过了后期修饰无法进行二次修饰,比如用户想拍出青橙色调的照片,但是相机拍出的却是高级灰色调的照片。所以对于一些用户而言,其拍摄的照片有一定的要求时候无法做到定制化色调处理。
为了解决上述存在的问题,本申请即可以利用存储了拍摄各种待修饰物体,且已经经过色彩修饰图像的样本图像数据库中,来从中针对性的选择与本次待修饰图像较为相似的样本图像作为色彩调整模板。以使后续将本次获取的待修饰图像的色彩参数调整至于该样本图像相同,这样可以提高待拍摄图像的修饰水平,提高用户观看体验。
本申请中,在获取目标用户生成的待修饰图像,待修饰图像中包含至少一个待修饰物体;基于待修饰物体,从预设的样本图像数据库中确定与待修饰图像的相似度超过第一预设阈值的样本图像;确定样本图像的色调参数,并将待修饰图像的色调参数调整至与样本图像的色调参数相同。通过应用本申请的技术方案,可以首先识别用户本次拍摄的图像,并从样本图像数据库中找到与其最相似的样本图像,进而将本次拍摄的图像的色条调整至与样本图像相同。从而避免现有技术中,对于不同的拍摄场景以及不同的拍摄物体来说,利用相同的色调映射曲线对拍摄的图像进行色调映射,会导致存在出现图像修饰不匹配的问题。
可选的,在本申请一种可能的实施方式中,在S102(基于待修饰物体,从预设的样本图像数据库中确定与待修饰图像的相似度超过预设阈值的样本图像)中,可以通过下述步骤实现:利用图像检测模型,提取待修饰物体的特征参数;基于待修饰物体的特征参数,确定样本图像数据库中,是否包含与待修饰物体的相似度超过第二预设阈值的样本物体;将与待修饰物体的相似度超过第二预设阈值的样本物体所在的样本图像作为样本图像。
进一步的,本申请实施例中可以使用图像检测模型来提取待修饰物体的特征参数,进而对待修饰物体进行特征识别,以使后续从样本图像数据库中确定与其相似度超过第二阈值的样本物体。
具体的,需要将该待修饰图像输入至预设的卷积神经网络模型中,并将卷积神经网络模型最后一层全连接层(FC,fully connected layer)的输出作为对该待修饰物体对应的特征数据的识别结果。以使后续根据该识别结果与样本图像数据库中,样本图像包含的样本物体进行相似度比较。
其中,本申请同样不对第二预设阈值做限定,例如可以与第一预设阈值相同,也可以不相同。
一种方式中,本申请实施例可以基于对应于待修饰物体的颜色特征来确定样本图像数据库中,是否包含与其相似度超过阈值的样本物体。例如,当待修饰物体为由红色,蓝色以及黄色组成的衣柜时。本申请即可以提取该衣柜对应的色彩特征参数,以使后续从样本图像数据库中查找是否存在同样包含该三种颜色范围所组成的衣柜的样本图像。若找到,则将该样本图像中的衣柜确定为样本物体。
另外一种方式中,本申请实施例也可以基于对应于待修饰物体的轮廓特征来确定样本图像数据库中,是否包含与其相似的样本物体。例如,当待修饰物体为自行车时。本申请即可以提取该自行车对应的轮廓特征参数,以使后续从样本图像数据库中查找是否存在同样包含该轮廓特征所组成的自行车的样本图像。若找到,则将该样本图像中的自行车确定为样本物体。
再一种方式中,本申请实施例还可以基于对应于待修饰物体的数量特征以及轮廓特征来确定样本图像数据库中,是否包含与其相似的样本物体。例如,当待修饰物体为三个人体时。本申请即可以分别提取该三个人体各自对应的轮廓特征参数,从样本图像数据库中查找是否存在同样包含三个对应轮廓特征的人体所组成的样本图像。若找到,则将该样本图像中的三个人体确定为样本物体。
可选的,在本申请一种可能的实施方式中,在S101(获取目标用户生成的待修饰图像)之前,可以实施下述步骤。
建立色相环列集合,色相环列集合中包含第一数量个不同颜色的集合,其中每个颜色集合中标注有对应的色调参数范围。
首先,本申请实施例可以预先建立一个对照色彩标准的色相环列集合。其中,该集合可以包括第一数量个不同颜色的集合。进一步的,本申请对第一数量不做具体限定,一种方式中,该色相环列集合可以包含所有的颜色集合。另外,该集合中还标注有对应每个颜色集合对应的RGB范围。
例如对于蓝色色彩来说,其RGB分别为222,131,111 到214,119,79 之间。并且还可以针对蓝色来说分为若干个区间,例如分成10个区间,在其R的范围为(222-214)G的范围为( 131-119)B的范围为(111-79)颜色。
获取第二数量的样本图像,样本图像中包含至少一个样本物体;利用预设的色相环列集合,对每个样本图像中的样本物体标注对应的色调参数;将包含标注有色调参数的样本图像存储至样本图像数据库。
进一步的,本申请还可以在建立色相环列集合之后,再次获取多个拍摄有不同物体的样本图像,并将该多张样本图像进行色调标注后,再将该多张经过色调标注后的样本图像存储到样本图像数据库中。以使后续可以根据该样本图像数据库对待修饰图像进行色彩修饰。
一种方式中,本申请不对第一数量以及第二数量做具体限定,例如可以相同,也可以不相同。
在将包含标注有色调参数的样本图像存储至样本图像数据库之后,还包括:获取样本图像中样本物体的色调参数;将待修饰图像中的待修饰物体对应的色调参数调整至与样本图像的色调参数相同。
可选的,在本申请一种可能的实施方式中,在S101(获取目标用户生成的待修饰图像)之后,可以实施下述步骤:获取待修饰物体的物体类型;基于待修饰物体的物体类型,确定对应的样本数据库;基于待修饰物体,从对应的样本图像数据库中确定与待修饰图像的相似度超过第一预设阈值的样本图像。
其中,本申请中可以包含有多个对应不同物体的样本数据库。例如可以包括人体样本图像数据库、车辆样本图像数据库、自然样本图像数据库、街道样本图像数据库等等。因此,在基于待修饰物体,从预设的样本图像数据库中确定与待修饰图像的相似度超过第一预设阈值的样本图像的过程中,可以针对性的根据待修饰物体的物体类型,确定对应的样本数据库。
例如当获取到的待修饰图像包含人体时,则可以从包含人体图像的样本数据库中进行匹配。而获取到的待修饰图像包含及街景时,则可以从包含街景的样本数据库中进行匹配。
进一步的,本申请不对如何确定样本图像数据库中是否存在与待修饰图像的相似度超过第一预设阈值的样本图像的方式进行具体限定。
例如,一种方式中,可以根据待修饰图像的光亮度参数,从样本图像数据库中确定是否与该光亮度参数相同或相似的图像作为样本图像。又或,也可以根据待修饰图像的色彩参数,从样本图像数据库中确定是否与该色彩参数相同或相似的图像作为样本图像。再或,还可以根据拍摄该待修饰图像的用户属性信息,从样本图像数据库中确定是否包含同一用户拍摄的其他图像作为样本图像等等。
另外一种方式中,也可以根据预设的神经网络模型来提取待修饰图像的颜色特征参数、数量特征参数、轮廓特征参数中的一种或多种,以使后续从样本图像数据库中查找是否存在同样包含该对应颜色特征参数、数量特征参数、轮廓特征参数所组成物体的样本图像。若找到,则将该图像作为样本图像。
可选的,在本申请一种可能的实施方式中,在S103(将待修饰图像的色调参数调整至与样本图像的色调参数相同)之后,可以实施下述步骤:将调整至与样本图像的色调参数相同的待修饰图像存储到样本数据库中。
进一步的,本申请实施例在在将待修饰图像的色调参数调整至与样本图像的色调参数相同之后,还可以将其存储到样本数据库中,从而实现增大数据库的样本数量。
如图3所示,本申请还提供一种生成图像的装置。其中包括获取模块301,确定模块302,调整模块303。
获取模块301,被设置为获取目标用户生成的待修饰图像,所述待修饰图像中包含至少一个待修饰物体。
确定模块302,被设置为基于所述待修饰物体,从预设的样本图像数据库中确定与所述待修饰图像的相似度超过第一预设阈值的样本图像。
调整模块303,被设置为确定所述样本图像的色调参数,并将所述待修饰图像的色调参数调整至与所述样本图像的色调参数相同。
本申请中,在获取目标用户生成的待修饰图像,待修饰图像中包含至少一个待修饰物体;基于待修饰物体,从预设的样本图像数据库中确定与待修饰图像的相似度超过第一预设阈值的样本图像;确定样本图像的色调参数,并将待修饰图像的色调参数调整至与样本图像的色调参数相同。通过应用本申请的技术方案,可以首先识别用户本次拍摄的图像,并从样本图像数据库中找到与其最相似的样本图像,进而将本次拍摄的图像的色条调整至与样本图像相同。从而避免现有技术中,对于不同的拍摄场景以及不同的拍摄物体来说,利用相同的色调映射曲线对拍摄的图像进行色调映射,会导致存在出现图像修饰不匹配的问题。
在本申请的另一种实施方式中,获取模块301,还包括:获取模块301,被配置为利用图像检测模型,提取所述待修饰物体的特征参数;获取模块301,被配置为基于所述待修饰物体的特征参数,确定所述样本图像数据库中,是否包含与所述待修饰物体的相似度超过第二预设阈值的样本物体;获取模块301,被配置为将所述与所述待修饰物体的相似度超过第二预设阈值的样本物体所在的样本图像作为所述样本图像。
在本申请的另一种实施方式中,获取模块301,还包括:获取模块301,被配置为建立色相环列集合,所述色相环列集合中包含第一数量个不同颜色的集合,其中每个颜色集合中标注有对应的色调参数范围。
在本申请的另一种实施方式中,获取模块301,还包括:获取模块301,被配置为获取第二数量的样本图像,所述样本图像中包含至少一个样本物体;获取模块301,被配置为利用预设的色相环列集合,对每个所述样本图像中的样本物体标注对应的色调参数;获取模块301,被配置为将包含标注有色调参数的样本图像存储至所述样本图像数据库。
在本申请的另一种实施方式中,确定模块302,还包括:确定模块302,被配置为获取所述样本图像中样本物体的色调参数;确定模块302,被配置为将所述待修饰图像中的待修饰物体对应的色调参数调整至与所述样本图像的色调参数相同。
在本申请的另一种实施方式中,确定模块302,还包括:确定模块302,被配置为获取所述待修饰物体的物体类型;确定模块302,被配置为基于所述待修饰物体的物体类型,确定对应的样本数据库;确定模块302,被配置为基于所述待修饰物体,从所述对应的样本图像数据库中确定与所述待修饰图像的相似度超过所述第一预设阈值的样本图像。
在本申请的另一种实施方式中,确定模块302,还包括:确定模块302,被配置为将所述调整至与所述样本图像的色调参数相同的待修饰图像存储到所述样本数据库中。
在示例性实施例中,还提供了一种计算机可读存储介质,其上存储有计算机可读取的指令,该指令被执行时实现上述实施例中方法的部分或全部步骤,这里不再赘述。可选的,本申请涉及的存储介质如计算机可读存储介质可以是非易失性的(非临时性的),也可以是易失性的(临时性的)。例如,本申请实施例还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器402,上述指令可由电子设备400的处理器401执行以完成上述生成图像的方法,该方法包括:获取目标用户生成的待修饰图像,所述待修饰图像中包含至少一个待修饰物体;基于待修饰物体,从预设的样本图像数据库中确定与待修饰图像的相似度超第一预设阈值的样本图像;确定样本图像的色调参数,并将待修饰图像的色调参数调整至与样本图像的色调参数相同。可选地,上述指令还可以由电子设备400的处理器401执行以完成上述示例性实施例中所涉及的其他步骤。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
在示例性实施例中,还提供了一种应用程序/计算机程序产品,包括一条或多条指令,该一条或多条指令可以由电子设备400的处理器401执行,以完成上述生成图像的方法,该方法包括:获取目标用户生成的待修饰图像,待修饰图像中包含至少一个待修饰物体;基于待修饰物体,从预设的样本图像数据库中确定与待修饰图像的相似度超第一预设阈值的样本图像;确定样本图像的色调参数,并将待修饰图像的色调参数调整至与样本图像的色调参数相同。可选地,上述指令还可以由电子设备400的处理器401执行以完成上述示例性实施例中所涉及的其他步骤。
图4为电子设备400的示例图。本领域技术人员可以理解,所述示意图4仅仅是电子设备400的示例,并不构成对电子设备400的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述电子设备400还可以包括输入输出设备、网络接入设备、总线等。
所称处理器401可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器401也可以是任何常规的处理器等,所述处理器401是所述电子设备400的控制中心,利用各种接口和线路连接整个电子设备400的各个部分。
所述存储器402可用于存储所述计算机可读指令,所述处理器401通过运行或执行存储在所述存储器402内的计算机可读指令或模块,以及调用存储在存储器402内的数据,实现所述电子设备400的各种功能。所述存储器402可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备400的使用所创建的数据等。此外,存储器402可以包括硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)或其他非易失性/易失性存储器件。
所述电子设备400集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一计算机可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由下面的权利要求指出。
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制。

Claims (20)

  1. 一种生成图像的方法,包括:
    获取目标用户生成的待修饰图像,所述待修饰图像中包含至少一个待修饰物体;
    基于所述待修饰物体,从预设的样本图像数据库中确定与所述待修饰图像的相似度超过第一预设阈值的样本图像;
    确定所述样本图像的色调参数,并将所述待修饰图像的色调参数调整至与所述样本图像的色调参数相同。
  2. 如权利要求1所述的方法,其中,所述基于所述待修饰物体,从预设的样本图像数据库中确定与所述待修饰图像的相似度超过预设阈值的样本图像,包括:
    利用图像检测模型,提取所述待修饰物体的特征参数;
    基于所述待修饰物体的特征参数,确定所述样本图像数据库中,是否包含与所述待修饰物体的相似度超过第二预设阈值的样本物体;
    将所述与所述待修饰物体的相似度超过第二预设阈值的样本物体所在的样本图像作为所述样本图像。
  3. 如权利要求1或2所述的方法,其中,在所述获取目标用户生成的待修饰图像之前,还包括:
    建立色相环列集合,所述色相环列集合中包含第一数量个不同颜色的集合,其中每个颜色集合中标注有对应的色调参数范围。
  4. 如权利要求3所述的方法,其中,在所述建立色相环列集合之后,还包括:
    获取第二数量的样本图像,所述样本图像中包含至少一个样本物体;
    利用预设的色相环列集合,对每个所述样本图像中的样本物体标注对应的色调参数;
    将包含标注有色调参数的样本图像存储至所述样本图像数据库。
  5. 如权利要求4所述的方法,其中,在所述将包含标注有色调参数的样本图像存储至所述样本图像数据库之后,还包括:
    获取所述样本图像中样本物体的色调参数;
    将所述待修饰图像中的待修饰物体对应的色调参数调整至与所述样本图像的色调参数相同。
  6. 如权利要求1所述的方法,其中,所述获取目标用户生成的待修饰图像,包括:
    获取所述待修饰物体的物体类型;
    基于所述待修饰物体的物体类型,确定对应的样本数据库;
    基于所述待修饰物体,从所述对应的样本图像数据库中确定与所述待修饰图像的相似度超过所述第一预设阈值的样本图像。
  7. 如权利要求1所述的方法,其中,在所述将所述待修饰图像的色调参数调整至与所述样本图像的色调参数相同之后,还包括:
    将所述调整至与所述样本图像的色调参数相同的待修饰图像存储到所述样本数据库中。
  8. 一种生成图像的装置,包括:
    获取模块,被设置为获取目标用户生成的待修饰图像,所述待修饰图像中包含至少一个待修饰物体;
    确定模块,被设置为基于所述待修饰物体,从预设的样本图像数据库中确定与所述待修饰图像的相似度超过第一预设阈值的样本图像;
    调整模块,被设置为确定所述样本图像的色调参数,并将所述待修饰图像的色调参数调整至与所述样本图像的色调参数相同。
  9. 一种电子设备,包括:
    存储器,用于存储可执行指令;以及,
    处理器,用于与所述存储器显示以执行所述可执行指令以实现生成图像的方法,所述生成图像的方法包括:
    获取目标用户生成的待修饰图像,所述待修饰图像中包含至少一个待修饰物体;
    基于所述待修饰物体,从预设的样本图像数据库中确定与所述待修饰图像的相似度超过第一预设阈值的样本图像;
    确定所述样本图像的色调参数,并将所述待修饰图像的色调参数调整至与所述样本图像的色调参数相同。
  10. 如权利要求9所述的电子设备,其中,执行所述基于所述待修饰物体,从预设的样本图像数据库中确定与所述待修饰图像的相似度超过预设阈值的样本图像,包括:
    利用图像检测模型,提取所述待修饰物体的特征参数;
    基于所述待修饰物体的特征参数,确定所述样本图像数据库中,是否包含与所述待修饰物体的相似度超过第二预设阈值的样本物体;
    将所述与所述待修饰物体的相似度超过第二预设阈值的样本物体所在的样本图像作为所述样本图像。
  11. 如权利要求9或10所述的电子设备,其中,在所述获取目标用户生成的待修饰图像之前,还包括:
    建立色相环列集合,所述色相环列集合中包含第一数量个不同颜色的集合,其中每个颜色集合中标注有对应的色调参数范围。
  12. 如权利要求11所述的电子设备,其中,在所述建立色相环列集合之后,还包括:
    获取第二数量的样本图像,所述样本图像中包含至少一个样本物体;
    利用预设的色相环列集合,对每个所述样本图像中的样本物体标注对应的色调参数;
    将包含标注有色调参数的样本图像存储至所述样本图像数据库。
  13. 如权利要求12所述的电子设备,其中,在所述将包含标注有色调参数的样本图像存储至所述样本图像数据库之后,还包括:
    获取所述样本图像中样本物体的色调参数;
    将所述待修饰图像中的待修饰物体对应的色调参数调整至与所述样本图像的色调参数相同。
  14. 如权利要求9所述的电子设备,其中,执行所述获取目标用户生成的待修饰图像,包括:
    获取所述待修饰物体的物体类型;
    基于所述待修饰物体的物体类型,确定对应的样本数据库;
    基于所述待修饰物体,从所述对应的样本图像数据库中确定与所述待修饰图像的相似度超过所述第一预设阈值的样本图像。
  15. 一种计算机可读存储介质,用于存储计算机可读取的指令,其中,所述指令被执行时执行生成图像的方法,所述生成图像的方法包括:
    获取目标用户生成的待修饰图像,所述待修饰图像中包含至少一个待修饰物体;
    基于所述待修饰物体,从预设的样本图像数据库中确定与所述待修饰图像的相似度超过第一预设阈值的样本图像;
    确定所述样本图像的色调参数,并将所述待修饰图像的色调参数调整至与所述样本图像的色调参数相同。
  16. 如权利要求15所述的计算机可读存储介质,其中,执行所述基于所述待修饰物体,从预设的样本图像数据库中确定与所述待修饰图像的相似度超过预设阈值的样本图像,包括:
    利用图像检测模型,提取所述待修饰物体的特征参数;
    基于所述待修饰物体的特征参数,确定所述样本图像数据库中,是否包含与所述待修饰物体的相似度超过第二预设阈值的样本物体;
    将所述与所述待修饰物体的相似度超过第二预设阈值的样本物体所在的样本图像作为所述样本图像。
  17. 如权利要求15或16所述的计算机可读存储介质,其中,在所述获取目标用户生成的待修饰图像之前,还包括:
    建立色相环列集合,所述色相环列集合中包含第一数量个不同颜色的集合,其中每个颜色集合中标注有对应的色调参数范围。
  18. 如权利要求17所述的计算机可读存储介质,其中,在所述建立色相环列集合之后,还包括:
    获取第二数量的样本图像,所述样本图像中包含至少一个样本物体;
    利用预设的色相环列集合,对每个所述样本图像中的样本物体标注对应的色调参数;
    将包含标注有色调参数的样本图像存储至所述样本图像数据库。
  19. 如权利要求18所述的计算机可读存储介质,其中,在所述将包含标注有色调参数的样本图像存储至所述样本图像数据库之后,还包括:
    获取所述样本图像中样本物体的色调参数;
    将所述待修饰图像中的待修饰物体对应的色调参数调整至与所述样本图像的色调参数相同。
  20. 如权利要求15所述的计算机可读存储介质,其中,执行所述获取目标用户生成的待修饰图像,包括:
    获取所述待修饰物体的物体类型;
    基于所述待修饰物体的物体类型,确定对应的样本数据库;
    基于所述待修饰物体,从所述对应的样本图像数据库中确定与所述待修饰图像的相似度超过所述第一预设阈值的样本图像。
PCT/CN2021/122885 2020-10-10 2021-10-09 生成图像的方法、装置、电子设备及介质 WO2022073516A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011078062.6 2020-10-10
CN202011078062.6A CN112200844A (zh) 2020-10-10 2020-10-10 生成图像的方法、装置、电子设备及介质

Publications (1)

Publication Number Publication Date
WO2022073516A1 true WO2022073516A1 (zh) 2022-04-14

Family

ID=74014238

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/122885 WO2022073516A1 (zh) 2020-10-10 2021-10-09 生成图像的方法、装置、电子设备及介质

Country Status (2)

Country Link
CN (1) CN112200844A (zh)
WO (1) WO2022073516A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115835448A (zh) * 2022-12-28 2023-03-21 无锡车联天下信息技术有限公司 一种调节灯光的方法、装置、内窥镜设备及介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112200844A (zh) * 2020-10-10 2021-01-08 深圳壹账通智能科技有限公司 生成图像的方法、装置、电子设备及介质
CN114463217A (zh) * 2022-02-08 2022-05-10 口碑(上海)信息技术有限公司 一种图像处理方法以及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110229022A1 (en) * 2010-03-19 2011-09-22 Hideshi Yamada Image processing apparatus, method and program
CN107995422A (zh) * 2017-11-30 2018-05-04 广东欧珀移动通信有限公司 图像拍摄方法和装置、计算机设备、计算机可读存储介质
CN110445986A (zh) * 2019-07-30 2019-11-12 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及电子设备
CN110765525A (zh) * 2019-10-18 2020-02-07 Oppo广东移动通信有限公司 生成场景图片的方法、装置、电子设备及介质
CN112200844A (zh) * 2020-10-10 2021-01-08 深圳壹账通智能科技有限公司 生成图像的方法、装置、电子设备及介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110229022A1 (en) * 2010-03-19 2011-09-22 Hideshi Yamada Image processing apparatus, method and program
CN107995422A (zh) * 2017-11-30 2018-05-04 广东欧珀移动通信有限公司 图像拍摄方法和装置、计算机设备、计算机可读存储介质
CN110445986A (zh) * 2019-07-30 2019-11-12 Oppo广东移动通信有限公司 图像处理方法、装置、存储介质及电子设备
CN110765525A (zh) * 2019-10-18 2020-02-07 Oppo广东移动通信有限公司 生成场景图片的方法、装置、电子设备及介质
CN112200844A (zh) * 2020-10-10 2021-01-08 深圳壹账通智能科技有限公司 生成图像的方法、装置、电子设备及介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115835448A (zh) * 2022-12-28 2023-03-21 无锡车联天下信息技术有限公司 一种调节灯光的方法、装置、内窥镜设备及介质

Also Published As

Publication number Publication date
CN112200844A (zh) 2021-01-08

Similar Documents

Publication Publication Date Title
CN109359592B (zh) 视频帧的处理方法、装置、电子设备及存储介质
US10831819B2 (en) Hue-based color naming for an image
WO2022073516A1 (zh) 生成图像的方法、装置、电子设备及介质
WO2020119350A1 (zh) 视频分类方法、装置、计算机设备和存储介质
US9741137B2 (en) Image-based color palette generation
US9396560B2 (en) Image-based color palette generation
US9552656B2 (en) Image-based color palette generation
US11610433B2 (en) Skin tone assisted digital image color matching
US9633448B1 (en) Hue-based color naming for an image
WO2021114814A1 (zh) 人体属性识别方法、装置、电子设备以及存储介质
CN110276366A (zh) 使用弱监督模型来检测对象
CN110516096A (zh) 合成感知数字图像搜索
WO2020259449A1 (zh) 一种短视频的生成方法及装置
CN108898082B (zh) 图片处理方法、图片处理装置及终端设备
US20150317510A1 (en) Rating photos for tasks based on content and adjacent signals
CN109871845B (zh) 证件图像提取方法及终端设备
US9799099B2 (en) Systems and methods for automatic image editing
CN111292262B (zh) 图像处理方法、装置、电子设备以及存储介质
CN106650570A (zh) 一种查找物品的方法及终端
CN105430269B (zh) 一种应用于移动终端的拍照方法及装置
WO2020038243A1 (zh) 一种视频摘要生成方法、装置、计算设备和存储介质
TWI781554B (zh) 物品名稱確定方法、裝置、電腦設備及儲存媒體
CN111127309A (zh) 肖像风格迁移模型训练方法、肖像风格迁移方法以及装置
WO2019120025A1 (zh) 照片的调整方法、装置、存储介质及电子设备
CN111316628A (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: 21877033

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 1205A DATED 11.07.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21877033

Country of ref document: EP

Kind code of ref document: A1