CN108460769B - image processing method and terminal equipment - Google Patents

image processing method and terminal equipment Download PDF

Info

Publication number
CN108460769B
CN108460769B CN201810200219.4A CN201810200219A CN108460769B CN 108460769 B CN108460769 B CN 108460769B CN 201810200219 A CN201810200219 A CN 201810200219A CN 108460769 B CN108460769 B CN 108460769B
Authority
CN
China
Prior art keywords
image
cutting
pixel
target
height
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
CN201810200219.4A
Other languages
Chinese (zh)
Other versions
CN108460769A (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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201810200219.4A priority Critical patent/CN108460769B/en
Publication of CN108460769A publication Critical patent/CN108460769A/en
Application granted granted Critical
Publication of CN108460769B publication Critical patent/CN108460769B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding

Abstract

The invention relates to the technical field of image processing, and discloses an image processing method and terminal equipment. The image processing method comprises the following steps: determining a target pixel aspect ratio of a target image; performing image cutting on the target image according to the width-height ratio of the target pixel to obtain at least two cut images; and respectively compressing the at least two cut images, and uploading the cut images obtained by compression to a server for storage. According to the invention, the segmentation display of the super-long proportion image is realized, and the definition of the super-long proportion image is ensured; meanwhile, through the segmented preview processing, the display efficiency of the image is improved, and the use experience of a user is enhanced.

Description

Image processing method and terminal equipment
Technical Field
the present invention relates to the field of image processing technologies, and in particular, to an image processing method and a terminal device.
background
With the rapid development of information technology, network bandwidth and computing power of devices are increasing day by day, and mobile devices play an increasingly important role in the life of people, thus affecting the aspects of people. Particularly, with the rise of multimedia technologies such as images, music, videos and the like, various multimedia social applications also appear in the market like bamboo shoots in spring after rain, and the images serve as a large important component in the multimedia and are a key point concerned by most of the multimedia social applications, so that the image display requirements of users are continuously met, and the image display requirements are also the key points of the applications.
for example, in an application scenario, a user uses a mobile phone (the mobile phone is only one of the terminal devices, and here, the mobile phone is taken as an example) camera to edit a pixel width-height ratio of 1: 10, and wants to share the image in its entirety into a social application. It is common practice to upload the entire image as a whole to the network after performing aspect compression and size compression. When the user browses, the mobile terminal application downloads the whole image to the local to realize browsing. However, there are situations that the image downloading speed is slow, which makes the user experience very poor, or the image may be blurred due to over-compression, and the performance is not good when the image is displayed on a mobile phone with poor performance.
Disclosure of Invention
The invention provides an image processing method and terminal equipment, which are used for realizing clear display of some oversized pictures.
The invention provides an image processing method, which comprises the following steps:
Determining a target pixel aspect ratio of a target image;
Performing image cutting on the target image according to the width-height ratio of the target pixel to obtain at least two cut images;
And respectively compressing the at least two cut images, and uploading the cut images obtained by compression to a server for storage.
Preferably, the determining the target pixel aspect ratio of the target image comprises:
acquiring the width and the height of a pixel of the target image;
and calculating the aspect ratio of the target pixel according to the aspect ratio of the pixel.
Preferably, the image cutting of the target image according to the target pixel width-to-height ratio to obtain at least two cut images includes:
comparing the target pixel aspect ratio with a preset pixel aspect ratio;
and when the width-to-height ratio of the target pixel is larger than the preset width-to-height ratio of the pixel, performing image cutting on the target image to obtain at least two cut images.
preferably, the image cutting of the target image to obtain at least two cut images includes:
and carrying out image cutting on the target image according to a preset pixel width-to-height ratio until the pixel width-to-height ratio of the rest part of the target image is not more than the preset pixel width-to-height ratio.
Preferably, the image segmentation of the target image according to the preset pixel width-to-height ratio specifically includes:
Cutting the pixel height value of the target image according to a preset pixel width-height ratio by taking the pixel width value of the target image as a reference; or
And cutting the pixel width value of the target image according to a preset pixel width-height ratio by taking the pixel height value of the target image as a reference.
Preferably, the method further comprises the following steps:
When the target image is subjected to image cutting, the cut images obtained through the image cutting are marked in sequence, and the position relation among the cut images is determined through the marked information obtained through marking.
Preferably, the compressing the at least two cut images respectively includes:
And respectively compressing the at least two cut images according to the preset maximum pixel width and height to obtain the cut image meeting the preset maximum pixel width and height.
Preferably, the method further comprises the following steps:
acquiring image list information of a target image, wherein the image list information comprises pixel width and height values of all cut images forming the target image;
Setting a corresponding placeholder map according to the pixel width and height values of all the cutting images;
and extracting the cutting image corresponding to the placeholder according to the selected placeholder for displaying.
Preferably, the image list information further includes mark information of each cut image, and the extracting the cut image corresponding to the placeholder map according to the selected placeholder map for displaying includes:
determining a corresponding cutting image according to the selected placeholder map;
sending an image extraction request to the server according to the mark information corresponding to the determined cutting image;
and receiving an image extraction response, acquiring a cutting image which is carried in the image extraction response and corresponds to the marking information, and displaying the cutting image.
The present invention also provides a terminal device, including:
a determination unit configured to determine a target pixel aspect ratio of a target image;
the cutting unit is used for carrying out image cutting on the target image according to the width-height ratio of the target pixel to obtain at least two cut images;
The compression unit is used for respectively compressing the at least two cut images;
And the uploading unit is used for uploading the cutting image obtained by compression to a server for storage.
Preferably, the determining unit is configured to obtain a pixel width and a height of the target image; and calculating the aspect ratio of the target pixel according to the aspect ratio of the pixel.
Preferably, the cutting unit is configured to compare the target pixel aspect ratio with a preset pixel aspect ratio; and when the width-to-height ratio of the target pixel is larger than the preset width-to-height ratio of the pixel, performing image cutting on the target image to obtain at least two cut images.
Preferably, the cutting unit is specifically configured to perform image cutting on the target image according to a preset pixel width-to-height ratio until the pixel width-to-height ratio of the remaining portion of the target image is not greater than the preset pixel width-to-height ratio.
Preferably, the cutting unit is specifically configured to:
cutting the pixel height value of the target image according to a preset pixel width-height ratio by taking the pixel width value of the target image as a reference; or
and cutting the pixel width value of the target image according to a preset pixel width-height ratio by taking the pixel height value of the target image as a reference.
preferably, the method further comprises the following steps:
And the marking unit is used for sequentially marking the cut images obtained by image cutting when the target image is subjected to image cutting, and determining the position relation among the cut images according to the marked information obtained by marking.
Preferably, the compressing unit is configured to compress the at least two cut images according to a preset maximum pixel width and height, respectively, to obtain a cut image meeting the preset maximum pixel width and height.
Preferably, the method further comprises the following steps:
The device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring image list information of a target image, and the image list information comprises pixel width and height values of all cut images forming the target image;
The setting unit is used for setting a corresponding placeholder map according to the pixel width and height values of all the cutting images;
And the display unit is used for extracting the cutting image corresponding to the placeholder map according to the selected placeholder map and displaying the cutting image.
Preferably, the image list information further includes mark information of each cut image, and the display unit is specifically configured to determine the corresponding cut image according to the selected placeholder map; sending an image extraction request to the server according to the mark information corresponding to the determined cutting image; and receiving an image extraction response, acquiring a cutting image which is carried in the image extraction response and corresponds to the marking information, and displaying the cutting image.
The invention also provides a terminal device comprising a memory and a processor, wherein the memory is used for storing a computer program, and the computer program realizes the steps of the image processing method when being executed by the processor.
the invention also provides a computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the method described above.
Compared with the prior art, the invention has at least the following advantages:
Determining a target pixel aspect ratio of a target image; performing image cutting on the target image according to the determined width-height ratio of the target pixel to obtain at least two cut images; further compressing at least two cut images obtained by cutting respectively, and uploading the compressed cut images to a server for storage; the image with the super-long proportion is cut and compressed, so that the segmentation display of the image with the super-long proportion is realized, and the definition of the image with the super-long proportion is ensured; meanwhile, through the segmented preview processing, the display efficiency of the image is improved, and the use experience of a user is enhanced.
Drawings
FIG. 1 is a flow chart of an image processing method provided by an embodiment of the invention;
FIG. 2 is a flowchart illustrating an embodiment of an image processing method according to the present invention;
Fig. 3 is a structural diagram of a terminal device according to an embodiment of the present invention;
Fig. 4 is a hardware configuration diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The present invention provides an image processing method and a terminal device, and the following describes in detail embodiments of the present invention with reference to the accompanying drawings.
reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
If a user needs to upload an image with a large difference in pixel aspect ratio (for example, an image with a pixel aspect ratio of 1:200 or a pixel aspect ratio of 200: 1) from a terminal device, the existing solutions usually ensure that the pixel aspect ratio and the file size of the image can be processed by the terminal device by limiting the maximum pixel width and the pixel height of the image (for example, limiting the maximum pixel width to 4000x4000), scaling the original image so that the image is limited to the maximum pixel width, cropping the content of the original image, and highly compressing the original image, however, the processing is bad, which may result in loss of information of the image and may not ensure the definition of the image, and in addition, when the terminal device is used to preview the image, the image can only be previewed as a whole.
To solve the above problems in the prior art, the present invention provides an image processing method, as shown in fig. 1, which is a flowchart of an image processing method provided in an embodiment of the present invention, and includes the steps of:
Step 101, determining a target pixel aspect ratio of a target image.
and 102, carrying out image cutting on the target image according to the width-height ratio of the target pixel to obtain at least two cut images.
and 103, respectively compressing the at least two cut images, and uploading the compressed cut images to a server for storage.
By the aid of the processing flow, segmentation and compression processing of the image with the super-long proportion are achieved, and definition of the image with the super-long proportion is guaranteed.
As shown in fig. 2, a flowchart is a specific implementation flow of the image processing method according to the embodiment of the present invention, and the image processing method specifically includes the following steps:
Step 201, acquiring the pixel width and height of the target image.
In this step, for a target image selected by a user, if a terminal device desires to acquire the pixel width and height of the target image, the target image may be directly acquired through image information carried in the target image, or may be obtained by directly analyzing the target image, which is certainly not limited to this, and any processing mode capable of acquiring the pixel width and height of the target image is within the protection scope of the present invention.
In step 202, a target pixel aspect ratio is calculated based on the pixel aspect ratio.
In an example, if the pixel width and height of the target image selected by the user is 2000 × 100, the target pixel width-height ratio is 20:1 as calculated by the pixel width and height.
step 203, comparing the target pixel aspect ratio with a preset pixel aspect ratio.
If the target pixel aspect ratio is greater than the predetermined pixel aspect ratio, go to step 204, otherwise go to step 206.
And 204, performing image cutting on the target image to obtain at least two cut images.
In this step, when the target image is cut, image cutting is performed on the target image according to a preset pixel width-to-height ratio, and cutting is stopped until the pixel width-to-height ratio of the remaining portion of the target image is not greater than the preset pixel width-to-height ratio, so as to obtain at least two cut images with the preset pixel width-to-height ratio, or at least one cut image with the preset pixel width-to-height ratio, and one cut image smaller than the preset pixel width-to-height ratio.
further, image segmentation is performed on the target image according to a preset pixel width-to-height ratio, which specifically includes any one of the following modes:
(1) and cutting the pixel height value of the target image according to a preset pixel width-height ratio by taking the pixel width value of the target image as a reference.
(2) And cutting the pixel width value of the target image according to a preset pixel width-height ratio by taking the pixel height value of the target image as a reference.
of course, the selection of the processing mode completely depends on the pixel width and the pixel height of the target image, and if the pixel width value is smaller than the pixel height value, the processing mode is selected to be (1); if the pixel width value is larger than the pixel height value, selecting (2) to process; in a special scenario, if the pixel width value is equal to the pixel height value, both (1) and (2) above can be applied.
as in the foregoing example, if the pixel width of the target image is 2000 × 100, the cutting process is performed according to (2) above, and if the preset pixel width-to-height ratio during cutting is 4:3, 26 cut images with a pixel width of 75 × 100 and 1 cut image with a pixel width of 50 × 100 can be obtained after image cutting.
In this step, still include:
When the target image is subjected to image cutting, the cut images obtained through the image cutting are marked in sequence, and the position relation among the cut images is determined through the marked information obtained through marking.
as in the foregoing example, for 27 cut images obtained by image cutting, each cut image is marked in turn in the order of cutting, so that the front-rear positional relationship between the cut images can be distinguished based on the marks.
Note that, in the marking, the marking may be performed by using numbers (for example, the first cut image mark 1, the second cut image mark 2 … …, and the 27 th image mark 27), but the marking method is not limited to this, and any other marking method may be used as long as the selected arbitrary marking method can be used to indicate the front-back positional relationship between the cut images.
step 205, the at least two cut images are compressed respectively.
In this step, the compressing the at least two cut images respectively includes:
And respectively compressing the at least two cut images according to the preset maximum pixel width and height to obtain the cut image meeting the preset maximum pixel width and height.
As in the previous example, the selected preset maximum pixel width is 80x80, and after the 26 cut images with 75x100 pixel width and 1 cut image with 50x100 pixel width are compressed according to the maximum pixel width, 26 cut images with 60x80 pixel width and 1 cut image with 40x80 pixel width are obtained.
Step 206, compressing the target image.
and directly compressing the target image according to the preset maximum pixel width and height to obtain the target image meeting the preset maximum pixel width and height.
and step 207, uploading the compressed image to a server for storage.
by the aid of the processing flow, segmentation and compression processing of the image with the super-long proportion are achieved, and definition of the image with the super-long proportion is guaranteed.
after the processed image is uploaded to the server, the embodiment of the present invention further includes a display portion of the processed image on the terminal device, which specifically includes:
acquiring image list information of a target image, wherein the image list information comprises pixel width and height values of all cut images forming the target image;
Setting a corresponding placeholder map according to the pixel width and height values of all the cutting images;
and extracting the cutting image corresponding to the placeholder according to the selected placeholder for displaying.
further, the image list information further includes mark information of each cut image, and the extracting and displaying of the cut image corresponding to the placeholder map according to the selected placeholder map includes:
determining a corresponding cutting image according to the selected placeholder map;
Sending an image extraction request to the server according to the mark information corresponding to the determined cutting image;
And receiving an image extraction response, acquiring a cutting image which is carried in the image extraction response and corresponds to the marking information, and displaying the cutting image.
As in the foregoing example, after acquiring the image list information of the target image, the terminal device sets the placeholder maps of the cut images according to the pixel width and height values of 27 cut images in the target image; after the occupation map desired to be displayed by the user is 11 (corresponding to the 11 th cut image), the occupation map is determined to correspond to the 11 th cut image according to the occupation map, the 11 th cut image is extracted from the server according to the mark information 11 of the 11 th cut image, and the 11 th cut image is displayed after the extraction.
Based on the image processing method provided by the present invention, the present invention further provides a terminal device, as shown in fig. 3, including:
a determination unit 31 for determining a target pixel aspect ratio of a target image;
The cutting unit 32 is configured to perform image cutting on the target image according to the target pixel width-to-height ratio to obtain at least two cut images;
a compressing unit 33, configured to compress the at least two cut images respectively;
And an uploading unit 34, configured to upload the compressed cutting image to a server for storage.
preferably, the determining unit 31 is configured to obtain a pixel width and a height of the target image; and calculating the aspect ratio of the target pixel according to the aspect ratio of the pixel.
Preferably, the cutting unit 32 is configured to compare the target pixel aspect ratio with a preset pixel aspect ratio; and when the width-to-height ratio of the target pixel is larger than the preset width-to-height ratio of the pixel, performing image cutting on the target image to obtain at least two cut images.
preferably, the cutting unit 32 is specifically configured to perform image cutting on the target image according to a preset pixel width-to-height ratio until the pixel width-to-height ratio of the remaining portion of the target image is not greater than the preset pixel width-to-height ratio.
Preferably, the cutting unit 32 is specifically configured to:
Cutting the pixel height value of the target image according to a preset pixel width-height ratio by taking the pixel width value of the target image as a reference; or
and cutting the pixel width value of the target image according to a preset pixel width-height ratio by taking the pixel height value of the target image as a reference.
preferably, the method further comprises the following steps:
and the marking unit 35 is configured to sequentially mark the cut images obtained by image cutting when the target image is subjected to image cutting, and determine a positional relationship between the cut images according to mark information obtained by marking.
preferably, the compressing unit 33 is configured to compress the at least two cut images according to a preset maximum pixel width and height, respectively, to obtain a cut image meeting the preset maximum pixel width and height.
Preferably, the method further comprises the following steps:
An obtaining unit 36, configured to obtain image list information of a target image, where the image list information includes pixel width and height values of each cut image forming the target image;
A setting unit 37, configured to set a corresponding placeholder map according to a pixel width and height value of each cut image;
and the display unit 38 is configured to extract the cut image corresponding to the selected placeholder map according to the placeholder map and display the cut image.
Preferably, the image list information further includes mark information of each cut image, and the display unit is specifically configured to determine the corresponding cut image according to the selected placeholder map; sending an image extraction request to the server according to the mark information corresponding to the determined cutting image; and receiving an image extraction response, acquiring a cutting image which is carried in the image extraction response and corresponds to the marking information, and displaying the cutting image.
the invention also provides a terminal device comprising a memory and a processor, wherein the memory is used for storing a computer program, and the computer program realizes the steps of the image processing method when being executed by the processor.
the invention also provides a computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the method described above.
based on the above description of the image processing scheme provided by the present invention, an embodiment of the present invention further provides a terminal device, as shown in fig. 4, for convenience of description, only a portion related to the embodiment of the present invention is shown, and details of the specific technology are not disclosed, please refer to the method portion of the embodiment of the present invention. The terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (personal digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, and the like, taking the terminal device as the mobile phone as an example:
Fig. 4 is a block diagram illustrating a partial structure of a mobile phone related to a terminal device provided in an embodiment of the present invention. Referring to fig. 4, the handset includes: radio Frequency (RF) circuitry 1510, memory 1520, input unit 1530, display unit 1540, sensor 1550, audio circuitry 1560, wireless fidelity (WiFi) module 1570, processor 1580, and power supply 1590. Those skilled in the art will appreciate that the handset configuration shown in fig. 4 is not intended to be limiting and 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 phone in detail with reference to fig. 4:
the RF circuit 1510 may be configured to receive and transmit signals during information transmission and reception or during a call, and in particular, receive downlink information of a base station and then process the received downlink information to the processor 1580; in addition, the data for designing uplink is transmitted to the base station. In general, RF circuit 1510 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuit 1510 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to global system for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
the memory 1520 may be used to store software programs and modules, and the processor 1580 performs various functional applications and data processing of the cellular phone by operating the software programs and modules stored in the memory 1520. The memory 1520 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 1520 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 1530 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 1530 may include a touch panel 1531 and other input devices 1532. The touch panel 1531, also referred to as a touch screen, can collect touch operations of a user (e.g., operations of the user on or near the touch panel 1531 using any suitable object or accessory such as a finger or a stylus) and drive corresponding connection devices according to a preset program. Alternatively, the touch panel 1531 may include two parts, 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, and sends the touch point coordinates to the processor 1580, and can receive and execute commands sent by the processor 1580. In addition, the touch panel 1531 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 1530 may include other input devices 1532 in addition to the touch panel 1531. In particular, other input devices 1532 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1540 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The Display unit 1540 may include a Display panel 1541, and optionally, the Display panel 1541 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 1531 may cover the display panel 1541, and when the touch panel 1531 detects a touch operation on or near the touch panel 1531, the touch operation is transmitted to the processor 1580 to determine the type of the touch event, and then the processor 1580 provides a corresponding visual output on the display panel 1541 according to the type of the touch event. Although in fig. 4, the touch panel 1531 and the display panel 1541 are two separate components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 1531 and the display panel 1541 may be integrated to implement the input and output functions of the mobile phone.
the handset can also include at least one sensor 1550, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 1541 according to the brightness of ambient light and a proximity sensor that turns off the display panel 1541 and/or the backlight when the mobile phone 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 gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuitry 1560, speaker 1561, and microphone 1562 may provide an audio interface between a user and a cell phone. The audio circuit 1560 may transmit the electrical signal converted from the received audio data to the speaker 1561, and convert the electrical signal into an audio signal by the speaker 1561 and output the audio signal; on the other hand, the microphone 1562 converts collected sound signals into electrical signals, which are received by the audio circuit 1560 and converted into audio data, which are processed by the audio data output processor 1580 and then passed through the RF circuit 1510 for transmission to, for example, another cellular phone, or for output to the memory 1520 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through a WiFi module 1570, and provides wireless broadband internet access for the user. Although fig. 4 shows WiFi module 1570, it is understood that it does not belong to the essential components of the handset and may be omitted entirely as needed within the scope not changing the essence of the invention.
the processor 1580 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 1520 and calling data stored in the memory 1520, thereby integrally monitoring the mobile phone. Optionally, the processor 1580 may include one or more processing units; preferably, the processor 1580 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, and the like, and a modem processor, which mainly handles wireless communications. It is to be appreciated that the modem processor may not be integrated into the processor 1580.
the handset also includes a power supply 1590 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 1580 via a power management system to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which are not described herein.
According to the invention, the image with the super-long proportion is cut and compressed, so that the segmentation display of the image with the super-long proportion is realized, and the definition of the image with the super-long proportion is ensured; meanwhile, through the segmented preview processing, the display efficiency of the image is improved, and the use experience of a user is enhanced.
It will be understood by those within the art that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. Those skilled in the art will appreciate that the computer program instructions may be implemented by a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, implement the features specified in the block or blocks of the block diagrams and/or flowchart illustrations of the present disclosure.
The modules of the device can be integrated into a whole or can be separately deployed. The modules can be combined into one module, and can also be further split into a plurality of sub-modules.
those skilled in the art will appreciate that the drawings are merely schematic representations of one preferred embodiment and that the blocks or flow diagrams in the drawings are not necessarily required to practice the present invention.
Those skilled in the art will appreciate that the modules in the devices in the embodiments may be distributed in the devices in the embodiments according to the description of the embodiments, and may be correspondingly changed in one or more devices different from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
the above-mentioned serial numbers of the present invention are for description only and do not represent the merits of the embodiments.
The above disclosure is only for a few specific embodiments of the present invention, but the present invention is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present invention.

Claims (14)

1. An image processing method, comprising:
determining a target pixel aspect ratio of a target image;
Performing image cutting on the target image according to the width-height ratio of the target pixel to obtain at least two cut images; performing image cutting on the target image according to a preset pixel width-height ratio until the pixel width-height ratio of the rest part of the target image is not greater than the preset pixel width-height ratio;
Compressing the at least two cut images respectively according to the preset maximum pixel width and height to obtain cut images meeting the preset maximum pixel width and height, and uploading the cut images obtained by compression to a server for storage;
acquiring image list information of a target image, wherein the image list information comprises pixel width and height values of all cut images forming the target image;
Setting a corresponding placeholder map according to the pixel width and height values of all the cutting images;
and extracting the cutting image corresponding to the placeholder according to the selected placeholder for displaying.
2. the method of claim 1, wherein determining a target pixel aspect ratio of a target image comprises:
Acquiring the width and the height of a pixel of the target image;
And calculating the aspect ratio of the target pixel according to the aspect ratio of the pixel.
3. The method of claim 1, wherein the image segmentation of the target image according to the target pixel aspect ratio to obtain at least two segmented images comprises:
Comparing the target pixel aspect ratio with a preset pixel aspect ratio;
And when the width-to-height ratio of the target pixel is larger than the preset width-to-height ratio of the pixel, performing image cutting on the target image to obtain at least two cut images.
4. The method according to claim 3, wherein the image segmentation of the target image according to a preset pixel width-to-height ratio specifically comprises:
cutting the pixel height value of the target image according to a preset pixel width-height ratio by taking the pixel width value of the target image as a reference; or
and cutting the pixel width value of the target image according to a preset pixel width-height ratio by taking the pixel height value of the target image as a reference.
5. The method of any one of claims 3-4, further comprising:
when the target image is subjected to image cutting, the cut images obtained through the image cutting are marked in sequence, and the position relation among the cut images is determined through the marked information obtained through marking.
6. The method of claim 5, wherein the image list information further includes mark information of each cut image, and the extracting the cut image corresponding to the placeholder map according to the selected placeholder map for displaying includes:
Determining a corresponding cutting image according to the selected placeholder map;
sending an image extraction request to the server according to the mark information corresponding to the determined cutting image;
And receiving an image extraction response, acquiring a cutting image which is carried in the image extraction response and corresponds to the marking information, and displaying the cutting image.
7. A terminal device, comprising:
a determination unit configured to determine a target pixel aspect ratio of a target image;
The cutting unit is used for carrying out image cutting on the target image according to the target pixel width-height ratio to obtain at least two cut images, and is specifically used for carrying out image cutting on the target image according to a preset pixel width-height ratio until the pixel width-height ratio of the rest part of the target image is not greater than the preset pixel width-height ratio;
The compression unit is used for respectively compressing the at least two cut images according to the preset maximum pixel width and height to obtain the cut images meeting the preset maximum pixel width and height;
The uploading unit is used for uploading the cutting image obtained by compression to a server for storage;
The device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring image list information of a target image, and the image list information comprises pixel width and height values of all cut images forming the target image;
the setting unit is used for setting a corresponding placeholder map according to the pixel width and height values of all the cutting images;
and the display unit is used for extracting the cutting image corresponding to the placeholder map according to the selected placeholder map and displaying the cutting image.
8. The terminal device according to claim 7, wherein the determining unit is configured to obtain a pixel width and height of the target image; and calculating the aspect ratio of the target pixel according to the aspect ratio of the pixel.
9. the terminal device of claim 7, wherein the cutting unit is configured to compare the target pixel aspect ratio with a preset pixel aspect ratio; and when the width-to-height ratio of the target pixel is larger than the preset width-to-height ratio of the pixel, performing image cutting on the target image to obtain at least two cut images.
10. the terminal device of claim 9, wherein the cutting unit is specifically configured to:
Cutting the pixel height value of the target image according to a preset pixel width-height ratio by taking the pixel width value of the target image as a reference; or
and cutting the pixel width value of the target image according to a preset pixel width-height ratio by taking the pixel height value of the target image as a reference.
11. The terminal device of any one of claims 9-10, further comprising:
And the marking unit is used for sequentially marking the cut images obtained by image cutting when the target image is subjected to image cutting, and determining the position relation among the cut images according to the marked information obtained by marking.
12. the terminal device according to claim 11, wherein the image list information further includes mark information of each cut image, and the presentation unit is specifically configured to determine the cut image corresponding to the selected placeholder map according to the selected placeholder map; sending an image extraction request to the server according to the mark information corresponding to the determined cutting image; and receiving an image extraction response, acquiring a cutting image which is carried in the image extraction response and corresponds to the marking information, and displaying the cutting image.
13. A terminal device comprising a memory for storing a computer program which, when executed by a processor, implements the steps of the image processing method of any one of claims 1 to 6, and a processor.
14. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the method of any one of claims 1-6.
CN201810200219.4A 2018-03-12 2018-03-12 image processing method and terminal equipment Active CN108460769B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810200219.4A CN108460769B (en) 2018-03-12 2018-03-12 image processing method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810200219.4A CN108460769B (en) 2018-03-12 2018-03-12 image processing method and terminal equipment

Publications (2)

Publication Number Publication Date
CN108460769A CN108460769A (en) 2018-08-28
CN108460769B true CN108460769B (en) 2019-12-13

Family

ID=63217306

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810200219.4A Active CN108460769B (en) 2018-03-12 2018-03-12 image processing method and terminal equipment

Country Status (1)

Country Link
CN (1) CN108460769B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109949380B (en) * 2019-02-02 2023-02-03 广州视源电子科技股份有限公司 Image compression method, system and storage medium
CN110865859B (en) * 2019-10-29 2021-10-22 维沃移动通信有限公司 Picture display method and device, electronic equipment and medium
CN114020006B (en) * 2021-09-26 2023-04-07 佛山中科云图智能科技有限公司 Unmanned aerial vehicle auxiliary landing method and device, storage medium and electronic equipment
CN113852823B (en) * 2021-11-30 2022-03-01 深圳市通恒伟创科技有限公司 Image data uploading method, system and device based on Internet of things

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104616263A (en) * 2015-02-10 2015-05-13 深圳中兴网信科技有限公司 Image processing method and device
CN105550301A (en) * 2015-12-14 2016-05-04 河海大学 High-definition picture cutting and displaying method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2749026A1 (en) * 2011-11-18 2014-07-02 Koninklijke Philips N.V. Encoding high quality (medical) images using standard lower quality (web) image formats

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104616263A (en) * 2015-02-10 2015-05-13 深圳中兴网信科技有限公司 Image processing method and device
CN105550301A (en) * 2015-12-14 2016-05-04 河海大学 High-definition picture cutting and displaying method

Also Published As

Publication number Publication date
CN108460769A (en) 2018-08-28

Similar Documents

Publication Publication Date Title
CN106412691B (en) Video image intercepting method and device
CN108460769B (en) image processing method and terminal equipment
CN106412681B (en) Live bullet screen video broadcasting method and device
CN106803993B (en) Method and device for realizing video branch selection playing
CN106844580B (en) Thumbnail generation method and device and mobile terminal
CN106921791B (en) Multimedia file storage and viewing method and device and mobile terminal
CN108605085B (en) Method for acquiring shooting reference data and mobile terminal
CN110209245B (en) Face recognition method and related product
CN109121008B (en) Video preview method, device, terminal and storage medium
CN107888765B (en) Method for switching scene mode and mobile terminal
JP2016511875A (en) Image thumbnail generation method, apparatus, terminal, program, and recording medium
CN106506437B (en) Audio data processing method and device
CN108337533B (en) Video compression method and device
CN106791916B (en) Method, device and system for recommending audio data
CN112019929A (en) Volume adjusting method and device
CN108718389B (en) Shooting mode selection method and mobile terminal
CN107395890A (en) A kind of method and apparatus and mobile terminal for adjusting Showing Effectiveness On Screen
CN106445970B (en) Loading processing method and device for placeholder map
CN107256142B (en) Page display method and terminal
CN110688347A (en) File storage method, file storage device and terminal equipment
CN107330867B (en) Image synthesis method, image synthesis device, computer-readable storage medium and computer equipment
CN108877733B (en) Color temperature adjusting method and related device
CN109542307B (en) Image processing method, device and computer readable storage medium
CN112691363A (en) Cross-terminal switching method and related device for cloud games
CN110955788A (en) Information display method and electronic equipment

Legal Events

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