Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like. The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, themobile terminal 100 may include: an RF (Radio Frequency)unit 101, aWiFi module 102, anaudio output unit 103, an a/V (audio/video)input unit 104, asensor 105, adisplay unit 106, auser input unit 107, aninterface unit 108, amemory 109, aprocessor 110, and apower supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
theradio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to theprocessor 110; in addition, the uplink data is transmitted to the base station. Typically,radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, theradio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000 ), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division-Long Term Evolution), and TDD-LTE (Time Division-Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through theWiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows theWiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
Theaudio output unit 103 may convert audio data received by theradio frequency unit 101 or theWiFi module 102 or stored in thememory 109 into an audio signal and output as sound when themobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, theaudio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). Theaudio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and amicrophone 1042, theGraphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on thedisplay unit 106. The image frames processed by thegraphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via theradio frequency unit 101 or theWiFi module 102. Themicrophone 1042 can receive sounds (audio data) via themicrophone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and can process such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via theradio frequency unit 101 in case of the phone call mode. Themicrophone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
Themobile terminal 100 also includes at least onesensor 105, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of thedisplay panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off thedisplay panel 1061 and/or a backlight when themobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing gestures of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometers and taps), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Thedisplay unit 106 is used to display information input by a user or information provided to the user. TheDisplay unit 106 may include aDisplay panel 1061, and theDisplay panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
Theuser input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, theuser input unit 107 may include atouch panel 1071 andother input devices 1072. Thetouch panel 1071, also referred to as a touch screen, can collect touch operations of a user (e.g., operations of a user on thetouch panel 1071 or near thetouch panel 1071 using a finger, a stylus, or any other suitable object or accessory) thereon or nearby and drive the corresponding connection device according to a predetermined program. Thetouch panel 1071 may include two parts of 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 theprocessor 110, and can receive and execute commands sent by theprocessor 110. In addition, thetouch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to thetouch panel 1071, theuser input unit 107 may includeother input devices 1072. In particular,other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, thetouch panel 1071 may cover thedisplay panel 1061, and when thetouch panel 1071 detects a touch operation thereon or nearby, thetouch panel 1071 transmits the touch operation to theprocessor 110 to determine the type of the touch event, and then theprocessor 110 provides a corresponding visual output on thedisplay panel 1061 according to the type of the touch event. Although thetouch panel 1071 and thedisplay panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, thetouch panel 1071 and thedisplay panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
Theinterface unit 108 serves as an interface through which at least one external device is connected to themobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. Theinterface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within themobile terminal 100 or may be used to transmit data between themobile terminal 100 and external devices.
Thememory 109 may be used to store software programs as well as various data. Thememory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, etc. Further, thememory 109 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.
Theprocessor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in thememory 109 and calling data stored in thememory 109, thereby performing overall monitoring of the mobile terminal.Processor 110 may include one or more processing units; preferably, theprocessor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into theprocessor 110.
Themobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, thepower supply 111 may be logically connected to theprocessor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, themobile terminal 100 may further include a bluetooth module and the like, which will not be described in detail herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present invention, the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an e-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an epc (Evolved Packet Core) 203, and anIP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 andother eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 with access to theEPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an hss (Home Subscriber Server) 2032,other MMEs 2033, an SGW (Serving gateway) 2034, a pgw (PDN gateway) 2035, and a PCRF (Policy and Charging Rules Function) 2036, and the like. The MME2031 is a control node for processing signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and communication network system, the present invention provides various embodiments of the method.
Fig. 3 is a flowchart of a method according to an embodiment of an image processing method according to the present invention. In this embodiment, the image processing method may be applied to the mobile terminal shown in fig. 1 or fig. 2, and it is understood that the image processing method may also be applied to electronic devices such as a tablet, an electronic book, and the like. The image processing method comprises the following steps:
step S310, acquiring an image to be processed;
step S320, determining a target object in the image to be processed;
and step S330, controlling and adjusting the image parameters of the region corresponding to the target object to generate a final image.
Through the embodiment, the user acquires the image to be processed from the saved album or directly uses the preview image displayed in the image preview interface as the image to be processed, further determines the target object in the image to be processed, and controls and adjusts the image parameters of the area corresponding to the target object to generate the final image, so that the user can acquire the shooting works with creative effects in the shooting process, and the user experience is improved.
The above steps will be specifically described with reference to specific examples.
In step S310, an image to be processed is acquired.
Specifically, the mobile terminal is configured with an image capturing device, for example, a camera. The mobile terminal may be equipped with one or more cameras. The user can control the camera to take pictures, record videos and the like through the mobile terminal, and the collected images or videos are stored in a local photo album. The mobile terminal is provided with a display screen, and when the camera is started, an image preview interface is provided through the display screen to display an image picture captured by the camera in real time. In this embodiment, the image to be processed is a preview image obtained in real time in an image preview interface. In other embodiments, the image to be processed is an image captured by an image capturing device, and may also be an image selected from an album stored in the mobile terminal.
In step S320, a target object in the image to be processed is determined.
Specifically, the target object is an object of a composite specific condition in the image to be processed, and may be, for example, an object automatically recognized according to a preset rule, or an object determined according to a selection operation input by a user.
In an alternative embodiment, step S320 may include the following steps:
step S3201 of identifying an image object in the image to be processed;
in step S3202, when there is an image object matching the target type in the image objects, it is determined that the image object matching the target type is the target object.
Specifically, in the present embodiment, the image object matching the target type is a human object. In other embodiments, the image objects that match the target type may be animal objects, building objects, vehicle objects, and scene objects. In step S3201, image objects included in the image to be processed are recognized by an image recognition algorithm, and the recognized objects are classified to determine the types of the recognized image objects. In step S3202, by matching the type of the recognized image object with the target type, if there is a comparable image object, the comparable image object is taken as the target object.
In an alternative embodiment, as shown in fig. 4, in order to improve the accuracy of target object identification, when an image object matching the target type is detected, a prompt box is displayed through the graphical user interface currently displaying the image to be processed, and the prompt box is displayed on the periphery of the area of the image object matching the target type, so as to prompt the user that the image object enclosed by the prompt box is the identified target object. When there are a plurality of recognized image objects, then each recognized image object corresponds to a prompt box. In this embodiment, the prompt box is configured to be able to respond to the touch operation to determine that the image object corresponding to the touched prompt box is the target object.
In this embodiment, the step of determining that the image object matching the target type is the target object may include the steps of:
step S32021, acquiring a first image region in the image to be processed and a second image region corresponding to an image object in the image to be processed, where the first image region is a region of the image to be processed except for the second image region;
step S32022 of determining that the first image region and the second image region satisfy an image parameter threshold;
step S32023, determining that the image object corresponding to the second image area and matching the target type is the target object.
In step S32021, a second image region corresponding to the image object with the target type is determined by an image segmentation technique, and then, the remaining region in the image to be processed is determined as the first image region. In the present embodiment, as shown in fig. 5, the first image region and the second image region are image segmentation performed according to the primary segmentation accuracy, that is, the first image region includes not only an image object matching the target type but also some other images that do not belong to the image object. By the embodiment, image segmentation can be completed quickly, and the subsequent steps can be completed quickly, so that the target object can be confirmed quickly.
In step S32022, the image parameter threshold is a threshold related to a brightness parameter of the image. In an alternative embodiment, step S32022 may include the following steps:
step S320221, acquiring a first brightness parameter of the first image region and a second brightness parameter corresponding to the second image region;
step S320222, when the ratio of the first luminance parameter to the second luminance parameter is greater than a preset value, it is determined that the first image area and the second image area satisfy an image parameter threshold.
Specifically, the first luminance parameter of the first image area and the second luminance parameter corresponding to the second image area are the average luminance of the pixels of the first image area and the average luminance of the pixels of the second image area, respectively. For example, the average luminance ratio of the human figure region and the human figure outer region is calculated as follows:
in the above formula, imean _ out is the average brightness of the human outside region, imean _ int is the average brightness of the human outside region, and T0 is a preset image parameter threshold.
In step S32023, if the second luminance parameter of the image object corresponding to the second image region and matching the target type and the first luminance parameter corresponding to the first image region satisfy the threshold, the image object matching the target type is determined to be the target object.
In an alternative embodiment, step S320 may include responding to a selection operation applied to the image preview interface, where the image area determined according to the selection operation is a target object. Specifically, the selection operation may be a sliding operation input by the user in the image preview interface, and an image defined according to a sliding trajectory corresponding to the sliding operation is a target object. In this embodiment, after the corresponding image area is determined by the selection operation, the related art of further determining whether the corresponding image area is the target object by the image parameter threshold in steps S32021 to S32023 is also applicable to this embodiment, and therefore, the description thereof is omitted.
In step S330, control adjusts image parameters of a region corresponding to the target object to generate a final image.
Specifically, in step S330, the image brightness parameter of the area corresponding to the target object is controlled to be reduced, so that the image to be processed forms an image with a silhouette effect. In an optional embodiment, the step of controlling and adjusting the image parameters of the region corresponding to the target object to generate the final image is: and controlling and adjusting the image parameters of the area corresponding to the target object, and displaying the adjusted image through an image preview interface. With the above embodiment, the adjusted image can be displayed in real time through the image preview interface, so that the user can know the effect before taking the final picture. In an alternative embodiment, as shown in fig. 6, step S330 may further include a fine image segmentation step, i.e., performing fine image segmentation on the second image region to accurately determine a region corresponding to the target object in the image to be processed.
Through the method, through the implementation mode, the user acquires the image to be processed from the saved album or directly uses the preview image displayed in the image preview interface as the image to be processed, further determines the target object in the image to be processed, and generates the final image by controlling and adjusting the image parameters of the area corresponding to the target object, so that the user can acquire the shooting works with creative effect in the shooting process, and the user experience is improved.
Fig. 7 is a schematic structural component diagram of themobile terminal 100 according to an embodiment of the present application, where themobile terminal 100 includes: atouch panel 1071; aprocessor 110; amemory 109 connected to theprocessor 110, where thememory 109 contains control instructions, and when theprocessor 110 reads the control instructions, the memory controls themobile terminal 100 to implement the following steps:
acquiring an image to be processed;
determining a target object in the image to be processed;
and controlling and adjusting the image parameters of the region corresponding to the target object to generate a final image.
Optionally, the acquiring the image to be processed is at least one of:
the image to be processed is a preview image acquired in real time in an image preview interface;
an image captured by an image capture device; and
and selecting an image from the photo album stored in the mobile terminal.
Optionally, the step of determining a target object in the image to be processed includes:
identifying an image object in the image to be processed;
when the image object matched with the target type exists in the image objects, determining the image object matched with the target type as the target object.
Optionally, the image object matched with the target type may be at least one of:
a character object, an animal object, a building object, a carrier object, and a scene object.
Optionally, the step of determining that the image object matching the target type is a target object includes:
acquiring a first image area in the image to be processed and a second image area corresponding to an image object matched with a target type in the image to be processed, wherein the first image area is an area except the second image area in the image to be processed;
determining that the first image region and the second image region satisfy an image parameter threshold;
and determining the image object which corresponds to the second image area and is matched with the target type as the target object.
Optionally, the step of determining that the first image region and the second image region satisfy an image parameter threshold comprises:
acquiring a first brightness parameter of the first image area and a second brightness parameter corresponding to the second image area;
and when the ratio of the first brightness parameter to the second brightness parameter is larger than a preset value, determining that the first image area and the second image area meet an image parameter threshold value.
Optionally, the step of controlling and adjusting image parameters of a region corresponding to the target object to generate a final image includes:
and controlling and reducing the image brightness parameter of the region corresponding to the target object so as to enable the image to be processed to form an image with a silhouette effect.
Optionally, the step of acquiring the image to be processed is displaying the image acquired in real time by the image acquisition device through an image preview interface;
the step of determining the target object in the image to be processed is as follows: responding to a selection operation acted in an image preview interface, and taking an image area determined according to the selection operation as a target object;
the step of controlling and adjusting the image parameters of the region corresponding to the target object to generate the final image is as follows: and controlling and adjusting the image parameters of the area corresponding to the target object, and displaying the adjusted image through an image preview interface.
Through the mobile terminal, the user obtains the image to be processed from the saved album or directly uses the preview image displayed in the image preview interface as the image to be processed, further determines the target object in the image to be processed, and controls and adjusts the image parameters of the area corresponding to the target object to generate the final image, so that the user can obtain the shooting works with creative effects in the shooting process, and the user experience is improved.
An embodiment of the present invention further provides a computer storage medium, where an executable program is stored in the computer storage medium, and when the executable program is executed, the following steps are implemented:
acquiring an image to be processed;
determining a target object in the image to be processed;
and controlling and adjusting the image parameters of the region corresponding to the target object to generate a final image.
Optionally, the acquiring the image to be processed is at least one of:
the image to be processed is a preview image acquired in real time in an image preview interface;
an image captured by an image capture device; and
and selecting an image from the photo album stored in the mobile terminal.
Optionally, the step of determining a target object in the image to be processed includes:
identifying an image object in the image to be processed;
when the image object matched with the target type exists in the image objects, determining the image object matched with the target type as the target object.
Optionally, the image object matched with the target type may be at least one of:
a character object, an animal object, a building object, a carrier object, and a scene object.
Optionally, the step of determining that the image object matching the target type is the target object includes:
acquiring a first image area in the image to be processed and a second image area corresponding to an image object matched with a target type in the image to be processed, wherein the first image area is an area except the second image area in the image to be processed;
determining that the first image region and the second image region satisfy an image parameter threshold;
and determining the image object which corresponds to the second image area and is matched with the target type as the target object.
Optionally, the step of determining that the first image region and the second image region satisfy an image parameter threshold comprises:
acquiring a first brightness parameter of the first image area and a second brightness parameter corresponding to the second image area;
and when the ratio of the first brightness parameter to the second brightness parameter is larger than a preset value, determining that the first image area and the second image area meet an image parameter threshold value.
Optionally, the step of controlling to adjust image parameters of a region corresponding to the target object to generate a final image includes:
and controlling and reducing the image brightness parameter of the region corresponding to the target object so as to enable the image to be processed to form an image with a silhouette effect.
Optionally, the step of acquiring the image to be processed is displaying the image acquired in real time by the image acquisition device through an image preview interface;
the step of determining the target object in the image to be processed is as follows: responding to a selection operation acted in an image preview interface, and taking an image area determined according to the selection operation as a target object;
the step of controlling and adjusting the image parameters of the region corresponding to the target object to generate the final image is as follows: and controlling and adjusting the image parameters of the area corresponding to the target object, and displaying the adjusted image through an image preview interface.
Through the computer readable storage medium, a user acquires an image to be processed from a saved album or directly uses a preview image displayed in an image preview interface as the image to be processed, further determines a target object in the image to be processed, and controls and adjusts image parameters of an area corresponding to the target object to generate a final image, so that the user can acquire a shooting work with creative effect in a shooting process, and user experience is improved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the particular illustrative embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, but is intended to cover various modifications, equivalent arrangements, and equivalents thereof, which may be made by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.