CN103744993A - Video file storage-retrieval method and video file storage-retrieval device - Google Patents

Video file storage-retrieval method and video file storage-retrieval device Download PDF

Info

Publication number
CN103744993A
CN103744993A CN201410029663.6A CN201410029663A CN103744993A CN 103744993 A CN103744993 A CN 103744993A CN 201410029663 A CN201410029663 A CN 201410029663A CN 103744993 A CN103744993 A CN 103744993A
Authority
CN
China
Prior art keywords
surveyed area
video file
coding
data
macro block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410029663.6A
Other languages
Chinese (zh)
Inventor
张之双
陈卫东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Keda Technology Co Ltd
Original Assignee
Suzhou Keda Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Keda Technology Co Ltd filed Critical Suzhou Keda Technology Co Ltd
Priority to CN201410029663.6A priority Critical patent/CN103744993A/en
Publication of CN103744993A publication Critical patent/CN103744993A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/783Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/7847Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using low-level visual features of the video content
    • G06F16/786Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using low-level visual features of the video content using motion, e.g. object motion or camera motion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data

Abstract

The invention relates to a video file storage-retrieval method and a video file storage-retrieval device. Data of one image frame is divided into multiple detection areas first; motion states of detection areas are determined in sequence; the motion states are encoded. Since the data of one image frame is divided into a fixed amount of detection areas, the problem that certain areas are not detected is avoided; meanwhile, the motion state of each macro block in each detection area is determined, and as long as the amount of moving macro blocks exceeds a preset amount threshold, the detection areas are movable; accordingly, the accuracy of retrieving subsequent video files can be absolutely guaranteed according to actual needs. Moreover, a user can specify a concerned area for retrieving video files; since motion data indicating the motion states of the video files are added in the encoding process, the speed of retrieving the video files is partly improved, namely the video files are retrieved fast on the premise of guaranteeing retrieval accuracy.

Description

A kind of storage and retrieval method of video file and storage and retrieval device thereof
Technical field
The present invention relates to image processing techniques, specifically a kind of storage and retrieval method of video file and storage and retrieval device thereof.
Background technology
In video monitoring system, along with the growth of service time, can record and produce a large amount of video files.When needs playback video file is collected evidence, by manually watching a large amount of video files, be very difficult thing.Mainly at present to realize by the following technical solutions retrieval to video file.
First being to utilize mobile detection alert technology, is mainly for a web camera, specifies in advance several detection area.When the motion feature of these detection area is during higher than the activation threshold value of configuration, network shooting chance starts to report to the police, and starts video recording simultaneously; When motion feature falls the outage threshold of extremely configuration after rise, network shooting chance stop alarm, and finish video recording simultaneously.This technical scheme can produce alert event, and can search accordingly the video recording of reporting to the police.But this technical scheme can only be specified detection area in advance, all events all produce around these detection area, cannot be in the care region of specifying again other afterwards.Therefore, if be concerned about, when region is just the detection area of non-configuration, this technical scheme cannot be processed.If be configured to region-wide mobile detection, can produce a large amount of alert events to non-care region, a large amount of alert events wherein will be all useless, have caused the waste to resource.
Next is that image intelligent is analyzed alarm technique, need to carry out intellectual analysis to image, according to pre-configured rule, identifies event and produces and report to the police, or carry out graphical analysis afterwards.This technical scheme need to be disposed intelligent network camera or be introduced special intellectual analysis equipment, but Related product price comparison costliness, and be not suitable for vast medium and low-end users.And, if adopt pre-configured rule to produce the method for reporting to the police, can there is the problem same with mobile detection alert technology; If adopt the method for graphical analysis afterwards, owing to image having been carried out to encoding and decoding, image quality decrease can cause the accuracy rate of intellectual analysis to decline.
Summary of the invention
For this reason, technical matters to be solved by this invention is cannot under the prerequisite of accuracy that guarantees intellectual analysis, realize the quick-searching to video file in prior art, thereby proposes a kind of storage and retrieval method and storage and retrieval device thereof of video file.
For solving the problems of the technologies described above, the present invention has adopted following technical scheme.
A storage means for video file, proceeds as follows for each frame image data in video recording picture:
S1 a: frame image data is divided into multiple surveyed areas, for each surveyed area is set numbering;
S2: the variance data existing more afterwards with the surveyed area of identical numbering in front N frame image data according to each surveyed area is determined the motion state of surveyed area described in each, the motion state of each surveyed area is encoded, wherein N >=1;
S3: the exercise data of each two field picture is encoded according to the coding of each surveyed area;
S4: will obtain video file storage after the coding of the exercise data of each two field picture and time associated with this frame image data.
Described step S2 specifically comprises further:
S21: surveyed area described in each is divided into multiple macro blocks;
S22: according to the macro block of same position in each macro block and former frame view data, whether there are differences to judge this macro block be motion or static;
S23: described in each in surveyed area, if the number of macroblocks of motion is while exceeding setting threshold, this surveyed area is motion, otherwise this surveyed area is static.
Described step S3 specifically comprises further:
The coding of all surveyed areas in each frame image data is gathered, form the coding of the exercise data of each two field picture; Wherein the coding of exercise data comprises several bytes, and each in each byte is the motion state of the surveyed area of corresponding a coding all.
Further in described step S22: when in each macro block and former frame view data, the macro block of same position there are differences data, variance data and activation threshold value are compared, when described variance data is greater than described activation threshold value, this macro block is motion, otherwise this macro block is static.
The quantity of described surveyed area is no more than 400 further.
Described in each, macro block comprises 16 × 16 pixels further.
A search method for video file, the video file that the storage means of the video file according to above-mentioned is stored is retrieved, and comprises the steps:
ST1: coding and the time of obtaining exercise data associated with each frame image data in described video file;
ST2: obtain regional code, it has identical byte number with the coding of described exercise data, and in each byte in regional code each all the surveyed area of corresponding a numbering whether be the zone state of being concerned about region;
ST3: position coupling successively corresponding to surveyed area of utilizing same numbering in the coding of regional code in step ST2 and the exercise data in step ST1, the motion state of the surveyed area that obtains same numbering in each frame image data, and obtain corresponding time of surveyed area place frame image data that motion state changes as run duration point;
ST4: obtain run duration list, described run duration list records all with described regional code in zone state be the run duration point of the surveyed area in care region.
Further in described step ST2, in the coding of described regional code and described exercise data, the surveyed area of the corresponding same numbering of identical bits in the byte of same position.
A memory storage for video file, comprising:
Piecemeal module, for a frame image data is divided into multiple surveyed areas, for each surveyed area is set numbering;
State determination module, for the variance data that exists more afterwards with the surveyed area of the identical numbering of front N frame image data according to each surveyed area, determine the motion state of surveyed area described in each, motion state to each surveyed area is encoded, wherein N >=1;
Coding module, for encoding to the exercise data of each two field picture according to the coding of each surveyed area;
Association store module, for obtaining video file storage after the coding of the exercise data of each two field picture and time associated with this frame image data.
Described state determination module specifically comprises further:
Macroblock partitions unit, for being divided into multiple macro blocks by surveyed area described in each;
Whether macro block motion state determining unit is that move or static for what there are differences to judge this macro block according to the macro block of each macro block and former frame view data same position;
Surveyed area motion state determining unit, in surveyed area described in each, if the number of macroblocks of motion is while exceeding setting threshold, this surveyed area is motion, otherwise this surveyed area is static.
Described coding module specifically comprises further:
Gather unit, for the coding of all surveyed areas of each frame image data is gathered;
Coding unit, is used to form the coding of the exercise data of each two field picture, and wherein the coding of exercise data comprises several bytes, and each in each byte is the motion state of the surveyed area of corresponding a coding all.
In further in described macro block motion state determining unit, store activation threshold value, when in each macro block and former frame view data, the macro block of same position there are differences data, variance data and described activation threshold value are compared, when described variance data is greater than described activation threshold value, this macro block is motion, otherwise this macro block is static.
The quantity of described surveyed area is no more than 400 further.
Described in each, macro block comprises 16 × 16 pixels further.
An indexing unit for video file, the video file that the memory storage of the video file according to above-mentioned is stored is retrieved, and comprising:
Motion capture module, for obtaining coding and the time of the described video file exercise data associated with each frame image data;
Regional code acquisition module, for obtaining regional code, it has identical byte number with the coding of described exercise data, and in each byte in regional code each all the surveyed area of corresponding a numbering whether be the zone state of being concerned about region;
Matching module, mate successively position corresponding to surveyed area for the same numbering of coding of utilizing the exercise data that regional code that described regional code acquisition module obtains obtains with described motion capture module, the motion state of the surveyed area that obtains same numbering in each frame image data, and obtain corresponding time of surveyed area place frame image data that motion state changes as run duration point;
Run duration acquisition module, for obtaining run duration list, in all and described regional code of described run duration list records, zone state is the run duration point of being concerned about the surveyed area in region.
Further in described regional code acquisition module, in the coding of described regional code and described exercise data, the surveyed area of the corresponding same numbering of identical bits in the byte of same position.
Technique scheme of the present invention has the following advantages compared to existing technology:
(1) the storage and retrieval method of a kind of video file of the present invention and storage and retrieval device thereof, first a frame image data is divided into multiple surveyed areas, determine successively the motion state of surveyed area described in each, and by the processing of encoding of its motion state.Owing to being the surveyed area that a frame image data is divided into fixed qty, the problem that does not exist some region not to be detected, determine respectively the motion state of each macro block in each surveyed area simultaneously, as long as when the amount of movement of macro block exceedes the quantity of setting threshold, this surveyed area is motion, so can guarantee according to actual needs the accuracy of follow-up video file retrieval completely.Then user can specify care region to carry out the retrieval of video file, because video file has added the exercise data that represents its motion state in cataloged procedure, the whole video file therefore can not decode, promote to a certain extent the retrieval rate of video file, under the prerequisite of accuracy that guarantees retrieval, realized the quick-searching to video file.
(2) the storage and retrieval method of a kind of video file of the present invention and storage and retrieval device thereof, accurately determines the motion state of surveyed area described in each by setting setting threshold and activation threshold value, and by the processing of encoding of its motion state.Described setting threshold and activation threshold value can be according to actual needs differently adjust accordingly, there is greatly dirigibility.Without image is carried out to intellectual analysis, also, just without disposing intelligent network camera or introducing special intellectual analysis equipment, reduced accordingly use cost simultaneously.
(3) the storage and retrieval method of a kind of video file of the present invention and storage and retrieval device thereof, both be applicable to the retrieval of the whole frame image data based on exercise data, also be applicable to the retrieval in the care region of any appointment based on exercise data, and the quantity in the care region of described any appointment can be one or more.And be that user more needs more often than not for the retrieval in the care region of any appointment based on exercise data, the user's that fitted user demand, specific aim and dirigibility while greatly having improved user search video file.
Accompanying drawing explanation
For content of the present invention is more likely to be clearly understood, below according to a particular embodiment of the invention and by reference to the accompanying drawings, the present invention is further detailed explanation, wherein
Fig. 1 is the storage means process flow diagram of the video file described in a kind of embodiment;
Fig. 2 is that the numbering of the surveyed area described in a kind of embodiment is set schematic diagram;
Fig. 3 is the search method process flow diagram of the video file described in a kind of embodiment;
Fig. 4 is the retrieval schematic diagram in the care region described in a kind of embodiment;
Fig. 5 is the memory device structure figure of the video file described in a kind of embodiment;
Fig. 6 is the indexing unit structural drawing of the video file described in a kind of embodiment.
Embodiment
embodiment 1
The storage means of a kind of video file described in the present embodiment, as shown in Figure 1, proceeds as follows for each frame image data in video recording picture:
S1 a: frame image data is divided into multiple surveyed areas, for each surveyed area is set numbering;
S2: the variance data existing more afterwards with the surveyed area of identical numbering in front N frame image data according to each surveyed area is determined the motion state of surveyed area described in each, the motion state of each surveyed area is encoded, wherein N >=1;
S3: the exercise data of each two field picture is encoded according to the coding of each surveyed area;
S4: will obtain video file storage after the coding of the exercise data of each two field picture and time associated with this frame image data.
First the present embodiment is divided into multiple surveyed areas by a frame image data, and its dividing mode can be set in conjunction with actual needs, and the relation that need to consider data volume and recognition accuracy is relatively flexible.Table 1 has provided the different demarcation mode of surveyed area under different resolution.
Table 1
Resolution title Resolution Surveyed area size Surveyed area quantity
QXGA 2048x1536 128x64 16x24=384
1080P 1920x1080 96x64 20x17=340
720P 1280x720 64x48 20x15=300
4CIF 704x576 32x32 22x18=396
VGA 640x480 32x32 20x15=300
CIF 352x288 16x16 22x18=396
According to above-mentioned either type or other modes, dividing after surveyed area, can further to surveyed area, be numbered after can determining the size and number of surveyed area.Establishing surveyed area quantity is herein m × n, can number line by line, numbers and also can select other coding rules by column when surveyed area is numbered.This sentences and is numbered line by line example, and number consecutively is 0,1,2 line by line ..., m × n-1.As shown in Figure 2, being numbered of the surveyed area that the capable x of y is listed as:
Area(x,y)=y×m+x(0≤x<m,0≤y<n);
As the 2 × m+2 that is numbered of the surveyed area of the 2nd row the 2nd row.
Those skilled in the art should know, and the dividing mode described in upper table and the numbering of surveyed area are all in order fully to implement the present embodiment, the not restriction to the present embodiment, and other apparent variations are also within the protection domain of the present embodiment.
In described step S2, the variance data of the surveyed area of more same numbering in two frame image datas of front and back can adopt existing method, and in the present embodiment, described step S2 specifically comprises:
S21: surveyed area described in each is divided into multiple macro blocks;
S22: according to the macro block of same position in each macro block and former frame view data, whether there are differences to judge this macro block be motion or static;
S23: described in each in surveyed area, if the number of macroblocks of motion is while exceeding setting threshold, this surveyed area is motion, otherwise this surveyed area is static.The numerical value of described setting threshold can be one or more, and the precision that the setting of its concrete numerical value can need according to actual retrieval is determined, relatively flexible.
The storage means of a kind of video file described in the present embodiment, is first divided into multiple surveyed areas by a frame image data, determines successively the motion state of surveyed area described in each, and by the processing of encoding of its motion state.Owing to being the surveyed area that a frame image data is divided into fixed qty, the problem that does not exist some region not to be detected, determine respectively the motion state of each macro block in each surveyed area simultaneously, as long as when the amount of movement of macro block exceedes the quantity of setting threshold, this surveyed area is the accuracy that so can guarantee according to actual needs follow-up video file retrieval completely of motion.
Further, described step S3 specifically comprises:
The coding of all surveyed areas in each frame image data is gathered, form the coding of the exercise data of each two field picture, wherein the coding of exercise data comprises several bytes, and each in each byte is the motion state of the surveyed area of corresponding a coding all.
The present embodiment adopts continuous data field to represent the coding of the exercise data of each two field picture, and each data bit wherein represents the motion state of some surveyed areas, can stipulate 1 representative campaign herein, and 0 represents staticly, and vice versa.The byte number at place and the bit number at place can be with reference to following formula in the coding of exercise data for the surveyed area of the capable y of x row.
The byte number at surveyed area place is:
byte(x,y)=[Area(x,y)/8](0≤x<m,0≤y<n),
Wherein " [] " represents round numbers.
The bit number at surveyed area place is:
bit(x,y)=7-Area(x,y)%8(0≤x<m,0≤y<n)。
Wherein " Area (x, y) %8 " represents that Area (x, y) is divided by 8 remainder.
Such as, during the surveyed area being listed as at 22 row 18 is divided, coordinate is (15,17) surveyed area, be x=15, y=17, Area(15,17) value is 389, byte (15,17) is 48, bit (15,17) be 2, the 2nd of 48th byte of this surveyed area in the coding of exercise data.
In addition, for the convenience on realizing, each frame image data can be fixed as to 50 bytes, because each byte comprises 8, have 400, therefore can be for representing the motion state of 400 surveyed areas.The motion state data in the detected region, front m × n position in 400 take (during surveyed area motion, being 1, is 0 when static), and all the other positions directly fill out 0.But those skilled in the art should know; the setting of the byte of coded system herein and the exercise data of each two field picture and be all that other all apparent protections are all within the protection domain of the present embodiment in order to absolutely prove technical scheme described in the present embodiment unrestricted.
In described step S22: when in each macro block and former frame view data, the macro block of same position there are differences data, variance data and activation threshold value are compared, when described variance data is greater than described activation threshold value, this macro block is motion, otherwise this macro block is static.
The storage means of a kind of video file described in the present embodiment, accurately determines the motion state of surveyed area described in each by setting setting threshold and activation threshold value, and by the processing of encoding of its motion state.Described setting threshold and activation threshold value can be according to actual needs differently adjust accordingly, there is greatly dirigibility.
The quantity of described surveyed area is no more than 400.Described in each, macro block preferably includes 16 × 16 pixels.Because each surveyed area all can corresponding a certain amount of data, the surveyed area that a frame image data is divided is more, and data volume will be larger, and because each surveyed area area is less, later retrieval accuracy can part promote; Otherwise data volume can diminish, recognition accuracy meeting part declines, but has reduced accordingly partial arithmetic amount.Through lot of experiment validation, in the quantity setting of described surveyed area, be no more than 400, described in each, macro block comprises that 16 × 16 pixels can obtain good technique effect.
embodiment 2
The present embodiment is the search method that is based upon a kind of video file on embodiment 1 basis, is mainly the retrieval that the video file stored for the storage means of the video file described in embodiment 1 carries out, and as shown in Figure 3, comprises the steps:
ST1: coding and the time of obtaining exercise data associated with each frame image data in described video file;
ST2: obtain regional code, it has identical byte number with the coding of described exercise data, and in each byte in regional code each all the surveyed area of corresponding a numbering whether be the zone state of being concerned about region;
ST3: position coupling successively corresponding to surveyed area of utilizing same numbering in the coding of regional code in step ST2 and the exercise data in step ST1, the motion state of the surveyed area that obtains same numbering in each frame image data, and obtain corresponding time of surveyed area place frame image data that motion state changes as run duration point;
ST4: obtain run duration list, described run duration list records all with described regional code in zone state be the run duration point of the surveyed area in care region.
In described step ST2, in the coding of described regional code and described exercise data, the surveyed area of the corresponding same numbering of identical bits in the byte of same position.
The present embodiment can form and be concerned about region according to the selected region of user, can set 0 representative " non-care region " herein, 1 representative " care region ", and vice versa.This sentences 0 representative " non-care region ", 1 representative " care region ", and 0 representative " static " in the exercise data of described each two field picture, 1 representative " motion " is example, the figure place of supposing the exercise data of described each two field picture is 50 bytes, and the data bits of described numbered list is also 50 bytes.Then utilize the position corresponding to surveyed area of same numbering in the coding of regional code in step ST2 and the exercise data in step ST1 to carry out logic and operation, non-zero if result becomes from 0, can be as the motion initial time of being concerned about region; Otherwise result becomes 0 from non-zero, can stop the moment as the motion of being concerned about region.
The search method of a kind of video file described in the present embodiment, user can specify care region to carry out the retrieval of video file, because video file has added the exercise data that represents its motion state in cataloged procedure, the whole video file therefore can not decode, promote to a certain extent the retrieval rate of video file, under the prerequisite of accuracy that guarantees retrieval, realized the quick-searching to video file.Without image is carried out to intellectual analysis, also, just without disposing intelligent network camera or introducing special intellectual analysis equipment, reduced accordingly use cost simultaneously.
In the retrieving that carries out video file, can carry out the retrieval of whole frame image data, also can select care region and retrieve.As shown in Figure 4, user has selected four surveyed areas such as (1,1), (2,1), (1,2), (2,2), and now, as long as wherein having a surveyed area is motion state, " motion " occurred in whole interval; Otherwise, be " static " state.The actual user demand that the mode that this selected care region is retrieved is close to the users very much, such as there is object loss office position, only needs selected this region to retrieve for being concerned about region.Even People are hurrying to and fro in other region, frequent activity, also can not produce any impact to result for retrieval.
The search method of a kind of video file described in the present embodiment, both be applicable to the retrieval of the whole frame image data based on exercise data, also be applicable to the retrieval in the care region of any appointment based on exercise data, and the quantity in the care region of described any appointment can be one or more.And be that user more needs more often than not for the retrieval in the care region of any appointment based on exercise data, the user's that fitted user demand, specific aim and dirigibility while greatly having improved user search video file.
embodiment 3
The memory storage of a kind of video file described in the present embodiment, as shown in Figure 5, comprising:
Piecemeal module, for a frame image data is divided into multiple surveyed areas, for each surveyed area is set numbering;
State determination module, for the variance data that exists more afterwards with the surveyed area of the identical numbering of front N frame image data according to each surveyed area, determine the motion state of surveyed area described in each, motion state to each surveyed area is encoded, wherein N >=1;
Coding module, for encoding to the exercise data of each two field picture according to the coding of each surveyed area;
Association store module, for obtaining video file storage after the coding of the exercise data of each two field picture and time associated with this frame image data.
First the present embodiment is divided into multiple surveyed areas by a frame image data, and its dividing mode can be set in conjunction with actual needs, and the relation that need to consider data volume and recognition accuracy is relatively flexible.Table 2 has provided the different demarcation mode of surveyed area under different resolution.
Table 2
Resolution title Resolution Surveyed area size Surveyed area quantity
QXGA 2048x1536 128x64 16x24=384
1080P 1920x1080 96x64 20x17=340
720P 1280x720 64x48 20x15=300
4CIF 704x576 32x32 22x18=396
VGA 640x480 32x32 20x15=300
CIF 352x288 16x16 22x18=396
According to above-mentioned either type or other modes, dividing after surveyed area, can further to surveyed area, be numbered after can determining the size and number of surveyed area.Establishing surveyed area quantity is herein m × n, can number line by line, numbers and also can select other coding rules by column when surveyed area is numbered.This sentences and is numbered line by line example, and number consecutively is 0,1,2 line by line ..., m × n-1.As shown in Figure 2, being numbered of the surveyed area that the capable x of y is listed as:
Area(x,y)=y×m+x(0≤x<m,0≤y<n);
As the 2 × m+2 that is numbered of the surveyed area of the 2nd row the 2nd row.
Those skilled in the art should know, and the dividing mode described in upper table and the numbering of surveyed area are all in order fully to implement the present embodiment, the not restriction to the present embodiment, and other apparent variations are also within the protection domain of the present embodiment.
In described state determination module, the variance data of the surveyed area of more same numbering in two frame image datas of front and back can adopt existing method, and in the present embodiment, described state determination module specifically comprises:
Macroblock partitions unit, for being divided into multiple macro blocks by surveyed area described in each;
Whether macro block motion state determining unit is that move or static for what there are differences to judge this macro block according to the macro block of each macro block and former frame view data same position;
Surveyed area motion state determining unit, in surveyed area described in each, if the number of macroblocks of motion is while exceeding setting threshold, this surveyed area is motion, otherwise this surveyed area is static.The numerical value of described setting threshold can be one or more, and the precision that the setting of its concrete numerical value can need according to actual retrieval is determined, relatively flexible.
The memory storage of a kind of video file described in the present embodiment, is first divided into multiple surveyed areas by a frame image data, determines successively the motion state of surveyed area described in each, and by the processing of encoding of its motion state.Owing to being the surveyed area that a frame image data is divided into fixed qty, the problem that does not exist some region not to be detected, determine respectively the motion state of each macro block in each surveyed area simultaneously, as long as when the amount of movement of macro block exceedes the quantity of setting threshold, this surveyed area is the accuracy that so can guarantee according to actual needs follow-up video file retrieval completely of motion.
Further, described coding module specifically comprises:
Gather unit, for the coding of all surveyed areas of each frame image data is gathered;
Coding unit, is used to form the coding of the exercise data of each two field picture, and wherein the coding of exercise data comprises several bytes, and each in each byte is the motion state of the surveyed area of corresponding a coding all.
The present embodiment adopts continuous data field to represent the coding of the exercise data of each two field picture, and each data bit wherein represents the motion state of some surveyed areas, can stipulate 1 representative campaign herein, and 0 represents staticly, and vice versa.The byte number at place and the bit number at place can be with reference to following formula in the coding of exercise data for the surveyed area of the capable y of x row.
The byte number at surveyed area place is:
byte(x,y)=[Area(x,y)/8](0≤x<m,0≤y<n),
Wherein " [] " represents round numbers.
The bit number at surveyed area place is:
bit(x,y)=7-Area(x,y)%8(0≤x<m,0≤y<n)。
Wherein " Area (x, y) %8 " represents that Area (x, y) is divided by 8 remainder.
Such as, during the surveyed area being listed as at 22 row 18 is divided, coordinate is (15,17) surveyed area, be x=15, y=17, Area(15,17) value is 389, byte (15,17) is 48, bit (15,17) be 2, the 2nd of 48th byte of this surveyed area in the coding of exercise data.
In addition, for the convenience on realizing, each frame image data can be fixed as to 50 bytes, because each byte comprises 8, have 400, therefore can be for representing the motion state of 400 surveyed areas.The motion state data in the detected region, front m × n position in 400 take (during surveyed area motion, being 1, is 0 when static), and all the other positions directly fill out 0.But those skilled in the art should know; the setting of the byte of coded system herein and the exercise data of each two field picture and be all that other all apparent protections are all within the protection domain of the present embodiment in order to absolutely prove technical scheme described in the present embodiment unrestricted.
In in described macro block motion state determining unit, store activation threshold value, when in each macro block and former frame view data, the macro block of same position there are differences data, variance data and described activation threshold value are compared, when described variance data is greater than described activation threshold value, this macro block is motion, otherwise this macro block is static.
The memory storage of a kind of video file described in the present embodiment, accurately determines the motion state of surveyed area described in each by setting setting threshold and activation threshold value, and by the processing of encoding of its motion state.Described setting threshold and activation threshold value can be according to actual needs differently adjust accordingly, there is greatly dirigibility.
The quantity of described surveyed area is no more than 400.Described in each, macro block preferably includes 16 × 16 pixels.Because each surveyed area all can corresponding a certain amount of data, the surveyed area that a frame image data is divided is more, and data volume will be larger, and because each surveyed area area is less, later retrieval accuracy can part promote; Otherwise data volume can diminish, recognition accuracy meeting part declines, but has reduced accordingly partial arithmetic amount.Through lot of experiment validation, in the quantity setting of described surveyed area, be no more than 400, described in each, macro block comprises that 16 × 16 pixels can obtain good technique effect.
embodiment 4
The present embodiment is the indexing unit that is based upon a kind of video file on embodiment 3 bases, is mainly the retrieval that the video file stored for the memory storage of the video file described in embodiment 3 carries out, and as shown in Figure 6, comprising:
Motion capture module, for obtaining coding and the time of the described video file exercise data associated with each frame image data;
Regional code acquisition module, for obtaining regional code, it has identical byte number with the coding of described exercise data, and in each byte in regional code each all the surveyed area of corresponding a numbering whether be the zone state of being concerned about region;
Matching module, mate successively position corresponding to surveyed area for the same numbering of coding of utilizing the exercise data that regional code that described regional code acquisition module obtains obtains with described motion capture module, the motion state of the surveyed area that obtains same numbering in each frame image data, and obtain corresponding time of surveyed area place frame image data that motion state changes as run duration point;
Run duration acquisition module, for obtaining run duration list, in all and described regional code of described run duration list records, zone state is the run duration point of being concerned about the surveyed area in region.
In described regional code acquisition module, in the coding of described regional code and described exercise data, the surveyed area of the corresponding same numbering of identical bits in the byte of same position.
The present embodiment can form and be concerned about region according to the selected region of user, can set 0 representative " non-care region " herein, 1 representative " care region ", and vice versa.This sentences 0 representative " non-care region ", 1 representative " care region ", and 0 representative " static " in the exercise data of described each two field picture, 1 representative " motion " is example, the figure place of supposing the exercise data of described each two field picture is 50 bytes, and the data bits of described numbered list is also 50 bytes.Then utilize the position corresponding to surveyed area of same numbering in the coding of the exercise data that regional code that described regional code acquisition module obtains obtains with described motion capture module to carry out logic and operation, if it is non-zero that result becomes from 0, can be as the motion initial time of being concerned about region; Otherwise result becomes 0 from non-zero, can stop the moment as the motion of being concerned about region.
The indexing unit of a kind of video file described in the present embodiment, user can specify care region to carry out the retrieval of video file, because video file has added the exercise data that represents its motion state in cataloged procedure, the whole video file therefore can not decode, promote to a certain extent the retrieval rate of video file, under the prerequisite of accuracy that guarantees retrieval, realized the quick-searching to video file.Without image is carried out to intellectual analysis, also, just without disposing intelligent network camera or introducing special intellectual analysis equipment, reduced accordingly use cost simultaneously.
In the retrieving that carries out video file, can carry out the retrieval of whole frame image data, also can select care region and retrieve.As shown in Figure 4, user has selected four surveyed areas such as (1,1), (2,1), (1,2), (2,2), and now, as long as wherein having a surveyed area is motion state, " motion " occurred in whole interval; Otherwise, be " static " state.The actual user demand that the mode that this selected care region is retrieved is close to the users very much, such as there is object loss office position, only needs selected this region to retrieve for being concerned about region.Even People are hurrying to and fro in other region, frequent activity, also can not produce any impact to result for retrieval.
The indexing unit of a kind of video file described in the present embodiment, both be applicable to the retrieval of the whole frame image data based on exercise data, also be applicable to the retrieval in the care region of any appointment based on exercise data, and the quantity in the care region of described any appointment can be one or more.And be that user more needs more often than not for the retrieval in the care region of any appointment based on exercise data, the user's that fitted user demand, specific aim and dirigibility while greatly having improved user search video file.
Obviously, above-described embodiment is only for example is clearly described, and the not restriction to embodiment.For those of ordinary skill in the field, can also make other changes in different forms on the basis of the above description.Here without also giving exhaustive to all embodiments.And the apparent variation of being extended out thus or variation are still among the protection domain in the invention.

Claims (16)

1. a storage means for video file, is characterized in that, for each frame image data in video recording picture, proceeds as follows:
S1 a: frame image data is divided into multiple surveyed areas, for each surveyed area is set numbering;
S2: the variance data existing more afterwards with the surveyed area of identical numbering in front N frame image data according to each surveyed area is determined the motion state of surveyed area described in each, the motion state of each surveyed area is encoded, wherein N >=1;
S3: the exercise data of each two field picture is encoded according to the coding of each surveyed area;
S4: will obtain video file storage after the coding of the exercise data of each two field picture and time associated with this frame image data.
2. the storage means of video file according to claim 1, is characterized in that, described step S2 specifically comprises:
S21: surveyed area described in each is divided into multiple macro blocks;
S22: according to the macro block of same position in each macro block and former frame view data, whether there are differences to judge this macro block be motion or static;
S23: described in each in surveyed area, if the number of macroblocks of motion is while exceeding setting threshold, this surveyed area is motion, otherwise this surveyed area is static.
3. the storage means of video file according to claim 1 and 2, is characterized in that, described step S3 specifically comprises:
The coding of all surveyed areas in each frame image data is gathered, form the coding of the exercise data of each two field picture; Wherein the coding of exercise data comprises several bytes, and each in each byte is the motion state of the surveyed area of corresponding a coding all.
4. according to the storage means of the video file described in claim 2 or 3, it is characterized in that:
In described step S22: when in each macro block and former frame view data, the macro block of same position there are differences data, variance data and activation threshold value are compared, when described variance data is greater than described activation threshold value, this macro block is motion, otherwise this macro block is static.
5. according to the storage means of the arbitrary described video file of claim 1-4, it is characterized in that:
The quantity of described surveyed area is no more than 400.
6. according to the storage means of the arbitrary described video file of claim 1-5, it is characterized in that:
Described in each, macro block comprises 16 × 16 pixels.
7. a search method for video file, retrieves the video file of storing according to the storage means of the arbitrary described video file of claim 1-6, it is characterized in that, comprises the steps:
ST1: coding and the time of obtaining exercise data associated with each frame image data in described video file;
ST2: obtain regional code, it has identical byte number with the coding of described exercise data, and in each byte in regional code each all the surveyed area of corresponding a numbering whether be the zone state of being concerned about region;
ST3: position coupling successively corresponding to surveyed area of utilizing same numbering in the coding of regional code in step ST2 and the exercise data in step ST1, the motion state of the surveyed area that obtains same numbering in each frame image data, and obtain corresponding time of surveyed area place frame image data that motion state changes as run duration point;
ST4: obtain run duration list, described run duration list records all with described regional code in zone state be the run duration point of the surveyed area in care region.
8. the search method of video file according to claim 7, is characterized in that: in described step ST2, and in the coding of described regional code and described exercise data, the surveyed area of the corresponding same numbering of identical bits in the byte of same position.
9. a memory storage for video file, is characterized in that, comprising:
Piecemeal module, for a frame image data is divided into multiple surveyed areas, for each surveyed area is set numbering;
State determination module, for the variance data that exists more afterwards with the surveyed area of the identical numbering of front N frame image data according to each surveyed area, determine the motion state of surveyed area described in each, motion state to each surveyed area is encoded, wherein N >=1;
Coding module, for encoding to the exercise data of each two field picture according to the coding of each surveyed area;
Association store module, for obtaining video file storage after the coding of the exercise data of each two field picture and time associated with this frame image data.
10. the memory storage of video file according to claim 9, is characterized in that, described state determination module specifically comprises:
Macroblock partitions unit, for being divided into multiple macro blocks by surveyed area described in each;
Whether macro block motion state determining unit is that move or static for what there are differences to judge this macro block according to the macro block of each macro block and former frame view data same position;
Surveyed area motion state determining unit, in surveyed area described in each, if the number of macroblocks of motion is while exceeding setting threshold, this surveyed area is motion, otherwise this surveyed area is static.
11. according to the memory storage of the video file described in claim 9 or 10, it is characterized in that, described coding module specifically comprises:
Gather unit, for the coding of all surveyed areas of each frame image data is gathered;
Coding unit, is used to form the coding of the exercise data of each two field picture, and wherein the coding of exercise data comprises several bytes, and each in each byte is the motion state of the surveyed area of corresponding a coding all.
12. according to the memory storage of the video file described in claim 10 or 11, it is characterized in that:
In in described macro block motion state determining unit, store activation threshold value, when in each macro block and former frame view data, the macro block of same position there are differences data, variance data and described activation threshold value are compared, when described variance data is greater than described activation threshold value, this macro block is motion, otherwise this macro block is static.
13. according to the memory storage of the arbitrary described video file of claim 9-12, it is characterized in that:
The quantity of described surveyed area is no more than 400.
14. according to the memory storage of the arbitrary described video file of claim 9-13, it is characterized in that:
Described in each, macro block comprises 16 × 16 pixels.
The indexing unit of 15. 1 kinds of video files, retrieves the video file of storing according to the memory storage of the arbitrary described video file of claim 9-14, it is characterized in that, comprising:
Motion capture module, for obtaining coding and the time of the described video file exercise data associated with each frame image data;
Regional code acquisition module, for obtaining regional code, it has identical byte number with the coding of described exercise data, and in each byte in regional code each all the surveyed area of corresponding a numbering whether be the zone state of being concerned about region;
Matching module, mate successively position corresponding to surveyed area for the same numbering of coding of utilizing the exercise data that regional code that described regional code acquisition module obtains obtains with described motion capture module, the motion state of the surveyed area that obtains same numbering in each frame image data, and obtain corresponding time of surveyed area place frame image data that motion state changes as run duration point;
Run duration acquisition module, for obtaining run duration list, in all and described regional code of described run duration list records, zone state is the run duration point of being concerned about the surveyed area in region.
The indexing unit of 16. video files according to claim 15, is characterized in that: in described regional code acquisition module, and in the coding of described regional code and described exercise data, the surveyed area of the corresponding same numbering of identical bits in the byte of same position.
CN201410029663.6A 2014-01-22 2014-01-22 Video file storage-retrieval method and video file storage-retrieval device Pending CN103744993A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410029663.6A CN103744993A (en) 2014-01-22 2014-01-22 Video file storage-retrieval method and video file storage-retrieval device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410029663.6A CN103744993A (en) 2014-01-22 2014-01-22 Video file storage-retrieval method and video file storage-retrieval device

Publications (1)

Publication Number Publication Date
CN103744993A true CN103744993A (en) 2014-04-23

Family

ID=50502011

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410029663.6A Pending CN103744993A (en) 2014-01-22 2014-01-22 Video file storage-retrieval method and video file storage-retrieval device

Country Status (1)

Country Link
CN (1) CN103744993A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105573921A (en) * 2014-10-15 2016-05-11 中兴通讯股份有限公司 File storage method and device
CN107483860A (en) * 2014-12-10 2017-12-15 陈国栋 Suitable for improving the storage of safety monitoring video and the back method of efficiency of solving a case
CN110134807A (en) * 2019-05-17 2019-08-16 苏州科达科技股份有限公司 Target retrieval method, apparatus, system and storage medium
CN110896497A (en) * 2019-10-30 2020-03-20 厦门天锐科技股份有限公司 Image processing method, video playing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5532833A (en) * 1992-10-13 1996-07-02 International Business Machines Corporation Method and system for displaying selected portions of a motion video image
US6996185B2 (en) * 2001-02-22 2006-02-07 Seiko Epson Corporation Image signal decoding apparatus
CN101389029A (en) * 2008-10-21 2009-03-18 北京中星微电子有限公司 Method and apparatus for video image encoding and retrieval
CN103092842A (en) * 2011-10-28 2013-05-08 浙江大华技术股份有限公司 Method for storing and retrieving key area information in video image data file

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5532833A (en) * 1992-10-13 1996-07-02 International Business Machines Corporation Method and system for displaying selected portions of a motion video image
US6996185B2 (en) * 2001-02-22 2006-02-07 Seiko Epson Corporation Image signal decoding apparatus
CN101389029A (en) * 2008-10-21 2009-03-18 北京中星微电子有限公司 Method and apparatus for video image encoding and retrieval
CN103092842A (en) * 2011-10-28 2013-05-08 浙江大华技术股份有限公司 Method for storing and retrieving key area information in video image data file

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105573921A (en) * 2014-10-15 2016-05-11 中兴通讯股份有限公司 File storage method and device
CN107483860A (en) * 2014-12-10 2017-12-15 陈国栋 Suitable for improving the storage of safety monitoring video and the back method of efficiency of solving a case
CN107483860B (en) * 2014-12-10 2020-12-22 四川蜀天信息技术有限公司 Security monitoring video storage and playback method suitable for improving case solving efficiency
CN110134807A (en) * 2019-05-17 2019-08-16 苏州科达科技股份有限公司 Target retrieval method, apparatus, system and storage medium
CN110896497A (en) * 2019-10-30 2020-03-20 厦门天锐科技股份有限公司 Image processing method, video playing method and device

Similar Documents

Publication Publication Date Title
CA2936217C (en) Storage management of data streamed from a video source device
US8705932B2 (en) Method and system for displaying a timeline
CN103744993A (en) Video file storage-retrieval method and video file storage-retrieval device
CN107547941B (en) Method, device and system for storing media data
CN102037718A (en) Method and apparatus for masking signal loss
CN101631237A (en) Video monitoring data storing and managing system
CN102789804B (en) Video broadcasting method, player, monitor supervision platform and audio/video player system
CN103826109A (en) Video monitoring image data processing method and system
CN105847984A (en) Video recommending method and apparatus
US10033930B2 (en) Method of reducing a video file size for surveillance
CN104935888A (en) Video monitoring method capable of marking object and video monitoring system thereof
CN104954718A (en) Mobile intelligent terminal and image recording method thereof
CN103761194B (en) A kind of EMS memory management process and device
US9183446B2 (en) Image processing apparatus and image processing method
CN106385562B (en) A kind of video abstraction generating method, device and video monitoring system
CN109194965B (en) Processing method, processing device, display method and display device
CN107734278B (en) Video playback method and related device
CN101303701B (en) Method and apparatus for searching video
CN103702118A (en) Image processing method and equipment
CN111447451A (en) Image coding and decoding method and device
CN104202595B (en) Video playback performance test methods and device
CN105141963A (en) Image motion estimation method and device
CN111372071B (en) Method and device for collecting video image abnormal information
CN104320675B (en) Radio and television monitoring system and method
CN203951585U (en) A kind of supervising device based on two-way interactive Set Top Box

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: 20140423