CN107743199B - Image processing method, mobile terminal and computer readable storage medium - Google Patents

Image processing method, mobile terminal and computer readable storage medium Download PDF

Info

Publication number
CN107743199B
CN107743199B CN201711034575.5A CN201711034575A CN107743199B CN 107743199 B CN107743199 B CN 107743199B CN 201711034575 A CN201711034575 A CN 201711034575A CN 107743199 B CN107743199 B CN 107743199B
Authority
CN
China
Prior art keywords
image
pixel value
area
image file
target area
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
CN201711034575.5A
Other languages
Chinese (zh)
Other versions
CN107743199A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201711034575.5A priority Critical patent/CN107743199B/en
Publication of CN107743199A publication Critical patent/CN107743199A/en
Application granted granted Critical
Publication of CN107743199B publication Critical patent/CN107743199B/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/80Camera processing pipelines; Components thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/95Computational photography systems, e.g. light-field imaging systems
    • H04N23/951Computational photography systems, e.g. light-field imaging systems by using two or more images to influence resolution, frame rate or aspect ratio
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/40Extracting pixel data from image sensors by controlling scanning circuits, e.g. by modifying the number of pixels sampled or to be sampled
    • H04N25/44Extracting pixel data from image sensors by controlling scanning circuits, e.g. by modifying the number of pixels sampled or to be sampled by partially reading an SSIS array
    • H04N25/445Extracting pixel data from image sensors by controlling scanning circuits, e.g. by modifying the number of pixels sampled or to be sampled by partially reading an SSIS array by skipping some contiguous pixels within the read portion of the array
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/70SSIS architectures; Circuits associated therewith
    • H04N25/702SSIS architectures characterised by non-identical, non-equidistant or non-planar pixel layout

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Telephone Function (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the invention discloses an image processing method, a mobile terminal and a computer readable storage medium. The image processing method applied to the mobile terminal comprises the following steps: determining a target area which needs to execute a preset image operation in a first image generated based on a first image file, wherein the pixel value in the target area is a first pixel value, and the pixel value outside the target area is a second pixel value; the first image file is an image file stored in a first pixel storage format; performing the predetermined image operation based on the first pixel value and generating a third pixel value; performing pixel arrangement processing on the third pixel value to generate a fourth pixel value; and generating a second image file by combining the fourth pixel value and the second pixel value, wherein the second image file is an image file stored in a second pixel storage format.

Description

Image processing method, mobile terminal and computer readable storage medium
Technical Field
The present invention relates to the field of information technologies, and in particular, to an image processing method, a mobile terminal, and a computer-readable storage medium.
Background
When an all-in-one camera is used for image shooting, image data collected by a photosensitive element of the camera needs to be rearranged. If the number of involved pixel points is large, the rearrangement of the image data can lead to the problems of long sequencing time, slow file generation response rate of the target image and the like.
Disclosure of Invention
In view of the above, embodiments of the present invention are directed to an image processing method, a mobile terminal and a computer readable medium, which at least partially solve the above problems.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides an image processing method applied in a mobile terminal, including:
determining a target area which needs to execute a preset image operation in a first image generated based on a first image file, wherein the pixel value in the target area is a first pixel value, and the pixel value outside the target area is a second pixel value; the first image file is an image file stored in a first pixel storage format;
performing the predetermined image operation based on the first pixel value and generating a third pixel value;
performing pixel arrangement processing on the third pixel value to generate a fourth pixel value;
and generating a second image file by combining the fourth pixel value and the second pixel value, wherein the second image file is an image file stored in a second pixel storage format.
Based on the above scheme, the determining a target area in the first image file, where a predetermined image operation needs to be performed, includes:
determining a target area in the first image file, which needs to execute digital zoom processing;
the performing the predetermined image operation based on the first pixel value and generating a third pixel value includes:
performing digital zooming based on the first pixel value and generating the third pixel value.
Based on the above scheme, the determining a target area in the first image file, where a predetermined image operation needs to be performed, includes:
determining a target area in the first image file, which needs to execute special effect processing;
the performing the predetermined image operation based on the first pixel value and generating a third pixel value includes:
performing the special effect processing based on the first pixel value and generating the third pixel value.
Based on the scheme, when the target area is a face area, the special effect processing comprises face beautifying processing and/or face audit processing;
and/or the presence of a gas in the gas,
when the target area is a background area of a human face area, the special effect processing includes: and (5) stylizing treatment.
Based on the above scheme, the target region is a middle region of the first image.
Based on the scheme, the second image file is used for outputting a second image;
wherein the fourth pixel value is used for outputting the first area of the second image; the second pixel value is used for outputting a second area of the second image;
wherein an image resolution of the first region is higher than an image resolution of the second region.
In a second aspect, an embodiment of the present invention provides a mobile terminal, including:
the image processing device comprises a determining unit, a processing unit and a processing unit, wherein the determining unit is used for determining a target area which needs to execute a preset image operation in a first image generated based on a first image file, the pixel value in the target area is a first pixel value, and the pixel value outside the target area is a second pixel value; the first image file is an image file stored in a first pixel storage format;
a processing unit configured to perform the predetermined image operation based on the first pixel value and generate a third pixel value;
an arrangement unit, configured to perform pixel arrangement processing on the third pixel value to generate a fourth pixel value;
and the file generating unit is used for generating a second image file by combining the fourth pixel value and the second pixel value, wherein the second image file is an image file stored in a second pixel storage format.
Based on the above scheme, the determining unit is specifically configured to determine a target area in the first image file, where digital zoom processing needs to be performed;
the processing unit is specifically configured to perform digital zooming based on the first pixel value and generate the third pixel value.
In a third aspect, an embodiment of the present invention provides a mobile terminal, including: a memory, a processor, and a computer program stored on the memory and executed by the processor;
the memory is used for storing information;
the processor is connected with the memory and is used for realizing the image processing method provided by one or more of the above technical schemes by executing the computer program.
In a fourth aspect, an embodiment of the present invention is a computer-readable storage medium for storing a computer program; after being executed, the computer program can realize the image processing method provided by one or more of the technical solutions.
The embodiment of the invention provides an image processing method, a mobile terminal and a computer readable medium, which firstly determine a target area needing to execute a predetermined image operation, wherein the target area is usually a core area which is focused by a user. In the present embodiment, a predetermined image operation is further performed on the first pixel value in the core region to generate a third pixel value; and only the third pixel value is rearranged to obtain a fourth pixel value with high image resolution after arrangement. And generating a second image file by combining the fourth pixel value and a second pixel outside the target area of the first image file. The second image file may be used to output a target file that the user wants to see. In this way, it is obvious that in the process of generating the image file of the target image, only the predetermined image operation and the rearrangement operation are performed on part of the pixels, and the number of the pixels which need the predetermined image operation and the rearrangement is obviously reduced, so that the time and the computing resources consumed by the predetermined image operation and the pixel rearrangement are reduced, the response time delay is reduced, the response rate is improved, and the computing resources are saved; the method has the characteristics of small response time delay and less consumed computing resources.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention;
FIG. 2 is a diagram of a wireless communication system for the mobile terminal shown in FIG. 1;
fig. 3 is a schematic flowchart of an image processing method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a target region and a non-target region of another first image according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a second image provided by an embodiment of the invention;
fig. 6 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another mobile terminal according to an embodiment of the present invention;
fig. 8 is a schematic diagram of remosiac processing according to an embodiment of the present invention.
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 construction 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, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power 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:
the radio 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 the processor 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, the radio 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 duplex-Long Term Evolution), and TDD-LTE (Time Division duplex-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 the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi 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.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile 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, the audio 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.). The audio 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 a microphone 1042, the Graphics 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 the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing 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 the radio frequency unit 101 in case of a phone call mode. The microphone 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.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile 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), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), 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.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user 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, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch 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 the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch 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 the touch panel 1071, the user input unit 107 may include other 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, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display 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, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile 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. The interface 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 the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 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 by 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, and the like. Further, the memory 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.
The processor 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 the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 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 the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 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, the mobile terminal 100 may further include a bluetooth module or the like, which is not 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, where 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 an IP 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 and other 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 access to the EPC 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 functions Entity) 2036, and the like. The MME2031 is a control node that handles 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).
The 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 mobile terminal, the invention provides various embodiments of the method.
As shown in fig. 3, the present embodiment provides an image processing method applied in a mobile terminal, including:
step S110: determining a target area which needs to execute a preset image operation in a first image generated based on a first image file, wherein the pixel value in the target area is a first pixel value, and the pixel value outside the target area is a second pixel value; the first image file is an image file stored in a first pixel storage format;
step S120: performing the predetermined image operation based on the first pixel value and generating a third pixel value;
step S130: performing pixel arrangement processing on the third pixel value to generate a fourth pixel value;
step S140: and generating a second image file by combining the fourth pixel value and the second pixel value, wherein the second image file is an image file stored in a second pixel storage format.
The mobile terminal provided by the embodiment can be the mobile terminal shown in fig. 1. The mobile terminal can be a man-carried terminal carried by a user, such as a mobile phone, a tablet computer or a wearable device. The mobile terminal may be a vehicle-mounted terminal mounted on various vehicles or the like, or may be a device-mounted terminal carried by various toys or robots.
In this embodiment, the mobile terminal may include: all-in-one camera. The all-in-one camera can be a four-in-one camera. Taking a four-in-one camera as an example, the camera may include: the image processing method includes the steps of sensing light of N light-sensing elements of pixels, wherein the number of the generated pixel values after the light sensing is N, and when image acquisition of a small-area image is performed, weighting the brightness values of 4 adjacent pixels in order to improve the image quality of the small-area image (for example, in order to improve the brightness or definition of the pixel), and then considering the weighted brightness values as the brightness value of one pixel. In this way, the output image file includes only: the pixel value is N/4 pixels; therefore, the image size is reduced, meanwhile, the brightness of a single pixel in the image is improved, and the image quality is improved. The number of pixels included for a 4-in-one camera may be 1600 ten thousand, i.e., N is 1600 ten thousand. If a small-size image is output, an image of 400 ten thousand pixels is displayed.
The all-in-one camera may include: the M unifies the camera that has N pixel, N is for being not less than 2 integer, N is the biggest pixel number that this camera image acquisition can gather.
The image file displayed by the all-in-one camera can be as follows: a first type of image file comprising N pixels, and a second type of image file comprising N/M pixels. In this embodiment, the first image file may be the first type image file. In this embodiment, both N and M are positive integers not less than 2.
In this embodiment, the first pixel value generally refers to the pixel values of all pixels in the target area in the first image of the first image file, and is a set of the pixel values of all pixels in the target area. The second pixel value may be a set of pixel values for all pixels in the first image outside the target region. Similarly, in the embodiment of the present invention, the third pixel value and the fourth pixel value are also sets of pixel values of corresponding pixel values. Fig. 4 is a schematic diagram of a target region and a non-target region of a first image. The target region may be a middle region of the first image, and the non-target region may be a region other than the target region, for example, may be an edge region other than the middle region.
In step S120, a preset image operation is performed on the first pixel value to generate a third pixel value.
In some embodiments, the preset image operation may include: digital zooming. The target area may be enlarged by digital zoom processing such that the target area includes increased pixel values, e.g., increased pixels within the target area based on image difference processing. Of course, this is only an optional process for digital zooming, and specific implementation can be seen in various methods of digital zooming in the prior art.
In other embodiments, the preset image operation may further include: and (5) special effect operation. For example, a face beautification operation, which in turn may include: the operation of polishing skin, removing nevus, thinning face, whitening and so on.
The special effects operation may further include: the face audit processing operation makes the face perform deformation operation contrary to the normal face, for example, face distortion.
The special effect operation may further include: stylization operations, for example, through stylization operations, cause image regions to present a stylistic aspect, for example, old photo processing may cause a processed image to present the perception of an old photo.
In some embodiments, the special effects processing may further include: background replacement processing, and the like.
There are many kinds of special effect processing, and no examples are given here.
In summary, in some embodiments, the step S110 may include: determining a target area in the first image file, which needs to execute digital zoom processing; the step S120 may include: performing digital zooming based on the first pixel value and generating the third pixel value. In other embodiments, the step S110 may include: determining a target area in the first image file, which needs to execute special effect processing; the step S120 may include: performing the special effect processing based on the first pixel value and generating the third pixel value.
Further, when the target area is a face area, the special effect processing comprises face beautification processing and/or face audit processing; and/or when the target area is a background area of a human face area, the special effect processing comprises the following steps: and (5) stylizing treatment.
The face region may be a region in which a face image is displayed. In some embodiments, the face region may be a special case of the region where the target graphic element is located. Namely, the special effect processing is carried out on the area where the target graphic element is located. The target graphic elements can be various areas such as human face graphic elements and building graphic elements.
In some embodiments, the target region is a middle region of the first image. The middle region of an image is usually the core region where the user's sight is focused on, and in this embodiment, the target region may be directly the middle region.
In some embodiments, the middle area may be an area determined based on a user operation, or may be an area automatically determined based on a built-in instruction. For example, when the target region is a middle region, the target region may be an image region that is automatically determined based on a built-in instruction and that extends a preset area outward centered on a center point of the first image.
Further, the second image file is used for outputting a second image;
wherein the fourth pixel value is used for outputting the first area of the second image; the second pixel value is used for outputting a second area of the second image;
wherein an image resolution of the first region is higher than an image resolution of the second region.
The pixel storage format of the second image file is different from that of the first image file in this embodiment. In this embodiment, the second image obtained by directly outputting the second image file includes more pixels than the first image.
In this embodiment, the second image includes: a first region and a second region. The first region is an image region generated based on the fourth pixel value, and the second region is an image region generated based on the second pixel value. In the present embodiment, the image resolution of the first area is higher than the image resolution of the second area. That is, the number of pixels included in a unit area in the first region is larger than the number of pixels included in a unit area in the second region. In this case, the image sharpness of the first area is higher than the image sharpness of the second area. However, since the second area is not an area concerned by the user, it is not problematic for the user that the image definition is slightly low, and the user experience is not affected.
As shown in fig. 5, the pattern in the first area is formed based on the fourth pixel value, and the pattern in the second area is formed based on the second pixel value.
In summary, the pixel storage formats of the first image file and the second image file are different. For example, the pixel coordinates corresponding to a certain pixel value in the first image file may be different in the second image file. The pixel arrangement processing in step S130 may include: rearrangement of pixel coordinates of pixel values.
As shown in fig. 6, the present embodiment provides a mobile terminal, including:
a determining unit 310, configured to determine a target area in a first image generated based on a first image file, where a predetermined image operation needs to be performed, where a pixel value located in the target area is a first pixel value, and a pixel value located outside the target area is a second pixel value; the first image file is an image file stored in a first pixel storage format;
a processing unit 320 for performing the predetermined image operation based on the first pixel value and generating a third pixel value;
an arranging unit 330, configured to perform pixel arrangement processing on the third pixel value to generate a fourth pixel value;
the file generating unit 340 is configured to generate a second image file by combining the fourth pixel value and the second pixel value, where the second image file is an image file stored in a second pixel storage format.
The determining unit 310, the processing unit 320, the arranging unit 330, and the file generating unit 340 may all correspond to a processor. The processor may implement operations such as execution of a preset operation, generation of a second image file, and the like through execution of a computer program or application software.
The processor may be a central processing unit, microprocessor, digital signal processor, application processor, programmable array or application specific integrated circuit, or the like.
Optionally, the determining unit 310 is specifically configured to determine a target area in the first image file, where digital zoom processing needs to be performed; the processing unit 320 is specifically configured to perform digital zooming based on the first pixel value and generate the third pixel value.
Optionally, the determining unit 310 may be specifically configured to determine a target area in the first image file, where digital zoom processing needs to be performed; the processing unit 320 is specifically configured to perform digital zooming based on the first pixel value and generate the third pixel value.
Further, the determining unit 310 is further configured to determine a target area in the first image file, where special effect processing needs to be performed; the processing unit 320 is further configured to perform the special effect processing based on the first pixel value and generate the third pixel value.
Further, when the target area is a face area, the special effect processing comprises face beautification processing and/or face audit processing; and/or when the target area is a background area of a human face area, the special effect processing comprises the following steps: and (5) stylizing treatment.
Optionally, the target region is a middle region of the first image.
In some embodiments, the second image file is for outputting a second image; wherein the fourth pixel value is used for outputting the first area of the second image; the second pixel value is used for outputting a second area of the second image; wherein an image resolution of the first region is higher than an image resolution of the second region.
As shown in fig. 7, the present embodiment provides a mobile terminal, including: a memory 420, a processor 430, and computer programs stored on the memory 420 and executed by the processor 430;
the memory 420 is used for storing information;
the processor 430 is connected to the memory 420, and is configured to implement the image processing method provided by one or more of the foregoing embodiments by executing the computer program.
In some embodiments, the electronic device further comprises a display screen; the display screen is connected to the processor 420, and may be various types of display screens such as a liquid crystal display screen, an Organic Light Emitting Diode (OLED) display screen, and an electronic ink display screen.
The memory 420 may include: and a memory 420 for various types of storage media that can store information.
The processor 430 is connected to the touch screen and the memory 420, for example, connected to the touch screen and the memory 420 through an integrated circuit bus, and the like, and may be configured to read and execute a computer program and the like on the memory 420 to implement the image processing method provided by one or more of the foregoing technical solutions.
In an embodiment of the invention, the processor 430 may include: a central processing unit, a microprocessor, a digital signal processor, an application processor, a programmable array or an application specific integrated circuit, etc.
An embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored; after being executed, the computer program can realize the image processing method provided by one or more of the technical solutions.
The computer-readable storage medium provided by the embodiment of the invention can be various types of storage media, for example, various storage media such as a random access memory, a read only memory, a flash memory, a DVD or a usb disk, and can be selected to be a non-transitory storage medium.
The following provides a specific example based on any of the embodiments described above:
in this example, when shooting is performed using a four-in-one camera, an image of 400 ten thousand pixels may be obtained. The 400-ten-thousand-pixel image substantially includes 1600-thousand pixels, but due to the 4-pixel merging process, if the image file generated by the acquisition is directly output, only one 400-thousand-pixel image can be output. The remosiac process may be a one-pixel rearrangement process based on a software algorithm. For example, pixel values sorted by a pseudo Bayer pattern are converted into a standard Bayer pattern (Bayer pattern), and pixel rearrangement is performed. In particular implementations, the remosiac processing may further include: some image quality improvement processes, for example, perform Bad Pixel Correction (BPC), which may include: removal of noise points, etc.
In fig. 8, one square may represent one pixel; the same filled tile may be used to provide pixel parameters, e.g., luminance values, for the same pixel of the first image prior to remoiac processing. The differently filled tiles may be used to provide pixel parameters for different pixels in the first image prior to remoiac processing.
After remosiac processing is completed, the identically filled squares are broken up, and the pixel values that correspond to providing pixel parameters for the same pixel are broken up for rearrangement.
Fig. 8 is a diagram showing an arrangement change of pixel values after remosiac processing. It is apparent that the pixel storage formats (i.e., pixel arrangements) before and after remosiac processing are different.
If an image of 1600 ten thousand pixels needs to be shot, the terminal needs to perform remosilac processing on the preview image shot by the camera, that is, to rearrange the pixel points, and then obtain a target image.
The remosiac treatment may include: the pixel values of 1600 ten thousand pixels, which can output an image of 400 ten thousand pixels, are subjected to rearrangement processing of the pixel values in an image file, such as coordinate conversion and/or coordinate mapping.
In the application scenario, if digital zooming is required, in the prior art, digital zooming processing is performed on the middle area of the target image after remoiac processing is performed, that is, remoiac is performed first and then digital zooming is performed. In the scheme, the terminal selects a middle area (which is related to the zoom size) of an image shot by the four-in-one camera according to the zoom size, then performs digital zoom processing on the middle area, and performs remosiac processing on the area after the digital zoom processing, that is, remosiac processing is performed only on the area after the digital zoom without performing remosiac processing on all images, so that the processing speed is improved.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. An image processing method applied to a mobile terminal includes:
determining a target area which needs to execute a preset image operation in a first image generated based on a first image file, wherein the pixel value in the target area is a first pixel value, and the pixel value outside the target area is a second pixel value; the first image file is an image file stored in a first pixel storage format; when the target area is the middle area of the first image, determining an image area which takes the central point of the first image as the center and expands a preset area outwards as the target area based on a built-in instruction;
performing the predetermined image operation based on the first pixel value and generating a third pixel value;
performing pixel arrangement processing on the third pixel value to generate a fourth pixel value;
combining the fourth pixel value and the second pixel value to generate a second image file, wherein the second image file is an image file stored in a second pixel storage format;
the second image file is used for outputting a second image;
wherein the fourth pixel value is used for outputting the first area of the second image; the second pixel value is used for outputting a second area of the second image;
the number of pixels included in a unit area in the first region is greater than the number of pixels included in a unit area in the second region.
2. The method of claim 1,
the determining a target area in the first image file, which needs to execute a predetermined image operation, includes:
determining a target area in the first image file, which needs to execute digital zoom processing;
the performing the predetermined image operation based on the first pixel value and generating a third pixel value includes:
performing digital zooming based on the first pixel value and generating the third pixel value.
3. The method of claim 1,
the determining a target area in the first image file, which needs to execute a predetermined image operation, includes:
determining a target area in the first image file, which needs to execute special effect processing;
the performing the predetermined image operation based on the first pixel value and generating a third pixel value includes:
performing the special effect processing based on the first pixel value and generating the third pixel value.
4. The method of claim 3,
when the target area is a face area, the special effect processing comprises face beautifying processing and/or face audit processing;
and/or the presence of a gas in the gas,
when the target area is a background area of a human face area, the special effect processing includes: and (5) stylizing treatment.
5. The method according to any one of claims 1 to 4,
the target region is a middle region of the first image.
6. The method according to any one of claims 1 to 4,
the image resolution of the first region is higher than the image resolution of the second region.
7. A mobile terminal, comprising:
the image processing device comprises a determining unit, a processing unit and a processing unit, wherein the determining unit is used for determining a target area which needs to execute a preset image operation in a first image generated based on a first image file, the pixel value in the target area is a first pixel value, and the pixel value outside the target area is a second pixel value; the first image file is an image file stored in a first pixel storage format; when the target area is the middle area of the first image, determining an image area which takes the central point of the first image as the center and expands a preset area outwards as the target area based on a built-in instruction;
a processing unit configured to perform the predetermined image operation based on the first pixel value and generate a third pixel value;
an arrangement unit, configured to perform pixel arrangement processing on the third pixel value to generate a fourth pixel value;
the file generating unit is used for generating a second image file by combining the fourth pixel value and the second pixel value, wherein the second image file is an image file stored in a second pixel storage format;
wherein the second image file is used for outputting a second image;
wherein the fourth pixel value is used for outputting the first area of the second image; the second pixel value is used for outputting a second area of the second image;
the number of pixels included in a unit area in the first region is greater than the number of pixels included in a unit area in the second region.
8. The mobile terminal of claim 7,
the determining unit is specifically configured to determine a target area in the first image file, where digital zoom processing needs to be performed;
the processing unit is specifically configured to perform digital zooming based on the first pixel value and generate the third pixel value.
9. A mobile terminal, comprising: a memory, a processor, and a computer program stored on the memory and executed by the processor;
the memory is used for storing information;
the processor, connected to the memory, is configured to implement the image processing method provided in any one of claims 1 to 6 by executing the computer program.
10. A computer-readable storage medium for storing a computer program; the computer program, when executed, is capable of implementing the image processing method as provided in any one of claims 1 to 6.
CN201711034575.5A 2017-10-30 2017-10-30 Image processing method, mobile terminal and computer readable storage medium Active CN107743199B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711034575.5A CN107743199B (en) 2017-10-30 2017-10-30 Image processing method, mobile terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711034575.5A CN107743199B (en) 2017-10-30 2017-10-30 Image processing method, mobile terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107743199A CN107743199A (en) 2018-02-27
CN107743199B true CN107743199B (en) 2020-05-15

Family

ID=61233101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711034575.5A Active CN107743199B (en) 2017-10-30 2017-10-30 Image processing method, mobile terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107743199B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110956679B (en) * 2018-09-26 2023-07-14 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment and computer readable storage medium
CN111028137B (en) * 2018-10-10 2023-08-15 Oppo广东移动通信有限公司 Image processing method, apparatus, electronic device, and computer-readable storage medium
CN111294905B (en) * 2020-02-03 2023-04-25 RealMe重庆移动通信有限公司 Image processing method, image processing device, storage medium and electronic apparatus

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105096241A (en) * 2015-07-28 2015-11-25 努比亚技术有限公司 Face image beautifying device and method
CN105321147A (en) * 2014-06-25 2016-02-10 腾讯科技(深圳)有限公司 Image processing method and apparatus
CN106507068A (en) * 2016-11-29 2017-03-15 广东欧珀移动通信有限公司 Image processing method and device, control method and device, imaging and electronic installation
CN106507019A (en) * 2016-11-29 2017-03-15 广东欧珀移动通信有限公司 Control method, control device, electronic installation
CN106506984A (en) * 2016-11-29 2017-03-15 广东欧珀移动通信有限公司 Image processing method and device, control method and device, imaging and electronic installation
CN106507067A (en) * 2016-11-29 2017-03-15 广东欧珀移动通信有限公司 Control method, control device and electronic installation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105321147A (en) * 2014-06-25 2016-02-10 腾讯科技(深圳)有限公司 Image processing method and apparatus
CN105096241A (en) * 2015-07-28 2015-11-25 努比亚技术有限公司 Face image beautifying device and method
CN106507068A (en) * 2016-11-29 2017-03-15 广东欧珀移动通信有限公司 Image processing method and device, control method and device, imaging and electronic installation
CN106507019A (en) * 2016-11-29 2017-03-15 广东欧珀移动通信有限公司 Control method, control device, electronic installation
CN106506984A (en) * 2016-11-29 2017-03-15 广东欧珀移动通信有限公司 Image processing method and device, control method and device, imaging and electronic installation
CN106507067A (en) * 2016-11-29 2017-03-15 广东欧珀移动通信有限公司 Control method, control device and electronic installation

Also Published As

Publication number Publication date
CN107743199A (en) 2018-02-27

Similar Documents

Publication Publication Date Title
CN107093418B (en) Screen display method, computer equipment and storage medium
CN106993136B (en) Mobile terminal and multi-camera-based image noise reduction method and device thereof
CN108198150B (en) Method for eliminating image dead pixel, terminal and storage medium
CN107295270B (en) Image brightness value determination method and device, terminal and computer-readable storage medium
CN108038834B (en) Method, terminal and computer readable storage medium for reducing noise
CN108459799B (en) Picture processing method, mobile terminal and computer readable storage medium
CN109710159B (en) Flexible screen response method and device and computer readable storage medium
CN110069122B (en) Screen control method, terminal and computer readable storage medium
CN107743199B (en) Image processing method, mobile terminal and computer readable storage medium
CN108900779B (en) Initial automatic exposure convergence method, mobile terminal and computer-readable storage medium
CN112188082A (en) High dynamic range image shooting method, shooting device, terminal and storage medium
CN111654628A (en) Video shooting method and device and computer readable storage medium
CN109963005B (en) Adjusting method of double-screen brightness adjusting system and computer storage medium
CN108848321B (en) Exposure optimization method, device and computer-readable storage medium
CN111324407A (en) Animation display method, terminal and computer readable storage medium
CN107749054B (en) Image processing method, device and storage medium
CN111381762A (en) Double-screen switching method and device and computer readable storage medium
CN112135045A (en) Video processing method, mobile terminal and computer storage medium
CN112423102A (en) Small window screen projection control method and device and computer readable storage medium
CN112423211A (en) Multi-audio transmission control method, equipment and computer readable storage medium
CN108183833B (en) Response processing method and device and computer readable storage medium
CN107743204B (en) Exposure processing method, terminal, and computer-readable storage medium
CN109885275B (en) Audio regulation and control method, equipment and computer readable storage medium
CN108196924B (en) Brightness adjusting method, terminal and computer readable storage medium
CN108154534B (en) Picture definition calibration method, terminal and computer readable 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