CN111127469A - Thumbnail display method, device, storage medium and terminal - Google Patents

Thumbnail display method, device, storage medium and terminal Download PDF

Info

Publication number
CN111127469A
CN111127469A CN201911309905.6A CN201911309905A CN111127469A CN 111127469 A CN111127469 A CN 111127469A CN 201911309905 A CN201911309905 A CN 201911309905A CN 111127469 A CN111127469 A CN 111127469A
Authority
CN
China
Prior art keywords
image
original image
thumbnail
area
target object
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.)
Pending
Application number
CN201911309905.6A
Other languages
Chinese (zh)
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.)
Nanjing Coolpad Software Technology Co Ltd
Original Assignee
Nanjing Coolpad Software 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 Nanjing Coolpad Software Technology Co Ltd filed Critical Nanjing Coolpad Software Technology Co Ltd
Priority to CN201911309905.6A priority Critical patent/CN111127469A/en
Publication of CN111127469A publication Critical patent/CN111127469A/en
Pending legal-status Critical Current

Links

Images

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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/06Message adaptation to terminal or network requirements
    • H04L51/063Content adaptation, e.g. replacement of unsuitable content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/10Multimedia information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/52User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail for supporting social networking services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Multimedia (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application discloses a thumbnail display method and device, a storage medium and a terminal. Wherein the method comprises the following steps: the method comprises the steps of obtaining an original image, determining a ratio value between the area of a preset target object and the area of the original image when the preset target object included in the original image is identified, processing the original image to obtain a second image when the ratio value is smaller than a ratio threshold value, wherein the second image includes the preset target object, the ratio value between the area of the preset target object and the area of the second image is larger than or equal to the ratio threshold value, generating a first thumbnail of the second image, and displaying the first thumbnail through a display unit. According to the method and the device, the original image is cut, the cut image is reduced, and the thumbnail of the cut image is displayed, so that the problem that key information of the original image is not clear when the thumbnail is displayed in the related art is solved.

Description

Thumbnail display method, device, storage medium and terminal
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a thumbnail display method and apparatus, a storage medium, and a terminal.
Background
With electronic devices such as smart phones and tablet computers getting deeper into daily life, users can conveniently take photos of recorded life by using cameras or camera devices of the electronic devices, and then upload the photos to social applications, and the users often download the photos from the social applications and store the photos in the mobile phones or the computers. When browsing photos using a mobile phone or a computer, the photos are usually displayed in the form of thumbnails.
The inventor finds that: when the thumbnail is browsed by using a mobile phone or a computer, the thumbnail is compressed, and a plurality of thumbnails are simultaneously displayed on a display screen, so that the details of the thumbnail cannot be clearly seen.
Disclosure of Invention
The embodiment of the application provides a thumbnail display method and device, a computer storage medium and a terminal, and aims to solve the problem that key information of an original image cannot be clearly displayed when a thumbnail is displayed in the related art. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a thumbnail display method, where the method includes:
acquiring an original image;
when a preset target object included in the original image is identified, determining a proportional value between the area of the preset target object and the area of the original image;
when the proportion value is smaller than a proportion threshold value, processing the original image to obtain a second image; wherein the second image comprises the preset target object, and a ratio value between the area of the preset target object and the area of the second image is greater than or equal to the ratio threshold value;
generating a first thumbnail of the second image;
displaying the first thumbnail through a display unit.
In a second aspect, an embodiment of the present application provides a thumbnail display apparatus, including:
the image acquisition module is used for acquiring an original image;
the scene recognition module is used for determining a proportional value between the area of the preset key scene and the area of the original image when a preset target object included in the original image is recognized;
the image cutting module is used for processing the original image to obtain a second image when the proportion value is smaller than a proportion threshold value; wherein the second image comprises the preset target object, and a ratio value between the area of the preset target object and the area of the second image is greater than or equal to the ratio threshold value;
the thumbnail generation module is used for generating a first thumbnail of the second image;
and the thumbnail display module is used for displaying the first thumbnail through a display unit.
In a third aspect, embodiments of the present application provide a computer storage medium having a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides a terminal, which may include: a memory and a processor; wherein the memory stores a computer program adapted to be loaded by the memory and to perform the above-mentioned method steps.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
when the scheme of the embodiment of the application is executed, a terminal acquires an original image, determines a ratio value between the area of a preset target object and the area of the original image when the preset target object included in the original image is identified, processes the original image to obtain a second image when the ratio value is smaller than a ratio threshold value, wherein the second image includes the preset target object, the ratio value between the area of the preset target object and the area of the second image is larger than or equal to the ratio threshold value, generates a first thumbnail of the second image, and displays the first thumbnail through a display unit. According to the method and the device, the original image is processed firstly to obtain the second image, the area proportion value of the preset target object in the second image in the original image is larger than or equal to the proportion threshold value, and then the second image is subjected to reduction processing to obtain the first thumbnail of the second image. At this time, the generated first thumbnail can clearly display the key information of the original image when being displayed, and the problem that the key information of the original image cannot be clearly displayed when the thumbnail is displayed in the related art is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a terminal provided in an embodiment of the present application;
FIG. 2 is a schematic structural diagram of an operating system and a user space provided in an embodiment of the present application;
FIG. 3 is an architectural diagram of the android operating system of FIG. 1;
FIG. 4 is an architecture diagram of the IOS operating system of FIG. 1;
fig. 5 is a schematic flowchart of a thumbnail display method provided in an embodiment of the present application;
fig. 6 is a schematic flowchart of a thumbnail display method according to an embodiment of the present application;
FIG. 7 is a schematic diagram of an original image provided by an embodiment of the present application;
FIG. 8 is a schematic diagram illustrating a thumbnail display method according to an embodiment of the present disclosure;
FIG. 9 is a schematic diagram illustrating a thumbnail display method according to an embodiment of the present disclosure;
FIG. 10 is a schematic diagram of an effect of a user interface provided by an embodiment of the present application;
FIG. 11 is a schematic diagram illustrating an effect of a thumbnail display provided in an embodiment of the present application;
fig. 12 is a schematic structural diagram of a thumbnail display apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
Referring to fig. 1, a block diagram of a terminal according to an exemplary embodiment of the present application is shown. A terminal in the present application may include one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, memory 120, input device 130, and output device 140 may be connected by a bus 150.
Processor 110 may include one or more processing cores. The processor 110 connects various parts within the overall terminal using various interfaces and lines, performs various functions of the terminal and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and calling data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware using at least one of Digital Signal Processing (DSP), field-programmable gate array (FPGA), and Programmable Logic Array (PLA). The processor 110 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 110, but may be implemented by a communication chip.
The Memory 120 may include a Random Access Memory (RAM) or a read-only Memory (ROM). Optionally, the memory 120 includes a non-transitory computer-readable medium. The memory 120 may be used to store instructions, programs, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like, and the operating system may be an Android (Android) system (including a system based on Android system depth development), an IOS system developed by apple inc (including a system based on IOS system depth development), or other systems. The storage data area may also store data created by the terminal in use, such as a phonebook, audio-video data, chat log data, and the like.
Referring to fig. 2, the memory 120 may be divided into an operating system space, in which an operating system runs, and a user space, in which native and third-party applications run. In order to ensure that different third-party application programs can achieve a better operation effect, the operating system allocates corresponding system resources for the different third-party application programs. However, the requirements of different application scenarios in the same third-party application program on system resources are different, for example, in a local resource loading scenario, the third-party application program has a higher requirement on the disk reading speed; in the animation rendering scene, the third-party application program has a high requirement on the performance of the GPU. The operating system and the third-party application program are independent from each other, and the operating system cannot sense the current application scene of the third-party application program in time, so that the operating system cannot perform targeted system resource adaptation according to the specific application scene of the third-party application program.
In order to enable the operating system to distinguish a specific application scenario of the third-party application program, data communication between the third-party application program and the operating system needs to be opened, so that the operating system can acquire current scenario information of the third-party application program at any time, and further perform targeted system resource adaptation based on the current scenario.
Taking an operating system as an Android system as an example, programs and data stored in the memory 120 are as shown in fig. 3, and a Linux kernel layer 320, a system runtime library layer 340, an application framework layer 360, and an application layer 380 may be stored in the memory 120, where the Linux kernel layer 320, the system runtime library layer 340, and the application framework layer 360 belong to an operating system space, and the application layer 380 belongs to a user space. The Linux kernel layer 320 provides underlying drivers for various hardware of the terminal, such as a display driver, an audio driver, a camera driver, a bluetooth driver, a Wi-Fi driver, a power management, and the like. The system runtime library layer 340 provides a main feature support for the Android system through some C/C + + libraries. For example, the SQLite library provides support for a database, the OpenGL/ES library provides support for 3D drawing, the Webkit library provides support for a browser kernel, and the like. Also provided in the system runtime library layer 340 is an Android runtime library (Android runtime), which mainly provides some core libraries that can allow developers to write Android applications using the Java language. The application framework layer 360 provides various APIs that may be used in building an application, and developers may build their own applications by using these APIs, such as activity management, window management, view management, notification management, content provider, package management, session management, resource management, and location management. At least one application program runs in the application layer 380, and the application programs may be native application programs carried by the operating system, such as a contact program, a short message program, a clock program, a camera application, and the like; or a third-party application developed by a third-party developer, such as a game-like application, an instant messaging program, a photo beautification program, a shopping program, and the like.
Taking an operating system as an IOS system as an example, programs and data stored in the memory 120 are shown in fig. 4, and the IOS system includes: a Core operating system Layer 420(Core OS Layer), a Core Services Layer 440(Core Services Layer), a Media Layer 460(Media Layer), and a touchable Layer 480(CocoaTouch Layer). The kernel operating system layer 420 includes an operating system kernel, drivers, and underlying program frameworks that provide functionality closer to hardware for use by program frameworks located in the core services layer 440. The core services layer 440 provides system services and/or program frameworks, such as a Foundation framework, an account framework, an advertisement framework, a data storage framework, a network connection framework, a geographic location framework, a motion framework, and so forth, as required by the application. The media layer 460 provides audiovisual related interfaces for applications, such as graphics image related interfaces, audio technology related interfaces, video technology related interfaces, audio video transmission technology wireless playback (AirPlay) interfaces, and the like. Touchable layer 480 provides various common interface-related frameworks for application development, and touchable layer 480 is responsible for user touch interaction operations on the terminal. Such as a local notification service, a remote push service, an advertising framework, a game tool framework, a messaging User Interface (UI) framework, a User Interface UIKit framework, a map framework, and so forth.
In the framework shown in FIG. 4, the framework associated with most applications includes, but is not limited to: a base framework in the core services layer 440 and a UIKit framework in the touchable layer 480. The base framework provides many basic object classes and data types, provides the most basic system services for all applications, and is UI independent. While the class provided by the UIKit framework is a basic library of UI classes for creating touch-based user interfaces, iOS applications can provide UIs based on the UIKit framework, so it provides an infrastructure for applications for building user interfaces, drawing, processing and user interaction events, responding to gestures, and the like.
The Android system can be referred to as a mode and a principle for realizing data communication between the third-party application program and the operating system in the IOS system, and details are not repeated herein.
The input device 130 is used for receiving input instructions or data, and the input device 130 includes, but is not limited to, a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 140 is used for outputting instructions or data, and the output device 140 includes, but is not limited to, a display device, a speaker, and the like. In one example, the input device 130 and the output device 140 may be combined, and the input device 130 and the output device 140 are touch display screens for receiving touch operations of a user on or near the touch display screens by using any suitable object such as a finger, a touch pen, and the like, and displaying user interfaces of various applications. The touch display screen is generally provided at a front panel of the terminal. The touch display screen may be designed as a full-face screen, a curved screen, or a profiled screen. The touch display screen can also be designed to be a combination of a full-face screen and a curved-face screen, and a combination of a special-shaped screen and a curved-face screen, which is not limited in the embodiment of the present application.
In addition, those skilled in the art will appreciate that the configurations of the terminals illustrated in the above-described figures do not constitute limitations on the terminals, as the terminals may include more or less components than those illustrated, or some components may be combined, or a different arrangement of components may be used. For example, the terminal further includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a power supply, a bluetooth module, and other components, which are not described herein again.
In the embodiment of the present application, the main body of execution of each step may be the terminal described above. Optionally, the execution subject of each step is an operating system of the terminal. The operating system may be an android system, an IOS system, or another operating system, which is not limited in this embodiment of the present application.
The terminal of the embodiment of the application can also be provided with a display device, and the display device can be various devices capable of realizing a display function, for example: a cathode ray tube (CR) display, a light-emitting diode (LED) display, an electronic ink panel, a Liquid Crystal Display (LCD) display, a Plasma Display Panel (PDP) display, and the like. The user can view information such as displayed text, images, video, etc. using the display device on the terminal 101. The terminal may be a smart phone, a tablet computer, a gaming device, an AR (Augmented Reality) device, an automobile, a data storage device, an audio playing device, a video playing device, a notebook, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic garment, or the like.
In the terminal shown in fig. 1, the processor 110 may be configured to call an application program stored in the memory 120 and specifically execute the thumbnail display method according to the embodiment of the present application.
When the scheme of the embodiment of the application is executed, a terminal acquires an original image, determines a ratio value between the area of a preset target object and the area of the original image when the preset target object included in the original image is identified, processes the original image to obtain a second image when the ratio value is smaller than a ratio threshold value, wherein the second image includes the preset target object, the ratio value between the area of the preset target object and the area of the second image is larger than or equal to the ratio threshold value, generates a first thumbnail of the second image, and displays the first thumbnail through a display unit. According to the method and the device, the original image is processed firstly to obtain the second image, the area proportion value of the preset target object in the second image in the original image is larger than or equal to the proportion threshold value, and then the second image is subjected to reduction processing to obtain the first thumbnail of the second image. At this time, the generated first thumbnail can clearly display the key information of the original image when being displayed, and the problem that the key information of the original image cannot be clearly displayed when the thumbnail is displayed in the related art is solved.
In the following method embodiments, for convenience of description, only the main execution body of each step is described as a terminal.
Please refer to fig. 5, which is a flowchart illustrating a thumbnail display method according to an embodiment of the present disclosure. As shown in fig. 5, the method of the embodiment of the present application may include the steps of:
s501, acquiring an original image.
The original image may be an image that a user has captured by using an imaging device of the terminal and stored in a local media file library of the terminal, or an image that the user has downloaded from a web page or another application and stored in the local media file library of the terminal.
Generally, a terminal detects that a user performs a touch operation on an album folder to obtain an original image stored in the album folder, where the album folder may be an image folder stored on the same date, an image folder stored in the same place by shooting, an image folder stored from the same webpage or the same application, or an image folder of the same person.
For example: the display screen of the terminal displays various application icons, a user performs touch operation on a photo application program on the display screen of the terminal by using a finger, and the display screen of the terminal displays a plurality of album folders in response to the touch operation of the user, and the method comprises the following steps: camera folders, screen shot folders, emoticon folders, microblog folders, and the like. The description is given for one of the album folders, and the other album folders are the same as the description of the application. And the user performs touch operation on the microblog album folder by using a finger, and the terminal acquires all original images stored in the microblog album folder in response to the touch operation of the user.
S502, when the preset target object included in the original image is identified, a proportional value between the area of the preset target object and the area of the original image is determined.
The preset target object is a pixel area which represents a specific object in an original image, and the preset target object comprises one or more of a human face, an animal, a scene and a certificate.
Generally, based on an original image acquired by the terminal S501, the terminal identifies whether each original image includes a preset target object by using an image identification model, and if the terminal identifies that the preset target object exists in the original image, determines a ratio between an area of the preset target object and an area of the original image. In a possible embodiment, an original image includes a preset object, and a ratio between an area of the preset object and an area of the original image is determined. In another possible embodiment, one original image includes a plurality of preset objects, and a ratio between an area of each preset object and an area of the original image is calculated. In image processing, the area refers to the number of pixels in the corresponding region.
For example: and when the terminal detects the face in the original image, determining that the area ratio value between the face and the original image is 1: 10.
And S503, when the proportion value is smaller than the proportion threshold value, processing the original image to obtain a second image.
The second image comprises a preset target object, and the ratio value between the area of the preset target object and the area of the second image is larger than or equal to the ratio threshold value. The ratio threshold value is a ratio value between the area of a preset target object pre-stored or pre-configured by the terminal and the area of the original image, and the second image is an image obtained by cutting the original image and highlighting the preset target object. After a terminal determines that a ratio value between the area of a preset target object and the area of an original image is smaller than a ratio threshold value, processing the original image to obtain a second image, wherein the processing comprises the steps of determining position information of the preset target object, generating a reserved area meeting preset conditions in the original image according to the position information, the preset conditions mean that the preset target object is located in the reserved area and the reserved area is located in the original image, cutting the original image according to the area except the reserved area in the original image to obtain the second image, and ensuring that the ratio value between the area of the preset target object and the area of the second image is larger than or equal to the ratio threshold value.
S504, a first thumbnail of the second image is generated.
The terminal determines a reduction ratio value for reducing the second image based on the second image obtained by cutting the original image, and reduces the second image in an equal proportion according to the reduction ratio value to obtain the first thumbnail. The original image is based on a thumbnail, the resolution of the original image being greater than the thumbnail.
S505, the first thumbnail is displayed through the display unit.
The terminal displays the first thumbnail in the album folder through the display unit.
When the scheme of the embodiment of the application is executed, a terminal acquires an original image, determines a ratio value between the area of a preset target object and the area of the original image when the preset target object included in the original image is identified, processes the original image to obtain a second image when the ratio value is smaller than a ratio threshold value, wherein the second image includes the preset target object, the ratio value between the area of the preset target object and the area of the second image is larger than or equal to the ratio threshold value, generates a first thumbnail of the second image, and displays the first thumbnail through a display unit. According to the method and the device, the original image is processed firstly to obtain the second image, the area proportion value of the preset target object in the second image in the original image is larger than or equal to the proportion threshold value, and then the second image is subjected to reduction processing to obtain the first thumbnail of the second image. At this time, the generated first thumbnail can clearly display the key information of the original image when being displayed, and the problem that the key information of the original image cannot be clearly displayed when the thumbnail is displayed in the related art is solved.
Please refer to fig. 6, which is a flowchart illustrating a thumbnail display method according to an embodiment of the present disclosure. As shown in fig. 6, the method of the embodiment of the present application may include the steps of:
s601, acquiring an original image.
The specific process of S601 may refer to the description of S501 in fig. 5, and is not described herein again.
S602, judging whether the original image comprises a preset target object or not by using the image recognition model.
The image recognition model is a machine learning model and is obtained by training sample data by utilizing a machine learning algorithm. The terminal extracts image characteristic information of an original image, and comprises the following steps: and the terminal inputs the image characteristic information of the original image into an image recognition model and judges whether the original image comprises a preset target object or not.
For example: as shown in fig. 7, for an original image obtained by a terminal from a local media file library, the terminal extracts image feature information of the original image, where the texture features include textures of sand beach, sea water, and portrait, the shape features include shapes of sand beach, sea water, and portrait, and the spatial relationship features include spatial position relationships between sky, sand beach, sea water, and portrait. And the terminal inputs the characteristic information of the original image into an image recognition model, and judges whether the original image comprises a preset target object face or not according to the result output by the model.
S603, if the original image comprises the preset target object, judging whether the ratio value between the area of the preset target object and the area of the original image is smaller than a ratio threshold value.
Generally, based on the recognition result of the image recognition model of S602, the terminal detects that the original image includes the preset target object, in a possible implementation, there is only one preset target object in the original image, and at this time, the terminal needs to calculate a ratio value between an area of the preset target object and an area of the original image, and determine whether the ratio value is smaller than a preset ratio threshold. In another possible embodiment, the original image includes more than one preset target, and at this time, the terminal may determine one preset target with the largest area among the plurality of preset targets, calculate a ratio value between the area of the preset target with the largest area and the area of the original image, and determine whether the ratio value is smaller than a preset ratio threshold.
For example: as shown in fig. 7, the original image includes a preset target portrait 710, a ratio between an area of the portrait 710 and an area of the original image is calculated as 1/10, and a preset ratio threshold is 1/6.
And S604, if the original image does not include the preset target object, performing equal-scale reduction on the original image to obtain a third thumbnail.
The third thumbnail is a thumbnail of an original image not containing the preset target object. And detecting that the original image does not include a preset target object at the terminal, and generating a third thumbnail according to the size of a preset thumbnail display area and the size of the original image, wherein the preset thumbnail display area has the width size and the height size.
For example: the size of the original image is 3042 × 3042, the terminal recognizes that the original image does not include any preset target object, further, the terminal generates a thumbnail of the original image, the preset size of the thumbnail is 100 × 100, the reduction ratio is determined to be 100/3042, and the terminal performs equal-scale reduction on the original image according to the reduction ratio to generate a thumbnail, namely a third thumbnail. If the width size and the height size of the original image do not coincide, a reduction ratio is determined depending on the larger one of the width size or the height size, and the size of the thumbnail, the specific reduction ratio being the ratio of the larger width size or the height size to the width size of the thumbnail.
S605, if the ratio value between the area of the preset target object and the area of the original image is smaller than the ratio threshold value, determining the position information of the preset target object, and generating a reserved area meeting the preset condition according to the position information.
The reserved area refers to an area which needs to be reserved in the original image during the cutting process, the reserved area is a rectangular area, the preset condition refers to that the preset target object is located in the reserved area, the reserved area is located in the original image, and meanwhile, it is required to ensure that a ratio value between the area of the preset target object and the area of the reserved area is larger than or equal to a ratio threshold value. Based on the fact that the ratio value between the area of the preset target object and the area of the original image is smaller than the ratio threshold value obtained by the detection of the terminal in the S603, the terminal determines the position information of the preset target object in the original image, and generates a reserved area meeting the preset condition according to the position information.
For example: as shown in fig. 7, in the original image, a target object is a portrait 710, a coordinate system may be established with one vertex of fig. 7, for example, a vertex at the upper left corner, as an origin and with width and height of two edges of the original image as axes, so that the portrait 710 may be represented as a specific coordinate point and width and height values of the portrait 710, a reserved area satisfying a preset condition is generated according to the position information, and a ratio value between an area of the portrait 710 and an area of the reserved area is ensured to be greater than or equal to a ratio threshold. As shown in fig. 8, a rectangular box 810 is a reserved area generated for the terminal.
And S606, if the ratio value between the area of the preset target object and the area of the original image is larger than or equal to the ratio threshold value, carrying out equal-scale reduction on the original image to obtain a second thumbnail.
The second thumbnail is a thumbnail generated by the original image, wherein the proportional value between the area of the preset target object and the area of the original image is greater than the proportional threshold. And generating a second thumbnail according to the preset thumbnail size and the size of the original image based on the fact that the ratio value between the area of the preset target object and the area of the original image is larger than or equal to the ratio threshold value obtained by the detection of the terminal in the S603.
For example: the original image comprises a preset target object, the size of the original image is 3042 x 3042, the terminal detects that the ratio value between the area of the preset target object and the area of the original image is 1/2, the ratio threshold value pre-configured by the terminal is 1/6, the ratio value is larger than the ratio threshold value, the terminal determines that the reduction ratio is 100/3042, and the terminal performs equal-ratio reduction on the original image according to the reduction ratio to generate a thumbnail of the original image, namely a second thumbnail; if the size of the original image is 2048 × 1560, that is, the width size of the original image is greater than the height size, then the reduction ratio is determined to be 100/2048 according to the width size and the size of the thumbnail, and the original image is reduced in equal proportion according to the reduction ratio to obtain a second thumbnail; if the original image has a size 1560 × 2048, that is, the height size of the original image is greater than the width size, then the reduction ratio is determined to be 100/2048 according to the height size and the size of the thumbnail image, and the original image is reduced in equal proportion according to the reduction ratio to obtain the second thumbnail image.
And S607, cutting the original image according to the area except the reserved area in the original image to obtain a second image.
The second image is an image obtained by cutting out the area except the reserved area in the original image.
For example: as shown in fig. 9, the reserved area 910 is cut out from the area outside the reserved area 910 and the area inside the dashed box 920 in fig. 9, so as to obtain a second image.
S608, a first thumbnail of the second image is generated.
Generally, the terminal determines a reduction ratio value according to the size of the second image and the size of the thumbnail display area, and performs equal-scale reduction on the second image according to the reduction ratio value to obtain the first thumbnail.
For example: as shown in fig. 9, the size of the second image is 1000 × 900, the size of the display area of the thumbnail is 100 × 100, and the scaling ratio is determined to be 100/1000, that is, 1/10, according to the width 1000 of the second image, and the first thumbnail of the second image is generated according to the scaling ratio; if the size of the second image is 900 × 1000 and the display area of the thumbnail image is 100 × 100 as shown in fig. 9, the scaling is determined to be 100/1000, i.e., 1/10, according to the width 1000 of the second image, and the first thumbnail image of the second image is generated according to the scaling; if the size of the second image is 1000 × 1000 and the display area of the thumbnail image is 100 × 100 as shown in fig. 9, the scaling is determined to be 100/1000, i.e., 1/10, according to the width 1000 of the second image, and the first thumbnail image of the second image is generated according to the scaling.
S609, the first thumbnail is displayed through the display unit.
Generally, a terminal detects a touch operation of a user touching an album folder, and displays a first thumbnail through a display unit in response to the touch operation.
For example: as shown in fig. 10, a plurality of album folders including a camera folder, a microblog folder, an expression package folder, a QQ folder, and the like are stored on the terminal, when a user performs a touch operation on the camera folder with a finger, the terminal detects the touch operation of the user, thumbnails of all original images stored under the camera folder are displayed on a display screen of the terminal, a thumbnail display interface is shown in fig. 11, and a thumbnail 1110 in fig. 11 is a thumbnail of an original image shown in fig. 7.
When the scheme of the embodiment of the application is executed, a terminal acquires an original image, determines a ratio value between the area of a preset target object and the area of the original image when the preset target object included in the original image is identified, processes the original image to obtain a second image when the ratio value is smaller than a ratio threshold value, wherein the second image includes the preset target object, the ratio value between the area of the preset target object and the area of the second image is larger than or equal to the ratio threshold value, generates a first thumbnail of the second image, and displays the first thumbnail through a display unit. According to the method and the device, the original image is processed firstly to obtain the second image, the area proportion value of the preset target object in the second image in the original image is larger than or equal to the proportion threshold value, and then the second image is subjected to reduction processing to obtain the first thumbnail of the second image. At this time, the generated first thumbnail can clearly display the key information of the original image when being displayed, and the problem that the key information of the original image cannot be clearly displayed when the thumbnail is displayed in the related art is solved.
Please refer to fig. 12, which is a schematic structural diagram of a thumbnail generation apparatus according to an embodiment of the present application. The thumbnail image generation means may be implemented as all or a part of the terminal by software, hardware, or a combination of both. The device includes:
an image acquisition module 1210 for acquiring an original image;
the scene recognition module 1220 is connected to the image acquisition module 1210, and configured to determine a ratio between an area of a preset target object and an area of the original image when the preset target object included in the original image is recognized;
the image cropping module 1230 is connected to the image acquisition module 1210 and the scene recognition module 1220, and is configured to process the original image to obtain a second image when the ratio value is smaller than a ratio threshold; wherein the second image comprises the preset target object, and a ratio value between the area of the preset target object and the area of the second image is greater than or equal to the ratio threshold value;
the thumbnail generation module 1240, which is connected to the image acquisition module 1210, the scene recognition module 1220 and the image cropping module 1230, is configured to generate a first thumbnail of the second image;
the thumbnail display module 1250 is connected to the image obtaining module 1210, the scene recognition module 1220, the image cropping module 1230 and the thumbnail generation module 1240, and is configured to display the first thumbnail through the display unit.
Optionally, the scene recognition module 1220 comprises:
and the scene recognition unit is used for recognizing a preset target object included in the original image according to the image recognition model.
Optionally, the image cropping module 1230 comprises:
the position information determining unit is used for determining the position information of the preset target object and generating a reserved area meeting preset conditions according to the position information; the preset condition is that the preset target object is located in the reserved area, and the reserved area is located in the original image.
And the cutting unit is used for cutting the original image according to the area except the reserved area in the original image to obtain the second image.
Optionally, the scene recognition module 1220 further comprises:
and the second identification unit is used for carrying out equal-scale reduction on the original image to obtain a third thumbnail when the preset target object is not included in the original image.
Optionally, the image acquisition module 1210 comprises:
the first acquisition unit is used for acquiring the original image from a local file library; or
And the second acquisition unit is used for acquiring the original image from a streaming media server of the Internet.
When the scheme of the embodiment of the application is executed, a terminal acquires an original image, determines a ratio value between the area of a preset target object and the area of the original image when the preset target object included in the original image is identified, processes the original image to obtain a second image when the ratio value is smaller than a ratio threshold value, wherein the second image includes the preset target object, the ratio value between the area of the preset target object and the area of the second image is larger than or equal to the ratio threshold value, generates a first thumbnail of the second image, and displays the first thumbnail through a display unit. According to the method and the device, the original image is processed firstly to obtain the second image, the area proportion value of the preset target object in the second image in the original image is larger than or equal to the proportion threshold value, and then the second image is subjected to reduction processing to obtain the first thumbnail of the second image. At this time, the generated first thumbnail can clearly display the key information of the original image when being displayed, and the problem that the key information of the original image cannot be clearly displayed when the thumbnail is displayed in the related art is solved.
An embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and executing the above method steps, and a specific execution process may refer to specific descriptions of the embodiments shown in fig. 5 and fig. 6, which are not described herein again.
The application also provides a terminal, which comprises a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory or a random access memory.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (10)

1. A thumbnail display method, characterized in that the method comprises:
acquiring an original image;
when a preset target object included in the original image is identified, determining a proportional value between the area of the preset target object and the area of the original image;
when the proportion value is smaller than a proportion threshold value, processing the original image to obtain a second image; wherein the second image comprises the preset target object, and a ratio value between the area of the preset target object and the area of the second image is greater than or equal to the ratio threshold value;
generating a first thumbnail of the second image;
displaying the first thumbnail through a display unit.
2. The method of claim 1, further comprising:
and when the proportion value is larger than or equal to the proportion threshold value, carrying out equal-scale reduction on the original image to obtain a second thumbnail.
3. The method of claim 1, wherein the identifying of the preset target object included in the image comprises:
and identifying a preset target object included in the original image according to an image identification model.
4. The method of claim 1, wherein the processing the original image to obtain a second image comprises:
determining the position information of the preset target object, and generating a reserved area meeting preset conditions according to the position information; the preset condition is that the preset target object is located in the reserved area, and the reserved area is located in the original image.
And cutting the original image according to the area except the reserved area in the original image to obtain the second image.
5. The method according to claim 1, wherein the recognizing a preset target object included in the original image further comprises:
and if the original image does not comprise the preset target object, carrying out equal-scale reduction on the original image to obtain a third thumbnail.
6. The method of claims 1-5, wherein the generating the first thumbnail of the second image comprises:
determining a reduction ratio value;
and carrying out equal-scale reduction on the second image according to the reduction scale value to obtain the first thumbnail.
7. The method of claim 1, wherein said obtaining an original image comprises:
acquiring the original image from a local file library; or
And acquiring the original image from a streaming media server of the Internet.
8. A thumbnail display apparatus, characterized in that the apparatus comprises:
the image acquisition module is used for acquiring an original image;
the scene recognition module is used for determining a proportional value between the area of a preset target object and the area of the original image when the preset target object included in the original image is recognized;
the image cutting module is used for processing the original image to obtain a second image when the proportion value is smaller than a proportion threshold value; wherein the second image comprises the preset target object, and a ratio value between the area of the preset target object and the area of the second image is greater than or equal to the ratio threshold value;
the thumbnail generation module is used for generating a first thumbnail of the second image;
and the thumbnail display module is used for displaying the first thumbnail through a display unit.
9. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to carry out the method steps according to any one of claims 1 to 7.
10. A terminal, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1 to 7.
CN201911309905.6A 2019-12-18 2019-12-18 Thumbnail display method, device, storage medium and terminal Pending CN111127469A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911309905.6A CN111127469A (en) 2019-12-18 2019-12-18 Thumbnail display method, device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911309905.6A CN111127469A (en) 2019-12-18 2019-12-18 Thumbnail display method, device, storage medium and terminal

Publications (1)

Publication Number Publication Date
CN111127469A true CN111127469A (en) 2020-05-08

Family

ID=70499708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911309905.6A Pending CN111127469A (en) 2019-12-18 2019-12-18 Thumbnail display method, device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN111127469A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328553A (en) * 2020-08-21 2021-02-05 海信视像科技股份有限公司 Thumbnail capturing method and display device
CN112927241A (en) * 2021-03-08 2021-06-08 携程旅游网络技术(上海)有限公司 Picture capturing and thumbnail generating method, system, equipment and storage medium
CN115033154A (en) * 2021-02-23 2022-09-09 北京小米移动软件有限公司 Thumbnail generation method, thumbnail generation device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150016747A1 (en) * 2013-07-12 2015-01-15 Vivotek Inc. Image processor and image combination method thereof
CN104346772A (en) * 2014-11-06 2015-02-11 杭州华为数字技术有限公司 Thumbnail manufacturing method and device
CN105357436A (en) * 2015-11-03 2016-02-24 广东欧珀移动通信有限公司 Image cropping method and system for image shooting
CN105956999A (en) * 2016-04-28 2016-09-21 努比亚技术有限公司 Thumbnail generating device and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150016747A1 (en) * 2013-07-12 2015-01-15 Vivotek Inc. Image processor and image combination method thereof
CN104346772A (en) * 2014-11-06 2015-02-11 杭州华为数字技术有限公司 Thumbnail manufacturing method and device
CN105357436A (en) * 2015-11-03 2016-02-24 广东欧珀移动通信有限公司 Image cropping method and system for image shooting
CN105956999A (en) * 2016-04-28 2016-09-21 努比亚技术有限公司 Thumbnail generating device and method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328553A (en) * 2020-08-21 2021-02-05 海信视像科技股份有限公司 Thumbnail capturing method and display device
CN115033154A (en) * 2021-02-23 2022-09-09 北京小米移动软件有限公司 Thumbnail generation method, thumbnail generation device and storage medium
CN112927241A (en) * 2021-03-08 2021-06-08 携程旅游网络技术(上海)有限公司 Picture capturing and thumbnail generating method, system, equipment and storage medium

Similar Documents

Publication Publication Date Title
WO2020147666A1 (en) User interface display method and apparatus, terminal and storage medium
EP3779684B1 (en) Icon display method, device and terminal
WO2019174477A1 (en) User interface display method and device, and terminal
CN107889070B (en) Picture processing method, device, terminal and computer readable storage medium
CN107632874B (en) Interface display method and device and terminal
WO2020156308A1 (en) Message processing method, device, terminal, and storage medium
CN111767554B (en) Screen sharing method and device, storage medium and electronic equipment
US20230035047A1 (en) Remote assistance method, device, storage medium, and terminal
CN111225138A (en) Camera control method and device, storage medium and terminal
WO2019233307A1 (en) User interface display method and apparatus, and terminal and storage medium
CN111127469A (en) Thumbnail display method, device, storage medium and terminal
CN112839223B (en) Image compression method, image compression device, storage medium and electronic equipment
CN111124668A (en) Memory release method and device, storage medium and terminal
CN113268212A (en) Screen projection method and device, storage medium and electronic equipment
CN110881104A (en) Photographing method, photographing device, storage medium and terminal
CN113141537A (en) Video frame insertion method, device, storage medium and terminal
CN111866372A (en) Self-photographing method, device, storage medium and terminal
CN111176533A (en) Wallpaper switching method, device, storage medium and terminal
CN108845733B (en) Screen capture method, device, terminal and storage medium
CN111913614B (en) Multi-picture display control method and device, storage medium and display
CN112995562A (en) Camera calling method and device, storage medium and terminal
CN111107264A (en) Image processing method, image processing device, storage medium and terminal
CN113419650A (en) Data moving method and device, storage medium and electronic equipment
CN111538997A (en) Image processing method, image processing device, storage medium and terminal
CN111859999A (en) Message translation method, device, storage medium 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