CN104202551A - Method and device for video data acquisition - Google Patents
Method and device for video data acquisition Download PDFInfo
- Publication number
- CN104202551A CN104202551A CN201410425811.6A CN201410425811A CN104202551A CN 104202551 A CN104202551 A CN 104202551A CN 201410425811 A CN201410425811 A CN 201410425811A CN 104202551 A CN104202551 A CN 104202551A
- Authority
- CN
- China
- Prior art keywords
- video
- data
- effective dose
- video data
- monitoring
- 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
Links
Landscapes
- Closed-Circuit Television Systems (AREA)
Abstract
The invention discloses a method and a device for video data acquisition. The method comprises the following steps of: determining the current needed video resolution; monitoring the effective quantity of the video data in real time during an acquisition process according to the synchronization signal of a video, and judging whether the effective quantity of the monitored video data is the same as the data quantity represented by the value comprised by the current needed video resolution; if the effective quantity is different from the data quantity is different, processing the video data according to the relationship between the effective quantity of the monitored video data and the data quantity represented by the value comprised by the current needed video resolution. Because the effective quantity of the monitored video data is monitored in real time by virtue of the synchronization signal of the video during the video acquisition process, whether the effective quantity of the monitored video data is the same is determined according to the video resolution, and if not, processing is carried out, error accumulation due to data dislocation is avoided, thus when a video signal source recovers normal, acquisition errors cannot influence the subsequent acquisition for the video signal.
Description
Technical field
The present invention relates to Digital Signal Processing, relate in particular to a kind of video data acquiring method and device.
Background technology
Video data acquiring (Video Capture) Main Function is that the analog video signal of video camera, video tape recorder, television set output is converted to digital video signal, for subsequent treatment and transmission.
General-purpose built-in type processor is often used for storage resources on more sheet than dedicated video processor, helpful to improving systematic function.But the weak point of general processor is there is no special video acquisition interface, due to field programmable gate array (Field-Programmable Gate Array, FPGA) there is Interface Expanding form feature more flexibly, therefore, mostly adopt at present the framework of FPGA+ general processor for the embedded system of Video processing.
Utilize the advantage of the Interface Expanding flexible form of FPGA can realize real time video collection work.But, often there is in actual use the unstable or unexpected disruption of video source signal, existing video data acquiring method is paid close attention to the raising of acquisition function realization and performance and these situations is not considered, proceed the centralized procurement of video data, this just makes the data that gather there will be mistake largely, and due to wrong accumulation, even recover normal at video source signal, this mistake also cannot be eliminated, and the video data collecting is still wrong.Therefore, once existing, existing video data acquiring method in the time that video source signal is abnormal, there is gathering mistake, even if still cannot correctly carry out the problem of video signal collective after video source signal recovers normally.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of video data acquiring method and device, once there is gathering mistake when video source signal is abnormal in order to solve in prior art, even if recover still cannot correctly carry out after normal the problem of video signal collective at video source signal.
The embodiment of the present invention provides a kind of video data acquiring method and device, specific as follows:
First aspect, a kind of video data acquiring method, described method comprises:
Determine the video resolution of current needs, described video resolution is the video resolution under the video format of current needs;
In gatherer process, monitor in real time the effective dose of video data according to the synchronizing signal of video;
Whether the represented data volume of value that the effective dose of video data that monitors of judgement and the video resolution of current needs comprise is consistent;
In judged result while being inconsistent, magnitude relationship between the represented data volume of the value that comprises according to the video resolution of the effective dose of the video data monitoring and current needs is processed video data, and the represented data volume of the value that comprises of the effective dose of video data obtaining after processing and the video resolution of current needs is consistent.
In conjunction with first aspect, in the first mode in the cards, the magnitude relationship between the represented data volume of value that the effective dose of the video data that described basis monitors and the video resolution of current needs comprise is processed video data, comprising:
In the time that the effective dose of the video data monitoring is less than the represented data volume of value that the video resolution of current needs comprises, determines the effective dose deficiency of the described video data monitoring, and carry out the processing of data polishing;
In the time that the effective dose of the video data monitoring is greater than the represented data volume of value that the video resolution of current needs comprises, determines the effective dose excess of the described video data monitoring, and carry out data truncation.
In conjunction with first aspect, and the first of first aspect possibility implementation, in the second mode in the cards, described method also comprises:
The correctness of the synchronizing signal of Real-Time Monitoring video in gatherer process;
Occur when wrong in the synchronizing signal that monitors video, output delete current transmission video requency frame data instruction and etc. new one-frame video data to be collected.
In conjunction with the first mode in the cards of first aspect, in the third mode in the cards, describedly in gatherer process, comprise according to the effective dose of the synchronizing signal monitoring video data of video in real time:
In gatherer process, in real time finish EAV code and monitor the effective dose of this row video data according to the initial SAV code of every row effective video and effective video in frame of video;
Whether the effective dose of the video data that described judgement the monitors data volume represented with the value that the video resolution of current needs comprises be consistent, comprising:
Judge that whether the represented data volume of value transversely that the effective dose of this row video data and the video resolution of current needs comprise is consistent.
In conjunction with the third mode in the cards of first aspect, in the 4th kind of mode in the cards, when the effective dose of the described video data monitoring is less than the represented data volume of value that the video resolution of current needs comprises, determine the effective dose deficiency of the described video data monitoring, and carry out the processing of data polishing, comprising:
Be less than in the effective dose of determining this row video data the represented data volume of value transversely that described video resolution comprises, determine the effective dose deficiency of the described video data monitoring, and last data collecting are continued to output, until reach the represented data volume of value transversely that described video resolution comprises;
In the time that the effective dose of the video data monitoring is greater than the represented data volume of value that the video resolution of current needs comprises, determine the effective dose excess of the described video data monitoring, and carry out data truncation, comprising:
In the time determining that the effective dose of this row video data is greater than the represented data volume of value transversely that described video resolution comprises, determine the effective dose excess of the described video data monitoring, and end the output of the video data that collects, until that the state of the row useful signal of current line is converted to is invalid
Second aspect, a kind of video data acquiring device, described device comprises:
Resolution determining unit, for determining the video resolution of current needs, described video resolution is the video resolution under the video format of current needs;
The first monitoring means, for monitoring in real time the effective dose of video data according to the synchronizing signal of video at gatherer process;
Judging unit, whether consistent for judging the represented data volume of value that the effective dose of the video data monitoring and the video resolution of current needs comprise;
The first performance element, for in judged result while being inconsistent, magnitude relationship between the represented data volume of the value that comprises according to the video resolution of the effective dose of the video data monitoring and current needs is processed video data, and the represented data volume of the value that comprises of the effective dose of video data obtaining after processing and the video resolution of current needs is consistent.
In conjunction with second aspect, in the first mode in the cards, described the first performance element, be further used in the time that the effective dose of the video data monitoring is less than the represented data volume of value that the video resolution of current needs comprises, determine the effective dose deficiency of the described video data monitoring, and carry out the processing of data polishing; In the time that the effective dose of the video data monitoring is greater than the represented data volume of value that the video resolution of current needs comprises, determines the effective dose excess of the described video data monitoring, and carry out data truncation.
In conjunction with second aspect, and the first of second aspect mode in the cards, in the second mode in the cards, described device also comprises:
The second monitoring means, for the correctness of the synchronizing signal at gatherer process Real-Time Monitoring video;
The second performance element, for occurring in the synchronizing signal that monitors video when wrong, output delete current transmission video requency frame data instruction and etc. new one-frame video data to be collected.
In conjunction with the second mode in the cards of second aspect, in the third mode in the cards, be further used in gatherer process in real time finishing EAV code and monitoring according to the initial SAV code of every row effective video and effective video in frame of video the effective dose of this row video data;
Described judging unit, is further used for judging that whether the represented data volume of value transversely that the effective dose of this row video data and the video resolution of current needs comprise is consistent.
In conjunction with the third mode in the cards of second aspect, in the 4th kind of mode in the cards, described the first performance element, be further used for being less than in the effective dose of determining this row video data the represented data volume of value transversely that described video resolution comprises, determine the effective dose deficiency of the described video data monitoring, and last data collecting are continued to output, until reach the represented data volume of value transversely that described video resolution comprises; In the time determining that the effective dose of this row video data is greater than the represented data volume of value transversely that described video resolution comprises, determine the effective dose excess of the described video data monitoring, and end the output of the video data that collects, until that the state of the row useful signal of current line is converted to is invalid.
In the technical scheme of the embodiment of the present invention, in the process that gathers video, utilize the effective dose of the synchronizing signal Real-Time Monitoring video data of video, and whether the represented data volume of the value that comprises of the effective dose of video data that monitors of judgement and the video resolution of current needs is consistent, once find inconsistent, just process, and the magnitude relationship between the represented data volume of the value comprising according to the video resolution of the effective dose of the video data monitoring and current needs is processed video data, and the represented data volume of the value that after processing, the effective dose of video data that obtains and the video resolution of current needs comprise is consistent, the error accumulation of avoiding factor data dislocation and cause, make in the time that video signal source recovers normal, this collection mistake can not affect the follow-up video signal collective that correctly carries out.
Brief description of the drawings
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing of required use during embodiment is described is briefly introduced, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the flow chart of a kind of video data acquiring method in the embodiment of the present invention one;
Fig. 2 is the flow chart of the another kind of video data acquiring method in the embodiment of the present invention one;
Fig. 3 is the structural representation of the video acquisition system in the embodiment of the present invention two;
Fig. 4 is the flow chart of the video data acquiring method in the embodiment of the present invention two;
Fig. 5 is the schematic diagram of the BT.656 normal video row format in the embodiment of the present invention two;
Fig. 6 is the definition figure of 8 bits for SAV or EAV in the embodiment of the present invention two;
Fig. 7 is the schematic diagram of the automatic error detection state machine in the embodiment of the present invention two;
Fig. 8 is the structural representation of the video data acquiring device in the embodiment of the present invention three.
Embodiment
In order to make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, the present invention is described in further detail, and obviously, described embodiment is only a part of embodiment of the present invention, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making all other embodiment that obtain under creative work prerequisite, belong to the scope of protection of the invention.
Once there is gathering mistake when abnormal in order to solve video source signal of the prior art, even if recover still cannot correctly carry out after normal the problem of video signal collective at video source signal, the embodiment of the present invention provides a kind of video data acquiring method and device.
In order to be expressly understood the scheme of the embodiment of the present invention, describe relating to concept in video acquisition of the present invention below.
Video resolution is a parameter how many for data volume in dimensioned plan picture, be often expressed as per inch pixel (Pixel per inch, ppi), for example: video resolution is that 320*180 refers to its valid pixel on horizontal and vertical, and this valid pixel on horizontal and vertical also can represent data volume;
A video sequence is made up of N frame, and when gathering image, generally having 2 kinds of scan modes, one is line by line scan (progressive scanning), and one is interlacing scan (interlaced scanning).For interlacing scan, each frame generally has 2 fields (field), and one is top (top field), and another is field, the end (bottom field).Suppose that a two field picture is 720 row, so, top just comprises wherein all even number lines, and field, the end comprises wherein all odd-numbered lines.For top, valid data are capable is exactly all even number lines of a two field picture, and field, the end, valid data are capable is exactly all odd-numbered lines of a two field picture.
And a field is made up of three parts:
Field (Second Vertical Blanking) at the bottom of (First Vertical Blanking)+valid data capable (Active the Video)+vertical blanking of field=vertical blanking top;
Every a line video data is made up of following four parts:
OK=effective video end mark code (End of Active Video, EAV code)+horizontal blanking (Horizontal Vertical Blanking)+Start of active Video code (Start of Active Video, SAV code)+valid data (Active Video).
Below by specific embodiment, the present invention program is described in detail, certainly, the present invention is not limited to following examples.
Embodiment mono-
The embodiment of the present invention one provides a kind of video data acquiring method, and its flow chart as shown in Figure 1, specifically comprises the following steps:
Step 101: determine the video resolution of current needs, this video resolution is the video resolution under the video format of current needs;
Step 102: the effective dose of monitoring in real time video data in gatherer process according to the synchronizing signal of video;
This synchronizing signal comprises: SAV code and EAV code.
Wherein, effective dose can refer to the valid data amount of every a line video data, also can refer to the valid data line number of one-frame video data;
And in this step 102, can monitor for the effective dose of every row video data; Also can monitor for the effective dose of the video data of predefined row, for example, in every line or two row are monitored the effective dose of row video data; Can also monitor the valid data line number of every one-frame video data; When can also monitoring the effective dose of every row video data, monitor for the valid data line number of every one-frame video data.
While monitoring for the effective dose of every row video data, can find comparatively in time whether to occur gathering mistake, mistake can be controlled in a line; In the time that the effective dose of the video data for predefined row is monitored, can comparatively save the monitoring resource of system, also can find to gather wrong and correspondingly process, mistake can be controlled in predefined row; While monitoring for the valid data line number of every one-frame video data, mistake can be controlled in a frame.
Concrete, because every a line in video data all comprises SAV code and EAV code, therefore, can be in real time in gatherer process monitor the effective dose of this row video data according to the SAV code of every row in frame of video and EAV code; Also can monitor the valid data line number of every one-frame video data according to the SAV code of every a line in frame of video and EAV code in real time, can also be in real time according to the SAV code of every a line in frame of video and EAV code simultaneously effective line number of the effective dose to row video data and every one-frame video data monitor.
In the time that the valid data line number to every one-frame video data is monitored, first effective linage-counter can be set, while starting to monitor for each frame, this effective linage-counter initial value is made as 0, then finish EAV code according to the initial SAV code of the effective video of every row and effective video and determine whether this row is that valid data are capable, be valid data when capable at this row, the count value of the effective linage-counter of row is added to 1.
Step 103: whether the represented data volume of value that the effective dose of video data that monitors of judgement and the video resolution of current needs comprise is consistent, while being consistent, jumps to step 102 in judged result; In judged result while being inconsistent, execution step 104;
Owing to comprising the valid pixel information of video pictures on horizontal and vertical in video resolution, this valid pixel information also can represent data volume, therefore, can weigh the effective dose of the video data monitoring by video resolution;
Concrete, in gatherer process, finish EAV code according to the initial SAV code of every row effective video and effective video in frame of video in real time and monitor the effective dose of this row video data while monitoring, this step 103 specifically comprises:
Whether the represented data volume of value transversely that the effective dose of row video data that monitors of judgement and the video resolution of current needs comprise is consistent;
When the valid data line number of every one-frame video data monitoring according to the SAV code of every a line in frame of video and EAV code in real time in gatherer process, this step 103 specifically comprises:
The effective dose of frame video data that monitors of judgement comprise with the video resolution of current needs longitudinally on the represented data volume of value whether consistent, and judge whether in addition valid data amount of this frame;
Now, if this effective linage-counter equal video resolution longitudinally on the represented data volume of value, and this frame is not have effective data line, determines that the effective dose of video data is normal, and jumps to step 102; Otherwise, execution step 104.
Step 104: the magnitude relationship between the represented data volume of the value that comprises according to the video resolution of the effective dose of the video data monitoring and current needs is processed video data, and the represented data volume of the value that comprises of the effective dose of video data obtaining after processing and the video resolution of current needs is consistent.
Concrete, the magnitude relationship between the represented data volume of the value that comprises according to the effective dose of video data monitoring and the video resolution of current needs in this step 104 is processed video data, comprising:
In the time that the effective dose of the video data monitoring is less than the represented data volume of value that the video resolution of current needs comprises, determines the effective dose deficiency of the video data monitoring, and carry out the processing of data polishing;
In the time that the effective dose of the video data monitoring is greater than the represented data volume of value that the video resolution of current needs comprises, determines the effective dose excess of the video data monitoring, and carry out data truncation.
Further, if when in gatherer process, the effective dose of the video data of Real-Time Monitoring is the effective dose of row video data, when the effective dose of the above-mentioned video data monitoring is less than the represented data volume of value that the video resolution of current needs comprises, determine the effective dose deficiency of the video data monitoring, and carry out the processing of data polishing, comprising:
In the time that the effective dose that monitors this row video data is less than the represented data volume of value transversely that video resolution comprises, determine the effective dose deficiency of the video data monitoring, and last data collecting are continued to output, until reach the represented data volume of value transversely that video resolution comprises;
When the effective dose of the above-mentioned video data monitoring is greater than the represented data volume of value that the video resolution of current needs comprises, determines the effective dose excess of the video data monitoring, and carry out data truncation, comprising:
In the time that the effective dose that monitors this row video data is greater than the represented data volume of value transversely that video resolution comprises, determine the effective dose excess of the video data monitoring, and end the output of the video data that collects, until that the state of the row useful signal of current line is converted to is invalid.
If when the valid data line number that in gatherer process, the effective dose of the video data of Real-Time Monitoring is one-frame video data, when the effective dose of the above-mentioned video data monitoring is less than the represented data volume of value that the video resolution of current needs comprises, determine the effective dose deficiency of the video data monitoring, and carry out the processing of data polishing, comprising:
Be less than in the valid data line number that monitors one-frame video data that video resolution comprises longitudinally on the represented data volume of value, and while there is not effective data line in this frame, determine the effective dose deficiency of the video data monitoring, and data capable last column valid data that collect are continued to output, until reach that video resolution comprises longitudinally on the represented data volume of value;
When the effective dose of the above-mentioned video data monitoring is greater than the represented data volume of value that the video resolution of current needs comprises, determines the effective dose excess of the video data monitoring, and carry out data truncation, comprising:
Be equal to or greater than in the valid data line number that monitors one-frame video data that video resolution comprises longitudinally on the represented data volume of value and this frame while still there is effective data line, determine the effective dose excess of the video data monitoring, and end the output of the video data that collects, until that the state of the capable signal of valid data of present frame is converted to is invalid.
In the technical scheme of the embodiment of the present invention one, in the process that gathers video, utilize the effective dose of the synchronizing signal Real-Time Monitoring video data of video, and whether the represented data volume of the value that comprises of the effective dose of video data that monitors of judgement and the video resolution of current needs is consistent, once find inconsistent, just process, and the magnitude relationship between the represented data volume of the value comprising according to the video resolution of the effective dose of the video data monitoring and current needs is processed video data, and the represented data volume of the value that after processing, the effective dose of video data that obtains and the video resolution of current needs comprise is consistent, the error accumulation of avoiding factor data dislocation and cause, make in the time that video signal source recovers normal, this collection mistake can not affect the follow-up video signal collective that correctly carries out.
Considering in video acquisition process, also may there is mistake in synchronizing signal, and therefore, in order to realize the monitoring to synchronizing signal, preferably, above-mentioned video capture method also comprises following steps as shown in Figure 2:
Step 201: the correctness of the synchronizing signal of Real-Time Monitoring video in gatherer process;
Step 202: occur when wrong in the synchronizing signal that monitors video, output delete current transmission video requency frame data instruction and etc. new one-frame video data to be collected, in the time that the synchronizing signal that monitors video does not occur mistake, proceed to gather.
To step 202, consider that mistake appears in synchronizing signal in above-mentioned steps 201, the video data of this frame cannot use, and therefore, take to delete the video requency frame data instruction measure of current transmission.
It should be noted that, step 201 and step 202 are carried out after above-mentioned steps 101, and owing to being Real-Time Monitoring synchronizing signal, and synchronizing signal all there will be in each valid data of video data are capable, therefore, step 201 can be carried out with above-mentioned steps 102 simultaneously.
Below by the BT.6568bit YCbCr4:2:2 standard video taking camera collection resolution as 720*576 in embodiment bis-, further illustrate the scheme of embodiments of the invention one.
Embodiment bis-
If Fig. 3 is the structural representation of the video acquisition system in the embodiment of the present invention two, comprise: camera 31, SAA7115 chip 32, field programmable gate array (FPGA) 33, programmable read only memory (Programmable Read-Only Memory, PROM) 34, static random access memory (Static Random Access Memory, SRAM) 35 and subsequent treatment module 36;
Wherein, analog video adopts SAA7115 chip 32 to carry out analog-to-digital conversion, can be by the mode of operation of configuration SAA7115, and making data video output format is BT.6568bit YCbCr4:2:2;
FPGA33 is primary processor, the digital of digital video data of the BT.6568bit YCbCr4:2:2 form after Real-time Collection analog-to-digital conversion;
PROM 34, the auxiliary FPGA of SRAM 35 realize video data acquiring.
On the hardware foundation of the video acquisition system shown in Fig. 3, can implement the video capture method in the embodiment of the present invention two, the scheme in the embodiment of the present invention two is also not limited to implement on the hardware of the video acquisition system shown in Fig. 3 certainly.
Shown in Fig. 4, be the schematic flow sheet of the video capture method of the embodiment of the present invention two, comprise the following steps:
The analog signal of the camera of collection is converted to digital signal by step 401:SAA7115 chip;
Step 402:FPGA carries out video acquisition;
In the embodiment of the present invention two, adopt interleaved mode to gather, now, a frame data video is divided into two, and these two is the field, top that comprises odd-numbered line video data and the field, the end that comprises even number line video data.One of BT.656 standard regulation is made up of three parts: field at the bottom of the capable and vertical blanking in vertical blanking top, valid data.Every frame video has 625 row, effective video data 576 row, and a top valid data start from the 23rd row, and field, end valid data start from the 335th row.Be illustrated in figure 5 BT.656 normal video row format, every a line video data is made up of following four parts:
OK=effective video end mark code (EAV code)+horizontal blanking (Horizontal Vertical Blanking)+Start of active Video code (SAV code)+valid data (Active Video).
Wherein, EAV and SAV are 4 bytes (Bytes), are effective video data after SAV;
The format specification following (representing with 16 systems below) of 4 bytes of EAV and SAV: FF 0000 XY;
Wherein, first three byte is what fix, must be FF 0000, and the 4th byte (XY) is according to field, blanking information and fixed, is illustrated in figure 6 the definition of 8 bit implications of SAV or EAV, and its implication is as follows:
Most significant bit Bit7 is fixed data 1; Bit6 is F: Label Field information, and transmission top is 0 when the field, transmission is 1 when the field, the end; Bit5 is V: mark blanking information is 1 when transmission blanking data, when transmission effective video data, is 0; Bit4 is H: mark EAV or SAV, and SAV is that 0, EAV is 1; Bit3~Bit0 is guard signal, and its value depends on F, H, V, plays the effect of verification.Bit3 is V XOR H; Bit2 is F XOR H; Bit1 is F XOR V; Bit0 is F XOR V XOR H.Effective video data are arranged according to Cb, Y, Cr, Y order, and a line contains 720 byte Y, 360 byte Cb and Cr, totally 1440 bytes.
Whether step 403:FPGA Real-Time Monitoring video data valid data amount is consistent with the video resolution of current needs; In monitoring result while being consistent, execution step 407; When monitoring result is inconsistent, execution step 404;
Step 404: judge that whether monitoring video data valid data amount is greater than the represented data volume of video resolution of current needs, if so, determines that type of error is data excess, execution step 405; If not, determine that type of error is data deficiencies, execution step 406;
Step 405: carry out data truncation processing, the video data being restored, and perform step 407;
Step 406: carry out the processing of data polishing, the video data being restored, and perform step 407;
Step 407: export to subsequent treatment module, and jump to step 402.
Above-mentioned steps 403 to step 406 can realize by the automatic error detection state machine shown in Fig. 7.
Gather the BT.656 format video of SAA7115 output by FPGA, gatherer process is completed by the control of video acquisition state of a control machine, and video acquisition state machine comprises five states: idle condition, video acquisition initial state, video acquisition stage condition, video acquisition done state and error condition.Idle condition is initial condition, in the time that video SAV code arrives, enters video acquisition initial state; NextState is video acquisition stage condition, enters video acquisition done state if monitor EAV code, otherwise continues to gather video; In the time that video EAV code arrives, enter video acquisition done state, next step enters idle condition; Error condition, indicates video acquisition process and occurs mistake, and do corresponding wrong Recovery processing.Detailed process comprises:
In the time of idle condition, (0xFF0000 is the high byte of every row video data SAV code and EAV code in BT.656 standard, as shown in Figure 5), illustrates that synchronizing signal arrives to monitor 0xFF0000 data;
Video acquisition initial state checkmark code is not SAV code (initial code defines as shown in Figure 5), enters error condition;
Video acquisition stage condition real-time statistics gathers the valid data amount of video, while monitoring the EAV code of a line effective video data, whether check count value is 1440 bytes (720 byte Y, 360 byte Cr and 360 byte Cb), if less than 1440 bytes enter error condition, when count value exceedes after 1440 bytes, end code does not arrive yet and enters error condition;
Video acquisition done state checkmark code is not EAV code (EAV code defines as shown in Figure 5), enter error condition, arrange and gather video line counting number (initial value is 0), in the time that EAV state is successfully completed, row count value increases by 1, in the time that top field data and a frame data collection finish, check row count value and whether be respectively 288 row (line number of a field data) and 576 row (line numbers of frame data), if do not meet and enter error condition, import the video data collecting into follow-up function module if meet.
Enter after error condition, judgement is the mistake causing due to video data deficiency or excess, if find that (the row data amount collecting is less than the each row of data amount of current data form to data acquisition deficiency, the each row of data amount of current data form is determined according to video resolution) current line is carried out to data polishing, last data collecting are continued to export to next module until reach the each row of data amount demand of current data form; If while finding that the each row of data amount of current data form is arrived in data acquisition, still effectively (the row data amount collecting has exceeded the each row of data amount of current data form to the row useful signal of one's own profession, the each row of data amount of current data form is determined according to video resolution), end the output of data to next processing module, until the row useful signal of current line is converted to disarmed state, avoid error accumulation.Judge if video acquisition done state checkmark code for EAV code or not for SAV code, illustrates video synchronization signal makes mistakes, now notify follow-up function module to delete the video requency frame data of current transmission.Complete after aforesaid operations, error condition is removed and is entered idle condition, waits new one-frame video data to be collected.In the time monitoring successively top first vertical blanking SAV code (0xAB), a top capable EAV code of valid data (0x9D) and top capable SAV codes of valid data (0x80), illustrate that follow-up data is first valid data of one-frame video data, video acquisition process restarts thus.
Embodiment tri-
Based on the same inventive concept of the embodiment of the present invention one, the embodiment of the present invention three provides a kind of video data acquiring device, as shown in Figure 8, this device comprises its structural representation: resolution determining unit 81 and the first monitoring means 82, judging unit 83 and the first performance element 84; Wherein:
Resolution determining unit 81, for determining the video resolution of current needs, this video resolution is the video resolution under the video format of current needs;
The first monitoring means 82, for monitoring in real time the effective dose of video data according to the synchronizing signal of video at gatherer process;
Judging unit 83, whether consistent for judging the represented data volume of value that the effective dose of the video data monitoring and the video resolution of current needs comprise;
The first performance element 84, for in judged result while being inconsistent, magnitude relationship between the represented data volume of the value that comprises according to the video resolution of the effective dose of the video data monitoring and current needs is processed video data, and the represented data volume of the value that comprises of the effective dose of video data obtaining after processing and the video resolution of current needs is consistent.
Preferably, the first performance element 84, be further used for, in the time that the effective dose of the video data monitoring is less than the represented data volume of value that the video resolution of current needs comprises, determines the effective dose deficiency of the video data monitoring, and carrying out the processing of data polishing; In the time that the effective dose of the video data monitoring is greater than the represented data volume of value that the video resolution of current needs comprises, determines the effective dose excess of the video data monitoring, and carry out data truncation.
Preferably, this device also comprises:
The second monitoring means 85, for the correctness of the synchronizing signal at gatherer process Real-Time Monitoring video;
The second performance element 86, for occurring in the synchronizing signal that monitors video when wrong, output delete current transmission video requency frame data instruction and etc. new one-frame video data to be collected.
Preferably, the first monitoring means 82, is further used in gatherer process in real time finishing EAV code and monitoring according to the initial SAV code of every row effective video and effective video in frame of video the effective dose of this row video data;
Above-mentioned judging unit 83, is further used for judging that whether the represented data volume of value transversely that the effective dose of this row video data and the video resolution of current needs comprise is consistent.
Preferably, the first performance element 84, be further used for being less than in the effective dose of determining this row video data the represented data volume of value transversely that this video resolution comprises, determine the effective dose deficiency of the video data monitoring, and last data collecting are continued to output, until reach the represented data volume of value transversely that video resolution comprises; In the time determining that the effective dose of this row video data is greater than the represented data volume of value transversely that video resolution comprises, determine the effective dose excess of the video data monitoring, and end the output of the video data that collects, until that the state of the row useful signal of current line is converted to is invalid.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt complete hardware implementation example, completely implement software example or the form in conjunction with the embodiment of software and hardware aspect.And the present invention can adopt the form at one or more upper computer programs of implementing of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) that wherein include computer usable program code.
The present invention is with reference to describing according to flow chart and/or the block diagram of the method for the embodiment of the present invention, equipment (system) and computer program.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or the combination of square frame.Can provide these computer program instructions to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, the instruction that makes to carry out by the processor of computer or other programmable data processing device produces the device for realizing the function of specifying at flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, the instruction that makes to be stored in this computer-readable memory produces the manufacture that comprises command device, and this command device is realized the function of specifying in flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make to carry out sequence of operations step to produce computer implemented processing on computer or other programmable devices, thereby the instruction of carrying out is provided for realizing the step of the function of specifying in flow process of flow chart or multiple flow process and/or square frame of block diagram or multiple square frame on computer or other programmable devices.
Although described the preferred embodiments of the present invention, once those skilled in the art obtain the basic creative concept of cicada, can make other change and amendment to these embodiment.So claims are intended to be interpreted as comprising preferred embodiment and fall into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification and not depart from the spirit and scope of the present invention the present invention.Like this, if these amendments of the present invention and within modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention is also intended to comprise these changes and modification interior.
Claims (10)
1. a video data acquiring method, is characterized in that, described method comprises:
Determine the video resolution of current needs, described video resolution is the video resolution under the video format of current needs;
In gatherer process, monitor in real time the effective dose of video data according to the synchronizing signal of video;
Whether the represented data volume of value that the effective dose of video data that monitors of judgement and the video resolution of current needs comprise is consistent;
In judged result while being inconsistent, magnitude relationship between the represented data volume of the value that comprises according to the video resolution of the effective dose of the video data monitoring and current needs is processed video data, and the represented data volume of the value that comprises of the effective dose of video data obtaining after processing and the video resolution of current needs is consistent.
2. the method for claim 1, is characterized in that, the magnitude relationship between the represented data volume of value that the effective dose of the video data that described basis monitors and the video resolution of current needs comprise is processed video data, comprising:
In the time that the effective dose of the video data monitoring is less than the represented data volume of value that the video resolution of current needs comprises, determines the effective dose deficiency of the described video data monitoring, and carry out the processing of data polishing;
In the time that the effective dose of the video data monitoring is greater than the represented data volume of value that the video resolution of current needs comprises, determines the effective dose excess of the described video data monitoring, and carry out data truncation.
3. method as claimed in claim 1 or 2, is characterized in that, described method also comprises:
The correctness of the synchronizing signal of Real-Time Monitoring video in gatherer process;
Occur when wrong in the synchronizing signal that monitors video, output delete current transmission video requency frame data instruction and etc. new one-frame video data to be collected.
4. method as claimed in claim 2, is characterized in that, describedly in gatherer process, comprises according to the effective dose of the synchronizing signal monitoring video data of video in real time:
In gatherer process, in real time finish EAV code and monitor the effective dose of this row video data according to the initial SAV code of every row effective video and effective video in frame of video;
Whether the effective dose of the video data that described judgement the monitors data volume represented with the value that the video resolution of current needs comprises be consistent, comprising:
Judge that whether the represented data volume of value transversely that the effective dose of this row video data and the video resolution of current needs comprise is consistent.
5. method as claimed in claim 4, it is characterized in that, when the effective dose of the described video data monitoring is less than the represented data volume of value that the video resolution of current needs comprises, determine the effective dose deficiency of the described video data monitoring, and carry out the processing of data polishing, comprising:
In the time that the effective dose that monitors this row video data is less than the represented data volume of value transversely that described video resolution comprises, determine the effective dose deficiency of the described video data monitoring, and last data collecting are continued to output, until reach the represented data volume of value transversely that described video resolution comprises;
In the time that the effective dose of the video data monitoring is greater than the represented data volume of value that the video resolution of current needs comprises, determine the effective dose excess of the described video data monitoring, and carry out data truncation, comprising:
In the time that the effective dose that monitors this row video data is greater than the represented data volume of value transversely that described video resolution comprises, determine the effective dose excess of the described video data monitoring, and end the output of the video data that collects, until that the state of the row useful signal of current line is converted to is invalid.
6. a video data acquiring device, is characterized in that, this device comprises:
Resolution determining unit, for determining the video resolution of current needs, described video resolution is the video resolution under the video format of current needs;
The first monitoring means, for monitoring in real time the effective dose of video data according to the synchronizing signal of video at gatherer process;
Judging unit, whether consistent for judging the represented data volume of value that the effective dose of the video data monitoring and the video resolution of current needs comprise;
The first performance element, for in judged result while being inconsistent, magnitude relationship between the represented data volume of the value that comprises according to the video resolution of the effective dose of the video data monitoring and current needs is processed video data, and the represented data volume of the value that comprises of the effective dose of video data obtaining after processing and the video resolution of current needs is consistent.
7. device as claimed in claim 6, it is characterized in that, described the first performance element, be further used in the time that the effective dose of the video data monitoring is less than the represented data volume of value that the video resolution of current needs comprises, determine the effective dose deficiency of the described video data monitoring, and carry out the processing of data polishing; In the time that the effective dose of the video data monitoring is greater than the represented data volume of value that the video resolution of current needs comprises, determines the effective dose excess of the described video data monitoring, and carry out data truncation.
8. the device as described in claim 6 or 7, is characterized in that, described device also comprises:
The second monitoring means, for the correctness of the synchronizing signal at gatherer process Real-Time Monitoring video;
The second performance element, for occurring in the synchronizing signal that monitors video when wrong, output delete current transmission video requency frame data instruction and etc. new one-frame video data to be collected.
9. device as claimed in claim 7, is characterized in that, described the first monitoring means is further used in gatherer process in real time finishing EAV code and monitoring according to the initial SAV code of every row effective video and effective video in frame of video the effective dose of this row video data;
Described judging unit, is further used for judging that whether the represented data volume of value transversely that the effective dose of this row video data and the video resolution of current needs comprise is consistent.
10. device as claimed in claim 9, it is characterized in that, described the first performance element, be further used for being less than in the effective dose of determining this row video data the represented data volume of value transversely that described video resolution comprises, determine the effective dose deficiency of the described video data monitoring, and last data collecting are continued to output, until reach the represented data volume of value transversely that described video resolution comprises; In the time determining that the effective dose of this row video data is greater than the represented data volume of value transversely that described video resolution comprises, determine the effective dose excess of the described video data monitoring, and end the output of the video data that collects, until that the state of the row useful signal of current line is converted to is invalid.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410425811.6A CN104202551A (en) | 2014-08-26 | 2014-08-26 | Method and device for video data acquisition |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410425811.6A CN104202551A (en) | 2014-08-26 | 2014-08-26 | Method and device for video data acquisition |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104202551A true CN104202551A (en) | 2014-12-10 |
Family
ID=52087771
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410425811.6A Pending CN104202551A (en) | 2014-08-26 | 2014-08-26 | Method and device for video data acquisition |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104202551A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112492298A (en) * | 2020-11-17 | 2021-03-12 | 北京三快在线科技有限公司 | Method and device for collecting image |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1901678A (en) * | 2005-07-19 | 2007-01-24 | 联发科技股份有限公司 | Method of video sync protection and video sync protector thereof |
CN101686399A (en) * | 2008-09-28 | 2010-03-31 | 中兴通讯股份有限公司 | Device and method for transmitting video stream between chips of video conferphone system |
US20100178025A1 (en) * | 2009-01-14 | 2010-07-15 | International Business Machines Corporation | Intelligent synchronization of portable video devices |
CN101887711A (en) * | 2006-11-28 | 2010-11-17 | 晨星半导体股份有限公司 | Regulation method of display picture position |
CN102158693A (en) * | 2010-02-11 | 2011-08-17 | 联发科技股份有限公司 | Method and video receiving system for adaptively decoding embedded video bitstream |
CN102549642A (en) * | 2009-09-30 | 2012-07-04 | Nec显示器解决方案株式会社 | Video display device and video display method |
CN103780875A (en) * | 2013-11-29 | 2014-05-07 | 信航(天津)科技有限公司 | High-resolution Cameralink signal acquisition device |
-
2014
- 2014-08-26 CN CN201410425811.6A patent/CN104202551A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1901678A (en) * | 2005-07-19 | 2007-01-24 | 联发科技股份有限公司 | Method of video sync protection and video sync protector thereof |
CN101887711A (en) * | 2006-11-28 | 2010-11-17 | 晨星半导体股份有限公司 | Regulation method of display picture position |
CN101686399A (en) * | 2008-09-28 | 2010-03-31 | 中兴通讯股份有限公司 | Device and method for transmitting video stream between chips of video conferphone system |
US20100178025A1 (en) * | 2009-01-14 | 2010-07-15 | International Business Machines Corporation | Intelligent synchronization of portable video devices |
CN102549642A (en) * | 2009-09-30 | 2012-07-04 | Nec显示器解决方案株式会社 | Video display device and video display method |
CN102158693A (en) * | 2010-02-11 | 2011-08-17 | 联发科技股份有限公司 | Method and video receiving system for adaptively decoding embedded video bitstream |
CN103780875A (en) * | 2013-11-29 | 2014-05-07 | 信航(天津)科技有限公司 | High-resolution Cameralink signal acquisition device |
Non-Patent Citations (2)
Title |
---|
HONG XU JIANG,HUI YONG LI ET AL: "An Optimized Video Capture and Preprocesssing Strategy Based on FPGA", 《APPLIED MECHANICS AND MATERIALS》 * |
杨军: "基于FPGA的四路视频采集系统设计与实现", 《中国优秀硕士论文全文数据库-信息科技辑》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112492298A (en) * | 2020-11-17 | 2021-03-12 | 北京三快在线科技有限公司 | Method and device for collecting image |
CN112492298B (en) * | 2020-11-17 | 2022-12-09 | 北京三快在线科技有限公司 | Method and device for collecting image |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106303397A (en) | Image-pickup method and system, video frequency monitoring method and system | |
CN108322737B (en) | Method and device for measuring camera shooting frame rate | |
CN106383764A (en) | Data acquisition method and device | |
CN104202551A (en) | Method and device for video data acquisition | |
CN111225170A (en) | Video complementary recording method and device | |
CN109714529B (en) | Optical filter switching method and device for image acquisition device and storage medium | |
CN105975524A (en) | Data integration method and system used for geology monitoring | |
JP2017508391A (en) | Method for matching data and event gap transmitted / received in network using different communication technologies | |
CN102300081B (en) | Audio and video monitoring equipment, system and method thereof | |
CN117389792A (en) | Fault checking method and device, storage medium and electronic equipment | |
JP6356857B1 (en) | Log recording apparatus, log recording method, and log recording program | |
CN105979153B (en) | A kind of method and system of pattern-recognition round the clock and switching | |
CN101895730A (en) | Video monitoring system for substation | |
CN104331359B (en) | The recording method and device of exception information | |
CN103813129A (en) | Image acquisition time control method, device thereof, system thereof and video processing server | |
CN205961263U (en) | Multisystem instructor in broadcasting's equipment | |
CN109051629A (en) | The determination method, apparatus and system that material is fallen | |
CN111865216B (en) | Identification method, device and system for physical position of photovoltaic module | |
CN110830766B (en) | Method and device for automatically configuring and correcting interval picture of transformer substation monitoring system | |
CN103297833A (en) | Data processing method and date processing device based on intelligent remote control system | |
CN211293728U (en) | Data interaction system between PLC remote modules | |
JP6919289B2 (en) | Control device, control method and control program | |
CN113064373A (en) | Industrial hydroelectric equipment logic signal control method, system, terminal and storage medium based on video image recognition | |
CN111444741B (en) | Data display method, data acquisition method, data display device, data acquisition device, electronic equipment and storage medium | |
CN105681759A (en) | Power transmission and transformation equipment state analysis system based on target recognition |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into 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: 20141210 |