[go: up one dir, main page]

CN105992010A - Binary foreground compression coding method - Google Patents

Binary foreground compression coding method Download PDF

Info

Publication number
CN105992010A
CN105992010A CN201510078496.9A CN201510078496A CN105992010A CN 105992010 A CN105992010 A CN 105992010A CN 201510078496 A CN201510078496 A CN 201510078496A CN 105992010 A CN105992010 A CN 105992010A
Authority
CN
China
Prior art keywords
foreground
origin coordinates
end coordinate
value
pixel
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.)
Granted
Application number
CN201510078496.9A
Other languages
Chinese (zh)
Other versions
CN105992010B (en
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.)
Zhongxing Technology Co Ltd
Vimicro Corp
Original Assignee
Vimicro Corp
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 Vimicro Corp filed Critical Vimicro Corp
Priority to CN201510078496.9A priority Critical patent/CN105992010B/en
Publication of CN105992010A publication Critical patent/CN105992010A/en
Application granted granted Critical
Publication of CN105992010B publication Critical patent/CN105992010B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The embodiment of the invention provides a binary foreground compression coding method, so as to solve the problem that the existing binary foreground image coding stream needs to occupy a large bandwidth. The binary foreground compression coding method comprises steps: foreground pixel sections in the binary foreground image are marked; start coordinates and end coordinates of each foreground pixel section are recorded; and the start coordinates and the end coordinates of each foreground pixel section are coded.

Description

A kind of two-value prospect compaction coding method
Technical field
The present invention relates to video image processing technology, particularly to a kind of two-value prospect compaction coding method.
Technical background
Along with the high speed development of science and technology, the performance of processor obtains fast lifting, more and more Video monitoring system adds Intellectual Analysis Technology.Some intelligent analysis systems can be by video image Data calculate in real time, the prospect in separate picture and background, obtain continuous print two-value foreground image (its In each pixel represent with a bit, " 0 " represents background, and " 1 " represents prospect). This two-value foreground image can intactly comprise shape and the positional information of foreground object, has therefore obtained wide General application.Some distributed intelligence system (DIS) also can be after obtaining two-value foreground image from front monitoring front-end, by it Sent to receiving terminal by network.Receiving terminal carries out after-treatment after obtaining foreground information again, develops rich Rich intelligent use function.
But, although this two-value foreground image is less than the data volume of original video, if but at coding During without effective compression, transmitting procedure still can take bigger bandwidth.
Summary of the invention
In view of this, embodiments provide a kind of two-value prospect compaction coding method, solve existing Some two-value foreground image encoding code streams need to take the problem of large bandwidth.
In order to achieve the above object, a kind of two-value prospect compaction coding method bag that the embodiment of the present invention provides Include:
Foreground pixel section in labelling two-value foreground image;
Record origin coordinates and the end coordinate of each described foreground pixel section;
The origin coordinates of each described foreground pixel section is encoded with end coordinate.
One embodiment of the invention additionally provides the coding/decoding method of a kind of two-value prospect compaction coding method, including:
Compressed encoding code stream is decoded obtaining origin coordinates and the end coordinate of each foreground pixel section;
In the value of all pixels is all the image of 0, by the initial seat of each described foreground pixel section Pixel value between mark and end coordinate is revised as 1.
The embodiment of the present invention provides a kind of two-value prospect compaction coding method, only to labeled foreground pixel The origin coordinates of section encodes with end coordinate, before so utilizing in two-value foreground image when decoding Scape pixel value is all the principle of 1, it is only necessary to by the origin coordinates of foreground pixel section in one 0 value image And the coordinate between end coordinate is entered as 1 can fast restore two-value foreground image.This compares existing skill The method directly two-value foreground image encoded in art, the data volume of the compressed encoding code stream formed It is greatly reduced, bigger bandwidth will not be taken during transmission.
Accompanying drawing explanation
Fig. 1 is the flow process signal of a kind of two-value prospect compaction coding method that one embodiment of the invention provides Figure.
Fig. 2 show the origin coordinates of one foreground pixel section of record that one embodiment of the invention is provided Schematic flow sheet with end coordinate.
What Fig. 3 showed that one embodiment of the invention provided is compressed a two-value foreground image compiling The schematic flow sheet of code.
Fig. 4 show that one embodiment of the invention provided by the origin coordinates/knot of a foreground pixel section Bundle coordinate carries out the schematic flow sheet encoded.
Fig. 5 show the solution of a kind of two-value prospect compaction coding method that one embodiment of the invention is provided Code method flow schematic diagram.
Fig. 6 show the solution of a kind of two-value prospect compaction coding method that one embodiment of the invention is provided Code method flow schematic diagram.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out Clearly and completely describe, it is clear that described embodiment is only a part of embodiment of the present invention, and It is not all, of embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art are not doing Go out the every other embodiment obtained under creative work premise, broadly fall into the scope of protection of the invention.
Fig. 1 is the schematic flow sheet of a kind of two-value prospect compaction coding method that the embodiment of the present invention provides. As it is shown in figure 1, the method comprises the steps:
Step 101: the foreground pixel section in labelling two-value foreground image.Concretely, by two-value foreground picture In the one-row pixels of picture pixel value be continuously 1 pixel be labeled as a foreground pixel section of current line.When one Row pixel has multiple pixel value be continuously 1 pixel fragment time, then this row pixel contains multiple prospect picture Element section.
In an embodiment of the present invention, often the foreground pixel section in row pixel is marked in order.That is, The labelling of each foreground pixel section can uniquely represent that this foreground pixel section is in current line all foreground pixels section Serial number.
Step 102: record origin coordinates and the end coordinate of each described foreground pixel section.
Detailed process can be: travels through the pixel value of each pixel in described two-value foreground image by row;If finding Pixel value is the pixel of 1, then using pixel coordinate that this pixel value is 1 as a foreground pixel section Origin coordinates;During the pixel finding pixel value to be 0 the most again, upper by pixel that this pixel value is 0 One pixel coordinate is as the end coordinate of current foreground pixel section, and continues to look for next pixel value and be The pixel of 1;Or, when then traveling through the edge pixel point to current line, by the edge pixel point of current line Coordinate is as the end coordinate of current foreground pixel section, and to continue to look for next pixel value be the pixel of 1.
Fig. 2 show origin coordinates and the knot of one foreground pixel section of record that one embodiment of the invention is provided The schematic flow sheet of bundle coordinate.As in figure 2 it is shown, this recording process includes:
S201: be 0 by line order i initial assignment;Owing to this recording process is for by row traversal two-value foreground image In each element, therefore need record current line numbering in all row with line order i;
S202: make N (i)=0, k=0, j=0;N (i) therein represents the foreground pixel section comprised in the i-th row Quantity, k represents the marker number of foreground pixel section in current line, and j represents and currently travels through picture in current line The numbering of element;Owing to the most not yet starting the ergodic process of current line, therefore three above parameter is initially composed Value is 0;
S203:j increases by 1, until the some P finding pixel value to be 1, or arrive the edge of current i-th row;
S204: judge j whether < W-1;W represents the width of two-value foreground picture, owing to the initial value of j is 0, As j < W-1, explanation not yet travels through the edge to current line, i.e. means have found one of current i-th row The starting point of foreground pixel section, now enters S205;As j=W-1, then show to travel through the edge to current line The foreground pixel the most not finding pixel value to be 1, illustrates that current line does not comprise foreground pixel section, now enters Enter S209;
S205: by origin coordinates S (i, k) .kl that the coordinate record of P is a foreground pixel section;
S206:j increases, and during until the some P ' finding pixel value to be 0, is sat by a upper pixel of P ' Mark is recorded as end coordinate S (i, k) .kr of current foreground pixel section;Or, until the edge of current i-th row is all During the point P ' not finding pixel value to be 0, before the edge pixel point coordinates of current i-th row being recorded as currently End coordinate S (i, k) .kr of scape pixel fragment;
S207: (i, k) (i, k) .kr, ought for .kl and end coordinate S for the origin coordinates S of storage foreground pixel section Foreground pixel hop count amount N (i) of front i-th row adds 1, and marker number k of foreground pixel section adds 1;
S208: judge j whether < W-1;The most then illustrate not arrive yet the edge of current i-th row, now Return S203 and look for starting point P of next foreground pixel section;If it is not, then illustrate to have arrived current i-th row Edge, enters S209;
S209:i increases by 1;
S210: < the H that whether judges i;H is the maximum number of lines of current two-value foreground image;The most then illustrate The most treated i-th-1 row is not last column of two-value foreground image, now return S202 start right The traversal of pixel in current i-th row;If it is not, then the pixel of all row has been the most time in explanation two-value foreground image Go through, terminated flow process.
Step 103: the origin coordinates of each described foreground pixel section is encoded with end coordinate.
What Fig. 3 showed that one embodiment of the invention provided is compressed coding to a two-value foreground image Schematic flow sheet.As it is shown on figure 3, this cataloged procedure is carried out by row scan sequence, and current line is encoded Journey can be with the origin coordinates of foreground pixel section in lastrow and end coordinate as reference;That is, lastrow can conduct The reference line of current line.This coding flow process specifically includes:
S301: the line number Lstart that the first foreground pixel section of calculating two-value foreground image is expert at is with last The line number Lend that one foreground pixel section is expert at, and Lstart and Lend is enrolled code stream, can use Columbus without symbol index encodes;
S302: be Lstart by line number i initial assignment;
S303: quantity N (i) of the foreground pixel section comprised in current i-th row is enrolled code stream;
S304: judge whether the N (i) of current i-th row is 0;The most then illustrate current i-th row does not wrap Containing foreground pixel section, now enter S310;If it is not, then enter S305;
S305: the foreground pixel segment mark of current i-th row is numbered and is initially 0;
S306: calculate copy_flag, and copy_flag is enrolled code stream;Detailed process is, it is judged that current Whether the origin coordinates of the foreground pixel section of the i-th numbered k of line flag and end coordinate number also with reference line Origin coordinates for the foreground pixel section of k is identical with the abscissa of end coordinate;If it is identical, then by copy_flag Being entered as 1 and enroll code stream, so can directly be numbered by lastrow when decoding is also the foreground pixel section of k Origin coordinates and the abscissa of end coordinate be copied to current line;If differing, then by copy_flag assignment It is 0 and enrolls code stream;
S307: judge whether copy_flag is 0;If then entering step 308;If being otherwise directly entered step Rapid 309;
S308: by the origin coordinates S of the foreground pixel section of the current i-th numbered k of line flag (i, k) .kl and (i, k) .kr enrolls code stream to end coordinate S;
S309:k increases by 1;
S310: judge that whether current k is less than N (i);If being less than, then before explanation marker number is k-1 Scape pixel fragment is not last foreground pixel section of current i-th row, now returns S306 and judges current the The copy_flag of k foreground pixel section;If being equal to, then explanation marker number is that the foreground pixel section of k-1 is Last foreground pixel section, now enters S311;
S311: the origin coordinates of reference line and coordinate logarithm N (ref) of end coordinate are entered as current Foreground pixel hop count amount N (i) of i row, by origin coordinates and the coordinate of end coordinate of reference line foreground pixel section Value Ref is entered as origin coordinates and the coordinate figure of end coordinate of current i-th row all foreground pixels section;This Sample current line can be used as reference line during next line pixel coder;
S312:i increases by 1;
S313: whether judge i≤Lend;The most then illustrate not yet to encode to last foreground pixel section It is expert at, now returns step 304 and judge whether the N (i) of current i-th row is 0;If it is not, then illustrate to have compiled Code to last foreground pixel section is expert at, and terminates flow process.
In an embodiment of the present invention, for origin coordinates and the coding of end coordinate of current foreground pixel section Can be particularly as follows: with reference to the end coordinate of a foreground pixel section on current line, current foreground pixel section be risen Beginning coordinate and end coordinate carry out lateral prediction coding.This lateral prediction cataloged procedure can use without symbol index Columbus's coded system.
The detailed process of this lateral prediction coding can be: before current foreground pixel section origin coordinates and upper one The abscissa difference of scape pixel fragment end coordinate is as starting point lateral prediction difference;By described starting point lateral prediction Difference enrolls code stream to represent the origin coordinates of current foreground pixel section;And/or, by current foreground pixel section It is current to represent that end coordinate and the abscissa difference of origin coordinates enroll code stream as end lateral prediction difference The end coordinate of foreground pixel section.More than coding flow process can use without symbol index Columbus's coded system.
In an alternative embodiment of the invention, for origin coordinates and the volume of end coordinate of current foreground pixel section Code may further be embodied as: with reference to origin coordinates and the end coordinate of lastrow all foreground pixels section, before current The origin coordinates of scape pixel fragment and end coordinate carry out longitudinal predictive coding.
This longitudinal direction predictive coding process can be: by the initial seat of foreground pixel section that current line marker number is k Abscissa difference between the origin coordinates/end coordinate of mark/end coordinate and lastrow all foreground pixels section On origin coordinates/end coordinate as longitudinal prediction residual and corresponding with described longitudinal prediction residual is relative One line number is also the coordinate offset value of the origin coordinates/end coordinate of the foreground pixel section of k;By described longitudinal direction Longitudinal prediction residual and coordinate offset value that the absolute value sum of prediction residual and coordinate offset value is minimum enroll code Stream is with the origin coordinates/end coordinate representing current foreground pixel section.More than coding flow process can use symbol to refer to Number Columbus's coded system.
In an alternative embodiment of the invention, the coding for a two-value foreground image can use above-mentioned horizontal stroke simultaneously To predictive coding and longitudinal predictive coding.But due to lateral prediction coding only need by starting point lateral prediction difference and/ Or the size terminating lateral prediction difference enrolls code stream, and need not use signed coded system, So can occupy less data volume in concrete cataloged procedure;Thus more incline in actual cataloged procedure To in using lateral prediction coded method.
Now, can be by judging the minima and of the absolute value sum of longitudinal prediction residual and coordinate offset value Individual constant and whether less than starting point lateral prediction difference and/or terminate lateral prediction difference determines which uses Plant predictive coding method.And if should being worth less than starting point lateral prediction difference and/or terminating lateral prediction difference, then Illustrate that the data volume of the required coding of longitudinal predictive coding is less than lateral prediction coding, now use longitudinally prediction Coding.Otherwise, then lateral prediction coded method origin coordinates/end coordinate to current foreground pixel section is used Encode.
It will be understood by those skilled in the art that the constant for trying to achieve this and value can be Any Digit, user This constant can be adjusted accordingly according to the priority of lateral prediction to be used coding.This constant is the biggest, then mean More possible employing lateral prediction codings, this constant is the least, the most more possible employing longitudinal direction predictive codings.This Invent the size to this constant not limit.
In an alternative embodiment of the invention, a longitudinal discrimination mark can also be introduced to record current foreground pixel Origin coordinates/the end coordinate of section have employed lateral prediction coding or longitudinal predictive coding.When using laterally During predictive coding, this longitudinal direction discrimination mark is entered as 0, and this discrimination mark is enrolled code stream;Vertical when using When predictive coding, this longitudinal direction discrimination mark is entered as 1, and this discrimination mark is enrolled code stream.
What Fig. 4 showed that one embodiment of the invention provided sits the origin coordinates of a foreground pixel section/end Mark carries out the schematic flow sheet encoded.As shown in Figure 4, this is the foreground pixel of k to current line marker number The flow process that the origin coordinates/end coordinate of section carries out encoding includes:
S401: be 0 by the coordinate numbering m initial assignment of reference line, by longitudinal direction prediction residual and coordinate offset The minima min_cost initial assignment of the absolute value sum of value is a maximum integer;Due in reference line May include N (ref) to origin coordinates and end coordinate, therefore 0≤m≤2*N (ref);
S402: calculate the horizontal seat of current foreground pixel section origin coordinates and a upper foreground pixel section end coordinate Mark difference is as starting point lateral prediction difference e 0;Or, calculate the end coordinate of current foreground pixel section with initial The abscissa difference of coordinate is as terminating lateral prediction difference e 0;
S403: calculate origin coordinates/end coordinate and the reference line m-th coordinate of current foreground pixel section Abscissa difference is as longitudinal prediction residual e1 (m), and rise corresponding with described longitudinal prediction residual e1 (m) Beginning coordinate/end coordinate is also the origin coordinates/end coordinate of the foreground pixel section of k relative to lastrow numbering (here, V (m)=2k-m when for encoding origin coordinates, when for end coordinate for coordinate offset value V (m) V (m)=2k+1-m during coding);Try to achieve longitudinal decision value cost=| e1 (m) |+| V (m) |;
S404: judge that whether decision value cost is less than current min_cost;If being less than, then enter S405; If being more than or equal to, then it is directly entered S406, and does not store the value of current m;
S405: the value recording current m with M, makes min_cost=cost;
S406:m increases by 1;
S407: judge that whether m is less than 2*N (ref);If being less than, then explanation also has the foreground pixel of reference line Origin coordinates/the end coordinate of section is not yet referenced calculating, now returns S403 referring initially under reference line Origin coordinates/the end coordinate of one foreground pixel section carries out calculating cost;If being more than or equal to, then reference is described Row all foreground pixel Duan Douyi with reference to complete, the now longitudinal direction corresponding to pixel of the numbered M of reference line The absolute value sum of prediction residual and coordinate offset value is minimum, enters S408;
S408: min_e1 is entered as e1 (M), is entered as V (M) by min_V;Min_e1 is the most pre- Surveying longitudinal prediction residual that the absolute value sum of residual sum coordinate offset value is minimum, min_V is and min_e1 Corresponding coordinate offset value;Min_cost=| min_e1 |+| min_V | now;
S409: judge that whether min_cost+3 is less than e0;If less than, the longitudinal discrimination mark of order Coding_flag=1, enrolls code stream to represent current foreground pixel by coding_flag, min_e1 and min_V Origin coordinates/the end coordinate of section, flow process terminates;If being more than or equal to, then make coding_flag=0, will Coding_flag and e0 enrolls code stream to represent the origin coordinates/end coordinate of current foreground pixel section, flow process Terminate.
The compressed encoding code stream that the two-value prospect compaction coding method provided for above example is formed, One embodiment of the invention additionally provides a kind of coding/decoding method.
Fig. 5 show the decoding side of a kind of two-value prospect compaction coding method that one embodiment of the invention is provided Method schematic flow sheet.As it is shown in figure 5, this coding/decoding method includes:
Step 501: compressed encoding code stream is decoded obtaining origin coordinates and the knot of each foreground pixel section Bundle coordinate.Owing to compressed encoding code stream containing origin coordinates and the end coordinate of each foreground pixel section, This compressed encoding code stream decoding can be obtained these origin coordinates and end coordinate.
Step 502: in the value of all pixels is all the image of 0, by each described foreground pixel Pixel value between origin coordinates and the end coordinate of section is revised as 1.Obtaining all foreground pixel sections After origin coordinates and end coordinate, owing in each foreground pixel section, the pixel value of all pixels should be 1, Therefore only the pixel value between origin coordinates and the end coordinate of each described foreground pixel section need to be revised as 1 Two-value foreground image originally can be gone out by fast restore.
In an embodiment of the present invention, it has been also possible that longitudinal judgement due to compressed encoding code stream when coding Labelling, now can resolve the discrimination mark in compressed encoding code stream;It is the prospect of 1 for longitudinal discrimination mark Data segment, obtains lastrow prospect number referenced when encoding according to the coordinate offset value in compressed encoding code stream Origin coordinates/end coordinate according to section;Longitudinal prediction residual in compressed encoding code stream is referenced with during coding Lastrow foreground data section origin coordinates/end coordinate and initial seat as current foreground pixel section Mark/end coordinate;For the foreground data section that longitudinal discrimination mark is 0, according to rising in compressed encoding code stream Point lateral prediction difference/end lateral prediction difference obtains the origin coordinates/longitudinal coordinate of current foreground pixel section.
In an embodiment of the present invention, owing to compressed encoding code stream has been also possible that copy labelling when coding, Now resolve the copy labelling in compressed encoding code stream;Copy is labeled as the foreground data of the numbered k of 1 The origin coordinates of section and the abscissa value of end coordinate are entered as the foreground data section that lastrow numbering is also k Origin coordinates and the abscissa value of end coordinate.
Fig. 6 show the decoding side of a kind of two-value prospect compaction coding method that one embodiment of the invention is provided Method schematic flow sheet.As shown in Figure 6, the method includes:
S601: resolve Lstart and Lend in encoding code stream, make decoded row numbering i=Lstart;
S602: resolve foreground pixel hop count amount N (i) that in encoding code stream, the row of line number i is comprised;
S603: judge that whether N (i) is equal to 0;If it is not, then enter S604;The most then explanation current line is not There is foreground pixel section, enter S615;
S604: be 0 by the foreground pixel segment mark numbering k initial assignment of the row that current number is i;
S605: resolve the copy_flag of the foreground pixel section of marker number k in the row that current number is i;
S606: judge whether this copy_flag is 1;The most then enter S607;If it is not, then enter S608;
S607: (i, during k) .kl is entered as reference line, marker number is also the initial seat of the foreground pixel section of k by S Mark Ref [2*k], by S, (i, during k) .kr is entered as reference line, marker number is also the end of the foreground pixel section of k Coordinate Ref [2*k+1], enters S612;
S608: resolve the origin coordinates of the foreground pixel section of marker number k in the row that current number is i coding_flag;
S609: judge the origin coordinates of the foreground pixel section of marker number k in the row that current number is i Whether coding_flag is 0;The most then illustrate that the origin coordinates of this foreground pixel section uses lateral prediction to compile Code, now resolves lateral prediction difference c0 in encoding code stream, obtains current foreground pixel section according to c0 Origin coordinates S (i, k) .kl;If it is not, then illustrate that the origin coordinates of this foreground pixel section is to use longitudinally prediction to compile Code, now resolves coordinate offset value min_L and min_c1, and obtains when encoding according to this min_L referenced The origin coordinates of lastrow foreground data section;By longitudinal prediction residual min_c1 in compressed encoding code stream With during coding the origin coordinates of referenced lastrow foreground data section and rising as current foreground pixel section Beginning coordinate S (i, k) .kl;
S610: resolve the end coordinate of the foreground pixel section of marker number k in the row that current number is i coding_flag;
S611: judge the end coordinate of the foreground pixel section of marker number k in the row that current number is i Whether coding_flag is 0;The most then illustrate that the end coordinate of this foreground pixel section uses lateral prediction to compile Code, now resolves lateral prediction difference d0 in encoding code stream, obtains current foreground pixel section according to d0 End coordinate S (i, k) .kr;If it is not, then illustrate that the end coordinate of this foreground pixel section is to use longitudinally prediction to compile Code, now resolves coordinate offset value min_R and min_d1, and is joined when obtaining coding according to this min_R The end coordinate of the lastrow foreground data section examined;By longitudinal prediction residual min_d1 in compressed encoding code stream With during coding the end coordinate of referenced lastrow foreground data section and knot as current foreground pixel section Bundle coordinate S (i, k) .kr;
S612:k increases by 1;
S613: judge that whether k is less than N (i);The most then explanation current line there is also the prospect not being decoded Pixel fragment, now returns and judges whether the copy_flag of next foreground pixel section is 1;If it is not, then illustrate Current line all of foreground pixel section is all decoded complete, enters S614;
S614: the origin coordinates of reference line and coordinate logarithm N (ref) of end coordinate are entered as current Foreground pixel hop count amount N (i) of i row, by origin coordinates and the coordinate of end coordinate of reference line foreground pixel section Value Ref is entered as origin coordinates and the coordinate figure of end coordinate of current i-th row all foreground pixels section;
S615:i increases by 1;
S616: whether judge i≤Lend;The most then illustrate that the i-th-1 the most decoded row is not last Individual foreground pixel section is expert at, and now returns S602 and starts to be decoded current i-th row;If it is not, then say Bright all provisional capitals have been decoded complete, terminate flow process.
The embodiment of the present invention provides a kind of two-value prospect compaction coding method, only to labeled foreground pixel The origin coordinates of section encodes with end coordinate, before so utilizing in two-value foreground image when decoding Scape pixel value is all the principle of 1, it is only necessary to by the origin coordinates of foreground pixel section in one 0 value image And the coordinate between end coordinate is entered as 1 can fast restore two-value foreground image.This compares existing skill The method directly two-value foreground image encoded in art, the data volume of the compressed encoding code stream formed It is greatly reduced, bigger bandwidth will not be taken during transmission.
These are only presently preferred embodiments of the present invention, not in order to limit the present invention, all in the present invention Spirit and principle within, any amendment of being made, equivalent etc., should be included in the guarantor of the present invention Within the scope of protecting.

Claims (13)

1. a two-value prospect compaction coding method, it is characterised in that including:
Foreground pixel section in labelling two-value foreground image;
Record origin coordinates and the end coordinate of each described foreground pixel section;
The origin coordinates of each described foreground pixel section is encoded with end coordinate.
Method the most according to claim 1, it is characterised in that the prospect in labelling two-value foreground image Pixel fragment includes:
The pixel that pixel value in the one-row pixels of two-value foreground image is 1 continuously is labeled as one of current line Foreground pixel section.
Method the most according to claim 1 and 2, it is characterised in that record each described foreground pixel The origin coordinates of section includes with end coordinate:
The pixel value of each pixel in described two-value foreground image is traveled through by row;
If the pixel finding pixel value to be 1, then using pixel coordinate that this pixel value is 1 as before one The origin coordinates of scape pixel fragment;
During the pixel finding pixel value to be 0 the most again, by a upper picture of pixel that this pixel value is 0 Vegetarian refreshments coordinate is as the end coordinate of current foreground pixel section, and to continue to look for next pixel value be the picture of 1 Vegetarian refreshments;Or, when then traveling through the edge pixel point to current line, the edge pixel point coordinates of current line is made For the end coordinate of current foreground pixel section, and to continue to look for next pixel value be the pixel of 1.
Method the most according to claim 1, it is characterised in that rising each described foreground pixel section Beginning coordinate and end coordinate carry out coding and include:
With reference to the end coordinate of a foreground pixel section, the origin coordinates to current foreground pixel section on current line Lateral prediction coding is carried out with end coordinate;Or,
With reference to origin coordinates and the end coordinate of lastrow all foreground pixels section, to current foreground pixel section Origin coordinates and end coordinate carry out longitudinal predictive coding.
Method the most according to claim 4, it is characterised in that described lateral prediction coding includes:
The abscissa difference of current foreground pixel section origin coordinates with a upper foreground pixel section end coordinate is made For starting point lateral prediction difference;Described starting point lateral prediction difference is enrolled code stream to represent current foreground pixel The origin coordinates of section;
And/or, the end coordinate of current foreground pixel section is horizontal as terminating with the abscissa difference of origin coordinates Code stream is enrolled to represent the end coordinate of current foreground pixel section to prediction difference.
6. according to the method described in claim 4 or 5, it is characterised in that described longitudinal predictive coding includes:
Before all with lastrow for the origin coordinates/end coordinate of the foreground pixel section that current line marker number is k Abscissa difference between the origin coordinates/end coordinate of scape pixel fragment as longitudinal prediction residual, and with institute State origin coordinates/end coordinate corresponding to longitudinal prediction residual relative to lastrow numbering also for the foreground pixel section of k The coordinate offset value of origin coordinates/end coordinate;
The longitudinal prediction residual minimum by the absolute value sum of described longitudinal prediction residual and coordinate offset value and seat Mark deviant enrolls code stream to represent the origin coordinates/end coordinate of current foreground pixel section.
Method the most according to claim 6, it is characterised in that rising each described foreground pixel section Beginning coordinate and end coordinate carry out coding and farther include:
Judge minima and a constant of the absolute value sum of described longitudinal prediction residual and coordinate offset value Whether less than described lateral prediction difference;
If judged result is for being less than, then the longitudinal discrimination mark being entered as 1 is enrolled code stream, and use longitudinal direction Predictive coding;If judged result is for being more than or equal to, then the longitudinal discrimination mark being entered as 0 is enrolled code stream, And use lateral prediction to encode.
Method the most according to claim 7, it is characterised in that described constant is 3.
Method the most according to claim 4, it is characterised in that described lateral prediction coding uses without symbol Number exp-Golomb coding mode;And/or,
Described longitudinal predictive coding uses symbol index Columbus's coded system.
10. according to the method described in claim 4 or 7, it is characterised in that by each described foreground pixel The origin coordinates of section carries out coding with end coordinate and farther includes:
Judge that whether the origin coordinates of the foreground pixel section that current line marker number is k and end coordinate are with upper one Line number is also that the origin coordinates of the foreground pixel section of k is identical with the abscissa of end coordinate;
If judged result is identical, then the copy labelling being entered as 1 by enrolls code stream to represent current prospect The origin coordinates of pixel fragment and end coordinate.
The coding/decoding method of 11. 1 kinds of two-value prospect compaction coding methods, it is characterised in that
Compressed encoding code stream is decoded obtaining origin coordinates and the end coordinate of each foreground pixel section;
In the value of all pixels is all the image of 0, by the initial seat of each described foreground pixel section Pixel value between mark and end coordinate is revised as 1.
12. coding/decoding methods according to claim 11, it is characterised in that compressed encoding code stream is carried out Decoding obtains the origin coordinates of each foreground pixel section and farther includes with end coordinate:
Resolve the longitudinal discrimination mark in compressed encoding code stream;
For the foreground data section that longitudinal discrimination mark is 1, according to the coordinate offset value in compressed encoding code stream Obtain the origin coordinates/end coordinate of lastrow foreground data section referenced during coding;By compressed encoding code stream In longitudinal prediction residual and the origin coordinates/end coordinate of referenced lastrow foreground data section during coding And origin coordinates/end coordinate as current foreground pixel section;
For the foreground data section that longitudinal discrimination mark is 0, the most pre-according to the starting point in compressed encoding code stream Error of measurement value/end lateral prediction difference obtains the origin coordinates/longitudinal coordinate of current foreground pixel section.
13. according to the coding/decoding method described in claim 11 or 12, it is characterised in that to compressed encoding code Stream is decoded obtaining the origin coordinates of each foreground pixel section and includes with end coordinate:
Resolve the copy labelling in compressed encoding code stream;
Copy is labeled as the origin coordinates of the foreground data section of the numbered k of 1 and the abscissa of end coordinate Value is entered as lastrow and numbers the origin coordinates of the foreground data section being also k and the abscissa value of end coordinate.
CN201510078496.9A 2015-02-13 2015-02-13 Binary foreground compression coding method Active CN105992010B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510078496.9A CN105992010B (en) 2015-02-13 2015-02-13 Binary foreground compression coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510078496.9A CN105992010B (en) 2015-02-13 2015-02-13 Binary foreground compression coding method

Publications (2)

Publication Number Publication Date
CN105992010A true CN105992010A (en) 2016-10-05
CN105992010B CN105992010B (en) 2020-02-18

Family

ID=57041288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510078496.9A Active CN105992010B (en) 2015-02-13 2015-02-13 Binary foreground compression coding method

Country Status (1)

Country Link
CN (1) CN105992010B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113204527A (en) * 2021-05-28 2021-08-03 苏州大学 Slice compression method based on forming area pixel coordinate mark
CN113409922A (en) * 2021-08-19 2021-09-17 浙江太美医疗科技股份有限公司 Image processing method and device, and image storage method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101064903A (en) * 2006-04-25 2007-10-31 华为技术有限公司 Communication system resource distribution indicated method, base station and user equipment
US20070257939A1 (en) * 2004-06-14 2007-11-08 Xerox Corporation Method for image segmentation based on block clustering for improved processing of touching characters
CN102006473A (en) * 2010-11-18 2011-04-06 无锡中星微电子有限公司 Video encoder and encoding method, and video decoder and decoding method
CN102291583A (en) * 2011-09-29 2011-12-21 中航华东光电有限公司 Image coding device and image coding method thereof
CN103475882A (en) * 2013-09-13 2013-12-25 北京大学 Surveillance video encoding and recognizing method and surveillance video encoding and recognizing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070257939A1 (en) * 2004-06-14 2007-11-08 Xerox Corporation Method for image segmentation based on block clustering for improved processing of touching characters
CN101064903A (en) * 2006-04-25 2007-10-31 华为技术有限公司 Communication system resource distribution indicated method, base station and user equipment
CN102006473A (en) * 2010-11-18 2011-04-06 无锡中星微电子有限公司 Video encoder and encoding method, and video decoder and decoding method
CN102291583A (en) * 2011-09-29 2011-12-21 中航华东光电有限公司 Image coding device and image coding method thereof
CN103475882A (en) * 2013-09-13 2013-12-25 北京大学 Surveillance video encoding and recognizing method and surveillance video encoding and recognizing system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113204527A (en) * 2021-05-28 2021-08-03 苏州大学 Slice compression method based on forming area pixel coordinate mark
WO2022247085A1 (en) * 2021-05-28 2022-12-01 苏州大学 Slice compression method based on marking of pixel coordinates of molding region
CN113409922A (en) * 2021-08-19 2021-09-17 浙江太美医疗科技股份有限公司 Image processing method and device, and image storage method and device

Also Published As

Publication number Publication date
CN105992010B (en) 2020-02-18

Similar Documents

Publication Publication Date Title
CN1130919C (en) Apparatus for encoding contour of regions contained in video signal
CN101478672B (en) Video encoding, decoding method and apparatus, video processing system
RU2722389C2 (en) Image encoding method and device and image decoding method and device
CN102075760B (en) Quick movement estimation method and device
EP4161075A1 (en) Method for reconstructing a current block of an image and corresponding encoding method, corresponding devices as well as storage medium carrying an image encoded in a bit stream
CN110809161A (en) Motion information candidate list construction method and device
CN1208313A (en) Method and apparatus for encoding motion vector
CN1133329C (en) Method and apparatus for encoding contour of object based on contour motion estimation technique
CN112633149A (en) Domain-adaptive foggy-day image target detection method and device
CN102611881B (en) Method and module for obtaining reference motion vector, encoding and decoding device
CN112257659A (en) Detection tracking method, apparatus and medium
CN1147156C (en) Method and apparatus for adaptively coding contour of object
CN105992010A (en) Binary foreground compression coding method
US11909999B2 (en) Coding management method and apparatus based on high efficiency video coding
CN1159922C (en) Method for encoding binary shape signal
CN107481222B (en) Rapid eye and lip video positioning method and system based on skin color detection
CN1151678C (en) Method and apparatus for encoding contour image of object in video signal
EP0806742A1 (en) Adaptive contour coding
CN113784147B (en) Efficient video coding method and system based on convolutional neural network
CN1146248C (en) Method and apparatus for coding contour of object employing temporal correlation thereof
US20030202584A1 (en) Partition coding method and device
CN103841405A (en) Encoding and decoding method of depth image and encoding and decoding device
CN110796003B (en) Lane line detection method and device and electronic equipment
JPH10198792A (en) Pattern matching coding method and coding device therefor
CN1150489C (en) Method and apparatus for coding multiple contours within frame

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20171207

Address after: 519000 Guangdong city of Zhuhai province Hengqin Baohua Road No. 6, room 105, -23898 (central office)

Applicant after: Zhongxing Technology Co., Ltd.

Applicant after: Vimicro Electronics Co., Ltd.

Address before: 100083 Haidian District, Xueyuan Road, No. 35, the world building, the second floor of the building on the ground floor, No. 16

Applicant before: Beijing Vimicro Corporation

Applicant before: Vimicro Electronics Co., Ltd.

CB02 Change of applicant information
CB02 Change of applicant information

Address after: 519031 Guangdong city of Zhuhai province Hengqin Baohua Road No. 6, room 105, -23898 (central office)

Applicant after: Mid Star Technology Limited by Share Ltd

Applicant after: Vimicro Electronics Co., Ltd.

Address before: 519000 Guangdong city of Zhuhai province Hengqin Baohua Road No. 6, room 105, -23898 (central office)

Applicant before: Zhongxing Technology Co., Ltd.

Applicant before: Vimicro Electronics Co., Ltd.

GR01 Patent grant
GR01 Patent grant