CN105069740B - A kind of read method of video images detection record .SER formatted file - Google Patents
A kind of read method of video images detection record .SER formatted file Download PDFInfo
- Publication number
- CN105069740B CN105069740B CN201510472587.0A CN201510472587A CN105069740B CN 105069740 B CN105069740 B CN 105069740B CN 201510472587 A CN201510472587 A CN 201510472587A CN 105069740 B CN105069740 B CN 105069740B
- Authority
- CN
- China
- Prior art keywords
- file
- frame
- information
- length
- video images
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Management Or Editing Of Information On Record Carriers (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
The invention discloses a kind of .SER video images detections to record file format, this document format includes: file header, frame head, customized Debugging message block, image data, wherein, the file header is for storing the information in relation to entire anomalous event, including file mark, version number and file header length, the frame head is for storing the information in relation to single frames, including flag bit, frame image data type, frame head length, frame number, this frame length, customized Debugging message number of blocks and length, the customized Debugging message block is used to store the customized Debugging message of big data quantity.Beneficial effects of the present invention: a kind of simple and effective video images detection record file format is provided, easily can be added and read;And professional format is used, can guarantee the safety and scalability of information, will not be read and be changed by third party software;Information presses frame recording with picture in of the invention simultaneously, can store customized Debugging message, and video images detection system is suitble to use.
Description
Technical field
The present invention relates to video images detection technical fields, it particularly relates to which a kind of video images detection records .SER
The read method of formatted file.
Background technique
Currently, video images detection system has obtained extensively in the multiple fields such as intelligent transportation, safety monitoring, disaster alarm
General application.It in image detection, needs to record the information of event generation, including the video recording or photo recorded at that time, thing occurs
The type of part, time, place, disaster loss grade, vehicle flowrate, speed, speed limit, following distance, type of vehicle, queue length, road account for
There are rate, license board information, key area coordinate etc..
Existing video images detection record file mainly records still image using general jpeg format, general
The formats such as AVI record dynamic video.Jpeg format record includes the data and content of simple image itself, when including taking pictures
The information such as aperture, shutter, time, date, resolution ratio, although self-defined information can be added, due to being general file, when
When file is opened by third party's tool software, these information are easily lost, very dangerous.In addition it adds and reads in JPEG
Breath Programming comparison of winning the confidence is complicated, and the extension of used fixed format is inconvenient, therefore records text as video images detection
Part is simultaneously improper.When using AVI format record, equally there is above-mentioned problem.
Further, it is also possible to the information occurred using text file format record event, due to using general format, equally
Have the shortcomings that information is unsafe, simultaneously because information cannot press frame recording with picture, therefore limitation is larger, is also not suitable for video
Image detecting system uses.
For the problems in the relevant technologies, currently no effective solution has been proposed.
Summary of the invention
For the problems in the relevant technologies, the present invention proposes a kind of reading of video images detection record .SER formatted file
Method can guarantee the safety and scalability of adding information, while can be read by convenient programming.
The technical scheme of the present invention is realized as follows:
According to an aspect of the invention, there is provided a kind of reading side of video images detection record .SER formatted file
Method.
It includes: file header, frame head, customized Debugging message block, image that the .SER video images detection, which records file format,
Data, wherein the file header is for storing the information in relation to entire anomalous event, including file mark, version number and file
Head length, the frame head is for storing the information in relation to single frames, including flag bit, frame image data type, frame head length, frame
Number, this frame length, customized Debugging message number of blocks and length, the customized Debugging message block is for storing big data quantity
Customized Debugging message.
Wherein, the file header is also used to record the main information of the anomalous event, including the anomalous event occurs
Type, time, place, disaster loss grade, vehicle flowrate, speed, speed limit, following distance, type of vehicle, queue length, road occupy
Rate, license board information, key area coordinate.
Wherein, the frame head is also used to store the current frame information comprising anomalous event, including image attributes, license plate letter
Breath, key area information.
In the above scheme, the format of described image data include BMP image file format, JPG image file format or
AVI image file format.
According to another aspect of the present invention, an a kind of reading side for video images detection record .SER formatted file is provided
Method is read out for the file to above-mentioned .SER video images detection record file format.
The video images detection record .SER formatted file read method include:
Record file is detected to current video image to analyze, and is read partial document head and is parsed, obtains file
Mark, version number and file header length;
According to the file mark, judge whether video images detection record file is required video images detection
File is recorded, and in the case where the judgment result is yes, according to the version number, determines that file corresponding with the version number is read
Method is taken, and according to this document read method and the file header length, reads entire file header, parses anomalous event
Main information;
After the main information for parsing the anomalous event, setting present frame is first frame;And calculate current frame data
Position;
According to the position of the current frame data, the part frame head for reading present frame is parsed, and obtains related single frames
Information, and according to the position of the current frame data, entire frame head is read, parses and obtains current frame information
According to the customized Debugging message number of blocks and length in the information in relation to single frames, reads make by oneself as needed
Adopted Debugging message block number evidence;And it is long according to the frame head length in the information in relation to single frames, this frame length, customized Debugging message block
Degree, calculates position and the size of image data;
According to the position of calculated image data and size, image data is read, and according in the information in relation to single frames
Frame image data type image data is decoded;
It is moved to next frame, is repeated the above steps, until file reading process finishes.
Beneficial effects of the present invention: a kind of simple and effective video images detection record file format, Neng Goufang are provided
Being added and reading just;And professional format is used, can guarantee the safety and scalability of information, it will not be by third party
Software is read and change;Information presses frame recording with picture in of the invention simultaneously, can store customized Debugging message, is suitble to video
Image detecting system uses;And standard coding format can also be used in image data, is convenient for encoding and decoding.
Detailed description of the invention
It in order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, below will be to institute in embodiment
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention
Example, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawings
Obtain other attached drawings.
Fig. 1 is the structural schematic diagram of video images detection record .SER file format according to an embodiment of the present invention;
Fig. 2 is that the process of the read method of video images detection record .SER formatted file according to an embodiment of the present invention is shown
It is intended to.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art's every other embodiment obtained belong to what the present invention protected
Range.
According to an embodiment of the invention, providing a kind of .SER video images detection record file format.
A kind of video images detection record .SER file format according to an embodiment of the present invention include: file header, frame head, from
Define Debugging message block, image data, wherein the file header is for storing the information in relation to entire anomalous event, including text
Part mark, version number and file header length, the frame head is for storing the information in relation to single frames, including flag bit, frame picture number
According to type, frame head length, frame number, this frame length, customized Debugging message number of blocks and length, the customized Debugging message block
(information is only used as debugging and uses customized Debugging message for storing big data quantity, does not handle and shows under normal circumstances
Show).
Wherein, the file header is also used to record the main information of the anomalous event, including the anomalous event occurs
Type, time, place, disaster loss grade, vehicle flowrate, speed, speed limit, following distance, type of vehicle, queue length, road occupy
Rate, license board information, key area coordinate.The type for there are most 4 events and corresponding crucial frame number are defined in file header,
The position of video, license board information etc. when indicating that event occurs
Wherein, the frame head is also used to store the current frame information comprising anomalous event, including image attributes, license plate letter
Breath, key area information.
In the above scheme, the format of described image data include BMP image file format, JPG image file format or
AVI image file format.
According to an embodiment of the invention, additionally providing a kind of reading side of video images detection record .SER formatted file
Method is read out for the file to above-mentioned .SER video images detection record file format.
A kind of read method of .SER video images detection record file according to an embodiment of the present invention includes:
Record file is detected to current video image to analyze, and is read partial document head and is parsed, obtains file
Mark, version number and file header length;
According to the file mark, judge whether video images detection record file is required video images detection
File is recorded, and in the case where the judgment result is yes, according to the version number, determines that file corresponding with the version number is read
Method is taken, and according to this document read method and the file header length, reads entire file header, parses anomalous event
Main information;
After the main information for parsing the anomalous event, setting present frame is first frame;And calculate current frame data
Position;
According to the position of the current frame data, the part frame head for reading present frame is parsed, and obtains related single frames
Information, and according to the position of the current frame data, entire frame head is read, parses and obtains current frame information
According to the customized Debugging message number of blocks and length in the information in relation to single frames, reads make by oneself as needed
Adopted Debugging message block number evidence;And it is long according to the frame head length in the information in relation to single frames, this frame length, customized Debugging message block
Degree, calculates position and the size of image data;
According to the position of calculated image data and size, image data is read, and according in the information in relation to single frames
Frame image data type image data is decoded;
It is moved to next frame, is repeated the above steps, until file reading process finishes.
Above-mentioned technical proposal in order to better understand the present invention, with reference to the accompanying drawing, to this in a manner of specific example
The above-mentioned technical proposal of invention is described in detail.
File format is recorded for the .SER video images detection in above-mentioned technical proposal, as shown in Figure 1, video image is examined
Surveying record file is single file, and suffix is entitled " ser ", by file header, frame head, customized Debugging message block, image data four
Class data structure composition, all information and data combine in a file all in accordance with certain structure, and file is binary system text
Part;
Wherein, file header is used to store the information of related whole event record file, and file header structure defines files-designated
Will (2 byte), version number's (1 byte) and file header length (4 byte), wherein file mark is the ASCII character of alphabetical " SE ",
Indicate that file is that video images detection records file format file;Version number is the version of file format, with the number of ASCII character
It indicates, by file mark and version number, can determine the method read for different editions file.File header is variable length
Degree, minimum length are 128 bytes, support extension, file header length is also used as indexing, for reading the letter of the first frame data
Breath;File header also includes the main information of event, be can customize, type (2 byte code), time (7 including event occurs
Byte, when-point-second, year-month-day), place (2 byte code), disaster loss grade (2 byte code), vehicle flowrate (1 byte code,
/ hour), speed (1 byte, kilometer/hour), speed limit (1 byte, kilometer/hour), following distance (1 byte code), vehicle class
Type (1 byte code), queue length (1 byte code, rice), roadway occupancy (1 byte, percentage), most 4 events class
Type (every 1 byte code of event) and corresponding crucial frame number (every event double byte), license board information (license plate quantity) etc.;
Wherein, frame head is for storing the information in relation to single frames, include flag bit (8 bytes, for frame search and positioning,
First frame head is YZAAAAAA, other frame heads are YZAAAAAB), frame image data type (1 byte code), frame head length (2
Byte), frame number (4 byte), this frame length (4 byte), upper frame length (4 byte), customized Debugging message number of blocks (2 byte)
With length (2 byte) etc., frame head is variable-length, and minimum length is 64 bytes, supports extension;Frame head also includes working as event
Preceding frame information, can customize, including image attributes (1 byte), license board information (14 byte), key area information (17 byte) etc.;
Wherein, customized Debugging message block is used to store the customized Debugging message of big data quantity.The information is only used as adjusting
Examination uses, and does not handle and shows under normal circumstances;
Wherein, the video formats such as BMP, JPG image file or the AVI of standard can be used in image data.
For the read method of the video images detection record file in above-mentioned technical proposal, as shown in Fig. 2, including following
Step:
It reads the partial document head that length is 128 bytes to be parsed, obtains file mark, judge whether it is " SE ", such as
Fruit is not then to represent file not and be anomalous event video images detection record file, file reading program is exited, if files-designated
Will is " SE ", then representing file is anomalous event video images detection record file, obtains file format according to file header parsing
Version number, determine the method read for the version file, file header length obtained according to file header parsing, read entire text
Part head, parses the information such as type, time, the place of outgoing event, and then setting present frame is first frame;
The position of current frame data is calculated, the part frame head for reading the present frame of 64 bytes is parsed, and the frame is obtained
Frame head mark judges whether frame header will is " YZAAAAAA " or " YZAAAAAB ", if it is, the frame data are correct, according to
The length for parsing obtained frame head, reads entire frame head, parses and obtain the license plate of present frame, key area information etc.;
Customized Debugging message number of blocks and length information are obtained according to frame head, reads customized Debugging message as needed
Block number evidence;
According to frame head length, frame length and customized Debugging message block length, position and the size of image data are calculated,
Image data is read, image data is decoded according to the frame image data type in frame head;
Mobile present frame repeats G to E until file reading process finishes to next frame.
It can be seen that the present invention provides a kind of simple and effective video images detections to record file format, can facilitate
Be added and read;And professional format is used, can guarantee the safety and scalability of information, it will not be soft by third party
Part is read and change;Information presses frame recording with picture in of the invention simultaneously, can store customized Debugging message, is suitble to video figure
As detection system uses;And standard coding format can also be used in image data, is convenient for encoding and decoding.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.
Claims (5)
1. a kind of read method of video images detection record .SER formatted file, which is characterized in that for .SER video figure
As detection record file format file be read out, wherein the read method the following steps are included:
To current video image detect record file analyze, read partial document head simultaneously parsed, obtain file mark,
Version number and file header length;
According to the file mark, judge whether video images detection record file is required video images detection record
File, and in the case where the judgment result is yes, according to the version number, determine file reading side corresponding with the version number
Method, and according to this document read method and the file header length, entire file header is read, traffic abnormal incident is parsed
Main information;
After the main information for parsing the traffic abnormal incident, setting present frame is first frame;And calculate current frame data
Position;
According to the position of the current frame data, the part frame head for reading present frame is parsed, and obtains the information in relation to single frames,
And according to the position of the current frame data, entire frame head is read, parses and obtains current frame information;
According to the customized Debugging message number of blocks and length in the information of above-mentioned single frames, customized debugging letter is read as needed
Cease block number evidence;And according to frame head length, this frame length, the customized Debugging message block length in the information in relation to single frames, calculate
The position of image data and size out;
According to the position of calculated image data and size, image data is read, and according to the frame in the information in relation to single frames
Picture data type is decoded image data;
It is moved to next frame, is repeated the above steps, until file reading process finishes.
2. a kind of read method of video images detection record .SER formatted file according to claim 1, feature exist
In .SER video images detection record file format include file header, frame head, customized Debugging message block, image data,
Wherein, the file header is for storing the information in relation to entire traffic abnormal incident, including file mark, version number and file header
Length, the frame head for storing the information in relation to single frames, including flag bit, frame image data type, frame head length, frame number,
This frame length, customized Debugging message number of blocks and length, the customized Debugging message block are used to store oneself of big data quantity
Define Debugging message.
3. a kind of read method of video images detection record .SER formatted file according to claim 2, feature exist
In the file header is also used to record the main information of the traffic abnormal incident, including the traffic abnormal incident occurs
Type, the time, place, disaster loss grade, vehicle flowrate, speed, speed limit, following distance, type of vehicle, queue length, roadway occupancy,
License board information, key area coordinate.
4. a kind of read method of video images detection record .SER formatted file according to claim 3, feature exist
In the frame head is also used to store the current frame information comprising traffic abnormal incident, including image attributes, license board information, key
Area's information.
5. a kind of read method of video images detection record .SER formatted file according to claim 4, feature exist
In the format of described image data includes BMP image file format, JPG image file format or AVI image file format.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510472587.0A CN105069740B (en) | 2015-08-05 | 2015-08-05 | A kind of read method of video images detection record .SER formatted file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510472587.0A CN105069740B (en) | 2015-08-05 | 2015-08-05 | A kind of read method of video images detection record .SER formatted file |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105069740A CN105069740A (en) | 2015-11-18 |
CN105069740B true CN105069740B (en) | 2019-03-26 |
Family
ID=54499098
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510472587.0A Active CN105069740B (en) | 2015-08-05 | 2015-08-05 | A kind of read method of video images detection record .SER formatted file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105069740B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107818594A (en) * | 2017-09-06 | 2018-03-20 | 北京矩阵空间科技有限公司 | Threedimensional model file format system and read method |
CN109117282A (en) * | 2018-07-16 | 2019-01-01 | 阿里巴巴集团控股有限公司 | A kind of data transmission method, communication part, apparatus and system |
CN111190851A (en) * | 2019-12-11 | 2020-05-22 | 深圳市优必选科技股份有限公司 | Analysis method, device, equipment and medium for variable length protocol |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006186840A (en) * | 2004-12-28 | 2006-07-13 | Sanyo Electric Co Ltd | Driving support system |
CN1928871A (en) * | 2006-09-07 | 2007-03-14 | 北京优纳科技有限公司 | Big capacity image fast browsing system |
EP1785996A1 (en) * | 2004-08-30 | 2007-05-16 | Sony Corporation | Image information recording device and image information display device |
CN101276517A (en) * | 2008-04-02 | 2008-10-01 | 四川通安实业有限公司 | Method for mixing image parameter data based on electric policeman |
CN101894131A (en) * | 2010-06-10 | 2010-11-24 | 胡建军 | Video storage method convenient for rapidly retrieving images |
CN102073691A (en) * | 2010-12-23 | 2011-05-25 | 杭州海康威视数字技术股份有限公司 | Vehicle monitoring method and system thereof |
CN102402804A (en) * | 2010-09-16 | 2012-04-04 | 萱场工业株式会社 | Driving recorder |
-
2015
- 2015-08-05 CN CN201510472587.0A patent/CN105069740B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1785996A1 (en) * | 2004-08-30 | 2007-05-16 | Sony Corporation | Image information recording device and image information display device |
JP2006186840A (en) * | 2004-12-28 | 2006-07-13 | Sanyo Electric Co Ltd | Driving support system |
CN1928871A (en) * | 2006-09-07 | 2007-03-14 | 北京优纳科技有限公司 | Big capacity image fast browsing system |
CN101276517A (en) * | 2008-04-02 | 2008-10-01 | 四川通安实业有限公司 | Method for mixing image parameter data based on electric policeman |
CN101894131A (en) * | 2010-06-10 | 2010-11-24 | 胡建军 | Video storage method convenient for rapidly retrieving images |
CN102402804A (en) * | 2010-09-16 | 2012-04-04 | 萱场工业株式会社 | Driving recorder |
CN102073691A (en) * | 2010-12-23 | 2011-05-25 | 杭州海康威视数字技术股份有限公司 | Vehicle monitoring method and system thereof |
Also Published As
Publication number | Publication date |
---|---|
CN105069740A (en) | 2015-11-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6993196B2 (en) | Digital image storage method | |
CN105069740B (en) | A kind of read method of video images detection record .SER formatted file | |
KR101522004B1 (en) | Apparatus and method for transmitting data using visual code and apparatus and method for receiving data using visual code | |
JP2006506849A5 (en) | ||
MY125189A (en) | A digital video processing and storage system for video, audio and ancillary data | |
CN102129474A (en) | Method, device and system for retrieving video data | |
CN107767253B (en) | Tax information management platform, method and system | |
US20010053238A1 (en) | Digital watermark embedding method, digital watermark extracting method, recording medium, image recording device, and image replaying device | |
CN107547941B (en) | Method, device and system for storing media data | |
CN105355034A (en) | Traffic accident scene evidence collection and security system and method thereof | |
JP2008181410A (en) | Drive recorder, program for drive recorder, tampering analysis program, data analysis system, and method for detecting image tampering | |
CN103870574A (en) | Label manufacturing and indexing method based on H. 264 ciphertext cloud video storage | |
CN105357570A (en) | Video stream analysis method and system based on frame analysis | |
KR100828479B1 (en) | Apparatus and method for inserting addition data in image file on electronic device | |
AR043899A1 (en) | DEVICE AND METHOD FOR CHANNELING DATA IN REAL TIME. | |
JP2009110205A (en) | Running data processor and running data processing system | |
CN109064121B (en) | Method and device for signing electronic contract | |
CN107729172A (en) | A kind of method for generating adjustment step by step daily record | |
JP5966053B1 (en) | Information management method and information management system | |
CN113473166A (en) | Data storage system and method | |
TW201349001A (en) | Digital synthetic picture | |
JP2006295665A (en) | Image recording apparatus and image recording method | |
US20120134540A1 (en) | Method and apparatus for creating surveillance image with event-related information and recognizing event from same | |
CN110351681A (en) | A kind of collecting method for environmental monitoring | |
CN111104080A (en) | Text remote preview method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |