CN112543278B - Method and terminal for adjusting contrast - Google Patents

Method and terminal for adjusting contrast Download PDF

Info

Publication number
CN112543278B
CN112543278B CN201910892578.5A CN201910892578A CN112543278B CN 112543278 B CN112543278 B CN 112543278B CN 201910892578 A CN201910892578 A CN 201910892578A CN 112543278 B CN112543278 B CN 112543278B
Authority
CN
China
Prior art keywords
contrast
shooting scene
determining
view
brightness difference
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
CN201910892578.5A
Other languages
Chinese (zh)
Other versions
CN112543278A (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.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology Co 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 Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201910892578.5A priority Critical patent/CN112543278B/en
Publication of CN112543278A publication Critical patent/CN112543278A/en
Application granted granted Critical
Publication of CN112543278B publication Critical patent/CN112543278B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation

Abstract

The application discloses a method and a terminal for adjusting contrast, relates to the field of image processing, and aims to solve the problem that in the prior art, the effect of shot photos is not good due to the fact that the contrast of the shot photos in any scene is the same. The method comprises the following steps: responding to the photographing instruction, and determining the current photographing scene according to the preview frame; determining the contrast corresponding to the current shooting scene according to the preset corresponding relation between the shooting scene and the contrast; and adjusting the contrast of the shot picture according to the determined contrast. Before the photo is obtained, the scene of the photo is determined in the preview frame; and determining the contrast ratio used by the picture according to the preset corresponding relation. Therefore, the shot photos are adjusted according to the determined contrast, the picture effect of the photos can be improved, the user can also shoot the photos satisfying the user in the automatic mode, and the shooting experience of the user is improved.

Description

Method and terminal for adjusting contrast
Technical Field
The present application relates to the field of image processing, and in particular, to a method and a terminal for adjusting contrast.
Background
Along with the development of science and technology, intelligent terminal's the effect of shooing is better and better. However, since most users do not have professional knowledge of photographing, the automatic mode is generally used for photographing. In the automatic mode, when a user takes a picture in any scene, the contrast of the obtained picture is the same, so that the effect of the taken picture is not good.
Disclosure of Invention
The application provides a method and a terminal for adjusting contrast, which are used for solving the problem that in the prior art, the effect of shot photos is not good due to the fact that the contrast of the shot photos in any scene is the same.
In a first aspect, an embodiment of the present application provides a method for adjusting contrast, where the method includes:
responding to the photographing instruction, and determining the current photographing scene according to the preview frame;
determining the contrast corresponding to the current shooting scene according to the preset corresponding relation between the shooting scene and the contrast;
and adjusting the contrast of the shot picture according to the determined contrast.
Before a photo is obtained, firstly, determining a scene for shooting the photo in a preview frame; and determining the contrast ratio used by the picture according to the preset corresponding relation. Therefore, the shot photos are adjusted according to the determined contrast, the picture effect of the photos can be improved, the user can also shoot the photos satisfying the user in the automatic mode, and the shooting experience of the user is improved.
In a possible implementation manner, the determining a current shooting scene according to the preview frame includes:
determining appointed view and/or picture brightness difference data of the shot picture according to the preview frame;
and determining the current shooting scene according to the appointed framing and/or picture brightness difference data of the shot picture.
The method provides a mode for determining the shooting scene according to the preview frame. According to the method, the shooting scene is determined through the specified view finding and/or picture brightness difference data acquired from the preview frame, so that a plurality of different shooting scenes can be obtained according to the specified view finding and/or picture brightness difference data, and the shooting scene can be divided to more accurately determine which shooting scene the picture shot by a user belongs to, so that contrast adjustment is performed, and the picture effect of the picture in different shooting scenes is improved.
In one possible implementation, determining the designated view of the captured photograph according to the preview frame includes:
acquiring motor position information from the preview frame;
determining the appointed framing of the shot picture according to the motor position information;
determining picture brightness difference data of the shot picture according to the preview frame, wherein the picture brightness difference data comprises:
acquiring brightness distribution information from the preview frame;
and determining the picture brightness difference data of the shot picture according to the brightness distribution information.
The method provides a mode for determining the appointed view and the brightness difference data of the picture. In the method, a focus at the time of photographing is determined based on position information of a driving motor, thereby determining a designated framing; in this way, the designated framing for taking a picture can be accurately determined based on the motor position information. And according to the brightness distribution information in the preview frame, the brightness difference data of the picture can be accurately determined. In this way, the obtained data can be made more accurate.
In a possible implementation manner, the adjusting the contrast of the shot picture according to the determined contrast includes:
if the determined contrast is the unadjusted contrast, adjusting the determined contrast through RGB information acquired from the preview frame and a contrast adjustment algorithm to obtain the adjusted contrast; and/or adjusting the determined contrast according to an adjustment instruction of a user to obtain the adjusted contrast;
adjusting the contrast of the shot picture according to the adjusted contrast; or;
and if the determined contrast is the updated contrast, adjusting the contrast of the shot picture to be the updated contrast.
According to the method, the determined contrast is adjusted, so that the shot photo is more in line with the aesthetic sense of the user, and the shooting experience of the user is improved.
In a possible implementation manner, after the adjusting the contrast of the taken picture according to the adjusted contrast, the method further includes:
and updating the adjusted contrast ratio to the contrast ratio corresponding to the current shooting scene in the corresponding relation.
According to the method, the corresponding relation between the contrast and the shooting scene is updated, so that the obtained shot can better accord with the use habit of the user, fine adjustment on the contrast is not needed, and the time for displaying the picture is saved.
In a second aspect, an embodiment of the present application provides a terminal for adjusting contrast, including: a processor, a memory and a camera, wherein the memory stores program code that, when executed by the processor, causes the terminal to perform the following:
responding to the photographing instruction, and determining the current photographing scene according to the preview frame;
determining the contrast corresponding to the current shooting scene according to the preset corresponding relation between the shooting scene and the contrast;
and adjusting the contrast of the shot picture according to the determined contrast.
In one possible implementation, the processor is specifically configured to:
determining appointed view and/or picture brightness difference data of the shot picture according to the preview frame;
and determining the current shooting scene according to the appointed framing and/or picture brightness difference data of the shot picture.
In one possible implementation, the processor is specifically configured to:
acquiring motor position information from the preview frame;
determining the appointed framing of the shot picture according to the motor position information;
acquiring brightness distribution information from the preview frame;
and determining the picture brightness difference data of the shot picture according to the brightness distribution information.
In one possible implementation, the processor is specifically configured to:
if the determined contrast is the unadjusted contrast, adjusting the determined contrast through RGB information acquired from the preview frame and a contrast adjustment algorithm to obtain the adjusted contrast; and/or adjusting the determined contrast according to an adjustment instruction of a user to obtain the adjusted contrast;
adjusting the contrast of the shot picture according to the adjusted contrast; or;
and if the determined contrast is the updated contrast, adjusting the contrast of the shot picture to be the updated contrast.
In a possible implementation manner, the terminal further includes:
and updating the adjusted contrast ratio to the contrast ratio corresponding to the current shooting scene in the corresponding relationship.
In a third aspect, an embodiment of the present application further provides a terminal for adjusting contrast, where the terminal includes a response module, a contrast determination module, and an adjustment module:
the response module is used for responding to the photographing instruction and determining the current photographing scene according to the preview frame;
the contrast determining module is used for determining the contrast corresponding to the current shooting scene according to the preset corresponding relation between the shooting scene and the contrast;
and the adjusting module is used for adjusting the contrast of the shot picture according to the determined contrast.
In one possible implementation, the response module includes:
a parameter determining unit for determining specified framing and/or picture shading data of the shot picture according to the preview frame;
and the shot scene determining unit is used for determining the current shot scene according to the specified framing and/or picture shading data of the shot photo.
In one possible implementation, the determining the parameter unit includes:
a motor position determining subunit, configured to obtain motor position information from the preview frame;
a specified view finding subunit for determining a specified view finding of the shot picture according to the motor position information;
a brightness distribution information determining subunit, configured to obtain brightness distribution information from the preview frame;
and the image brightness difference data determining subunit is used for determining the image brightness difference data of the shot picture according to the brightness distribution information.
In one possible implementation, the adjusting module includes:
a first adjusting unit, configured to adjust the determined contrast by using RGB information obtained from the preview frame and a contrast adjustment algorithm if the determined contrast is an unadjusted contrast, so as to obtain an adjusted contrast; and/or adjusting the determined contrast according to an adjustment instruction of a user to obtain the adjusted contrast;
the second adjusting unit is used for adjusting the contrast of the shot picture according to the adjusted contrast;
and the third adjusting unit is used for adjusting the contrast of the shot picture to be the updated contrast if the determined contrast is the updated contrast.
In a possible implementation manner, the terminal further includes:
and the updating module is used for updating the contrast corresponding to the current shooting scene in the corresponding relation according to the adjusted contrast after the adjusting module adjusts the contrast of the shot picture according to the determined contrast.
In a fourth aspect, the present application also provides a computer storage medium having a computer program stored thereon, which when executed by a processor, performs the steps of the method of the first aspect.
In addition, for technical effects brought by any one implementation manner of the second aspect to the third aspect, reference may be made to technical effects brought by different implementation manners of the first aspect, and details are not described here.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic diagram illustrating a method for adjusting contrast according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a process of acquiring a current shooting scene according to an embodiment of the present disclosure;
FIG. 3 is a flowchart of a complete method for adjusting contrast according to an embodiment of the present application;
fig. 4 is a schematic diagram of a first terminal for adjusting contrast according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a second terminal for adjusting contrast according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of a third terminal for adjusting contrast according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Some of the words that appear in the text are explained below:
1. in the embodiment of the present application, the term "and/or" describes an association relationship of associated objects, and means that there may be three relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
2. The term "terminal" in the embodiments of the present application refers to a computer device that can be used in mobile, i.e., a mobile phone, a tablet, and the like.
3. The term "designate framing" in the embodiments of the present application means determining whether a shot picture is a distant view or a close view according to a focal point in the shot picture. Of course, the "specified view" is not limited to the long view and the short view, and the "specified view" may be divided according to the focus, which is not limited in the present application.
The application scenario described in the embodiment of the present application is for more clearly illustrating the technical solution of the embodiment of the present application, and does not form a limitation on the technical solution provided in the embodiment of the present application, and it can be known by a person skilled in the art that with the occurrence of a new application scenario, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems. In the description of the present application, the term "plurality" means two or more unless otherwise specified.
In order to better understand the technical solution provided by the embodiments of the present application, the following brief description is made on the basic principle of the solution:
at present, with the rapid development of science and technology, the hardware level of intelligent terminal photographing is also continuously improved, and the effect that the photo can present is better and better. However, most users do not have professional photographing knowledge, so the users do not use the professional mode when photographing, and only use the automatic mode to photograph. In the automatic mode, the contrast of any picture taken by the user is the same, so that some pictures taken are not good. In view of the above, the present application provides a method and a terminal for adjusting contrast, wherein before a picture is obtained, a scene in which the picture is taken is determined in a preview frame; and determining the contrast ratio used by the picture according to the preset corresponding relation. Therefore, the shot photos are adjusted according to the determined contrast, the picture effect of the photos can be improved, the user can also shoot the photos satisfying the user in the automatic mode, and the shooting experience of the user is improved.
In view of the above scenario, the following describes embodiments of the present application in further detail with reference to the drawings of the specification.
As shown in fig. 1, a method for adjusting contrast in an embodiment of the present application includes the following steps:
step 101: and responding to the photographing instruction, and determining the current photographing scene according to the preview frame.
Step 102: and determining the contrast corresponding to the current shooting scene according to the preset corresponding relation between the shooting scene and the contrast.
Step 103: and adjusting the contrast of the shot picture according to the determined contrast.
In the embodiment of the application, each shooting scene corresponds to one contrast, and when the shooting scene is determined, the contrast can be determined according to the corresponding relation stored in advance. For example: a total of 10 shooting scenes, namely a shooting scene 1, a shooting scene 2 and a shooting scene 3 … … are set; the 10 shooting scenes respectively correspond to 10 contrasts; such as: the contrast 10 corresponds to the shooting scene 1, the contrast 20 corresponds to the shooting scene 2, and the contrast 30 … … corresponds to the shooting scene 10 and the contrast 100 corresponds to the shooting scene 3. When it is determined that the current photographing scene is the photographing scene 5, contrast adjustment is performed on the current photographing scene using the contrast 50.
Therefore, the shot photos are adjusted according to the determined contrast, the picture effect of the photos can be improved, the user can also shoot the photos satisfying the user in the automatic mode, and the shooting experience of the user is improved.
The above describes how to determine the contrast ratio for a scene being photographed and to adjust the photographed picture using the determined contrast ratio, and how to acquire the photographed scene is further described below. As shown in fig. 2, a schematic flow diagram for acquiring a current shooting scene specifically includes the following steps:
step 201: and determining appointed framing and/or picture shading data of the shot picture according to the preview frame.
In the embodiment of the present application, the specified view may be determined from the preview frame, the screen shading data may also be determined from the preview frame, and the specified view and the screen shading data may also be determined from the preview frame.
Step 202: and determining the current shooting scene according to the appointed framing and/or picture brightness difference data of the shot picture.
In the embodiment of the application, the shooting scene can be determined according to the specified framing, and can also be determined according to the brightness difference data of the picture; if the determined shooting scene is more accurate, the shooting scene can be determined according to the appointed view and the brightness difference data of the picture.
In one embodiment, if the specified view can include three types, namely a close view, a middle view and a far view, the brightness difference data of the picture includes two types, namely a small difference and a large difference; when the shooting scene is determined only according to the specified framing, the three types of shooting scenes can be corresponding through the three types of framing; for example: the close view corresponds to the shooting scene 1, the middle view corresponds to the shooting scene 2, and the far view corresponds to the shooting scene 3. Similarly, when the shooting scene is determined only according to the light and shade difference data of the picture, two shooting scenes can be corresponding through two differences; for example: a small difference corresponds to the shot scene 1 and a large difference corresponds to the shot scene 2. When the shooting scene is determined according to the appointed view finding and the image light and shade difference data, six shooting scenes can be corresponding through six modes consisting of three view finding and two differences; for example: close shot 1, close shot 2, medium shot 3, medium shot 4, far shot 5, far shot 6.
In one embodiment, different specified framing and/or picture shading data may also correspond to the same shooting scene. Taking the example of determining the shooting scene only according to the designated framing, if the designated framing can include three types, namely a close view, a middle view and a far view, the close view corresponds to the shooting scene 1, the middle view corresponds to the shooting scene 1 and the far view corresponds to the shooting scene 2. The same applies to the above-described corresponding manner in both cases where the shooting scene is determined based on only the picture shading data and the shooting scene is determined based on the specified framing and the picture shading data. The shooting scene can be determined according to the specified framing and/or the image shading data and can be set according to the actual situation, which is not limited in the application.
Therefore, a plurality of different shooting scenes can be obtained according to the appointed view finding and/or the image brightness difference data, and the shooting scene can be divided, so that the shooting scene to which the picture shot by the user belongs can be determined more accurately, the contrast adjustment is carried out, and the picture effect of the picture in different shooting scenes is improved.
In the embodiment of the present application, the shooting scene is determined by specifying the framing and/or the frame shading data, and the specified framing can be determined by the motor position, which can be specifically implemented as steps a1-a 2:
step A1: and acquiring motor position information from the preview frame.
Step A2: and determining the appointed framing of the shot picture according to the motor position information.
The motor is a driving motor of the terminal camera, and automatic focusing can be realized through an electronic focusing system of the terminal according to the driving motor. According to the motor position information, the focus when taking a picture can be determined, and therefore the appointed view is determined. In this way, the designated framing for taking a picture can be accurately determined based on the motor position information.
In the embodiment of the present application, the brightness difference data can be determined according to the brightness distribution information, and the steps B1-B2 can be specifically implemented as:
step B1: and acquiring brightness distribution information from the preview frame.
Step B2: and determining the picture brightness difference data of the shot picture according to the brightness distribution information.
In one embodiment, a brightness difference value of the shot picture is determined according to the brightness distribution information, and picture brightness difference data is determined according to the brightness difference value. For example, if the brightness difference is less than 10, the brightness difference data is determined to be a small difference, if the brightness difference is in the range of 10 to 50, the brightness difference data is determined to be a medium difference, and if the brightness difference is greater than 50, the brightness difference data is determined to be a large difference. Of course, the brightness difference data of the picture is determined according to the range of the brightness difference value, and the setting can be performed according to the actual situation, which is not limited in the present application. Thus, the brightness difference data of the picture can be accurately determined according to the brightness distribution information in the preview frame.
The above describes how to determine the shooting scene and determine the contrast according to the determined shooting scene, and the following further describes how to adjust the shot picture according to the determined contrast.
In the embodiment of the application, after the contrast corresponding to the current shooting scene is determined, whether the contrast is updated needs to be judged, and different operations are executed according to the judgment result.
The first condition is as follows: the determined contrast is not updated;
in the embodiment of the present application, if the determined contrast is an unadjusted contrast, the method is specifically implemented as steps C1-C2:
step C1: if the determined contrast is the unadjusted contrast, adjusting the determined contrast through RGB information acquired from the preview frame and a contrast adjustment algorithm to obtain the adjusted contrast; and/or adjusting the determined contrast according to an adjustment instruction of a user to obtain the adjusted contrast;
in the embodiment of the application, the determined contrast can be adjusted through a contrast adjustment algorithm, and also can be adjusted through an adjustment instruction of a user; the determined contrast can be adjusted by a contrast adjustment algorithm, and then the adjusted contrast can be adjusted again by an adjustment instruction of a user. In specific implementation, the selection can be performed according to actual conditions, and the application does not limit the selection.
In the embodiment of the present application, the contrast may be adjusted by using a common contrast algorithm. For example: nRGB ═ RGB + (RGB-Threshold) × offset/255; where Threshold is a given Threshold, we can default to 128 in order to shorten the computation time; the offset is the processed contrast increment, and in order to ensure the effect, the offset can limit a range to ensure that the overall effect is in a controllable range. R, G, B represent the RGB information for the image pixels, and the adjusted RGB information is obtained by substituting the RGB information obtained from the preview frame into the algorithm, resulting in an adjusted contrast. Of course, other contrast algorithms may be used in the implementation, such as: histogram-based contrast adjustment methods may be used, such as: histogram equalization, Adaptive Histogram Equalization (AHE), and the like; the contrast can also be adjusted directly on a pixel basis, such as: gamma transformation, logarithmic transformation, etc.
Step C2: and adjusting the contrast of the shot picture according to the adjusted contrast.
Therefore, the determined contrast is adjusted, so that the shot photo is more in line with the aesthetic sense of the user, and the shooting experience of the user is improved.
In the embodiment of the present application, in order to save the time for displaying the photo, after the step C2 is executed, the following steps may be specifically implemented: and updating the adjusted contrast ratio to the contrast ratio corresponding to the current shooting scene in the corresponding relationship.
For example: if the current shooting scene is the shooting scene 5, the corresponding contrast is the contrast 50, and the adjusted contrast is the contrast 55, the contrast 55 is associated with the shooting scene 5. When the user takes a picture again in this way, if the shot scene is determined as the shot scene 5, the contrast of the current picture is adjusted by using the contrast 55. Therefore, the corresponding relation between the contrast and the shooting scene is updated, the obtained shooting can better accord with the use habit of the user, the contrast does not need to be finely adjusted, and the time for displaying the picture is saved.
And a second condition: the determined contrast is updated;
in the embodiment of the present application, if the determined contrast is the updated contrast, the contrast of the taken picture is adjusted to the updated contrast.
Therefore, the contrast adjustment is carried out on the shot picture by using the updated contrast, so that the shot picture can better accord with the aesthetic sense of the user, and the shooting experience of the user is improved.
As shown in fig. 3, a complete method for adjusting contrast provided by the embodiment of the present application includes:
step 301: and responding to a photographing instruction, and acquiring motor position information and brightness distribution information from the preview frame.
Step 302: and determining the appointed framing of the shot picture according to the motor position information.
Step 303: and determining the picture brightness difference data of the shot picture according to the brightness distribution information.
Step 304: and determining the current shooting scene according to the appointed framing and/or picture brightness difference data of the shot picture.
Step 305: and determining the contrast corresponding to the current shooting scene according to the preset corresponding relation between the shooting scene and the contrast.
Step 306: judging whether the determined contrast is adjusted or not; if so, go to step 307; if not, go to step 308.
Step 307: and if the determined contrast is the updated contrast, adjusting the contrast of the shot picture to be the updated contrast.
Step 308: if the determined contrast is the unadjusted contrast, adjusting the determined contrast through RGB information acquired from the preview frame and a contrast adjustment algorithm to obtain the adjusted contrast; and/or adjusting the determined contrast according to an adjustment instruction of a user to obtain the adjusted contrast.
Step 309: and adjusting the contrast of the shot picture according to the adjusted contrast.
Step 310: and updating the adjusted contrast ratio to the contrast ratio corresponding to the current shooting scene in the corresponding relationship.
As shown in fig. 4, an embodiment of the present application further provides a terminal for adjusting contrast, where the terminal includes: a processor 410, and a memory 420, wherein the memory 420 stores program code, which when executed by the processor 410, causes the terminal to perform the following:
responding to the photographing instruction, and determining the current photographing scene according to the preview frame;
determining the contrast corresponding to the current shooting scene according to the preset corresponding relation between the shooting scene and the contrast;
and adjusting the contrast of the shot picture according to the determined contrast.
Optionally, the processor 410 is specifically configured to:
determining appointed view and/or picture shading data of the shot picture according to the preview frame;
and determining the current shooting scene according to the appointed framing and/or picture brightness difference data of the shot picture.
Optionally, the processor 410 is specifically configured to:
acquiring motor position information from the preview frame;
determining the appointed framing of the shot picture according to the motor position information;
acquiring brightness distribution information from the preview frame;
and determining the picture brightness difference data of the shot picture according to the brightness distribution information.
Optionally, the processor 410 is specifically configured to:
if the determined contrast is the unadjusted contrast, adjusting the determined contrast through RGB information acquired from the preview frame and a contrast adjustment algorithm to obtain the adjusted contrast; and/or adjusting the determined contrast according to an adjustment instruction of a user to obtain the adjusted contrast;
adjusting the contrast of the shot picture according to the adjusted contrast; or the like, or, alternatively,
and if the determined contrast is the updated contrast, adjusting the contrast of the shot picture to be the updated contrast.
Optionally, the terminal further includes:
and updating the adjusted contrast ratio to the contrast ratio corresponding to the current shooting scene in the corresponding relationship.
As shown in fig. 5, an embodiment of the present application further provides a terminal for adjusting contrast, where the terminal includes a response module 501, a contrast determination module 502, and an adjustment module 503:
a response module 501, configured to respond to the photographing instruction and determine a current photographing scene according to the preview frame;
a contrast determining module 502, configured to determine a contrast corresponding to the current shooting scene according to a preset correspondence between the shooting scene and the contrast;
and an adjusting module 503, configured to adjust the contrast of the shot picture according to the determined contrast.
In one possible implementation, the response module 501 includes:
a parameter determining unit for determining specified framing and/or picture shading data of the shot picture according to the preview frame;
and the shot scene determining unit is used for determining the current shot scene according to the specified framing and/or picture shading data of the shot photo.
In one possible implementation, the determining the parameter unit includes:
a motor position determining subunit, configured to obtain motor position information from the preview frame;
a specified view finding subunit, configured to determine a specified view finding of the taken picture according to the motor position information;
a brightness distribution information determining subunit, configured to obtain brightness distribution information from the preview frame;
and the image brightness difference data determining subunit is used for determining the image brightness difference data of the shot picture according to the brightness distribution information.
In one possible implementation, the adjusting module 503 includes:
a first adjusting unit, configured to adjust the determined contrast by using RGB information obtained from the preview frame and a contrast adjustment algorithm if the determined contrast is an unadjusted contrast, so as to obtain an adjusted contrast; and/or adjusting the determined contrast according to an adjustment instruction of a user to obtain the adjusted contrast;
the second adjusting unit is used for adjusting the contrast of the shot picture according to the adjusted contrast;
and the third adjusting unit is used for adjusting the contrast of the shot picture to be the updated contrast if the determined contrast is the updated contrast.
In a possible implementation manner, the terminal further includes:
and the updating module is used for updating the contrast corresponding to the current shooting scene in the corresponding relation according to the adjusted contrast after the adjusting module adjusts the contrast of the shot picture according to the determined contrast.
As shown in fig. 6, the terminal 600 for adjusting contrast according to the embodiment of the present disclosure includes: radio Frequency (RF) circuit 610, power supply 620, processor 630, memory 640, input unit 650, display unit 660, camera 670, communication interface 680, and WiFi module 690. Those skilled in the art will appreciate that the configuration of the terminal shown in fig. 6 does not constitute a limitation of the terminal, and that the terminal provided by the embodiments of the present application may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be provided.
The following describes the various components of the terminal 600 in detail with reference to fig. 6:
the RF circuit 610 may be used for receiving and transmitting data during a communication or conversation. Specifically, the RF circuit 610 sends downlink data of the base station to the processor 630 for processing after receiving the downlink data; and in addition, sending the uplink data to be sent to the base station. Generally, the RF circuit 610 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
In addition, the RF circuit 610 may also communicate with networks and other terminals through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The WiFi technology belongs to a short-distance wireless transmission technology, and the terminal 600 may connect to an Access Point (AP) through a WiFi module 690, thereby implementing Access to a data network. The WiFi module 690 may be used for receiving and transmitting data during communication.
The terminal 600 may be physically connected to other terminals via the communication interface 680. In some embodiments, the communication interface 680 is connected to the communication interface of the other terminal through a cable, so as to realize data transmission between the terminal 600 and the other terminal.
In the embodiment of the present application, the terminal 600 can implement a communication service and send information to other contacts, so the terminal 600 needs to have a data transmission function, that is, the terminal 600 needs to include a communication module inside. Although fig. 6 shows communication modules such as the RF circuit 610, the WiFi module 690, and the communication interface 680, it is understood that at least one of the above components or other communication modules (such as a bluetooth module) for implementing communication exists in the terminal 600 for data transmission.
For example, when the terminal 600 is a mobile phone, the terminal 600 may include the RF circuit 610 and may further include the WiFi module 690; when the terminal 600 is a computer, the terminal 600 may include the communication interface 680 and may further include the WiFi module 690; when the terminal 600 is a tablet computer, the terminal 600 may include the WiFi module.
The memory 640 may be used to store software programs and modules. The processor 630 executes various functional applications and data processing of the terminal 600 by running the software programs and modules stored in the memory 640, and after the processor 630 executes the program codes in the memory 640, part or all of the processes in fig. 1 in the embodiments of the present application can be implemented.
In some embodiments, the memory 640 may mainly include a program storage area and a data storage area. The storage program area can store an operating system, various application programs (such as communication application), a face recognition module and the like; the storage data area may store data (such as various multimedia files like pictures, video files, etc., and face information templates) created according to the use of the terminal, etc.
Further, the memory 640 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 650 may be used to receive numeric or character information input by a user and generate key signal inputs related to user settings and function control of the terminal 600.
In some embodiments, input unit 650 may include a touch panel 651 and other input terminals 652.
The touch panel 651, also called a touch screen, can collect touch operations of a user (such as operations of a user using a finger, a stylus, or any other suitable object or accessory on or near the touch panel 651) and drive the corresponding connection device according to a predetermined program. In some embodiments, the touch panel 651 can include two portions, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 630, and can receive and execute commands sent by the processor 630. In addition, the touch panel 651 may be implemented in various types, such as resistive, capacitive, infrared, and surface acoustic wave.
In some embodiments, the other input terminals 652 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 660 may be used to display information input by a user or information provided to the user and various menus of the terminal 600. The display unit 660 is a display system of the terminal 600, and is used for presenting an interface and implementing human-computer interaction.
Further, the touch panel 651 can cover the display panel 661, and when the touch panel 651 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 630 to determine the type of touch event, and then the processor 630 provides a corresponding visual output on the display panel 661 according to the type of touch event.
Although in fig. 6, the touch panel 651 and the display panel 661 are provided as two separate components to implement the input and output functions of the terminal 600, in some embodiments, the touch panel 651 and the display panel 661 may be integrated to implement the input and output functions of the terminal 600.
The processor 630 is a control center of the terminal 600, connects various components using various interfaces and lines, performs various functions of the terminal 600 and processes data by operating or executing software programs and/or modules stored in the memory 640 and calling data stored in the memory 640, thereby implementing various services based on the terminal.
In some implementations, the processor 630 may include one or more processors. In some embodiments, the processor 630 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user interfaces, applications, and the like, and the modem processor primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 630.
The camera 670 is configured to implement a shooting function of the terminal 600, and shoot pictures or videos. The camera 670 may also be used to implement a scanning function of the terminal 600, and scan a scanned object (two-dimensional code/barcode).
The terminal 600 also includes a power source 620 (e.g., a battery) for powering the various components. In some embodiments, the power supply 620 may be logically connected to the processor 630 through a power management system, so as to manage charging, discharging, and power consumption functions through the power management system.
Although not shown, the terminal 600 may further include at least one sensor, an audio circuit, and the like, which will not be described herein.
Wherein the memory 630 may store the same program code as the memory 620, which when executed by the processor 620, causes the processor 620 to implement all functions of the processor 610.
An embodiment of the present application further provides a computer-readable non-volatile storage medium, which includes program code, and when the program code runs on a computing terminal, the program code is configured to enable the computing terminal to execute the steps of the method for adjusting contrast according to the embodiment of the present application.
The present application is described above with reference to block diagrams and/or flowchart illustrations of methods, apparatus (systems) and/or computer program products according to embodiments of the application. It will be understood that one block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, and/or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer and/or other programmable data processing apparatus, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks.
Accordingly, the subject application may also be embodied in hardware and/or in software (including firmware, resident software, micro-code, etc.). Furthermore, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium having computer-usable or computer-readable program code embodied in the medium for use by or in connection with an instruction execution system. In the context of this application, a computer-usable or computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (8)

1. A method of adjusting contrast, the method comprising:
responding to the photographing instruction, and determining the current photographing scene according to the preview frame;
determining the contrast corresponding to the current shooting scene according to the preset corresponding relation between the shooting scene and the contrast;
adjusting the contrast of the shot picture according to the determined contrast;
the determining the current shooting scene according to the preview frame includes:
determining appointed view and picture brightness difference data of the shot picture according to the preview frame; the appointed view comprises at least a close view, a middle view and a long view;
if the appointed view is a close view and the picture brightness difference data represent that the picture brightness difference is small, determining that the current shooting scene is a first shooting scene;
if the appointed view is a close view and the image brightness difference data represent that the image brightness difference is large, determining that the current shooting scene is a second shooting scene;
if the appointed view is a middle view and the picture brightness difference data represent that the picture brightness difference is small, determining that the current shooting scene is a third shooting scene;
if the appointed view is a middle view and the image brightness difference data represent that the image brightness difference is large, determining that the current shooting scene is a fourth shooting scene;
if the appointed view is a long-distance view and the picture brightness difference data represent that the picture brightness difference is small, determining that the current shooting scene is a fifth shooting scene;
and if the appointed view is a long-distance view and the image brightness difference data represent that the image brightness difference is large, determining that the current shooting scene is a sixth shooting scene.
2. The method of claim 1, wherein determining the specified framing of the captured photograph from the preview frame comprises:
acquiring motor position information from the preview frame;
determining the appointed framing of the shot picture according to the motor position information;
determining picture brightness difference data of the shot picture according to the preview frame, wherein the picture brightness difference data comprises the following steps:
acquiring brightness distribution information from the preview frame;
and determining the picture brightness difference data of the shot picture according to the brightness distribution information.
3. The method of claim 1, wherein adjusting the contrast of the captured photograph based on the determined contrast comprises:
if the determined contrast is the unadjusted contrast, adjusting the determined contrast through RGB information acquired from the preview frame and a contrast adjustment algorithm to obtain the adjusted contrast; and/or adjusting the determined contrast according to an adjustment instruction of a user to obtain the adjusted contrast;
adjusting the contrast of the shot picture according to the adjusted contrast; or the like, or, alternatively,
and if the determined contrast is the updated contrast, adjusting the contrast of the shot picture to be the updated contrast.
4. The method of claim 3, wherein after adjusting the contrast of the captured photograph in accordance with the adjusted contrast, the method further comprises:
and updating the adjusted contrast ratio to the contrast ratio corresponding to the current shooting scene in the corresponding relationship.
5. A terminal for adjusting contrast, the terminal comprising: a processor, a memory and a camera, wherein the memory stores program code that, when executed by the processor, causes the terminal to perform the following:
responding to the photographing instruction, and determining the current photographing scene according to the preview frame;
determining the contrast corresponding to the current shooting scene according to the corresponding relation between the preset shooting scene and the contrast;
adjusting the contrast of the shot picture according to the determined contrast;
the processor is specifically configured to: determining appointed view and/or picture brightness difference data of the shot picture according to the preview frame; the appointed view comprises at least a close view, a middle view and a long view;
if the appointed view is a close view and the image brightness difference data represent that the image brightness difference is small, determining that the current shooting scene is a first shooting scene;
if the appointed view is a close view and the image brightness difference data represent that the image brightness difference is large, determining that the current shooting scene is a second shooting scene;
if the appointed view is a middle view and the picture brightness difference data represent that the picture brightness difference is small, determining that the current shooting scene is a third shooting scene;
if the appointed view is a middle view and the image brightness difference data represent that the image brightness difference is large, determining that the current shooting scene is a fourth shooting scene;
if the appointed view is a long-distance view and the picture brightness difference data represent that the picture brightness difference is small, determining that the current shooting scene is a fifth shooting scene;
and if the appointed view is a long-distance view and the image brightness difference data represent that the image brightness difference is large, determining that the current shooting scene is a sixth shooting scene.
6. The terminal of claim 5, wherein the processor is specifically configured to:
acquiring motor position information from the preview frame;
determining the appointed framing of the shot picture according to the motor position information;
acquiring brightness distribution information from the preview frame;
and determining the picture brightness difference data of the shot picture according to the brightness distribution information.
7. The terminal of claim 5, wherein the processor is specifically configured to:
if the determined contrast is the unadjusted contrast, adjusting the determined contrast through RGB information acquired from the preview frame and a contrast adjustment algorithm to obtain the adjusted contrast; and/or adjusting the determined contrast according to an adjustment instruction of a user to obtain the adjusted contrast;
adjusting the contrast of the shot picture according to the adjusted contrast; or the like, or, alternatively,
and if the determined contrast is the updated contrast, adjusting the contrast of the shot picture to be the updated contrast.
8. The terminal of claim 7, further comprising:
and updating the adjusted contrast ratio to the contrast ratio corresponding to the current shooting scene in the corresponding relationship.
CN201910892578.5A 2019-09-20 2019-09-20 Method and terminal for adjusting contrast Active CN112543278B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910892578.5A CN112543278B (en) 2019-09-20 2019-09-20 Method and terminal for adjusting contrast

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910892578.5A CN112543278B (en) 2019-09-20 2019-09-20 Method and terminal for adjusting contrast

Publications (2)

Publication Number Publication Date
CN112543278A CN112543278A (en) 2021-03-23
CN112543278B true CN112543278B (en) 2022-05-27

Family

ID=75012351

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910892578.5A Active CN112543278B (en) 2019-09-20 2019-09-20 Method and terminal for adjusting contrast

Country Status (1)

Country Link
CN (1) CN112543278B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011127825A1 (en) * 2010-04-16 2011-10-20 杭州海康威视软件有限公司 Processing method and device of image contrast
CN103841324A (en) * 2014-02-20 2014-06-04 小米科技有限责任公司 Shooting processing method and device and terminal device
CN106998423A (en) * 2016-01-26 2017-08-01 宇龙计算机通信科技(深圳)有限公司 Image processing method and device
CN107302632A (en) * 2017-06-28 2017-10-27 努比亚技术有限公司 A kind of mobile terminal image pickup method, mobile terminal and computer-readable recording medium
CN109697738A (en) * 2018-12-28 2019-04-30 Oppo广东移动通信有限公司 Image processing method, device, terminal device and storage medium
CN110012210A (en) * 2018-01-05 2019-07-12 广东欧珀移动通信有限公司 Photographic method, device, storage medium and electronic equipment
CN110225403A (en) * 2019-07-12 2019-09-10 四川长虹电器股份有限公司 The bright dark scene of video image identifies control method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011127825A1 (en) * 2010-04-16 2011-10-20 杭州海康威视软件有限公司 Processing method and device of image contrast
CN103841324A (en) * 2014-02-20 2014-06-04 小米科技有限责任公司 Shooting processing method and device and terminal device
CN106998423A (en) * 2016-01-26 2017-08-01 宇龙计算机通信科技(深圳)有限公司 Image processing method and device
CN107302632A (en) * 2017-06-28 2017-10-27 努比亚技术有限公司 A kind of mobile terminal image pickup method, mobile terminal and computer-readable recording medium
CN110012210A (en) * 2018-01-05 2019-07-12 广东欧珀移动通信有限公司 Photographic method, device, storage medium and electronic equipment
CN109697738A (en) * 2018-12-28 2019-04-30 Oppo广东移动通信有限公司 Image processing method, device, terminal device and storage medium
CN110225403A (en) * 2019-07-12 2019-09-10 四川长虹电器股份有限公司 The bright dark scene of video image identifies control method

Also Published As

Publication number Publication date
CN112543278A (en) 2021-03-23

Similar Documents

Publication Publication Date Title
AU2022200580B2 (en) Photographing method, photographing apparatus, and mobile terminal
CN109547701B (en) Image shooting method and device, storage medium and electronic equipment
EP3370204B1 (en) Method for detecting skin region and device for detecting skin region
CN108307125B (en) Image acquisition method, device and storage medium
CN107438163B (en) Photographing method, terminal and computer readable storage medium
CN106937045B (en) Display method of preview image, terminal equipment and computer storage medium
CN107038681B (en) Image blurring method and device, computer readable storage medium and computer device
CN103400108A (en) Face identification method and device as well as mobile terminal
CN108419008B (en) Shooting method, terminal and computer readable storage medium
CN113132644B (en) Method and equipment for generating high dynamic range image
CN110647930A (en) Image processing method and device and electronic equipment
CN105306802A (en) Photographing mode switching method and device
CN108200352B (en) Method, terminal and storage medium for adjusting picture brightness
CN109561255B (en) Terminal photographing method and device and storage medium
CN115514876B (en) Image fusion method, electronic device, storage medium and computer program product
US20210218948A1 (en) Depth image obtaining method, image capture device, and terminal
CN108093233B (en) Image processing method, terminal and computer readable storage medium
CN113572980B (en) Photographing method and device, terminal equipment and storage medium
CN112543278B (en) Method and terminal for adjusting contrast
CN105513098B (en) Image processing method and device
CN107835336B (en) Dual-camera frame synchronization method and device, user terminal and storage medium
CN114143471B (en) Image processing method, system, mobile terminal and computer readable storage medium
CN112532838B (en) Image processing method, mobile terminal and computer storage medium
CN111372001B (en) Image fusion method and device, storage medium and mobile terminal
CN114845044A (en) Image processing method, intelligent terminal and storage medium

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
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.