Information acquisition method and device, computer readable storage medium, and electronic device

The image is projected and histogram matched by the projection vector, which solves the problem of low color migration accuracy in the existing technology and improves the accuracy of the migration result information.

CN113284206BActive Publication Date: 2025-01-21GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110546272.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-19
Publication Date
2025-01-21
Estimated Expiration
2041-05-19

AI Technical Summary

Technical Problem

In the prior art, when using kernel functions to parameterize and transfer images, the accuracy rate is low, resulting in insufficient evaluation of migration results.

Method used

By obtaining the migration image and the reference image, projecting them using the projection vector, the reference projection map and the migration projection map are obtained, and the histogram matching is performed to obtain the target migration result information of the migration image.

Benefits of technology

The accuracy of the target migration result information is improved, and the color probability distribution of the image is obtained through projection and histogram matching, thereby improving the accuracy of the evaluation of the color migration effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113284206B_ABST
    Figure CN113284206B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of data processing technology, and provides an information acquisition method and device, a computer-readable storage medium, and an electronic device, the method comprising: acquiring a migration image and a reference image, the migration image being an image obtained after color migration of a target image according to the reference image; projecting the reference image and the migration image using a projection vector to obtain a reference projection map corresponding to the reference image and a migration projection map corresponding to the migration image; performing histogram matching on the reference projection map and the migration projection map to obtain a projection matching map, and obtaining target migration result information of the migration image according to the projection matching map and the migration projection map. The present disclosure projects the migration image and the reference image to a single channel through a projection vector, and obtains the target migration result information using a non-parametric method, thereby improving the accuracy of the target migration result information.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the development of image processing technology, image processing software and image processing equipment have been used more and more widely. Image color migration refers to adjusting the color information of the current input image according to the color information of the specified reference image to obtain an output image. The output image has the same color information as the reference image and the same shape information as the current input image.

[0003] At present, there are many image color migration schemes, and the color migration results corresponding to the multiple color migration schemes are also different. How to quantitatively evaluate the color migration effect becomes very important. In the prior art, the kernel function is used to parameterize the image, and the color migration result is obtained according to the KL divergence. However, the accuracy of the method of approximating the image using the kernel function is low, and thus the accuracy of the evaluation of the migration result is also low. Summary of the invention

[0004] The purpose of the present disclosure is to provide an information acquisition method, an information acquisition device, a computer-readable storage medium and an electronic device, thereby at least to a certain extent solving the problem of low accuracy of information acquisition in the prior art.

[0005] According to a first aspect of the present disclosure, there is provided an information acquisition method, the method comprising: acquiring a migration image and a reference image, the migration image being an image obtained after color migration of a target image according to the reference image; projecting the reference image and the migration image using a projection vector to obtain a reference projection map corresponding to the reference image and a migration projection map corresponding to the migration image; performing histogram matching on the reference projection map and the migration projection map to obtain a projection matching map, and acquiring target migration result information of the migration image according to the projection matching map and the migration projection map.

[0006] According to a second aspect of the present disclosure, an information acquisition device is provided, comprising: an image acquisition module, used to acquire a migration image and a reference image, wherein the migration image is an image obtained after color migration is performed on a target image according to the reference image; a projection module, used to project the reference image and the migration image using a projection vector to obtain a reference projection image corresponding to the reference image and a migration projection image corresponding to the migration image; and an information acquisition module, used to perform histogram matching on the reference projection image and the migration projection image to obtain a projection matching image, and to acquire target migration result information of the migration image according to the projection matching image and the migration projection image.

[0007] According to a third aspect of the present disclosure, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the information acquisition method as described in the above embodiments is implemented.

[0008] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the information acquisition method as described in the above embodiments.

[0009] It can be seen from the above technical solutions that the information acquisition method and device, system, computer-readable storage medium, and electronic device in the exemplary embodiments of the present disclosure have at least the following advantages and positive effects:

[0010] The information acquisition method disclosed in the present invention firstly acquires a migration image and a reference image, wherein the migration image is an image obtained after color migration is performed on the target image according to the reference image; secondly, the reference image and the migration image are projected using a projection vector to obtain a reference projection map corresponding to the reference image and a migration projection map corresponding to the migration image; finally, the reference projection map and the migration projection map are histogram matched to obtain a projection matching map, and the target migration result information of the migration image is obtained according to the projection matching map and the migration projection map. The information acquisition method disclosed in the present invention projects the migration image and the reference image to a single channel through a projection vector, and directly performs histogram matching on the reference projection map and the migration projection map of the single channel to obtain the color probability distribution of the image, and obtains the target migration result information based on the color probability distribution, thereby improving the accuracy of the target migration result information.

[0011] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0013] Figure 1 A schematic diagram schematically shows a system architecture of this exemplary embodiment;

[0014] Figure 2 A schematic diagram schematically shows an electronic device according to this exemplary embodiment;

[0015] Figure 3The following is a schematic diagram showing a flow chart of an information acquisition method according to an embodiment of the present disclosure;

[0016] Figure 4 The following schematically shows a flow chart of a method for obtaining target migration result information according to an embodiment of the present disclosure;

[0017] Figure 5 A schematic diagram of a method flow for obtaining second migration result information according to an embodiment of the present disclosure is shown;

[0018] Figure 6 The following schematically shows a flow chart of a method for obtaining target migration result information according to an embodiment of the present disclosure;

[0019] Figure 7 The following is a schematic diagram showing a flow chart of an information acquisition method according to a specific embodiment of the present disclosure;

[0020] Figure 8 A block diagram of an information acquisition device according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0021] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more comprehensive and complete and will fully convey the concept of the example embodiments to those skilled in the art.

[0022] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.

[0023] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0024] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0025] In the related art in this field, image color migration refers to using the color of a reference image to modify the color style of an input image to obtain a migrated image with the same shape as the input image and the same color style as the reference image.

[0026] Based on the problems existing in the related art, the embodiment of the present disclosure first provides an information acquisition method, which is applied to the system architecture of the exemplary implementation of the present disclosure. Figure 1 A schematic diagram of a system architecture of an exemplary embodiment of the present disclosure is shown. Figure 1 As shown, the system architecture 100 may include: a terminal 110, a network 120 and a server 130. The terminal 110 may be any electronic device with an audio acquisition function, including but not limited to a mobile phone, a tablet computer, a personal computer, a smart wearable device, etc. The network 120 is used to provide a medium for a communication link between the terminal 110 and the server 130, and may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. It should be understood that Figure 1 The number of terminals, networks and servers in the embodiment is only for illustration. Any number of terminals, networks and servers may be provided as required. For example, the server 130 may be a server cluster composed of multiple servers.

[0027] The information acquisition method provided in the embodiment of the present disclosure may be executed by the terminal 110 , for example, the terminal 110 acquires a migration image and a reference image, and acquires target migration result information according to the migration image and the reference image.

[0028] In addition, the information acquisition method provided in the embodiment of the present disclosure may also be executed by the server 130. For example, after the terminal 110 acquires the migration image and the reference image, the migration image and the reference image are uploaded to the server 130, so that the server 130 acquires the target migration result information of the migration image based on the migration image and the reference image, and returns the target migration result information to the terminal 110. The present disclosure does not limit this.

[0029] An exemplary embodiment of the present disclosure provides an electronic device for implementing an information acquisition method, which may be Figure 1 The terminal 110 or the server 130 in the embodiment. The electronic device at least includes a processor and a memory, the memory is used to store executable instructions of the processor, and the processor is configured to execute the information acquisition method by executing the executable instructions.

[0030] Electronic devices can be implemented in various forms, for example, they can include mobile devices such as mobile phones, tablet computers, laptops, personal digital assistants (PDAs), navigation devices, wearable devices, drones, and fixed devices such as desktop computers and smart TVs.

[0031] Below Figure 2 Taking the mobile terminal 200 in FIG. 1 as an example, the structure of the electronic device is exemplarily described. It should be understood by those skilled in the art that, in addition to the components specifically used for mobile purposes, Figure 2 The structure in the figure can also be applied to fixed type devices. In other embodiments, the mobile terminal 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure can be implemented in hardware, software, or a combination of software and hardware. The interface connection relationship between the components is only shown schematically and does not constitute a structural limitation of the mobile terminal 200. In other embodiments, the mobile terminal 200 may also adopt the same Figure 2 Different interface connection methods, or a combination of multiple interface connection methods.

[0032] like Figure 2 As shown, the mobile terminal 200 may specifically include: a processor 210, an internal memory 221, an external memory interface 222, a USB interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 271, a receiver 272, a microphone 273, an earphone interface 274, a sensor module 280, a display screen 290, a camera module 291, an indicator 292, a motor 293, a button 294, and a subscriber identification module (Subscriber Identification Module, SIM) card interface 295, etc. The sensor module 280 may include a depth sensor 2801, a pressure sensor 2802, a gyroscope sensor 2803, an air pressure sensor 2804, etc.

[0033] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor and / or a neural network processor (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0034] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the mobile terminal 200 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0035] The processor 210 is provided with a memory. The memory can store instructions for implementing six modular functions: detection instructions, connection instructions, information management instructions, analysis instructions, data transmission instructions, and notification instructions, and the execution is controlled by the processor 210.

[0036] The charging management module 240 is used to receive charging input from the charger. The power management module 241 is used to connect the battery 242, the charging management module 240 and the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240 to power the processor 210, the internal memory 221, the display screen 290, the camera module 291 and the wireless communication module 260.

[0037] The wireless communication function of the mobile terminal 200 can be implemented through antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modulation and demodulation processor and baseband processor. Among them, antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals; mobile communication module 250 can provide solutions for wireless communication including 2G / 3G / 4G / 5G applied on mobile terminal 200; modulation and demodulation processor can include modulator and demodulator; wireless communication module 260 can provide solutions for wireless communication including wireless local area network (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT) and the like applied on mobile terminal 200. In some embodiments, antenna 1 of mobile terminal 200 is coupled with mobile communication module 250, and antenna 2 is coupled with wireless communication module 260, so that mobile terminal 200 can communicate with network and other devices through wireless communication technology.

[0038] The mobile terminal 200 implements the display function through a GPU, a display screen 290, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 290 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs that execute program instructions to generate or change display information.

[0039] The mobile terminal 200 can realize the shooting function through the ISP, the camera module 291, the video codec, the GPU, the display screen 290 and the application processor, etc. Among them, the ISP is used to process the data fed back by the camera module 291; the camera module 291 is used to capture static images or videos; the digital signal processor is used to process digital signals, and can process other digital signals in addition to digital image signals; the video codec is used to compress or decompress digital videos, and the mobile terminal 200 can also support one or more video codecs.

[0040] The external memory interface 222 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile terminal 200. The external memory card communicates with the processor 210 through the external memory interface 222 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0041] The internal memory 221 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 221 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the mobile terminal 200 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash memory (Universal Flash Storage, UFS), etc. The processor 210 executes various functional applications and data processing of the mobile terminal 200 by running instructions stored in the internal memory 221 and / or instructions stored in a memory provided in the processor.

[0042] The mobile terminal 200 can implement audio functions such as music playing and recording through the audio module 270 , the speaker 271 , the receiver 272 , the microphone 273 , the earphone interface 274 and the application processor.

[0043] The depth sensor 2801 is used to obtain the depth information of the scene. In some embodiments, the depth sensor can be arranged in the camera module 291.

[0044] The pressure sensor 2802 is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 2802 can be arranged on the display screen 290. There are many types of pressure sensors 2802, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc.

[0045] The gyro sensor 2803 can be used to determine the motion posture of the mobile terminal 200. In some embodiments, the angular velocity of the mobile terminal 200 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 2803. The gyro sensor 2803 can be used for shooting anti-shake, navigation, somatosensory game scenes, etc.

[0046] In addition, sensors with other functions may be set in the sensor module 280 according to actual needs, such as an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.

[0047] The mobile terminal 200 may also include other devices that provide auxiliary functions. For example, the key 294 includes a power key, a volume key, etc., and the user can generate key signal input related to the user settings and function control of the mobile terminal 200 through key input. For example, the indicator 292, the motor 293, the SIM card interface 295, etc.

[0048] The information acquisition method and information acquisition device according to the exemplary embodiments of the present disclosure are described in detail below. Figure 3 A flow chart of the information acquisition method is shown, as shown in Figure 3 As shown, the information acquisition method at least includes the following steps:

[0049] Step S310: acquiring a migration image and a reference image, wherein the migration image is an image obtained by performing color migration on the target image according to the reference image;

[0050] Step S320: projecting the reference image and the migration image using the projection vector to obtain a reference projection image corresponding to the reference image and a migration projection image corresponding to the migration image;

[0051] Step S330: performing histogram matching on the reference projection map and the migration projection map to obtain a projection matching map, and obtaining target migration result information of the migration image according to the projection matching map and the migration projection map.

[0052] The information acquisition method disclosed in the present invention projects the migration image and the reference image to a single channel through a projection vector, and directly performs histogram matching on the reference projection map and the migration projection map of the single channel to obtain the color probability distribution of the image, and obtains the target migration result information based on the color probability distribution, thereby improving the accuracy of the target migration result information.

[0053] In order to make the technical solution of the present disclosure clearer, each step of the information acquisition method is described below.

[0054] In step S310, a migration image and a reference image are obtained, where the migration image is an image obtained by performing color migration on the target image according to the reference image.

[0055] In the exemplary embodiment of the present disclosure, the target image refers to an image to be processed for color migration. The target image may be an image captured by an image acquisition unit, or an image drawn by an image editing software, or of course, may be other types of images to be processed designated for color migration, which are not specifically limited in the present exemplary embodiment.

[0056] The reference image refers to a source image used to provide texture information and color information used in color migration, and the reference image can be any image. For example, the reference image can be an image with cold or warm tones, or an image with an oil painting style, which is not specifically limited in this exemplary embodiment.

[0057] Color transfer refers to extracting color features from a specified reference image, and using the extracted color features to transfer the content structure of the target image without destroying the content structure of the target image, so as to obtain a transferred image. The obtained transferred image has the structural information and shape information of the target image, as well as the texture information and color information of the reference image.

[0058] For example, based on the reference image A, the color of the target image B is migrated to obtain the migrated image C, which has similar or identical texture information and color information as the reference image A, and similar or identical structure information and shape information as the target image B.

[0059] In step S320, the reference image and the migration image are projected using the projection vector to obtain a reference projection image corresponding to the reference image and a migration projection image corresponding to the migration image.

[0060] In an exemplary embodiment of the present disclosure, a projection vector may be preconfigured, and the reference image and the migration image may be projected using the projection vector. The projection vector may be a three-dimensional projection vector (x, y, z), in which x, y, and z may be any values, and this exemplary embodiment does not specifically limit this.

[0061] Specifically, the RGB pixel values ​​of each pixel in the reference image and the migration image are projected to a single dimension according to the projection vector (x, y, z) to obtain the single-dimensional pixel value corresponding to each pixel. According to the single-dimensional pixel values ​​corresponding to each pixel in the reference image and the migration image, a reference projection map and a migration projection map corresponding to the reference image and the migration image are respectively constructed. The reference projection map and the migration projection map are single-channel images.

[0062] For example, if the pixel value on the RGB channel corresponding to a certain pixel point on the reference image is (r, g, b), then the pixel point is projected using the projection vector, and the single-dimensional pixel value obtained is v = r*x+g*y+b*z. Each pixel point in the reference image is projected separately, and a reference projection map corresponding to the reference image is constructed based on the single-dimensional pixel value corresponding to each pixel point.

[0063] In addition, multiple projection vectors can be configured, and the reference image and the migration image can be projected using the multiple projection vectors to obtain multiple reference projection images and multiple migration projection images. Of course, the number of projection vectors can be 216 or 360, and the present disclosure does not specifically limit the number of projection vectors.

[0064] In step S330, histogram matching is performed on the reference projection map and the migration projection map to obtain a projection matching map, and target migration result information of the migration image is obtained according to the projection matching map and the migration projection map.

[0065] In an exemplary embodiment of the present disclosure, the target migration result information may include a target migration result score, and the target migration result score of the migration image may represent the migration error of the color migration of the target image based on the reference image. For example, the larger the target migration result score in the target migration result information, the larger the migration error of the migration image and the poorer the migration effect.

[0066] In the exemplary embodiments of the present disclosure, histogram matching is also called histogram specification, which is an operation to transform the grayscale distribution of an image according to a specific pattern. That is, the histogram of the template image is matched to the original image to obtain a matched image. The original image and the matched image have the same size, and the template image and the matched image have the same probability distribution.

[0067] Specifically, the reference projection image is used as a template image in histogram matching, and the migration projection image is used as an original image in histogram matching, and histogram matching is performed to obtain a projection matching image. The projection matching image has the same probability distribution as the reference projection image, and the projection matching image has the same size as the reference projection image.

[0068] In addition, if multiple reference projection maps and multiple migration projection maps are obtained according to multiple projection vectors, histogram matching is performed according to the reference projection map and the migration projection map corresponding to the same projection vector to obtain multiple projection matching maps.

[0069] In an exemplary embodiment of the present disclosure, the pixel difference between the pixel value of each pixel in the projection matching image and the pixel value of the pixel point at the same position in the migration projection image is obtained, and the target migration result information of the migration image is obtained according to the pixel difference of each pixel.

[0070] Among them, the absolute value of the pixel difference corresponding to each pixel point in the migration image can be calculated, and the absolute value of the pixel difference corresponding to each pixel point in the migration image can be configured as the target migration result information of the migration image. The target migration result information of the migration image is the migration error corresponding to each pixel point in the migration image. If the absolute value of the pixel difference corresponding to a certain pixel point is larger, it indicates that the migration error of the pixel point is larger, that is, the color migration effect of the pixel point is poor.

[0071] In addition, the sum of the absolute values ​​of the pixel differences corresponding to all the pixels in the migration image can be calculated, and the sum of the absolute values ​​corresponding to all the pixels in the migration image can be configured as the target migration result information of the migration image. The target migration result information of the migration image is the migration error corresponding to the migration image. If the sum of the absolute values ​​corresponding to all the pixels in the migration image is larger, it indicates that the overall color migration effect of the migration image is poor.

[0072] Furthermore, the average value of the absolute values ​​of the pixel differences corresponding to all the pixels in the migration image may be calculated, and the average value of the absolute values ​​of the pixel differences corresponding to all the pixels in the migration image may be configured as the target migration result information of the migration image.

[0073] In an exemplary embodiment of the present disclosure, if there are multiple projection matching images, the pixel difference between each pixel point in the migration projection image and the pixel value of the pixel point at the same position in each projection matching image is calculated respectively. Each pixel point in the migration projection image corresponds to multiple pixel differences, and the sum of the absolute values ​​of the multiple pixel differences corresponding to each pixel point, or the average value of the absolute values ​​of the multiple pixel differences is used as the target migration result information corresponding to each pixel point.

[0074] In addition, the sum of the target migration result information corresponding to all the pixels in the migration image, or the average value of the target migration result information corresponding to all the pixels in the migration image may be used as the target migration result information of the migration image.

[0075] For example, if N projection vectors are configured, first, N migration projection images and N reference projection images are obtained according to the N projection vectors, and histogram matching is performed on the migration projection image and the reference projection image obtained using the same projection vector to obtain N projection matching images;

[0076] Then, the pixel difference between each pixel point in each migration projection image and the pixel value of the pixel point at the same position in the corresponding projection matching image is calculated respectively, that is, N pixel differences corresponding to each pixel point are obtained, and the average pixel difference of the N pixel differences corresponding to each pixel point is calculated;

[0077] Finally, the sum of the average pixel differences of all pixels in the migration image, or the average of the average pixel differences corresponding to all pixels, is calculated to obtain the target migration result information of the migration image.

[0078] It should be noted that the error between the migration projection map and the projection matching map can be calculated using the L1 norm, and the error between the migration projection map and the projection matching map is used as the target migration result information of the migration image. That is, the error between the migration projection map E and the projection matching map F is mean(abs(EF)).

[0079] In an exemplary embodiment of the present disclosure, Figure 4 A schematic diagram of a method for obtaining target migration result information is shown in FIG. Figure 4 As shown, the process at least includes steps S410 to S430, which are described in detail as follows:

[0080] In step S410, first migration result information of the migration image is obtained according to the pixel value of each pixel in the projection matching image and the migration projection image.

[0081] In an exemplary embodiment of the present disclosure, the pixel difference between the pixel value of each pixel in the projection matching image and the pixel value of the pixel at the same position in the migration projection image can be obtained, and the sum of the pixel differences corresponding to each pixel is configured as the first migration result information. The specific method of obtaining the first migration result information of the migration image according to the pixel value of each pixel in the projection matching image and the migration projection image is the same as the method of obtaining the target migration result information of the migration image according to the pixel value of each pixel in the projection matching image and the migration projection image in the above embodiment, and has been described in detail in the above embodiment, and will not be repeated here.

[0082] In step S420, a distribution model of the reference image is constructed according to the pixel information of the reference image, and second migration result information corresponding to the migration image is calculated according to the distribution model.

[0083] In an exemplary embodiment of the present disclosure, pixel values ​​of a reference image are input into a Gaussian mixture model to obtain a probability distribution model corresponding to the reference image.

[0084] Specifically, the Gaussian Mixed Model (GMM) uses the Gaussian probability density function to accurately quantify things and decompose things into several models based on the Gaussian probability density function (normal distribution curve). The GMM model can perform a mixed Gaussian distribution on the input reference image to obtain a probability distribution model corresponding to the reference image.

[0085] Different reference images correspond to different probability distribution models, and the probability distribution model corresponding to the reference image can be pre-built and stored in a database. When color migration is performed on the target image according to the reference image, the probability distribution model corresponding to the reference image is directly obtained from the database.

[0086] In an exemplary embodiment of the present disclosure, Figure 5 A schematic diagram of a method for obtaining the second migration result information is shown. Figure 5As shown, the process includes at least steps S510 to S520, which are described in detail as follows: in step S510, the pixel value of each pixel in the migration image is input into the probability distribution model to obtain distribution information corresponding to each pixel in the migration image; in step S520, the distribution information corresponding to each pixel in the migration image is summed to obtain second migration result information.

[0087] Specifically, the distribution information corresponding to each pixel in the migration image is summed, that is, the distribution information corresponding to all pixels in the migration image is added, and the result of the addition is the second migration result information of the migration image. The size of the second migration result information represents the color difference between the migration image and the reference image. The larger the second migration result information, the greater the color difference between the migration image and the reference image, indicating that the color migration effect of the target image based on the reference image is worse.

[0088] In step S430, target migration result information of the migration image is acquired according to the first migration result information and the second migration result information.

[0089] In an exemplary embodiment of the present disclosure, after obtaining the first migration result information and the second migration result information, weight values ​​are assigned to the first migration result information and the second migration result information, and target migration result information of the migration image is calculated according to the weight values ​​corresponding to the first migration result information and the second migration result information.

[0090] Specifically, the weight values ​​of the first migration result information and the second migration result information may be configured as k1 and k2 respectively, and the target migration result information may be obtained according to formula (1), which is as follows:

[0091] w=k1a+k2b (1)

[0092] Wherein, a is the first migration result information, b is the second migration result information, and w is the target migration result information. The values ​​of k1 and k2 can be set according to the actual scenario, for example, k1 can be set to 1, k2 can be set to 10, etc., which is not specifically limited in the present disclosure.

[0093] In addition, if the first migration result information includes the pixel position of each pixel in the migration image and the first migration result information corresponding to each pixel position, the distribution information corresponding to each pixel in the migration image can be configured as the second migration result information, and then the above formula (1) is used to obtain the target migration result information corresponding to each pixel in the migration image.

[0094] In an exemplary embodiment of the present disclosure, Figure 6 A schematic diagram of a method for obtaining target migration result information is shown in FIG. Figure 6As shown, the process at least includes steps S610 to S630, which are described in detail as follows:

[0095] In step S610, the pixel values ​​of the pixels in the reference image are input into the Gaussian mixture model to obtain a probability distribution model corresponding to the reference image;

[0096] In step S620, the pixel value of each pixel in the migration image is respectively input into the probability distribution model corresponding to the reference image to obtain distribution information corresponding to each pixel in the migration image;

[0097] In step S630, the distribution information corresponding to all pixels in the migration image is summed, and the summed result is configured as the target migration result information of the migration image.

[0098] In the method for obtaining target migration result information in this embodiment, the probability of pixels in the migration image appearing in the reference image is calculated using maximum likelihood, and the result of color migration is analyzed from a global perspective.

[0099] In an exemplary embodiment of the present disclosure, when the target migration result information of the migration image does not meet the preset migration condition, the pixel value of each pixel in the migration image and the reference image is weighted averaged, and the migration image is updated according to the weighted average processing result.

[0100] Specifically, it is determined whether the target migration result information of the migration image meets the preset migration condition, wherein the preset migration condition may be that the target migration result score in the target migration result information is less than the score threshold, and if the target migration result score is less than the score threshold, it is determined that the target migration result information meets the preset migration condition. Both the preset migration condition and the score threshold can only be set according to the actual application scenario, and the present disclosure does not make specific limitations on this.

[0101] In addition, when the target migration result information of the migration image does not meet the preset migration condition, the pixel values ​​at the same position in the migration image and the reference image are weighted averaged, and the pixel value after weighted average is used as the pixel value of the updated migration image. For example, if the RGB pixel value at a certain pixel point in the migration image is (100, 100, 100), the RGB pixel value at the same pixel point in the reference image is (60, 60, 60). The same weight value of 0.5 can be set for the pixel values ​​of the reference image and the migration image, then the average pixel value at the same pixel point in the migration image and the reference image can be obtained as (80, 80, 80), and the RGB pixel value at the pixel point in the migration image is updated to (80, 80, 80). Of course, different weight values ​​can also be set for the pixel values ​​of the reference image and the migration image, and the RGB pixel value at the pixel point in the migration image is updated to (70, 70, 70). The weight values ​​of the pixel values ​​of the reference image and the migration image can be set according to the actual application scenario, and the present disclosure does not make specific limitations on this.

[0102] Figure 7 A schematic diagram of a flow chart of an information acquisition method of this specific embodiment is shown, such as Figure 7 As shown, the process at least includes steps S710 to S780, which are described in detail as follows:

[0103] In step S710, a migration image and a reference image are acquired;

[0104] The migration image is an image obtained by performing color migration on the target image according to the reference image.

[0105] In step S720, the migration image of the reference image is projected using the projection vector to obtain a reference projection image corresponding to the reference image and a migration projection image corresponding to the migration image;

[0106] Among them, multiple projection vectors can be set, and multiple reference projection maps and migration projection maps can be obtained based on the multiple projection vectors.

[0107] In step S730, histogram matching is performed on the reference projection image and the migration projection image to obtain a projection matching image;

[0108] In step S740, the pixel difference between the pixel value of each pixel in the projection matching image and the pixel value of each pixel in the migration projection image is obtained, and the average value of the pixel differences corresponding to all pixel values ​​is calculated, and the average value of the pixel differences is configured as the first migration result information;

[0109] In step S750, the pixel values ​​of the reference image are input into the Gaussian mixture model to obtain a probability distribution model corresponding to the reference image;

[0110] In step S760, the pixel value of each pixel in the migration image is input into the probability distribution model corresponding to the reference image to obtain distribution information corresponding to each pixel in the migration image;

[0111] In step S770, the distribution information corresponding to all pixels in the migration image is summed to obtain second migration result information of the migration image;

[0112] In step S780, weight values ​​are assigned to the first migration result information and the second migration result information of the migration image, and target migration result information is obtained according to the weight values ​​corresponding to the first migration result information and the second migration result information.

[0113] The method for obtaining target migration result information in this embodiment first uses maximum likelihood to calculate the probability of pixels in the migration image appearing in the reference image to obtain first migration result information; then, using edge probability error, by projecting the reference image and the migration image to a single channel, and performing histogram matching on the projection image of the single channel, second migration result information is obtained according to the matching result; finally, target migration result information is obtained according to the first migration result information and the second migration result information. The information acquisition method of this embodiment improves the accuracy of target migration result information by objectively analyzing the color migration results from a global and detailed perspective; and updates the migration image according to the color migration result, thereby improving the accuracy of color migration and thus improving the user experience.

[0114] Those skilled in the art will appreciate that all or part of the steps for implementing the above embodiments are implemented as a computer program executed by a CPU. When the computer program is executed by the CPU, the above functions defined by the above method provided by the present invention are performed. The program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk.

[0115] In addition, it should be noted that the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0116] The following describes an embodiment of the device of the present disclosure, which can be used to execute the above-mentioned information acquisition method of the present disclosure. For details not disclosed in the embodiment of the device of the present disclosure, please refer to the embodiment of the above-mentioned information acquisition method of the present disclosure.

[0117] Figure 8 A block diagram of an information acquisition device according to an embodiment of the present disclosure is schematically shown.

[0118] Reference Figure 8 As shown, according to an information acquisition device 800 of an embodiment of the present disclosure, the information acquisition device 800 includes: an image acquisition module 801, an image projection module 802, and an information acquisition module 803. Specifically:

[0119] The image acquisition module 801 is used to acquire a migration image and a reference image, wherein the migration image is an image obtained by performing color migration on the target image according to the reference image;

[0120] An image projection module 802 is used to project the reference image and the migration image using a projection vector to obtain a reference projection image corresponding to the reference image and a migration projection image corresponding to the migration image;

[0121] The information acquisition module 803 is used to perform histogram matching on the reference projection map and the migration projection map to obtain a projection matching map, and obtain target migration result information of the migration image according to the projection matching map and the migration projection map.

[0122] In an exemplary embodiment of the present disclosure, the information acquisition module 803 may further include a first information acquisition unit, a second information acquisition unit and a target information acquisition unit, wherein:

[0123] A first information acquisition unit, configured to acquire first migration result information of the migration image according to the pixel value of each pixel in the projection matching image and the migration projection image;

[0124] A second information acquisition unit, configured to construct a distribution model of the reference image according to pixel information of the reference image, and calculate second migration result information corresponding to the migration image according to the distribution model;

[0125] The target information acquisition unit is used to acquire target migration result information of the migration image according to the first migration result information and the second migration result information.

[0126] In an exemplary embodiment of the present disclosure, the second information acquisition unit may also be used to input the pixel values ​​of the reference image into the Gaussian mixture model to obtain a probability distribution model corresponding to the reference image.

[0127] In an exemplary embodiment of the present disclosure, the second information acquisition unit can also be used to input the pixel value of each pixel in the migration image into the probability distribution model to obtain distribution information corresponding to each pixel in the migration image; and sum the distribution information corresponding to each pixel in the migration image to obtain second migration result information.

[0128] In an exemplary embodiment of the present disclosure, the first information acquisition unit can also be used to obtain the pixel difference between the pixel value of each pixel in the projection matching image and the pixel value of each pixel in the migration projection image, and configure the sum of the pixel differences corresponding to each pixel as the first migration result information.

[0129] In an exemplary embodiment of the present disclosure, the target information acquisition unit may also be used to assign weight values ​​to the first migration result information and the second migration result information; and calculate the target migration result information of the migration image according to the weight values ​​corresponding to the first migration result information and the second migration result information.

[0130] In an exemplary embodiment of the present disclosure, the information acquisition device 800 may also include an image update module (not shown in the figure), which is used to perform weighted averaging processing on the pixel values ​​of each pixel in the migration image and the reference image when the target migration result information of the migration image does not meet the preset migration conditions, and update the migration image according to the weighted averaging processing result.

[0131] The specific details of each module in the above-mentioned information acquisition device have been described in detail in the implementation method of the information acquisition method. The undisclosed details can be found in the implementation method of the information acquisition method, so they will not be repeated here.

[0132] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0133] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which a program product capable of implementing the above-mentioned method of the present specification is stored. In some possible implementations, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of the present specification, for example, it can execute Figures 3 to 7 Any one or more steps in .

[0134] The exemplary embodiments of the present disclosure also provide a program product for implementing the above method, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0135] The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more conductors, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0136] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0137] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0138] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0139] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and embodiments are to be regarded as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A method for obtaining information, characterized in that: include: Acquire a migration image and a reference image, wherein the migration image is an image obtained after color migration of the target image is performed according to the reference image; Projecting the reference image and the migration image using a projection vector to obtain a reference projection image corresponding to the reference image and a migration projection image corresponding to the migration image; Histogram matching is performed on the reference projection map and the migration projection map to obtain a projection matching map, and target migration result information of the migration image is obtained according to the projection matching map and the migration projection map.

2. The information acquisition method according to claim 1, characterized in that: Acquiring target migration result information of the migration image according to the projection matching graph and the migration projection graph includes: Acquire first migration result information of the migration image according to the pixel value of each pixel in the projection matching image and the migration projection image; and constructing a distribution model of the reference image according to pixel information of the reference image, and calculating second migration result information corresponding to the migration image according to the distribution model; The target migration result information of the migration image is acquired according to the first migration result information and the second migration result information.

3. The information acquisition method according to claim 2, characterized in that: Constructing a distribution model of the reference image according to pixel information of the reference image, comprising: The pixel values ​​of the reference image are input into a Gaussian mixture model to obtain a probability distribution model corresponding to the reference image.

4. The information acquisition method according to claim 3, characterized in that: Calculating second migration result information corresponding to the migration image according to the probability distribution model includes: Inputting the pixel value of each pixel in the migration image into the probability distribution model to obtain distribution information corresponding to each pixel in the migration image; The distribution information corresponding to each pixel in the migration image is summed to obtain the second migration result information.

5. The information acquisition method according to claim 2, characterized in that: Acquiring first migration result information of the migration image according to the projection matching image and the pixel value of each pixel in the migration projection image, including: The pixel difference between the pixel value of each pixel in the projection matching image and the pixel value of each pixel in the migration projection image is obtained, and the sum of the pixel differences corresponding to each pixel is configured as the first migration result information.

6. The information acquisition method according to claim 2, characterized in that: Acquiring target migration result information of the migration image according to the first migration result information and the second migration result information includes: assigning weight values ​​to the first migration result information and the second migration result information; The target migration result information of the migration image is calculated according to the weight values ​​corresponding to the first migration result information and the second migration result information.

7. The information acquisition method according to claim 1, characterized in that: The method further comprises: When the target migration result information of the migration image does not meet the preset migration condition, weighted average processing is performed on the pixel values ​​of each pixel in the migration image and the reference image, and the migration image is updated according to the weighted average processing result.

8. An information acquisition device, characterized in that: include: An image acquisition module, used to acquire a migration image and a reference image, wherein the migration image is an image obtained by performing color migration on the target image according to the reference image; An image projection module, configured to project the reference image and the migration image using a projection vector to obtain a reference projection image corresponding to the reference image and a migration projection image corresponding to the migration image; The information acquisition module is used to perform histogram matching on the reference projection map and the migration projection map to obtain a projection matching map, and obtain target migration result information of the migration image according to the projection matching map and the migration projection map.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the information acquisition method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the information acquisition method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Scenario-adaptive tone migration method

    CN105261046A

  • Matching cost calculation method and device

    CN108074250A

  • Image acquisition method and device, equipment and computer readable medium

    CN112348910A