The content of the invention
The problem to be solved in the present invention, which is to provide, need not be scanned a kind of video of Quick Response Code by ancillary equipment and broadcast
Put the method and system that device obtains 2 D code information from video.
In order to solve the above technical problems, the technical solution adopted by the present invention one is:
A kind of method that video player obtains 2 D code information from video, is comprised the following steps:
B1 video players according to user operation records current picture time point information on a timeline;
Image information and guarantor of the B2 video players according to some frames before and after time point on time point information interception time axle
Deposit;
B3 carries out dissection process to truncated picture information, obtains the 2 D code information in image information;
B4 establishes 2 D code information and video pictures and the corresponding relation of reproduction time, and is in by 2 D code information
It is existing.
Further, above-mentioned steps B3 is comprised the following steps:
Intercepted frame image information is carried out pattern-recognition by B31, abandons invalid frame and according to matching by of each two field picture
Recorded with degree;
Effective frame image information is carried out dissection process, forming step identification code, and be transferred to step B39 one by one by B32;
Consecutive frame is grouped by B33, forming step identification code, and is transferred to step B38;
B34 is made each packet be started with a low matching degree frame, consecutive frame packet is ensured into each packet according to matching degree
There are the higher matching degree two field picture in an adjacent position, forming step identification code, and be transferred to step B38;
B35 is according to matching degree, and centered on high matching degree frame, consecutive frame is grouped by conversion per framing quantity, forming step
Identification code, and it is transferred to step B38;
B36 finds the best match two field picture of pattern-recognition mark, forming step identification code according to matching priority;
B37 is using best match two field picture as starting A, front and rear each consecutive frame respectively -1, -2 ... ...-n, and 1,2 ... ... n
(last frame that n=front or behinds since A are captured) respectively with [A+ (- 1)], [A+ (- 1)+(- 2)] ... [A+ (- 1)+
(- 2)+... ... (- n)] and [A+1], [A+1+2] ... [A+1+2+ ... ... n] and [A+1+ (- 1)], [A+1+ (- 1)+2+ (-
2)] ... ... [A+1+ (- 1)+2+ (- 2)+... ... n+ (- n)] frame is grouped for packet mode;
B38 will do HDR algorithm process with framing and obtain HDR image information, and retain step identification code;
B39 judges whether successfully resolved, and Quick Response Code is obtained if success;Otherwise judged according to step identification code:
If step identification code mark for step B32, be transferred to step B33;
If step identification code mark for step B33, be transferred to step B34;
If step identification code mark for step B34, be transferred to step B35;
If step identification code mark for step B35, be transferred to step B36;
If step identification code mark for step B37, abandon obtaining Quick Response Code.
In order to solve the above technical problems, the technical solution adopted by the present invention two is:
A kind of audio/video player system that 2 D code information can be obtained from video, comprising:
Time shaft acquiring unit, for when user operates video player and obtains Quick Response Code function, recording current picture
Time point information on a timeline;
Two field picture acquiring unit, for being believed according to the image of some frames before and after time point on time point information interception time axle
Cease and preserve;
Two field picture resolution unit, for carrying out dissection process to truncated picture information, obtain the two dimension in image information
Code information;
Quick Response Code display unit, for 2 D code information is presented.
The inventive method and system have the advantages and positive effects of:
It is that the Quick Response Code occurred in scan video uses other ancillary equipment or other complexity behaviour present invention, avoiding user
It is inconvenient caused by work, realize the function of directly utilizing the Quick Response Code occurred in video player scan video;
The present invention is solved for obscuring picture, the problem of None- identified Quick Response Code, while uses intelligent circulation algorithm, will
Greatly improve video Quick Response Code and be parsed into power;
Frame of video need not be continuously detected, when user sees video, need to enable at any time at any time, reduce cpu resource occupancy.
Embodiment
The specific embodiment of the present invention is elaborated below in conjunction with the accompanying drawings.
The method that video player of the present invention obtains 2 D code information from video, is comprised the following steps, as shown in figure 1,
In video player playing process, by video pause when user has found Quick Response Code occur in video, pass through player interaction triggering
Identification process, when process starts, after player receives instruction, the time point position of current time axle is recorded, according to time point position
Put the continuous specific frame number video image of interception;
As shown in Fig. 2 player carries out pattern-recognition to intercepted two field picture, ignore unmatched picture frame, by each frame
Matching degree is recorded;Then player takes the lead in parsing the interception frame retained frame by frame;If can not succeed, play
Consecutive frame is divided into some groups by device, each group image is carried out into HDR processing, the HDR image generated after HDR is handled is solved
Analysis, if can not succeed, player will be attempted successively:" according to matching degree, each packet is set to be opened with a bottom matching degree frame
Begin, consecutive frame is grouped ";" according to matching degree, centered on high person, convert and be grouped consecutive frame per framing quantity ";" foundation
Matching priority finds the best match two field picture of pattern-recognition mark, and using the two field picture as starting A, front and rear each consecutive frame point
Wei -1, -2 ... ...-n, and 1,2 ... ... n (last frame that n=front or behinds since A are captured) respectively with [A+ (-
1)], [A+ (- 1)+(- 2)] ... [A+ (- 1)+(- 2)+... ... (- n)] and [A+1], [A+1+2] ... [A+1+2+ ... ... n]
And [A+1+ (- 1)], [A+1+ (- 1)+2+ (- 2)] ... ... [A+1+ (- 1)+2+ (- 2)+... ... n+ (- n)] are packet mode
Frame is grouped " and will be parsed respectively after the HDR image of formation;Generation step mark is rapid in wherein each step implementation procedure
Code, identified according to every step, circulation parsing is carried out when parsing failure.
For the above method, the audio/video player system of 2 D code information, such as Fig. 3 can be obtained corresponding to the present invention from video
It is shown, comprising:
Time shaft acquiring unit, for when user operates video player and obtains Quick Response Code function, recording current picture
Time point information on a timeline;
Two field picture acquiring unit, for being believed according to the image of some frames before and after time point on time point information interception time axle
Cease and preserve;
Two field picture resolution unit, for carrying out dissection process to truncated picture information, obtain the two dimension in image information
Code information;
Quick Response Code display unit, for 2 D code information is presented.
Embodiments of the invention are described in detail above, but the content is only presently preferred embodiments of the present invention,
It is not to be regarded as the practical range for limiting the present invention.Any changes and modifications in accordance with the scope of the present application,
All should still it belong within the patent covering scope of the present invention.