WO1997015014A1 - Apparatus and method for two-dimensional data compression - Google Patents
Apparatus and method for two-dimensional data compression Download PDFInfo
- Publication number
- WO1997015014A1 WO1997015014A1 PCT/US1996/016909 US9616909W WO9715014A1 WO 1997015014 A1 WO1997015014 A1 WO 1997015014A1 US 9616909 W US9616909 W US 9616909W WO 9715014 A1 WO9715014 A1 WO 9715014A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- pixel
- prior
- matching
- scanned
- pixels
- 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.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
- G06T9/40—Tree coding, e.g. quadtree, octree
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/593—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/13—Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
- H04N19/91—Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
Definitions
- This invention relates to data compression systems, and more particularly to an apparatus and method for compressing image data into a compressed form and for decompressing the compressed form.
- data compression refers to any process in which data in a given format is converted into an alternative format, in which the alternative format has fewer bits than the original format.
- Data compression systems are well known in the art and are used to encode an original stream of digital data signals into compressed digital data signals and to decode the compressed digital data signals back into the original data signals.
- data compression is advantageous because it provides a savings in the amount of time required to transmit a given body of digital information and in the amount of storage required to hold digital information.
- redundancy compression methods have been used to compress data files so that they will occupy less space on a storage device or so that they can be transmitted in less time over a communications channel.
- a text file is a data file that contains a series of textual characters, such as letters of the alphabet, numbers, and/or punctuation marks.
- an initial target character in the series of textual characters is located.
- the characters prior to the initial target character are then searched (or traversed) in a reverse direction, beginning at the character immediately preceding the initial target character, until a prior character is located that matches the target character.
- an initial matching prior character is located, an attempt is made to extend the match beyond the target character to identify a matching "character string" of prior characters.
- the search moves "forward" to a new target character immediately following the initial target character and also moves "forward” to a next prior character immediately following the initial matching prior character, and the system determines whether the succeeding target and prior characters match. If so, the process continues along the string of succeeding prior characters until a matching fails. The matching character string is then defined from the initial matching prior character to the last matching prior character.
- the matching character string may be represented by two data items: (1) the beginning point ofthe string of matching prior characters (i.e., the location within the series of characters ofthe initial matching prior character); and (2) the length ofthe string of matching prior characters.
- the string of target characters that matches the prior characters is represented simply as data indicating (1) the initial position ofthe matching data string and (2) the length ofthe string.
- a string of target characters having a matching prior character string is represented by fewer bits than if each target character were independently encoded.
- a "longest matching data string" is sought.
- the process does not stop when a first matching data string is located. Instead, the search continues in a reverse direction back through the prior characters, beginning with the prior character immediately preceding the initial matching prior character. The process continues until a longest matching data string is located (which may be the initial matching data string). By locating the longest matching data string, rather than merely stopping at the first matching data string, further compression of the data text may be accomplished.
- redundancy compression is illustrated Suppose the following character string is being transmitted "THE RAIN IN SPAIN FALLS MAINLY ON THE PLANE " This data is encoded as follows
- the first character, "T” is encoded as a "literal” code, meaning that it is uncompressed (and indeed may be slightly expanded by a flag bit indicating that it is a literal code)
- the second character, "H” then becomes the target character, and the previously encoded characters are searched in an attempt to find a match
- the only preceding character that has been encoded is the initial "T,” which does not match the next character, "H " Accordingly, the "H” character is encoded as a literal code.
- Each succeeding character after "H” then becomes the target character, and the previously encoded characters are searched for a match. Discounting, for this example, the blank space between “RAIN” and “IN,” the first character match occurs at the “I” in the first occurrence of the word “IN,” which matches the "I” in the word “RAIN " The search for a matching string then begins, and the new target character becomes the "N” in “IN.” The character immediately following the matching "F in the word "RALN" is thus compared to the new target character to determine if a match exists.
- the matching data string located by this redundancy technique is "IN” (with the blank space following the "N” also having a matching previous blank space).
- the matching data string, i.e., "IN” is then compressed by encoding it as the initial location of the initial character in the matching data string (i.e., the "I” in "RAIN") and the length of the matching data string (in this case, three characters "I", "N", and "blank space”). This process is continued throughout the text file until the entire file is compressed and encoded. As described above, the process could continue after a first matching string is located in an effort to locate a longest matching string.
- Image data includes a two- dimensional array of pixels. Each pixel may be considered to be the equivalent of a character in a text file. Each pixel represents a point in the image and includes data representing, for example, the color and intensity of the pixel.
- images may have entire areas that are uniform or quite similar in appearance (for example, a blue ocean constituting a large area of the image), pixel data may be extensively replicated in a patterned manner within the image. Thus, redundant pixels may be more likely to occur in certain positions relative to a target pixel than in other positions relative to that pixel.
- the search for a prior pixel that matches the target pixel is performed by traversing "backward," one pixel at a time and in order, through the prior pixels.
- the pixels are simply traversed linearly backward through the prior pixels until a match, if any, is located. Accordingly, using the linear traversing method to compress image data is inefficient and fails to achieve high-speed image data compression. Because it is extremely important in data compression systems to maximize the speed at which image data is compressed (or decompressed), the relatively slow speed of the linear traversing method degrades system performance, making the method disadvantageous for compressing and decompressing image data.
- a "history array,” “history array pointer,” “hash table,” and “offset array” are used to search back through prior pixels to locate matching pixel strings.
- the history array contains a number of entries, each entry for storing a portion of the input data stream of prior pixels.
- the history array pointer points to the latest entry in the hash array.
- the hash table contains a series of entries that contain history array pointers.
- the offset array (or hash link table) points to the previous entry in the history array that corresponds to a particular hash value, and another item in the offset array points to the oldest entry in the history array associated with this hash value.
- the history array pointer, hash table, and offset array constitute a "hash data structure.”
- the history array pointer, hash table, and offset array are used to find specified strings stored in the history array, which is searched for a longest matching pixel string that matches a string of pixels in the input data stream.
- a hashing function must be performed, which includes several steps. First, the results of a hashing function must be obtained, which function provides a pointer to one ofthe entries in the hash table. Second, the pointer stored in the hash table that is pointed to by the result of the hash function is obtained.
- systems that employ the hashing method for data compression are complex and resource intensive.
- systems employing the hashing method for compressing image data are difficult and expensive to implement and are slowed by their computation requirements for carrying out the hashing method.
- the present invention is a method and apparatus for compressing a stream of data and for decompressing previously compressed data.
- the data may represent an image that is either two-dimensional or three-dimensional. It should be recognized, however, that the present invention could be used to compress any type of data, including character data.
- the present invention takes advantage of the observation that image data may have redundancy in two dimensions, with large areas ofthe same or similar color.
- the present invention uses this fact to traverse image pixels in a predetermined pattern designed to minimize the number of prior pixels that must be traversed to find the longest matching string of prior pixels.
- an incoming stream includes a plurality of incoming data pixels, of which two or more constitute an incoming data string.
- the method includes several steps.
- the incoming data stream is initially read to obtain prior data, which includes prior data strings.
- the prior data is then searched in a predetermined non-linear traversing pattern for longest matching prior data strings that match incoming target data strings. If any longest matching data strings are found, they are compressed and encoded into copy tokens. Any incoming target data pixels that have no matching prior pixel are encoded as literal tokens.
- the copy and literal tokens are then entropy coded and output to storage or for transmission.
- a target pixel is compared to prior pixels in a pixel array to determine whether any ofthe prior pixels matches the target pixel.
- the prior pixels are searched in an empirically predetermined non ⁇ linear two-dimensional traversing pattern that traverses the prior pixels in a manner designed to minimize the time it takes to locate matching prior pixels and thereby optimize the compression rate.
- the non-linear traversing pattern may be held constant throughout the process of compressing an entire image, or may vary to accommodate "boundary" conditions (e.g., edges of an image) or in response to "learned" or heuristically determined characteristics of a particular image
- non-linear pixel offset refers to the number of pixels, in the non-linear traversing pattern, lying between the initial target pixel and the initial matching prior pixel.
- the process continues until a next prior pixel does not match a corresponding next target pixel.
- the number of matching prior pixels constitutes a string length for the matching data string, and the location of the initial matching prior pixel in the non-linear traversing pattern becomes the non-linear pixel offset for the matching data string.
- the "linear pixel offset" ofthe initial matching pixel can be generated from the non-linear pixel offset and from the position ofthe target pixel within the array of pixels.
- linear pixel offset means the number of pixels, in linear order within the array of pixels, lying between the target pixel and the initial matching pixel.
- the process continues, using the predetermined non-linear traversing pattern to locate additional matching prior pixel strings, if any. Any longer match replaces an earlier, shorter match.
- the method includes a reasonable limit on the number of prior pixels searched via the traversing pattern.
- the process of searching for matching prior pixel strings may stop before reaching the beginning of all prior pixels.
- the longest matching string is then encoded as a "copy token," which includes data indicating the non-linear pixel offset of the longest matching string and its string length.
- the unmatched target pixel is encoded as a "literal token.”
- the process of searching for matching strings continues to the end of the pixels comprising the image, thereby locating all copy tokens and all literal tokens to form a token set.
- the token set is then further globally encoded (preferably using a Huffman data compression algorithm) to obtain a stream of encoded compressed image data.
- This stream of encoded compressed image data is then transmitted or stored. If transmitted, when the stream of encoded compressed image data is received, it is decoded using a decoding algorithm to obtain a decoded stream of compressed image data. If stored, when the stream of encoded image data is retrieved, it is decoded using a decoding algorithm (e.g., Huffrnan decoding), also thereby obtaining a decoded stream of compressed image data.
- a decoding algorithm e.g., Huffrnan decoding
- pixels are considered to be "matching" only if the pixels being compared contain identical data.
- the target pixel if a target pixel does not identically match any of the prior pixels traversed by the non-linear traversing pattern, the target pixel will be encoded as a literal token, and the process will continue throughout the array of pixels in an attempt to find strings of identically matching pixels.
- a target pixel and prior pixel are considered to be a "match” even if they are not identical, provided the prior pixel falls within a preset tolerance ofthe target pixel.
- the prior pixel is compared to the target pixel, and if the prior pixel falls within the preset tolerance of the target pixel, the prior pixel is considered a "match.”
- similar but non-identical colors can be deemed to "match.”
- target pixels following an initial target pixel are compared to corresponding prior pixels following the initial matching prior pixel, and in each case the preset tolerance is applied to the target pixels.
- the present invention permits higher compression ratios, but results in "lossy" compression.
- the present invention overcomes disadvantages and drawbacks of prior art compression methods.
- the non ⁇ linear traversing pattem has been empirically determined so that it locates longest matching data strings much more quickly and with less pixel traversing than is required with the linear traversing method of the prior art. Accordingly, compression speed is substantially increased.
- the present invention eliminates the need for complex circuitry and time-consuming computations required in the hashing method. Thus, the present invention is less costly, less complex, and faster than hashing.
- FIGURE 1 is block diagram of a programmable computer system for implementing the compression and decompression method of the present invention
- FIGURE 2 is a flow diagram showing the basic method ofthe preferred embodiment of the present invention.
- FIGURE 3 is a flow diagram showing in detail the process for locating and tokenizing longest matching data strings and unmatched target pixels in accordance with the present invention.
- FIGURE 4 is a flow diagram showing a more detailed version of the entire compres- sion/decompression process ofthe preferred embodiment ofthe present invention.
- FIGURE 1 shows a block diagram of a typical programmable processing system 10 which may be used for implementing the compression and decompression system ofthe present invention.
- the processing system 10 preferably includes a CPU 12, RAM 14, ROM 16 (which may be writable, such as a flash ROM), an I/O controller 18, and an optional storage device 19, such as a magnetic disk, coupled by a CPU bus as shown. Coupled to the I/O bus are input and/or output devices, such as a display 20, a keyboard 22, and a communication port 24, as well as the I/O controller 18.
- the display 20 may be used to display an original image to be compressed.
- the programmable processing system 10 may be pre-programmed, or may be programmed (and reprogrammed) by downloading a program from another source (e.g., another computer).
- the CPU 12 must have a comparator circuit or be programmable to compare one data value to another data value to determine identity or difference between the data values, and optionally to compare the difference between two data values to a third value (e.g. , a threshold value).
- the programmable processing system 10 may be coupled via a communication link 26 to a remote processing system 30. Data may be communicated over the communication link 26 between the programmable processing system 10 and the second programmable processing system 30.
- an original image may be compressed and encoded to obtain a compressed image.
- the compressed image may then be transmitted over the communication link 26 and, upon receipt, may be decoded and decompressed to obtain the original image.
- the original image may be compressed and encoded and stored in, for example, the storage device 19 to obtain a stored compressed image.
- the stored compressed image may later be retrieved by the CPU 12 and decoded and decompressed to obtain the original image, which can again be displayed on the display 20.
- the CPU 12 may house the hardware and software used to compress, encode, decode, and decompress the original image 1, or such hardware and software may be resident in a remote computer or in a separate module ofthe programma ⁇ ble processing system 10.
- FIGURE 2 is a flow diagram of the basic method of the present invention.
- the method shown in FIGURE 2 is used for compressing an incoming data stream, which includes a plurality of incoming data pixels, of which a group of two or more comprise an incoming data stream.
- pixel means any data segment, data structure, or set of bits that define a picture element of an image regardless of color depth or colorspace model used, and includes character data.
- the method begins at a Start state 202.
- An incoming data stream (e.g., a data file or transmitted image) is read into a computer memory to obtain initial image data (Step 204).
- the data stream may represent an entire image or blocks defining a portion of an image if memory resources are exceeded. In this latter case, the blocks may be treated as "subimages" and separately compressed in accordance with the present invention.
- the present invention normally would be applied to compress a "moving window" of data representing portions of an image, such that the entire image is processed.
- an image being compressed is represented as a data file that describes an image in terms of a rectangular array of pixels, regardless of the shape of the original image (e.g., rectangular, circular, etc.). Nevertheless, images having other array configurations, such as hexagonal, may also be compressed using the procedure described below. No matter the image represented by a pixel array, however, the array has a beginning and an end, with a first "prior" pixel being located at the beginning ofthe pixel array and thus being the first pixel in the array.
- each longest matching prior data string comprises a prior data string that matches a data string from the incoming data stream.
- the predetermined non-linear traversing pattem has a fixed length for a single image. That is, for each target pixel, the predetermined non-linear traversing pattem has a fixed number of prior pixels that it traverses, and, for each image, the traversing pattern ceases at a predetermined number of prior pixels that are searched.
- an advantage may be gained by varying the length of the traversing patte within a single image.
- the length ofthe traverse pattern may be dynamically altered within a single image.
- a fully variable (i.e., optimal) pattern may be calculated for a single image. That is, the traversing pattem may vary from image to image.
- the extent and path ofthe non-linear traversing pattem may be limited by the configura ⁇ tion of the data to be compressed.
- an image to be compressed is made up of an array of pixels having borders or limits, and the traversing pattem may include segments that fall outside the limits of the pixel array.
- the segments that fall outside the limits of the pixel array may be dynamically removed, for example, at the edges of the array.
- the removed segments are not represented in the vector comprising the longest matching data string; i.e., the removed segments are treated as if they never existed in the traversing pattem. This speeds processing, since such segment(s) are not useful in locating longest matching pixel strings.
- the predetermined non-linear traversing pattem may be determined empirically.
- a large number of test images are exhaustively scanned (in a linear fashion, as described in the background section) for prior pixels that match target pixels.
- a histogram is then calculated, revealing the frequency of matches in prior pixel locations.
- This histogram is then sorted in a descending order, and the relative pixel offsets corresponding to the sorted frequencies of matches become the preferred non-linear traversing pattem.
- a preferred traversing pattem has been determined by the above method.
- a pixel offset is defined as the location in a two-dimensional array, relative to a target pixel, of a prior pixel being searched for a match with the target pixel.
- the first 24 relative pixel offsets are scanned (by default) in the following order: 23 18 16 7 17 19 24
- the "#" symbol represents the target pixel, or the position being encoded for which a matching prior pixel is being searched.
- the numbers 1-24 represent the first 24 relative pixel offsets, in order, in the traversing pattem.
- offsets 1-5 may be given slightly preferential treatment when encoding the pixels as tokens.
- the token scheme is described in detail below.
- offsets 1-5 are assigned unique tokens without appending additional token flag bits, which are appended to non-preferential tokens. Because of this, after an image is encoded as tokens, the five most frequently occurring ofthe above 24 relative offsets are identified, and all ofthe first 24 offsets are permuted just enough so that the five most frequently occurring offsets are assigned the optimal 1-5 token positions. This permutation is reversed during the decoding process and has no affect on other parts of the encoding/decoding process, which will be described in detail below.
- the purpose of giving slightly preferential treatment to the most frequently occurring offsets is to increase bit-packing efficiency.
- the five offsets ofthe highest frequency from the first 24 offsets are called the "most popular" offsets.
- the next 41 offsets are scanned in the following order:
- the "#" symbol represents the target pixel for which a matching prior pixel is sought.
- the number of locations in the non-linear traversing pattem is limited to some reasonable number to balance depth of searching (which might result in longer matches) with speed of compression.
- some of the above offsets may produce redundancies by "wrapping around" from the first to the last column, or from the last to the first column. As embodied herein, such wrapping around is allowed. Wrapping around simplifies implementation of the compression scheme. It also results in a compression increase, because colors occurring at the border of an image are often related.
- the remaining relative offsets are scanned in a linear pattem backward from the target pixel position, disregarding any offsets already considered from a prior scanning stage.
- Step 208 if a longest matching prior data string is found, the corresponding matching target data string is compressed by encoding it (i.e. , replacing it) with a "copy token" (Step 210). If no longest matching prior data string is found, each unmatched pixel from the incoming data stream is encoded as a
- Step 212 the encoding process is performed as the longest matching prior data strings and unmatched pixels are encountered.
- encoding may occur in a step-wise manner; that is, the method may be implemented such that it does not require that all located longest matching prior data strings and unmatched pixels be encoded after the entire image has been scanned.
- the encoding step may occur after the entire image has been scanned and all unmatched pixels and longest matching prior pixel strings have been located.
- the copy tokens and literal tokens are output and the process repeated (Step 214) until all pixels have been encoded, at which point the basic process ends (Step 216).
- the copy tokens and literal tokens may then be transmitted over a communication link (as illustrated in FIGURE 1) to another data processing system 30. Because the incoming data stream (or image) has been compressed using the method of FIGURE 2, fewer bits need be transmitted over the communication link 26 to the data processing system 30. Altematively, the compressed data can be stored in the storage device 19, requiring less storage space than would otherwise be required if the data or image were not compressed.
- FIGURE 3 illustrates Steps 204-214 of FIGURE 2 in greater detail to show the preferred method of compressing an image.
- the first step in FIGURE 4 is to select a "next" target pixel to be processed (Step 302). (This "next" target pixel may be the first pixel processed.) Once the target pixel is selected, prior pixels (i.e., those pixels located at prior positions within the pixel array relative to the initial target pixel) are traversed in the predetermined non-linear traversing pattem (Step 304).
- the target pixel is compared to each prior pixel encountered in the traversing pattem to determine whether any such prior pixel matches the target pixel (Step 306). If no match is found (Step 308), a test is made to see if the non-linear traversing pattem has been exhausted (Step 318). If not, processing continues at Step 306.
- Step 308 If a match is found (Step 308), thereby locating an initial matching prior pixel, an attempt is made to extend the match. Accordingly, target pixels following the initial target pixel and prior pixels following the initial matching prior pixel are traversed in a forward linear pattem to try to extend the initial match (Step 310). Thus, the linear traversing pattem moves toward the end ofthe pixel array (i.e., away from the first prior pixel).
- each target pixel following the initial target pixel has a corresponding next prior pixel.
- each target pixel following the initial target pixel is compared to its corresponding prior pixel (Step 312). If it is found that the corresponding target and prior pixels being compared match one another, Step 310 is repeated to determine whether the next corresponding target and prior pixels match one another. This process continues until a match is not found (Step 312), indicating the termination point of the current matching string of prior pixels.
- the length of the current matching string is compared to any prior saved string length for the initial target pixel currently being processed (Step 314). If the current string is the first to be found, or the current string is longer than the previously saved string, the relative offset and string length of the current matching string represent a "current" longest match and are stored (Step 316). (Preferably, as defined in the summary section, the non-linear pixel offset is stored, from which, together with the position ofthe target pixel, the linear pixel offset can be generated. It should be recognized, however, that the linear pixel offset altematively could be stored.) Otherwise, the current match is discarded, and processing continues at Step 318. Altematively, the offset and length information is immediately replaced with a copy token (see below).
- Step 308 processing repeats at Step 306 until the image pattem is exhausted.
- the non-linear traverse has a predetermined termination point, so that each and every prior pixel is not traversed. If all prior pixels were traversed (i.e., the non-linear traverse ended only when the first prior pixel was reached), the increase in compression speed attained by the present invention would be reduced.
- the point at which compression is optimized, as explained above, may be empirically determined.
- the continuation of the traversing patte begins with the prior pixel immediately preceding, in accordance with the traverse pattem, the initial matching prior pixel ofthe most recent matching string.
- the next prior pixel traversed may not necessarily be the prior pixel immediately preceding, in the pixel array, such initial matching prior pixel. Rather, because the traverse pattem is non ⁇ linear, the next prior pixel to be compared to the initial target pixel may be located at a position within the pixel array that is far removed from the initial matching prior pixel.
- Step 3 18 If the non-linear traverse pattem is exhausted (Step 3 18), either no match will have been found for the initial target pixel, or a longest string will have been found. In the former case, the target pixel is replaced with a literal token; in the latter case, the matching target string will be replaced with a copy token (Step 320). The token is then output.
- Step 322 A test is then made to see if the image has been completely processed (Step 322). If so, processing ends (Step 324). If not, a next target pixel is selected for processing (Step 324).
- the next initial target pixel is located at a position immediately following the last target pixel for which a matching prior pixel was sought. If, during the process of traversing the prior pixels in the non-linear traverse pattem, no prior pixel was located that matched the initial target pixel, then the next initial target pixel is the target pixel immediately following the previous initial target pixel for which no match was found. If, however, a matching string of prior pixels was located, the next initial target pixel is the target pixel immediately following the last target pixel in the string of matched target pixels.
- Step 306 the prior pixels, relative to the current target pixel (i.e., a "moving window"), are again traversed in the predetermined non ⁇ linear traversing pattern, this time searching for an initial matching prior pixel that matches the next initial target pixel.
- the method of the present invention can provide for lossy as well as lossless compres ⁇ sion.
- lossless compression two pixels are considered “matching” only if they are identical.
- lossy compression two pixels are considered “matching” even if they are not identical, provided they fall within a preset tolerance (which may be pre-programmed, or user-definable to allow for variable degrees of compression).
- the degree of comparison between a target pixel and prior pixel may vary by the preset tolerance. If a target pixel is Vvithin the tolerance of a prior pixels, the target and prior pixels are deemed a match, and the process of matching target and prior pixels to locate matching prior pixel strings continues, until the longest string within the tolerance is found in the prior pixels.
- a variable tolerance can be used to control the degree of loss. This tolerance can be variable from image-to-image or within a single image.
- the method can be modified, such that, when searching for matches within the tolerance and an out-of-tolerance miss occurs, the matching process can continue for the string being searched to determine if additional subsequent pixels in the string are within the tolerance. If so, the "out-of-tolerance" miss can be considered a "match” anyway.
- a variation of this scheme is to have a second order tolerance indicating the average quality of hits in a string comparison. Fourth, the total error over a matching string can be monitored, stopping the matching process if the "error" exceeds a certain threshold value ("error" referring to the difference between the prior and target pixels).
- tolerance comparisons are employed in locating matching prior pixel strings, the prior pixels being scanned (or searched) are the reconstructed versions, not the original source image pixels. This is because the scanning process must take place against the same pixels that are provided to a decoder when it reconstructs the image being compressed, otherwise, the tolerance comparisons would be inaccurate.
- a step can be added to produce the reconstructed pixel versions, in which matched target pixels are replaced with their matching prior pixels (from the already reconstructed image).
- the matching prior pixels may differ from the target pixels they are replacing, because the matching process potentially produces non-identical matches.
- the original pixel value ofthe target pixel is tokenized as a literal token and output.
- the decoder or decoding step responds to such literal tokens by inserting this single pixel value into the reconstructed image.
- the literal pixel may not exactly match its original, however, if it is convenient to modify the pixel later (within tolerance) to improve (e.g., lengthen or reduce total error of) a subsequent match.
- tokens greater than 255 are copy strings (or copy elements). Tokens 255 or below map directly to the literal pixel value that the tokens represent.
- copy elements may be grouped into blocks of 16, with token bits 7 through 4 determining the block. Within each block, the pixel offset meaning is identical; the lower 4 token bits define the offset and/or how many extra bits follow the token to further define the offset.
- token bits 7 through 4 for each copy block determine the copy string length and or how many extra bits follow the token to further define the length.
- extra length bits (if any) precede extra offset bits (if any).
- Fifth, for tokens 416-431 which represent copy tokens having an extended length), two bits precede the extra length bits to indicate how many extra length bits follow.
- FIGURE 4 illustrates a more detailed version of the entire compression/decompression process of the preferred embodiment of the present invention, applying the method illustrated in FIGURE 2.
- the colorspace ofthe image data optionally may be changed, in known fashion (Step 402).
- the color space in which to encode the image data is conventional YCrCb.
- a source (or original) image is in a non-preferred colorspace (e.g., RGB)
- the image may first be converted to the preferred colorspace (i.e., YCrCb).
- CCLR International Radio Consultative Committee
- the image being compressed optionally is subsampled to reduce the value range of the image data, in known fashion (Step 406).
- the degree of subsampling may vary by the color in the image. If subsampling (Step 406) is performed, each color in the image may first optionally have a filter applied to it, in known fashion, after changing the colorspace
- Step 404 The preferred filter uses a three-element kernel of 1, 2, 1. For a two- dimensional image, this filter is applied along both dimensions of the image. Even if the colorspace is not changed (Step 402), the image may optionally be filtered (Step 404) before subsampling (Step 406).
- the image data is prefiltered with one or more dynamically selected DPCM (differential pulse-code modulation) algorithms (Step 407)
- DPCM dynamic pulse-code modulation
- An inverse DPCM algorithm is applied when the data is decoded (Step 426), which adds no loss to the encode/decode process.
- X X - ((B + C + l) / 2), where B, C, and X are as follows: row (n - 2) row (n - 1) B row (n) C X
- X represents the target pixel
- B is the prior pixel directly above X in the pixel array
- C is the prior pixel immediately preceding (or to the left of) X in the pixel array.
- DPCM algorithm (1) is always used
- DPCM algorithm (2) is always used.
- no DPCM is used in the preferred embodiment.
- the image is compressed by traversing the image, pixel-by-pixel, in the predeter ⁇ mined non-linear traversing pattem, using the basic algorithm described in FIGURE 2 and FIGURE 3 (Step 408).
- an attempt is made to match each target pixel to a prior pixel encountered in the predetermined non-linear traversing pattern.
- an attempt is made to extend each match to locate the longest string of prior pixels that match a current string of target pixels.
- either palettized (8-bit) or 24-bit image data can be compressed.
- the data may be compressed and separated per-component, i.e., as if the 24-bit data were three 8-bit images without palettes.
- the data may be interleaved components, i.e., as if the image were a single component image with three times the number of columns.
- the compressed data consists of a sequence of elements, each element either representing a literal pixel (e.g., transferred verbatim from the uncom ⁇ pressed source image) or a "copy" invocation.
- a copy invocation is a data pair [offset, length] that points back into the previously encoded image data to identify a string of matching prior pixels that is to be copied, upon decoding, to the current location ofthe data pair.
- the pixel string may be as follows (assuming the digits below represent pixel values):
- the above pixel string might be encoded as the following list of elements (where ".” indicates that a literal element follows and "[]" (i.e., [offset, length]) indicates that a copy element (or copy invocation) follows): .4 .3 .2 .1 .0 [3,3] [7,4] .9 .8 .7 [3,3] .1 [1,4]
- the present invention can be used for lossy compression as well.
- lossy compression for an image being compressed, the matching strings are allowed to be inexact but visually close matches. This "lossiness" does not affect the operation of the decoder, because the decoder has no concern that the encoder has matched strings in a lossy or lossless manner.
- the literal and copy elements are re-mapped into a defined set of tokens, as described above. To achieve further compression, these tokens are histogrammed and Huffman coded in the preferred embodiment. The resulting codewords make up the majority ofthe output data stream. Extra non-Huffman'd bits may be placed between the Huffman codewords.
- the resulting data stream is preferably encoded using Huffinan coding (Step 410).
- the classical Huffman algorithm is used to create an optimal Huffman tree for the set of tokens.
- the Huffman tree is itself encoded in a compressed format at the beginning of the file containing the compressed image.
- the output of this step is a compressed Huffman stream consisting of Huffman codewords of lengths 1-16 bits, optionally interspersed with additional codeword dependent data.
- the Huffman tree is encoded in the following manner.
- the Huffman tree is represented by a vector of 432 integers corresponding positionally to all possible tokens, each holding a value from 0 to 16. These are termed "tokenlengths.”
- the tokenlengths vector fully encodes the Huffman tree shape and indicates which tokens correspond to its leaves.
- the 0 to 16 tokenlengths values represent the token binary codeword length in bits. In codeword assignment, shorter codewords are assumed to be numerically less than the equivalent-length prefix of longer codewords (i.e., the longer codes tend to be prefixed with 1 bits, and the tree is deeper to the right): / ⁇ Sample tree shape: left branches (/) are
- the tokenlengths vector is first reduced in size by removing any positions known to hold zeros, due to the encoding parameters for the image being processed. For instance, if the maximum offset (a user-tunable encoding parameter) is 65 or less, all token positions which represent offsets greater than 65 are removed, shrinking the vector.
- the tokenlengths vector is itself tokenized and bit-packed in the preferred embodiment.
- the following tokens are defined for use in compression of tokenlengths (in which the following text is interpreted as if the tokens were being decoded): • Repeat previous once (“Rl”): output the previously decoded value once more.
- Delta 1 add +/- 1 (using modulus- 16 arithmetic to keep within range 1 to 16) to the previously decoded non-zero value, and output it once. Following the packed token is a single bit indicating the sign ofthe delta:
- Delta 2 identical to Delta 1, except with a value of 2.
- Delta 4 identical to Delta 1, except with a value of 4.
- Delta 5-8 Larger delta coding. Immediately following the delta token, 2 additional bits follow to indicate the magnitude of the delta. Following these 2 bits, a sign bit exists as with the smaller deltas. [NOTE: Delta +8 is illegal, and reserved. Since delta arithmetic is performed modulus- 16, Delta +8 is equivalent to Delta -8. Delta -8 must be used in both cases.] • Repeat previous three times (a repeat-twice is coded via a pair of repeat-once's)
- repeat three token takes on additional meaning it if is preceded by one or more repeat-once tokens. For every consecutive repeat-once that immediately precedes a repeat three token, an additional bit (up to a max of 8) follows the repeat-three token, indicating longer repeats as follows (with Kl[n] representing n consecutive repeat-once tokens):
- repeat-previous of all lengths are coded as set forth below [NOTES: (1) leading Rx's are assumed NOT to have a preceding Rl, as there would be no reason for them to have such a value; (2) Rx, where x > 3, are invocations of larger, composite repeats from a preceding row]:
- Hard 0 Output a single 0 (indicating an unused token position). This does not change the "previously decoded value” field. (See the description below regarding the definition ofthe "previously decoded value.")
- the Huffman tree for the tokens used to model input tokenlengths must itself be described. This is done in bits 0-n ofthe stream.
- the following static Huffman code is used to encode the values from 0 to 8:
- trailing zero dctokenlengths exist they are not stored. Rather, the decoder senses them automatically, because the Huffman tree will be exactly filled at the point the zeros begin. Also, the final dctokenlengths position is never stored; the decoder can always determine what it must be from examining the Huffman tree.
- the encoded image may optionally be segmented into blocks before storing or transmission ofthe compressed and encoded image (Step 412).
- Step 412 a structure is imposed on the Huffman-encoded copy and literal tokens. This structure segments the token file into blocks (e.g., 16 blocks) of rows, allowing the decoder to display, or "paint", partial sections ofthe image as it arrives at the decoder.
- a "splash” version ofthe image may optionally be prepended to the beginning ofthe data stream before transmitting or storing the compressed and encoded image (Step 414).
- the splash image is a greatly reduced (in size) version ofthe original image, which is reduced by decimation/filtering.
- the splash image is encoded using the same compression scheme as the main image that follows the splash image in the data stream.
- the main image arrives after the splash image in segments (blocks of rows, as described above) and overlays the splash image.
- the splash image preferably is not used in decoding the main image.
- the splash image may be used in decoding the main image.
- the splash image may be used to reduce the size of the main encoded image by using the information in the splash image, for example, by differential pulse-code modulating the main image data against the splash image before encoding the main image.
- a "presplash” code may also be employed.
- a presplash code represents the most "popular” or predominant color within the splash image.
- the presplash code can be used as a background color for the area where the splash image is to be displayed to frame the splash image.
- Another display option involves placing a "transparency" color in the file being transmitted or stored.
- the calling application can specify a transparency replacement color. This color is placed in the palette atop the file transparency color, effectively "painting-in” the transparent areas with the replacement color.
- the main compressed and encoded image i.e., the token set
- the image may be transmitted from one computer system another, such as from system 10 to system 30 in FIGURE 1 , or the image may be stored in a memory device, such as the storage device 19 in FIGURE 1. In either case, an advantage is obtained by compressing the image. If transmitted, the compressed image reaches its destination more quickly than if uncompressed and uses less bandwidth. If stored, the compressed image occupies less space in the memory device than the uncompressed image. Decoding
- the transmitted compressed image When the transmitted compressed image is received, or the stored compressed image is retrieved, it is decoded (Step 418) by a decoder, preferably using a Huffman decoding algorithm that reverses the encoding process, in known fashion.
- the image is then decompressed (or expanded) to obtain a representation ofthe original image (Step 420), again in known fashion.
- a decoder preferably using a Huffman decoding algorithm that reverses the encoding process, in known fashion.
- the image is then decompressed (or expanded) to obtain a representation ofthe original image (Step 420), again in known fashion.
- Decompressing the image at this point restores the image as it was input into the compression stage at Step 408 of FIGURE 4.
- inte ⁇ olation may be used instead of copying.
- the preferred inte ⁇ olation method involves simple linear inte ⁇ olation in both dimensions, with each color component being inte ⁇ olated independently ofthe others. For example, the inte ⁇ olation times 3 between the two values, 0x10 and 0x40, would be,
- bracketed values are the values generated via interpolation.
- the single value is replicated.
- decompression tokens defining the compressed image are converted into pixel component values.
- the tokens are 24-bit, the tokens are interleaved with other color components to form output colors. If, on the other hand, the tokens are 8-bit, the image palette is indexed to form 24-bit output colors.
- decoding (Step 418) and decompression (Step 420) are performed simultaneously, thereby simplifying the design, reducing memory requirements, and increasing time-efficiency. Decoding and decompression are logically distinct, however, and can therefore be implemented as independent steps performed at different times.
- the decoded and decompressed image may be filtered to enhance the image (Step 422).
- an enhancement filter is applied to the pixel component values resulting from the decompression step and is used before the decompressed rows and columns are scaled up to the output (or viewing) dimensions.
- the filter may be applied to the decompressed pixel component values.
- the filter can be enabled by value, e.g., to enhance only the Y-component or only the X-component.
- the preferred FIR filter is 7-tap, with coefficients of: 0.0625, - 0.3125, 1.5, -0.3125, 0.0625. This is an approximated implementation of the filter disclosed in U.S. Patent Application Serial No.
- the decoded and expanded image is then reinte ⁇ olated, in known fashion (Step 424).
- the reinte ⁇ olation step preferably is a linear inte ⁇ olation in both dimensions, as required.
- Each color component in a 24-bit encoding can be scaled individually. Thus, some components may be reinte ⁇ olated and others not, on an image-by-image basis.
- the preferred data format is known as the "GT art" format.
- This comprises a data stream that includes a header followed by a variable number of segments in the following format: + + + + + + + I Header
- the Header Format is 8 bytes long in the preferred embodiment.
- the first two bytes (0 and 1) form a signature to identify the data as a GT art data stream.
- Bytes 2 and 3 identify the version ofthe stream. Typical decoders can decode a major version and a range of minor versions. Bytes 4, 5, 6 are reserved.
- Byte 7 identifies the encoder that created the stream. In summary, these bytes are:
- Each Segment consists of a Prefix and Data section.
- the Prefix consists of Tag and Size fields, which are each encoded using one of three formats, depending on their values.
- Data section is a string of arbitrary bytes, whose byte count is encoded in the Prefix as the Size field.
- the Segment Prefix is a sequence of one, two, or three bytes, which are used to encode the "segment type,” called Tag, and a count called Size ofthe Data bytes that follow.
- the 1-byte format allows a Tag value of 0-63 and 0 bytes of Data.
- the 2-byte format allows Tag values of 0-31 and 0-511 bytes of Data.
- the 3 -byte format allows Tag values of 0-255 and 0-32767 bytes of Data. This encoder selects the shortest encoding for the values Tag and Size.
- the Data Section contains data bytes of a format specific to the Tag identifier.
- the contents and preferred order of segments types are given below (with the value in hexadecimal of all tags and fields being beside the name):
- Segment Type JGJEG VINDOWJNFO (0x20) - Required Segment Type (1) defines the dimension ofthe output image and the colorspace and is formed by the following six bytes: byte
- Each flag contains a single field identical in size, position, and meaning to JG_GTFLAG_CLR_xxx field in the GT_LNSTANCE_rNFO Segment. (See below.) This field determines the colorspace ofthe image. (See Segment Type JG_SEG_GTI_INFO described below.)
- Segment Type JG_SEG_TRANSPARENCY (Oxl b) - Optional Segment Type (2) defines the transparent color of an image and is formed by the following four bytes: byte
- Segment Type (3) defines the preferred 3 -color palette to use when displaying the image in a palettized mode.
- Palettized (8-bit) image instances may reference this palette as the Stream Palette.
- the three components color 0 - CO, color 1 - Cl, color 2 - C2) are in order: Green (CO), then Blue (Cl), then Red (C2).
- the packed format ofthe palette is:
- Bits are ordered from high to low order in ascending address bytes. Fields are stored from high to low order bit.
- Color 0 is stored raw (always raw if 0/1 bit quantizing), contiguous n-bit (depending on Color 0 quantizing factor) fields are provided holding all Color 0 values. If, on the other hand, Color 0 is stored compressed (which only occurs with at least 8 values, although more than 8 values may still be stored raw), the first 16 bits are the delta mask, selecting which delta tokens are in use, as follows: The first bit is a 1 if a delta of 0 is coded; the 2nd bit is a 1 for a delta of 1; ...; the last (16th) bit is 1 if a delta of 15 is coded.
- the meaning of the delta tokens is as follows.
- the delta tokens indicate the amount of change from the previous sample to the next. Delta values from 0 to 14 generate the next sample directly (via one token).
- a delta of 15 is a special case, indicating the delta is 15 + the following data. Many delta- 15 tokens can appear in a row to code a large delta. There will always be a delta token of less than 15 to terminate one or more occurrences of delta-15.
- the delta values are unsigned, meaning they can only move the current value in one direction.
- the preferred implementation starts out by sorting the palette via the first component in descending order.
- the delta tokens for the first color represent a negative change (i.e., are subtracted from the current first-color- value during decoding).
- delta codeword length nibbles each 4 bits.
- One nibble exists for every 1 bit in the delta mask. (That is, the codeword length nibbles and bits in the delta mask correspond positionally; thus the first nibble would represent the codeword length for delta-0, if it was used.)
- the Huffman length for the codeword is
- the next n bits hold the first color value in its raw form. Following the initial raw token are the variable length codewords for the delta tokens that define the remaining first color values.
- color 1 is stored raw (always raw if 0/1 bit quantizing), the following results: continuous w-bit (depending on Color 1 quantizing factor) fields are provided holding all Color 1 values. Otherwise Color 1 is stored compressed, which always occurs with at least 8 values. If compressed, the compressed representation is identical to Color 0, except for the definition ofthe delta- 15 code, which is redefined to flag an escape-to-raw definition, indicating that the next n-bits (depending on the color's quantizing value) hold the color value as a raw value.
- Segment Type (4) is used to flood an image window with a color prior to painting or paneling in splash or image data.
- the Segment has the following four bytes: byte
- An optional Splash instance may be placed here. If so, it would be composed of the segments JG_SEG_GTI_INFO through JG_SEG_GTI_DATA, exactly as would the main image instance (which follows in the data stream).
- Segment Type JG_SEG_GTI_INFO (0x16) - Required Segment Type (5) is required for each color component. If an image is 24-bit (3 component), three consecutive JG_SEG_GTI_INFO segments are required before any other segment. The format counts consecutive JG_SEG_GTI_INFO segments to determine the number of components in an image. The components are numbered 0, 1 , 2 (as they appear in order).
- Flag (1) is set if the maximum number of image rows packed per segment is 32. If Flag (1) is not set, the maximum number of rows stored per segment is 16.
- JG_GTFLAG_PXF_MASK (Oxf « 8)
- pixel format mask Flag (3) is a 4-bit field that determines the pixel format ofthe instance. It may take any ofthe following six values:
- the indexes encoded in the instance refer to the variable (encoder-defined) stream palette.
- VALUE (2) #define JG_GTFLAG_PXF_RGB332 (1 « 8) // 332 RGB indexes An 8-bit instance.
- the indexes encoded in the instance refer to a preset 256-entry palette, where 3 bits are allocated for red, 3 bits for green, and 2 bits for blue.
- VALUE (3) #define JG_GTFLAG_PXF_MONO (2 « 8) // monochrome 8-bit An 8-bit instance.
- the indexes encoded in the instance refer to a preset linear mono ⁇ chrome (gray-scale) palette, with 0 indicating black and Oxff indicating white.
- Compressed image data consists of color component values, instead of indexes to a palette.
- VALUE (6) #define JG_GTFLAG_PXF_LNT24 (5 « 8) // 24-bit interleaved A 24-bit instance. In this case, only a single Info Segment and set of encoded data is present. The three color components are left interleaved together (in B, G, R order) and encoded as if they were a single image with three times the number of columns.
- JG_GTFLAG_CLR_MASK Oxf « 4
- colorspace mask Flag (4) is a 4-bit field that determines the colorspace of the instance (either the compressed data itself, if 24-bit, or the palette of an 8-bit palettized instance). It may take either ofthe following two values:
- the colorspace is RGB (the use of BGR in the name having no meaning).
- VALUE (2) #define JG_GTFLAG_CLR_YUV (1 « 4) // YUV The colorspace is YUV.
- Flags (5) and (6) control whether or not the enhancement filter (described above) is engaged.
- the enhancement is individually controllable for rows and columns.
- Flags (7) and (8) cause the scaled image to be increased in size by replication of the entire image an appropriate number of times. If the image is decreasing in size, its bottom rows and right columns are clipped instead of scaling the entire range.
- Segment Type (5) i.e., the JG_SEG_GTI_INFO Segment:
- JG_PACKED_GT_INSTANCE_INFO.ActualRows and .ActualCols Fields (1) and (2) hold the number of rows and columns of compressed image data. If these values differ from those recorded in the JG_SEG_WTNDOW_INFO segment, the image will be scaled to the JG_SEG_WINDOW_rNFO segment dimensions.
- Field (3) holds the color weights that are applied during the encoding process to the color component differences, as follows:
- the DPCM algorithm is dynamically chosen on a per-row basis, and the algorithm type is recorded at the beginning of each compressed row. (See the above discussion of DPCM algorithms.)
- JG_PACKED_GT_INSTANCE_rNFO.MaxMinLen Fields (4) and (5) represent the minimum and maximum length copy strings, as programmed at encoding time. Both fields are 4-bits. The maximum length is stored in the high order four bits. The four bit code indexes the following vector to produce the actual minimum length: 0, 1, 2, 3, 4, 5, 6, 7, 9, 13, 21, 37, 69, 133, 261, 517, 1029. The four bit code indexes the following vector to produce the actual maximum length: 0, 1,
- Fields (6) and (7) are the maximum offset sizes for length 2 and length greater than 2 copies, set at encoding time. Both fields are 4-bits. The length 2 search size is stored in the high order bits. These fields control the maximum allowed offset a copy string may take (for length 2 copies and all copies greater than length 2).
- the four bit code indexes the following vector to produce the actual length 2 copy max offset size: 1, 2, 3, 4, 5, 9, 17, 33, 65, 129, 257, 513, 1025, 2049, 4097, 8193.
- the four bit code indexes the following vector to produce the actual length greater than 2 copy max offset size: 1, 2,
- FIELD (8) JG_PACKED_GT_LNSTANCE_rNFO.DifTol: Field (8) is the tolerance applied to the numeric difference between pixels at encode time to determine whether or not they are close enough to be considered equal. A "DifTol" of zero allows no pixels to be considered equal, inhibiting any matches from occurring. For 24-bit encodings, this field is simply compared to the absolute value of the difference between pixel values. For palettized (8-bit) encodings, the pixels to be compared are first de-palettized (indexes are looked-up in the palette).
- the color vectors are differenced (subtracted from one another), the absolute values are taken, weighted as per CxWeights. Then, the result vector elements are squared and summed. This value is compared against "DifTol" to determine equality.
- Segment Type JG_SEG_GTIJP ALETTE (0x17) - Optional Segment Type (6) represents the local or de-palettizing palette. This Segment is optional and is only used with 8 bit palettized image. It is stored in the same format as the stream palette. (See Segment Type JG_SEG_GTI_P ALETTE.)
- the Huffinan Segments are optional. If a Huffman Segment (Type (7)) is not received for a component, the data must be raw (stored without compression). If decoding a multiple color component (24-bit) image, the JG_SEG_GTIJHUFFMAN Segments must be ordered co ⁇ esponding to the color components 0, 1, 2.
- the first 1-3 bytes ofthe Huffinan Segment define the "most popular" mask. (See above.) The count of stored bytes is determined by the number of bytes required to output 5 one bits. If less than 3 bytes are required, the trailing 1 or 2 bytes are assumed to be zero. The three bytes logically stored represent a 24-bit mask.
- JG_SEG_GTI_DATA Segments (Type (8)) are ordered as sequential blocks of rows, starting from the top of the image, and may contain an arbitrary number (up to the maximum specified within the JG_SEG_WINDOW_ ⁇ NFO Segment (i.e., Segment Type(l))) of image rows. Sufficient Data segments exist to store all image rows. If the image has multiple components, JG_SEG_GTI_DATA Segments
- Segment Type (8) for each component are interleaved such that a new data segment for each component is available as the decoding process requires it. This relieves the decoder from having to cache component data segments.
- the component segments are interleaved 0, 1, 2, 0, 1, 2, ... If the last two components were subsampled at half the rate ofthe first component (typical for YUV instances), the ordering ofthe components would be 0, 0, 1, 2, 0, 0, 1, 2, ... This is because there is twice as much component 0 data as component 1 and 2 data.
- the first byte of a GT image data segment holds: bit 7: 1 if segment data is stored uncompressed bits 6-5: reserved, must be 0 bits 4-0: count of component rows stored in segment - 1
- bit stream begins. Data is stored on bit boundaries. Bits are ordered from high to low order in ascending address bytes. Fields are stored from high to low order bit. The compressed bits for each data row are stored contiguously (with no byte boundaries between rows). The bits represent the GT tokens, as described above, converted to codewords using the Huffman tree for that component.
- a variable (auto) DPCM mode a 1 or 2 bit DPCM-type codeword is stored at the beginning of each row, as follows:
- Segment Type (9) JG_SEG_MINIA TURE (0x7), segment length 0 Segment Type (9) indicates at what point in the stream enough data has been received to produce an acceptable "miniature" form ofthe image.
- the flag may be placed following the splash image, if the splash image is deemed acceptable for use to create a miniature, or the flag may be placed after the main image.
- Segment Type (10) JG_SEG_EOF (Oxb), segment length 0 - Required Segment Type (10) indicates the end ofthe formatted stream.
- the preceding Segments, Flags, and Values define the format for transmitting image data compressed and encoded in accordance with the present invention.
- the preceding format may be modified or that altemative formats may be employed.
- some ofthe Segments are optional and thus need not be used.
- the "required” Segments may be modified or replaced, if a substitute is provided.
- the Huffman Segment can be modified accordingly.
- the present invention overcomes disadvantages and drawbacks of prior art compression methods. Compression speed is substantially increased, and the present invention eliminates the need for complex circuitry and time-consuming computations required in prior an hashing methods.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Signal Processing (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Apparatus For Radiation Diagnosis (AREA)
Abstract
Description
Claims
Priority Applications (6)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP51609297A JP3233410B2 (en) | 1995-10-19 | 1996-10-21 | Two-dimensional data compression apparatus and method |
| EP96936828A EP0870251B1 (en) | 1995-10-19 | 1996-10-21 | Apparatus and method for two-dimensional data compression |
| BR9611056-2A BR9611056A (en) | 1995-10-19 | 1996-10-21 | Device and method for compression of two-dimensional data |
| CA002235249A CA2235249C (en) | 1995-10-19 | 1996-10-21 | Apparatus and method for 2-dimensional data compression |
| AU74654/96A AU713756B2 (en) | 1995-10-19 | 1996-10-21 | Apparatus and method for two-dimensional data compression |
| DE69631792T DE69631792T2 (en) | 1995-10-19 | 1996-10-21 | APPARATUS AND METHOD FOR THE TWO-DIMENSIONAL DATA COMPRESSION |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US08/545,513 | 1995-10-19 | ||
| US08/545,513 US5710719A (en) | 1995-10-19 | 1995-10-19 | Apparatus and method for 2-dimensional data compression |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO1997015014A1 true WO1997015014A1 (en) | 1997-04-24 |
Family
ID=24176548
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/US1996/016909 Ceased WO1997015014A1 (en) | 1995-10-19 | 1996-10-21 | Apparatus and method for two-dimensional data compression |
Country Status (8)
| Country | Link |
|---|---|
| US (1) | US5710719A (en) |
| EP (1) | EP0870251B1 (en) |
| JP (1) | JP3233410B2 (en) |
| AU (1) | AU713756B2 (en) |
| BR (1) | BR9611056A (en) |
| CA (1) | CA2235249C (en) |
| DE (1) | DE69631792T2 (en) |
| WO (1) | WO1997015014A1 (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB2345603A (en) * | 1998-10-27 | 2000-07-12 | Hewlett Packard Co | Apparatus and method for compressing huffman encoded data |
| US6268809B1 (en) * | 1997-12-05 | 2001-07-31 | Kabushiki Kaisha Toshiba | Data compression method for efficiently compressing data based on data periodicity |
Families Citing this family (58)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3305190B2 (en) * | 1996-03-11 | 2002-07-22 | 富士通株式会社 | Data compression device and data decompression device |
| US5987459A (en) * | 1996-03-15 | 1999-11-16 | Regents Of The University Of Minnesota | Image and document management system for content-based retrieval |
| US20030195848A1 (en) * | 1996-06-05 | 2003-10-16 | David Felger | Method of billing a purchase made over a computer network |
| US7555458B1 (en) * | 1996-06-05 | 2009-06-30 | Fraud Control System.Com Corporation | Method of billing a purchase made over a computer network |
| US8229844B2 (en) | 1996-06-05 | 2012-07-24 | Fraud Control Systems.Com Corporation | Method of billing a purchase made over a computer network |
| US6031914A (en) * | 1996-08-30 | 2000-02-29 | Regents Of The University Of Minnesota | Method and apparatus for embedding data, including watermarks, in human perceptible images |
| US6282299B1 (en) | 1996-08-30 | 2001-08-28 | Regents Of The University Of Minnesota | Method and apparatus for video watermarking using perceptual masks |
| US6061793A (en) * | 1996-08-30 | 2000-05-09 | Regents Of The University Of Minnesota | Method and apparatus for embedding data, including watermarks, in human perceptible sounds |
| US6272634B1 (en) | 1996-08-30 | 2001-08-07 | Regents Of The University Of Minnesota | Digital watermarking to resolve multiple claims of ownership |
| US6226387B1 (en) | 1996-08-30 | 2001-05-01 | Regents Of The University Of Minnesota | Method and apparatus for scene-based video watermarking |
| JP3457184B2 (en) * | 1998-06-25 | 2003-10-14 | シャープ株式会社 | Search device and medium storing control program therefor |
| US6741368B1 (en) * | 1999-05-25 | 2004-05-25 | Adobe Systems, Incorporated | Method and apparatus for reducing storage requirements for display data |
| US6393154B1 (en) | 1999-11-18 | 2002-05-21 | Quikcat.Com, Inc. | Method and apparatus for digital image compression using a dynamical system |
| KR20010059114A (en) * | 1999-12-30 | 2001-07-06 | 박종섭 | Method for compressing image data outputted from image sensor |
| US20010039552A1 (en) * | 2000-02-04 | 2001-11-08 | Killi Tom E. | Method of reducing the size of a file and a data processing system readable medium for performing the method |
| US6236341B1 (en) * | 2000-03-16 | 2001-05-22 | Lucent Technologies Inc. | Method and apparatus for data compression of network packets employing per-packet hash tables |
| US7167259B2 (en) * | 2000-05-16 | 2007-01-23 | International Business Machines Corporation | System and method for merging line work objects using tokenization and selective compression |
| US9894379B2 (en) * | 2001-07-10 | 2018-02-13 | The Directv Group, Inc. | System and methodology for video compression |
| US6650261B2 (en) * | 2001-09-06 | 2003-11-18 | Xerox Corporation | Sliding window compression method utilizing defined match locations |
| US6501395B1 (en) * | 2002-04-10 | 2002-12-31 | Hewlett-Packard Company | System, method and computer readable medium for compressing a data sequence |
| FR2844935B1 (en) * | 2002-09-25 | 2005-01-28 | Canon Kk | TRANSCODING DIGITAL DATA |
| US8549574B2 (en) * | 2002-12-10 | 2013-10-01 | Ol2, Inc. | Method of combining linear content and interactive content compressed together as streaming interactive video |
| US9192859B2 (en) | 2002-12-10 | 2015-11-24 | Sony Computer Entertainment America Llc | System and method for compressing video based on latency measurements and other feedback |
| US9446305B2 (en) | 2002-12-10 | 2016-09-20 | Sony Interactive Entertainment America Llc | System and method for improving the graphics performance of hosted applications |
| US8964830B2 (en) | 2002-12-10 | 2015-02-24 | Ol2, Inc. | System and method for multi-stream video compression using multiple encoding formats |
| US20090118019A1 (en) * | 2002-12-10 | 2009-05-07 | Onlive, Inc. | System for streaming databases serving real-time applications used through streaming interactive video |
| US8526490B2 (en) * | 2002-12-10 | 2013-09-03 | Ol2, Inc. | System and method for video compression using feedback including data related to the successful receipt of video content |
| US8949922B2 (en) * | 2002-12-10 | 2015-02-03 | Ol2, Inc. | System for collaborative conferencing using streaming interactive video |
| US8711923B2 (en) | 2002-12-10 | 2014-04-29 | Ol2, Inc. | System and method for selecting a video encoding format based on feedback data |
| US9061207B2 (en) | 2002-12-10 | 2015-06-23 | Sony Computer Entertainment America Llc | Temporary decoder apparatus and method |
| US9138644B2 (en) | 2002-12-10 | 2015-09-22 | Sony Computer Entertainment America Llc | System and method for accelerated machine switching |
| US9314691B2 (en) * | 2002-12-10 | 2016-04-19 | Sony Computer Entertainment America Llc | System and method for compressing video frames or portions thereof based on feedback information from a client device |
| US10201760B2 (en) * | 2002-12-10 | 2019-02-12 | Sony Interactive Entertainment America Llc | System and method for compressing video based on detected intraframe motion |
| US8366552B2 (en) * | 2002-12-10 | 2013-02-05 | Ol2, Inc. | System and method for multi-stream video compression |
| US9077991B2 (en) * | 2002-12-10 | 2015-07-07 | Sony Computer Entertainment America Llc | System and method for utilizing forward error correction with video compression |
| US9108107B2 (en) | 2002-12-10 | 2015-08-18 | Sony Computer Entertainment America Llc | Hosting and broadcasting virtual events using streaming interactive video |
| US20040202326A1 (en) * | 2003-04-10 | 2004-10-14 | Guanrong Chen | System and methods for real-time encryption of digital images based on 2D and 3D multi-parametric chaotic maps |
| CN100541537C (en) * | 2003-11-24 | 2009-09-16 | 廖宏 | A Method of Using Computer to Compress Digital Archive Files |
| US7450134B2 (en) * | 2004-11-18 | 2008-11-11 | Time Warner Cable Inc. | Methods and apparatus for encoding and decoding images |
| US7826670B2 (en) * | 2005-06-15 | 2010-11-02 | Fujifilm Corporation | Data compression apparatus and data compression program storage medium |
| AU2005248949B2 (en) * | 2005-12-23 | 2010-04-01 | Canon Kabushiki Kaisha | Efficient Halftone Image Compression |
| US8149469B2 (en) * | 2007-08-03 | 2012-04-03 | Canon Kabushiki Kaisha | Image reading apparatus and image reading method |
| US9168457B2 (en) | 2010-09-14 | 2015-10-27 | Sony Computer Entertainment America Llc | System and method for retaining system state |
| JP2011019008A (en) * | 2009-07-07 | 2011-01-27 | Fujifilm Corp | Device, program and method for compressing/transmitting moving image |
| US9438413B2 (en) * | 2010-01-08 | 2016-09-06 | Novell, Inc. | Generating and merging keys for grouping and differentiating volumes of files |
| US9298722B2 (en) * | 2009-07-16 | 2016-03-29 | Novell, Inc. | Optimal sequential (de)compression of digital data |
| US8782734B2 (en) * | 2010-03-10 | 2014-07-15 | Novell, Inc. | Semantic controls on data storage and access |
| US8832103B2 (en) | 2010-04-13 | 2014-09-09 | Novell, Inc. | Relevancy filter for new data based on underlying files |
| US8559741B2 (en) * | 2010-06-02 | 2013-10-15 | Altek Corporation | Lossless image compression method |
| US20120082395A1 (en) * | 2010-09-30 | 2012-04-05 | Microsoft Corporation | Entropy Coder for Image Compression |
| US9208244B2 (en) * | 2011-12-16 | 2015-12-08 | Microsoft Technology Licensing, Llc | Referencing change(s) in data utilizing a network resource locator |
| CN112383780B (en) * | 2013-08-16 | 2023-05-02 | 上海天荷电子信息有限公司 | Encoding and decoding method and device for point matching reference set and index back and forth scanning string matching |
| KR102017807B1 (en) * | 2013-12-31 | 2019-09-03 | 에스케이하이닉스 주식회사 | Apparatus for processing data and method for processing data |
| US9787332B2 (en) * | 2015-09-15 | 2017-10-10 | Intel Corporation | Error-checking compressed streams in heterogeneous compression accelerators |
| CN110168611A (en) * | 2017-03-22 | 2019-08-23 | 惠普发展公司,有限责任合伙企业 | The compressed version of image data based on data relationship |
| FR3104886B1 (en) * | 2019-12-13 | 2022-08-12 | Valeo Vision | Image data management method and automobile lighting device |
| FR3132815B1 (en) * | 2022-02-11 | 2024-03-01 | St Microelectronics Grenoble 2 | Process for partially hashing a video stream |
| CN116506629B (en) * | 2023-06-27 | 2023-08-25 | 上海伯镭智能科技有限公司 | Road condition data compression method for cooperative control of unmanned mining vehicles in mines |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US4853696A (en) * | 1987-04-13 | 1989-08-01 | University Of Central Florida | Code converter for data compression/decompression |
| US5247357A (en) * | 1989-05-31 | 1993-09-21 | Scientific Atlanta, Inc. | Image compression method and apparatus employing distortion adaptive tree search vector quantization with avoidance of transmission of redundant image data |
| US5267334A (en) * | 1991-05-24 | 1993-11-30 | Apple Computer, Inc. | Encoding/decoding moving images with forward and backward keyframes for forward and reverse display |
| US5416857A (en) * | 1992-10-21 | 1995-05-16 | International Business Machines Corporation | Apparatus and method for compressing data while retaining image integrity |
| US5466918A (en) * | 1993-10-29 | 1995-11-14 | Eastman Kodak Company | Method and apparatus for image compression, storage, and retrieval on magnetic transaction cards |
Family Cites Families (18)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US3656178A (en) * | 1969-09-15 | 1972-04-11 | Research Corp | Data compression and decompression system |
| US3675211A (en) * | 1970-09-08 | 1972-07-04 | Ibm | Data compaction using modified variable-length coding |
| US3701108A (en) * | 1970-10-30 | 1972-10-24 | Ibm | Code processor for variable-length dependent codes |
| US3694813A (en) * | 1970-10-30 | 1972-09-26 | Ibm | Method of achieving data compaction utilizing variable-length dependent coding techniques |
| US3717851A (en) * | 1971-03-03 | 1973-02-20 | Ibm | Processing of compacted data |
| US4021782A (en) * | 1974-01-07 | 1977-05-03 | Hoerning John S | Data compaction system and apparatus |
| US4412306A (en) * | 1981-05-14 | 1983-10-25 | Moll Edward W | System for minimizing space requirements for storage and transmission of digital signals |
| US4464650A (en) * | 1981-08-10 | 1984-08-07 | Sperry Corporation | Apparatus and method for compressing data signals and restoring the compressed data signals |
| US4491934A (en) * | 1982-05-12 | 1985-01-01 | Heinz Karl E | Data compression process |
| US4814746A (en) * | 1983-06-01 | 1989-03-21 | International Business Machines Corporation | Data compression method |
| US4558302A (en) * | 1983-06-20 | 1985-12-10 | Sperry Corporation | High speed data compression and decompression apparatus and method |
| US4612532A (en) * | 1984-06-19 | 1986-09-16 | Telebyte Corportion | Data compression apparatus and method |
| US4730348A (en) * | 1986-09-19 | 1988-03-08 | Adaptive Computer Technologies | Adaptive data compression system |
| US4876541A (en) * | 1987-10-15 | 1989-10-24 | Data Compression Corporation | Stem for dynamically compressing and decompressing electronic data |
| US4906991A (en) * | 1988-04-29 | 1990-03-06 | Xerox Corporation | Textual substitution data compression with finite length search windows |
| AU622937B2 (en) * | 1988-10-18 | 1992-04-30 | Veag Vereinigte Energiewerke Aktiengesellschaft | Process for generating electrical energy and/or drying and process heat |
| GB2267624B (en) * | 1992-05-05 | 1995-09-20 | Acorn Computers Ltd | Image data compression |
| EP0582907A3 (en) * | 1992-08-10 | 1995-05-10 | Stac Electronics Inc | Data compression apparatus and method using matching string searching and Huffman encoding. |
-
1995
- 1995-10-19 US US08/545,513 patent/US5710719A/en not_active Expired - Lifetime
-
1996
- 1996-10-21 DE DE69631792T patent/DE69631792T2/en not_active Expired - Lifetime
- 1996-10-21 BR BR9611056-2A patent/BR9611056A/en not_active IP Right Cessation
- 1996-10-21 EP EP96936828A patent/EP0870251B1/en not_active Expired - Lifetime
- 1996-10-21 CA CA002235249A patent/CA2235249C/en not_active Expired - Fee Related
- 1996-10-21 WO PCT/US1996/016909 patent/WO1997015014A1/en not_active Ceased
- 1996-10-21 JP JP51609297A patent/JP3233410B2/en not_active Expired - Fee Related
- 1996-10-21 AU AU74654/96A patent/AU713756B2/en not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US4853696A (en) * | 1987-04-13 | 1989-08-01 | University Of Central Florida | Code converter for data compression/decompression |
| US5247357A (en) * | 1989-05-31 | 1993-09-21 | Scientific Atlanta, Inc. | Image compression method and apparatus employing distortion adaptive tree search vector quantization with avoidance of transmission of redundant image data |
| US5267334A (en) * | 1991-05-24 | 1993-11-30 | Apple Computer, Inc. | Encoding/decoding moving images with forward and backward keyframes for forward and reverse display |
| US5416857A (en) * | 1992-10-21 | 1995-05-16 | International Business Machines Corporation | Apparatus and method for compressing data while retaining image integrity |
| US5466918A (en) * | 1993-10-29 | 1995-11-14 | Eastman Kodak Company | Method and apparatus for image compression, storage, and retrieval on magnetic transaction cards |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP0870251A4 * |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6268809B1 (en) * | 1997-12-05 | 2001-07-31 | Kabushiki Kaisha Toshiba | Data compression method for efficiently compressing data based on data periodicity |
| GB2345603A (en) * | 1998-10-27 | 2000-07-12 | Hewlett Packard Co | Apparatus and method for compressing huffman encoded data |
| GB2345603B (en) * | 1998-10-27 | 2003-02-19 | Hewlett Packard Co | Apparatus and method for compressing huffman encoded data |
Also Published As
| Publication number | Publication date |
|---|---|
| CA2235249A1 (en) | 1997-04-24 |
| DE69631792D1 (en) | 2004-04-08 |
| JP3233410B2 (en) | 2001-11-26 |
| AU7465496A (en) | 1997-05-07 |
| BR9611056A (en) | 1999-09-28 |
| EP0870251B1 (en) | 2004-03-03 |
| EP0870251A1 (en) | 1998-10-14 |
| JP2000509212A (en) | 2000-07-18 |
| DE69631792T2 (en) | 2005-03-10 |
| CA2235249C (en) | 2005-03-29 |
| AU713756B2 (en) | 1999-12-09 |
| US5710719A (en) | 1998-01-20 |
| EP0870251A4 (en) | 2000-07-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0870251B1 (en) | Apparatus and method for two-dimensional data compression | |
| US6054943A (en) | Multilevel digital information compression based on lawrence algorithm | |
| US5227789A (en) | Modified huffman encode/decode system with simplified decoding for imaging systems | |
| US6219457B1 (en) | Method and system for decoding data encoded in a variable length code word | |
| Salomon | Data compression | |
| EP1285399B1 (en) | Enhanced compression of gray-level images | |
| US6639945B2 (en) | Method and apparatus for implementing motion detection in video compression | |
| US6008847A (en) | Temporal compression and decompression for video | |
| AU684013B2 (en) | Compact source coding tables for encoder/decoder system | |
| US7233619B1 (en) | Variable general purpose compression for video images (ZLN) | |
| US7016417B1 (en) | General purpose compression for video images (RHN) | |
| GB2286942A (en) | Compression of palletized images using reindexing and context modelling | |
| EP2317476A2 (en) | Multimedia signature coding and decoding | |
| JPH07212242A (en) | Variable length decoder | |
| EP0754393B1 (en) | Video image colour encoding | |
| EP1324618A2 (en) | Encoding method and arrangement | |
| JP3729172B2 (en) | Image encoding apparatus and method, and encoded image decoding apparatus and method | |
| US20030113029A1 (en) | Skim encoding method for compression of a two dimensional array of data | |
| US7031531B1 (en) | Image encoding device and method therefor, image decoding apparatus and method therefor, and computer-readable recorded medium on which image encoding program and image decoding program are recorded | |
| US20020075955A1 (en) | Image compression and decompression based on a flat pixel group level,group pixel coorindinate positions and the number of pixels for the group | |
| US7164803B2 (en) | Method for encoding digitized images | |
| US7580580B1 (en) | Method for compression of two-color anti aliased images | |
| WO2005074146A1 (en) | Data encoding using multi-dimensional redundancies | |
| Akhtar et al. | A Novel Image Compression Technique using Simple Arithmetic Addition | |
| Cheung et al. | Locally adaptive vector quantization: Data compression with feature preservation |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| ENP | Entry into the national phase |
Ref document number: 2235249 Country of ref document: CA Kind code of ref document: A |
|
| AK | Designated states |
Kind code of ref document: A1 Designated state(s): AU BR CA JP MX |
|
| AL | Designated countries for regional patents |
Kind code of ref document: A1 Designated state(s): AT BE CH DE DK ES FI FR GB GR IE IT LU MC NL PT SE |
|
| DFPE | Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101) | ||
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application | ||
| ENP | Entry into the national phase |
Ref document number: 2235249 Country of ref document: CA |
|
| WWE | Wipo information: entry into national phase |
Ref document number: PA/A/1998/003020 Country of ref document: MX |
|
| ENP | Entry into the national phase |
Ref document number: 1997 516092 Country of ref document: JP Kind code of ref document: A |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 1996936828 Country of ref document: EP |
|
| WWP | Wipo information: published in national office |
Ref document number: 1996936828 Country of ref document: EP |
|
| WWG | Wipo information: grant in national office |
Ref document number: 1996936828 Country of ref document: EP |