CN107509115A - A kind of method and device for obtaining live middle Wonderful time picture of playing - Google Patents

A kind of method and device for obtaining live middle Wonderful time picture of playing Download PDF

Info

Publication number
CN107509115A
CN107509115A CN201710757967.8A CN201710757967A CN107509115A CN 107509115 A CN107509115 A CN 107509115A CN 201710757967 A CN201710757967 A CN 201710757967A CN 107509115 A CN107509115 A CN 107509115A
Authority
CN
China
Prior art keywords
picture
target photo
wonderful time
value
wonderful
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710757967.8A
Other languages
Chinese (zh)
Inventor
黄伟
陈少杰
张文明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710757967.8A priority Critical patent/CN107509115A/en
Publication of CN107509115A publication Critical patent/CN107509115A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4781Games

Abstract

The present invention provides a kind of method and device for obtaining live middle Wonderful time picture of playing, and methods described includes:S1, obtain and report position of the Target Photo of word in the game is live from the Wonderful time that includes for live middle acquisition of playing in advance, picture is contrasted from the position acquisition of the live middle present frame of game;S2, use the cryptographic Hash for perceiving the hash algorithm acquisition Target Photo and contrast picture;S3, if the distance between cryptographic Hash of the Target Photo and contrast picture is less than the first predetermined threshold value, using the present frame where the contrast picture as Wonderful time picture.One aspect of the present invention, realize the real-time acquisition of Wonderful time picture;On the other hand, only it is identified with the Target Photo that word is reported comprising Wonderful time, reduces the influence that background identifies to Wonderful time picture, improves the precision of Wonderful time picture acquisition.

Description

A kind of method and device for obtaining live middle Wonderful time picture of playing
Technical field
The present invention relates to live field, more particularly, to a kind of method for obtaining live middle Wonderful time picture of playing And device.
Background technology
With the development of network interaction platform, increasing user is exchanged by logging in network interaction platform.Its In, network direct broadcasting is the application being popular in users very much.The network direct broadcasting be divided into game it is live, amusement it is live and education It is live etc..
In game is live, main broadcaster's live game, such as the game of king's honor, the user into main broadcaster's direct broadcasting room watches Game.User is when viewing game is live, it is often desired to Wonderful time picture is preserved, as continuous several times beat opponents, are preserving The picture such as repeatedly beaten opponents in the case of unbeaten.It is described preserve Wonderful time picture premise be obtain game it is live in it is excellent Moment picture.And in the prior art without the method for obtaining live middle Wonderful time picture of playing.
The content of the invention
It is above-mentioned in the prior art without the problem of obtaining game live middle Wonderful time picture method or at least to overcome Partly solve the above problems, the invention provides a kind of method and device for obtaining live middle Wonderful time picture of playing.
According to the first aspect of the invention, there is provided a kind of method for obtaining live middle Wonderful time picture of playing, including:
S1, obtain and report the Target Photo of word in the game from live middle acquisition of playing comprising Wonderful time in advance Position in live, picture is contrasted from the position acquisition of the live middle present frame of game;
S2, use the cryptographic Hash for perceiving the hash algorithm acquisition Target Photo and contrast picture;
S3, if the distance between cryptographic Hash of the Target Photo and contrast picture is less than the first predetermined threshold value, by institute State contrast picture where present frame as Wonderful time picture.
Specifically, also include between the step S1 and S2:
If Wonderful time reports the average gray value of word more than background in the Target Photo in the Target Photo Average gray value, then the gray value of the pixel that gray scale is less than the second predetermined threshold value in the Target Photo and control picture is subtracted First pre-set constant value or using the second pre-set constant value as Target Photo and right described in the Target Photo and control picture Gray scale is less than the gray value of the pixel of the second predetermined threshold value in photograph and picture, and second pre-set constant value is less than the flat of the background Equal gray value;Or
If Wonderful time reports the average gray value of word less than background in the Target Photo in the Target Photo Average gray value, then the gray value of the pixel that gray scale is more than the 3rd predetermined threshold value in the Target Photo and control picture is added 3rd default constant value number is preset the 4th pre-set constant value as gray scale in the Target Photo and control picture more than the 3rd The gray value of the pixel of threshold value, the 4th pre-set constant value are more than the average gray value of the background.
Specifically, the step of contrasting picture from the position acquisition of the live middle present frame of game in the step S1 Also include:
Every preset duration picture is contrasted from the position acquisition of the live middle present frame of game.
Specifically, the step S2 is specifically included:
Reduce the Target Photo and contrast the size of picture;
Greyscale image transitions by the Target Photo after diminution and contrast picture are 64 grades of gray level images;
64 grades of gray level images of the Target Photo and contrast picture are subjected to discrete cosine transform;
Select formed objects respectively from the matrix of two 64 grades of gray level images after the discrete cosine transform Submatrix;
The average value of two submatrixs is calculated respectively;
For each submatrix, the cryptographic Hash of the data for the average value that the submatrix is more than or equal in the submatrix is set 1 is set to, the cryptographic Hash less than the data of the average value of the submatrix is arranged to 0.
Specifically, the step S3 is specifically included:
Obtain the number that the cryptographic Hash of each same position of the Target Photo with contrasting picture differs;
If the number is less than first predetermined threshold value, using it is described contrast picture where present frame as it is excellent when Portray face.
Specifically, also include after the step S3:
The time shown according to the live middle Wonderful time picture of game, obtain the 4th predetermined threshold value;
If being more than the 4th predetermined threshold value with the time interval that last time Wonderful time picture reports, when will be described excellent The face of portraying reports.
Specifically, also include before the step S1:
Multiple Target Photos for including Wonderful time report word from live middle acquisition of playing, every Target Photo include one Kind Wonderful time reports word;
Correspondingly, also include after the step S3:
According to the step S1 to S3, Wonderful time picture corresponding to each Target Photo is obtained.
According to the second aspect of the invention, there is provided a kind of device for obtaining live middle Wonderful time picture of playing, including:
First acquisition unit, for obtaining in advance from the target that word is reported comprising Wonderful time for live middle acquisition of playing Position of the picture in the game is live, picture is contrasted from the position acquisition of the live middle present frame of game;
Second acquisition unit, for using the cryptographic Hash for perceiving the hash algorithm acquisition Target Photo and contrast picture;
Determining unit, it is less than the first default threshold for the distance between the cryptographic Hash of the Target Photo and contrast picture During value, using the present frame where the contrast picture as Wonderful time picture.
According to the third aspect of the invention we, there is provided a kind of equipment for obtaining live middle Wonderful time picture of playing, including:
At least one processor, at least one memory and bus;Wherein,
The processor and memory complete mutual communication by the bus;
The memory storage has and by the programmed instruction of the computing device, the processor described program can be called to refer to Order is able to carry out method as described before.
According to the fourth aspect of the invention, there is provided a kind of non-transient computer readable storage medium storing program for executing, for storing such as preceding institute State the computer program of method.
The present invention provides a kind of method and device for obtaining live middle Wonderful time picture of playing, and this method passes through according to need The Wonderful time picture to be obtained, obtain corresponding in Target Photo and net cast present frame that word is reported comprising Wonderful time The contrast picture of Target Photo position, will be current where the cryptographic Hash contrast picture similar to the cryptographic Hash of the Target Photo Frame is as Wonderful time picture, on the one hand, realize the real-time acquisition of Wonderful time picture, on the other hand, only with comprising it is excellent when The Target Photo for carving report word is identified, and the influence that background identifies to Wonderful time picture is reduced, when improving excellent Portray the precision of face acquisition.
Brief description of the drawings
Fig. 1 is the method overall flow signal provided in an embodiment of the present invention for obtaining live middle Wonderful time picture of playing Figure;
Fig. 2 is Wonderful time picture in the method provided in an embodiment of the present invention for obtaining live middle Wonderful time picture of playing Schematic diagram;
Fig. 3 is the device overall structure signal provided in an embodiment of the present invention for obtaining live middle Wonderful time picture of playing Figure;
Fig. 4 is the equipment overall structure signal provided in an embodiment of the present invention for obtaining live middle Wonderful time picture of playing Figure.
Embodiment
With reference to the accompanying drawings and examples, the embodiment of the present invention is described in further detail.Implement below Example is used to illustrate the present invention, but is not limited to the scope of the present invention.
A kind of method for obtaining live middle Wonderful time picture of playing is provided in one embodiment of the invention, and Fig. 1 is The method overall flow schematic diagram provided in an embodiment of the present invention for obtaining live middle Wonderful time picture of playing, this method include: S1, obtain and report the Target Photo of word in the game is live from the Wonderful time that includes for live middle acquisition of playing in advance Position, picture is contrasted from the position acquisition of the live middle present frame of game;S2, using described in perception hash algorithm acquisition The cryptographic Hash of Target Photo and contrast picture;S3, if the distance between cryptographic Hash of the Target Photo and contrast picture is less than First predetermined threshold value, then using the present frame where the contrast picture as Wonderful time picture.
Specifically, in S1, it is the report word shown in Wonderful time picture that the Wonderful time, which reports word, such as " all-conquering ", " four companies are free from worldly cares ", " two double hits are broken ", " three even decide the issue of the battle " and " five companies are peerless " etc..It is live from the game in advance In Wonderful time picture in obtain a Target Photo.In the Target Photo word is reported comprising a kind of Wonderful time.Institute Stating Target Photo includes Wonderful time report word and background.In order to reduce the influence of background, the Target Photo of acquisition Size should be as small as possible.Obtain position of the Target Photo in game is live.Because the Target Photo is rectangle, institute State the position diagonal coordinate representation of the Target Photo of Target Photo.Described can be diagonally the upper left corner and the lower right corner, Can be the lower left corner and the upper right corner.Picture is contrasted from the position acquisition of the live middle present frame of game.The comparison diagram Position of the position of piece in the current frame with the Target Photo in the game live page is identical, and size is also identical.S2 In, the perception hash algorithm is a kind of relatively hash algorithm, for generating one group of fingerprint according to the feature of picture.Use perception Hash algorithm obtains the Target Photo and contrasts the fingerprint of picture respectively, and the fingerprint is cryptographic Hash.In S3, described in acquisition The distance between Target Photo and contrast picture, the distance can be Hamming distance, but the present embodiment is not limited to such a distance. Judge whether the distance is less than the first predetermined threshold value.If the distance is less than the first predetermined threshold value, by the contrast picture The present frame at place is as Wonderful time picture.The Wonderful time picture for include Wonderful time report word frame, such as Fig. 2 It is shown.The game that this method can apply in Android platform is live, but this implementation is not limited only to such a platform.
The present embodiment obtains the target that word is reported comprising Wonderful time by the Wonderful time picture obtained as needed The contrast picture of Target Photo position is corresponded in picture and net cast present frame, by cryptographic Hash and the Hash of the Target Photo It is worth the present frame where similar contrast picture as Wonderful time picture, on the one hand, realize that the real-time of Wonderful time picture obtains Take, on the other hand, be only identified with the Target Photo that word is reported comprising Wonderful time, reduce background and Wonderful time is drawn The influence of face identification, improve the precision of Wonderful time picture acquisition.
On the basis of above-described embodiment, also include between step S1 described in the present embodiment and S2:If the target figure Wonderful time reports average gray value of the average gray value more than background in the Target Photo of word in piece, then by the mesh Mark on a map and piece and compare the gray value of the pixel that gray scale is less than the second predetermined threshold value in picture and subtract the first pre-set constant value or by the Two pre-set constant values are less than second as gray scale in Target Photo described in the Target Photo and control picture and control picture The gray value of the pixel of predetermined threshold value, second pre-set constant value are less than the average gray value of the background;It is or if described Wonderful time reports average gray value of the average gray value less than background in the Target Photo of word in Target Photo, then will Gray scale is more than the gray value of the pixel of the 3rd predetermined threshold value plus the 3rd default constant value number in the Target Photo and control picture Or it is more than the ash of the pixel of the 3rd predetermined threshold value using the 4th pre-set constant value as gray scale in the Target Photo and control picture Angle value, the 4th pre-set constant value are more than the average gray value of the background.
Specifically, due to Wonderful time report word have it is translucent in the case of, influenceed by background, identify Wonderful time The precision of picture reduces.In order to solve this problem, the Target Photo and contrast picture can be pre-processed.It is described pre- Processing can specifically judge whether the average gray value of Wonderful time report word in the Target Photo is big according to priori The average gray value of background in the Target Photo.If Wonderful time reports the average gray value of word in the Target Photo More than the average gray value of background in the Target Photo, then it is pre- gray scale in the Target Photo and control picture to be less than second If the gray value of the pixel of threshold value subtracts the first pre-set constant value or regard the second pre-set constant value as the Target Photo and right Gray scale is less than the gray value of the pixel of the second predetermined threshold value in photograph and picture.Second pre-set constant value is less than the flat of the background Equal gray value.If Wonderful time reports the average gray value of word less than background in the Target Photo in the Target Photo Average gray value, then the gray value of the pixel that gray scale is more than the 3rd predetermined threshold value in the Target Photo and control picture is added 3rd default constant value number is preset the 4th pre-set constant value as gray scale in the Target Photo and control picture more than the 3rd The gray value of the pixel of threshold value, the 4th pre-set constant value are more than the average gray value of the background.
Wonderful time reports the average gray value of word more than background in the Target Photo in the Target Photo During average gray value, the Opengl codes pre-processed to the Target Photo and contrast picture are:
if(c.r*0.3+c.g*0.59+c.b*0.11<0.45) n "+" gl_FragColor.xyz=vec3 (0.067, 0.082,0.129)}\n";
Wherein, c is the Target Photo or contrast picture, and described r, g and b are respectively the Target Photo or contrast picture Tri- passages of R, G and B value, 0.45 is second predetermined threshold value, and vec3 (0.067,0.082,0.129) is gray scale second RGB vectors corresponding to pre-set constant value.
When the present embodiment is more than the average gray value of background by reporting the average gray value of word in the Wonderful time The gray scale of the background is reduced, is increased when the average gray value that the Wonderful time reports word is less than the average gray value of background Add the gray scale of the background, report word and background so as to distinguish the process moment more obviously, reduce the influence of background, improve The precision that Wonderful time picture obtains.
On the basis of above-described embodiment, from the institute of the live middle present frame of game in step S1 described in the present embodiment The step of stating position acquisition contrast picture also includes:Obtained every preset duration from the position of the live middle present frame of game Take contrast picture.
Specifically, the present frame during the acquisition game is live, generally frame per second is 25 frames or so during game is live.Such as It all frames during the fruit acquisition game is live, can influence to obtain the efficiency for live middle Wonderful time picture of playing, and waste and provide Source.Further, since a Wonderful time picture can show a period of time, the repetition to a Wonderful time picture is caused to obtain. In order to improve the precision for obtaining Wonderful time picture, it is thus necessary to determine that the preset duration.Assuming that the preset duration is m, unit For millisecond, Wonderful time is at least shown 1 second.Assuming that the probability that Wonderful time picture is identified in a frame is 50%, 50% is low The probability estimated, the probability of frame identification can be determined according to measured result.According to Probability one Wonderful time picture of calculating Identification probability is 1-50%(1000/m).For ensure the probability of Wonderful time picture identification reach 98% and more than, m values are 150 or so.The time for carrying out Wonderful time picture identification every time is obtained, when present frame and the identification of last Wonderful time picture When time interval reaches preset duration m, the identification of the Wonderful time picture of present frame is just carried out, otherwise skips over present frame.
The present embodiment every the position acquisition of the preset duration from the live middle present frame of game by contrasting picture Reduce the number of the repetition identification of same Wonderful time picture, reduce the waste of resource.
On the basis of above-described embodiment, step S2 described in the present embodiment specifically includes:Reduce the Target Photo and Contrast the size of picture;Greyscale image transitions by the Target Photo after diminution and contrast picture are 64 grades of gray level images; 64 grades of gray level images of the Target Photo and contrast picture are subjected to discrete cosine transform;After the discrete cosine transform The submatrix of a formed objects is selected in the matrix of two 64 grades of gray level images respectively;Two submatrixs are calculated respectively Average value;For each submatrix, the cryptographic Hash of the data for the average value that the submatrix is more than or equal in the submatrix is set 1 is set to, the cryptographic Hash less than the data of the average value of the submatrix is arranged to 0.
Specifically, reduce the Target Photo and contrast the size of picture, so as to remove the Target Photo and comparison diagram High frequency and details in piece, retain structure light and shade.Target Photo and contrast picture narrow down to 8*8 size respectively as will be described, 64 pixels altogether.Greyscale image transitions by the Target Photo after diminution and contrast picture are 64 grades of gray level images, i.e., The Target Photo and contrast picture after conversion only have 64 kinds of gray scale colors respectively.By the Target Photo of 64 grades of gray scales and Contrast picture and carry out discrete cosine transform, such as use 32*32 discrete cosine transform.Target after the discrete cosine transform The submatrix of a formed objects is selected in the matrix of picture and contrast picture respectively, such as from the target figure after discrete cosine transform The 8*8 submatrixs in the upper left corner are distinguished in the matrix of piece and contrast picture, because this part is the Target Photo and contrast picture In low-limit frequency.The average value of two submatrixs is calculated respectively, there are 64 values in the submatrix as described in calculating is each Average value.For each submatrix, the cryptographic Hash of the data for the average value that the submatrix is more than or equal in the submatrix is set 1 is set to, the cryptographic Hash less than the data of the average value of the submatrix is arranged to 0.As long as the Target Photo and contrast picture Overall structure is constant, and the cryptographic Hash of the Target Photo and contrast picture can avoid gamma correction or color histogram with regard to constant Figure is adjusted the influence brought.The order of the cryptographic Hash combination of the Target Photo or contrast picture is inessential, but the target The cryptographic Hash of picture and contrast picture needs to use same order.
The cryptographic Hash of the Target Photo and contrast picture is obtained in this implementation by using perception hash algorithm, according to The distance between cryptographic Hash of the Target Photo and contrast picture determines that the live middle Wonderful time picture of the game makees place mat.
On the basis of above-described embodiment, step S3 described in the present embodiment specifically includes:Obtain the Target Photo and Contrast the number that the cryptographic Hash of each same position of picture differs;, will if the number is less than first predetermined threshold value Present frame where the contrast picture is as Wonderful time picture.
Specifically, the Target Photo is identical with the number of numerical value in the cryptographic Hash of contrast picture.By the Target Photo Cryptographic Hash in each position numerical value compared with the numerical value of correspondence position in the contrast picture, in acquisition comparative result The number that the numerical value of each correspondence position differs in cryptographic Hash in the cryptographic Hash of the Target Photo with contrasting picture.It is if described Number is less than first predetermined threshold value, then using the present frame where the contrast picture as Wonderful time picture.This implementation Example by obtaining the Target Photo and contrasting the distance between cryptographic Hash of picture, by less than first predetermined threshold value away from From the present frame where corresponding contrast picture as Wonderful time picture.
On the basis of above-described embodiment, also include after step S3 described in the present embodiment:It is live according to the game Middle Wonderful time reports the time of text importing, obtains the 4th predetermined threshold value;If the time reported with last time Wonderful time picture Interval is more than the 4th predetermined threshold value, then reports the Wonderful time picture.
Specifically, because a Wonderful time picture may be repeatedly identified in it shows the time, in order to avoid same One Wonderful time picture is repeatedly reported within its display time, it is necessary to record the time reported every time.It is straight according to the game The display time that middle Wonderful time broadcasts picture is broadcast, obtains the 4th predetermined threshold value.The display time is longer, the described 4th default threshold Value is bigger.If being more than the 4th predetermined threshold value with the time interval that last time Wonderful time picture reports, when will be described excellent The face of portraying reports.Described report can be to preserve screenshotss or prompted in a manner of special efficacy.By reporting in the present embodiment Mode the Wonderful time picture of acquisition is informed into user, there is provided the experience of user.
On the basis of above-described embodiment, also include before the step S1:When including excellent from live middle acquisition of playing Multiple Target Photos for reporting word are carved, every Target Photo includes a kind of Wonderful time and reports word;Correspondingly, the step Also include after S3:According to the step S1 to S3, Wonderful time picture corresponding to each Target Photo is obtained.
Specifically, multiple Target Photos for including Wonderful time report word from live middle acquisition of playing, every target figure Piece includes a kind of Wonderful time and reports word, the Wonderful time report word can be " all-conquering ", " four connect free from worldly cares ", " two double hits are broken ", " three even decide the issue of the battle " or " five companies are peerless " etc..Each Target Photo is obtained according to the step S1 to S3 respectively Corresponding contrast picture, according to the distance between cryptographic Hash of each Target Photo and corresponding contrast picture, described in acquisition Wonderful time picture corresponding to each Target Photo.
The present embodiment obtains each Target Photo by using the Target Photo that word is reported comprising different Wonderful times Corresponding Wonderful time picture, so as to get the various Wonderful time pictures in the net cast.The present embodiment is not limited to The Wonderful time reports the species of word.
A kind of device for obtaining live middle Wonderful time picture of playing, Fig. 3 are provided in another embodiment of the present invention For the device overall structure diagram provided in an embodiment of the present invention for obtaining live middle Wonderful time picture of playing, the device includes First acquisition unit 1, second acquisition unit 2 and determining unit 3 are drawn, wherein:
The first acquisition unit 1 is used to obtain reports word from live middle acquisition of playing comprising Wonderful time in advance Position of the Target Photo in the game is live, picture is contrasted from the position acquisition of the live middle present frame of game; The second acquisition unit 2 is used for using the cryptographic Hash for perceiving the hash algorithm acquisition Target Photo and contrast picture;It is described , will when the distance that determining unit 3 is used in the Target Photo and contrasted between the cryptographic Hash of picture is less than the first predetermined threshold value Present frame where the contrast picture is as Wonderful time picture.
Specifically, it is the report word shown in Wonderful time picture that the Wonderful time, which reports word,.Described first Acquiring unit 1 in advance from it is described game it is live in Wonderful time picture in obtain a Target Photo.In the Target Photo Word is reported comprising a kind of Wonderful time.The Target Photo includes Wonderful time and reports word and background.In order to reduce background Influence, the size of the Target Photo of acquisition should be as small as possible.The first acquisition unit 1 obtains the Target Photo Position in game is live.Because the Target Photo is rectangle, the position of the Target Photo Target Photo pair The coordinate representation at angle.Described can be diagonally the upper left corner and the lower right corner, or the lower left corner and the upper right corner.Described first obtains The position acquisition of unit 1 from the live middle present frame of game contrasts picture.The position of the contrast picture in the current frame The position put with the Target Photo in the game live page is identical, and size is also identical.It is described perception hash algorithm be One kind relatively hash algorithm, for generating one group of fingerprint according to the feature of picture.The second acquisition unit 2 uses perception Hash Algorithm obtains the Target Photo and contrasts the fingerprint of picture respectively, and the fingerprint is cryptographic Hash.The determining unit 3 obtains The Target Photo and contrast the distance between picture, the distance can be Hamming distance, but the present embodiment be not limited to it is such a Distance.Judge whether the distance is less than the first predetermined threshold value.If the distance is less than the first predetermined threshold value, by the contrast Present frame where picture is as Wonderful time picture.The Wonderful time picture is the frame that word is reported comprising Wonderful time, As shown in Figure 2.The game that this method can apply in Android platform is live, but this implementation is not limited only to such a platform.
The present embodiment obtains the target that word is reported comprising Wonderful time by the Wonderful time picture obtained as needed The contrast picture of Target Photo position is corresponded in picture and net cast present frame, by cryptographic Hash and the Hash of the Target Photo It is worth the present frame where similar contrast picture as Wonderful time picture, on the one hand, realize that the real-time of Wonderful time picture obtains Take, on the other hand, be only identified with the Target Photo that word is reported comprising Wonderful time, reduce background and Wonderful time is drawn The influence of face identification, improve the precision of Wonderful time picture acquisition.
On the basis of above-described embodiment, device described in the present embodiment also includes pretreatment unit, in the mesh When the average gray value that Wonderful time in piece of marking on a map reports word is more than the average gray value of background in the Target Photo, by institute State Target Photo and compare picture in gray scale be less than the second predetermined threshold value pixel gray value subtract the first pre-set constant value or It is less than the second pre-set constant value as gray scale in Target Photo described in the Target Photo and control picture and control picture The gray value of the pixel of second predetermined threshold value, second pre-set constant value are less than the average gray value of the background;Or Wonderful time reports average gray value of the average gray value less than background in the Target Photo of word in the Target Photo When, the gray value that gray scale in the Target Photo and control picture is more than to the pixel of the 3rd predetermined threshold value is default normal plus the 3rd It is worth number or is more than the pixel of the 3rd predetermined threshold value using the 4th pre-set constant value as gray scale in the Target Photo and control picture Gray value, the 4th pre-set constant value be more than the background average gray value.
On the basis of above-described embodiment, first acquisition unit is specifically used for described in the present embodiment:Every preset duration Picture is contrasted from the position acquisition of the live middle present frame of game.
On the basis of above-described embodiment, second acquisition unit is specifically used for described in the present embodiment:Reduce the target The size of picture and contrast picture;Greyscale image transitions by the Target Photo after diminution and contrast picture are 64 grades of gray scales Image;The Target Photo of 64 grades of gray scales and contrast picture are subjected to discrete cosine transform;After the discrete cosine transform Target Photo and contrast picture matrix in select the submatrixs of a formed objects respectively;Two sub- squares are calculated respectively The average value of battle array;For each submatrix, will in the submatrix more than or equal to the submatrix average value data Hash Value is arranged to 1, and the cryptographic Hash less than the data of the average value of the submatrix is arranged to 0.
On the basis of above-described embodiment, the 3rd acquiring unit is specifically used for described in the present embodiment:Obtain the target The number that the cryptographic Hash of picture and each same position of contrast picture differs;If the number is less than the described first default threshold Value, then using the present frame where the contrast picture as Wonderful time picture.
On the basis of above-described embodiment, device described in the present embodiment also includes working unit, for according to the trip Play the time that live middle Wonderful time picture is shown, obtain the 4th predetermined threshold value;If with last time Wonderful time picture report when Between interval be more than the 4th predetermined threshold value, then the Wonderful time picture is reported.
On the basis of above-described embodiment, device described in the present embodiment also includes the 3rd acquiring unit, for from game Live middle obtain includes multiple Target Photos that Wonderful time reports word, and every Target Photo includes a kind of Wonderful time and reported Word;The first acquisition unit, second acquisition unit and determining unit are handled multiple described target images, obtain institute State Wonderful time picture corresponding to each Target Photo.
The present embodiment provides a kind of equipment for obtaining live middle Wonderful time picture of playing, and Fig. 4 carries for the embodiment of the present invention The equipment overall structure schematic diagram of the live middle Wonderful time picture of acquisition game of confession, the equipment include:At least one processor 41st, at least one memory 42 and bus 43;Wherein,
The processor 41 and memory 42 complete mutual communication by the bus 43;
The memory 42 is stored with the programmed instruction that can be performed by the processor 41, and the processor calls the journey Sequence instruction is able to carry out the method that above-mentioned each method embodiment is provided, such as including:S1, obtain in advance from play it is live in obtain What is taken reports position of the Target Photo of word in the game is live comprising Wonderful time, from the game it is live in it is current The position acquisition contrast picture of frame;S2, use the Hash for perceiving the hash algorithm acquisition Target Photo and contrast picture Value;S3, if the distance between cryptographic Hash of the Target Photo and contrast picture is less than the first predetermined threshold value, by the contrast Present frame where picture is as Wonderful time picture.
The present embodiment provides a kind of non-transient computer readable storage medium storing program for executing, the non-transient computer readable storage medium storing program for executing Computer instruction is stored, the computer instruction makes the computer perform the method that above-mentioned each method embodiment is provided, example Such as include:S1, obtain and report the Target Photo of word in the game from live middle acquisition of playing comprising Wonderful time in advance Position in live, picture is contrasted from the position acquisition of the live middle present frame of game;S2, use perception hash algorithm Obtain the Target Photo and contrast the cryptographic Hash of picture;S3, if between the Target Photo and the cryptographic Hash for contrasting picture Distance is less than the first predetermined threshold value, then using the present frame where the contrast picture as Wonderful time picture.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through Programmed instruction related hardware is completed, and foregoing program can be stored in a computer read/write memory medium, the program Upon execution, the step of execution includes above method embodiment;And foregoing storage medium includes:ROM, RAM, magnetic disc or light Disk etc. is various can be with the medium of store program codes.
The apparatus embodiments of the live middle Wonderful time picture of acquisition game described above are only schematical, wherein The unit illustrated as separating component can be or may not be physically separate, to be shown as unit part It can be or may not be physical location, you can with positioned at a place, or multiple NEs can also be distributed to On.Some or all of module therein can be selected to realize the purpose of this embodiment scheme according to the actual needs.Ability Domain those of ordinary skill is not in the case where paying performing creative labour, you can to understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can Realized by the mode of software plus required general hardware platform, naturally it is also possible to pass through hardware.Based on such understanding, on The part that technical scheme substantially in other words contributes to prior art is stated to embody in the form of software product, should Computer software product can store in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD, including some fingers Make to cause a computer equipment (can be personal computer, server, or network equipment etc.) to perform each implementation Method described in some parts of example or embodiment.
Finally, the present processes are only preferable embodiment, are not intended to limit the scope of the present invention.It is all Within the spirit and principles in the present invention, any modification, equivalent substitution and improvements made etc., the protection of the present invention should be included in Within the scope of.

Claims (10)

  1. A kind of 1. method for obtaining live middle Wonderful time picture of playing, it is characterised in that including:
    S1, obtain live in the game from the Target Photo that word is reported comprising Wonderful time for live middle acquisition of playing in advance In position, contrast picture from the position acquisition of the live middle present frame of the game;
    S2, use the cryptographic Hash for perceiving the hash algorithm acquisition Target Photo and contrast picture;
    S3, will be described right if the distance between cryptographic Hash of the Target Photo and contrast picture is less than the first predetermined threshold value Than the present frame where picture as Wonderful time picture.
  2. 2. the method according to claim 1 for obtaining live middle Wonderful time picture of playing, it is characterised in that the step Also include between S1 and S2:
    If Wonderful time reports the average gray value of word and is more than background in the Target Photo and is averaged in the Target Photo Gray value, then the gray value of the pixel that gray scale is less than the second predetermined threshold value in the Target Photo and control picture is subtracted first Second pre-set constant value as the Target Photo and is compareed Target Photo and compares figure described in picture by pre-set constant value Gray scale is less than the gray value of the pixel of the second predetermined threshold value in piece, and second pre-set constant value is less than the average ash of the background Angle value;Or
    If Wonderful time reports the average gray value of word and is less than background in the Target Photo and is averaged in the Target Photo Gray value, then the gray value of the pixel that gray scale is more than the 3rd predetermined threshold value in the Target Photo and control picture is added the 3rd The 4th pre-set constant value is more than the 3rd predetermined threshold value by default constant value number Pixel gray value, the 4th pre-set constant value be more than the background average gray value.
  3. 3. the method according to claim 1 or 2 for obtaining live middle Wonderful time picture of playing, it is characterised in that described The step of contrasting picture from the position acquisition of the live middle present frame of game in step S1 also includes:
    Every preset duration picture is contrasted from the position acquisition of the live middle present frame of game.
  4. 4. the method according to claim 1 or 2 for obtaining live middle Wonderful time picture of playing, it is characterised in that described Step S2 is specifically included:
    Reduce the Target Photo and contrast the size of picture;
    Greyscale image transitions by the Target Photo after diminution and contrast picture are 64 grades of gray level images;
    64 grades of gray level images of the Target Photo and contrast picture are subjected to discrete cosine transform;
    Select the sub- square of a formed objects respectively from the matrix of two 64 grades of gray level images after the discrete cosine transform Battle array;
    The average value of two submatrixs is calculated respectively;
    For each submatrix, the cryptographic Hash of the data for the average value that the submatrix is more than or equal in the submatrix is arranged to 1, the cryptographic Hash less than the data of the average value of the submatrix is arranged to 0.
  5. 5. the method according to claim 1 or 2 for obtaining live middle Wonderful time picture of playing, it is characterised in that described Step S3 is specifically included:
    Obtain the number that the cryptographic Hash of each same position of the Target Photo with contrasting picture differs;
    If the number is less than first predetermined threshold value, the present frame where the contrast picture is drawn as Wonderful time Face.
  6. 6. the method according to claim 1 or 2 for obtaining live middle Wonderful time picture of playing, it is characterised in that described Also include after step S3:
    The time shown according to the live middle Wonderful time picture of game, obtain the 4th predetermined threshold value;
    If being more than the 4th predetermined threshold value with the time interval that last time Wonderful time picture reports, the Wonderful time is drawn Face reports.
  7. 7. the method according to claim 1 or 2 for obtaining live middle Wonderful time picture of playing, it is characterised in that described Also include before step S1:
    Multiple Target Photos for including Wonderful time report word from live middle acquisition of playing, every Target Photo includes a kind of smart The color moment reports word;
    Correspondingly, also include after the step S3:
    According to the step S1 to S3, Wonderful time picture corresponding to each Target Photo is obtained.
  8. A kind of 8. device for obtaining live middle Wonderful time picture of playing, it is characterised in that including:
    First acquisition unit, for obtaining in advance from the Target Photo that word is reported comprising Wonderful time for live middle acquisition of playing Position in the game is live, picture is contrasted from the position acquisition of the live middle present frame of game;
    Second acquisition unit, for using the cryptographic Hash for perceiving the hash algorithm acquisition Target Photo and contrast picture;
    Determining unit, it is less than the first predetermined threshold value for the distance between the cryptographic Hash of the Target Photo and contrast picture When, using the present frame where the contrast picture as Wonderful time picture.
  9. A kind of 9. equipment for obtaining live middle Wonderful time picture of playing, it is characterised in that including:
    At least one processor, at least one memory and bus;Wherein,
    The processor and memory complete mutual communication by the bus;
    The memory storage has can be by the programmed instruction of the computing device, and the processor calls described program instruction energy Enough perform the method as described in claim 1 to 7 is any.
  10. 10. a kind of non-transient computer readable storage medium storing program for executing, it is characterised in that the non-transient computer readable storage medium storing program for executing is deposited Computer instruction is stored up, the computer instruction makes the computer perform the method as described in claim 1 to 7 is any.
CN201710757967.8A 2017-08-29 2017-08-29 A kind of method and device for obtaining live middle Wonderful time picture of playing Pending CN107509115A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710757967.8A CN107509115A (en) 2017-08-29 2017-08-29 A kind of method and device for obtaining live middle Wonderful time picture of playing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710757967.8A CN107509115A (en) 2017-08-29 2017-08-29 A kind of method and device for obtaining live middle Wonderful time picture of playing

Publications (1)

Publication Number Publication Date
CN107509115A true CN107509115A (en) 2017-12-22

Family

ID=60693139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710757967.8A Pending CN107509115A (en) 2017-08-29 2017-08-29 A kind of method and device for obtaining live middle Wonderful time picture of playing

Country Status (1)

Country Link
CN (1) CN107509115A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108211359A (en) * 2017-12-28 2018-06-29 珠海市君天电子科技有限公司 A kind of information cuing method, device, terminal and computer readable storage medium
CN108287879A (en) * 2018-01-04 2018-07-17 武汉斗鱼网络科技有限公司 Acquisition methods, storage medium, electronic equipment and the system of live content picture
CN108600864A (en) * 2018-04-25 2018-09-28 中影数字巨幕(北京)有限公司 A kind of preview generation method and device
CN108737885A (en) * 2018-06-07 2018-11-02 北京奇艺世纪科技有限公司 A kind of analysis Online Video plays the method and device of interim card
CN109068150A (en) * 2018-08-07 2018-12-21 深圳市创梦天地科技有限公司 A kind of excellent picture extracting method, terminal and the computer-readable medium of video
CN109120987A (en) * 2018-09-20 2019-01-01 珠海市君天电子科技有限公司 A kind of video recording method, device, terminal and computer readable storage medium
CN110009004A (en) * 2019-03-14 2019-07-12 努比亚技术有限公司 Image processing method, computer equipment and storage medium
CN110276769A (en) * 2018-03-13 2019-09-24 上海狮吼网络科技有限公司 Live content localization method in a kind of video picture-in-pictures framework

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105306834A (en) * 2015-10-10 2016-02-03 上海慧体网络科技有限公司 Method for judging game exciting level by using motion video analysis technology
CN106127751A (en) * 2016-06-20 2016-11-16 北京小米移动软件有限公司 image detecting method, device and system
CN106470358A (en) * 2015-08-21 2017-03-01 深圳市天易联科技有限公司 The video memory image-recognizing method of intelligent TV set and device
CN106708951A (en) * 2016-11-25 2017-05-24 西安电子科技大学 Client image blurring deduplication method supporting proprietary authentication

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106470358A (en) * 2015-08-21 2017-03-01 深圳市天易联科技有限公司 The video memory image-recognizing method of intelligent TV set and device
CN105306834A (en) * 2015-10-10 2016-02-03 上海慧体网络科技有限公司 Method for judging game exciting level by using motion video analysis technology
CN106127751A (en) * 2016-06-20 2016-11-16 北京小米移动软件有限公司 image detecting method, device and system
CN106708951A (en) * 2016-11-25 2017-05-24 西安电子科技大学 Client image blurring deduplication method supporting proprietary authentication

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108211359A (en) * 2017-12-28 2018-06-29 珠海市君天电子科技有限公司 A kind of information cuing method, device, terminal and computer readable storage medium
CN108211359B (en) * 2017-12-28 2021-04-09 珠海豹好玩科技有限公司 Information prompting method, device, terminal and computer readable storage medium
CN108287879A (en) * 2018-01-04 2018-07-17 武汉斗鱼网络科技有限公司 Acquisition methods, storage medium, electronic equipment and the system of live content picture
CN110276769A (en) * 2018-03-13 2019-09-24 上海狮吼网络科技有限公司 Live content localization method in a kind of video picture-in-pictures framework
CN110276769B (en) * 2018-03-13 2023-07-11 上海薇龙文化传播有限公司 Live broadcast content positioning method in video picture-in-picture architecture
CN108600864A (en) * 2018-04-25 2018-09-28 中影数字巨幕(北京)有限公司 A kind of preview generation method and device
CN108600864B (en) * 2018-04-25 2020-08-28 中影数字巨幕(北京)有限公司 Movie preview generation method and device
CN108737885A (en) * 2018-06-07 2018-11-02 北京奇艺世纪科技有限公司 A kind of analysis Online Video plays the method and device of interim card
CN109068150A (en) * 2018-08-07 2018-12-21 深圳市创梦天地科技有限公司 A kind of excellent picture extracting method, terminal and the computer-readable medium of video
CN109120987A (en) * 2018-09-20 2019-01-01 珠海市君天电子科技有限公司 A kind of video recording method, device, terminal and computer readable storage medium
CN110009004A (en) * 2019-03-14 2019-07-12 努比亚技术有限公司 Image processing method, computer equipment and storage medium
CN110009004B (en) * 2019-03-14 2023-09-01 努比亚技术有限公司 Image data processing method, computer device, and storage medium

Similar Documents

Publication Publication Date Title
CN107509115A (en) A kind of method and device for obtaining live middle Wonderful time picture of playing
Gu et al. Blind quality assessment of tone-mapped images via analysis of information, naturalness, and structure
US20190020871A1 (en) Visual quality preserving quantization parameter prediction with deep neural network
CN111079740A (en) Image quality evaluation method, electronic device, and computer-readable storage medium
CN110889824A (en) Sample generation method and device, electronic equipment and computer readable storage medium
CN110969046B (en) Face recognition method, face recognition device and computer-readable storage medium
CN107424137B (en) Text enhancement method and device, computer device and readable storage medium
CN112818737A (en) Video identification method and device, storage medium and terminal
CN105979283A (en) Video transcoding method and device
CN110111347A (en) Logos extracting method, device and storage medium
CN106970942B (en) Method and terminal for actively defending yellow-related content
US11551383B2 (en) Image generating apparatus, image generating method, and program for generating an image using pixel values stored in advance
CN100562135C (en) The image quality evaluating system
CN114219774B (en) Image quality evaluation method, device, terminal and computer readable storage medium
CN114418848B (en) Video processing method and device, storage medium and electronic equipment
CN108475430B (en) Picture quality evaluation method and device
CN111754412A (en) Method and device for constructing data pairs and terminal equipment
CN113283543B (en) WebGL-based image projection fusion method, device, storage medium and equipment
CN110851883B (en) Equipment fingerprint generation method and device based on picture drawing
CN114584832A (en) Video self-adaptive multi-size dynamic playing method and device
US8908986B1 (en) Systems and methods for selecting ink colors
WO2017036386A1 (en) Video denoising method and device, terminal and storage medium
CN113132703B (en) Image processing method and apparatus
CN109214317B (en) Information quantity determination method and device
CN109547850B (en) Video shooting error correction method and related product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20171222