CN107977947B - Image processing method and mobile terminal - Google Patents

Image processing method and mobile terminal Download PDF

Info

Publication number
CN107977947B
CN107977947B CN201711400229.4A CN201711400229A CN107977947B CN 107977947 B CN107977947 B CN 107977947B CN 201711400229 A CN201711400229 A CN 201711400229A CN 107977947 B CN107977947 B CN 107977947B
Authority
CN
China
Prior art keywords
area
corner
fillet
preset
pixel
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
CN201711400229.4A
Other languages
Chinese (zh)
Other versions
CN107977947A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201711400229.4A priority Critical patent/CN107977947B/en
Publication of CN107977947A publication Critical patent/CN107977947A/en
Application granted granted Critical
Publication of CN107977947B publication Critical patent/CN107977947B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • G06T5/77
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Abstract

The invention discloses an image processing method and a mobile terminal, wherein the method comprises the following steps: determining a fillet area and a corner area corresponding to any corner in a target image according to a first preset fillet coefficient corresponding to the corner; determining an effective area in the corner area according to the pixel value of each pixel point in the image corresponding to the corner area, wherein the effective area represents an area containing effective image information in the corner area; and compressing the image corresponding to the effective area and the image corresponding to the fillet area according to a preset compression algorithm. The invention can realize the image fillet display, simultaneously avoid the loss of effective image information and effectively improve the display effect of the image fillet display.

Description

Image processing method and mobile terminal
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image processing method and a mobile terminal.
Background
With the development of terminal technology, intelligent terminals such as mobile phones and tablet computers are widely applied to daily life of people. Before intelligent terminal shows the image, for pleasing to the eye demand, generally can handle the corner of image, replace original corner with the tangent circular arc in one section both sides with the corner in order to form the fillet, realize showing fillet image in intelligent terminal.
At present, when the intelligent terminal processes the corner of the image, specifically, the corner part except the corner in the image is cut off according to the fillet coefficient (the radius corresponding to the fillet), or the black floating layer is covered on the image corresponding to the corner part except the fillet to realize the fillet display of the image.
However, when the above method is used to round the image, the image corresponding to the corner portion other than the round corner is discarded, and if the partial image includes effective image information such as a timestamp or a character, the effective image information is lost when the image is displayed at the round corner, which affects the display effect of the image display at the round corner.
Disclosure of Invention
The embodiment of the invention provides an image processing method and a mobile terminal, and aims to solve the problem that effective image information is lost when an image fillet is displayed in the prior art.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides an image processing method, including:
determining a fillet area and a corner area corresponding to any corner in a target image according to a first preset fillet coefficient corresponding to the corner;
determining an effective area in the corner area according to the pixel value of each pixel point in the image corresponding to the corner area, wherein the effective area represents an area containing effective image information in the corner area;
and compressing the image corresponding to the effective area and the image corresponding to the fillet area according to a preset compression algorithm.
In a second aspect, an embodiment of the present invention further provides a mobile terminal, including:
the determining module is used for determining a fillet area and a corner area corresponding to any corner in the target image according to a first preset fillet coefficient corresponding to the corner;
the determining module is further configured to determine an effective area in the corner area according to a pixel value of each pixel point in the image corresponding to the corner area, where the effective area represents an area containing effective image information in the corner area;
and the compression module is used for compressing the image corresponding to the effective area and the image corresponding to the fillet area according to a preset compression algorithm.
In a third aspect, an embodiment of the present invention further provides a mobile terminal, including a processor, a memory, and an image processing program stored on the memory and executable on the processor, where the image processing program, when executed by the processor, implements the steps of the image processing method described above.
In a fourth aspect, the embodiment of the present invention further provides a computer storage medium, on which an image processing program is stored, and the image processing program, when executed by a processor, implements the steps of the image processing method as described above.
In the embodiment of the invention, the fillet area and the corner area corresponding to any corner in the target image are determined according to the first preset fillet coefficient corresponding to the corner, the effective area containing effective image information is determined in the corner area according to the pixel value of each pixel point in the image corresponding to the corner area, and then the image corresponding to the effective area and the image corresponding to the fillet area are compressed to the fillet area according to the preset compression algorithm, so that the fillet image corresponding to the corner is obtained in the fillet area, the fillet image corresponding to the corner is avoided while the fillet display of the image is realized, and the display effect of the fillet display of the image is effectively improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a target image provided by an embodiment of the invention;
FIG. 3 is a schematic diagram of a fillet area and a corner area provided by an embodiment of the invention;
FIG. 4 is a schematic illustration of a fillet processing process provided by an embodiment of the present invention;
FIG. 5 is a schematic diagram of a target image corner display provided by an embodiment of the present 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 diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following specific embodiments and accompanying drawings, and it is to be understood that the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The technical solutions provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Example 1
Fig. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention. The method may be as follows.
Step 102: and determining a fillet area and a corner area corresponding to any corner in the target image according to a first preset fillet coefficient corresponding to the corner.
Wherein the corners represent the included angles between adjacent sides of the target image.
Fig. 2 is a schematic diagram of a target image according to an embodiment of the present invention.
As shown in fig. 2, the target image is a right-angle image, i.e. the target image includes four corners, and all four corners are right angles.
And aiming at any corner in the target image, determining a fillet area and a corner area corresponding to the corner according to a first preset fillet coefficient corresponding to the corner, wherein the first preset fillet coefficient corresponding to the corner is the radius corresponding to the fillet.
It should be noted that the first preset fillet coefficient may be determined according to actual situations, and is not specifically limited herein.
Preferably, the rounded corner corresponding to any corner in the target image is a quarter circle, i.e. a 90 ° arc.
Fig. 3 is a schematic diagram of a fillet area and a corner area provided by an embodiment of the invention.
As shown in fig. 3, the corner a is a 90 ° right angle, the first predetermined fillet coefficient a corresponding to the corner a, and the fillet corresponding to the first predetermined fillet coefficient a is an arc L having an angle of 90 ° and a radius of a1. The corner area 31 is a circular arc L1The fillet area 32 is a circular arc L except for the area including the corner A1An inner region. The corner regions 31 and the rounded corner regions 32 together form a square region with a side length a.
Step 104: and determining an effective area in the corner area according to the pixel value of each pixel point in the image corresponding to the corner area.
The effective area indicates an area containing effective image information in the corner area.
In order to avoid losing valid image information (e.g., timestamps, text, etc.) in the corner regions when the target image is displayed in a rounded corner, valid regions containing valid image information are determined in the corner regions.
In the embodiment of the present invention, determining an effective area in a corner area according to a pixel value of each pixel point in an image corresponding to the corner area includes:
determining a background color corresponding to a first area formed by the fillet area and the corner area;
and determining an effective area in the corner area according to the pixel values of all pixel points in the image corresponding to the background color and the corner area.
Specifically, determining a background color corresponding to a first region jointly formed by a fillet region and a corner region includes:
performing region division on the first region through a region division algorithm to determine a connected domain in the first region;
counting the number of pixel points corresponding to any pixel value according to the pixel value of each pixel point in the image corresponding to the connected domain;
and determining the color corresponding to the pixel value with the largest number of pixel points as the background color.
Still taking the above fig. 3 as an example, the first area formed by the corner area and the fillet area together is a square with a side length a.
And carrying out region division on the first region through a region division algorithm to generate each characteristic region, then eliminating the isolated region, and finally obtaining the non-isolated connected region.
And for the determined connected domain, counting the number of pixel points corresponding to any pixel value according to the pixel value of each pixel point in the image corresponding to the connected domain, and determining the color corresponding to the pixel value with the largest number of pixel points as the background color of the first region.
For example, if the number of pixels corresponding to the pixel value 255 in the connected component is the largest, the background color of the first region is white.
In the embodiment of the present invention, determining an effective area in a corner area according to pixel values of pixels in an image corresponding to a background color and the corner area includes:
dividing the corner area into a second area and a third area according to a second preset fillet coefficient, wherein the second preset fillet coefficient is smaller than the first preset fillet coefficient, the second area comprises corners, and the third area is an area between the second area and the fillet area;
determining the pixel proportion corresponding to the background color in the second area, wherein the pixel proportion represents the proportion of the number of pixel points corresponding to the background color in the second area to the total number of pixel points;
if the pixel proportion is larger than the preset proportion threshold value, increasing the second preset fillet coefficient by a preset value to serve as a new second preset fillet coefficient until the pixel proportion is not larger than the preset proportion threshold value;
and if the pixel proportion is not larger than the preset proportion threshold value, determining the third area as the effective area.
Still taking the above-mentioned fig. 3 as an example, the corner area is divided into a second area and a third area according to a second preset fillet coefficient, so as to obtain a schematic diagram in the fillet processing process shown in fig. 4. Fig. 4 is a schematic diagram of a fillet processing process according to an embodiment of the present invention.
As shown in fig. 4, the second predetermined fillet coefficient is b, and the fillet corresponding to the second predetermined fillet coefficient b is an arc L with an angle of 90 ° and a radius of b2. Arc L2The corner area is divided into a second area 42 and a third area 43. The second area 42 includes a corner a and the third area 43 is the area between the second area 42 and the fillet area 41. The fillet area 41, the second area 42 and the third area 42 together constitute a first area: a square area with a side length of a, wherein a>b。
And according to the determined background color corresponding to the first region, counting the number z of the total pixels in the second region and the number x of the pixels corresponding to the background color, and further determining the pixel proportion x/z corresponding to the background color in the second region, namely determining the proportion of the number x of the pixels corresponding to the background color in the second region to the number z of the total pixels.
If the pixel proportion corresponding to the background color in the second area is greater than the preset proportion threshold value m, namely x/z > m, most of the second area can be determined to be the background color, namely the second area is an invalid area and does not include valid image information.
And then the second preset fillet coefficient increasing preset value is used as a new second preset fillet coefficient, along with the increase of the second preset fillet coefficient, the area of the second area is increased, and the area of the third area is reduced. The above steps are repeatedly executed to determine the pixel proportion corresponding to the background color in the second region, until the pixel proportion corresponding to the background color in the second region is not greater than a preset proportion threshold value m, namely x/z is not greater than m, the second region can be determined as an invalid region with the largest area and without the effective image information, the third region starts to include the effective image information in the target image, and the third region is determined as an effective region.
It should be noted that the second preset fillet coefficient, the preset proportion threshold value, and the preset value may be determined according to actual situations, and are not specifically limited herein.
For example, the second preset fillet coefficient is the same as the preset value, and is the distance between 1 pixel point; the preset value is preset with a proportional threshold of 90%. Namely, the second preset fillet coefficient determines the pixel proportion corresponding to the background color in the second area from the distance of 1 pixel point, and when the pixel proportion is determined to be not more than 90%, the second preset fillet coefficient is increased by the distance of 1 pixel point to serve as a new second preset fillet coefficient, the steps are repeatedly executed to determine the pixel proportion corresponding to the background color in the second area, and until the pixel proportion is not more than 90% of the preset proportion threshold, the third area is determined to be an effective area.
Step 106: and compressing the image corresponding to the effective area and the image corresponding to the fillet area according to a preset compression algorithm.
After the effective area containing the effective image information is determined in the corner area, a preset compression algorithm is adopted, and the image corresponding to the effective area and the image corresponding to the fillet area are compressed into the fillet area, so that the fillet image corresponding to the corner is obtained in the fillet area.
Compare with the fillet image that the image that corresponds the corner region and the image compression that the fillet region corresponds in order to obtain the corner correspondence with the fillet region, compress the image that the effective area corresponds in the corner region and the image compression that the fillet region corresponds in the fillet region, can reduce the deformation degree of the fillet image that the corner that obtains corresponds, improve the display effect of fillet image.
In the embodiment of the present invention, the preset compression algorithm includes: and (4) correcting algorithm based on longitude and latitude.
It should be noted that the preset compression algorithm may be a correction algorithm based on latitude and longitude, a correction algorithm based on concentric circles, or other compression algorithms, which is not specifically limited herein.
In the embodiment of the present invention, after obtaining the fillet image corresponding to the corner in the fillet area, the method further includes:
and displaying the image corresponding to the corner area according to a preset display effect.
After the fillet image corresponding to the corner is obtained in the fillet area by the method, the image corresponding to the corner area, that is, the part which can be discarded except the fillet, can be displayed by filling some preset colors (for example, pure colors such as black, white and blue, transparent colors, etc.) or filling the preset images to the image corresponding to the corner.
In practical application, the image processing method may be adopted to perform fillet processing on one or more corners in the target image so as to realize fillet display of the target image.
Still taking the target image shown in fig. 2 as an example, the image processing method is adopted to perform fillet processing on four corners in the target image, so as to obtain the fillet display effect shown in fig. 5. Fig. 5 is a schematic diagram of a target image fillet display according to an embodiment of the present invention.
According to the technical scheme, the fillet area and the corner area corresponding to any corner in the target image are determined according to the first preset fillet coefficient corresponding to the corner, the effective area containing effective image information is determined in the corner area according to the pixel value of each pixel point in the image corresponding to the corner area, and then the image corresponding to the effective area and the image corresponding to the fillet area are compressed to the fillet area according to the preset compression algorithm, so that the fillet image corresponding to the corner is obtained in the fillet area, the fillet display of the image is realized, meanwhile, the loss of the effective image information is avoided, and the display effect of the image fillet display is effectively improved.
Example 2
Fig. 6 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention. The mobile terminal 600 includes: a determination module 601 and a compression module 602, wherein:
the determining module 601 is configured to determine a fillet area and a corner area corresponding to any corner in the target image according to a first preset fillet coefficient corresponding to the corner;
the determining module 601 is further configured to determine an effective area in the corner area according to a pixel value of each pixel point in the image corresponding to the corner area, where the effective area indicates an area containing effective image information in the corner area;
the compressing module 602 is configured to compress an image corresponding to the effective area and an image corresponding to the fillet area according to a preset compression algorithm.
Optionally, the determining module 601 further includes: a determination unit, wherein:
the determining unit is used for determining the background color corresponding to a first area formed by the fillet area and the corner area;
and the determining unit is also used for determining an effective area in the corner area according to the pixel values of the pixel points in the image corresponding to the background color and the corner area.
Optionally, the determining unit is specifically configured to:
performing region division on the first region through a region division algorithm to determine a connected domain in the first region;
counting the number of pixel points corresponding to any pixel value according to the pixel value of each pixel point in the image corresponding to the connected domain;
and determining the color corresponding to the pixel value with the largest number of pixel points as the background color.
Optionally, the determining unit is specifically configured to:
dividing the corner area into a second area and a third area according to a second preset fillet coefficient, wherein the second preset fillet coefficient is smaller than the first preset fillet coefficient, the second area comprises corners, and the third area is an area between the second area and the fillet area;
determining the pixel proportion corresponding to the background color in the second area, wherein the pixel proportion represents the proportion of the number of pixel points corresponding to the background color in the second area to the total number of pixel points;
if the pixel proportion is larger than the preset proportion threshold value, increasing the second preset fillet coefficient by a preset value to serve as a new second preset fillet coefficient until the pixel proportion is not larger than the preset proportion threshold value;
and if the pixel proportion is not larger than the preset proportion threshold value, determining the third area as the effective area.
The mobile terminal provided by the embodiment of the present invention can implement each process in the method embodiments of fig. 1 to fig. 5, achieve the same technical effect, and is not described herein again in order to avoid repetition.
Figure 7 is a schematic diagram of a hardware configuration of a mobile terminal implementing various embodiments of the present invention,
the mobile terminal 700 includes, but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, a processor 710, a power supply 711, and the like. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 7 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 710 is configured to determine a fillet area and a corner area corresponding to any corner in the target image according to a first preset fillet coefficient corresponding to the corner; determining an effective area in the corner area according to the pixel value of each pixel point in the image corresponding to the corner area, wherein the effective area represents an area containing effective image information in the corner area; and compressing the image corresponding to the effective area and the image corresponding to the fillet area according to a preset compression algorithm.
According to the first preset fillet coefficient that any corner in the target image corresponds, the fillet area and the corner area that this corner corresponds are determined, the pixel value of each pixel point in the image that corresponds according to the corner area, the effective area that contains effective image information is determined in the corner area, and then according to the preset compression algorithm, compress the image that the effective area corresponds and the image that the fillet area corresponds to the fillet area, make the fillet image that obtains this corner correspondence in the fillet area, thereby avoid losing of effective image information when realizing image fillet demonstration, effectively improve the display effect that the image fillet shows.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 701 may be used for receiving and sending signals during a message transmission and reception process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 710; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 701 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 701 may also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access via the network module 702, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
The audio output unit 703 may convert audio data received by the radio frequency unit 701 or the network module 702 or stored in the memory 709 into an audio signal and output as sound. Also, the audio output unit 703 may also provide audio output related to a specific function performed by the mobile terminal 700 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 703 includes a speaker, a buzzer, a receiver, and the like.
The input unit 704 is used to receive audio or video signals. The input Unit 704 may include a Graphics Processing Unit (GPU) 7041 and a microphone 7042, and the Graphics processor 7041 processes image data of a still picture 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 706. The image frames processed by the graphic processor 7041 may be stored in the memory 709 (or other storage medium) or transmitted via the radio unit 701 or the network module 702. The microphone 7042 may receive sounds and may be capable of processing such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 701 in case of a phone call mode.
The mobile terminal 700 also includes at least one sensor 705, 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 the display panel 7061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 7061 and/or a backlight when the mobile terminal 700 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 to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 705 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 706 is used to display information input by the user or information provided to the user. The Display unit 706 may include a Display panel 7061, and the Display panel 7061 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 707 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 707 includes a touch panel 7071 and other input devices 7072. The touch panel 7071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 7071 (e.g., operations by a user on or near the touch panel 7071 using a finger, a stylus, or any other suitable object or attachment). The touch panel 7071 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 710, receives a command from the processor 710, and executes the command. In addition, the touch panel 7071 can be implemented by various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 707 may include other input devices 7072 in addition to the touch panel 7071. In particular, the other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 7071 may be overlaid on the display panel 7061, and when the touch panel 7071 detects a touch operation on or near the touch panel 7071, the touch operation is transmitted to the processor 710 to determine the type of the touch event, and then the processor 710 provides a corresponding visual output on the display panel 7061 according to the type of the touch event. Although the touch panel 7071 and the display panel 7061 are shown in fig. 7 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 7071 and the display panel 7061 may be integrated to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 708 is an interface through which an external device is connected to the mobile terminal 700. 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 708 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 700 or may be used to transmit data between the mobile terminal 700 and external devices.
The memory 709 may be used to store software programs as well as various data. The memory 709 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 709 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 710 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 709 and calling data stored in the memory 709, thereby integrally monitoring the mobile terminal. Processor 710 may include one or more processing units; preferably, the processor 710 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 processor 710.
The mobile terminal 700 may also include a power supply 711 (e.g., a battery) for powering the various components, and the power supply 711 may be logically coupled to the processor 710 via a power management system that may enable managing charging, discharging, and power consumption by the power management system.
In addition, the mobile terminal 700 includes some functional modules that are not shown, and thus will not be described in detail herein.
Preferably, an embodiment of the present invention further provides a mobile terminal, which includes a processor 710, a memory 709, and an image processing program stored in the memory 709 and capable of running on the processor 710, where the image processing program is executed by the processor 710 to implement each process of the above-mentioned embodiment of the image processing method, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
An embodiment of the present invention further provides a computer-readable storage medium, where an image processing program is stored on the computer-readable storage medium, and when the image processing program is executed by a processor, the image processing program implements each process of the image processing method in the embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
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 phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. 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 embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (6)

1. An image processing method, comprising:
determining a fillet area and a corner area corresponding to any corner in a target image according to a first preset fillet coefficient corresponding to the corner;
determining an effective area in the corner area according to the pixel value of each pixel point in the image corresponding to the corner area, wherein the effective area represents an area containing effective image information in the corner area;
compressing the image corresponding to the effective area and the image corresponding to the fillet area according to a preset compression algorithm,
determining an effective area in the corner area according to the pixel value of each pixel point in the image corresponding to the corner area, including:
determining a background color corresponding to a first area formed by the fillet area and the corner area;
determining an effective area in the corner area according to the background color and the pixel value of each pixel point in the image corresponding to the corner area,
determining an effective area in the corner area according to the background color and the pixel value of each pixel point in the image corresponding to the corner area, including:
dividing the corner area into a second area and a third area according to a second preset fillet coefficient, wherein the second preset fillet coefficient is smaller than the first preset fillet coefficient, the second area comprises the corner, and the third area is an area between the second area and the fillet area;
determining a pixel proportion corresponding to the background color in the second region, wherein the pixel proportion represents the proportion of the number of pixels corresponding to the background color in the second region to the total number of pixels;
if the pixel proportion is larger than a preset proportion threshold value, increasing the second preset fillet coefficient by a preset value to serve as a new second preset fillet coefficient until the pixel proportion is not larger than the preset proportion threshold value;
and if the pixel proportion is not greater than the preset proportion threshold value, determining the third area as the effective area.
2. The method of claim 1, wherein determining the background color corresponding to the first region formed by the fillet region and the corner region comprises:
performing region division on the first region through a region division algorithm, and determining a connected domain in the first region;
counting the number of pixel points corresponding to any pixel value according to the pixel value of each pixel point in the image corresponding to the connected domain;
and determining the color corresponding to the pixel value with the largest number of pixel points as the background color.
3. A mobile terminal, comprising:
the determining module is used for determining a fillet area and a corner area corresponding to any corner in the target image according to a first preset fillet coefficient corresponding to the corner;
the determining module is further configured to determine an effective area in the corner area according to a pixel value of each pixel point in the image corresponding to the corner area, where the effective area represents an area containing effective image information in the corner area;
a compression module for compressing the image corresponding to the effective area and the image corresponding to the fillet area according to a preset compression algorithm,
wherein the determining module further comprises:
the determining unit is used for determining the background color corresponding to a first area formed by the fillet area and the corner area;
the determining unit is further configured to determine an effective area in the corner area according to the background color and the pixel value of each pixel point in the image corresponding to the corner area,
wherein the determining unit is specifically configured to:
dividing the corner area into a second area and a third area according to a second preset fillet coefficient, wherein the second preset fillet coefficient is smaller than the first preset fillet coefficient, the second area comprises the corner, and the third area is an area between the second area and the fillet area;
determining a pixel proportion corresponding to the background color in the second region, wherein the pixel proportion represents the proportion of the number of pixels corresponding to the background color in the second region to the total number of pixels;
if the pixel proportion is larger than a preset proportion threshold value, increasing the second preset fillet coefficient by a preset value to serve as a new second preset fillet coefficient until the pixel proportion is not larger than the preset proportion threshold value;
and if the pixel proportion is not greater than the preset proportion threshold value, determining the third area as the effective area.
4. The mobile terminal of claim 3, wherein the determining unit is specifically configured to:
performing region division on the first region through a region division algorithm, and determining a connected domain in the first region;
counting the number of pixel points corresponding to any pixel value according to the pixel value of each pixel point in the image corresponding to the connected domain;
and determining the color corresponding to the pixel value with the largest number of pixel points as the background color.
5. A mobile terminal comprising a processor, a memory and an image processing program stored on the memory and executable on the processor, the image processing program when executed by the processor implementing the steps of the image processing method as claimed in claim 1 or claim 2.
6. A computer-readable storage medium, on which an image processing program is stored, which when executed by a processor implements the steps of the image processing method according to claim 1 or claim 2.
CN201711400229.4A 2017-12-22 2017-12-22 Image processing method and mobile terminal Active CN107977947B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711400229.4A CN107977947B (en) 2017-12-22 2017-12-22 Image processing method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711400229.4A CN107977947B (en) 2017-12-22 2017-12-22 Image processing method and mobile terminal

Publications (2)

Publication Number Publication Date
CN107977947A CN107977947A (en) 2018-05-01
CN107977947B true CN107977947B (en) 2019-12-24

Family

ID=62007434

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711400229.4A Active CN107977947B (en) 2017-12-22 2017-12-22 Image processing method and mobile terminal

Country Status (1)

Country Link
CN (1) CN107977947B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113412470B (en) * 2019-04-23 2023-09-08 华为技术有限公司 Method and device for processing image layer
CN113554547A (en) * 2020-04-24 2021-10-26 北京小米移动软件有限公司 Image processing method, image processing device, terminal equipment and storage medium
CN112261242B (en) * 2020-10-21 2022-09-27 合肥芯颖科技有限公司 Image data processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103985084A (en) * 2014-05-06 2014-08-13 青岛海信电器股份有限公司 Image processing method and device
CN106056604A (en) * 2016-05-27 2016-10-26 浙江工业大学 Automatic hollowing method of reinforced reality identifier
CN106875328A (en) * 2015-12-11 2017-06-20 北京新媒传信科技有限公司 Image processing method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103985084A (en) * 2014-05-06 2014-08-13 青岛海信电器股份有限公司 Image processing method and device
CN106875328A (en) * 2015-12-11 2017-06-20 北京新媒传信科技有限公司 Image processing method and device
CN106056604A (en) * 2016-05-27 2016-10-26 浙江工业大学 Automatic hollowing method of reinforced reality identifier

Also Published As

Publication number Publication date
CN107977947A (en) 2018-05-01

Similar Documents

Publication Publication Date Title
CN107957839B (en) Display control method and mobile terminal
CN107908383B (en) Screen color adjusting method and device and mobile terminal
CN108459797B (en) Control method of folding screen and mobile terminal
CN107886321B (en) Payment method and mobile terminal
CN107734170B (en) Notification message processing method, mobile terminal and wearable device
CN107734172B (en) Information display method and mobile terminal
CN107818038B (en) Information prompting method and mobile terminal
CN107153500B (en) Method and equipment for realizing image display
CN109739394B (en) SAR value processing method and mobile terminal
CN109727212B (en) Image processing method and mobile terminal
CN107977947B (en) Image processing method and mobile terminal
CN111093137B (en) Volume control method, volume control equipment and computer readable storage medium
CN110290263B (en) Image display method and mobile terminal
CN109343811B (en) Display adjustment method and terminal equipment
CN108536513B (en) Picture display direction adjusting method and mobile terminal
JP7467667B2 (en) Detection result output method, electronic device and medium
CN108335259B (en) Image processing method, image processing equipment and mobile terminal
CN108093119B (en) Strange incoming call number marking method and mobile terminal
CN109379575B (en) White balance processing method and mobile terminal
CN110740265B (en) Image processing method and terminal equipment
CN109257504B (en) Audio processing method and terminal equipment
CN108881775B (en) Video communication method and mobile terminal
CN108965701B (en) Jitter correction method and terminal equipment
CN109189517B (en) Display switching method and mobile terminal
CN108259808B (en) Video frame compression method and mobile terminal

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