CN105843949B - A kind of image display method and device - Google Patents
A kind of image display method and device Download PDFInfo
- Publication number
- CN105843949B CN105843949B CN201610221920.5A CN201610221920A CN105843949B CN 105843949 B CN105843949 B CN 105843949B CN 201610221920 A CN201610221920 A CN 201610221920A CN 105843949 B CN105843949 B CN 105843949B
- Authority
- CN
- China
- Prior art keywords
- image
- predetermined image
- predetermined
- feature
- display area
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9577—Optimising the visualization of content, e.g. distillation of HTML documents
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Image Processing (AREA)
Abstract
This application discloses a kind of image display method and devices.This method comprises: judging whether the predetermined image can completely be shown in the image display area for showing the predetermined image in the case where the sum of all pixels mesh of the holding predetermined image is constant before showing to predetermined image;When the judgment result is No, if in the predetermined image including the characteristics of image to match with pre-set image feature, it is determined that information of the described image feature the location of in the predetermined image;According to the information of the position, the predetermined image, image section comprising described image feature are shown in described image display area.This method is to solve the problems, such as that image display method in the prior art leads to server heavy load since the size in order to be adapted to image display area carries out blindness cutting to image.
Description
Technical field
This application involves field of computer technology more particularly to a kind of image display method and devices.
Background technique
Currently, being often website (or APP) to enrich the content of website (or applying (Application, APP))
The text of user is showed to mix respective image, so that word content is best understood from.
Below by taking news website as an example, tell about conventional images display technology and analyze its there are the drawbacks of:
After user opens news website, which can show headline and related figure.In order to make list
A page can show more text informations and image information, which generally figure display area can be arranged
It is smaller.In such a situa-tion, if the total number for the pixel that the figure display area in the news website can include is less than
The total number of the pixel of figure, then the news website can cut the figure, and will be by cut to the figure
To image section be shown in figure display area.Due to the news website to above-mentioned figure carry out be randomness cut, this
It will lead to the picture material for being shown in figure display area and the probability that headline is not consistent be larger, to also allow for showing
Show more preferable in the relevant headline of the image of the figure display area can not make to the figure display area is shown image
The probability that ground is understood is larger.When picture material and headline are not inconsistent, user is in order to be well understood expressed by the figure
The meaning, generally can be to the corresponding news mark of image that the image that the figure display area is shown or the figure display area are shown
Topic carries out further operating, for example, user can obtain server in such a way that triggering browser sends request to server
The complete image content of the corresponding figure of the headline of feedback, so as to cause the heavy load of server.
Summary of the invention
The embodiment of the present application provides a kind of image display method, to solve image display method in the prior art in order to
The problem of being adapted to the size of image display area leads to server heavy load to image progress blindness cutting.
The embodiment of the present application provides a kind of image display device, to solve image display method in the prior art in order to
The problem of being adapted to the size of image display area leads to server heavy load to image progress blindness cutting.
The embodiment of the present application adopts the following technical solutions:
A kind of image display method, comprising:
Before being shown to predetermined image, judge in the situation for keeping the sum of all pixels mesh of the predetermined image constant
Under, whether the predetermined image can completely be shown in the image display area for showing the predetermined image;
When the judgment result is No, if in the predetermined image including the characteristics of image to match with pre-set image feature,
Then determine information of the described image feature the location of in the predetermined image;
According to the information of the position, described image display area show the predetermined image, comprising described image
The image section of feature.
A kind of image display method, comprising:
Before client shows predetermined image, judge keeping the sum of all pixels mesh of the predetermined image constant
In the case of, whether the predetermined image can completely be shown in the image display area for showing the predetermined image;
When the judgment result is No, if in the predetermined image including the characteristics of image to match with pre-set image feature,
Then determine information of the described image feature the location of in the predetermined image;
Information by determining described image feature the location of in the predetermined image is sent to client, so that
Client according to the information of the position, described image display area show the predetermined image, comprising described image
The image section of feature.
A kind of image display device, comprising:
Judgment module, for before being shown to predetermined image, judging in the sum of all pixels for keeping the predetermined image
In the case that mesh is constant, whether the predetermined image can completely be shown in the image display area for showing the predetermined image
In domain;
Position determination module, for when the judgment result is No, if including in the predetermined image and pre-set image feature
The characteristics of image to match, it is determined that information of the described image feature the location of in the predetermined image;
Display module, for the information according to the position, described image display area show the predetermined image,
Image section comprising described image feature.
A kind of image display device, comprising:
Judgment module, for before client shows predetermined image, judging in the picture for keeping the predetermined image
In the case that plain total number is constant, whether the predetermined image can completely be shown in the image for showing the predetermined image
In display area;
Position determination module, for when the judgment result is No, if including in the predetermined image and pre-set image feature
The characteristics of image to match, it is determined that information of the described image feature the location of in the predetermined image;
Sending module, information of the described image feature the location of in the predetermined image for will determine are sent
To client so that information of the client according to the position, described image display area show the predetermined image,
Image section comprising described image feature.
The embodiment of the present application use at least one above-mentioned technical solution can reach it is following the utility model has the advantages that
Using such image display pattern, in the case where the sum of all pixels mesh of the holding predetermined image is constant,
When the predetermined image can not be completely shown in the image display area for showing the predetermined image, if described predetermined
Comprising the characteristics of image to match with pre-set image feature in image, then it can make the image portion shown in image display area
Subpackage contains the characteristics of image that matches with pre-set image feature, so as to avoid in order to be adapted to the size of image display area
The blindness that image caused by blindly cutting is shown is carried out to image, server burden can be mitigated to a certain extent.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present application, constitutes part of this application, this Shen
Illustrative embodiments and their description please are not constituted an undue limitation on the present application for explaining the application.In the accompanying drawings:
Fig. 1 a is a kind of implementation process schematic diagram of image display method provided by the embodiments of the present application;
Fig. 1 b is provided by the embodiments of the present application for showing the image display area display effect schematic diagram of predetermined image;
Fig. 1 c is predetermined image display effect schematic diagram provided by the embodiments of the present application;
Fig. 1 d is predetermined image provided by the embodiments of the present application and be used to show that the image display area of predetermined image most to be pushed up
The display effect schematic diagram at end and leftmost side alignment;
Fig. 1 e be it is provided by the embodiments of the present application described image display area show the predetermined image, comprising with it is pre-
If the image section display effect schematic diagram for the characteristics of image that characteristics of image matches;
Fig. 1 f is a kind of implementation process schematic diagram of image display method provided by the embodiments of the present application;
Fig. 2 is a kind of structural schematic diagram of image display device provided by the embodiments of the present application;
Fig. 3 is a kind of structural schematic diagram of image display device provided by the embodiments of the present application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with the application specific embodiment and
Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one
Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing
Every other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.
Below in conjunction with attached drawing, the technical scheme provided by various embodiments of the present application will be described in detail.
Embodiment 1
In order to solve image display method in the prior art in order to be adapted to the size of image display area to image into
The problem of row blindly cuts and leads to server heavy load, the embodiment of the present application provides a kind of image display method.
The executing subject of this method can be, but not limited to as mobile phone, tablet computer or PC (Personal
Computer, PC) etc. the application (Application, APP) etc. that runs on user terminals or those user terminals.
For ease of description, being hereafter situated between so that executing subject is APP as an example to this method provided by the embodiments of the present application
It continues.As shown in Figure 1, being the specific implementation flow chart of this method provided by the embodiments of the present application, mainly include the following steps:
Step 11, APP judges the feelings constant in the total number of the pixel of predetermined image before showing to predetermined image
Under condition, whether predetermined image can be completely shown in the image display area for showing predetermined image.
If judging result be it is no, then follow the steps 12;If the determination result is YES, 16 are thened follow the steps.
Wherein, the predetermined image is the image to be shown in described image display area.Specifically, if APP is responded
In the interface display triggering command of user, i.e., the interface comprising certain image will be shown, then the image is properly termed as making a reservation for
Image.For example, the APP is the APP for browsing news, then, which will show in response to the news browsing instruction of user
The image for including in the news information shown, can be described as predetermined image.Generally, which can be the server by APP
Come being arranged or specified.
The execution opportunity of step 11, it will be before APP will show the interface comprising the predetermined image, it in other words will be pre- by this
Determine before image is shown in the interface.
The shape of the predetermined image can include but is not limited to the shapes such as rectangle, circle, triangle.It is retouched for the ease of subsequent
It states, by taking the shape of the predetermined image is rectangle as an example, is illustrated.
Described image display area, for viewing area including in interface to be shown, for showing the predetermined image
Domain.The shape of the image display area can include but is not limited to the shapes such as rectangle, circle, triangle.It is retouched for the ease of subsequent
It states, by taking the shape of described image display area is rectangle as an example, is illustrated.
The interface to be shown, can be the user interface for showing information.
Wherein, the interface to be shown can also include but is not limited to be used in addition to including described image display area
Show the text importing region of text information, or the video display area etc. for showing video information.
In order to make reader be easier to understand the concept of above-mentioned noun, below using above-mentioned APP as the APP of news type, with to
For the user interface (rear to claim " the first interface ") about news information that the interface of display is above-mentioned APP, to above-mentioned name
Word is carried out to as directed one by one.
It first interface, can also be including but not limited to following at least one information in addition to comprising news figure:
Headline;
News in brief;
Video.
For showing that the display area of news figure is image display area described in step 11 in first interface
Domain.
The display area that the text informations such as headline or news in brief are shown in first interface is the text
Display area.
The display area that video information is shown in first interface is the video display area.
The news figure, i.e., predetermined image described herein.For convenient for introducing scheme provided by the embodiments of the present application,
Assuming that the news figure is without the image of the operations such as any cutting or scaling, which is appointed as to be shown by server
In the predetermined image of image display area.
To this application involves the titles such as predetermined image, image display area carry out above description after, continue with edge
With example, since APP receives interface display instruction, a kind of specific implementation of introduction step 11.
Sub-step 1, APP receive the instruction of the first interface display.
Described instruction can be the operational orders such as click or sliding.
Sub-step 2, APP respond above-mentioned first interface display instruction, obtain the attribute of predetermined image and predetermined image.
The attribute of the predetermined image can include but is not limited to the length-width ratio of the predetermined image, the predetermined image
The maximum pixel number (then claim image level sum of all pixels mesh) that is included in the horizontal direction, the predetermined image are in vertical direction institute
The pixel that the maximum pixel number (then claim image vertical pixel total number) and predetermined image for including are included total number (after
Claim the first total number).When predetermined image is rectangle, first total number=image level sum of all pixels mesh × image is vertical
Sum of all pixels mesh.
The APP can get the attribute of the predetermined image and the predetermined image from server.
Sub-step 3, APP determine the attribute for showing the image display area of predetermined image.
It is the attributive character of described image display area, the including but not limited to length-width ratio of described image display area, described
Maximum pixel number that image display area is included in the horizontal direction (rear to claim zone level sum of all pixels mesh), described image are aobvious
Show the maximum pixel number (rear to claim region vertical pixel total number) and image display area that region is included in vertical direction
Total number (rear to claim the second total number) for the pixel that can include etc..Wherein, described when described image display area is rectangle
Second total number=zone level sum of all pixels mesh × region vertical pixel total number.
Since the layout of the APP user interface for being included all is previously set, so, the APP can
To get the attribute of image display area.
Sub-step 4, judges whether the first total number is greater than the second total number.
If the determination result is YES, then determine the predetermined figure in the case where the total number of the pixel of predetermined image is constant
As can not completely be shown in the described image display area for showing predetermined image;If judging result be it is no, execute
Sub-step 5.
The first total number and the second total number that are got by execution sub-step 2 and sub-step 3 are compared,
To judge whether the first total number is greater than the second total number.
Sub-step 5, judges whether described image horizontal pixel total number is less than the zone level sum of all pixels mesh, and
Whether described image vertical pixel total number is less than the region vertical pixel total number.
If judging, described image horizontal pixel total number is less than the zone level sum of all pixels mesh, and described image is hung down
Straight sum of all pixels mesh is less than the region vertical pixel total number, then determines constant in the total number of the pixel of the predetermined image
In the case where, the predetermined image can be completely shown in described image display area;Otherwise, then determine in the predetermined figure
In the case that the total number of the pixel of picture is constant, the predetermined image imperfect can be shown in described image display area.
Step 12, APP determines pre-set image feature.
It is special to can be the image as pre-set image feature directly got from server for the pre-set image feature
Sign;Alternatively, the pre-set image feature, is also possible to associated with the text information to be shown in the text importing region
Characteristics of image.Wherein, the pre-set image feature can be, but not limited to face characteristic, animal painting feature or article characteristics
Equal characteristics of image.
Illustrate how the APP determines the pre-set image feature in detail below:
Sub-step a obtains the text information to be shown in the text importing region.
The APP can get the text information to be shown in the text importing region (hereinafter in the server
It can be described as the first text information).
Sub-step b, according to the incidence relation of text information and pre-set image feature, determination and the first text information phase
Associated pre-set image feature.
The APP, can be by carrying out semantic analysis to the first text information, automatically after getting the first text information
The abstract of the first text information is generated, and extracts the keyword of the first text information.According to plucking for first text information
It wants and the keyword of first text information, determines the text information for meeting text constraint condition.Wherein, the first text
The keyword of word information can be the word that the frequency of occurrence in the abstract of the first text information is greater than default frequency threshold value.
Wherein, if the quantity of the keyword of the first text information extracted is one, then described meet text constraint
The text information of condition is this keyword.
If the quantity of the keyword of the first text information extracted is greater than one, then the text constraint condition of meeting
Text information can be the word randomly selected from the keyword extracted.
After the text information for determining to meet text constraint condition, the APP can be according to pre-set image feature and text
The incidence relation of word information determines the pre-set image feature.
Sometimes, the APP is in addition to that can determine institute according to the incidence relation of the pre-set image feature and text information
It states outside pre-set image feature, it can also be true according to the incidence relation between the pre-set image feature and described image display area
Make the pre-set image feature.
In addition, the APP can also be according to the incidence relation of the pre-set image feature and the title of the predetermined image
Determine the pre-set image feature.
Wherein, the name of the pre-set image feature and text information, described image display area and the predetermined image
Incidence relation between referred to as can be previously set by technical staff and be uploaded in server, when the APP will will be described
Predetermined image is shown in front of described image display area, those incidence relations can be obtained from server, so that it is determined that going out
The pre-set image feature.
The APP is specifically introduced in two kinds of situation below how according to the incidence relation of pre-set image feature and text information
To determine the pre-set image feature:
Situation one:
When the APP is after determining to meet the text information of text constraint condition, the APP can use trained
Text classifier classifies the text information for meeting text constraint condition, if meeting text constraint condition than described
Text information be " Cheng Long ", then the APP, which can use trained text classifier, is classified as name class for " Cheng Long "
Not;If the text information for meeting text constraint condition is " Cibotium barometz (L.) J. Sm ", then the APP can use trained text
" Cibotium barometz (L.) J. Sm " is classified as animal category by classifier;If the text information for meeting text constraint condition is " automobile ", then
The APP can use trained text classifier and " automobile " be classified as goods categories.
Wherein, the trained text classifier can be and text information is referred in some given classification
Classifier.
The incidence relation of the pre-set image feature and text information, can be, but not limited to pre-set image feature and name class
The incidence relation of other incidence relation, pre-set image feature and animal category or the pass of pre-set image feature and goods categories
Connection relationship etc..
If the APP classifies the text information for meeting text constraint condition determined, determine that this is full
It, being associated with according to pre-set image feature and name classification after the text information of sufficient text constraint condition belongs to name classification
System, determines that the pre-set image is characterized in face characteristic.
Situation two:
When the APP is after determining to meet the text information of text constraint condition, can directly search in the server
Meet the text information of text constraint condition and the incidence relation of pre-set image feature with the presence or absence of this, if finding, directly
The pre-set image feature is determined according to the mapping relations;If searching less than defaulting face characteristic is the pre-set image
Feature.
Wherein, technical staff can establish the incidence relation of relatively common noun and pre-set image feature one by one in advance,
For example, can establish the incidence relation of " Cheng Long " Yu face characteristic, or establish being associated with for " Cibotium barometz (L.) J. Sm " and animal painting feature
Relationship, or establish the incidence relation etc. of " automobile " and images of items feature.In addition, technical staff can also set, when can not
When finding the incidence relation for the text information for the meeting text constraint condition and pre-set image feature determined, default face is special
Sign is the pre-set image feature.
Step 13, whether APP judges in the predetermined image to include the characteristics of image to match with pre-set image feature.
If the determination result is YES, step 14 is executed;If judging result be it is no, then follow the steps 17.
Wherein, the characteristics of image to match with pre-set image feature can be identical with pre-set image characteristic type
Characteristics of image, and the number of the characteristics of image to match with pre-set image feature is one.
The APP is told about below to judge in the predetermined image whether to include the image spy to match with pre-set image feature
The method of sign:
The embodiment of the present application can use in the APP with open-source cross-platform computer vision library (Open Source
Computer Vision Library, OPENCV) functional module with the same function, to judge to be in the predetermined image
The no characteristics of image comprising matching with pre-set image feature.
Wherein, the OPENCV is made of a series of C language functions, is known to computer vision, image procossing and image
Other etc. the ideal tools for carrying out secondary development, can be used for image recognition.
If assuming, the APP is characterized in face characteristic by executing the pre-set image that step 12 is determined, then can
With the code with addition identification face characteristic in OPENCV functional module with the same function in the APP, and run
The functional module to judge whether comprising face characteristic in the predetermined image, and obtains judging result.
Whether the APP may determine that in the predetermined image comprising that can also judged outside face characteristic
When in the predetermined image including the result of face characteristic, the whole face characteristics for including in the predetermined image are identified.If
The quantity for the face characteristic that the APP is identified is greater than one, then the APP needs at least two face characteristics, chooses
A face characteristic is as the characteristics of image to match with pre-set image feature out.
The characteristics of image to match with pre-set image feature can be determined by following methods:
Sub-step S1, judges whether the quantity of the face in the predetermined image is greater than one.
If the determination result is YES, then sub-step S2 is executed;If judging result is face characteristic conduct that is no, will identify that
The face characteristic determined.
Sub-step S2 selects the face for meeting face constraint condition from the face identified, this is met face about
The face of beam condition is as the face characteristic determined.
Wherein, face constraint condition, the total number that can be the pixel of individual human face are maximum.If existing simultaneously at least two
The situation of the total number maximum of the pixel of individual human face, choose the face in position among the predetermined image as with it is default
The characteristics of image that characteristics of image matches.
Step 14, APP determines that the characteristics of image to match with pre-set image feature is locating in the predetermined image
The information of position.
The APP can determine the characteristics of image to match with pre-set image feature described pre- by following methods
Determine the information of location in image:
Such as, it is assumed that by trisection in the predetermined image vertical direction, then the predetermined image is just divided into includes
The identical three parts of the total number of pixel, i.e. top, middle part and bottom.Determine the central point (or any point) of above-mentioned face
It is locating in the predetermined image just to define characteristics of image for which part in the top, middle part or bottom
The information of position.
It should be strongly noted that it can also be assumed that by the predetermined image quartering, five equal parts or six equal parts etc., this Shen
Please embodiment be defined not to this.
Step 15, the APP is according to the information by executing the position that step 14 is determined, in described image display area
Show the predetermined image, comprising the image section of the characteristics of image to match with pre-set image feature.
According to the information of the position, described image horizontal pixel total number and vertical pixel total number and regional water
Flat sum of all pixels mesh and region vertical pixel total number, described image display area show the predetermined image, comprising institute
State the image section of characteristics of image.
Divide below three kinds of situations illustrate respectively the APP according to the information of position determined by executing step 14,
Described image display area show the predetermined image, comprising the image portion of the characteristics of image to match with pre-set image feature
Point:
Situation one:
Wherein, in order to preferably make reader understand the APP how to show the predetermined image, include and pre-set image
The image section for the characteristics of image that feature matches is illustrated situation one below with reference to Fig. 1 b, Fig. 1 c, Fig. 1 d and Fig. 1 e:
Fig. 1 b and Fig. 1 c are described image display area and the predetermined image in the case where same screen resolution
Display effect.Wherein, the embodiment of the present application is carried out so that image level sum of all pixels mesh is less than image vertical pixel total number as an example
Explanation.
If determining that the central point (or any point) of the face is in the predetermined image by executing step 14
The top of predetermined image is then aligned by top (referring to Fig. 1 c) with described image display area top, and by predetermined image
The leftmost side is aligned (referring to Fig. 1 d) (or by the predetermined image rightmost side and described image with the leftmost side of described image display area
The rightmost side of display area is aligned).The top and the leftmost side for keeping the predetermined image always with described image viewing area
The top in domain and the leftmost side be overlapped in the case where (or the top and the rightmost side for keeping the predetermined image always with institute
In the case that the top and the rightmost side for stating image display area are aligned), equal proportion amplification (or reducing) described predetermined image,
So that the rightmost side of the predetermined image be aligned with the rightmost side of described image display area (or by the predetermined image leftmost side with
The leftmost side of described image display area is aligned) (referring to Fig. 1 e).
It is the predetermined image, comprising described image at this point, being located at the image section in described image display area
The image section of feature (referring to Fig. 1 e).As it can be seen that operation in this way, above-mentioned APP can by the predetermined image, include institute
The image section for stating characteristics of image is shown in described image display area.
Situation two: if being determined by executing step 14, the central point (or any point) of the face is in described predetermined
The central point of the predetermined image is just overlapped by the middle part of image with the central point of image display area.Keeping described predetermined
In the case that the central point of image is overlapped with the central point of image display area, equal proportion scaling is carried out to predetermined image, so that
Predetermined image long side where two sides can two sides corresponding with image display area be aligned.For example, if described predetermined
Where the long side of image while be in the predetermined image vertical direction while, then equal proportion scale so that predetermined image
The leftmost side and the rightmost side can be aligned with the leftmost side of described image display area and the rightmost side.At this point, being located at described image
Image section in display area is the predetermined image, the image section comprising described image feature.As it can be seen that passing through
Such operation, above-mentioned APP can by the predetermined image, the image section comprising described image feature shows and shows in image
In region.
Situation three: if being determined by executing step 14, the central point (or any point) of the face is in described predetermined
The lowermost end of predetermined image is then aligned by the bottom of image with image display area lowermost end, and by the predetermined image leftmost side with
The leftmost side alignment of described image display area is (or by the rightmost side pair of the predetermined image rightmost side and described image display area
Together).The lowermost end and the leftmost side for keeping the predetermined image always with the lowermost end of described image display area and the leftmost side
In the case where alignment (or in the lowermost end and the rightmost side for keeping the predetermined image always with described image display area most
In the case that bottom end and the rightmost side are overlapped), equal proportion amplification (or reducing) described predetermined image, so that the predetermined image
Long side where two sides can two sides corresponding with image display area be aligned.For example, if the long side of the predetermined image
Place while be in the predetermined image vertical direction while, then equal proportion zoom to so that the leftmost side of predetermined image and
The rightmost side can be overlapped with the leftmost side of image display area and the rightmost side.At this point, being located at the image portion in image display area
Point, it is the predetermined image, the image section comprising described image feature.As it can be seen that operation in this way, above-mentioned APP
Can by the predetermined image, the image section comprising described image feature shows in image display area.
Step 16, the APP completely shows the predetermined image in image display area.
The APP can not change the first total number, directly completely show the predetermined image in image display area.
Zone level sum of all pixels mesh horizontal pixel total number, Yi Jisuo can also be less than guaranteeing described image horizontal pixel total number
Image vertical pixel total number is stated less than in the case where region vertical pixel total number, the appropriate equal proportion of the predetermined image is put
Image display area is shown in after big.
Step 17, it is shown according to the display mode that the APP developer is previously set.
The display mode that the APP developer is previously set can be following display modes:
Diminution processing is carried out to predetermined image, the full content for including by predetermined image is shown in image display area.
It, may can not will be with pre-set image spy by executing step 14 and step 15 it should be strongly noted that sometimes
It levies the characteristics of image to match and is completely shown in described image display area.So, at this moment, operations described below can be executed, is reached
The effect of the characteristics of image to match to complete display with pre-set image feature:
Directly cut out includes by executing the characteristics of image to match with pre-set image feature that step 14 is determined
Image section, and the image section is suitably scaled, it is shown in image display area.
Wherein, the appropriate scaling is to ensure that the image level sum of all pixels of the above-mentioned image section obtained by cutting
Mesh is less than zone level sum of all pixels mesh, and ensures the image vertical pixel total number of the above-mentioned image section obtained by cutting
Less than region vertical pixel total number, shown so that the above-mentioned image section obtained by cutting can completely be shown in image
Region.
The executing subject of each step of the embodiment of the present application can be distinct device.For example, the execution of step 11~14
Main body can be server, and the executing subject of step 15~17 can be client.It following is a brief introduction of different executing subjects
In the case of, how in described image display area display predetermined image, specific implementation flow can be found in Fig. 1 f:
Step 21, server judges that the total number of the pixel in predetermined image is constant before showing to predetermined image
In the case where, whether predetermined image can completely be shown in the image display area for showing predetermined image.
If judging result be it is no, then follow the steps 22;If the determination result is YES, 28 are thened follow the steps.
Step 22, server determines pre-set image feature.
Step 23, whether server judges in the predetermined image to include the image spy to match with pre-set image feature
Sign.
If the determination result is YES, step 24 is executed;If judging result be it is no, then follow the steps 31.
Step 24, server determines that the characteristics of image to match with pre-set image feature is locating in the predetermined image
Position information.
Step 25, server will be existed by executing the characteristics of image to match with pre-set image feature that step 24 is determined
Information and predetermined image the location of in the predetermined image are sent to client.
Step 26, the characteristics of image to match with pre-set image feature that client receives that server is sent makes a reservation for described
Information and predetermined image the location of in image.
Step 27, client is locating in the predetermined image according to the characteristics of image to match with pre-set image feature
The information of position shows the predetermined image, figure comprising matching with pre-set image feature in described image display area
As the image section of feature.
Step 28, predetermined image is sent to client by server.
Step 29, client receives the predetermined image that server is sent.
Step 30, client completely shows the predetermined image in image display area.
Step 31, predetermined image is sent to client by server.
Step 32, client receives the predetermined image that server is sent.
Step 33, client is shown according to the display mode that the APP developer is previously set.
Using such image display pattern, in the case where the sum of all pixels mesh of the holding predetermined image is constant,
When the predetermined image can not be completely shown in the image display area for showing the predetermined image, if described predetermined
Comprising the characteristics of image to match with pre-set image feature in image, then it can make the image portion shown in image display area
Subpackage contains the characteristics of image that matches with pre-set image feature, so as to avoid in order to be adapted to the size of image display area
The blindness that image caused by blindly cutting is shown is carried out to image, server burden can be mitigated to a certain extent.
Embodiment 2
In order to solve image display method in the prior art in order to be adapted to the size of image display area to image into
The problem of row blindly cuts and leads to server heavy load, the embodiment of the present application provides a kind of image display device.
Mainly include following apparatus as shown in Fig. 2, being the structural schematic diagram of the device provided by the embodiments of the present application:
Judgment module 21 is keeping the pixel of the predetermined image total for judging before showing to predetermined image
In the case where invariable number, whether the predetermined image can be completely shown in for showing that the image of the predetermined image is shown
In region.
Position determination module 22, for when the judgment result is No, if including in the predetermined image and pre-set image is special
Levy the characteristics of image to match, it is determined that information of the described image feature the location of in the predetermined image.
Display module 23 shows the predetermined image in described image display area for the information according to the position
, image section comprising described image feature.
Wherein, described for showing the image display area of the predetermined image, for the use for including in interface to be shown
In the image display area for showing the predetermined image;The interface to be shown, in addition to including described image display area, also
Including for showing the text importing region of text information.
The pre-set image feature is characteristics of image associated with the text information.
Position determination module 22, comprising:
Acquiring unit obtains to be shown in the text importing when judging result for obtaining in judgment module is no
Text information in region.
Characteristics determining unit is determined and is got for the incidence relation according to text information and pre-set image feature
The associated pre-set image feature of text information.
Position determination unit, if for according to the pre-set image feature determined, judge include in the predetermined image
The characteristics of image to match with pre-set image feature, it is determined that described image feature location in the predetermined image
Information.
In one embodiment, characteristics determining unit is specifically used for:
From the text information got, the text information for meeting text constraint condition is determined;
According to the incidence relation of text information and pre-set image feature, the determining and text for meeting text constraint condition
The associated pre-set image feature of information.
The pre-set image feature includes: face characteristic;Position determination module 22, is specifically used for:
If judging the predetermined image comprising the characteristics of image to match with the face characteristic in the predetermined image
Whether the quantity for the face for including is greater than one;
If judging, the quantity is greater than one, chooses from the face for including in the predetermined image and meets face constraint
The face of condition, and determine the information of position of the face selected in the predetermined image.
In one embodiment, display module 23 are specifically used for:
The total number for the pixel in horizontal direction for being included according to the information of the position, described image display area and
The total number and vertical direction of pixel in the horizontal direction of the total number of pixel in vertical direction and the predetermined image
On pixel total number, show the predetermined image, image comprising described image feature in described image display area
Part.
Using such image display pattern, in the case where the sum of all pixels mesh of the holding predetermined image is constant,
When the predetermined image can not be completely shown in the image display area for showing the predetermined image, if described predetermined
Comprising the characteristics of image to match with pre-set image feature in image, then it can make the image portion shown in image display area
Subpackage contains the characteristics of image that matches with pre-set image feature, so as to avoid in order to be adapted to the size of image display area
The blindness that image caused by blindly cutting is shown is carried out to image, server burden can be mitigated to a certain extent.
Embodiment 3
In order to solve image display method in the prior art in order to be adapted to the size of image display area to image into
The problem of row blindly cuts and leads to server heavy load, the embodiment of the present application provides a kind of image display device.
Mainly include following apparatus as shown in figure 3, being the structural schematic diagram of the device provided by the embodiments of the present application:
Judgment module 31, for before client shows predetermined image, judging in the pixel for keeping predetermined image
In the case that total number is constant, it is aobvious whether the predetermined image can completely be shown in the image for showing the predetermined image
Show in region.
Position determination module 32, for when the judgment result is No, if including in the predetermined image and pre-set image is special
Levy the characteristics of image to match, it is determined that information of the described image feature the location of in the predetermined image.
Sending module 33, information hair of the described image feature the location of in the predetermined image for will determine
Client is given, so that information of the client according to the position, shows the predetermined image in described image display area
, image section comprising described image feature.
Using such image display pattern, in the case where the sum of all pixels mesh of the holding predetermined image is constant,
When the predetermined image can not be completely shown in the image display area for showing the predetermined image, if described predetermined
Comprising the characteristics of image to match with pre-set image feature in image, then it can make the image portion shown in image display area
Subpackage contains the characteristics of image that matches with pre-set image feature, so as to avoid in order to be adapted to the size of image display area
The blindness that image caused by blindly cutting is shown is carried out to image, server burden can be mitigated to a certain extent.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including element
There is also other identical elements in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The above is only embodiments herein, are not intended to limit this application.To those skilled in the art,
Various changes and changes are possible in this application.It is all within the spirit and principles of the present application made by any modification, equivalent replacement,
Improve etc., it should be included within the scope of the claims of this application.
Claims (10)
1. a kind of image display method, which is characterized in that the described method includes:
Before being shown to predetermined image, judge in the case where the sum of all pixels mesh of the holding predetermined image is constant, institute
State whether predetermined image can completely be shown in the image display area for showing the predetermined image;It is in judging result
When no, if the characteristics of image in the predetermined image comprising matching with pre-set image feature, it is determined that described image feature exists
Information the location of in the predetermined image, comprising: obtain the text information to be shown in text importing region;According to
The incidence relation of text information and pre-set image feature determines pre-set image feature associated with the text information got;
If judging the image in the predetermined image comprising matching with pre-set image feature according to the pre-set image feature determined
Feature, it is determined that information of the described image feature the location of in the predetermined image;
According to the information of the position, described image display area show the predetermined image, comprising described image feature
Image section;
The image display area for being used to show the predetermined image, it is described for showing for include in interface to be shown
The image display area of predetermined image;The interface to be shown further includes for showing in addition to including described image display area
Show the text importing region of text information;
The pre-set image feature is characteristics of image associated with the text information.
2. the method as described in claim 1, which is characterized in that according to the incidence relation of text information and pre-set image feature,
Determine pre-set image feature associated with the text information got, comprising:
From the text information got, the text information for meeting text constraint condition is determined;
According to the incidence relation of text information and pre-set image feature, the determining and text information for meeting text constraint condition
Associated pre-set image feature.
3. the method as described in claim 1, which is characterized in that the pre-set image feature includes: face characteristic;
If the characteristics of image in the predetermined image comprising matching with pre-set image feature, it is determined that described image feature is in institute
State the information of location in predetermined image, comprising:
If judging that the predetermined image includes comprising the characteristics of image to match with the face characteristic in the predetermined image
The quantity of face whether be greater than one;
If judging, the quantity is greater than one, chooses from the face for including in the predetermined image and meets face constraint condition
Face, and determine the information of the position of the face that selects in the predetermined image.
4. the method as described in claim 1, which is characterized in that according to the information of the position, in described image display area
It shows the predetermined image, image section comprising described image feature, specifically includes:
The total number for the pixel in horizontal direction for being included according to the information of the position, described image display area and vertical
On the total number and vertical direction of pixel in the horizontal direction of the total number of pixel on direction and the predetermined image
The total number of pixel shows the predetermined image, image section comprising described image feature in described image display area.
5. a kind of image display method, which is characterized in that the described method includes:
Before client shows predetermined image, judge in the situation for keeping the sum of all pixels mesh of the predetermined image constant
Under, whether the predetermined image can completely be shown in the image display area for showing the predetermined image;
When the judgment result is No, if comprising the characteristics of image to match with pre-set image feature in the predetermined image, really
Determine information of the described image feature the location of in the predetermined image, comprising: obtain to be shown in text importing region
In text information;According to the incidence relation of text information and pre-set image feature, determination is related to the text information got
The pre-set image feature of connection;If according to the pre-set image feature determined, judge in the predetermined image include and default figure
The characteristics of image to match as feature, it is determined that information of the described image feature the location of in the predetermined image;
Information by determining described image feature the location of in the predetermined image is sent to client, so that objective
Family end according to the information of the position, described image display area show the predetermined image, comprising described image feature
Image section;
The image display area for being used to show the predetermined image, it is described for showing for include in interface to be shown
The image display area of predetermined image;The interface to be shown further includes for showing in addition to including described image display area
Show the text importing region of text information;
The pre-set image feature is characteristics of image associated with the text information.
6. a kind of image display device, which is characterized in that described device includes:
Judgment module is keeping the sum of all pixels mesh of the predetermined image not for judging before showing to predetermined image
In the case where change, whether the predetermined image can completely be shown in the image display area for showing the predetermined image
In;
Position determination module, for when the judgment result is No, if including in the predetermined image and pre-set image feature phase
The characteristics of image matched, it is determined that information of the described image feature the location of in the predetermined image, comprising: obtain single
Member obtains the text information to be shown in text importing region when the judging result for obtaining in judgment module is no;It is special
Determination unit is levied, for the incidence relation according to text information and pre-set image feature, determination and the text information phase got
Associated pre-set image feature;Position determination unit, if judging described predetermined for according to the pre-set image feature determined
Characteristics of image in image comprising matching with pre-set image feature, it is determined that described image feature institute in the predetermined image
The information of the position at place;
Display module, for the information according to the position, described image display area show the predetermined image, include
The image section of described image feature;
The image display area for being used to show the predetermined image, it is described for showing for include in interface to be shown
The image display area of predetermined image;The interface to be shown further includes for showing in addition to including described image display area
Show the text importing region of text information;
The pre-set image feature is characteristics of image associated with the text information.
7. device as claimed in claim 6, which is characterized in that characteristics determining unit is specifically used for:
From the text information got, the text information for meeting text constraint condition is determined;
According to the incidence relation of text information and pre-set image feature, the determining and text information for meeting text constraint condition
Associated pre-set image feature.
8. device as claimed in claim 6, which is characterized in that the pre-set image feature includes: face characteristic;
Position determination module is specifically used for:
If judging that the predetermined image includes comprising the characteristics of image to match with the face characteristic in the predetermined image
The quantity of face whether be greater than one;
If judging, the quantity is greater than one, chooses from the face for including in the predetermined image and meets face constraint condition
Face, and determine the information of the position of the face that selects in the predetermined image.
9. device as claimed in claim 6, which is characterized in that display module is specifically used for:
The total number for the pixel in horizontal direction for being included according to the information of the position, described image display area and vertical
On the total number and vertical direction of pixel in the horizontal direction of the total number of pixel on direction and the predetermined image
The total number of pixel shows the predetermined image, image section comprising described image feature in described image display area.
10. a kind of image display device, which is characterized in that described device includes:
Judgment module is keeping the pixel of the predetermined image total for judging before client shows predetermined image
In the case where invariable number, whether the predetermined image can be completely shown in for showing that the image of the predetermined image is shown
In region;
Position determination module, for when the judgment result is No, if including in the predetermined image and pre-set image feature phase
The characteristics of image matched, it is determined that information of the described image feature the location of in the predetermined image, comprising: obtain to aobvious
Show the text information in text importing region;According to the incidence relation of text information and pre-set image feature, determines and obtain
The associated pre-set image feature of the text information arrived;If judging the predetermined figure according to the pre-set image feature determined
Characteristics of image as in comprising matching with pre-set image feature, it is determined that described image feature is locating in the predetermined image
Position information;
Sending module, information of the described image feature the location of in the predetermined image for will determine are sent to visitor
Family end so that information of the client according to the position, described image display area show the predetermined image, include
The image section of described image feature;
The image display area for being used to show the predetermined image, it is described for showing for include in interface to be shown
The image display area of predetermined image;The interface to be shown further includes for showing in addition to including described image display area
Show the text importing region of text information;
The pre-set image feature is characteristics of image associated with the text information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610221920.5A CN105843949B (en) | 2016-04-11 | 2016-04-11 | A kind of image display method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610221920.5A CN105843949B (en) | 2016-04-11 | 2016-04-11 | A kind of image display method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105843949A CN105843949A (en) | 2016-08-10 |
CN105843949B true CN105843949B (en) | 2019-07-16 |
Family
ID=56597208
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610221920.5A Active CN105843949B (en) | 2016-04-11 | 2016-04-11 | A kind of image display method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105843949B (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8872855B2 (en) * | 2011-07-21 | 2014-10-28 | Flipboard, Inc. | Adjusting orientation of content regions in a page layout |
CN103984738B (en) * | 2014-05-22 | 2017-05-24 | 中国科学院自动化研究所 | Role labelling method based on search matching |
CN104281644A (en) * | 2014-08-22 | 2015-01-14 | 广州三星通信技术研究有限公司 | Filename information display method and device |
CN104504651B (en) * | 2015-01-22 | 2017-11-14 | 网易(杭州)网络有限公司 | Preview drawing generating method and equipment |
CN105205780B (en) * | 2015-10-19 | 2018-09-07 | 大唐网络有限公司 | Picture method of cutting out and device |
-
2016
- 2016-04-11 CN CN201610221920.5A patent/CN105843949B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN105843949A (en) | 2016-08-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11328008B2 (en) | Query matching to media collections in a messaging system | |
US10049308B1 (en) | Synthesizing training data | |
US12087097B2 (en) | Image recognition method and apparatus, computer-readable storage medium, and electronic device | |
US8649602B2 (en) | Systems and methods for tagging photos | |
US9569697B1 (en) | Object oriented image editing | |
US10409856B2 (en) | Approaches for associating terms with image regions | |
US10276213B2 (en) | Automatic and intelligent video sorting | |
US20200288204A1 (en) | Generating and providing personalized digital content in real time based on live user context | |
WO2020192463A1 (en) | Display method and apparatus | |
CN105117463B (en) | Information processing method and information processing unit | |
US20140250110A1 (en) | Image attractiveness based indexing and searching | |
US11036790B1 (en) | Identifying visual portions of visual media files responsive to visual portions of media files submitted as search queries | |
KR102668172B1 (en) | Identification of physical products for augmented reality experiences in messaging systems | |
CN107766349B (en) | Method, device, equipment and client for generating text | |
CN108509457A (en) | A kind of recommendation method and apparatus of video data | |
US10878024B2 (en) | Dynamic thumbnails | |
US20210072880A1 (en) | Method and electronic device for generating at least one data item from screenshot | |
US11361759B2 (en) | Methods and systems for automatic generation and convergence of keywords and/or keyphrases from a media | |
WO2022194102A1 (en) | Image processing method and apparatus, computer device, storage medium, and program product | |
US20230146563A1 (en) | Automated image processing and insight presentation | |
US12008811B2 (en) | Machine learning-based selection of a representative video frame within a messaging application | |
AU2017204531A1 (en) | Smart and automatic selection of same shaped objects in images | |
CN106484726A (en) | A kind of page display method and device | |
US20240330581A1 (en) | Method for automatically generating responsive media | |
US20240282110A1 (en) | Machine learning-based selection of a representative video frame within a messaging application |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 100085 information Road No. 2, Haidian District, Beijing (Beijing 1-8, D 2-2), two storey 207A room. Applicant after: Kylin seing network technology Limited by Share Ltd Address before: 100085 information Road No. 2, Haidian District, Beijing (Beijing 1-8, D 2-2), two storey 207A room. Applicant before: BEIJING KYLIN HESHENG NETWORK TECHNOLOGY CO., LTD. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |