CN108634935A - The method, apparatus and equipment of signal base line drift correction - Google Patents

The method, apparatus and equipment of signal base line drift correction Download PDF

Info

Publication number
CN108634935A
CN108634935A CN201810438245.0A CN201810438245A CN108634935A CN 108634935 A CN108634935 A CN 108634935A CN 201810438245 A CN201810438245 A CN 201810438245A CN 108634935 A CN108634935 A CN 108634935A
Authority
CN
China
Prior art keywords
sampled value
window
value
median
sampled
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
CN201810438245.0A
Other languages
Chinese (zh)
Other versions
CN108634935B (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.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
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 Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201810438245.0A priority Critical patent/CN108634935B/en
Publication of CN108634935A publication Critical patent/CN108634935A/en
Application granted granted Critical
Publication of CN108634935B publication Critical patent/CN108634935B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7225Details of analog processing, e.g. isolation amplifier, gain or sensitivity adjustment, filtering, baseline or drift compensation
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Physics & Mathematics (AREA)
  • Animal Behavior & Ethology (AREA)
  • Pathology (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physiology (AREA)
  • Psychiatry (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a kind of methods of signal base line drift correction, filter window is divided to the child window for predetermined number in advance, each child window preserves the sampled value in non-cross numberical range, therefore, when being inserted into sampled value, can corresponding child window first be determined according to the numberical range where the sampled value being inserted into, then which is inserted into the predeterminated position of the child window.It can be seen that, this method can first determine child window according to the size for the sampled value being inserted into, then the sampled value is inserted into predeterminated position, avoid compared with carrying out sampled value largely with each sampled value in filter window, the complexity for greatly reducing algorithm, saves the time.The present invention also provides a kind of device of signal base line drift correction, equipment and a kind of computer readable storage medium, effect is corresponding with the effect of the above method.

Description

The method, apparatus and equipment of signal base line drift correction
Technical field
The present invention relates to computer realm, more particularly to a kind of signal base line drift correction method, apparatus, equipment and one Kind computer readable storage medium.
Background technology
In the gatherer process of bioelectrical signals such as electrocardio, brain electricity and myoelectricity, since the zero of the activity of people, sensor is floated It the reasons such as moves, often there is low-frequency disturbance in collected signal, be presented as signal base line in the time-domain image of signal Drift.Moreover, because the frequency of the signals such as electrocardio, brain electricity is relatively low, baseline drift will generate serious shadow to collected data It rings, increases difficulty of the later stage to the analysis of signal.
By taking electrocardiosignal as an example, electrocardiogram is one of clinical most common inspection, and medical staff can be helped to diagnose the heart Not normal, myocardial ischemia, myocardial infarction and position are restrained, and judges the influence etc. of drug or electrolyte situation to heart.And electrocardio is believed Number frequency is low, and amplitude is only millivolt level, is highly prone to interfere and causes the deformation of electrocardiogram, distortion even signal saturation.Therefore, It is very necessary to the quick school of the baseline drift phenomenon in electrocardiosignal, there is important meaning to follow-up diagnosis.
Common method currently used for check baseline drift is median filtering method, this method by being sampled to signal, Obtain multiple sampled values by sampling sequencing arrangement, be then taken out the sampled value of predetermined number according to from small to large into Row arrangement, so that it is determined that the median in the sampled value of the predetermined number, is finally corrected sampled value using median.But It is that this method needs continuous insertion and deletes sampled value, especially during insertion, in order to ensure the sampling after being inserted into Value is still tactic according to from small to large, needs the sampled value that will be inserted into be compared with each sampled value, thus Calculation amount is larger, and algorithm comparison is complicated.For example, the method based on comparative sorting, algorithm complexity has been demonstrated to be not less than O (N*logN), operation is slower;And the method based on bucket sort, although arithmetic speed is faster than the method based on comparative sorting, It is when the numerical value of input data is uneven, algorithm complexity can degenerate to O (N*logN).
It is that urgently those skilled in the art solve as it can be seen that how to reduce the complexity of check baseline shifted signal method Problem.
Invention content
The object of the present invention is to provide a kind of method, apparatus of signal base line drift correction, equipment and a kind of computers Readable storage medium storing program for executing, to solve the problems, such as the method complexity of conventional correction baseline drift signal.
In order to solve the above technical problems, the present invention provides a kind of methods of signal base line drift correction, including:
Signal is sampled, multiple sampled values are obtained, the sampled value at the n-th moment is denoted as Sn
Filter window is pre-set, the filter window is divided into the child window of predetermined number, each child window Preserve the sampled value in non-cross numberical range, the sampled value that the child window is preserved according to the child window Numerical values recited is arranged, and the sampled value in the child window is arranged according to numerical values recited, and the filter window preserves N =2w+1 the sampled values, wherein w is the filter radius of the filter window;
According to sampled value SnThe numberical range at place determines corresponding child window, by sampled value SnIt is inserted into the child window Predeterminated position, and the sampling time is deleted in the filter window near preceding sampled value Sn-N
It determines and is inserted into sampled value SnThe median M of sampled value in the filter window latern
By the sampled value S at the n-th-w momentn-wWith median MnIt is poor to make, obtained difference correct after the n-th-w moment Signal sampling value.
Wherein, filter window is pre-set described, is divided into the child window of predetermined number in the filter window, respectively A child window preserves the sampled value in non-cross numberical range, and the child window is protected according to the child window The numerical values recited for the sampled value deposited is arranged, and the sampled value in the child window is arranged according to numerical values recited, the filter Wave window preserves the N=2w+1 sampled values, wherein after w is the filter radius of the filter window, and at described According to sampled value SnThe numberical range at place determines corresponding child window, by sampled value SnIt is inserted into the predeterminated position of the child window, and The sampling time is deleted in the filter window near preceding sampled value Sn-NBefore, including:
Initial value c is determined according to the value range of the sampled value, and N number of initial value c is inserted into the filter window.
Wherein, described according to sampled value SnThe numberical range at place determines corresponding child window, by sampled value SnDescribed in insertion The predeterminated position of child window, and the sampling time is deleted in the filter window near preceding sampled value Sn-NIncluding:
According to sampled value SnThe numberical range at place determines corresponding child window, by sampled value SnIt is inserted into the child window Predeterminated position;
Determine that the sampling time is near preceding sampled value S in the filter windown-NNumerical value;
According to the sampled value Sn-NNumerical value where numberical range determine corresponding child window;
Determine in the child window with the sampled value Sn-NThe equal sampled value of numerical value, and delete the sampled value.
Wherein, the determining insertion sampled value SnThe median M of sampled value in the filter window laternIncluding:
According to sampled value Sn, sampled value Sn-wWith median Mn-1Magnitude relationship, determine and be inserted into sampled value SnLater described The median M of sampled value in filter windownWith median Mn-1Position relationship, wherein median Mn-1For in sampled value SnIt is inserted into Before the filter window, the median of the sampled value in the filter window;
Obtain median Mn-1Location information, and according to the position relationship and the location information, determine median Mn
The present invention also provides a kind of devices of signal base line drift correction, including:
Sampling module:For being sampled to signal, multiple sampled values are obtained, the sampled value at the n-th moment is denoted as Sn
Filter window setup module:For pre-setting filter window, the filter window is divided into predetermined number Child window, each child window preserve the sampled value in non-cross numberical range, and the child window is according to this The numerical values recited for the sampled value that child window is preserved is arranged, and the sampled value in the child window is arranged according to numerical values recited Row, the filter window preserve the N=2w+1 sampled values, wherein w is the filter radius of the filter window;
Insert and delete module:For according to sampled value SnThe numberical range at place determines corresponding child window, by sampled value Sn It is inserted into the predeterminated position of the child window, and deletes in the filter window sampling time near preceding sampled value Sn-N
Median determining module:It is inserted into sampled value S for determiningnThe median of sampled value in the filter window later Mn
Correction module:For by the sampled value S at the n-th-w momentn-wWith median MnIt is poor to make, after obtained difference corrects The n-th-w moment signal sampling value.
Wherein, described device includes:
Filter window initialization module:For determining initial value c according to the value range of the sampled value, and will be N number of first Initial value c is inserted into the filter window.
Wherein, the insert and delete module includes:
It is inserted into unit:For according to sampled value SnThe numberical range at place determines corresponding child window, by sampled value SnIt is inserted into The predeterminated position of the child window;
Numerical value determination unit:For determining that the sampling time is near preceding sampled value S in the filter windown-NNumerical value;
Child window determination unit:For according to the sampled value Sn-NNumerical value where numberical range determine corresponding son Window;
Deleting unit:For determine in the child window with the sampled value Sn-NThe equal sampled value of numerical value, and delete The sampled value.
Wherein, the median determining module includes:
Position relationship determination unit:For according to sampled value Sn, sampled value Sn-wWith median Mn-1Magnitude relationship, determine It is inserted into sampled value SnThe median M of sampled value in the filter window laternWith median Mn-1Position relationship, wherein in Digit Mn-1For in sampled value SnIt is inserted into before the filter window, the median of the sampled value in the filter window;
Median determination unit:For obtaining median Mn-1Location information, and according to the position relationship and institute's rheme Confidence ceases, and determines median Mn
In addition, the present invention also provides a kind of equipment of signal base line drift correction, including:
Memory:For storing computer program;
Processor:For executing the computer program to realize a kind of side of signal base line drift correction as described above The step of method.
Finally, it the present invention also provides a kind of computer readable storage medium, is protected on the computer readable storage medium There is computer program, a kind of signal base line drift correction as described above is realized when the computer program is executed by processor Method the step of.
A kind of method of signal base line drift correction provided by the present invention in advance divides filter window for default Several child windows, each child window preserve the sampled value in non-cross numberical range, therefore, be inserted into sampled value when It waits, can corresponding child window first be determined according to the numberical range where the sampled value being inserted into, then be inserted into the sampled value The predeterminated position of the child window.As it can be seen that this method can first determine child window according to the size for the sampled value being inserted into, then should Sampled value is inserted into predeterminated position, avoids compared with carrying out sampled value largely with each sampled value in filter window, greatly The big complexity for reducing algorithm, saves the time.
The present invention also provides a kind of device of signal base line drift correction, equipment and a kind of computer-readable storage mediums Matter, effect is corresponding with the effect of the above method, and which is not described herein again.
Description of the drawings
It, below will be to embodiment or existing for the clearer technical solution for illustrating the embodiment of the present invention or the prior art Attached drawing is briefly described needed in technology description, it should be apparent that, the accompanying drawings in the following description is only this hair Some bright embodiments for those of ordinary skill in the art without creative efforts, can be with root Other attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of implementation flow chart of the embodiment of the method for signal base line drift correction provided by the invention;
Fig. 2 is comparison diagram before and after signal correction provided by the invention;
Fig. 3 is a kind of structure diagram of the device of signal base line drift correction provided by the invention.
Specific implementation mode
Core of the invention is to provide a kind of method, apparatus of signal base line drift correction, equipment and a kind of computer Readable storage medium storing program for executing effectively reduces the complexity of correction signal baseline drift.
In order to enable those skilled in the art to better understand the solution of the present invention, with reference to the accompanying drawings and detailed description The present invention is described in further detail.Obviously, described embodiments are only a part of the embodiments of the present invention, rather than Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise Lower obtained every other embodiment, shall fall within the protection scope of the present invention.
A kind of embodiment of the method for signal base line drift correction provided by the invention is introduced below, it is real referring to Fig. 1 Applying example one includes:
Step S110:Signal is sampled, multiple sampled values are obtained, the sampled value at the n-th moment is denoted as Sn
Specifically, the signal can be bioelectrical signals, such as electrocardiosignal.
Step S120:Filter window is pre-set, the filter window is divided into the child window of predetermined number, Ge Gesuo It states child window and preserves the sampled value in non-cross numberical range, the child window is preserved according to the child window The numerical values recited of sampled value is arranged, and the sampled value in the child window is arranged according to numerical values recited, the spectral window Mouth preserves the N=2w+1 sampled values, wherein w is the filter radius of the filter window.
Specifically, can first be initialized to filter window, determined just according to the value range of the sampled value first Then N number of initial value c is inserted into the filter window by initial value c.For example, when sampled value value range is 0-4095, it can be with Take initial value for (4095+1)/2, i.e., 2048.
It is worth noting that, child window preserves the sampled value in non-cross numberical range, numberical range here It can be the numerical value section being evenly dividing, or the numerical value section of non-homogeneous division.In the present embodiment, as a kind of more preferable Mode, it is assumed that the value range of sampled value is divided into seven numerical value sections, the sampled value in each numerical value section is saved in respectively Child window in, it is possible to by according to the number of the 4th numerical value section in tactic seven numerical value sections from small to large It is worth the smaller of range setting, to keep the sampled value on the 4th child window relatively smaller, generally occurs in view of median On the 4th child window, then when carrying out subsequent insertion or deleting, the step of carrying out some comparisons can be lacked, to It further reduced the calculation amount of the present embodiment.
It, can be to filter radius or sample frequency into pedestrian when calibration result is not ideal enough in addition, in the present embodiment Work adjusts.
Finally, the numerical values recited for the sampled value that child window is preserved according to the child window is arranged, adopting in child window Sample value is arranged according to numerical values recited, and size here can be descending, or ascending.However, it is desirable to Ensure a bit, i.e., child window and the putting in order for sampled value in child window are consistent.
Step S130:According to sampled value SnThe numberical range at place determines corresponding child window, by sampled value SnDescribed in insertion The predeterminated position of child window, and the sampling time is deleted in the filter window near preceding sampled value Sn-N
Specifically, predeterminated position here can be, in the sampled value sequence of the child window, it can ensure sampled value SnSampled value before is respectively less than sampled value SnPosition.
And the sampling time is deleted in the filter window near preceding sampled value Sn-NIt can be with specifically, first determining the filter The sampling time is near preceding sampled value S in wave windown-NNumerical value, then according to the sampled value Sn-NNumerical value where numerical value Range determines corresponding child window, finally determine the child window in the sampled value Sn-NThe equal sampled value of numerical value, and Delete the sampled value.
Step S140:It determines and is inserted into sampled value SnThe median M of sampled value in the filter window latern
In the present embodiment, insertion sampled value S has been pre-savednMedian M beforen-1Position data, therefore can be with According to median Mn-1With insertion sampled value SnMedian M laternBetween position relationship determine median.Specifically, can With elder generation according to sampled value Sn, sampled value Sn-wWith median Mn-1Magnitude relationship, determine and be inserted into sampled value SnThe filtering later The median M of sampled value in windownWith median Mn-1Position relationship, wherein median Mn-1For in sampled value SnDescribed in insertion Before filter window, the median of the sampled value in the filter window;Then, median M is obtainedn-1Location information, And according to the position relationship and the location information, determine median Mn
In child window according to being ranked sequentially from small to large, and the sampled value in child window is also according to sequence from small to large It is above-mentioned according to sampled value S when arrangementn, sampled value Sn-wWith median Mn-1Magnitude relationship, determine median MnWith median Mn-1 Position relationship, following five step can be specifically divided into:
(1) if the input signal sampled value S of the n-th-n-hourn-NLess than or equal to the median M obtained by last round of calculatingn-1, and Current signal sample value SnMore than the median M obtained by last round of calculatingn-1, then the median M of the wheeln-1For in filter window Mn-1The sampled value of the latter position of position;
(2) if the input signal sampled value S of the n-th-n-hourn-NMore than the median M obtained by last round of calculatingn-1, and it is current Signal sampling value SnLess than or equal to the median M obtained by last round of calculatingn-1, then the median M of the wheelnFor M in filter windown-1 The sampled value of the previous position of position;
(3) if the input signal sampled value S of the n-th-n-hourn-NWith the median M of last round of outputn-1It is equal, and current letter Number sampled value SnLess than the median M obtained by last round of calculatingn-1, then statistic sampling value is M in filter windown-1Sampled value Quantity, if value be Mn-1The quantity of sampled value be 1, then the median M of the wheelnFor M in filter windown-1Before position The sampled value of one position;
(4) if being all unsatisfactory for the situation in above three step, the median M of the wheelnEqual to Mn-1
(5) by the input signal sampled value S of the n-th-n-hourn-NIt deletes, i.e., is deleted from filter window from filter window One and Sn-NThe identical element of numerical value.
Step S150:By the sampled value S at the n-th-w momentn-wWith median MnIt is poor to make, obtained difference correct after the The signal sampling value at n-w moment.
After step S150, step S130, step S140 and step S150 can be repeated, is finally obtained corrected Sample sequence, corrected continuous signal then can be recovered according to the sample sequence after correction, as shown in Figure 2.
The method for quickly correcting arithmetic speed of baseline drift provided in this embodiment is very fast, and this method only needs Secondary comparison can be corrected I data, also be no more than I × (2N+3) secondary comparison in the worst cases.Meanwhile there is no frequencies The operations such as numerous plus-minus, traversal, cumulative, do not depend on the cooperation of hardware.In addition, the present embodiment only takes upA memory Unit will not occupy too many storage space even if selecting larger filter radius, and therefore, the resource that this method occupies is few, especially It is suitble to the use of embedded platform.
In conclusion a kind of method for signal base line drift correction that the present embodiment is provided, in advance draws filter window The child window of predetermined number has been divided into it, each child window preserves the sampled value in non-cross numberical range, therefore, is being inserted into When sampled value, can corresponding child window first be determined according to the numberical range where the sampled value being inserted into, then should Sampled value is inserted into the predeterminated position of the child window.As it can be seen that this method can first determine son according to the size for the sampled value being inserted into Window, then the sampled value is inserted into predeterminated position, it avoids and carries out each sampled value in sampled value and filter window greatly The comparison of amount greatly reduces the complexity of algorithm, saves the time.
The device of signal base line drift correction provided in an embodiment of the present invention is introduced below, signal described below The device of Base-Line Drift Correction can correspond reference with the method for above-described signal base line drift correction.
Referring to Fig. 3, which specifically includes:
Sampling module 310:For being sampled to signal, multiple sampled values are obtained, the sampled value at the n-th moment is denoted as Sn
Filter window setup module 320:For pre-setting filter window, the filter window is divided into predetermined number Child window, each child window preserves the sampled value in non-cross numberical range, the child window according to The numerical values recited for the sampled value that the child window is preserved is arranged, and the sampled value in the child window is carried out according to numerical values recited Arrangement, the filter window preserve the N=2w+1 sampled values, wherein w is the filter radius of the filter window.
Insert and delete module 330:For according to sampled value SnThe numberical range at place determines corresponding child window, will sample Value SnIt is inserted into the predeterminated position of the child window, and deletes in the filter window sampling time near preceding sampled value Sn-N
Median determining module 340:It is inserted into sampled value S for determiningnIn the filter window later in sampled value Digit Mn
Correction module 350:For by the sampled value S at the n-th-w momentn-wWith median MnIt is poor to make, and obtained difference corrects The signal sampling value at the n-th-w moment afterwards.
Wherein, described device includes:
Filter window initialization module:For determining initial value c according to the value range of the sampled value, and will be N number of first Initial value c is inserted into the filter window.
Wherein, the insert and delete module includes:
It is inserted into unit:For according to sampled value SnThe numberical range at place determines corresponding child window, by sampled value SnIt is inserted into The predeterminated position of the child window;
Numerical value determination unit:For determining that the sampling time is near preceding sampled value S in the filter windown-NNumerical value;
Child window determination unit:For according to the sampled value Sn-NNumerical value where numberical range determine corresponding son Window;
Deleting unit:For determine in the child window with the sampled value Sn-NThe equal sampled value of numerical value, and delete The sampled value.
Wherein, the median determining module includes:
Position relationship determination unit:For according to sampled value Sn, sampled value Sn-wWith median Mn-1Magnitude relationship, determine It is inserted into sampled value SnThe median M of sampled value in the filter window laternWith median Mn-1Position relationship, wherein in Digit Mn-1For in sampled value SnIt is inserted into before the filter window, the median of the sampled value in the filter window;
Median determination unit:For obtaining median Mn-1Location information, and according to the position relationship and institute's rheme Confidence ceases, and determines median Mn
The device of the signal base line drift correction of the present embodiment for realizing signal base line drift correction above-mentioned method, Therefore the embodiment part of the visible signal base line drift correction hereinbefore of specific implementation mode in the device, for example, adopting Egf block 310, filter window setup module 320, insert and delete module 330, median determining module 340 and correction module, It is respectively used to step S110, S120, S130, S140 and S105 in the method for realizing above-mentioned signal base line drift correction.So Its specific implementation mode is referred to the description of corresponding various pieces embodiment, herein not reinflated introduction.
In addition, since the device of the signal base line drift correction of the present embodiment is for realizing signal base line above-mentioned drift school Positive method, therefore its effect is corresponding with the effect of the above method, which is not described herein again.
In addition, the present invention also provides a kind of equipment of signal base line drift correction, including:
Memory:For storing computer program;
Processor:For executing the computer program to realize a kind of side of signal base line drift correction as described above The step of method.
Finally, it the present invention also provides a kind of computer readable storage medium, is protected on the computer readable storage medium There is computer program, a kind of signal base line drift correction as described above is realized when the computer program is executed by processor Method the step of.
Equipment due to a kind of signal base line drift correction provided by the invention and a kind of computer readable storage medium For realizing a kind of aforementioned signal base line drift correction method the step of, therefore, effect is floated with a kind of above-mentioned signal base line The effect of the method for shift correction is corresponding, here not reinflated introduction.
Each embodiment is described by the way of progressive in this specification, the highlights of each of the examples are with it is other The difference of embodiment, just to refer each other for same or similar part between each embodiment.For being filled disclosed in embodiment For setting, since it is corresponded to the methods disclosed in the examples, so description is fairly simple, related place is referring to method part Explanation.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These Function is implemented in hardware or software actually, depends on the specific application and design constraint of technical solution.Profession Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered Think beyond the scope of this invention.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology In any other form of storage medium well known in field.
It above can to a kind of method, apparatus, equipment and the computer of signal base line drift correction provided by the present invention Storage medium is read to be described in detail.Specific case used herein explains the principle of the present invention and embodiment It states, the explanation of above example is only intended to facilitate the understanding of the method and its core concept of the invention.It should be pointed out that for this skill For art field technology personnel, without departing from the principle of the present invention, can with several improvements and modifications are made to the present invention, These improvement and modification are also fallen within the protection scope of the claims of the present invention.

Claims (10)

1. a kind of method of signal base line drift correction, which is characterized in that including:
Signal is sampled, multiple sampled values are obtained, the sampled value at the n-th moment is denoted as Sn
Filter window is pre-set, the filter window is divided into the child window of predetermined number, and each child window preserves There are the sampled value in non-cross numberical range, the numerical value for the sampled value that the child window is preserved according to the child window Size is arranged, and the sampled value in the child window is arranged according to numerical values recited, and the filter window preserves N=2w + 1 sampled value, wherein w is the filter radius of the filter window;
According to sampled value SnThe numberical range at place determines corresponding child window, by sampled value SnIt is inserted into the default of the child window Position, and the sampling time is deleted in the filter window near preceding sampled value Sn-N
It determines and is inserted into sampled value SnThe median M of sampled value in the filter window latern
By the sampled value S at the n-th-w momentn-wWith median MnIt is poor to make, and the signal at the n-th-w moment after obtained difference corrects is adopted Sample value.
2. the method as described in claim 1, which is characterized in that filter window is pre-set described, in the filter window It is divided into the child window of predetermined number, each child window preserves the sampling in non-cross numberical range Value, the numerical values recited for the sampled value that the child window is preserved according to the child window are arranged, the sampling in the child window Value is arranged according to numerical values recited, and the filter window preserves the N=2w+1 sampled values, wherein w is the filtering After the filter radius of window, and described according to sampled value SnThe numberical range at place determines corresponding child window, will sample Value SnIt is inserted into the predeterminated position of the child window, and deletes in the filter window sampling time near preceding sampled value Sn-NIt Before, including:
Initial value c is determined according to the value range of the sampled value, and N number of initial value c is inserted into the filter window.
3. the method as described in claim 1, which is characterized in that described according to sampled value SnThe numberical range at place, which determines, to be corresponded to Child window, by sampled value SnBe inserted into the predeterminated position of the child window, and delete in the filter window sampling time near Preceding sampled value Sn-NIncluding:
According to sampled value SnThe numberical range at place determines corresponding child window, by sampled value SnIt is inserted into the default of the child window Position;
Determine that the sampling time is near preceding sampled value S in the filter windown-NNumerical value;
According to the sampled value Sn-NNumerical value where numberical range determine corresponding child window;
Determine in the child window with the sampled value Sn-NThe equal sampled value of numerical value, and delete the sampled value.
4. the method as described in claim 1-3 any one, which is characterized in that the determining insertion sampled value SnInstitute later State the median M of sampled value in filter windownIncluding:
According to sampled value Sn, sampled value Sn-wWith median Mn-1Magnitude relationship, determine and be inserted into sampled value SnThe filtering later The median M of sampled value in windownWith median Mn-1Position relationship, wherein median Mn-1For in sampled value SnDescribed in insertion Before filter window, the median of the sampled value in the filter window;
Obtain median Mn-1Location information, and according to the position relationship and the location information, determine median Mn
5. a kind of device of signal base line drift correction, which is characterized in that including:
Sampling module:For being sampled to signal, multiple sampled values are obtained, the sampled value at the n-th moment is denoted as Sn
Filter window setup module:For pre-setting filter window, the filter window is divided into the sub- window of predetermined number Mouthful, each child window preserves the sampled value in non-cross numberical range, and the child window is according to the sub- window The numerical values recited for the sampled value that mouth is preserved is arranged, and the sampled value in the child window is arranged according to numerical values recited, The filter window preserves the N=2w+1 sampled values, wherein w is the filter radius of the filter window;
Insert and delete module:For according to sampled value SnThe numberical range at place determines corresponding child window, by sampled value SnIt is inserted into The predeterminated position of the child window, and the sampling time is deleted in the filter window near preceding sampled value Sn-N
Median determining module:It is inserted into sampled value S for determiningnThe median M of sampled value in the filter window latern
Correction module:For by the sampled value S at the n-th-w momentn-wWith median MnMake it is poor, obtained difference correct after n-th- The signal sampling value at w moment.
6. device as claimed in claim 5, which is characterized in that described device includes:
Filter window initialization module:For determining initial value c according to the value range of the sampled value, and by N number of initial value c It is inserted into the filter window.
7. device as claimed in claim 5, which is characterized in that the insert and delete module includes:
It is inserted into unit:For according to sampled value SnThe numberical range at place determines corresponding child window, by sampled value SnDescribed in insertion The predeterminated position of child window;
Numerical value determination unit:For determining that the sampling time is near preceding sampled value S in the filter windown-NNumerical value;
Child window determination unit:For according to the sampled value Sn-NNumerical value where numberical range determine corresponding child window;
Deleting unit:For determine in the child window with the sampled value Sn-NThe equal sampled value of numerical value, and delete this and adopt Sample value.
8. the device as described in claim 5-7 any one, which is characterized in that the median determining module includes:
Position relationship determination unit:For according to sampled value Sn, sampled value Sn-wWith median Mn-1Magnitude relationship, determine be inserted into Sampled value SnThe median M of sampled value in the filter window laternWith median Mn-1Position relationship, wherein median Mn-1For in sampled value SnIt is inserted into before the filter window, the median of the sampled value in the filter window;
Median determination unit:For obtaining median Mn-1Location information, and believed according to the position relationship and the position Breath, determines median Mn
9. a kind of equipment of signal base line drift correction, which is characterized in that including:
Memory:For storing computer program;
Processor:For executing the computer program to realize a kind of signal base as described in claim 1-4 any one The step of method of line drift correction.
10. a kind of computer readable storage medium, which is characterized in that preserve computer on the computer readable storage medium Program realizes a kind of signal base line as described in claim 1-4 any one when the computer program is executed by processor The step of method of drift correction.
CN201810438245.0A 2018-05-09 2018-05-09 Method, device and equipment for correcting signal baseline drift Expired - Fee Related CN108634935B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810438245.0A CN108634935B (en) 2018-05-09 2018-05-09 Method, device and equipment for correcting signal baseline drift

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810438245.0A CN108634935B (en) 2018-05-09 2018-05-09 Method, device and equipment for correcting signal baseline drift

Publications (2)

Publication Number Publication Date
CN108634935A true CN108634935A (en) 2018-10-12
CN108634935B CN108634935B (en) 2021-07-13

Family

ID=63753852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810438245.0A Expired - Fee Related CN108634935B (en) 2018-05-09 2018-05-09 Method, device and equipment for correcting signal baseline drift

Country Status (1)

Country Link
CN (1) CN108634935B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110082586A (en) * 2019-04-19 2019-08-02 西门子电力自动化有限公司 The method and apparatus of the correction of electric system sampled data
CN111953318A (en) * 2020-06-28 2020-11-17 上海定九康科技股份有限公司 Median filtering method and device adaptive to pipeline architecture and filter
CN113899963A (en) * 2021-08-30 2022-01-07 科华数据股份有限公司 Alternating current system interference electricity detection method and device and terminal equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009008582A (en) * 2007-06-29 2009-01-15 Shimadzu Corp Chromatogram data processor
CN102386889A (en) * 2011-09-29 2012-03-21 深圳Tcl新技术有限公司 Baseline drift removal method and device and median filter
CN103793886A (en) * 2014-02-14 2014-05-14 山东工商学院 Image median filtering method based on incomplete rapid sorting algorithm
CN104217408A (en) * 2014-09-30 2014-12-17 成都市晶林科技有限公司 Method for filtering and denoising images of uncooled infrared focal plane detector

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009008582A (en) * 2007-06-29 2009-01-15 Shimadzu Corp Chromatogram data processor
CN102386889A (en) * 2011-09-29 2012-03-21 深圳Tcl新技术有限公司 Baseline drift removal method and device and median filter
CN103793886A (en) * 2014-02-14 2014-05-14 山东工商学院 Image median filtering method based on incomplete rapid sorting algorithm
CN104217408A (en) * 2014-09-30 2014-12-17 成都市晶林科技有限公司 Method for filtering and denoising images of uncooled infrared focal plane detector

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱冰莲 等: "一种中值滤波的快速算法", 《信号处理》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110082586A (en) * 2019-04-19 2019-08-02 西门子电力自动化有限公司 The method and apparatus of the correction of electric system sampled data
CN111953318A (en) * 2020-06-28 2020-11-17 上海定九康科技股份有限公司 Median filtering method and device adaptive to pipeline architecture and filter
CN111953318B (en) * 2020-06-28 2021-04-13 上海定九康科技股份有限公司 Median filtering method and device adaptive to pipeline architecture and filter
CN113899963A (en) * 2021-08-30 2022-01-07 科华数据股份有限公司 Alternating current system interference electricity detection method and device and terminal equipment

Also Published As

Publication number Publication date
CN108634935B (en) 2021-07-13

Similar Documents

Publication Publication Date Title
CN108634935A (en) The method, apparatus and equipment of signal base line drift correction
US10258250B2 (en) GPU-based parallel electrocardiogram signal analysis method, computer readable storage medium and device
CN110956612B (en) Cell rapid counting method, computer equipment and readable storage medium
CN110335276B (en) Medical image segmentation model, method, storage medium and electronic device
CN110141216B (en) Identification method, training method and system for QRS (QRS) characteristic waves of electrocardiosignals
CN1408319A (en) Method for blood vessel photographic image process by digital reduction method
US20150025403A1 (en) Mood analysis method, system, and apparatus
CN109284761A (en) A kind of image characteristic extracting method, device, equipment and readable storage medium storing program for executing
CN107220644A (en) A kind of ecg scanning image gradient bearing calibration
CN110738660A (en) Spine CT image segmentation method and device based on improved U-net
CN109044280A (en) A kind of sleep stage method and relevant device
CN102393870A (en) Modification method for uneven pulse wave data base line
CN114972113A (en) Image processing method and device, electronic equipment and readable storage medium
CN110348425A (en) Go the method, apparatus, equipment and computer readable storage medium of shading
Liu et al. Event-driven processing for hardware-efficient neural spike sorting
Shrivastava et al. Digitization of ECG paper records using MATLAB
JP6670320B2 (en) Apparatus, method and system for graphical resolution dependent on signal resolution
US10671624B2 (en) Parallel filtering of large time series of data for filters having recursive dependencies
US10750972B2 (en) Systems and methods for wavelet based head movement artifact removal from electrooculography (EOG) signals
CN109497995B (en) Electrocardiosignal R wave detection method, electrocardiosignal R wave detection equipment and computer readable medium
CN105989578B (en) A kind of image denoising method and device
CN114931383A (en) Electroencephalogram data processing method and device, electronic device and non-transitory storage medium
CN103971319B (en) A kind of image processing method performed by computer
Ozimek et al. Information flow between heart rhythm, repolarization, and the diastolic interval series for healthy individuals and LQTS1 patients
CN112386265A (en) Quantitative analysis method and device for cognitive function mapping electroencephalogram oscillation and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210713

CF01 Termination of patent right due to non-payment of annual fee