Image encoding apparatus and image encoding method

Abstract: An image encoding apparatus has a forming unit for forming a second image having a different resolution on the basis of a first image, an encoding unit for separately encoding the first and second images, and a changing unit for changing the number or positions of reference pixels referred by the encoding unit for encoding between the encoding operations of the first and second images.

Description: BACKGROUND OF THE INVENTION: Field of the Invention The present invention relates to an image encoding apparatus and, more particularly, to a binary image hierarchical encoding apparatus in a still image communication apparatus, and an image encoding method. Related Background Art A facsimile apparatus as a typical still image communication apparatus adopts a system for sequentially scanning, encoding and transmitting an image. This system requires a long transmission time since all image data must be transmitted, and is difficult to be applied to image communication services such as an image data base service, videotex, and the like, which require quick judgment of an image. In order to realize such a service, a system different from that employed in the facsimile apparatus is proposed ("Sequential Reproduction/Encoding System of Facsimile Signal Suitable for Conversational Image Communication", Endo and Yamasaki, Shingakuron (B), J67-B.12, pp. 1462 - 1469 (1984)). In this system, when one image is transmitted, rough image information is transmitted first, and additional information is transmitted later, thereby generating detailed image data. However, since the rough image information to be transmitted first is generated by omitting pixels at specific intervals from an original image, valid image information cannot often be transmitted at an initial stage depending on the type of image. For example, a straight line having a width of one pixel may be deleted. When dynamic arithmetic encoding is employed in the sequential reproduction/encoding system, if images at respective stages are classified to the same number of states, the number of symbols assigned to each state is decreased at a stage having a low resolution. For this reason, encoding is ended before a skew value in dynamic arithmetic encoding can be sufficiently converged, resulting in poor encoding efficiency. European Patent Specification EP-A-0,146,728 discloses an image encoding apparatus in which an image is reduced and encoding is carried out on both the image and the reduced image data. In this apparatus, the position of reference pixels utilised for encoding are unchanged irrespective of resolution. European Patent Specification No. EP-A-0,357,388 (a publication acc. to Art. 54(3) EPC) discloses image encoding apparatus in which a pixel of interest can be encoded using reference pixels of different positions. However this prior specification does not disclose the use of different reference pixels when a reduced image is encoded. The present invention has been made in consideration of the above situation, and is concerned with providing an image encoding apparatus which can efficiently encode image information without omitting the image information. An embodiment of the present invention provides an image encoding apparatus in which, when a second image having a different resolution is formed based on a first image and the images are encoded, the second image can be encoded without losing information of the first image. Another concern of the present invention is to provide an image encoding apparatus which can execute efficient encoding by performing encoding suitable for a resolution of an image to be encoded. In accordance with one aspect of the present invention there is provided image processing apparatus as set out in claim 1. In accordance with a second aspect there is provided a method of image processing as set out in claim 6. The present invention will be more readily understood from the following description which is given by way of example and with reference to the accompanying drawings, in which: Fig. 1 is a block diagram of an embodiment of an encoding unit according to the present invention; Fig. 2 is a block diagram of a reduction circuit; Fig. 3 is a view showing coefficients of a low-pass filter; Fig. 4 is a block diagram showing an embodiment of the low-pass filter; Fig. 5 is a view for explaining an operation of a sub-sampling circuit; Fig. 6 is a block diagram of exception processing for fine line processing; Figs. 7A to 8B show exceptional patterns; Fig. 9 is a block diagram of a reference pixel determination means; Fig. 10 is a view for explaining a reference pixel on an encoding surface; Fig. 11 is a view for explaining a reference pixel of pixels at an immediately preceding stage; Fig. 12 is a block diagram of a circuit for dynamically changing a skew value Q; Fig. 13 is a block diagram of an arithmetic code encoder; Fig. 14 is a block diagram of an arithmetic code decoder; Fig. 15 is a block diagram of an embodiment of a decoding unit according to the present invention; Fig. 16 is a view showing another embodiment of adjusting a smoothing effect; Fig. 17 is a block diagram of another embodiment of a circuit for dynamically changing a value Q; Fig. 18 is a table showing reference pixels at respective stages of this embodiment; Fig. 19 is a table for determining arithmetic code parameters; and Fig. 20 is a table used in Embodiment 2 of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS : Some preferred embodiments of the present invention will be described below. Embodiment 1 Fig. 1 shows an embodiment of an encoding unit of the present invention. Original image data I₁ is stored in a frame memory 1. The original image data read out from the frame memory 1 is reduced by a reduction circuit 2, and is output as a signal 101. At the same time, the original image data read out from the frame memory 1 is input to a fine line detection circuit 3. The fine line detection circuit 3 detects a fine line, and outputs selection signals S₁ and S₂ in accordance with the detection result. The signals S₁ and S₂ are input to a selector 4. The selector 4 outputs "1", "0", or the signal 101 as a signal 103. The signal 103 is stored in a frame memory 5. The signal stored in the frame memory 5 corresponds to 1/2 original image data. The fine line detection circuit 3 is arranged in parallel with the reduction circuit 2, and reduced image data is formed based on the output from the fine line detection circuit 3. Thus, a fine line which would be lost if only the reduction circuit 2 is arranged can be preserved. Similarly, the 1/2 image data read out from the frame memory 5 is reduced to a 1/4 original image by a reduction circuit 6, a fine line detection circuit 7, and a selector 8, and is stored in a frame memory 9 as 1/4 image data. Reference pixel determination means (or circuits) 10, 12, and 14 respectively detect sizes (the numbers of pixels) of image data stored in the frame memories 9, 5, and 1, and set the optimal numbers of pixels and optimal reference pixel positions in encoding. An encoder 11 encodes the 1/4 image data stored in the frame memory 9 using the reference pixel set by the reference pixel determination means 10, and outputs the encoded data as a first-stage signal 107. Similarly, encoders 13 and 15 encode the 1/2 image data and original image data stored in the frame memories 5 and 1 using the reference pixels set by the reference pixel determination means 12 and 14, and output encoded data as second- and third-stage signals 108 and 109, respectively. In this manner, the first- to third-stage image data are encoded and transmitted in turn in the order starting from image data having a lower resolution, so that a receiver side can quickly identify the entire image. If the receiver side does not need the data, it can stop the following transmission. Thus, an efficient image communication service can be provided. So far, a description has been made up to the third stage. However, the number of encoding stages can be arbitrarily expanded, as a matter of course. Fig. 2 is a block diagram of the reduction circuits 2 and 6. Each reduction circuit comprises a low-pass filter 16, a comparator 17, and a sub-sampling circuit 18. A parameter C for adjusting a degree of smoothness is input to the low-pass filter 16. A threshold value T is input to the comparator 17. These values are determined based on required image quality and encoding efficiency. A signal output from the low-pass filter 16 is binarized by the comparator 17 based on the threshold value T. The binarized signal is thinned by the sub-sampling circuit 18 to 1/2 in the vertical and horizontal directions. Fig. 3 shows filter coefficients of the low-pass filter 16 having a 3 x 3 pixel size. A weighting coefficient of the central pixel is represented by C, a weighting coefficient of 1 is assigned to four pixels closest to the central pixel, and a weighting coefficient of 1 is assigned to the next closest pixels. Thus, if the value of the central pixel is represented by D i,j (i = 1 to M, j = 1 to N: M and N are pixel sizes in the horizontal and vertical directions), an average density W is given by: W = (D i-1,j-1 +2D i,j-1 +D i+1,j-1 +2D i-1,j +CD i,j +2D i+1,j +D i-1,j+1 +2D i,j+1 +D i+1,j+1 This density is binarized by the threshold value T (T = (12 + C)/2 is a standard setup value). The density W and the threshold value T have the following correspondences: Fig. 4 is a block diagram of the low-pass filter 16. An input signal is held in latches 20a, 20b, and 20c to be delayed by one pixel clock. An input signal delayed by one line is held in each of line memories 19-a and 19-b. Thus, signals whose pixel positions correspond to the latches 20a, 20b, and 20c can be obtained from latches 20d, 20e, and 20f or latches 20g, 20h, and 20i. Thus, data of nine pixels shown in Fig. 3 can be obtained. The output signals from the latches 20a, 20c, 20g, and 20i are added by an adder 21a to calculate a total sum. The total sum output from the adder 21a is multiplied with a constant (x1) by a multiplier 22a. The output signals from the latches 20b, 20d, 20f, and 20h are added by an adder 21b to calculate a total sum. The total sum from the adder 21b is multiplied with a constant (x2) by a multiplier 22b. The output signal from the latch 20e (i.e, data of the central pixel) is multiplied with a constant (xC) by a multiplier 22c. The C value can be externally set. The output signals from the multipliers 22a, 22b, and 22c are added by an adder 23 to calculate a total sum W. The total sum W is then output. The output signal from the adder 23 is compared with the threshold value T by the comparator 17 (Fig. 2). When the total sum W is larger than the threshold value T, a signal "1" is obtained; otherwise, a signal "0" is obtained. The threshold value T can also be externally set. The threshold value T takes a value of T = (12 + C)/2 as a standard value. Fig. 5 is a view for explaining an operation of the sub-sampling circuit 18. Hatched pixel data (Fig. 5) are sampled at every other timings respectively in the main scan and sub scan directions, thereby forming a sub-sampling image of a 1/2 size (1/4 in terms of an area). This operation can be easily realized by adjusting latch timings of image data. The fine line detection circuits 3 and 7 will be described below. When image reduction is performed by only the reduction circuits 2 and 6 (Fig. 2), a fine line or the like of a one-pixel width may be lost. Figs. 7A and 8A show examples of such images. In the case of a black line of a one-pixel width which does not pass the central pixel of the low-pass filter, as shown in Fig. 7A, the low-pass filter output (Fig. 3) becomes 4, and this black line disappears unless the threshold value T of the comparator (Fig. 2) is set to be 4 or less. Similarly, a white line (black background) shown in Fig. 8A disappears unless the threshold value T is set to be (C+8) or more. In consideration of the above drawbacks, the fine line detection circuits 3 and 7 shown in Fig. 2 detect fine lines according to the following principle. In general, an edge of an image can be detected by a linear differential filter. For example, in the case of the image shown in Fig. 7A, an edge changing from black to white can be detected by a linear differential filter of 3 x 3 pixels shown in Fig. 7B. More specifically, only when an edge changing from black to white is present, a power of a filtering result is increased. The filtering result in Fig. 7A is 3. In the case of an image shown in Fig. 8A, an edge changing from white to black can be detected by a linear differential filter shown in Fig. 8B. In this case, a power of a filtering result is also 3. Fig. 6 is a block diagram of the fine line detection circuits 3 and 7. In Fig. 6, an arithmetic operation for fine line detection using the linear differential filter is simplified. The circuit shown in Fig. 6 includes line memories 24a, 24b, and 24c for respectively holding input pixels of one line, latches 25a to 25k for temporarily storing reference pixels used in an arithmetic operation corresponding to linear differentiation, a latch 60 for adjusting a timing, AND gates 61a to 61ℓ, inverters 62a to 62n, and OR gates 63a and 63b. An input signal is held in the latches 25i, 25j, and 25k to be delayed by one pixel clock. The line memories 24a, 24b, and 24c respectively hold input signals delayed by one line. Signals whose pixel positions correspond to the latches 25i, 25j, and 25k can be obtained from the latches 25f, 25g, and 25h, and the latches 25c, 25d, and 25e. In this case, pixel data (central pixel) held in the latch 25g corresponds to data held in the latch 20e shown in Fig. 4. More specifically, 3 x 3 pixels stored in the latches 25k, 25j, 25i, 25h, 25g, 25f, 25e, 25d, and 25c respectively correspond to 3 x 3 pixel latches 20a, 20b, 20c, 20d, 20e, 20f, 20g, 20h, and 20i in Fig. 4. The latch 25a latches a pixel two lines before the pixel of interest through the line memory 24c and the latch 60. The latch 25b latches a pixel two pixels before the pixel of interest. A linear differential value can be calculated based on the 3 x 3 pixels latched in the latches 25c to 25k in Fig. 6. In order to simplify an arithmetic operation, the following logical formula is taken into consideration. If data held in the latches 25a to 25k in Fig. 6 are represented by a to k , reversed data of the data a to k are represented by a to k , a logical sum is represented by "+", and a logical product is represented by "·", the following logical formula can be considered in place of the linear differential filter shown in Fig. 7B. Note that the black line having a one-pixel width shown in Fig. 7A corresponds to c , f , and i . V B = (c·f·i)·( e · h · k ) If V B = 1, the presence of an edge is determined; if V B = 0, the absence of an edge is determined. Thus, an edge changing from black to white can be detected. However, since an edge of a fine line of two pixels or more is also detected, this detection is not preferable in reduction for reducing two pixels to one pixel. Therefore, only when a pixel one pixel before the black line in Fig. 7A, i.e., a pixel latched in the latch 25b in Fig. 6 is white, this detection is performed, so that only a line edge of a one-pixel width can be detected. That is, V′ B = (c·f·i)·( e · h · k )· b Thus, it can be determined that when V' B = 1, a line of a one-pixel width is detected; when V' B = 0, no line is detected. Similarly, the white line of a one-pixel width shown in Fig. 8A can be detected by: V' B = ( c · f · i )·(e·h·k)·b Thus, it can be determined that the white line having a one-pixel width is detected when V' W = 1. The logical formulas V' B and V' W are used for detecting vertical black and white lines each having a one-pixel width. Logical formulas for horizontal black and white lines each having a one-pixel width can be similarly obtained. If these formulas are represented by H' B and H' W , they are expressed as: H' B = (c·d·e)·( i · j · k )· a H' W = ( c · d · e )·(i·j·k)·a When H' B and H' W are 1, the presence of the black and white lines having a one-line width can be detected. The vertical and horizontal black and white lines having a one-pixel width can be simultaneously detected by the following equations: S1 = (c·f·i)·( e · h · k )· b + (c·d·e)·( i · j · k )· a S2 = ( c · f · i )·(e·h·k)·b + ( c · d · e )·(i·j·k)·a More specifically, when the signal S1 is "1", it indicates that a black line of a one-pixel width is present; when the signal S2 is "1", it indicates that a white line of a one-pixel width is present. When the signals S1 and S2 are used as compensation signals of the output results of the reduction circuits 2 and 6 (Fig. 1), reduction can be performed while preserving a fine line of a one-pixel width. When (S1, S2) = (1, 0) in Fig. 1, the outputs from the selectors 4 and 8 are "1", i.e., a signal indicating that a black line of a one-pixel width is detected is output; when (S1, S2) = (0, 1), the outputs from the selectors 4 and 8 are "0", i.e., a signal indicating that a white line of a one-pixel width is detected is output. Other cases, signals output from the reduction circuits 2 and 6 are selected by the selectors 4 and 8. As described above, when a simple fine line detection circuit which performs an operation equivalent to the linear differential filter is arranged, a line which is lost by low-pass filtering can be preserved, and quality of a reduced image can be improved. In this embodiment, the line memories and latches constituting the low-pass filter are different from those constituting the fine line detection circuits. Some of the line memories and latches of the fine line detection circuit can be commonly used as those for the low-pass filter. Encoding in the encoders 11, 13, and 15 will be described below. The encoders 11, 13, and 15 perform an encoding operation in accordance with arithmetic codes. With the arithmetic code of this embodiment, a value of a pixel of interest is predicted from surrounding pixels. A symbol of the predicted pixel is given by a major symbol, symbols of other pixels are given by minor symbols, and a probability of generation of minor symbols is represented by P. With these data, encoding is performed. If a binary arithmetic code and its auxiliary amount for a code string S are respectively represented by C(S) and A(S), encoding progresses by the following arithmetic operations: where A(null) = 0.11···1 Since P(S) is approximated to P(S) = 2 -Q(S) , multiplication can be performed by only shifting a binary value. Q is called a skew value, and when this parameter is changed, an arithmetic code can be dynamically used. In decoding, a binary signal string S is given by S = S' x S". When decoding is performed up to S', C(S) and C(S') + A(S'0) are compared. When C(S) > C(S') + A(S'0), x is decoded to be x = 1; otherwise, x is decoded to be x = 0. Fig. 9 is a block diagram of a circuit for predicting a pixel of interest (target pixel). A frame memory 26 stores image data to be encoded. A frame memory 27 stores image data obtained by 1/2 sub-sampling the image (image sent in the immediately preceding stage) stored in the frame memory 26. The memories 26 and 27 respectively comprise two-dimensional memories. If a clock of an x address is represented by ₁ and a clock of a y address is represented by ₂, the clocks ₁ and ₂ are supplied to the frame memory A, and clocks 1/2₁ and 1/2₂ each having a 1/2 frequency are supplied to the frame memory B. Thus, one pixel in the frame memory B corresponds to 2 x 2, i.e,. four pixels in the frame memory A. Data from the frame memories 26 and 27 become one-line delayed data in line memories 28 and 29, and these data are then input to latches 30a to 30c and 31a and 31b. Each latch latches data delayed by one pixel. If the outputs from these latches are caused to correspond to pixel positions shown in Fig. 10, a pixel of interest (*) corresponds to the output from the latch 30d; a pixel No. 1 in Fig. 10, the latch 30e; No. 2, the latch 30b; No. 3, 30a; and No. 4, the latch 30c. In pixel positions shown in Fig. 11, a pixel No. 5 corresponds to the output from the latch 31b; No. 6, the latch 31a; No. 7, the latch 31d; No. 8, the latch 31c; and No. 9, the latch 31e. Note that the pixel No. 5 in Fig. 11 is one including a pixel of interest (target pixel). A 2-bit signal for identifying the position of the pixel of interest in the pixel No. 5 (four states of upper left, upper right, lower left, and lower right) is generated by a counter 32 based on the clocks ₁ and ₂. AND gates 33a to 33k calculate logical products between signals on lines 201 to 211 set by a controller (not shown) and outputs from the latches 30a to 30c, 30e, and 31a to 31e, and the counter, respectively, thereby outputting a prediction signal 300 of the pixel of interest. The operation of this portion will be described in detail below. In general, when encoding is dynamically performed, a pixel of interest is predicted from states or values of surrounding pixels, and a skew value is updated while calculating a "hit" probability of prediction. Therefore, in order to reflect the statistic nature of a symbol string to be encoded in a skew value, a considerable number of symbols for grasping the statistic nature are required in each state. For example, if the total number of symbols is 65,536, when the number of states is 2¹¹, an average number of symbols assigned to each state is 32, and it is difficult to grasp the statistic nature of the symbol string in each state. This embodiment takes this respect into consideration, and a controller (not shown) controls the number of predicted states or values in accordance with the number of symbols to be encoded. More specifically, in hierarchical encoding, since an image is reduced in every stage, the number of symbols to be encoded is smallest in the first stage, and it is increased toward the higher stages like the second stage, the third stage,.... When the number of symbols is small, the signals on lines 203, 209, and 211 are set to be "1", and the signals on the remaining lines are set to be "0", so that 3 bits (8 states) can be used as the number of states or values. As the number of symbols is increased, the number of "1"s set in the signals 201 to 211 is increased, thus increasing the number of states. Fig. 18 shows an example of values of the signals on lines 201 to 211 in this embodiment. This is merely an example, and the way of setting the states or values and signals to be set are not limited to this. Fig. 12 is a block diagram of a circuit for dynamically changing the skew value Q and a minor symbol lps. A status signal G300 and a pixel of interest D301 are respectively input to a status counter 40 and a minor symbol counter 41. In each counter, internal counters corresponding in number to the states are prepared to allow a count operation in units of states, and are selected by a status signal G. The status counter 40 counts the number of generation times of a certain state for each state. When the count value exceeds a setup value S302, the counter 40 outputs an updating signal 303. The counter 41 counts, in units of states, the number of minor symbols generated from when the immediately preceding updating signal is generated until the next updating signal is generated, and outputs a count value ℓc 304. More specifically, of S times of generation of a certain state, ℓc minor symbols are generated. In the following description, a state of S = 16 will be exemplified. An LUT 42 prestores Q G 305 as the next encoding parameter, a signal 306 for reversing mps (major symbols) so far, and data called a zero count (CT) 307 for generation of ℓc minor symbols. The zero count is a value representing a count of "0" states so far, i.e., states wherein no minor symbol ℓc is generated in S states. More specifically, when CT = 0 is initially set, if a state wherein ℓc is zero occurs among S states, CT is updated to be CT = 1. Thereafter, if such a state continues twice, three times,..., CT is updated to CT = 2, CT = 3,.... Fig. 19 shows an example of the content of the LUT 42. In an initial state, CT = 0 is set, and new Q G and the next CT value are obtained based on the ℓc value. For example, if CT = 0 and ℓc = 0, Q G = 4 and CT = 1. When the next updating signal 303 is input, Q G = 5 and CT = 2 if CT = 1 and ℓc = 0. When CT = 0 and ℓc = 1, the above values are updated to Q G = 4 and CT = 1. An equation for forming this table is given by: Q G ≅ -log2 ℓc S x (CT + 1) When ℓc = 0, a calculation is made with ℓc = 1. where N[x] is a closest integer value. In equation (1), an exponential part when the generation probability of minor symbols generated when S states continue (CT+1) times is approximated by a power of 2 is given by Q G . In equation (2), CT recalculates the number of sets of S "ℓc = 0"s assuming that the number of minor symbols generated is 1/2 QG . Since 2 QG - 1 represents the number of major symbols, CT is obtained by dividing it by S. When CT = 0 and ℓc > S/2 + 1, this state is processed as a special case, and an mps reversal signal is output to reverse a value as a current minor symbol (i.e., 0 ⇆ 1). If the state thereafter does not correspond to CT = 0 and ℓc > S/2 + 1, encoding processing is normally performed while the minor symbol is left changed. In Fig. 12, a latch 43 latches the current skew value Q G 305, the mps reversal signal 306, and CT 307, and latches the output from the LUT 42 in response to the updating signal 303 to be updated to a new state. The LUT 42 receives the count signal ℓc of minor symbols, and the previous CT value 307, and outputs the skew value Q G , the mps reversal signal, and CT which are updated according to Fig. 19. An mps value latch 44 latches a major symbol used in encoding so far, and this state is updated by the mps reversal signal. An mps/ ℓps signal as an output of the latch 44 is supplied to the minor symbol counter. Encoding is performed based on the determined skew value Q G and mps/ ℓps . Fig. 13 is a block diagram of an arithmetic code encoder. If a skew value is assumed to be the skew value Q G 305 from the latch 43 shown in Fig. 12, the skew value Q G 305 and the mps/ ℓps signal 308 are input, so that an arithmetic operation given by equation (1) of pixel of interest data D is performed by an encoder, thus obtaining encoding data 401. Fig. 14 is a block diagram of a decoder. The same prediction circuit (Fig. 9) and dynamic adaptive circuit as in the encoding unit are prepared in the decoding side. A decoder 46 performs a decoding arithmetic operation using a skew value Q D 321 of a decoder side, and a minor symbol LPS D 322 and receiving data 323 from an LUT, thus obtaining decoding data 402. Fig. 15 shows an embodiment of a decoding unit. The first-stage signal 107 is decoded by a decoder 47, and is stored in a frame memory 50. This signal is converted to high-resolution data by x4 interpolation processing of an interpolation device 53. The high-resolution data is stored in a video memory 56 after a selector 55 is switched by a controller 59. The video memory 56 comprises a 2-port memory. Therefore, an image obtained at a receiver side is always displayed on a monitor 57. The second-stage signal 108 is decoded by a decoder 48 with reference to the data stored in the frame memory 50, and is stored in a frame memory 51. This data is subjected to x2 interpolation processing by an interpolation device 54, and is stored in the video memory 56 upon switching of the selector 55. After the third-stage signal 109 is similarly decoded, it is displayed on the monitor 57. A signal from a frame memory 52 as a decoded third-stage image signal is output to a printer 58 to obtain a hard copy. Embodiment 2 The first embodiment employs a system for adjusting a degree of smoothness in accordance with a weighting coefficient of the central value of a 3 x 3 coefficient matrix of the low-pass filter. As another embodiment of sub-sampling, when conversion data W is determined based on original image data D A , D B , D C , and D D , as shown in Fig. 16, if the data W is given by: W = α 1 D A + α 2 D B + α 2 D C + α 2 D D coefficient values of α₁ and α₂ are changed, so that the degree of smoothness and encoding efficiency can be adjusted. In this case, T = α 1 + 3α 2 2 When W ≥ T, 1; When W < T, 0. When α₁ » α₂, a ratio of determining data based on D A is increased, and encoding efficiency is improved. When α₁ = α₂, a smoothing effect for an image is improved. Embodiment 3 As another method for determining the content shown in Fig. 19, ℓc/S is obtained from the number of minor symbols ℓc among S pixels to determine a new skew value Q G from Fig. 20. An initial value is Q G = 1, and Q G is updated according to the value of ℓc/S. In the second and subsequent operations, Q G is determined using the updated Q G and ℓc/S. A value Q G ′ in updating is calculated by, e.g., the following equation, and is stored in a table: 1 2 QG' ≅ 1 2 QG + ℓc S 2 When Q = 1 and ℓc/S > 1/2 (500 in Fig. 20), major and minor symbols are reversed. Fig. 17 shows an embodiment in this case, and a Q G signal 305 is input to an LUT 42 to determine Q G to be updated. Embodiment 4 In the above embodiment, the available number of states is controlled in each stage. In this embodiment, the number of states can be controlled in accordance with an image size to be encoded. For example, when an image size of a third stage is 1024 x 1024 pixels, the number of states can be controlled to 2⁷ states; when it is 3072 x 4096 pixels, it can be controlled to 2¹¹ states. In addition, the stages can be further segmented, and the reference pixel position and the number of reference pixels can be changed in units of image sizes. If the type of data (e.g., a character image, halftone image, or the like) is known in advance, a reference pixel position suitable therefore is set to perform encoding. As described above, in a system for encoding images stepwise from one having a lower resolution, the following effects can be provided. (1) A filter for adjusting a smoothing effect for an image before it is subjected to resolution conversion is added, so that quality and encoding efficiency of an image at an initial stage to be transmitted can be arbitrarily selected. (2) Simple exception processing as an application of a linear differential filter is provided, so that a character or a fine line which is lost in the prior are can be reproduced. (3) The number of reference pixels and their positions are determined in accordance with the resolution of an image to be encoded, so that encoding efficiency approaches its entropy.

Claims: Image encoding apparatus comprising reduction means (2, 6) for reducing the resolution of an input image, and encoding means (15, 13, 11) for encoding the input image and the reduced image generated by the reduction means, the encoding means encoding a target pixel with reference to reference pixels, and characterised in that the encoding means (15, 13, 11) encodes a target pixel of the input image with reference to a first set of reference pixels associated with the target to produce a reduced image and encodes a target pixel of the reduced image with reference to a second set of reference pixels associated with the target pixel, the reference pixels used in encoding a target pixel in the reduced image having positions with regard to the target pixel which differ from the positions of the first set of reference pixels with regard to their associated target pixel. Apparatus according to claim 1, wherein said encoding means (15, 13, 11) encodes the target pixel with reference to pixels surrounding the target pixel. Apparatus according to either of claims 1 or 2, wherein said encoding means (15, 13, 11) predicts the value of the target pixel with reference to the associated reference pixels. Apparatus according to any one of the preceding claims, wherein said reduction means (2, 6) smooths the image it receives, binarises the smoothed image, and subsamples the binary image to form an image of reduced resolution. Apparatus according to claims 2 and 3, wherein for predicting said target pixel said encoding means (15,13,11) are connected to reference pixel determination means (201-211, 33a-k) for determining the positions of said reference pixels in accordance with the values of surrounding pixels. An image encoding method, comprising the steps of: inputting a first image; forming from the first image a second image having a resolution lower than that of the first image; and encoding the first and second images by encoding target pixels with reference to reference pixels, and CHARACTERISED IN THAT when encoding the first image the target pixel is encoded with reference to a first set of reference pixels, and when encoding the second image the target pixel is encoded with reference to a second set of reference pixels which are different in position from the first set of reference pixels. A method according to claim 6, wherein in said encoding step the target pixel is encoded with reference to surrounding pixels of the target pixel. A method according to either claim 6 or 7, wherein in said encoding step a value of the target pixel is predicted with reference to the reference pixels. A method according to any one of claims 6 to 8, wherein in said reduction step the first image is smoothed, the smoothed image is binarized, and the binary image is sub-sampled to form the second image. A method according to any one of claims 6 to 9, and further comprising the steps of instructing resolution of an image to be encoded and determining the positions of reference pixels in accordance with the instructed resolution of the image to be encoded.

Inventors: HIRABAYASHI YASUJI, KATAYAMA AKIHIRO, MAEDA MITSURU, YOSHIDA TADASHI, HIRABAYASHI, YASUJI, KATAYAMA, AKIHIRO, MAEDA, MITSURU, YOSHIDA, TADASHI
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1989
Main classification: H04N1
IPC codes: H04N1