CN109345603B - Image processing method and device, electronic equipment and computer readable storage medium - Google Patents

Image processing method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN109345603B
CN109345603B CN201811151551.2A CN201811151551A CN109345603B CN 109345603 B CN109345603 B CN 109345603B CN 201811151551 A CN201811151551 A CN 201811151551A CN 109345603 B CN109345603 B CN 109345603B
Authority
CN
China
Prior art keywords
light
image
processed
light emitting
emitting points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811151551.2A
Other languages
Chinese (zh)
Other versions
CN109345603A (en
Inventor
谢炜
李莉勤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201811151551.2A priority Critical patent/CN109345603B/en
Publication of CN109345603A publication Critical patent/CN109345603A/en
Application granted granted Critical
Publication of CN109345603B publication Critical patent/CN109345603B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

The application relates to an image processing method and device, an electronic device and a computer readable storage medium. The method comprises the following steps: acquiring an image to be processed; controlling the light emitting points of the light sources to emit light according to a preset light emitting rule, and generating and obtaining light effect materials corresponding to the light emitting points of the light sources respectively; and carrying out image processing on the image to be processed based on the light effect material. Carry out the light-emitting according to the light-emitting rule of predetermineeing through controlling each light source light-emitting point, richen the light efficiency material that carries out image processing, improved image processing's effect, reinforcing user uses the stickness.

Description

Image processing method and device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to an image processing method, an image processing apparatus, an electronic device, and a computer-readable storage medium.
Background
After a user shoots an image through shooting equipment, the image is often processed correspondingly, so that the image is more in line with the requirements of the user. Currently, the electronic device can select a required shooting mode during shooting to process a shot image. However, the conventional processing of the acquired image is relatively simple.
Disclosure of Invention
The embodiment of the application provides an image processing method and device, electronic equipment and a computer readable storage medium, which can enrich image processing modes and increase the diversity of image processing.
A method of image processing, the method comprising:
acquiring an image to be processed;
controlling the light emitting points of the light sources to emit light according to a preset light emitting rule, and generating and obtaining light effect materials corresponding to the light emitting points of the light sources respectively;
and carrying out image processing on the image to be processed based on the light effect material.
An image processing apparatus, the apparatus comprising:
the image acquisition module is used for acquiring an image to be processed;
the material generation module is used for controlling the light emitting points of the light sources to emit light according to a preset light emitting rule and generating and obtaining light effect materials corresponding to the light emitting points of the light sources;
and the image processing module is used for carrying out image processing on the image to be processed based on the light effect material.
An electronic device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring an image to be processed;
controlling the light emitting points of the light sources to emit light according to a preset light emitting rule, and generating and obtaining light effect materials corresponding to the light emitting points of the light sources respectively;
and carrying out image processing on the image to be processed based on the light effect material.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring an image to be processed;
controlling the light emitting points of the light sources to emit light according to a preset light emitting rule, and generating and obtaining light effect materials corresponding to the light emitting points of the light sources respectively;
and carrying out image processing on the image to be processed based on the light effect material.
According to the image processing method and device, the electronic equipment and the computer readable storage medium, the image to be processed is obtained, then the light emitting points of the light sources are controlled to emit light according to the preset light emitting rule, the light effect materials corresponding to the light emitting points of the light sources are generated and obtained, and the image to be processed is processed based on the light effect materials of the light emitting points of the light sources. When the images to be processed are processed, the images to be processed are processed by utilizing the light effect materials with different colors and different directions, the image processing mode is enriched, the diversity of image processing is increased, the personalized requirements are met, and the viscosity of a user is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of an exemplary embodiment of an image processing method;
FIG. 2 is a flow diagram of a method of image processing in one embodiment;
FIG. 3 is a flow chart of steps for obtaining light effect material in one embodiment;
FIG. 4 is a schematic flow chart illustrating the steps of obtaining lighting effect material by emitting light from the light emitting points of the light sources according to one embodiment;
FIG. 5 is a schematic diagram of an interface of an electronic device in one embodiment;
FIG. 6 is a schematic diagram of an interface of an electronic device in another embodiment;
FIG. 7 is a block diagram showing the configuration of an image processing apparatus according to an embodiment;
FIG. 8 is a block diagram showing the structure of an electronic apparatus according to an embodiment;
fig. 9 is a schematic diagram of an internal structure of an electronic device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Fig. 1 is a schematic diagram of an application environment of an image processing method in an embodiment. As shown in fig. 1, the application environment includes an electronic device 100. When the electronic device 100 acquires the image to be processed, the light emitting points of the light sources arranged in the electronic device 100 are controlled to emit light according to preset light emitting rules so as to generate and obtain corresponding light effect materials, and then the electronic device 100 superposes the light effect materials on the image to be processed so as to complete corresponding image processing.
FIG. 2 is a flow diagram of a method of image processing in one embodiment. The image processing method in this embodiment is described by taking the electronic device in fig. 1 as an example. As shown in fig. 2, the image processing method includes steps 202 to 206.
Step 202, acquiring an image to be processed.
The image to be processed is an image currently processed by the electronic device, and may be an existing image acquired locally or in a cloud according to a selection instruction of a user, or an image previewed by the user by using an image acquisition device of the electronic device.
When the corresponding image needs to be processed, the image acquisition instruction of the electronic equipment is triggered, so that the related electronic equipment acquires the image to be processed. The image obtaining instruction may be that a user starts an image collecting function of the electronic device to obtain an image, for example, starts shooting of the electronic device, or may be that the user locally obtains a corresponding image at a cloud and processes the image to be processed to perform a corresponding operation when viewing the image, which is not particularly limited.
And 204, controlling the light emitting points of the light sources to emit light according to a preset rule, and generating and obtaining light effect materials corresponding to the light emitting points of the light sources.
The light source light-emitting point is a light source point which is arranged in the electronic equipment and is used for emitting single-color light.
When an image to be processed is obtained, image processing needs to be performed on the image to be processed, so that light emitting materials for performing image processing on the image to be processed need to be obtained at first, light emitting is completed by controlling light emitting points of light sources arranged in the electronic equipment according to corresponding rules, and light emitting materials corresponding to the light emitting points of the light sources are generated and obtained. In general, light effect materials obtained by different light emitting rules are different, and when an image to be processed is obtained, light emitting points of a light source are controlled to emit light according to relevant features of the image to be processed so as to obtain a corresponding light effect material, wherein the relevant features of the image to be processed include brightness information of the image to be processed or environment information of the image to be processed. The obtained light effect materials corresponding to the light source points can be used for processing the image to be processed independently, and can also be an integral light effect material obtained according to the light effect materials of the light source points, so that the image to be processed is processed based on the integral light effect material.
In addition, the light source light emitting points are arranged inside the electronic device, specifically, the light source light emitting points are arranged around the image to be processed, and the positions of the light source light emitting points are fixed. And the light emitting points of the light sources are controlled to emit light according to the light effect material generation rule determined by the obtained image to be processed and the light emitting points of the light sources are controlled according to the light effect material generation rule and the corresponding light emitting rule.
And step 206, performing image processing on the image to be processed based on the light effect material.
And after the electronic equipment obtains the light effect materials of the light emitting points of the light sources, carrying out image processing on the image to be processed according to the light effect materials. When the light emitting points of the light sources are controlled to emit light to obtain the light effect materials for processing the image to be processed, the light effect materials are superposed on the image to be processed, namely, the image to be processed is processed, and the processed image is output after the light effect materials of the image to be processed are superposed.
In the image processing method in this embodiment, when the electronic device obtains an image to be processed, each light source point is controlled to emit light according to a preset light emission rule, so as to generate and obtain light effect materials corresponding to the light emission points of each light source, and then the image to be processed is processed according to the obtained light effect materials. When the image to be processed is processed, the corresponding light effect material is obtained based on different types of light, so that the processing mode of the image to be processed is enriched, the diversity of image processing is enriched, and the viscosity of a user is improved.
In one embodiment, before controlling the light emitting points of the light sources to emit light in a reverse direction according to a preset rule and generating and obtaining the light effect materials corresponding to the light emitting points of the light sources, the method further includes:
the method comprises the steps of obtaining brightness information of an image to be processed or obtaining environment information of the image to be processed, and obtaining a corresponding light effect material generation rule based on the brightness information or the environment information.
When an image to be processed is obtained and needs to be processed, firstly, a current corresponding light effect material generation rule is determined according to brightness information of the image to be processed, and specifically, the current corresponding light effect material generation rule can be inquired and matched in a preset corresponding relation list. In the practical application process, when the image to be processed is obtained, due to the difference of the characteristic properties of the image to be processed, the obtained light effect materials are different when the image to be processed is processed. The characteristic properties of the images acquired under different environmental scenes are different, for example, because the brightness information of the obtained image to be processed is different due to different environmental brightness, the brightness characteristic of the obtained image will be stronger in an environment with stronger brightness, and the brightness characteristic of the obtained image will be weaker in an environment with weaker brightness.
In addition, if the to-be-processed image is obtained by shooting with a point-to-point device by a user, after the to-be-processed image is acquired by the user with an image acquisition device (camera) of the electronic device and is processed, it is first necessary to determine the characteristics of the light effect material to be processed, such as the brightness value of the light effect material or other characteristic parameters such as saturation, according to the brightness information of the environment. The light inlet quantity of the current environment is obtained through the electronic equipment, the brightness value of the current environment is further determined, and then the brightness value is inquired in the corresponding relation list so as to determine the brightness information when the light emitting points of the light sources emit light.
It should be noted that when the corresponding light effect material generation rule is obtained according to the brightness information of the image to be processed, the light effect material generation rule corresponding to the brightness values of different sections is stored in the corresponding relationship list, and then a more appropriate light effect material generation rule can be effectively determined according to actual scene requirements, so as to obtain a more appropriate light effect material.
Optionally, in an embodiment, as shown in fig. 3, in step 204, the step of controlling the light emitting points of the light sources to emit light according to a preset light emitting rule, and generating and obtaining the corresponding light effect material includes:
and 302, determining light emitting brightness values corresponding to the light emitting points of the light sources based on the light effect material generation rule.
The light-emitting brightness value is the brightness of light when the light-emitting point of the light source emits light.
After the electronic equipment obtains the corresponding light effect material generation rule according to the image to be processed, the light emitting brightness value corresponding to the light emitting point of each light source is determined according to the light effect material generation rule.
In practical application, the light effect materials corresponding to different brightness information of the image to be processed have different relevant characteristics, if the image to be processed is obtained in an environment with stronger brightness, the brightness information of the image to be processed is stronger, and if the brightness value of the light effect material to be processed is lower when the image to be processed is processed, then after the light effect materials are superimposed, the situation that the effect is not obvious or no processing effect exists may exist, that is, a light effect material with a brightness value matched with the brightness value of the image to be processed is needed to process the image to be processed. In addition, besides determining the brightness value of the emitted light, the saturation value of the emitted light can be determined, so that the emitted light can be more suitable for current image processing.
And 304, controlling the light emitting points of the light sources to emit light according to the light emitting brightness values based on a preset light emitting rule to obtain corresponding light effect materials.
After the light emitting characteristics of the light emitting points of the light sources, namely the brightness values of the emitted light rays, are obtained, the light emitting points of the light sources are controlled according to the preset light emitting rules to emit light according to the light emitting rules, and then the corresponding light effect materials are obtained. The electronic equipment is provided with a plurality of light emitting points, the finally obtained light effect materials for processing the image to be processed are the synthesis of the light effect materials corresponding to the light emitting points of the light sources respectively, the light effect materials emitted by the light emitting points of different light sources are different, the light effect materials corresponding to the light emitting points of the light sources are synthesized including the difference of colors and the difference of directions, and the light effect materials containing various colors are obtained.
In this embodiment, after the brightness information of the image to be processed or the environment information of the image to be processed is obtained, the corresponding light effect material generation rule is obtained according to the brightness information or the environment information, and then, according to the preset light emitting rule of the light emitting point of each light source, the light emitting point of each light source is controlled according to the light effect material generation rule to emit light, so as to obtain light effect materials corresponding to the light emitting point of each light source, and then, the obtained light effect materials are synthesized, so as to obtain the light effect material for processing the image to be processed. The obtaining rule of the light effect material is determined according to the characteristic information of the image to be processed or the environment information of the image to be processed, so that the obtained light effect material can better meet the actual requirement of the image to be processed, and the obtained image processing result is more appropriate and better in effect.
In an embodiment, as shown in fig. 4, step 304, based on a preset light-emitting rule, controlling the light-emitting points of the light sources to emit light according to the light-emitting characteristics, so as to obtain corresponding light-effect materials, includes:
step 402, acquiring a target area of an image to be processed.
And step 404, determining the light emitting directions respectively corresponding to the light emitting points of the light sources based on the target area and the position information respectively corresponding to the light emitting points of the light sources.
And 406, controlling the light emitting points of the light sources to emit light according to the corresponding light emitting directions to obtain light effect materials corresponding to the light emitting points of the light sources.
The position information is the position of a light emitting point of the light source in the electronic equipment; when the portrait exists in the image to be processed, setting the area where the portrait is located as a target area, and when the portrait does not exist in the image to be processed, setting the area occupied by the position where the focus of the image to be processed is located as the target area; the light emitting direction is the direction in which the light emitting point of the light source emits light, and the light emitting direction of each light emitting point of the light source is different.
The method comprises the steps of obtaining a target area in an image to be processed, wherein the target area can be determined automatically by electronic equipment or determined through corresponding operation of a user, after the target area of the image to be processed is determined, determining light emitting directions respectively corresponding to light emitting points of light sources during light emitting according to position information respectively corresponding to the light emitting points of the light sources, finally controlling the light emitting points of the light sources to emit light according to the corresponding light emitting directions to obtain light effect materials respectively corresponding to the light emitting points of the light sources, and further synthesizing the light effect materials to obtain the light effect materials for processing the image to be processed.
It should be noted that, except for synthesizing the light effect materials to obtain the whole light effect materials for processing the image to be processed, the light effect materials may not be synthesized, but each light effect material is used to process the image to be processed at the same time. In addition, the positions corresponding to the light emitting points of the light sources are preset in the electronic equipment, and the position information corresponding to the light emitting points of the light sources can be accurately known when the to-be-processed image is obtained.
Optionally, acquiring a target region of an image to be processed includes: when a portrait exists in the image to be processed, taking the area where the portrait is located as a target area; or when no portrait exists in the image to be processed, acquiring a focus of the image to be processed, and taking the focus as a central point to obtain a corresponding area as a target area.
When a target area of an image to be processed is obtained, firstly, a portrait of the image to be processed is obtained, and whether the portrait is contained in the image to be processed is determined by identifying the characteristics of the portrait. Taking the image to be processed as an example, which is acquired by the image acquisition device of the electronic equipment, the image is taken, when a user needs to process an image obtained by photographing, whether a portrait exists in the acquired image is determined firstly, when the portrait is present, the region where the portrait is located is set as the target region, as shown in fig. 5, in which the portrait is present, so region a is set as the target region, when no portrait exists, a corresponding area is obtained by taking the focus as the center of a circle as a target area when the photo is taken, or the user determines the focus position through touch operation, and then obtains a corresponding area with the focus as the center of a circle as a target area, it should be noted that, when there is no portrait in the image to be processed, when the target area is determined according to the focus, the setting of the radius of the target area is not limited as long as the focus is included. As shown in fig. 6, at this time, there is no portrait in the image to be processed, but a partial scene graph, at this time, if the electronic device performs auto-focusing, an area where a focus corresponding to the auto-focusing is located is set as a target area, such as an area a in fig. 6, and when the user performs manual focusing, an area where the focus obtained by the user performs focusing is set as a target area, such as an area B in fig. 6.
After the target area is obtained, the position of the central point of the target area is determined, and then the light emitting directions corresponding to the light emitting points of the light sources are determined. When no portrait exists in the image to be processed, namely when the area where the focus is located is directly taken as a target area, the actual light emitting direction of each light source light emitting point is directly determined according to the position of each light source light emitting point and the position of the focus; for the condition that a portrait exists in an image to be processed, the position of a central point of a portrait area is obtained first, and then the light emitting direction of each light source light emitting point is determined according to the position of the central point.
In practical applications, the number of light emitting points of the light source disposed in the electronic device depends on the actual situation of the electronic device, and the setting of the position can determine a more suitable position according to the actual experimental result. Assuming that the number of the set light emitting points of the light sources is 4, and the specific positions are set as shown in fig. 5 and fig. 6, that is, a, b, c, and d are positions where the light emitting points of the light sources are located, when there is a portrait in the image to be processed, the position of the central point of the portrait area is determined first, as shown by the point X in fig. 5, at this time, X is the position of the central point of the portrait area, and then the light emitting directions of the light emitted from the four light sources are aX, bX, cX, and dX, respectively. When no portrait image exists in the image to be processed, the light outgoing direction is as shown in fig. 6, and if the focal position is a, the light outgoing directions are aA, bA, cA, and dA, respectively; if the focal position is B, the light-emitting directions are aB, bB, cB and dB, respectively. It should be noted that, the setting of the positions and the number of the light emitting points of the light source in the electronic device is not limited, and the more suitable number and the more suitable positions may be determined according to actual experimental results.
After the light emitting directions respectively corresponding to the light emitting points of the light sources are obtained according to the positions of the light emitting points of the light sources and the target area, the light emitting points of the light sources are controlled to emit light, light effect materials respectively corresponding to the light emitting points of the light sources are obtained, and the combination of all the light effect materials is the light effect material for performing image processing on the image to be processed.
Optionally, when the light effect materials are superimposed to complete the light effect processing of the image to be processed, if there is a portrait in the image to be processed, the image area may be subjected to soft light processing, and the image after the soft light processing is completed is output. When the soft light processing is carried out, firstly, an image obtained by image processing is backed up; then, carrying out Gaussian blur on the image according to the corresponding radius; then, continuously adjusting the brightness and the contrast of the blurred image; and finally, mixing the backup data with the image obtained by adjustment according to a Photoshop color filtering mode. By performing soft light processing on the portrait area in the processed image, the processed image can be better optimized, so that the image processing effect is better.
Optionally, after the processing of the image to be processed is completed according to the light effect material, that is, after the superimposition of the light effect material is completed, the corresponding processed image is output. In practical application, by setting a corresponding control program, when image processing is required, the corresponding control program is triggered to complete the image processing of the image to be processed. When the electronic equipment processes the image to be processed, if the image processing failure is detected, the original image of the image to be processed is subjected to data processing, and prompt information of the image processing failure is sent out. In general, a processing failure occurs only when a program for performing image processing is down, that is, the processing is stopped without completely running the program for performing image processing.
Optionally, when the image to be processed is processed based on the light effect material, the method includes: the method comprises the steps of obtaining light effect materials generated by light emitting points of light sources, superposing the light effect materials to obtain an integral light effect material, and superposing the integral light effect material on an image to be processed; or, the light effect materials corresponding to the light source points are sequentially superposed on the image to be processed according to the material superposition sequence of the light effect materials corresponding to the light emitting points of the light sources.
And after the light emitting points of the light sources are controlled to emit light according to a preset light emitting rule so as to generate light effect materials respectively corresponding to the light emitting points of the light sources, image processing is carried out on the image to be processed according to the light effect materials. Specifically, after the light effect materials corresponding to the light emitting points of the light sources are obtained, image processing may be performed according to the sequence set for the light emitting points of the light sources. A certain sequence exists among the light emitting points of the light sources, and the light effect materials generated by the light emitting points of the light sources are sequentially superposed on the image to be processed so as to finish the light effect processing of the image to be processed. Except that a certain sequence exists among the light emitting points of the light sources, the situation that partial light emitting points of the light sources are at the same moment can also exist, if a plurality of light effect materials need to be superposed on an image to be processed at the same time, the superposition modes are the same, and a plurality of light effect materials which need to be superposed at the same time are used as an independent superposition process so as to be superposed at the same time.
In addition, except that the light effect materials are independently superposed on the image to be processed, the light effect materials corresponding to the light emitting points of the light sources can be superposed to obtain the whole light effect materials, and finally the obtained whole light effect materials are superposed on the image to be processed.
Optionally, in an embodiment of the image processing method in this embodiment, when a user obtains an image to be processed through a corresponding operation, first obtaining brightness information of the image to be processed or obtaining environment brightness information of the image to be processed to determine light brightness information when light emitting points of light sources arranged inside an electronic device emit light, where the light emitting points of the light sources are arranged at positions around the image to be processed and can emit light from different directions, then determining light emitting directions of the light emitting points of the light sources according to portrait positions or focus positions in the image to be processed, further controlling the light emitting points of the light sources to emit light to generate light effect materials corresponding to the light emitting points of the light sources, finally superimposing the obtained light effect materials on the image to be processed to complete color processing of the image to be processed, and when the image to be processed is processed according to the light effect materials, the luminous efficiency materials generated by the light emitting points of the light sources can be obtained, the luminous efficiency materials are overlapped to obtain the whole luminous efficiency materials, then the whole luminous efficiency materials are overlapped to the image to be processed, and the luminous efficiency materials corresponding to the light emitting points of the light sources can be overlapped to the image to be processed in sequence according to the material overlapping sequence of the luminous efficiency materials corresponding to the light emitting points of the light sources. The lighting effect materials with different colors and different directions are utilized to process the image to be processed when the image to be processed is processed, the diversity of image processing is enriched, and the use viscosity of a user is improved.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
Fig. 7 is a block diagram of an image processing apparatus according to an embodiment. As shown in fig. 7, the apparatus includes: an image acquisition module 702, a material generation module 704, and an image processing module 706, wherein:
an image obtaining module 702, configured to obtain an image to be processed;
the material generation module 704 is configured to control the light emitting points of the light sources to emit light according to a preset light emitting rule, and generate light effect materials corresponding to the light emitting points of the light sources;
and the image processing module 706 is configured to perform image processing on the image to be processed based on the light effect material.
In one embodiment, an image processing apparatus is provided that further includes a rule determination module. The rule determining module is used for acquiring brightness information of the image to be processed or acquiring environment information of the image to be processed, and acquiring a corresponding light effect material generating rule based on the brightness information or the environment information.
In one embodiment, a material generation module is provided that includes a light-out characteristic determination unit and a material generation unit. The material characteristic acquisition module is used for determining light emitting brightness values corresponding to the light emitting points of the light sources based on the light effect material generation rule; the material light-emitting module is used for controlling the light-emitting points of the light sources to emit light according to the light-emitting brightness values based on preset light-emitting rules, and light effect materials corresponding to the light-emitting points of the light sources are obtained.
In one embodiment, a material light-emitting module is provided, which includes a position determining unit, a direction determining unit, and a material generating unit. The position determining unit is used for acquiring a target area of an image to be processed; the direction determining unit is used for determining the light emitting directions respectively corresponding to the light emitting points of the light sources based on the target area and the position information respectively corresponding to the light emitting points of the light sources; the material generation unit is used for controlling the light emitting points of the light sources to emit light according to the corresponding light emitting directions, and light effect materials corresponding to the light emitting points of the light sources are obtained.
In one embodiment, a position determination unit is provided for setting an area where a portrait is located as a target area when it is determined that the portrait exists in an image to be processed; or when the fact that the portrait does not exist in the image to be processed is determined, the focus of the image to be processed is obtained, and the corresponding area is obtained by taking the focus as a central point and is used as a target area.
In an embodiment, the provided direction determining unit is further configured to, when it is determined that a portrait exists in the image to be processed, obtain a central point of the target area, and determine, according to the position information and the central point, light emitting directions respectively corresponding to the light emitting points of the light sources; or when the human image does not exist in the image to be processed, determining the light emitting directions respectively corresponding to the light emitting points of the light sources according to the focal point and the position information.
In one embodiment, the provided image processing module is further configured to obtain light effect materials generated by light emitting points of the light sources, superimpose the light effect materials to obtain an overall light effect material, and superimpose the overall light effect material on the image to be processed; or, according to the light emitting sequence corresponding to the light emitting points of the light sources, the light effect materials corresponding to the light emitting points of the light sources are sequentially superposed on the image to be processed.
In one embodiment, an image processing apparatus is provided that further includes a soft light processing module. The soft light processing module is used for performing soft light processing on the region where the portrait is located when the portrait exists in the image to be processed.
The division of the modules in the image processing apparatus is only for illustration, and in other embodiments, the image processing apparatus may be divided into different modules as needed to complete all or part of the functions of the image processing apparatus.
For specific limitations of the image processing apparatus, reference may be made to the above limitations of the image processing method, which are not described herein again. The respective modules in the image processing apparatus described above may be wholly or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
Fig. 8 is a schematic diagram of an internal structure of an electronic device in one embodiment. As shown in fig. 8, the electronic device includes a processor and a memory connected by a system bus. Wherein, the processor is used for providing calculation and control capability and supporting the operation of the whole electronic equipment. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by a processor to implement an image processing method provided in the following embodiments. The internal memory provides a cached execution environment for the operating system computer programs in the non-volatile storage medium. The electronic device may be a mobile phone, a tablet computer, or a personal digital assistant or a wearable device, etc.
The implementation of each module in the image processing apparatus provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. The program modules constituted by the computer program may be stored on the memory of the terminal or the server. Which when executed by a processor, performs the steps of the method described in the embodiments of the present application.
The embodiment of the application also provides the electronic equipment. The electronic device includes therein an Image Processing circuit, which may be implemented using hardware and/or software components, and may include various Processing units defining an ISP (Image Signal Processing) pipeline. FIG. 9 is a schematic diagram of an image processing circuit in one embodiment. As shown in fig. 9, for convenience of explanation, only aspects of the image processing technique related to the embodiments of the present application are shown.
As shown in fig. 9, the image processing circuit includes an ISP processor 940 and a control logic 950. The image data captured by the imaging device 910 is first processed by the ISP processor 940, and the ISP processor 940 analyzes the image data to capture image statistics that may be used to determine and/or control one or more parameters of the imaging device 910. The imaging device 910 may include a camera having one or more lenses 912 and an image sensor 914. Image sensor 914 may include an array of color filters (e.g., Bayer filters), and image sensor 914 may acquire light intensity and wavelength information captured with each imaging pixel of image sensor 914 and provide a set of raw image data that may be processed by ISP processor 940. The sensor 920 (e.g., a gyroscope) may provide parameters of the acquired image processing (e.g., anti-shake parameters) to the ISP processor 940 based on the type of interface of the sensor 920. The sensor 920 interface may utilize an SMIA (Standard Mobile Imaging Architecture) interface, other serial or parallel camera interfaces, or a combination of the above.
In addition, image sensor 914 may also send raw image data to sensor 920, sensor 920 may provide raw image data to ISP processor 940 based on the type of interface of sensor 920, or sensor 920 may store raw image data in image memory 930.
The ISP processor 940 processes the raw image data pixel by pixel in a variety of formats. For example, each image pixel may have a bit depth of 8, 10, 12, or 14 bits, and the ISP processor 940 may perform one or more image processing operations on the raw image data, collecting statistical information about the image data. Wherein the image processing operations may be performed with the same or different bit depth precision.
ISP processor 940 may also receive image data from image memory 930. For example, the sensor 920 interface sends raw image data to the image memory 930, and the raw image data in the image memory 930 is then provided to the ISP processor 940 for processing. The image Memory 930 may be a part of a Memory device, a storage device, or a separate dedicated Memory within an electronic device, and may include a DMA (Direct Memory Access) feature.
Upon receiving raw image data from image sensor 914 interface or from sensor 920 interface or from image memory 930, ISP processor 940 may perform one or more image processing operations, such as temporal filtering. The processed image data may be sent to image memory 930 for additional processing before being displayed. ISP processor 940 receives processed data from image memory 930 and performs image data processing on the processed data in the raw domain and in the RGB and YCbCr color spaces. The image data processed by ISP processor 940 may be output to display 970 for viewing by a user and/or further processed by a Graphics Processing Unit (GPU). Further, the output of ISP processor 940 may also be sent to image memory 930 and display 970 may read image data from image memory 930. In one embodiment, image memory 930 may be configured to implement one or more frame buffers. In addition, the output of the ISP processor 940 may be transmitted to an encoder/decoder 960 for encoding/decoding the image data. The encoded image data may be saved and decompressed before being displayed on a display 970 device. The encoder/decoder 960 may be implemented by a CPU or GPU or coprocessor.
The statistical data determined by the ISP processor 940 may be transmitted to the control logic 950 unit. For example, the statistical data may include image sensor 914 statistics such as auto-exposure, auto-white balance, auto-focus, flicker detection, black level compensation, lens 912 shading correction, and the like. The control logic 950 may include a processor and/or microcontroller that executes one or more routines (e.g., firmware) that may determine control parameters of the imaging device 910 and control parameters of the ISP processor 940 based on the received statistical data. For example, the control parameters of imaging device 910 may include sensor 920 control parameters (e.g., gain, integration time for exposure control, anti-shake parameters, etc.), camera flash control parameters, lens 912 control parameters (e.g., focal length for focusing or zooming), or a combination of these parameters. The ISP control parameters may include gain levels and color correction matrices for automatic white balance and color adjustment (e.g., during RGB processing), as well as lens 912 shading correction parameters.
The following steps are performed to implement the image processing method using the image processing technique of fig. 9.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of the image processing method.
A computer program product comprising instructions which, when run on a computer, cause the computer to perform an image processing method.
Any reference to memory, storage, database, or other medium used herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (14)

1. An image processing method, characterized in that the method comprises:
acquiring an image to be processed;
acquiring brightness information of the image to be processed or acquiring environment information of the image to be processed, and acquiring a corresponding light effect material generation rule based on the brightness information or the environment information;
determining light emitting brightness values corresponding to the light emitting points of the light sources based on the light effect material generation rule; the light source light-emitting point is a light source point which is arranged in the electronic equipment and is used for emitting single-color light; the light-emitting brightness value is the brightness of light when the light-emitting point of the light source emits light;
based on a preset light emitting rule, controlling the light emitting points of the light sources to emit light according to the light emitting brightness values to obtain light effect materials corresponding to the light emitting points of the light sources respectively;
and carrying out image processing on the image to be processed based on the light effect material.
2. The method according to claim 1, wherein the controlling the light-emitting points of the light sources to emit light according to the light-emitting brightness values based on preset light-emitting rules to obtain light effect materials corresponding to the light-emitting points of the light sources respectively comprises:
acquiring a target area of the image to be processed;
determining the light emitting directions respectively corresponding to the light emitting points of the light sources based on the target area and the position information respectively corresponding to the light emitting points of the light sources;
and controlling the light emitting points of the light sources to emit light according to the corresponding light emitting directions to obtain light effect materials corresponding to the light emitting points of the light sources respectively.
3. The method according to claim 2, wherein the acquiring the target area of the image to be processed comprises:
when determining that a portrait exists in the image to be processed, taking the area where the portrait is located as the target area; or the like, or, alternatively,
and when it is determined that no portrait exists in the image to be processed, acquiring a focus of the image to be processed, and taking the focus as a central point to obtain a corresponding area as the target area.
4. The method of claim 3, wherein determining the light-emitting directions respectively corresponding to the light-emitting points of the light sources based on the target area and the position information respectively corresponding to the light-emitting points of the light sources comprises:
when it is determined that a portrait exists in the image to be processed, acquiring a central point of the target area, and determining light emitting directions respectively corresponding to the light emitting points of the light sources according to the position information and the central point; or the like, or, alternatively,
and when it is determined that the portrait does not exist in the image to be processed, determining the light emitting directions respectively corresponding to the light emitting points of the light sources according to the focal point and the position information.
5. The method according to any one of claims 1-4, wherein the image processing of the image to be processed based on the light effect material comprises:
obtaining light effect materials generated by the light emitting points of the light sources, overlapping the light effect materials to obtain an integral light effect material, and overlapping the integral light effect material to the image to be processed; or the like, or, alternatively,
and according to the material stacking sequence of the light effect materials corresponding to the light emitting points of the light sources, sequentially stacking the light effect materials corresponding to the light source points on the image to be processed.
6. The method according to claim 5, wherein the image processing of the image to be processed based on the light effect material further comprises:
and when the portrait exists in the image to be processed, performing soft light processing on the region where the portrait is located.
7. An image processing apparatus characterized by comprising:
the image acquisition module is used for acquiring an image to be processed;
the rule determining module is used for acquiring brightness information of the image to be processed or acquiring environment information of the image to be processed, and acquiring a corresponding light effect material generating rule based on the brightness information or the environment information;
the material generation module is used for determining light emitting brightness values corresponding to the light emitting points of the light sources based on the light effect material generation rules; based on a preset light emitting rule, controlling the light emitting points of the light sources to emit light according to the light emitting brightness values to obtain light effect materials corresponding to the light emitting points of the light sources respectively; the light source light-emitting point is a light source point which is arranged in the electronic equipment and is used for emitting single-color light; the light-emitting brightness value is the brightness of light when the light-emitting point of the light source emits light;
and the image processing module is used for carrying out image processing on the image to be processed based on the light effect material.
8. The apparatus of claim 7, wherein the material light-emitting module comprises a position determining unit, a direction determining unit and a material generating unit;
the position determining unit is used for acquiring a target area of the image to be processed;
the direction determining unit is configured to determine light emitting directions respectively corresponding to the light emitting points of the light sources based on the target area and the position information respectively corresponding to the light emitting points of the light sources;
and the material generation unit is used for controlling the light emitting points of the light sources to emit light according to the corresponding light emitting directions to obtain light effect materials corresponding to the light emitting points of the light sources.
9. The apparatus of claim 8,
the position determining unit is further used for taking the region where the portrait is located as the target region when the portrait is determined to exist in the image to be processed; or when it is determined that no portrait exists in the image to be processed, acquiring a focus of the image to be processed, and taking the focus as a central point to obtain a corresponding area as the target area.
10. The apparatus of claim 9,
the direction determining unit is further configured to, when it is determined that a portrait exists in the image to be processed, obtain a central point of the target area, and determine light emitting directions respectively corresponding to the light emitting points of the light sources according to the position information and the central point; or when it is determined that the portrait does not exist in the image to be processed, determining the light emitting directions respectively corresponding to the light emitting points of the light sources according to the focal point and the position information.
11. The apparatus according to any one of claims 7 to 10,
the image processing module is further used for obtaining light effect materials generated by the light emitting points of the light sources, overlapping the light effect materials to obtain an integral light effect material, and further overlapping the integral light effect material on the image to be processed; or, according to the material stacking sequence of the light effect materials corresponding to the light emitting points of the light sources, sequentially stacking the light effect materials corresponding to the light source points to the image to be processed.
12. The apparatus of claim 11, further comprising:
and the soft light processing module is used for performing soft light processing on the region where the portrait is located when the portrait exists in the image to be processed.
13. An electronic device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of the image processing method according to any one of claims 1 to 6.
14. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN201811151551.2A 2018-09-29 2018-09-29 Image processing method and device, electronic equipment and computer readable storage medium Active CN109345603B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811151551.2A CN109345603B (en) 2018-09-29 2018-09-29 Image processing method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811151551.2A CN109345603B (en) 2018-09-29 2018-09-29 Image processing method and device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109345603A CN109345603A (en) 2019-02-15
CN109345603B true CN109345603B (en) 2021-08-31

Family

ID=65308130

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811151551.2A Active CN109345603B (en) 2018-09-29 2018-09-29 Image processing method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109345603B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0785458A1 (en) * 1995-08-01 1997-07-23 Nitto Jushi Kogyo Kabushiki Kaisha Surface light source and liquid crystal display
WO2007046625A1 (en) * 2005-10-19 2007-04-26 Jeong-Soon Kim Light guide plate
CN102998836A (en) * 2011-09-16 2013-03-27 三菱电机株式会社 Multiple view liquid crystal display
CN108227355A (en) * 2016-12-15 2018-06-29 深圳市光峰光电技术有限公司 Light-source system and projection arrangement
EP3364565A1 (en) * 2017-02-17 2018-08-22 Rtone Methods for visible-light communication

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016057338A (en) * 2014-09-05 2016-04-21 株式会社ジャパンディスプレイ Display device and light source device
CN106296621B (en) * 2015-05-22 2019-08-23 腾讯科技(深圳)有限公司 Image processing method and device
DE112017006226T5 (en) * 2016-12-12 2019-09-05 Olympus Corporation Light source means
CN107862658B (en) * 2017-10-31 2020-09-22 Oppo广东移动通信有限公司 Image processing method, image processing device, computer-readable storage medium and electronic equipment
CN108419028B (en) * 2018-03-20 2020-07-17 Oppo广东移动通信有限公司 Image processing method, image processing device, computer-readable storage medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0785458A1 (en) * 1995-08-01 1997-07-23 Nitto Jushi Kogyo Kabushiki Kaisha Surface light source and liquid crystal display
WO2007046625A1 (en) * 2005-10-19 2007-04-26 Jeong-Soon Kim Light guide plate
CN102998836A (en) * 2011-09-16 2013-03-27 三菱电机株式会社 Multiple view liquid crystal display
CN108227355A (en) * 2016-12-15 2018-06-29 深圳市光峰光电技术有限公司 Light-source system and projection arrangement
EP3364565A1 (en) * 2017-02-17 2018-08-22 Rtone Methods for visible-light communication

Also Published As

Publication number Publication date
CN109345603A (en) 2019-02-15

Similar Documents

Publication Publication Date Title
CN107948519B (en) Image processing method, device and equipment
JP6911202B2 (en) Imaging control method and imaging device
KR102279436B1 (en) Image processing methods, devices and devices
CN109089047B (en) Method and device for controlling focusing, storage medium and electronic equipment
EP3609177B1 (en) Control method, control apparatus, imaging device, and electronic device
CN110572573B (en) Focusing method and device, electronic equipment and computer readable storage medium
CN109246354B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN108198152B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN107509044B (en) Image synthesis method, image synthesis device, computer-readable storage medium and computer equipment
CN108154514B (en) Image processing method, device and equipment
CN108024054B (en) Image processing method, device, equipment and storage medium
CN110213494B (en) Photographing method and device, electronic equipment and computer readable storage medium
JP6049343B2 (en) Image processing apparatus, image processing method, and program
CN107911682B (en) Image white balance processing method, device, storage medium and electronic equipment
CN107872631B (en) Image shooting method and device based on double cameras and mobile terminal
CN107948617B (en) Image processing method, image processing device, computer-readable storage medium and computer equipment
WO2012093519A1 (en) Imaging device and light emission amount control method
US11601600B2 (en) Control method and electronic device
JP2012235377A (en) Image processing apparatus, image processing method, and program
CN109040618A (en) Video generation method and device, storage medium, electronic equipment
CN110177212B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN109005343A (en) Control method, device, imaging device, electronic equipment and readable storage medium storing program for executing
CN110956679A (en) Image processing method and device, electronic equipment and computer readable storage medium
CN108513062B (en) Terminal control method and device, readable storage medium and computer equipment
CN108052883B (en) User photographing method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant