Abstract:
Apparatus that smoothes the discontinuities between serial parallel straight line segments by adding auxiliary dots of lesser diameter below the larger main dots forming a first line segment in a given row and adding the same size auxiliary dots above the main dots of an adjacent line segment when the latter are in a row below the given row. Should the adjacent line segment be above the given row, auxiliary dots are formed below it, some of the auxiliary dots previously formed below the end portion of the first line segment are erased, and auxiliary dots are placed above the main dots for the end portion of the first line segment so as to smooth the discontinuity. In the latter situation, smaller auxiliary dots are preferably placed above and below the central portion of the main dots for the first line segment. More than three different sized dots can be used.

Description:
BACKGROUND OF THE INVENTION 
     An image can be formed by dots located within pixels that are arranged in vertical columns and horizontal rows. When an analog wave is displayed with its time axis parallel to the rows and without any smoothing, it will appear as a series of dots, one in each column at a height corresponding to the amplitude of the wave. If the amplitude changes rapidly, gaps appear between consecutive dots. The gaps can be closed by adding auxiliary dots, as indicated in FIG. 1A wherein M designates dots formed at the intersection of a wave with a column; but, as can be seen, steps are formed that give the representation of the wave a jagged appearance. The steps can be essentially eliminated by forming generally diamond-shaped patterns along each column having ends that dovetail so as to fit together and form a smooth line, as described in U.S. Pat. No. 4,212,009, issued on July 8, 1980, to George L. Adleman et al. One particular algorithm for forming the patterns is illustrated by the chart below wherein T n  is the amplitude of the analog wave at a given column of pixels and T n-1  , T n-2 , T n-3  and T n-4  are its amplitudes at respectively previous columns. Three &#34;3&#34;s indicate a maximum size dot having a diameter of two columns; two &#34;2&#34;s indicate a dot having two-thirds the maximum size; and a &#34;1&#34; indicates a dot having one-third the maximum size. 
     
         ______________________________________T.sub.n-4   T.sub.n-3           T.sub.n-2     T.sub.n-1   T.sub.n.       .       .             .           ..       .       .             .           ..       .       .             .           n.       .       .             .           1.       .       .             .            22.       .       .             n      . . .                                     333.       .       .             .           333.       .       .             1           333.       .       .             1           333.       .       .              22         333.       .       .              22         333.       .       n        . . .                         333    . . .                                      22.       .       .             333          22.       .       .        . . .                         333    . . .                                      22.       .       1             333         1.       .       1             333         1.       .       1        . . .                         333    . . .                                     1.       .        22           333         ..       .        22           333         ..       .        22      . . .                         333         ..       n       333            22         ..       1       333           1           ..        22     333           .           .n       333      22           .           .______________________________________ 
    
     FIG. 1B illustrates two patterns D 1  and D 2  that result from using the algorithm defined by the chart when smoothing a straight line. 
     Vertical smoothing, however, does not reduce the discontinuities that are formed between horizontal line segments that are one row apart. 
     BRIEF SUMMARY OF THE INVENTION 
     In a system for displaying analog waves in accordance with this invention, a horizontal smoothing algorithm is employed so as to reduce the discontinuities whenever the analog wave has been in the same row of pixels for a given number of columns. The algorithm remains in operation as long as the amplitude of the analog wave does not change by more than one row of pixels between adjacent columns. In all other cases, the vertical smoothing algorithm is used. 
     One particular horizontal smoothing algorithm that operates in accordance with the principles of this invention is illustrated in FIGS. 2A and 2B. It employs main dots having a diameter of two pixels, a first set of auxiliary dots that are two-thirds the diameter of the main dots, and a second set of auxiliary dots that are one-third the diameter of the main dots. Each of the main dots is centered at a pixel, indicated by a &#34;+&#34; sign, in a column corresponding to the amplitude of the analog wave at that column, and in this drawing they form horizontal line segments 2, 4, 6 and 8. In order to simplify the drawings, only one main dot is shown in the rectangles 4, 6 and 8, but it is understood that there will be one at each column so that they will have a 50% overlap as indicated by the two main dots in the rectangle 2. The line segment 4 is one row of pixels below the line segments 2 and 6, and the line segment 8 is one row above the line segment 6. 
     After four consecutive main dots have appeared in the same row of pixels, auxiliary dots of the first set are placed one row above or one row below the main dots so as to extends the top or bottom of the rectangle by one-third of a pixel. In FIG. 2A, the bottom is extended, as indicated by a rectangle 2&#39;. In accordance with one part of the algorithm, auxiliary dots of the first set are respectively placed above the main dots of a horizontal line segment when it drops by one row of pixels and below them when the line segment rises by one row of pixels. Thus, the auxiliary dots of the first set are placed above the main dots of the line segment 4 as indicated by a rectangle 4&#39;; below the main dots of the line segment 6 as indicated by a rectangle 6&#39;; and below the main dots of the line segment 8 as indicated by the rectangle 8&#39;. Whenever the horizontal line segments alternate between adjacent rows of pixels, as is the case with the line segments 2, 4 and 6, the vertical discontinuity is decreased from a height of one pixel to a height of one-third of a pixel; but if a horizontal line segment moves in the same direction, up or down, as the previous line segment, as is the case of the line segment 8, the discontinuity is one pixel high. 
     In order to smooth this type of discontinuity, the last two-thirds of the auxiliary dots indicated by the &#34;X&#34;s is the rectangle 6&#39; are erased, auxiliary dots of the first set are placed one pixel row above the last third of the main dots as indicated by the rectangle 6&#34;, and auxiliary dots of the second set are placed one row above and one row below the middle third of main dots as indicated by the rectangles 6&#34;&#39;. Thus, the vertical discontinuity between the line segments 6 and 8 is reduced to one-third of a pixel. 
     It will be appreciated that the ratios of the sizes of the dots and/or the division of a line segment into thirds, as was the case with the line segment 6 above, could be altered to some degree and still attain good horizontal smoothing. 
     Although excellent results have been attained by using three different sizes of dots in the manner described, the general situation is as follows. If successive line segments alternate between rows of pixels, auxiliary dots that are smaller than the main dots can be made to appear in a row of pixels that is above the row of main dots of a line segment if it is lower than the previous line segment and vice-versa. On the other hand, if at least two successive horizontal line segments shift in the same direction, auxiliary dots of progressively smaller sizes are formed along the edge of the main dots of that first horizontal line segment that is opposite to the shift, i.e., on the bottom if the shift is up and on the top if the shift is down, and auxiliary dots of progressively larger sizes are formed along the edge of the main dots of the first horizontal line segment that is in the same direction as the shift, i.e., on the bottom if the shift is up and on the top if the shift is down. In particular, if n different sized dots are used, the first horizontal line segment is divided into n sections, the largest auxiliary dot has a size equal to (n-1)/n times the size of the main dot and the difference in size between the auxiliary dots in adjacent sections is 1/n times the size of the main dot. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1A illustrates one form of vertical smoothing of the prior art having steps that make the displayed wave appear jagged; 
     FIG. 1B illustrates one form of vertical smoothing described in U.S. Pat. No. 4,212,009; 
     FIG. 2A illustrates a series of horizontal line segments that are smoothed in accordance with a first portion of an algorithm used in the invented display system; 
     FIG. 2B illustrates the same series of horizontal line segments shown in FIGS. 2A that are smoothed in accordance with a second portion of an algorithm used in the invented display system; and 
     FIG. 3 is a block diagram of a display system of this invention. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Reference is now made to the block diagram of a system shown in FIG. 3 for displaying an analog wave in accordance with this invention. Front ends 10 amplify and filter signals that may represent a plurality of body functions such as an EKG or blood pressure variation. After passing through an A/D converter 12, the signals are applied to a front end microprocessor 14 that extracts numerical parameters such as the heartbeat rate. The output of the front end microprocessor 14 is applied to a shared memory 16 that acts as a mailbox for the data. A user input 18 puts instrument state information in the shared memory 16 so that a user may control such things in the display as sweep speed, the overlapping of smoothed and non-smoothed waves and turning selected waves on or off. A display microprocessor 20 selects data from the memory 16 and places it in a wave buffer memory 22. 
     A microprocessor 24, herein shown as being a Z-80, is coupled to the wave buffer memory 22 and to a ROM 26 and is programmed in accordance with the program design language, PDL, set forth at the end of the specification. The processor 24 causes a state machine 28 to provide bits representing any of four brightness levels required by the vertical or horizontal smoothing algorithm in operation on leads 30 and 32 that are respectively connected to bit maps 34 and 36. The state machine 28 also provides on a lead 38 an eighteen-bit address for row and column of the pixel that is to have the brightness indicated on the leads 30 and 32. A row and column address is provided by a video address counter 42 that indicates the sequence with which the pixels of the bit maps are to be used. An address multiplexer 44 alternately supplies the write address on the lead 38 and the read address supplied to the bit maps by the address counter 42. When the pixels of bit maps 34 and 36 are being read, the bits are respectively applied to video shift registers 46 and 48 that are coupled to a D/A converter and video amplifier 50. Its output is coupled to means 52 for controlling any suitable image display means such as a cathode ray tube 54. A data read register 56 is coupled between each of the bit maps 34 and 36 via leads 58 and 60 so that the bit maps can also be used by the Z-80 microprocessor 24. 
     The operation of the state machine is as follows. The microprocessor 24 provides the address of the column in which a pixel is located to a column address register 62, and the address of the row in which the pixel is located to a row address register 64. It also provides the number of consecutive pixels starting with the given size or pixel that are to be at a given brightness level to a # of pixels register 66 and information as to that level to a data register 68. A state machine control register 70 receives information from the microprocessor 24 as to whether the consecutive pixels are located above or below or to the left or right of the given pixel. The column address is strobed into a column address counter 62&#39;, the row address is strobed into a row address counter 64&#39;, and the number of pixels in the pixel register is strobed into a # of pixels counter 66&#39;. The origin of the bit maps 34 and 36 is at their upper left corners so that increasing column numbers are to the right and increasing row numbers are down. If the consecutive pixels are in a column, a control register 72 that is connected to the state machine control register causes the row address counter 64&#39; to count up or down depending on whether the consecutive pixels are below or above the given pixel. At each count, the size or brightness level supplied by the data register 68 is respectively conveyed via the leads 30 and 32 to the pixels in the bit maps 34 and 36 that are at the address determined by the row address counter 64&#39; and the column address counter 62&#39;. At the same time, the control register 72 reduces the count in the pixel counter 66&#39; by one, and when its count is zero, that information is given to the control register 72 so that no further changes are made until more information is provided by the microprocessor 24. During this time, the column address counter is not changed. If the consecutive pixels are located along a row, the column address counter 62&#39; is incremented or decremented depending on whether the consecutive pixels are to the right or left of the given pixel, and the row address counter 64&#39; remains unchanged. 
     Although the flow chart set forth at the end of the specification in program design language, PDL, would be easily understood by one skilled in the art, the general manner in which it causes the state machine 28 to carry out the algorithms in a situation where the analog wave being smoothed is as follows. ##STR1## As will appear, the vertical smoothing algorithm is followed until four data samples occur in the same row, e.g., until the sample s 4  has been received. In this discussion, certain parts of the flow chart that are not intimately involved with the algorithm will not be explained. 
     After the screen has been cleared, and the system initialized, the steps under the section entitled &#34;Loop Looking for Data or Command in the Buffer&#34;, LLDCB, are followed. If the data is to be smoothed, this fact is given to the shared memory 16 through the user input 18, and the display microprocessor 20 inserts a command into the wave memory buffer 22, the fact that it is a command being indicated by a certain bit being high. The Z-80 microprocessor 24 recognizes from this that the information in the buffer 22 is a command and performs the various tasks indicated. At the end of this section, the &#34;Service Command&#34; section is addressed. Because smoothing is selected, the command is 010 and this says to proceed to the &#34;Set Up Smoothed&#34; section. After the indicated tasks are performed, return to the section LLDCB. Eventually, there will be data in the buffer, indicated by a 0 at a certain bit. As indicated, then go to a &#34;Service Data&#34; section. Because the smoothing flag has been set to 1, go to a &#34;Smoothed Data: Evaluating Data&#34; section. After checking to see if the data is out of bounds and you have old data as indicated by the past history flag being unity, you dispense with the oldest data sample and insert a new one such as going from the left to the right column of FIG. 1B. But if there is just one data sample T n , you insert manufactured data X 1 , X 2  and X 3  by making T n-3 , T n-2  and T n-1  equal to T n . The reason for doing this is so that the representation of the wave will start from the first data sample T n . Inserting any other values would cause the wave to start from some other point. This is now considered as past history so that this bit is set to 1. The next instructions are found in a section &#34;Smoothed Data: T n  =T n-1  &#34;. Since the horizontal smooth flag has not been set to 1 and if T n  =T n-2 , which it does, the indicated tasks are performed and the next section of interest is entitled &#34;Vertical Smoothing Procedure&#34;. 
     Since the write flag has been set to unity by the &#34;Set Up Smoothed&#34; command, the column in which T n  is located is calculated and its address stored in the column address register 62. Next, the data register 68 is set to provide a signal for one-third brightness on the leads 30 and 32. Since (T n-3 )-(T n-2 ) is zero, the direction flag is set to 1, indicating up. The difference (T n-3 )-(T n-2 ) is stored in memory and is modified, added or subtracted from, so as to get to the correct address in a look-up table that divides this difference by three. This result is referred to as the write count and, in this case, it is zero. Remember that in the vertical smoothing algorithm, the difference between T n-2  and T n-3  is divided into three parts. This write count is stored in memory. The number of pixels register 68 is set to the write count, which is zero in this first pass. Next set the value of T n-3  -the write count-1 in the row address register 64. After checking to see that the state machine 28 is ready to proceed, it is caused to perform a vertical write in a decrementing direction by the state machine control register. In this case, the number of pixels in the # of pixels register 68 is zero so a single 1/3 brightness is written at T n , the first data sample. 
     Since (T n-1 )-T n  is equal to zero, the instruction to divide this difference by three by consulting the look-up table causes the write count to again be zero. An address equal to (T n-1 )-2 times the write count, which in this case is T n-1 , is stored in the row address register 64. The state machine then does a vertical write but since the number of pixels in the # of pixels register 68 is zero, another 1/3 brightness is written at T n , the first data sample. 
     At this point, the data register 68 is set to 2/3 brightness and if, as is the case, the write count is zero, the address equal to (T n-1 )-the write count+1 is stored in the row address register 64. After the readiness of the state machine is checked, the value of 2/3 brightness is written at (T n-1 )+1. 
     Then if the (T n-3 )-(T n-2 ) direction flag is 1, which it is, write T n-2  into the row address register 64 and load the stored write count, but since it is not equal to one, set the pixel register to the value (T n-3 )-(T n-2 )-2 times the write count. Thus the state machine is incremented in a vertical direction, i.e., down, and a 2/3 brightness is written in at T n . 
     The data register 68 is then set to full brightness and (T n-1 ) is placed in the row address register 64. Since (T n-1 )-(T n-2 ) equals zero, the # of pixels register 68 is set to zero and the state machine 28 is caused to decrement upward; but since the pixel register is zero, it stays at T n  and writes a full brightness bit at that location in the bit maps 36 and 34. The last instruction in the &#34;Vertical Smoothing Procedure&#34; is to go to a section entitled &#34;Serving Erase Column Procedure&#34;. This procedure will choose a maximum and minimum value from T n , T n-1 , T n-2  and T n-3  and write 0 data between the maximum value +2 and the minimum value -2. It should be noted that T n , T n-1 , T n-2  and T n-3  are not the same values used to write data in the preceeding paragraphs. The values used to erase are found several columns to the right of those used to write. In this way, an erase bar is created. The last instruction of the &#34;Serving Erase Column Procedure&#34; section, however, is to go back to &#34;Loop Looking for Data or Command in the Buffer&#34;. This time, the data sample is the second from the bottom, i.e., d 2  in FIG. 1B. The next instruction is at &#34;Service Data&#34; which directs us to &#34;Smoothed Data: Evaluating Data&#34;. The past history flag was written to one in the last command received so that the data is shifted to the following pattern in which the difference between T n  and T n-1  is six pixel rows. ##STR2## This directs us to &#34;Smoothed Data: T n  &lt;&gt;[(T n-1 )±1]&#34; and since the horizontal smoothing flag is 1, it is cleared to 0 and we return to &#34;Vertical Smoothing Procedure&#34;. This time through, however, the write count between T n  and T n-2  will be equal to 2 since the difference between them is 6. After two more data samples (d 3 ) and (d 4 ) have been processed in the same way, all of the brightness values have been written into the bit maps 34 and 36 that are required to produce the pattern D 1 . 
     In this illustration, it has been assumed that the next eight data samples are to the right of d 4  as indicated below. ##STR3## After d 4  is processed, we go via the &#34;Service Erase Column Procedure&#34; to &#34;Loop Looking for Data or Command in the Buffer&#34; and find s 1 , which is now T n , and are directed to &#34;Service Data&#34; which, because the smoothing flag is 1, sends us to &#34;Smoothed Data: Evaluating Data&#34;. Since the write past history flag is 1, the data is advanced so that d 4 , which was T n , becomes T n-1 , etc. Then go to &#34;Smoothed Data T n  =T n-1  &#34;. Since the horizontal smoothing flag is not equal to 1, we do not go to the &#34;Horizontal Smoothing Procedure&#34; and since T n  =T n-2 , we go to &#34;Vertical Smoothing Procedure&#34; once again. 
     When s 2  is processed, we follow the same procedure as before but this time T n  =T n-2  so that the procedure in &#34;Smoothed Data: T n  =T n-1  &#34; is different. It is important to note that the vertical smoothing flag is set to 1, the horizontal smoothing count is set to 0, and the horizontal smoothing direction flag is set to 1. The samples d 3 , d 4  and s 1 , s 2  are processed by the &#34;Vertical Smoothing Procedure&#34;. After this, you go to &#34;Serving Erase Column Procedure&#34;, &#34;Loop Looking for Data or Command in the Buffer&#34;, &#34;Service Data&#34;, and &#34;Smoothed Data: Evaluating Data&#34;. Since T n  =T n-1 , we go to &#34;Smoothed Data: T n  =T n-1  &#34;, but for the first time the horizontal smoothing flag is 1 so that we go to &#34;Horizontal Smoothing Procedure&#34;. 
     Since the write flag is 1 and not 0, T n  is put in the row address register 68, its column address is determined and stored in the column address register 62, the data register 68 is set to full brightness, and the # of pixels register 66 is set to 1. After the state machine 28 is checked for readiness, it is made to write a full brightness pixel at the address of the row and column registers. This is accomplished by the control registers 70, 72 telling the counters 62, 64 and 66 to write one pixel and then to decrement the column. Since only one pixel is written, decrementing the column address did not write any pixels in the bit maps 34 and 36. Since the horizontal direction smoothing flag was set to 1 in &#34;Smoothed Data: T n  =T n-1  &#34;, (T n )+1 is stored in the row address register 64. This will cause the 2/3 brightness data to be placed under the 3/3 brightness dots, but whether they are placed below or above them is arbitrary at this point. Next, the data register 68 is set to 2/3 brightness. After checking the readiness of the state machine 28, it is caused to write a 2/3 brightness dot and the decrement horizontally one pixel, but again only one pixel is written. Thus, a full brightness dot is formed in the row of the analog wave at s 3  and a 2/3 brightness dot is written below it. The last instruction is to go to the &#34;Serving Erase Column Procedure&#34; which ultimately directs the procedure to &#34;Loop Looking for Data or Command in the Buffer&#34;. It, in turn, indicates that the next part of the procedure is in &#34;Service Data&#34;  and this, in turn, directs us to &#34;Smoothed Data: Evaluating Data&#34; which causes the data samples to be shifted, such as indicated in the left and right columns of FIG. 1B. Since T n  =T n-1 , we proceed to &#34;Smoothed Data: T n  =T n-1  &#34;. Because the horizontal smoothing flag is set to 1, we proceed to &#34;Horizontal Smoothing Procedure&#34;. T n  is now s 3 . When new data is obtained, its column address is one column greater and a 3/3 brightness is written in row T n  where s 3  is, and a 2/3 brightness dot is written in (T n )+1, the row below. This will continue until the sample s 9  is obtained. After s 9  is evaluated in &#34;Smoothed Data: Evaluating Data&#34;, you will be directed to &#34;Smoothed Data: T n  =(T n-1 )+1&#34;. Because the horizontal smoothing direction flag is changed to 1, the 2/3 dots will be written in the row above the 3/3 dots. This continues until sample s 18  is attained at which point the 2/3 brightness dots are placed below the 3/3 brightness dots in accordance with &#34;Smoothed Data: T n  =(T n-1 )-1&#34;. 
     This continues until the sample s 27  is attained at which point you are directed to &#34;Smoothed Data: T n  =(T n-1 )-1&#34; but now the horizontal smoothing direction flag is 0 because it was cleared to zero at s 18 . First the horizontal smoothing count and the present column are compared and the smaller of the two is stored. This number is used to determine which of the preceeding columns in the bit maps will be changed. This number is then divided by three to obtain the correction count divided by three. 
     Next (T n-1 )+1 is written in the row address register 64 and a column address corresponding to T n-1  is written into the column address register 62. The correction count divided by three is written into the # of pixels register 66 and 00 is written in the data register 68. The processor 24 checks the readiness of the state machine 28 and enables it to write decrementing along a row (T n-1 )+1. In this way, the last three 2/3 brightness dots below the 3/3 brightness dots s 24 , s 25  and s 26  are erased. Then the column address (T n-1 )-the correction count divided by three is written into the column address register, and 0F is written into the data register 68 which is 1/3 brightness. The readiness of the state machine 28 is checked and it is enabled to write pixel decrementing along the same row. In this way, the 2/3 brightness dots at s 21 , s 22  and s 23  are changed to 1/3 brightness. 
     The row corresponding to s 27  is written in the row address register 64 and the column corresponding to T n-1 , s 26 , is written in the column address register 64, F0 representing 2/3 brightness is written into the data register 68. After the readiness of the state machine 28 is checked, it is enabled to write decrementing along a horizontal row. This will write the 2/3 brightness pixels above s 24 , s 25  and s 26 . 
     Next, the column address corresponding to T n-1  -the correction count divided by three is written into the column address register 62 and 0F, 1/3 brightness, is written into the data register. After the readiness of the state machine 28 is checked, it is enabled to decrement along a horizontal row. This writes 1/3 brightness pixels above the full brightness pixels s 21 , s 22  and s 23 . Finally, you are directed to the &#34;Horizontal Smoothing Procedure&#34; which will write a full brightness pixel in the column and row of s 29  and a 2/3 brightness pixel below it. This continues until the next discontinuity. 
     Any time that a vertical transition ≦1 occurs, the &#34;Smoothed Data: Evaluating Data&#34; routine will direct you to &#34;Smoothed Data: T n  &lt;&gt;(T n-1 )+/-1&#34; which will direct you to &#34;Vertical Smoothing Procedure&#34;. ##SPC1##