CN106951226B - Method and system for displaying characters in thumbnail - Google Patents
Method and system for displaying characters in thumbnail Download PDFInfo
- Publication number
- CN106951226B CN106951226B CN201710086040.6A CN201710086040A CN106951226B CN 106951226 B CN106951226 B CN 106951226B CN 201710086040 A CN201710086040 A CN 201710086040A CN 106951226 B CN106951226 B CN 106951226B
- Authority
- CN
- China
- Prior art keywords
- thumbnail
- text
- picture
- characters
- character
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 21
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04842—Selection of displayed objects or displayed text elements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/22—Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The invention relates to the field of thumbnail display, in particular to a method and a system for displaying characters in a thumbnail. The invention can be recognized by analyzing the minimum resolution of the characters in the picture; acquiring a thumbnail corresponding to the picture; acquiring the resolution of the thumbnail and the position and the word size of the characters in the thumbnail; judging whether the minimum resolution is not greater than the resolution of the thumbnail or not, if so, displaying characters according to the position, the character size and the minimum resolution; if not, setting a text box, and displaying the text in the text box at the minimum resolution. Thereby ensuring that the text in the thumbnail can be identified.
Description
Technical Field
The invention relates to the field of thumbnail display, in particular to a method and a system for displaying characters in a thumbnail.
Background
If the existing thumbnail has text content, the text can be compressed and cannot be seen clearly due to the indiscriminate compression of the picture in the prior art, generally, a user only needs to check the thumbnail version enough, but the original image needs to be checked due to the fuzzy text, so that extra operation is caused; if the mobile terminal is a mobile phone or the like, the operation of viewing the original image also causes waste of traffic.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: and the definition of characters in the thumbnail is improved.
In order to solve the technical problems, the invention adopts the technical scheme that:
the invention provides a method for displaying characters in a thumbnail, which comprises the following steps:
analyzing the minimum resolution ratio of the characters in the picture which can be identified;
acquiring a thumbnail corresponding to the picture;
acquiring the resolution of the thumbnail and the position and the word size of the characters in the thumbnail;
judging whether the minimum resolution is not greater than the resolution of the thumbnail or not, if so, displaying characters according to the position, the character size and the minimum resolution; if not, setting a text box, and displaying the text in the text box at the minimum resolution.
The invention further provides a system for displaying characters in a thumbnail, comprising:
the analysis module is used for analyzing the minimum resolution ratio of the characters in the picture which can be identified;
the thumbnail module is used for acquiring a thumbnail corresponding to the picture;
the acquisition module is used for acquiring the resolution of the thumbnail and the position and the word size of the characters in the thumbnail;
the judging module is used for judging whether the minimum resolution is not greater than the resolution of the thumbnail or not, and if so, displaying characters according to the position, the font size and the minimum resolution; if not, setting a text box, and displaying the text in the text box at the minimum resolution.
The invention has the beneficial effects that: analyzing the minimum resolution ratio of the characters in the picture, displaying the characters in the thumbnail at the minimum resolution ratio, and displaying the thumbnail characters at the minimum resolution ratio under the condition of not changing the positions and the characters of the thumbnail characters if the resolution ratio of the thumbnail is greater than or equal to the minimum resolution ratio; if the number is less than the preset number, the display is performed in a mode of creating a text box. By the method, the characters in the thumbnail can be accurately identified, and excessive additional storage data cannot be added.
Drawings
FIG. 1 is a block flow diagram of an embodiment of a method for displaying text in a thumbnail;
FIG. 2 is a system block diagram of an embodiment of a system for displaying text in a thumbnail;
description of reference numerals:
1. an analysis module; 2. a abbreviating module; 3. an acquisition module; 4. and a judging module.
Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
The most key concept of the invention is as follows: analyzing the minimum resolution ratio of the characters in the thumbnail which can be clearly identified, displaying the characters in the thumbnail by using the minimum resolution ratio, and if the resolution ratio of the thumbnail is greater than or equal to the minimum resolution ratio, displaying the characters of the thumbnail according to the minimum resolution ratio under the condition of not changing the positions and the characters of the thumbnail; if the number is less than the preset number, the display is performed in a mode of creating a text box. The method and the device realize that the characters in the thumbnail are displayed with the minimum resolution ratio capable of being identified, so that the characters in the thumbnail can be clearly identified, and excessive storage data cannot be generated additionally.
Referring to fig. 1 and fig. 2,
as shown in fig. 1, the present invention provides a method for displaying characters in a thumbnail, comprising:
analyzing the minimum resolution ratio of the characters in the picture which can be identified;
acquiring a thumbnail corresponding to the picture;
acquiring the resolution of the thumbnail and the position and the word size of the characters in the thumbnail;
judging whether the minimum resolution is not greater than the resolution of the thumbnail or not, if so, displaying characters according to the position, the character size and the minimum resolution; if not, setting a text box, and displaying the text in the text box at the minimum resolution.
From the above description, the beneficial effects of the present invention are: the method and the device can ensure that the characters in the thumbnail can be identified, solve the problem that the characters in part of the thumbnails cannot be clearly identified, and avoid adding excessive data to the stored thumbnails.
Further, the method also comprises the following steps:
presetting a list for recording resolution ratios according to a sequence from large to small;
displaying the characters in the picture according to the resolution ratio recorded by the list to obtain a corresponding character picture group;
acquiring two adjacent character pictures in the character picture group to obtain a first character picture and a second character picture;
if the characters in the first character picture can be identified and the characters in the second character picture can not be identified, then: and setting the resolution of the first character picture as the minimum resolution.
It can be known from the above description that after the corresponding text image group is obtained, two adjacent text images are continuously checked, if the text in one image of the two adjacent text images can be identified, and the text in the other image cannot be identified, that is, the resolution of the identified image is the minimum resolution at which the text in all resolutions recorded in the list can be identified.
Further, the method also comprises the following steps:
generating a character picture corresponding to the minimum resolution to obtain a third character picture;
and saving the minimum resolution, the third character picture, the position and the font size to the tail part of the thumbnail file data.
As can be seen from the above description, the minimum resolution, the third text image, the position, and the font size are saved to the end of the thumbnail file data. Therefore, the display operation of the characters can be completed only by reading the data corresponding to the tail part of the thumbnail file and then performing corresponding processing; the operation steps are reduced, and the efficiency is improved.
Further, the method also comprises the following steps:
and setting the length and the width of the text box according to the character size and the number of characters to be displayed in the text box.
From the above description, it can be known that the required characters are displayed through the character frame with the appropriate length and width, thereby avoiding unnecessary occupation of the screen space and avoiding waste of the screen space.
Further, the method also comprises the following steps:
and setting an arrow to point to a text part corresponding to the text content displayed in the text box in the thumbnail from the text box.
From the above description, through the indicating action of the arrow, the user can accurately determine the corresponding part of the text displayed in the text box in the thumbnail, so that the misjudgment of the corresponding part of the text displayed in the text box in the thumbnail is avoided, and the reading pleasure of the user is improved.
As shown in fig. 2, the present invention further provides a system for displaying characters in a thumbnail, comprising:
the analysis module 1 is used for analyzing the minimum resolution ratio of the characters in the picture which can be identified;
the thumbnail module 2 is used for acquiring a thumbnail corresponding to the picture;
the acquisition module 3 is used for acquiring the resolution of the thumbnail and the position and the word size of the characters in the thumbnail;
the judging module 4 is used for judging whether the minimum resolution is not greater than the resolution of the thumbnail or not, and if so, displaying characters according to the position, the font size and the minimum resolution; if not, setting a text box, and displaying the text in the text box at the minimum resolution.
Further, the parsing module 1 further includes:
a presetting unit for presetting a list of recording resolutions in descending order;
the display unit is used for displaying the characters in the pictures according to the resolution ratio recorded by the list to obtain a corresponding character picture group;
the acquiring unit is used for acquiring two adjacent text pictures in the text picture group to obtain a first text picture and a second text picture;
a setting unit, configured to, if the text in the first text picture can be recognized and the text in the second text picture cannot be recognized: and setting the resolution of the first character picture as the minimum resolution.
Further, still include:
the generating module is used for generating the character picture corresponding to the minimum resolution to obtain a third character picture;
and the storage module is used for storing the minimum resolution, the third character picture, the position and the font size to the tail part of the thumbnail file data.
Further, still include:
and the setting module is used for setting the length and the width of the text box according to the word size and the number of the characters to be displayed in the text box.
Further, still include:
and the indicating module is used for setting an arrow to point to the character part corresponding to the character content displayed in the character frame in the thumbnail from the character frame.
Example (b):
the embodiment of the invention provides a method for displaying characters in a thumbnail, which comprises the following steps:
s1, analyzing the minimum resolution ratio of the characters in the picture which can be identified; the S1 is specifically a list in which resolutions are preset to be recorded in descending order; displaying the characters in the picture according to the resolution ratio recorded by the list to obtain a corresponding character picture group; acquiring two adjacent character pictures in the character picture group to obtain a first character picture and a second character picture; if the characters in the first character picture can be identified and the characters in the second character picture can not be identified, then: and setting the resolution of the first character picture as the minimum resolution.
For example, a list is preset, and the resolution is recorded in the list from large to small; and receiving a cartoon original image, analyzing the cartoon original image to obtain character pictures in the cartoon original image, and displaying the character pictures according to the resolution ratio recorded in the list to obtain a corresponding character picture group. Acquiring two adjacent character pictures in the character picture group to obtain a first character picture and a second character picture; if the characters in the first character picture can be identified and the characters in the second character picture can not be identified, then: and setting the resolution of the first character picture as the minimum resolution.
And S2, acquiring the thumbnail corresponding to the picture.
For example, a thumbnail of the caricature artwork is obtained.
And S3, acquiring the resolution of the thumbnail and the position and the word size of the characters in the thumbnail.
For example, obtaining a cartoon picture generated with a minimum resolution, obtaining coordinates of characters in the cartoon picture, and then obtaining a transformation relation between the minimum resolution and the resolution of the cartoon thumbnail; and according to the transformation relation, converting the coordinates of the characters in the cartoon picture generated by the minimum resolution into the positions of the characters in the cartoon thumbnail, and simultaneously obtaining the character size of the characters in the cartoon thumbnail.
S4, generating a character picture corresponding to the minimum resolution to obtain a third character picture; and saving the minimum resolution, the third character picture, the position and the font size to the tail part of the thumbnail file data.
For example, the identified text image in the cartoon image is displayed with the minimum resolution obtained in step S1, a corresponding third text image is obtained, and the minimum resolution, the third text image, the position and the font size are saved to the end of the cartoon thumbnail file data. And an identifier is set at the tail of the comic thumbnail in which the four data are stored at the tail of the file.
S5, judging whether the minimum resolution is not greater than the resolution of the thumbnail, and if so, displaying characters according to the position, the font size and the minimum resolution; if not, setting a text box, and displaying the text in the text box at the minimum resolution. For the text box, the length and width of the text box should be set according to the font size and the number of characters to be displayed in the text box.
For example, first, whether an identifier exists at the tail of the comic thumbnail is judged, and if the identifier exists at the tail of the comic thumbnail, it is indicated that the minimum resolution, the third text picture obtained in the step S4, the position and the font size are stored at the tail of the comic thumbnail; reading the minimum resolution stored at the tail of the cartoon thumbnail, judging whether the minimum resolution is not greater than the resolution of the cartoon thumbnail, if so, reading the third character picture, the position and the character size obtained in the step S4 stored at the tail of the cartoon thumbnail, and displaying the third character picture obtained in the step S4 at the position according to the character size; if not, reading the third character picture stored at the tail part of the cartoon thumbnail and obtained in the step S4, and setting the length and the width of the character frame according to the character size and the number of characters to be displayed in the character frame. And displaying the third text picture obtained in the step S4 in the text box.
And S5, setting an arrow to point to the character part corresponding to the character content displayed in the character frame in the thumbnail from the character frame.
For example, an arrow is set from the text box obtained in the step S5 to a text portion corresponding to the text content displayed in the text box obtained in the step S5 in the comic thumbnail.
In summary, according to the method and system for displaying characters in a thumbnail provided by the present invention, a list recording resolution is preset, a minimum resolution at which the characters in the thumbnail can be clearly identified is obtained by analyzing by verifying the recording resolution in the list, the characters in the thumbnail are displayed with the minimum resolution, and if the resolution of the thumbnail itself is greater than or equal to the minimum resolution, the characters in the thumbnail are displayed with the minimum resolution without changing the position and characters of the characters in the thumbnail; if the size is smaller than the preset size, the character is displayed by creating a character frame with proper length and width. And indicating the corresponding part of the characters displayed in the character frame in the thumbnail by using an arrow; meanwhile, the tail part of the thumbnail file data stores the minimum resolution, the position and the font size; displaying the character and picture according to the minimum resolution, position and font size; only the information at the tail part of the thumbnail file needs to be read and then the related operation is carried out. The method is used for displaying the characters in the thumbnail with the minimum resolution ratio capable of being recognized, so that the characters in the thumbnail can be clearly recognized, and excessive storage data cannot be generated additionally.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.
Claims (8)
1. A method for displaying text in a thumbnail, comprising:
analyzing the minimum resolution ratio of the characters in the picture which can be identified;
acquiring a thumbnail corresponding to the picture;
acquiring the resolution of the thumbnail and the position and the word size of the characters in the thumbnail;
judging whether the minimum resolution is not greater than the resolution of the thumbnail or not, if so, displaying characters according to the position, the character size and the minimum resolution; if not, setting a text box, and displaying the text in the text box at the minimum resolution;
the minimum resolution at which the characters in the picture can be identified is analyzed, specifically:
presetting a list for recording resolution ratios according to a sequence from large to small;
displaying the characters in the picture according to the resolution ratio recorded by the list to obtain a corresponding character picture group;
acquiring two adjacent character pictures in the character picture group to obtain a first character picture and a second character picture;
if the characters in the first character picture can be identified and the characters in the second character picture can not be identified, then: and setting the resolution of the first character picture as the minimum resolution.
2. The method of claim 1, further comprising:
generating a character picture corresponding to the minimum resolution to obtain a third character picture;
and saving the minimum resolution, the third character picture, the position and the font size to the tail part of the thumbnail file data.
3. The method of claim 1, wherein the text box comprises:
and setting the length and the width of the text box according to the character size and the number of characters to be displayed in the text box.
4. The method of claim 1, further comprising:
and setting an arrow to point to a text part corresponding to the text content displayed in the text box in the thumbnail from the text box.
5. A system for displaying text in a thumbnail, comprising:
the analysis module is used for analyzing the minimum resolution ratio of the characters in the picture which can be identified;
the thumbnail module is used for acquiring a thumbnail corresponding to the picture;
the acquisition module is used for acquiring the resolution of the thumbnail and the position and the word size of the characters in the thumbnail;
the judging module is used for judging whether the minimum resolution is not greater than the resolution of the thumbnail or not, and if so, displaying characters according to the position, the font size and the minimum resolution; if not, setting a text box, and displaying the text in the text box at the minimum resolution;
wherein, the analysis module further comprises:
a presetting unit for presetting a list of recording resolutions in descending order;
the display unit is used for displaying the characters in the pictures according to the resolution ratio recorded by the list to obtain a corresponding character picture group;
the acquiring unit is used for acquiring two adjacent text pictures in the text picture group to obtain a first text picture and a second text picture;
a setting unit, configured to, if the text in the first text picture can be recognized and the text in the second text picture cannot be recognized: and setting the resolution of the first character picture as the minimum resolution.
6. The system for displaying text in thumbnails according to claim 5, further comprising:
the generating module is used for generating the character picture corresponding to the minimum resolution to obtain a third character picture;
and the storage module is used for storing the minimum resolution, the third character picture, the position and the font size to the tail part of the thumbnail file data.
7. The system for displaying text in thumbnails according to claim 5, further comprising:
and the setting module is used for setting the length and the width of the text box according to the word size and the number of the characters to be displayed in the text box.
8. The system for displaying text in thumbnails according to claim 5, further comprising:
and the indicating module is used for setting an arrow to point to the character part corresponding to the character content displayed in the character frame in the thumbnail from the character frame.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710086040.6A CN106951226B (en) | 2017-02-17 | 2017-02-17 | Method and system for displaying characters in thumbnail |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710086040.6A CN106951226B (en) | 2017-02-17 | 2017-02-17 | Method and system for displaying characters in thumbnail |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106951226A CN106951226A (en) | 2017-07-14 |
CN106951226B true CN106951226B (en) | 2021-01-26 |
Family
ID=59467624
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710086040.6A Active CN106951226B (en) | 2017-02-17 | 2017-02-17 | Method and system for displaying characters in thumbnail |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106951226B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104125419A (en) * | 2014-06-24 | 2014-10-29 | 北京理工大学 | Self-adaptive resolution ratio implementing method based on CMOS image sensor |
CN106227398A (en) * | 2016-06-29 | 2016-12-14 | 宇龙计算机通信科技(深圳)有限公司 | A kind of camera image character displaying method and device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6252588B1 (en) * | 1998-06-16 | 2001-06-26 | Zentek Technology, Inc. | Method and apparatus for providing an audio visual e-mail system |
CN105447034A (en) * | 2014-08-29 | 2016-03-30 | 富泰华工业(深圳)有限公司 | Method and system for generating picture thumbnail |
CN104850660A (en) * | 2015-06-04 | 2015-08-19 | 广东欧珀移动通信有限公司 | Picture displaying method, picture displaying device and mobile terminal |
-
2017
- 2017-02-17 CN CN201710086040.6A patent/CN106951226B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104125419A (en) * | 2014-06-24 | 2014-10-29 | 北京理工大学 | Self-adaptive resolution ratio implementing method based on CMOS image sensor |
CN106227398A (en) * | 2016-06-29 | 2016-12-14 | 宇龙计算机通信科技(深圳)有限公司 | A kind of camera image character displaying method and device |
Also Published As
Publication number | Publication date |
---|---|
CN106951226A (en) | 2017-07-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8186572B2 (en) | Systems and methods for animating barcodes | |
US20060015823A1 (en) | Display and preview method for display apparatus | |
US20130238968A1 (en) | Automatic Creation of a Table and Query Tools | |
US10834424B2 (en) | Method and device for compressing image, and electronic device | |
JP2004234656A (en) | Method for reformatting document by using document analysis information, and product | |
CN103366341A (en) | Method and device for adaptive-resolution display of image | |
US20120005564A1 (en) | Content distribution system and method | |
CN101246550A (en) | Image character recognition method and device | |
CN108989704B (en) | Image generation method and device and terminal equipment | |
CN105956133B (en) | Method and device for displaying file on intelligent terminal | |
CN103177101B (en) | A kind of method of circulation display thumbnail on folder icon and device | |
JP5182902B2 (en) | Document image output device | |
CN102637159B (en) | Document display method and device | |
CN111507067A (en) | Acquisition method for displaying formula picture, and method and device for transferring formula picture | |
CN109388726A (en) | A kind of image display method, device, equipment and computer-readable medium | |
CN106951226B (en) | Method and system for displaying characters in thumbnail | |
CN109710783B (en) | Picture loading method and device, storage medium and server | |
CN106874252A (en) | A kind of document identification and display methods and its mobile terminal | |
JP4177325B2 (en) | Image processing apparatus, image processing program, and image processing method | |
CN110059563A (en) | A kind of text handling method and device | |
CN111399788A (en) | Media file playing method and media file playing device | |
CN110362790B (en) | Font file processing method and device, electronic equipment and readable storage medium | |
CN113382086A (en) | Document transmission method and device, electronic equipment and computer program product | |
CN110795914B (en) | Method and device for converting PDF document into picture and electronic equipment | |
US20130104014A1 (en) | Viewer unit, server unit, display control method, digital comic editing method and non-transitory computer-readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |