CN114219945A - Thumbnail obtaining method and device, electronic equipment and storage medium - Google Patents

Thumbnail obtaining method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114219945A
CN114219945A CN202111517814.9A CN202111517814A CN114219945A CN 114219945 A CN114219945 A CN 114219945A CN 202111517814 A CN202111517814 A CN 202111517814A CN 114219945 A CN114219945 A CN 114219945A
Authority
CN
China
Prior art keywords
sub
target
image
graph
key
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
CN202111517814.9A
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111517814.9A priority Critical patent/CN114219945A/en
Publication of CN114219945A publication Critical patent/CN114219945A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • 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
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The disclosure relates to the technical field of computers, in particular to the technical field of image processing, and can be applied to scenes such as image cutting. The specific implementation scheme is as follows: obtaining key features of each sub-image in the spliced image; determining a target sub-image with key features meeting preset feature conditions from the spliced images based on the key features of each sub-image; determining a target region containing corresponding key features from the target subgraph; and cutting out an image of the target area from the target subgraph, and taking the image of the target area as a thumbnail of the spliced picture. The method can avoid cutting off the main content of other sub-images when the thumbnail is cut, and can ensure that the thumbnail contains the complete key characteristics of the target sub-image, so that the content of the thumbnail is complete and the theme can be highlighted, and the watching experience of a user is effectively improved.

Description

Thumbnail obtaining method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technology, and more particularly to the field of image processing, which can be applied to scenes such as image cropping.
Background
In some picture presentation scenarios, it is desirable to preferentially present thumbnails of pictures. The thumbnail obtained by the existing cutting method for the thumbnail of the spliced picture is usually cut to a part of the main content of some sub-pictures of the spliced picture, so that the content in the picture is split, and the viewing experience is influenced.
Disclosure of Invention
The disclosure provides a thumbnail obtaining method, a thumbnail obtaining device, an electronic device and a storage medium.
According to a first aspect of the present disclosure, there is provided a thumbnail acquisition method including:
obtaining key features of each sub-image in the spliced image;
determining a target sub-image with key features meeting preset feature conditions from the spliced images based on the key features of each sub-image;
determining a target region containing corresponding key features from the target subgraph;
and cutting out an image of the target area from the target subgraph, and taking the image of the target area as a thumbnail of the spliced picture.
According to a second aspect of the present disclosure, there is provided a thumbnail acquisition apparatus including:
the characteristic acquisition module is used for acquiring key characteristics of each sub-image in the spliced image;
the target sub-image determining module is used for determining a target sub-image of which the key feature meets a preset feature condition from the spliced images based on the key feature of each sub-image;
the target region determining module is used for determining a target region containing corresponding key features from the target subgraph;
and the thumbnail acquisition module is used for cutting out the image of the target area from the target subgraph and taking the image of the target area as the thumbnail of the spliced picture.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the thumbnail acquisition method described above.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the above-described thumbnail acquisition method.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the thumbnail acquisition method described above.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
The technical scheme provided by the disclosure has the following beneficial effects:
according to the technical scheme, the target sub-images with the optimal key features are screened out from the sub-images of the spliced images, the images of the target regions of the target sub-images containing the key features are used as the thumbnails, the situation that the main content of other sub-images is cut off when the thumbnails are cut can be avoided, the thumbnails can be guaranteed to contain the complete key features of the target sub-images, the content of the thumbnails is complete, the theme can be highlighted, and the watching experience of a user is effectively improved.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 shows a flowchart of a thumbnail obtaining method provided by an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating another thumbnail obtaining method provided in the embodiment of the present disclosure;
fig. 3 illustrates an exemplary stitched picture provided by an embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating a target region in an exemplary stitched picture provided by an embodiment of the present disclosure;
fig. 5 is a schematic diagram illustrating a thumbnail obtaining apparatus provided in an embodiment of the present disclosure;
fig. 6 shows a schematic block diagram of an example electronic device that may be used to implement the thumbnail acquisition method provided by embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In some picture presentation scenarios, it is desirable to preferentially present thumbnails of pictures. The thumbnail is a thumbnail display of the original picture, and is convenient for people to browse. Thumbnails, which are used to more quickly load a Web page with more graphics or pictures in a Web browser, will typically contain hyperlinks to full-size original pictures.
At present, a thumbnail can be obtained by scaling an original picture by a multiple, or by cropping the original picture. However, for a spliced picture spliced by a plurality of sub-images, when the thumbnail of the spliced picture is obtained by clipping, a part of the main content of some sub-images is often clipped, which results in content splitting in the thumbnail and affects the viewing experience. For example, when the main content of the sub-image in the stitched picture is a person, the thumbnail of the stitched picture may contain a part of the face area of the person in some sub-images, which affects the user's look and feel.
The embodiments of the present disclosure provide a thumbnail obtaining method, apparatus, electronic device and storage medium, which aim to solve at least one of the above technical problems in the prior art.
Fig. 1 shows a schematic flowchart of a thumbnail obtaining method provided by an embodiment of the present disclosure, and as shown in fig. 1, the method mainly includes the following steps:
s110: and acquiring key features of each sub-image in the spliced image.
The spliced picture is formed by splicing more than two sub-pictures, wherein the size and the contained content type of each sub-picture can be the same or different. The embodiment of the disclosure can extract corresponding key features from each sub-image in the spliced image by using an image recognition technology, wherein the specific type of the key features is related to the type of content contained in the sub-image. Taking the example that the main object included in the sub-graph is a human figure, the key feature of the sub-graph acquired in step S110 may be a facial feature, and the facial feature may include at least one of an eye feature, an eyebrow feature, a nose feature, a mouth feature, and an ear feature.
Alternatively, in step S110, the position information of each sub-image in the stitched picture may be determined, and the key feature of the sub-image is obtained in the region indicated by the position information of the sub-image. And the position information is used for indicating the region of the sub-image in the spliced picture.
S120: and determining a target sub-image with the key characteristics meeting preset characteristic conditions from the spliced images based on the key characteristics of each sub-image.
The method and the device for processing the spliced image can configure preset characteristic conditions, and screen out the target sub-image from the multiple sub-images in the spliced image based on the key characteristics and the preset characteristic conditions. It can be understood that when the key feature of a sub-graph meets the preset feature condition, the sub-graph can be determined as a target sub-graph.
Optionally, in step S120, the embodiment of the present disclosure may calculate the information entropy of the key feature of each sub-graph, and determine the sub-graph with the largest information entropy as the target sub-graph. Here, the information entropy is proportional to the size of the area of the corresponding key region of the key feature, that is, the larger the area of the corresponding key region of the key feature is, the higher the information entropy of the key feature is. It can be understood that the higher the information entropy of the key feature, the larger the information amount of the key feature in the sub-graph.
Optionally, in step S120, the area of the key region corresponding to the key feature of the sub-graph is calculated, an area ratio of the area of the key region in the sub-graph to the total area of the sub-graph is determined, and the sub-graph with the largest corresponding area ratio is determined as the target sub-graph. It can be understood that the larger the area ratio, the larger the occupation ratio of the key region in the sub-graph, and the higher the information density of the key feature in the sub-graph.
S130: and determining a target region containing the corresponding key features from the target subgraph.
After the target sub-graph is determined, a region can be determined from the target sub-graph, and the region is made to contain the key features of the target sub-graph, and at this time, the region can be defined as the target region. Here, the size and shape of the target area may be determined according to actual design requirements.
Optionally, in step S13, the embodiment of the present disclosure may identify a salient region containing a key feature from the target sub-graph; after the salient region is identified, a target region including the salient region may be determined in the target sub-graph based on preset size information.
S140: and cutting out an image of the target area from the target subgraph, and taking the image of the target area as a thumbnail of the spliced picture.
It should be noted here that after the image of the target region is cut out from the target sub-image, the target sub-image still has the target region. The image of the target area can be used as a thumbnail of the spliced picture, and the image of the target area is displayed in a scene needing to display the spliced picture.
According to the thumbnail obtaining method provided by the embodiment of the disclosure, the target subgraph with the optimal key feature condition is screened out from the subgraphs of the spliced pictures, and the image of the target area of the target subgraph containing the key feature is used as the thumbnail, so that the situation that the main content of other subgraphs is cut off when the thumbnail is cut off can be avoided, the thumbnail can be ensured to contain the complete key feature of the target subgraph, the content of the thumbnail is complete, the theme can be highlighted, and the watching experience of a user is effectively improved.
Fig. 2 shows a flowchart of a thumbnail obtaining method provided in an embodiment of the present disclosure, and as shown in fig. 2, the method mainly includes the following steps:
s210: and determining the position information of each sub-image in the spliced picture.
The spliced picture is formed by splicing more than two sub-pictures, wherein the size and the contained content type of each sub-picture can be the same or different. Fig. 3 illustrates an exemplary stitched picture provided by the embodiment of the present disclosure, as shown in fig. 3, the stitched picture is formed by stitching 3 sub-pictures, and step S210 may determine position information of each sub-picture in fig. 3.
It should be noted that the position information is used to indicate the region where the sub-picture is located in the merged picture. The specific form of the position information may be determined according to the actual design requirement, taking the shape of the sub-graph as a rectangle as an example, the position information of the sub-graph may include coordinate values of two opposite corner points, and the position information of the sub-graph may include coordinate values of one vertex, a length and a width. Of course, the position information of the subgraph may be in other forms, and the embodiment of the disclosure does not limit the specific form of the position information.
S220: and acquiring key features of the subgraph in the area indicated by the position information of the subgraph.
It is to be understood that the position information of a sub-picture may indicate the region where the sub-picture is located in the stitched picture. The disclosed embodiment may utilize an image recognition technique to extract key features of the sub-image from a region indicated by the position information of the sub-image, where a specific type of the key features is related to a type of content contained in the sub-image.
Optionally, in step S220, in the region indicated by the position information of the sub-graph, the embodiment of the present disclosure may identify an object type of a subject object included in the sub-graph; and acquiring key features of the sub-graph in the area indicated by the position information of the sub-graph based on the object type corresponding to the sub-graph. It can be understood that when the object types of the main objects contained in the sub-graph are different, the types of the key features extracted from the sub-graph are different.
In the embodiment of the present disclosure, the object types include at least human, animal, plant, industrial, building, natural landscape, etc., and each object type may be further divided. Taking the example that the main object included in the sub-graph is a human figure, the key feature of the sub-graph acquired in step S110 may be a facial feature, and the facial feature may include at least one of an eye feature, an eyebrow feature, a nose feature, a mouth feature, and an ear feature. Taking the example that the main body object included in the sub-image is an industrial product, the industrial product may be a book and a periodical, and the key feature may be a cover title of the book and the periodical, or a text content in an image of the book and the periodical.
Taking fig. 3 as an example, the content included in the sub-graph in fig. 3 is a person, the key feature of the sub-graph obtained in step S220 is a facial feature of the person, and the facial feature may include at least one of an eye feature, an eyebrow feature, a nose feature, a mouth feature, and an ear feature.
S230: and calculating the information entropy of the key features of each subgraph.
In the image field, the information entropy is a statistical form of features, which reflects the average information amount in the image and represents the aggregation features of the image gray level distribution. The entropy is expressed as the average number of bits, unit bit/pixel, of the image gray level set, and also describes the average information content of the image source. The information of the key features of the subgraph can be acquired based on a preset information entropy algorithm.
S240: and determining the sub-graph with the maximum information entropy as a target sub-graph.
Here, the information entropy is proportional to the size of the area of the corresponding key region of the key feature, that is, the larger the area of the corresponding key region of the key feature is, the higher the information entropy of the key feature is. It can be understood that the higher the information entropy of the key feature, the larger the information amount of the key feature in the sub-graph. That is, step S240 may determine the sub-graph with the largest amount of information of the key feature as the target sub-graph.
Taking fig. 3 as an example, the content included in the sub-graph in fig. 3 is a person, the key feature of the sub-graph is a facial feature of the person, and the larger the area of the region corresponding to the facial feature is, the larger the information amount of the key feature is. In fig. 3, the information entropy of sub-graph 1 is the largest, and sub-graph 1 can be determined as the target sub-graph.
S250: salient regions containing key features are identified from the target subgraph.
Here, the specific type of saliency region is related to the type of content contained by the sub-graph. It is to be understood that when the object types of the subject objects contained in the sub-graph are different, the types of salient regions from the sub-graph are different. Taking fig. 3 as an example, the content included in the sub-graph in fig. 3 is a person, the key feature of the sub-graph is a face feature of the person, and the salient region may be a face region of the person.
S260: and determining a target area containing the saliency area in the target subgraph based on preset size information.
Here, the information included in the size information may be determined based on the shape feature of the desired thumbnail image. For example, the thumbnail is rectangular in shape, and the size information may include an aspect ratio. Of course, the size information may also include other forms of content, which is not limited by the embodiments of the present disclosure.
Fig. 4 shows a schematic diagram of a target region in an exemplary stitched picture provided by an embodiment of the present disclosure, and sub-picture 1 in fig. 4 is a target sub-picture in the stitched picture. As shown in fig. 4, the content included in the sub-graph is a person, the key feature of the sub-graph is a facial feature of the person, the salient region may be a facial region of the person, and the target region is a rectangle with an aspect ratio of 3:2 and including the facial region of the person.
S270: and cutting out an image of the target area from the target subgraph, and taking the image of the target area as a thumbnail of the spliced picture.
It should be noted here that after the image of the target region is cut out from the target sub-image, the target sub-image still has the target region. The image of the target area can be used as a thumbnail of the spliced picture, and the image of the target area is displayed in a scene needing to display the spliced picture.
According to the thumbnail obtaining method provided by the embodiment of the disclosure, the target subgraph with the optimal key feature condition is screened out from the subgraphs of the spliced pictures, and the image of the target area of the target subgraph containing the key feature is used as the thumbnail, so that the situation that the main content of other subgraphs is cut off when the thumbnail is cut off can be avoided, the thumbnail can be ensured to contain the complete key feature of the target subgraph, the content of the thumbnail is complete, the theme can be highlighted, and the watching experience of a user is effectively improved.
Based on the same principle as the above thumbnail obtaining method, the embodiment of the present disclosure further provides a thumbnail obtaining apparatus, and fig. 5 shows a schematic diagram of a thumbnail obtaining apparatus provided by the embodiment of the present disclosure. As shown in fig. 5, the thumbnail acquisition apparatus 500 includes a feature acquisition module 510, a target subgraph determination module 520, a target area determination module 530, and a thumbnail acquisition module 550.
The feature obtaining module 510 is configured to obtain a key feature of each sub-image in the stitched picture.
The target sub-image determining module 520 is configured to determine a target sub-image, of which the key feature meets a preset feature condition, from the stitched image based on the key feature of each sub-image.
The target region determining module 530 is configured to determine a target region containing a corresponding key feature from the target sub-graph.
The thumbnail acquiring module 550 is configured to cut out an image of the target area from the target sub-image, and use the image of the target area as a thumbnail of the stitched picture.
According to the thumbnail acquiring device provided by the embodiment of the disclosure, the target subgraph with the optimal key feature condition is screened out from the subgraphs of the spliced pictures, and the image of the target area of the target subgraph containing the key feature is used as the thumbnail, so that the situation that the main content of other subgraphs is cut off when the thumbnail is cut off can be avoided, the thumbnail can be ensured to contain the complete key feature of the target subgraph, the content of the thumbnail is complete, the theme can be highlighted, and the watching experience of a user is effectively improved.
In this embodiment of the present disclosure, when the feature obtaining module 510 is configured to obtain a key feature of each sub-image in the stitched picture, specifically:
determining position information of each sub-image in the spliced image, wherein the position information is used for indicating the region of the sub-image in the spliced image;
and acquiring key features of the subgraph in the area indicated by the position information of the subgraph.
In the embodiment of the present disclosure, when the feature obtaining module 510 is configured to obtain the key feature of the sub-graph in the region indicated by the position information of the sub-graph, specifically:
identifying an object type of a subject object contained in the sub-graph in a region indicated by the position information of the sub-graph;
and acquiring key features of the sub-graph in the area indicated by the position information of the sub-graph based on the object type corresponding to the sub-graph.
In the embodiment of the present disclosure, when the subject object included in the sub-graph is a human figure, the key features include at least one of an eye feature, an eyebrow feature, a nose feature, a mouth feature, and an ear feature.
In this embodiment of the present disclosure, when the target sub-graph determining module 520 is configured to determine, from the stitched picture, a target sub-graph whose key feature meets a preset feature condition based on the key feature of each sub-graph, specifically: and calculating the information entropy of the key features of each sub-graph, and determining the sub-graph with the maximum information entropy as a target sub-graph.
In the disclosed embodiments, the information entropy is proportional to the size of the area of the corresponding key region of the key feature.
In this embodiment of the present disclosure, when the target sub-graph determining module 520 is configured to determine, from the stitched picture, a target sub-graph whose key feature meets a preset feature condition based on the key feature of each sub-graph, specifically: calculating the area of a key region corresponding to the key feature of the subgraph; determining the area ratio of the area of a key area in the subgraph to the total area of the subgraph; and determining the corresponding sub-graph with the maximum area ratio as a target sub-graph.
In this embodiment of the present disclosure, when the target region determining module 530 is configured to determine a target region including a corresponding key feature from a target sub-graph, specifically: identifying a salient region containing a key feature from the target subgraph; and determining a target area containing the saliency area in the target subgraph based on preset size information.
It is understood that the modules of the thumbnail acquiring apparatus in the embodiment of the present disclosure have functions of implementing the corresponding steps of the thumbnail acquiring method. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the thumbnail obtaining apparatus, reference may be specifically made to the corresponding description of the thumbnail obtaining method, which is not described herein again.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 6 illustrates a schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The calculation unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 601 executes the respective methods and processes described above, such as the thumbnail acquisition method. For example, in some embodiments, the thumbnail acquisition method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the thumbnail acquisition method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the thumbnail acquisition method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (19)

1. A thumbnail acquisition method includes:
obtaining key features of each sub-image in the spliced image;
determining a target sub-graph with key features meeting preset feature conditions from the spliced picture based on the key features of each sub-graph;
determining a target region containing the corresponding key feature from the target subgraph;
and cutting out the image of the target area from the target subgraph, and taking the image of the target area as a thumbnail of the spliced picture.
2. The method of claim 1, wherein the obtaining key features of each sub-graph in the stitched picture comprises:
determining position information of each sub-image in the spliced image, wherein the position information is used for indicating the region of the sub-image in the spliced image;
and acquiring key features of the subgraph in the area indicated by the position information of the subgraph.
3. The method of claim 2, wherein the obtaining key features of the sub-graph in the region indicated by the position information of the sub-graph comprises:
identifying an object type of a subject object contained in the sub-graph in a region indicated by the position information of the sub-graph;
and acquiring key features of the sub-graph in a region indicated by the position information of the sub-graph based on the object type corresponding to the sub-graph.
4. The method of any of claims 1-3, when the subject object included in the sub-graph is a human figure, the key features include at least one of eye features, eyebrow features, nose features, mouth features, and ear features.
5. The method of claim 1, wherein the determining, from the stitched picture, a target sub-picture with key features meeting preset feature conditions based on the key features of each sub-picture comprises:
calculating the information entropy of the key features of each sub-graph;
and determining the sub-graph with the maximum information entropy as a target sub-graph.
6. The method of claim 5, the information entropy being proportional to an area size of a corresponding key region of the key feature.
7. The method of claim 1, wherein the determining, from the stitched picture, a target sub-picture with key features meeting preset feature conditions based on the key features of each sub-picture comprises:
calculating the area of a key region corresponding to the key feature of the subgraph;
determining an area ratio of an area of the critical region in the subgraph to a total area of the subgraph;
and determining the corresponding sub-graph with the maximum area ratio as a target sub-graph.
8. The method of claim 1, wherein the determining a target region from the target subgraph that contains the corresponding key feature comprises:
identifying salient regions containing the key features from the target subgraph;
and determining a target region containing the salient region in the target subgraph based on preset size information.
9. A thumbnail acquisition apparatus comprising:
the characteristic acquisition module is used for acquiring key characteristics of each sub-image in the spliced image;
the target sub-image determining module is used for determining a target sub-image with key features meeting preset feature conditions from the spliced image based on the key features of each sub-image;
a target region determining module, configured to determine, from the target sub-graph, a target region including the corresponding key feature;
and the thumbnail acquisition module is used for cutting out the image of the target area from the target subgraph and taking the image of the target area as the thumbnail of the spliced picture.
10. The apparatus according to claim 9, wherein the feature obtaining module, when configured to obtain the key feature of each sub-image in the stitched picture, is specifically configured to:
determining position information of each sub-image in the spliced image, wherein the position information is used for indicating the region of the sub-image in the spliced image;
and acquiring key features of the subgraph in the area indicated by the position information of the subgraph.
11. The apparatus according to claim 10, wherein the feature obtaining module, when configured to obtain the key feature of the sub-graph in the region indicated by the position information of the sub-graph, is specifically configured to:
identifying an object type of a subject object contained in the sub-graph in a region indicated by the position information of the sub-graph;
and acquiring key features of the sub-graph in a region indicated by the position information of the sub-graph based on the object type corresponding to the sub-graph.
12. The apparatus of any of claims 9-11, when the subject object included in the sub-graph is a person, the key features include at least one of an eye feature, an eyebrow feature, a nose feature, a mouth feature, and an ear feature.
13. The apparatus according to claim 9, wherein the target sub-image determining module, when configured to determine, from the stitched picture, a target sub-image whose key feature meets a preset feature condition based on the key feature of each sub-image, is specifically configured to:
calculating the information entropy of the key features of each sub-graph;
and determining the sub-graph with the maximum information entropy as a target sub-graph.
14. The apparatus of claim 13, the information entropy being proportional to an area size of a corresponding key region of the key feature.
15. The apparatus according to claim 9, wherein the target sub-image determining module, when configured to determine, from the stitched picture, a target sub-image whose key feature meets a preset feature condition based on the key feature of each sub-image, is specifically configured to:
calculating the area of a key region corresponding to the key feature of the subgraph;
determining an area ratio of an area of the critical region in the subgraph to a total area of the subgraph;
and determining the corresponding sub-graph with the maximum area ratio as a target sub-graph.
16. The apparatus according to claim 9, wherein the target region determining module, when configured to determine the target region including the corresponding key feature from the target sub-graph, is specifically configured to:
identifying salient regions containing the key features from the target subgraph;
and determining a target region containing the salient region in the target subgraph based on preset size information.
17. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-8.
19. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-8.
CN202111517814.9A 2021-12-13 2021-12-13 Thumbnail obtaining method and device, electronic equipment and storage medium Pending CN114219945A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111517814.9A CN114219945A (en) 2021-12-13 2021-12-13 Thumbnail obtaining method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111517814.9A CN114219945A (en) 2021-12-13 2021-12-13 Thumbnail obtaining method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114219945A true CN114219945A (en) 2022-03-22

Family

ID=80701577

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111517814.9A Pending CN114219945A (en) 2021-12-13 2021-12-13 Thumbnail obtaining method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114219945A (en)

Similar Documents

Publication Publication Date Title
US20180233106A1 (en) Page display method and terminal
WO2022242397A1 (en) Image processing method and apparatus, and computer-readable storage medium
CN112527115A (en) User image generation method, related device and computer program product
CN113538450B (en) Method and device for generating image
CN114004840A (en) Image processing method, training method, detection method, device, equipment and medium
CN113538502A (en) Picture clipping method and device, electronic equipment and storage medium
CN113780297B (en) Image processing method, device, equipment and storage medium
CN115719356A (en) Image processing method, apparatus, device and medium
CN113688839B (en) Video processing method and device, electronic equipment and computer readable storage medium
CN113837194B (en) Image processing method, image processing apparatus, electronic device, and storage medium
CN114168793A (en) Anchor display method, device, equipment and storage medium
CN114187392A (en) Virtual even image generation method and device and electronic equipment
CN114219945A (en) Thumbnail obtaining method and device, electronic equipment and storage medium
CN113691835B (en) Video implantation method, device, equipment and computer readable storage medium
CN115082298A (en) Image generation method, image generation device, electronic device, and storage medium
CN114066790A (en) Training method of image generation model, image generation method, device and equipment
CN114648601A (en) Virtual image generation method, electronic device, program product and user terminal
CN114723796A (en) Three-dimensional point cloud generation method and device and electronic equipment
CN113420176B (en) Question searching method, question frame drawing device, question searching equipment and storage medium
CN116385829B (en) Gesture description information generation method, model training method and device
CN114363627B (en) Image processing method and device and electronic equipment
CN112988688B (en) Picture sharing method and device, electronic equipment and storage medium
CN116610244A (en) Thumbnail display control method, device, equipment and storage medium
CN113691866B (en) Video processing method, device, electronic equipment and medium
CN114327346B (en) Display method, display device, electronic apparatus, and storage medium

Legal Events

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