CN103414944A - Method and apparatus for fast previewing object file - Google Patents

Method and apparatus for fast previewing object file Download PDF

Info

Publication number
CN103414944A
CN103414944A CN2013102983351A CN201310298335A CN103414944A CN 103414944 A CN103414944 A CN 103414944A CN 2013102983351 A CN2013102983351 A CN 2013102983351A CN 201310298335 A CN201310298335 A CN 201310298335A CN 103414944 A CN103414944 A CN 103414944A
Authority
CN
China
Prior art keywords
pixel region
file destination
file
rgb value
contrast
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.)
Granted
Application number
CN2013102983351A
Other languages
Chinese (zh)
Other versions
CN103414944B (en
Inventor
王云华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New 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 Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN201310298335.1A priority Critical patent/CN103414944B/en
Publication of CN103414944A publication Critical patent/CN103414944A/en
Application granted granted Critical
Publication of CN103414944B publication Critical patent/CN103414944B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method and apparatus for fast previewing an object file. The method comprises the following steps that: the object file is downloaded and decoded; key information for identifying the content of the object file is captured from the decoded object file; the size of the pixel of the captured key information is amplified to a size which accords with the size of a preview window; and amplified key information is display in the preview window. According to the method and apparatus for fast previewing object file, the key information which is captured from a downloading object file is displayed in the preview window, and therefore, quick view of a downloading object file or a downloaded object file can be realized, complex user operation is not required, and operation process can be simplified, and view time can be saved; and the content of the downloading file can be previewed in a download process, and therefore, time, traffic and resource waste caused by wrong downloading can be avoided.

Description

The method and apparatus of rapid preview file destination
Technical field
The present invention relates to the intelligent terminal technical field, specially refer to the method and apparatus of rapid preview file destination.
Background technology
Along with the arrival in current intelligence epoch, intelligent terminal has become one of requisite configuration in life, function also from strength to strength, such as intelligent television, mobile phone, PAD etc.The intelligent television of take is example, and the major function of intelligent television, except watching in real time TV programme for the user, has also increased the functions such as amusement, social activity, also can carry out the network download, obtains required document, picture or the video etc. of user from the webserver.Due to the user when downloading required file, the file of download is stored in the inside or External memory equipment of television system, when whether the content in needs are checked and judged this file is the content oneself needed, just need user's remote controller, by opening layer by layer the file shown on the TV user interface, find required file, content in viewing files.Owing to by remote controller, searching inconvenience, operating process is very loaded down with trivial details.Simultaneously, the user just can check after must waiting file to download fully, if not own needed file, has caused the waste of time, flow and resource.
Summary of the invention
Main purpose of the present invention, for a kind of method and apparatus of rapid preview file destination is provided, can facilitate viewing files, simple to operate in downloading process.
The present invention proposes a kind of method of rapid preview file destination, comprises step:
The file destination of downloading and decode;
From decoded file destination, the key message of the described file destination content of intercepting sign;
The pixel size of the key message of intercepting is amplified to the in the same size with the preview window;
In described the preview window, show the key message after amplifying.
Preferably, described from decoded file destination, the step of intercepting key message comprises:
From decoded file destination, extract background information;
The rgb value of described background information of take is benchmark, the rgb value of each pixel region in more described decoded file destination;
The rgb value of intercepting rgb value and described background information differs obvious pixel region, as key message.
Preferably, when described file destination is text or form document, described from decoded file destination, the step of intercepting key message comprises:
From decoded text or form document, extract background color part information as a setting;
The rgb value of described background information of background color of take is benchmark, the rgb value of each pixel region in more described text or form document;
When the obvious pixel region of rgb value contrast that occurs in described text or form document with background color, by the obvious pixel region of described contrast and default character code relatively;
When the obvious pixel region of described contrast is consistent with default character code, judge that the obvious pixel region of described contrast is character block;
Intercept the pixel region of described character block, as key message.
Preferably, when described file destination is picture file, described from decoded file destination, the step of intercepting key message comprises:
From decoded picture file, extract the block of pixels that is positioned at the image edge part, as a setting information;
The rgb value of the block of pixels of information as a setting of take is benchmark, from 0 rank, rank to 255, and the rgb value of each pixel region in more described picture file successively;
When the obvious pixel region of rgb value contrast that occurs in described picture file with the block of pixels of information as a setting, judge the identification division of the obvious pixel region of described contrast as picture;
Intercept the pixel region of the identification division of described picture, as key message.
Preferably, when described file destination is video file, described from decoded file destination, the step of intercepting key message comprises:
From the i frame video pictures extracted, extract the block of pixels that is positioned at the image edge part, as a setting information; Wherein, i is the frame number of described video pictures;
The rgb value of the block of pixels of information as a setting of take is benchmark, from 0 rank, rank to 255, and the rgb value of each pixel region in more described picture file successively;
When the obvious pixel region of rgb value contrast that occurs in described picture file with the block of pixels of information as a setting, by the obvious pixel region of described contrast and default character code relatively;
When the obvious pixel region of described contrast is consistent with default character code, judge that the obvious pixel region of described contrast is character block;
When the obvious pixel region of described contrast and default character code are inconsistent, judge the identification division of the obvious pixel region of described contrast as picture;
Intercept the pixel region of the identification division of described character block and described picture, as key message;
When the obvious pixel region of rgb value contrast that do not have in described picture file to occur with the block of pixels of information as a setting, from decoded video file, extract i+1 frame video pictures, again extract the block of pixels that is positioned at the image edge part, information, circulate with this as a setting.
The present invention also proposes a kind of device of rapid preview file destination, comprising:
Download module, for downloading and decode file destination;
Interception module, for from decoded file destination, intercept the key message of the described file destination content of sign;
Amplification module, be amplified to the in the same size with the preview window for the pixel size of the key message by intercepting;
Display module, for showing the key message after amplifying at described the preview window.
Preferably, described interception module comprises:
The background extracting unit, for from decoded file destination, extract background information;
Comparing unit, be benchmark, the rgb value of each pixel region in more described decoded file destination for take the rgb value of described background information;
The sign interception unit, differ obvious pixel region be used to the rgb value that intercepts rgb value and described background information, as key message.
Preferably, described background extracting unit is used for, and when described file destination is text or form document, from decoded text or form document, extracts background color part information as a setting;
Described comparing unit is used for, and the rgb value of described background information of background color of take is benchmark, the rgb value of each pixel region in more described text or form document; When the obvious pixel region of rgb value contrast that occurs in described text or form document with background color, by the obvious pixel region of described contrast and default character code relatively; When the obvious pixel region of described contrast is consistent with default character code, judge that the obvious pixel region of described contrast is character block;
Described sign interception unit is used for, and the pixel region of the described character block of intercepting, as key message.
Preferably, described background extracting unit is used for, and when described file destination is picture file, from decoded picture file, extracts the block of pixels that is positioned at the image edge part, as a setting information;
Described comparing unit is used for, and the rgb value of the block of pixels of information as a setting of take is benchmark, from 0 rank, rank to 255, and the rgb value of each pixel region in more described picture file successively; When the obvious pixel region of rgb value contrast that occurs in described picture file with the block of pixels of information as a setting, judge the identification division of the obvious pixel region of described contrast as picture;
Described sign interception unit is used for, and the pixel region of the identification division of the described picture of intercepting, as key message.
Preferably, described background extracting unit is used for, and when described file destination is video file, from the i frame video pictures extracted, extracts the block of pixels that is positioned at the image edge part, as a setting information; Wherein, i is the frame number of described video pictures;
Described comparing unit is used for, and the rgb value of the block of pixels of information as a setting of take is benchmark, from 0 rank, rank to 255, and the rgb value of each pixel region in more described picture file successively; When the obvious pixel region of rgb value contrast that occurs in described picture file with the block of pixels of information as a setting, by the obvious pixel region of described contrast and default character code relatively; When the obvious pixel region of described contrast is consistent with default character code, judge that the obvious pixel region of described contrast is character block; When the obvious pixel region of described contrast and default character code are inconsistent, judge the identification division of the obvious pixel region of described contrast as picture;
Described sign interception unit is used for, and intercepts the pixel region of the identification division of described character block and described picture, as key message;
Described background extracting unit also for, when described comparing unit judges in described picture file not have to occur and as a setting during the obvious pixel region of rgb value contrast of the block of pixels of information, from decoded video file, extract i+1 frame video pictures, again extract the block of pixels that is positioned at the image edge part, information as a setting.
The present invention is from intercepting key message the file destination of current download, be presented in the preview window, realize checking fast the current file destination of downloading or downloading, without loaded down with trivial details user's operation, simplified operating process, saved the time of checking, and file content that can preview is being downloaded in downloading process, avoided downloading because of mistake the waste of the time, flow and the resource that cause.
The accompanying drawing explanation
Fig. 1 is the flow chart of the first embodiment of the method for rapid preview file destination of the present invention;
Fig. 2 is the flow chart of the second embodiment of the method for rapid preview file destination of the present invention;
Fig. 3 is the flow chart of the 3rd embodiment of the method for rapid preview file destination of the present invention;
Fig. 4 is the flow chart of the 4th embodiment of the method for rapid preview file destination of the present invention;
Fig. 5 is the flow chart of the 5th embodiment of the method for rapid preview file destination of the present invention;
Fig. 6 is the structural representation of the first embodiment of the device of rapid preview file destination of the present invention;
Fig. 7 is the structural representation of the second embodiment of the device of rapid preview file destination of the present invention.
The realization of the object of the invention, functional characteristics and advantage, in connection with embodiment, are described further with reference to accompanying drawing.
Embodiment
Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
As shown in Figure 1, Fig. 1 is the flow chart of the first embodiment of the method for rapid preview file destination of the present invention.The method of the rapid preview file destination that the present embodiment is mentioned comprises:
Step S10, the file destination of downloading and decode;
Scheme in the present embodiment can be used on the smart machines such as television set, mobile phone, PAD, and the present embodiment be take television set and is example, and other smart machines all can be applied mechanically.Television set has been set up two buffering areas in the memory of system, comprise the first buffering area and the second buffering area, wherein, the file destination that the first buffering area is downloaded for cache user, be that television system downloads to the file destination that the user needs in the first buffering area of television system, file destination can comprise text, form, picture, video etc.Due to generally, the file of download is all that the form according to packet is downloaded in television set, and for it is carried out to preview, television system is decoded to the file destination in downloading to the first buffering area on backstage, obtains decoded file.The process of this decoding can be after downloading complete file destination, or carries out in the process of downloading, and can realize the file destination of the downloading preview of decoding.
Step S20, from decoded file destination, the key message of the described file destination content of intercepting sign;
Because the purpose of the present embodiment is the file destination in order to allow user's preview fast download, therefore do not need all information of whole file destination are all shown, only need to show that some have significant key message, this key message is to exist in file destination, directly from file destination, intercepting out, may be line inscribed, a picture etc., allow the user can be from these simple key messages, recognizing the content of download, whether the content of downloading with judgement be own needed file.For example, for document files such as text or forms, title that can display document; For picture, the facial image in can Showing Picture; For film video, can show film title, show company etc.Television system, from decoded file destination, has significant information interception by these and gets off, and is stored in the second buffering area, is convenient to be presented on television screen.
Step S30, be amplified to the in the same size with the preview window by the pixel size of the key message of intercepting;
In order not affect the current TV programme of watching of user, television system is set up a preview window in the corner location of video screen, the size of the preview window will be significantly less than the full frame size of video screen, with shielding window not, be limited, for example, in the upper right corner of video screen, a resolution being set up in the position of its frame is the preview window of 320 * 240.Now, the large I of the second buffer area and the size of the preview window are consistent, and the key message of intercepting is before being stored to the second buffer area, after it is amplified to the in the same size with the preview window, more point-to-point second buffer area that is stored to.
Step S40, show the key message after amplifying in the preview window.
The display module of television set reads the content of storing in the second buffer area, and is presented in the preview window, checks fast for the user whether the current file of downloading or downloading is own needed file.If the file of downloading current is not user's request, and the user can manually stop downloading, and avoids causing the waste of time, flow and resource.Start the process of above-mentioned decoding, intercepting, demonstration, can be that the user triggers certain button on remote controller or certain control on the television system user interface, or automatically be started by television system, simplified preview and shown the operating process started.
The present embodiment is from intercepting key message the file destination of current download, be presented in the preview window, realize checking fast the current file destination of downloading or downloading, without loaded down with trivial details user's operation, simplified operating process, saved the time of checking, and file content that can preview is being downloaded in downloading process, avoided downloading because of mistake the waste of the time, flow and the resource that cause.
As shown in Figure 2, Fig. 2 is the flow chart of the second embodiment of the method for rapid preview file destination of the present invention.It is basic that the present embodiment be take embodiment illustrated in fig. 1, and step S20 comprises:
Step S21, from decoded file destination, extract background information;
In the present embodiment, no matter file destination is word, form, picture or video, because backcolor and foreground picture certainly exist apparent in view contrast difference, therefore, its key is that foreground picture and background color are made a distinction, and the key message using foreground picture as file destination shows.At first the present embodiment determines background information, and namely from background piece of background region intercepting of file destination, this background area is normally in the marginal portion of document, picture.
Step S22, the rgb value of background information of take is benchmark, the rgb value of each pixel region in more decoded file destination;
With the color of background benchmark as a comparison, by lining by line scan, carry out color relatively with whole document or picture, look into and see if there is and the obvious zone of backcolor difference.
Step S23, the rgb value of intercepting rgb value and background information differs obvious pixel region, as key message.
When scanning with the obvious zone of backcolor difference, illustrate that this regional content and background information have remarkable contrast, usually should namely include the key message that can identify the file destination content in zone, should intercept in zone, as key message, store, be presented in the preview window after follow-up amplification.
The present embodiment adopts backcolor benchmark as a comparison, relatively also intercepting differs obvious zone with backcolor, to obtain the key message of sign file destination content, for follow-up preview, show, this operation can be carried out in the process of download file, without waiting for that all files download is complete, avoided downloading because of mistake resource and the time waste caused; Simultaneously, the content of intercepting is originally just to be present in file destination, and is the sub-fraction in file destination, and without carrying out complicated contents extraction and conversion, processing procedure is very simple, easily realizes.
As shown in Figure 3, Fig. 3 is the flow chart of the 3rd embodiment of the method for rapid preview file destination of the present invention.It is basic that the present embodiment be take embodiment illustrated in fig. 1, the situation while being text or form document for file destination, and step S20 comprises:
Step S211, from decoded text or form document, extract background color part information as a setting;
In the present embodiment, for the file destination of text or form, the part that mainly need identify is word segment, generally, background colour is white or light, and now word segment is dark, or when background colour is dark color, word segment is light color, and contrast is obvious, the word clear display.Wherein, background color can obtain in the marginal portion of document usually.
Step S221, the rgb value of background information of background color of take is benchmark, relatively the rgb value of each pixel region in text or form document;
With background color benchmark as a comparison, by lining by line scan, carry out color relatively with whole document, look into and see if there is and the obvious zone of background color difference.
Step S222, when the obvious pixel region of rgb value contrast that occurs in text or form document with background color, by the obvious pixel region of contrast and default character code relatively;
When finding with the obvious zone of background color contrast, in order to determine that this zone is word, also need character code and this zone default in the employing system to mate.
Step S223, when the obvious pixel region of contrast is consistent with default character code, judge that the obvious pixel region of contrast is character block;
When there is the part of mating with the predetermined word symbol in this zone, illustrate in this zone word is arranged, intercept this zone.
Step S231, the pixel region of intercepting character block, as key message.
Due to generally, the title division of document is positioned at front one to two row of whole document, and the scanning contrast is also carried out from top to bottom, therefore, when finding character block, can only intercept lastly to two row, can obtain the key message of nameplate or form document.
The present embodiment adopts background color and predetermined word symbol jointly text or form document to be contrasted to identification, find the character block pixel region that comprises key message, realization shows the rapid preview of text or form document, operation is simple with processing procedure, can in the process of download file, carry out, without waiting for that all files download is complete, avoided downloading because of mistake resource and the time waste caused.
As shown in Figure 4, Fig. 4 is the flow chart of the 4th embodiment of the method for rapid preview file destination of the present invention.It is basic that the present embodiment be take embodiment illustrated in fig. 1, the situation while being picture file for file destination, and step S20 comprises:
Step S212, from decoded picture file, extract the block of pixels that is positioned at the image edge part, as a setting information;
In the present embodiment, for picture file, mainly need identify portrait or scenery in picture, this partial color zone is more obvious with peripheral background colour difference.For example, personage's picture, people's hair, skin etc., obvious with background difference on every side; Scenery picture, the color differentiation on building and sky, ground is obvious.When extracting blocks of background pixels, can partly obtain a pocket from image edge, information as a setting, for example, this zone is sky or meadow etc.
Step S224, the rgb value of the block of pixels of information as a setting of take is benchmark, from 0 rank, rank to 255, compares successively the rgb value of each pixel region in picture file;
Because picture comprises abundant color, therefore, when contrasting, compare line by line from 0 rank, rank to 255 pigment, search with blocks of background pixels and differ obvious zone.
Step S225, when the obvious pixel region of rgb value contrast that occurs in picture file with the block of pixels of information as a setting, judge the identification division of the obvious pixel region of contrast as picture;
When finding while differing obvious pixel region, using this zone as the key message of sign image content.For example, take personage's photo, background is blue setting, and people's hair, the colour of skin, clothes color etc., all differ obvious with blue setting.
Step S232, the pixel region of the identification division of intercepting picture, as key message.
Intercept significantly zone of above-mentioned contrast, those differ the part be not clearly, the design of scattered small flowers and plants on blue setting for example, and day aerial white clouds, portraits at a distance etc., without intercepting.Thus, when preview, without showing complete picture, reduce the demonstration size of data, improved treatment effeciency.
The present embodiment adopts the background color lump to carry out each rank pigment of RGB to picture and contrasts line by line, find the pixel region that comprises key person picture or scenery, realization shows the rapid preview of picture, operation is simple with processing procedure, can in the process of download file, carry out, without waiting for that all files download is complete, avoided downloading because of mistake resource and the time waste caused.
As shown in Figure 5, Fig. 5 is the flow chart of the 5th embodiment of the method for rapid preview file destination of the present invention.It is basic that the present embodiment be take embodiment illustrated in fig. 1, the situation while being video file for file destination, and step S20 comprises:
Step S213, from the i frame video pictures extracted, extract the block of pixels that is positioned at the image edge part, as a setting information;
In the present embodiment, video file is comprised of the multiframe picture, in picture, includes picture and/or word, can adopt the above-mentioned mode that word or picture are intercepted, and video is processed.I in the present embodiment means the frame number of video pictures, and the initial value of i is 1, namely at first from the first frame picture of video file, starts to analyze, and extracts the background colour in the first frame picture, can, with reference to above-described embodiment, extract the edge color lump in the first frame picture.
Step S226, the rgb value of the block of pixels of information as a setting of take is benchmark, from 0 rank, rank to 255, compares successively the rgb value of each pixel region in picture file;
From 0 rank, rank to 255 pigment, compare line by line, search with blocks of background pixels and differ obvious zone.
Step S227, when the obvious pixel region of rgb value contrast that occurs in picture file with the block of pixels of information as a setting, by the obvious pixel region of contrast and default character code relatively;
When finding while differing obvious pixel region, in order to judge this zone, be word or image, need character code and this zone default in the employing system to mate.
Step S228, when the obvious pixel region of contrast is consistent with default character code, judge that the obvious pixel region of contrast is character block;
When there is the part of mating with the predetermined word symbol in this zone, illustrates in this zone word is arranged.
Step S229, when the obvious pixel region of contrast and default character code are inconsistent, judge the identification division of the obvious pixel region of contrast as picture;
When this zone and predetermined word symbol are not mated, illustrate that this zone does not have word, only has image.
Step S233, the pixel region of the identification division of intercepting character block and picture, as key message;
The character block of intercepting and image are reconfigured, be configured for identifying the key message of video content, show for follow-up preview.
Step S220, when the obvious pixel region of rgb value contrast that do not have in picture file to occur with the block of pixels of information as a setting, i adds 1, returns to step S213.
If do not find key message in the first frame video pictures, from the second frame video pictures of video file, searching, until find key message.
The present embodiment adopts background color and predetermined word symbol jointly video file to be contrasted to identification, find the character block that comprises key message and the pixel region of image, realization shows the rapid preview of video file, operation is simple with processing procedure, can in the process of download file, carry out, without waiting for that all files download is complete, avoided downloading because of mistake resource and the time waste caused.
As shown in Figure 6, Fig. 6 is the structural representation of the first embodiment of the device of rapid preview file destination of the present invention.The device of the rapid preview file destination that the present embodiment is mentioned comprises:
Download module 10, for downloading and decode file destination;
Interception module 20, for from decoded file destination, intercept the key message of the described file destination content of sign;
Amplification module 30, be amplified to the in the same size with the preview window for the pixel size of the key message by intercepting;
Display module 40, for showing the key message after amplifying at the preview window.
The device of the rapid preview file destination in the present embodiment can be installed on the smart machines such as television set, mobile phone, PAD, and the present embodiment be take television set and is example, and other smart machines all can be applied mechanically.Television set has been set up two buffering areas in the memory of system, comprise the first buffering area and the second buffering area, wherein, the file destination that the first buffering area is downloaded for cache user, be that television system downloads to the file destination that the user needs in the first buffering area of television system, file destination can comprise text, form, picture, video etc.Due to generally, the file of download is all that the form according to packet is downloaded in television set, and for it is carried out to preview, television system is decoded to the file destination in downloading to the first buffering area on backstage, obtains decoded file.The process of this decoding can be after downloading complete file destination, or carries out in the process of downloading, and can realize the file destination of the downloading preview of decoding.
Because the purpose of the present embodiment is the file destination in order to allow user's preview fast download, therefore do not need all information of whole file destination are all shown, only need to show that some have significant key message, this key message is to exist in file destination, directly from file destination, intercepting out, may be line inscribed, a picture etc., allow the user can be from these simple key messages, recognizing the content of download, whether the content of downloading with judgement be own needed file.For example, for document files such as text or forms, title that can display document; For picture, the facial image in can Showing Picture; For film video, can show film title, show company etc.Television system, from decoded file destination, has significant information interception by these and gets off, and is stored in the second buffering area, is convenient to be presented on television screen.
In order not affect the current TV programme of watching of user, television system is set up a preview window in the corner location of video screen, the size of the preview window will be significantly less than the full frame size of video screen, with shielding window not, be limited, for example, in the upper right corner of video screen, a resolution being set up in the position of its frame is the preview window of 320 * 240.Now, the large I of the second buffer area and the size of the preview window are consistent, and the key message of intercepting is before being stored to the second buffer area, after it is amplified to the in the same size with the preview window, more point-to-point second buffer area that is stored to.
The display module 40 of television set reads the content of storing in the second buffer area, and is presented in the preview window, checks fast for the user whether the current file of downloading or downloading is own needed file.If the file of downloading current is not user's request, and the user can manually stop downloading, and avoids causing the waste of time, flow and resource.Start the process of above-mentioned decoding, intercepting, demonstration, can be that the user triggers certain button on remote controller or certain control on the television system user interface, or automatically be started by television system, simplified preview and shown the operating process started.
The present embodiment is from intercepting key message the file destination of current download, be presented in the preview window, realize checking fast the current file destination of downloading or downloading, without loaded down with trivial details user's operation, simplified operating process, saved the time of checking, and file content that can preview is being downloaded in downloading process, avoided downloading because of mistake the waste of the time, flow and the resource that cause.
As shown in Figure 7, Fig. 7 is the structural representation of the second embodiment of the device of rapid preview file destination of the present invention.It is basic that the present embodiment be take embodiment illustrated in fig. 6, and wherein interception module 20 comprises:
Background extracting unit 21, for from decoded file destination, extract background information;
Comparing unit 22, be benchmark, the rgb value of each pixel region in more decoded file destination for take the rgb value of background information;
Sign interception unit 23, differ obvious pixel region be used to the rgb value that intercepts rgb value and background information, as key message.
In the present embodiment, no matter file destination is word, form, picture or video, because backcolor and foreground picture certainly exist apparent in view contrast difference, therefore, its key is that foreground picture and background color are made a distinction, and the key message using foreground picture as file destination shows.At first the present embodiment determines background information, and namely from background piece of background region intercepting of file destination, this background area is normally in the marginal portion of document, picture.With the color of background benchmark as a comparison, by lining by line scan, carry out color relatively with whole document or picture, look into and see if there is and the obvious zone of backcolor difference.When scanning with the obvious zone of backcolor difference, illustrate that this regional content and background information have remarkable contrast, usually should namely include the key message that can identify the file destination content in zone, should intercept in zone, as key message, store, be presented in the preview window after follow-up amplification.
The present embodiment adopts backcolor benchmark as a comparison, relatively also intercepting differs obvious zone with backcolor, to obtain the key message of sign file destination content, for follow-up preview, show, this operation can be carried out in the process of download file, without waiting for that all files download is complete, avoided downloading because of mistake resource and the time waste caused; Simultaneously, the content of intercepting is originally just to be present in file destination, and is the sub-fraction in file destination, and without carrying out complicated contents extraction and conversion, processing procedure is very simple, easily realizes.
In the embodiment of the present invention, the situation while being text or form document for file destination.
Background extracting unit 21 for, when file destination is text or form document, from decoded text or form document, extract background color part information as a setting;
Comparing unit 22 for, the rgb value of background information of background color of take is benchmark, relatively the rgb value of each pixel region in text or form document; When the obvious pixel region of rgb value contrast that occurs in text or form document with background color, by the obvious pixel region of contrast and default character code relatively; When the obvious pixel region of contrast is consistent with default character code, judge that the obvious pixel region of contrast is character block;
The sign interception unit 23 for, the intercepting character block pixel region, as key message.
In the present embodiment, for the file destination of text or form, the part that mainly need identify is word segment, generally, background colour is white or light, and now word segment is dark, or when background colour is dark color, word segment is light color, and contrast is obvious, the word clear display.Wherein, background color can obtain in the marginal portion of document usually.With background color benchmark as a comparison, by lining by line scan, carry out color relatively with whole document, look into and see if there is and the obvious zone of background color difference.When finding with the obvious zone of background color contrast, in order to determine that this zone is word, also need character code and this zone default in the employing system to mate.When there is the part of mating with the predetermined word symbol in this zone, illustrate in this zone word is arranged, intercept this zone.Due to generally, the title division of document is positioned at front one to two row of whole document, and the scanning contrast is also carried out from top to bottom, therefore, when finding character block, can only intercept lastly to two row, can obtain the key message of nameplate or form document.
The present embodiment adopts background color and predetermined word symbol jointly text or form document to be contrasted to identification, find the character block pixel region that comprises key message, realization shows the rapid preview of text or form document, operation is simple with processing procedure, can in the process of download file, carry out, without waiting for that all files download is complete, avoided downloading because of mistake resource and the time waste caused.
In the embodiment of the present invention, the situation while being picture file for file destination.
Background extracting unit 21 for, when file destination is picture file, from decoded picture file, extract the block of pixels be positioned at the image edge part, as a setting information;
Comparing unit 22 for, the rgb value of the block of pixels of information as a setting of take is benchmark, from 0 rank, rank to 255, the rgb value of each pixel region in picture file relatively successively; When the obvious pixel region of rgb value contrast that occurs in picture file with the block of pixels of information as a setting, judge the identification division of the obvious pixel region of contrast as picture;
Sign interception unit 23 for, the pixel region of identification division of intercepting picture, as key message.
In the present embodiment, for picture file, mainly need identify portrait or scenery in picture, this partial color zone is more obvious with peripheral background colour difference.For example, personage's picture, people's hair, skin etc., obvious with background difference on every side; Scenery picture, the color differentiation on building and sky, ground is obvious.When extracting blocks of background pixels, can partly obtain a pocket from image edge, information as a setting, for example, this zone is sky or meadow etc.Because picture comprises abundant color, therefore, when contrasting, compare line by line from 0 rank, rank to 255 pigment, search with blocks of background pixels and differ obvious zone.When finding while differing obvious pixel region, using this zone as the key message of sign image content.For example, take personage's photo, background is blue setting, and people's hair, the colour of skin, clothes color etc., all differ obvious with blue setting.Intercept significantly zone of above-mentioned contrast, those differ the part be not clearly, the design of scattered small flowers and plants on blue setting for example, and day aerial white clouds, portraits at a distance etc., without intercepting.Thus, when preview, without showing complete picture, reduce the demonstration size of data, improved treatment effeciency.
The present embodiment adopts the background color lump to carry out each rank pigment of RGB to picture and contrasts line by line, find the pixel region that comprises key person picture or scenery, realization shows the rapid preview of picture, operation is simple with processing procedure, can in the process of download file, carry out, without waiting for that all files download is complete, avoided downloading because of mistake resource and the time waste caused.
In the embodiment of the present invention, the situation while being video file for file destination.
Background extracting unit 21 for, when file destination is video file, from the i frame video pictures extracted, extract the block of pixels that is positioned at the image edge part, as a setting information;
Comparing unit 22 for, the rgb value of the block of pixels of information as a setting of take is benchmark, from 0 rank, rank to 255, the rgb value of each pixel region in picture file relatively successively; When the obvious pixel region of rgb value contrast that occurs in picture file with the block of pixels of information as a setting, by the obvious pixel region of contrast and default character code relatively; When the obvious pixel region of contrast is consistent with default character code, judge that the obvious pixel region of contrast is character block; When the obvious pixel region of contrast and default character code are inconsistent, judge the identification division of the obvious pixel region of contrast as picture;
Sign interception unit 23 for, the pixel region of the identification division of intercepting character block and picture, as key message;
Background extracting unit 21 also for, when comparing unit 22 judges in picture files not have to occur and as a setting during the obvious pixel region of rgb value contrast of the block of pixels of information, from decoded video file, extract i+1 frame video pictures, again extract the block of pixels that is positioned at the image edge part, information as a setting.
In the present embodiment, video file is comprised of the multiframe picture, in picture, includes picture and/or word, can adopt the above-mentioned mode that word or picture are intercepted, and video is processed.I in the present embodiment means the frame number of video pictures, and the initial value of i is 1, namely at first from the first frame picture of video file, starts to analyze, and extracts the background colour in the first frame picture, can, with reference to above-described embodiment, extract the edge color lump in the first frame picture.From 0 rank, rank to 255 pigment, compare line by line, search with blocks of background pixels and differ obvious zone.When finding while differing obvious pixel region, in order to judge this zone, be word or image, need character code and this zone default in the employing system to mate.When there is the part of mating with the predetermined word symbol in this zone, illustrates in this zone word is arranged.When this zone and predetermined word symbol are not mated, illustrate that this zone does not have word, only has image.The character block of intercepting and image are reconfigured, be configured for identifying the key message of video content, show for follow-up preview.If do not find key message in the first frame video pictures, from the second frame video pictures of video file, searching, until find key message.
The present embodiment adopts background color and predetermined word symbol jointly video file to be contrasted to identification, find the character block that comprises key message and the pixel region of image, realization shows the rapid preview of video file, operation is simple with processing procedure, can in the process of download file, carry out, without waiting for that all files download is complete, avoided downloading because of mistake resource and the time waste caused.
The foregoing is only the preferred embodiments of the present invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or equivalent flow process conversion that utilizes specification of the present invention and accompanying drawing content to do; or directly or indirectly be used in other relevant technical fields, all in like manner be included in scope of patent protection of the present invention.

Claims (10)

1. the method for a rapid preview file destination, is characterized in that, comprises step:
The file destination of downloading and decode;
From decoded file destination, the key message of the described file destination content of intercepting sign;
The pixel size of the key message of intercepting is amplified to the in the same size with the preview window;
In described the preview window, show the key message after amplifying.
2. the method for rapid preview file destination according to claim 1, is characterized in that, described from decoded file destination, and the step of intercepting key message comprises:
From decoded file destination, extract background information;
The rgb value of described background information of take is benchmark, the rgb value of each pixel region in more described decoded file destination;
The rgb value of intercepting rgb value and described background information differs obvious pixel region, as key message.
3. the method for rapid preview file destination according to claim 2, is characterized in that, when described file destination is text or form document, described from decoded file destination, and the step of intercepting key message comprises:
From decoded text or form document, extract background color part information as a setting;
The rgb value of described background information of background color of take is benchmark, the rgb value of each pixel region in more described text or form document;
When the obvious pixel region of rgb value contrast that occurs in described text or form document with background color, by the obvious pixel region of described contrast and default character code relatively;
When the obvious pixel region of described contrast is consistent with default character code, judge that the obvious pixel region of described contrast is character block;
Intercept the pixel region of described character block, as key message.
4. the method for rapid preview file destination according to claim 2, is characterized in that, when described file destination is picture file, described from decoded file destination, and the step of intercepting key message comprises:
From decoded picture file, extract the block of pixels that is positioned at the image edge part, as a setting information;
The rgb value of the block of pixels of information as a setting of take is benchmark, from 0 rank, rank to 255, and the rgb value of each pixel region in more described picture file successively;
When the obvious pixel region of rgb value contrast that occurs in described picture file with the block of pixels of information as a setting, judge the identification division of the obvious pixel region of described contrast as picture;
Intercept the pixel region of the identification division of described picture, as key message.
5. the method for rapid preview file destination according to claim 2, is characterized in that, when described file destination is video file, described from decoded file destination, and the step of intercepting key message comprises:
From the i frame video pictures extracted, extract the block of pixels that is positioned at the image edge part, as a setting information; Wherein, i is the frame number of described video pictures;
The rgb value of the block of pixels of information as a setting of take is benchmark, from 0 rank, rank to 255, and the rgb value of each pixel region in more described picture file successively;
When the obvious pixel region of rgb value contrast that occurs in described picture file with the block of pixels of information as a setting, by the obvious pixel region of described contrast and default character code relatively;
When the obvious pixel region of described contrast is consistent with default character code, judge that the obvious pixel region of described contrast is character block;
When the obvious pixel region of described contrast and default character code are inconsistent, judge the identification division of the obvious pixel region of described contrast as picture;
Intercept the pixel region of the identification division of described character block and described picture, as key message;
When the obvious pixel region of rgb value contrast that do not have in described picture file to occur with the block of pixels of information as a setting, from decoded video file, extract i+1 frame video pictures, again extract the block of pixels that is positioned at the image edge part, information, circulate with this as a setting.
6. the device of a rapid preview file destination, is characterized in that, comprising:
Download module, for downloading and decode file destination;
Interception module, for from decoded file destination, intercept the key message of the described file destination content of sign;
Amplification module, be amplified to the in the same size with the preview window for the pixel size of the key message by intercepting;
Display module, for showing the key message after amplifying at described the preview window.
7. the method for rapid preview file destination according to claim 6, is characterized in that, described interception module comprises:
The background extracting unit, for from decoded file destination, extract background information;
Comparing unit, be benchmark, the rgb value of each pixel region in more described decoded file destination for take the rgb value of described background information;
The sign interception unit, differ obvious pixel region be used to the rgb value that intercepts rgb value and described background information, as key message.
8. the device of rapid preview file destination according to claim 7, it is characterized in that, described background extracting unit is used for, when described file destination is text or form document, from decoded text or form document, extract background color part information as a setting;
Described comparing unit is used for, and the rgb value of described background information of background color of take is benchmark, the rgb value of each pixel region in more described text or form document; When the obvious pixel region of rgb value contrast that occurs in described text or form document with background color, by the obvious pixel region of described contrast and default character code relatively; When the obvious pixel region of described contrast is consistent with default character code, judge that the obvious pixel region of described contrast is character block;
Described sign interception unit is used for, and the pixel region of the described character block of intercepting, as key message.
9. the device of rapid preview file destination according to claim 7, is characterized in that, described background extracting unit is used for, when described file destination is picture file, from decoded picture file, extract the block of pixels that is positioned at the image edge part, as a setting information;
Described comparing unit is used for, and the rgb value of the block of pixels of information as a setting of take is benchmark, from 0 rank, rank to 255, and the rgb value of each pixel region in more described picture file successively; When the obvious pixel region of rgb value contrast that occurs in described picture file with the block of pixels of information as a setting, judge the identification division of the obvious pixel region of described contrast as picture;
Described sign interception unit is used for, and the pixel region of the identification division of the described picture of intercepting, as key message.
10. the device of rapid preview file destination according to claim 7, is characterized in that, described background extracting unit is used for, when described file destination is video file, from the i frame video pictures extracted, extract the block of pixels that is positioned at the image edge part, as a setting information; Wherein, i is the frame number of described video pictures;
Described comparing unit is used for, and the rgb value of the block of pixels of information as a setting of take is benchmark, from 0 rank, rank to 255, and the rgb value of each pixel region in more described picture file successively; When the obvious pixel region of rgb value contrast that occurs in described picture file with the block of pixels of information as a setting, by the obvious pixel region of described contrast and default character code relatively; When the obvious pixel region of described contrast is consistent with default character code, judge that the obvious pixel region of described contrast is character block; When the obvious pixel region of described contrast and default character code are inconsistent, judge the identification division of the obvious pixel region of described contrast as picture;
Described sign interception unit is used for, and intercepts the pixel region of the identification division of described character block and described picture, as key message;
Described background extracting unit also for, when described comparing unit judges in described picture file not have to occur and as a setting during the obvious pixel region of rgb value contrast of the block of pixels of information, from decoded video file, extract i+1 frame video pictures, again extract the block of pixels that is positioned at the image edge part, information as a setting.
CN201310298335.1A 2013-07-16 2013-07-16 The method and apparatus of rapid preview file destination Expired - Fee Related CN103414944B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310298335.1A CN103414944B (en) 2013-07-16 2013-07-16 The method and apparatus of rapid preview file destination

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310298335.1A CN103414944B (en) 2013-07-16 2013-07-16 The method and apparatus of rapid preview file destination

Publications (2)

Publication Number Publication Date
CN103414944A true CN103414944A (en) 2013-11-27
CN103414944B CN103414944B (en) 2017-07-25

Family

ID=49607925

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310298335.1A Expired - Fee Related CN103414944B (en) 2013-07-16 2013-07-16 The method and apparatus of rapid preview file destination

Country Status (1)

Country Link
CN (1) CN103414944B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105472440A (en) * 2015-12-30 2016-04-06 深圳Tcl数字技术有限公司 Video program preview method and smart television
CN107659729A (en) * 2017-09-29 2018-02-02 努比亚技术有限公司 A kind of previewing file method, apparatus and computer-readable recording medium
CN110188078A (en) * 2019-06-10 2019-08-30 深圳市朗强科技有限公司 A kind of information prompting method, device, equipment and computer readable storage medium
CN111818362A (en) * 2020-05-31 2020-10-23 武汉市慧润天成信息科技有限公司 Multimedia data cloud storage system and method
CN113010134A (en) * 2021-04-22 2021-06-22 读书郎教育科技有限公司 Method for inserting application navigation page in application downloading process
CN114071226A (en) * 2022-01-14 2022-02-18 飞狐信息技术(天津)有限公司 Video preview graph generation method and device, storage medium and electronic equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1924860A (en) * 2006-10-08 2007-03-07 网之易信息技术(北京)有限公司 Search engine based search result fast pre-reading device
CN101021857A (en) * 2006-10-20 2007-08-22 鲍东山 Video searching system based on content analysis
CN101122999A (en) * 2007-04-16 2008-02-13 北京联合大学 Method for automatically extracting stamper image from Chinese painting and calligraphy
CN101493892A (en) * 2009-02-27 2009-07-29 中国农业大学 Image characteristic extracting method and device
CN101840435A (en) * 2010-05-14 2010-09-22 中兴通讯股份有限公司 Method and mobile terminal for realizing video preview and retrieval
CN102183510A (en) * 2011-01-26 2011-09-14 上海奥普生物医药有限公司 Colloidal gold detecting method and device based on digital image processing
CN102184177A (en) * 2011-01-04 2011-09-14 北京开心人信息技术有限公司 Method and system for previewing file
US20120141095A1 (en) * 2010-12-02 2012-06-07 Microsoft Corporation Video preview based browsing user interface
CN102541881A (en) * 2010-12-17 2012-07-04 联想(北京)有限公司 File preview image display method and electronic equipment
CN102802079A (en) * 2012-08-24 2012-11-28 广东欧珀移动通信有限公司 Video previewing segment generating method of media player

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1924860A (en) * 2006-10-08 2007-03-07 网之易信息技术(北京)有限公司 Search engine based search result fast pre-reading device
CN101021857A (en) * 2006-10-20 2007-08-22 鲍东山 Video searching system based on content analysis
CN101122999A (en) * 2007-04-16 2008-02-13 北京联合大学 Method for automatically extracting stamper image from Chinese painting and calligraphy
CN101493892A (en) * 2009-02-27 2009-07-29 中国农业大学 Image characteristic extracting method and device
CN101840435A (en) * 2010-05-14 2010-09-22 中兴通讯股份有限公司 Method and mobile terminal for realizing video preview and retrieval
US20120141095A1 (en) * 2010-12-02 2012-06-07 Microsoft Corporation Video preview based browsing user interface
CN102541881A (en) * 2010-12-17 2012-07-04 联想(北京)有限公司 File preview image display method and electronic equipment
CN102184177A (en) * 2011-01-04 2011-09-14 北京开心人信息技术有限公司 Method and system for previewing file
CN102183510A (en) * 2011-01-26 2011-09-14 上海奥普生物医药有限公司 Colloidal gold detecting method and device based on digital image processing
CN102802079A (en) * 2012-08-24 2012-11-28 广东欧珀移动通信有限公司 Video previewing segment generating method of media player

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105472440A (en) * 2015-12-30 2016-04-06 深圳Tcl数字技术有限公司 Video program preview method and smart television
WO2017113602A1 (en) * 2015-12-30 2017-07-06 深圳Tcl数字技术有限公司 Method for previewing video program and smart tv
CN105472440B (en) * 2015-12-30 2019-09-06 深圳Tcl数字技术有限公司 The method for previewing and smart television of video program
CN107659729A (en) * 2017-09-29 2018-02-02 努比亚技术有限公司 A kind of previewing file method, apparatus and computer-readable recording medium
CN110188078A (en) * 2019-06-10 2019-08-30 深圳市朗强科技有限公司 A kind of information prompting method, device, equipment and computer readable storage medium
CN111818362A (en) * 2020-05-31 2020-10-23 武汉市慧润天成信息科技有限公司 Multimedia data cloud storage system and method
CN113010134A (en) * 2021-04-22 2021-06-22 读书郎教育科技有限公司 Method for inserting application navigation page in application downloading process
CN114071226A (en) * 2022-01-14 2022-02-18 飞狐信息技术(天津)有限公司 Video preview graph generation method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN103414944B (en) 2017-07-25

Similar Documents

Publication Publication Date Title
CN103414944A (en) Method and apparatus for fast previewing object file
US10902234B2 (en) Image recognition method and apparatus
CN106454407B (en) Video live broadcasting method and device
US9858895B2 (en) Method for adjusting screen brightness and system thereof
US8174611B2 (en) Digital image segmentation using flash
CN109089157B (en) Video picture cutting method, display device and device
CN111654635A (en) Shooting parameter adjusting method and device and electronic equipment
CN108965692B (en) Sticker setting method and device
CN106447641A (en) Image generation device and method
US20190297297A1 (en) Video playing method and device
CN104836906A (en) Mobile terminal and method for acquiring images from short message operation interface in real time thereof
CN111405339B (en) Split screen display method, electronic equipment and storage medium
CN103946871A (en) Image processing device, image recognition device, image recognition method, and program
CN109005446A (en) A kind of screenshotss processing method and processing device, electronic equipment, storage medium
CN102869076A (en) Mobile-phone-based screen state control method and mobile phone employing same
CN113709949B (en) Lighting device control method and device, electronic device and storage medium
CN106375602B (en) Terminal photographic method and device
CN104281828A (en) Two-dimension code extracting method and mobile terminal
CN109189198B (en) Image display method, device, terminal and storage medium
KR102292595B1 (en) Apparatus for recognizing watermark using image integrating QR code and watermark and method thereof
CN114463359A (en) Screen projection display method and device, electronic equipment and readable storage medium
CN115242983A (en) Photographing method, electronic device, computer program product, and readable storage medium
CN108924410B (en) Photographing control method and related device
CN108924411B (en) Photographing control method and device
CN111968605A (en) Exposure adjusting method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170725

CF01 Termination of patent right due to non-payment of annual fee