Image compression method and decompression method
Patent Information
- Application Number
- KR1020240171778
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2026-08-14
- Estimated Expiration
- 2044-11-27
Smart Images

Figure 112024131002670-PAT00007_ABST
Abstract
Description
Technology Field
[0001] The present invention relates to image compression through encoding and image restoration through decoding. Specifically, it relates to a processing method for compressing and restoring data in a subband format in color space and a computer-readable recording medium having a program for executing the same. Background Technology
[0002] In modern society, various video media and display devices for outputting them have become ubiquitous. As one example, recent automobiles are manufactured equipped with one or more display devices inside; consumers can watch various videos through these devices, and when necessary, video captured by cameras mounted on the vehicle can be displayed on the device to view footage helpful for driving and parking.
[0003] Regarding video media and display devices, consumers consistently demand larger screen sizes and higher resolutions; however, increases in screen size and resolution affect not only the display devices that output the video but also the means of transmitting and receiving video-related data. For example, when providing high-resolution video acquired from cameras in autonomous vehicles, higher-specification cables are required between the camera and the display device, which increases the cost of the related equipment. Although various methods for transmitting video within a vehicle have been developed to date, these methods have the disadvantage of resulting in a decrease in resolution. The problem to be solved
[0004] Accordingly, the present invention is derived to solve the aforementioned problems, and one aspect of the present invention aims to provide an image compression processing method and a compressed image restoration processing method that can minimize loss while providing high compression efficiency by eliminating the inherent redundancy of each RGB component of an image.
[0005] Other objects of the present invention will become more apparent through the embodiments described below. means of solving the problem
[0006] One aspect of the present invention provides an image compression processing method that compresses and outputs an image through encoding. An image compression processing method according to one aspect of the present invention generates an original matrix (A) which is an M×N matrix from an original image having an M×N resolution, wherein a of the original matrix (A) 0,0 to a M-1,N-1 The method may include: a step of generating the original matrix (A) such that the elements of the original matrix (A) represent characteristic values of each pixel of the original image; a step of dividing the original matrix (A) into a plurality of disjoint minor matrices (S), wherein the plurality of minor matrices (S) are all matrices of the same size and each element within the plurality of minor matrices (S) is a specific element within the original matrix (A), and the element at a corresponding position within the plurality of minor matrices (S) is at a distance of 1 or less from the element corresponding to the reference matrix (I), which is one of the plurality of minor matrices (S), based on the left-right and diagonal directions within the original matrix (A); and a step of converting the plurality of minor matrices (S) into a difference matrix (D), wherein each element within the difference matrix (D) corresponds to the difference between the element at a corresponding position within the minor matrix (S) and the element at a corresponding position within the reference matrix (I).
[0007] The image compression processing method according to the present invention may comprise one or more of the following embodiments. For example, the step of generating the original matrix (A) may include the step of generating the original matrix (A) in correspondence with each of the plurality of primary colors constituting the original image, and the characteristic value may represent the brightness of the corresponding color among the plurality of primary colors.
[0008] According to one embodiment of the present invention, in the step of dividing the original matrix (A) into the plurality of submatrices (S), the original matrix (A) may be divided into four submatrices (S0, S1, S2, S3), wherein the elements of the first submatrice (S0) are a 2i,2j Includes, and the elements of the second matrix (S1) are a 2i,2j+1 Includes, and the elements of the third submatrix (S2) are a 2i+1,2j Includes, and the elements of the fourth submatrix (S3) are a 2i+1,2j+1 It may include (where i is an integer from 0 to M / 2-1, and j is an integer from 0 to N / 2-1), and the reference matrix (I) may be any one of the first to fourth submatrices (S0, S1, S2, S3).
[0009] According to another embodiment of the present invention, in the step of dividing the original matrix (A) into the plurality of submatrices (S), the original matrix (A) may be divided into nine submatrices (S0~S8), wherein the nine submatrices (S0~S8) are a 3i,3j , a 3i,3j+1 , a 3i,3j+2 , a 3i+1,3j , a 3i+1,3j+1 , a 3i+1,3j+2 , a 3i+2,3j , a 3i+2,3j+1 , a 3i+2,3j+2 (Here, i is an integer from 0 to M / 3-1, and j is an integer from 0 to N / 3-1) may include distinct elements, and the reference matrix (I) is a among the 9 submatrices (S0~S8). 3i+1,3j+1 It can be a minor matrix containing.
[0010] The step of converting the above submatrix (S) into the above difference matrix (D) may include the step of setting the characteristic value of the corresponding element in the above difference matrix (D) to 0 if the difference between the element at the corresponding position in the above submatrix (S) and the element at the corresponding position in the above reference matrix (I) is less than a predetermined threshold value.
[0011] The above original image may be at least one of a plurality of frames included in the original video. In this case, the original video may include a first frame and a second frame, and the original image may include the first frame and the second frame, and the image compression processing method may further include the step of generating the original matrix (A), the step of dividing the original matrix (A) into a plurality of sub-matrices (S), and the step of converting the sub-matrices (S) into the difference matrix (D) after or simultaneously while the first frame is used as the original image, the step of extracting reference data from the first frame; and the step of extracting two-dimensional difference data between the second frame and the first frame based on the reference data.
[0012] Another aspect of the present invention provides a computer-readable recording medium having a program recorded thereon for executing an image compression processing method for compressing and outputting an image through encoding. The program of the computer-readable recording medium according to one aspect of the present invention may be configured to execute the aforementioned image compression processing method.
[0013] Another aspect of the present invention provides a restoration processing method for restoring and outputting a compressed image through decoding. A compressed image restoration processing method according to one aspect of the present invention may include the step of creating a plurality of minor matrices (S) from a reference matrix (I) and a difference matrix (D), wherein the minor matrix (S) corresponding to the reference matrix (I) contains each element of the reference matrix (I) as is, and the minor matrix (S) corresponding to the difference matrix (D) has each element corresponding to the difference between the element at the corresponding position in the reference matrix (I) and the element at the corresponding position in the difference matrix (D); the step of combining the plurality of minor matrices (S) to synthesize an original matrix (A); and the step of constructing a restored image from the original matrix (A).
[0014] Another aspect of the present invention provides a computer-readable recording medium having a program recorded thereon for executing a compressed image restoration processing method for restoring and outputting a compressed image through decoding, wherein the program is configured to execute the aforementioned compressed image restoration processing method. The program of the computer-readable recording medium according to one aspect of the present invention may be configured to execute the aforementioned compressed image restoration processing method. Effects of the invention
[0015] According to the means for solving the problem of the present invention as described above, various effects including the following can be expected. However, the present invention is not required to exhibit all of the following effects to be valid.
[0016] The image compression processing method and compressed image restoration processing method according to the embodiments of the present invention can provide high compression efficiency while minimizing loss or maintaining a substantially lossless state.
[0017] The image compression processing method and compressed image restoration processing method according to the embodiments of the present invention do not require a large amount of computation, making it possible to provide ultralow latency and enable real-time processing.
[0018] In particular, when encoding and decoding an original image corresponding to each of a plurality of primary colors according to one embodiment of the present invention, the use of a conventional color space converter can be omitted, which has the advantage of reducing the specifications and costs of the equipment required for displaying the image. Brief explanation of the drawing
[0019] FIG. 1 is a flowchart illustrating an exemplary image compression processing method according to an embodiment of the present invention. FIG. 2 is a diagram showing a comparison between a small matrix generated in an image compression processing method according to an embodiment of the present invention and an original matrix. FIG. 3 is a diagram showing the difference matrix generated in an image compression processing method according to an embodiment of the present invention compared with the original matrix. FIG. 4 is a flowchart exemplarily illustrating a compressed image restoration processing method according to an embodiment of the present invention. FIG. 5 is a diagram showing a restored image obtained by a compressed image restoration processing method according to an embodiment of the present invention, compared with an original image. FIG. 6 is a flowchart exemplarily illustrating an image compression processing method according to an embodiment of the present invention. FIG. 7 is a conceptual diagram exemplarily illustrating an image compression processing method according to an embodiment of the present invention. FIG. 8 is a flowchart exemplarily illustrating a compressed image restoration processing method according to an embodiment of the present invention. FIG. 9 is a conceptual diagram exemplarily illustrating a compressed image restoration processing method according to an embodiment of the present invention. Specific details for implementing the invention
[0020] The present invention is capable of various modifications and may have various embodiments; specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, and it should be understood that it includes all modifications, equivalents, and substitutions that fall within the spirit and scope of the present invention. In describing the present invention, detailed descriptions of related prior art are omitted if it is determined that such detailed descriptions may obscure the essence of the present invention.
[0021] The terms used in this application are used merely to describe specific embodiments and are not intended to limit the invention. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, terms such as "comprising" or "having" are intended to specify the presence of the features, numbers, steps, actions, components, parts, or combinations thereof described in the specification, and should be understood as not precluding the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.
[0022] Terms such as "first," "second," etc., may be used to describe various components, but said components should not be limited by said terms. These terms are used solely for the purpose of distinguishing one component from another.
[0023] Hereinafter, embodiments according to the present invention will be described in detail with reference to the attached drawings. In describing with reference to the attached drawings, identical or corresponding components are given the same reference number regardless of the drawing symbols, and redundant descriptions thereof will be omitted.
[0024] The present invention relates to a technique known as SBCSC (Sub-Band Color Space Compression), which can be utilized as an image compression processing method and a compressed image restoration processing method. Specifically, one aspect of the present invention provides an image compression processing method that compresses and outputs an image through encoding, and another aspect provides an image compression processing method that compresses and outputs an image through encoding, and a restoration processing method that restores and outputs the compressed image through decoding. One aspect of the present invention also provides a recording medium on which a program for executing the above image compression processing method is recorded, and a recording medium on which a program for executing the above compressed image restoration processing method is recorded.
[0025] For the sake of convenience of explanation, the image subject to compression will be referred to as the original image (O), and the image restored by decoding after encoding will be referred to as the restored image (O'). However, the original image (O) may be a single image associated with a picture or photograph, or it may be a frame included in a video. Below, we will first explain the process of compressing a single original image (O) and the process of restoring it, and then explain the process of compressing and restoring the video by applying the algorithm of the present invention to the video.
[0026] FIG. 1 is a flowchart illustrating an exemplary image compression processing method according to an embodiment of the present invention. The image compression processing method illustrated in FIG. 1 may be performed by a processor (not shown) of a transmission device capable of reading a recording medium on which a program for executing the method is recorded. The transmission device mentioned herein may further include a camera to acquire an image, or may receive an original image from another device via wired or wireless communication.
[0027] For convenience of explanation, the original image (O) processed by the image compression method is assumed to have a resolution of M×N. Here, M and N are natural numbers greater than 0. In some embodiments, M and N may be even numbers. In some embodiments, M and N may be multiples of 3.
[0028] An image compression processing method according to one embodiment of the present invention can be performed by classifying the original image (O) by color. That is, the image compression processing method can be performed for each of the plurality of primary colors constituting the original image (O). For example, in the example illustrated in FIG. 1, assuming the case where the original image (O) is composed of an RGB color space, it is divided into an R-channel image (R), a G-channel image (G), and a B-channel image (B). Of course, the types and number of primary colors constituting the original image (O) may vary. In addition, if the original image (O) is not a color image, the image compression processing method may be performed for a single color.
[0029] A processor (not shown) of a transmission device, etc., may perform a step (S110) of generating an original matrix (A) from an original image (O). As described above, the image compression processing method may be performed by separating the original image (O) by color, and in this case, the step (S110) of generating an original matrix (A) from the original image (O) may include a step of generating each original matrix (A) corresponding to a plurality of primary colors constituting the original image (O) (i.e., from each color channel image (R, G, B)).
[0030] To aid understanding, let us give a specific example. When the resolution of the original image (O) is 6×8 (i.e., M=6, N=8), the original image (O) can be represented by an M×N matrix as shown in Equation 1 below.
[0031]
[0032] The original matrix (A) is an M×N matrix as shown above, a0,0 to a M-1,N-1 It is a matrix in which the elements represent the characteristic values of each pixel of the original image (O). If the original image (O) is divided into multiple color channel images (R, G, B), the original matrix (A) is formed with a number corresponding to the number of color channel images (R, G, B). R , A G , A B ) can be generated. In this case, the original matrix (A R , A G , A B Each element within ) can have a value representing the brightness of the corresponding color at the corresponding position.
[0033] For each color channel image (R, G, B), the original matrix (A R , A G , A B With the result obtained, a step (S120) of dividing the original matrix (A) into multiple submatrices (S) may be performed. At this time, each submatrice (S) is a matrix of the same size, and each element within the submatrice (S) is a specific element within the original matrix (A), and the submatrice (S) may be configured such that the element at the corresponding position within each submatrice (S) is at a distance of 1 or less from the element corresponding to the reference matrix (I) in the left-right and diagonal directions within the original matrix (A). Here, the reference matrix (I) corresponds to one of the multiple submatrices (S), and the distance between the element of the original matrix (A) corresponding to an element of a submatrice (S) and the element of the original matrix (A) corresponding to an element of the reference matrix (I) is 1 or less means that the difference between the row and column of the two elements is 1 or less.
[0034] For example, consider the case where the original matrix (A) described in Equation 1 above is partitioned into four minor matrices (S). The original matrix (A) can be partitioned into minor matrices (S0, S1, S2, S3) as shown in Equation 2 below. The minor matrices (S0, S1, S2, S3) can be viewed as containing the elements of the (even row, even column), (even row, odd column), (odd row, even column), and (odd row, odd column) of the original matrix (A), respectively. That is, when i is an integer from 0 to M / 2-1 and j is an integer from 0 to N / 2-1, the element of the first minor matrix (S0) is a 2i,2j Includes, and the elements of the second matrix (S1) are a 2i,2j+1 Includes, and the elements of the third submatrix (S2) are a 2i+1,2j Includes, and the elements of the fourth submatrix (S3) are a 2i+1,2j+1 It may include.
[0035]
[0036] When the original matrix (A) is partitioned into four minor matrices (S0, S1, S2, S3) as described above, any of the four minor matrices (S0, S1, S2, S3) can be selected as the reference matrix (I). This is because, regardless of which of the four minor matrices (S0, S1, S2, S3) is selected as the reference matrix (I), the element corresponding to the element of the remaining minor matrix (S) within the original matrix (A) will be at a distance of 1 or less from the element corresponding to the element of the reference matrix (I). For example, if the first minor matrix (S0) is selected as the reference matrix (I), the elements of the reference matrix (I) (i.e., the first minor matrix (S0)) are a of the original matrix (A). 2i,2j Corresponding to the elements, and the elements of the remaining submatrixes (S1, S2, S3) are a of the original matrix (A). 2i,2j+1 , a 2i+1,2j and a 2i+1,2j+1 Since they correspond to each, they are all at a distance of 1 or less within the original matrix (A).
[0037] For convenience, this specification focuses on the case where the original matrix (A) is divided into four submatrices (S0–S3), but it is also possible to divide the original matrix (A) into nine submatrices (S0–S8). For example, assuming i is an integer from 0 to M / 3-1 and j is an integer from 0 to N / 3-1, the nine submatrices (S0–S8) are a of the original matrix (A). 3i,3j , a 3i,3j+1 , a 3i,3j+2 , a 3i+1,3j , a 3i+1,3j+1 , a 3i+1,3j+2 , a 3i+2,3j , a 3i+2,3j+1 , a 3i+2,3j+2 Each can have as an element, and among the 9 minor matrices (S0~S8), a 3i+1,3j+1 If a minor matrix containing is designated as the reference matrix (I), the elements of the remaining minor matrix (S) are located at a distance of 1 or less from the corresponding positions of the elements of the reference matrix (I) within the original matrix (A).
[0038] Returning to the above example where the original matrix (A) is partitioned into four minor matrices (S0–S3) and the first minor matrix (S0) is selected as the reference matrix (I), the four minor matrices (I, S1, S2, S3) are disjoint sets and are all subsets of the original matrix (A). These minor matrices satisfy the following conditions in terms of sets.
[0039]
[0040] Therefore, it can be seen that the number of elements in the original matrix (A) is MN, and the number of elements in the submatrix (S0, S1, S2, S3) including the reference matrix (I) is MN / 4. In other words, the size of these submatrixes (S0~S3) is 1 / 4 of the size of the original matrix (A). When the original matrix (A) and the submatrixes (S0~S3) are represented as images, they are depicted as shown in Fig. 2.
[0041] As can be seen in FIG. 2, the image obtained from the submatrix (S0, S1, S2, S3) including the reference matrix (I) corresponds to the image obtained from the original matrix (A) with the color-coded images (R, G, B) reduced to 1 / 4.
[0042] After the original matrix (A) is divided into multiple submatrices (S), a step (S130) of converting each submatrice (S) into a difference matrix (D) may be performed. This may correspond to generating the difference matrix (D) such that each element in each difference matrix (D) corresponds to the difference between the element at the corresponding position in the submatrice (S) and the element at the corresponding position in the reference matrix (I). Continuing to consider the above example where the original matrix (A) is divided into four submatrices (S0~S3) and the first submatrice (S0) is selected as the reference matrix (I), the difference matrices (D1, D2, D3) can be obtained as shown in Equation 4 below.
[0043]
[0044] When the original matrix (A), the reference matrix (I), and each difference matrix (D1~D3) are represented as images, they are depicted as shown in FIG. 3. In FIG. 3, the original image corresponding to the original matrix (A) has a resolution of 512×512, and the image of the reference matrix (I) and difference matrices (D1~D3) generated accordingly has a resolution of 256×256.
[0045] Since each element of each difference matrix (D1, D2, D3) is located at a position 1 pixel different from the corresponding element of the reference matrix (I), as can be seen in Fig. 3, the difference matrices (D1, D2, D3) have a high correlation with the reference matrix (I) and most have a value of 0.
[0046] In one embodiment of the present invention, the step (S130) of converting a minor matrix (S) into a difference matrix (D) may include a step of setting the characteristic value of a corresponding element in the difference matrix (D) to 0 if the difference between an element at a corresponding position in the minor matrix (S) and an element at a corresponding position in the reference matrix (I) is less than a predetermined threshold value. This step involves the following condition (D2) in the step of generating the difference matrix (D). i,j and (D3) i,j It may also correspond to applying further to.
[0047]
[0048] As described above, since each difference matrix (D1~D3) does not differ significantly from the reference matrix (I), the compression ratio can be further increased by quantizing the difference values as in Equation 5. Of course, in some embodiments of the present invention, this quantization process may not be performed to exclude loss in terms of resolution. In addition, in some embodiments, additional encoding techniques such as Discrete Cosine Transform (DCT) and Xvid core processing may be performed in addition to the process described above.
[0049] As described above, when a reference matrix (I) and a plurality of difference matrices (D) are obtained from the original matrix (A) for each color of the original image (O), a processor (not shown) of the transmission device, etc., can perform the step (S150) of transmitting the reference matrix (I) and the difference matrix (D) to the target receiving device. Since the reference matrix (I) and the difference matrix (D) eliminate the redundancy of data inevitably included in the image for each color, they have a significantly lower amount of data compared to the original matrix (A) corresponding to the original image (O), even when considering all color channels. When the data compressed by encoding (i.e., the compressed image) is transmitted to the receiving device in this manner, the receiving device can restore the compressed image by decoding and output a restored image (O') that is almost identical to the original image (O) on the screen.
[0050] Hereinafter, the process of restoring a compressed image using the SBCSC technique according to the present invention will be described. The compressed image restoration processing method according to one embodiment of the present invention can be compared to performing the aforementioned image compression processing method in reverse. FIG. 4 is a flowchart exemplarily illustrating the compressed image restoration processing method according to one embodiment of the present invention. The compressed image restoration processing method illustrated in FIG. 4 may be performed by a processor (not shown) of a receiving device capable of reading a recording medium on which a program for executing the method is recorded. The receiving device including the processor mentioned herein may further include a display device to output the restored image or transmit the restored image to another device.
[0051] A communication unit (not shown) of a receiving device, etc., may perform the step (S210) of receiving a reference matrix (I) and a difference matrix (D) transmitted from a transmitting device. If the original image (O) is a color image, the reference matrix (I) and the difference matrix (D) may be received for each of the multiple primary colors constituting the original image (O).
[0052] A processor (not shown) of a receiving device, etc., may perform a step (S220) of creating a plurality of submatrixes (S') from a received reference matrix (I) and a difference matrix (D). Since the difference matrix (D) is generated during the encoding process to correspond to the difference between the elements of the corresponding submatrix (S') and the elements of the reference matrix (I), the step of creating the submatrix (S') during the decoding process may be performed by calculating the difference between the value of an element of the reference matrix (I) and the value of an element at a corresponding position within the difference matrix (D).
[0053] Following the step (S220) of creating a submatrix (S) or simultaneously with the step (S220) of creating a submatrix (S), a step (S230) of combining multiple submatrixes (S) to synthesize the original matrix (A') may be performed.
[0054] Continuing to consider the above example where the original matrix (A) is divided into four submatrices (S0~S3) and the first submatrice (S0) is selected as the reference matrix (I), each element in the original matrix (A') can be obtained as shown in Equation 6 below.
[0055]
[0056] Therefore, when the value of an element in the difference matrix (D1, D2, D3) is 0, the value of the element at the corresponding position in the reference matrix (I) can be used as the element at the corresponding position in the original matrix (A'). Since each element in the restored original matrix (A') represents the characteristic value of each pixel of the restored image (O'), a restored image (O') that is very close to the original image (O) is obtained from the original matrix (A'). In particular, if the aforementioned quantization process is omitted, the restored image (O') becomes substantially identical to the original image (O).
[0057] FIG. 5 is a diagram showing a comparison between the restored image (O') obtained through the decoding process described above and the original image (O). FIG. 5 presents a restored image (O') that has been compressed and restored according to an embodiment of the present invention, in which the Mean Square Error (MSE) was 47.2377 and the Peak Signal-to-Noise Ratio (PSNR) was 31.3879 dB.
[0058] The encoding and decoding processes described above apply to the case where the original image (O) is a single two-dimensional image. The image compression processing method and compressed image restoration processing method according to an embodiment of the present invention can be applied in the same way to video. Below, the process of compressing and restoring a video by applying the algorithm of the present invention to a video will be further explained.
[0059] FIGS. 6 and 7 illustrate an exemplary image compression processing method according to an embodiment of the present invention. FIGS. 6 and 7 relate to a case where the image compression processing method according to an embodiment of the present invention compresses and transmits an original video, and the original video includes a plurality of frames. The video makes it appear as if the video is moving by sequentially displaying a plurality of frames over time. The steps shown in FIG. 6 correspond to steps performed on the current frame after or simultaneously with the steps shown in FIG. 1 being performed on the previous frame. That is, in the case where the original video includes a first frame and a second frame that are displayed sequentially over time, the steps of FIG. 1 may be performed on the second frame after or simultaneously with the steps of FIG. 6 being performed on the first frame.
[0060] Referring to FIG. 7, even when video is compressed and transmitted, the video compression processing method can be performed for each of the multiple primary colors constituting the original image (O). That is, each frame of the original video can correspond to the aforementioned original image (O), and the original video can be seen as containing multiple frames for each color.
[0061] Referring to FIGS. 6 and FIGS. 7, a step (S160) of extracting two-dimensional difference data of a second frame based on reference data of a first frame may be performed after or simultaneously with the steps of FIG. 1 being performed for a first frame. As previously mentioned, the terms "first frame" and "second frame" are used for convenience of explanation and do not imply that the first frame must be the first frame of the video.
[0062] In order to perform the step (S160) of extracting two-dimensional difference data of the second frame, the step of extracting reference data from the first frame may be performed first. In one embodiment of the present invention, the reference data extracted from the first frame may be the reference matrix (I) described in relation to FIG. 1. That is, in the step of dividing the original matrix (A) corresponding to the first frame into sub-matrices (S), the reference matrix (I) of the first frame selected among the sub-matrices (S) may be used as reference data of the first frame to represent the relationship between frames.
[0063] As illustrated in FIG. 7, the step (S160) of extracting two-dimensional difference data of the second frame can be provided as data corresponding to the difference between the frame information of the first frame and the frame information of the second frame.
[0064] After or simultaneously with the step (S160) of extracting two-dimensional difference data of the second frame, the step (S170) of extracting reference data of the second frame may be performed. The reference data of the second frame may be used in the step of extracting two-dimensional difference data of the subsequent third frame.
[0065] In one embodiment of the present invention, the reference data extracted from the second frame may be the reference matrix (I) described in relation to FIG. 1. That is, in the step of dividing the original matrix (A) corresponding to the second frame into sub-matrices (S), the reference matrix (I) of the second frame selected among the sub-matrices (S) may be used as reference data of the second frame to indicate the relationship between frames.
[0066] For example, in one embodiment of the present invention, the steps of generating the aforementioned original matrix (A) (S110), dividing into submatrixes (S) (S120), and converting into a difference matrix (D) (S130) are performed for a first frame, and then these steps (S110, S120, S130) may also be performed for a second frame, and the reference matrix (I) of the first frame and the reference matrix (I) of the second frame may be used as reference data to indicate the relationship between frames, and the step of extracting two-dimensional difference data between the second frame and the first frame using these may be performed (S170).
[0067] Referring to FIGS. 6 and FIGS. 7, a processor (not shown) of a transmission device, etc., may perform a step (S180) of transmitting reference data of the first frame and two-dimensional difference data of the second frame. Of course, the reference data of the first frame and the two-dimensional difference data of the second frame do not have to be transmitted simultaneously. For example, while the steps of generating the original matrix (A) described above (S110), dividing into sub-matrixes (S120), converting into a difference matrix (D) (S130), and transmitting the reference matrix (I) and the difference matrix (D) (S150) are performed for the first frame, the steps of generating the original matrix (A) (S110), dividing into sub-matrixes (S120), and converting into a difference matrix (D) (S130) may be performed for the second frame, and together with this, the step of extracting two-dimensional difference data of the second frame based on the frame information (reference data) of the first frame (S160) may be performed. Next, the step (S180) of transmitting reference data of the first frame and two-dimensional difference data of the second frame can be completed by transmitting the two-dimensional difference data of the second frame together in the step (150) of transmitting the reference matrix (I) and difference matrix (D) for the second frame, if the reference data of the first frame has already been transmitted in the step (S150) of transmitting the reference matrix (I) and difference matrix (D) for the first frame.
[0068] Of course, in the image compression processing method according to some embodiments of the present invention, the reference data for indicating the relationship between frames may be independent reference data unrelated to the aforementioned reference matrix (I). In this case, the step (S180) of transmitting the reference data of the previous frame and the difference data of the current frame may be performed independently of the step (150) of transmitting the reference matrix (I) and the difference matrix (D) for the original image.
[0069] Referring to FIG. 7, the step (S180) of transmitting reference data of the previous frame and difference data of the current frame may include a Variable Length Coding (VLC) step for the 2D difference data and reference data, and may include a step of transmitting the result through a multiplexer (MUX) (190). The multiplexer (190) may sequentially transmit VLC data obtained for each color channel image (R, G, B).
[0070] Below, we will further explain the process of restoring a compressed video by applying the algorithm of the present invention to the video.
[0071] FIG. 8 is a flowchart exemplarily illustrating a compressed image restoration processing method according to an embodiment of the present invention.
[0072] FIG. 9 is a conceptual diagram exemplarily illustrating a compressed image restoration processing method according to an embodiment of the present invention.
[0073] FIGS. 8 and 9 illustrate an exemplary method for restoring compressed video according to an embodiment of the present invention. FIGS. 8 and 9 illustrate a process of restoring data compressed by the video compression method according to an embodiment of the present invention through decoding. The steps shown in FIG. 8 correspond to steps performed on the current frame after or simultaneously with the steps shown in FIG. 4 being performed on the previous frame. That is, in the case where the original video includes a first frame and a second frame that are displayed sequentially in the flow of time, the steps of FIG. 4 can form the first frame by synthesizing the original matrix (A'), and the steps of FIG. 8 can be performed thereafter or simultaneously to form the second frame.
[0074] Referring to FIG. 9, data received through a demultiplexer (DeMUX) (200) can be separated into data corresponding to each color channel based on a variable length encoding (VLC) technique. This data may include two-dimensional frame difference data and reference data. As described above, the reference data may correspond to a reference matrix (I) for constructing a first frame.
[0075] A processor (not shown) of a receiving device, etc., can restore the second frame from the two-dimensional frame difference data and the reference matrix (I) and difference matrix (D) for the second frame. Multiple frames obtained for each color channel can be combined to represent the video for the corresponding color channel, and these videos can be combined to form the original video.
[0076] The embodiments of the present invention presented above relate to the Sub-Band Color Space Compression (SBCSC) technique. According to the embodiments of the present invention, it is possible to minimize loss or maintain a substantially lossless state while providing high compression efficiency. As a result of actual experiments, the SBCSC technique according to one embodiment of the present invention exhibited an average compression efficiency of 10:1 or higher while maintaining visual losslessness, and demonstrated a substantial reduction in PCLK, allowing the PCLK to be reduced from 114 MHz to 28.5 MHz. The embodiments of the present invention have the advantage of enabling real-time processing by providing ultralow latency of less than 5 ms when using high-speed 2D frame memory and pixel-by-pixel data processing. In addition, the embodiments of the present invention have the advantage of being implementable using low-cost Field Programmable Gate Array (FPGA) technology. An embodiment of the present invention can compress the data stream after the difference during encoding by reducing the stream length of the data using VLC, and during restoration, restore the reduced data stream length to its original state using VLC incrementally to restore the original image as is.
[0077] Above all, when encoding and decoding an original image corresponding to each of a plurality of primary colors according to an embodiment of the present invention, the use of a conventional color space converter can be omitted, which has the advantage of lowering the specifications and costs of equipment required for displaying images. That is, in the prior art, data loss occurs during the color conversion process tailored to human visual characteristics when converting the color space of an image, but in the embodiment of the present invention, data loss can be prevented by increasing efficiency to eliminate redundancy of repetitive data.
[0078] Although the present invention has been described above with reference to one embodiment, those skilled in the art will understand that various modifications and changes can be made to the invention without departing from the spirit and scope of the invention as described in the following claims.
Claims
Claim 1 A video compression processing method for compressing and outputting a video through encoding, wherein an original matrix (A) which is an M×N matrix is generated from an original image having an M×N resolution, and a of the original matrix (A) 0,0 to a M-1,N-1 A method for image compression processing comprising: a step of generating an original matrix (A) such that the elements of the original matrix (A) represent characteristic values of each pixel of the original image; a step of dividing the original matrix (A) into a plurality of disjoint minor matrices (S), wherein the plurality of minor matrices (S) are all matrices of the same size and each element within the plurality of minor matrices (S) is a specific element within the original matrix (A), and the element at a corresponding position within the plurality of minor matrices (S) is at a distance of 1 or less from the element corresponding to a reference matrix (I), which is one of the plurality of minor matrices (S), based on the left-right and diagonal directions within the original matrix (A); and a step of converting the plurality of minor matrices (S) into a difference matrix (D), wherein each element within the difference matrix (D) corresponds to the difference between the element at a corresponding position within the minor matrix (S) and the element at a corresponding position within the reference matrix (I). Claim 2 An image compression processing method according to claim 1, wherein the step of generating the original matrix (A) includes the step of generating the original matrix (A) corresponding to each of the plurality of primary colors constituting the original image, and wherein the characteristic value represents the brightness of the corresponding color among the plurality of primary colors. Claim 3 In claim 1, in the step of dividing the original matrix (A) into the plurality of submatrices (S), the original matrix (A) is divided into four submatrices (S0, S1, S2, S3), wherein the elements of the first submatrice (S0) are a 2i,2j Includes, and the elements of the second matrix (S1) are a 2i,2j+1 Includes, and the elements of the third submatrix (S2) are a 2i+1,2j Includes, and the elements of the fourth submatrix (S3) are a 2i+1,2j+1 An image compression processing method characterized by including (where i is an integer from 0 to M / 2-1 and j is an integer from 0 to N / 2-1), and the reference matrix (I) being any one of the first to fourth submatrices (S0, S1, S2, S3). Claim 4 In claim 1, in the step of dividing the original matrix (A) into the plurality of submatrices (S), the original matrix (A) is divided into 9 submatrices (S0~S8), wherein the 9 submatrices (S0~S8) are a 3i,3j , a 3i,3j+1 , a 3i,3j+2 , a 3i+1,3j , a 3i+1,3j+1 , a 3i+1,3j+2 , a 3i+2,3j , a 3i+2,3j+1 , a 3i+2,3j+2 It contains distinct elements among (where i is an integer from 0 to M / 3-1 and j is an integer from 0 to N / 3-1), and the reference matrix (I) is a of the 9 submatrices (S0~S8). 3i+1,3j+1 Image compression processing method characterized by being a submatrix containing Claim 5 An image compression processing method according to claim 1, wherein the step of converting the submatrix (S) into the difference matrix (D) includes the step of setting the characteristic value of the corresponding element in the difference matrix (D) to 0 if the difference between the element at the corresponding position in the submatrix (S) and the element at the corresponding position in the reference matrix (I) is less than a predetermined threshold value. Claim 6 A video compression processing method according to claim 1, characterized in that the original image is at least one of a plurality of frames included in the original video. Claim 7 In claim 6, the original video includes a first frame and a second frame, and the original image includes the first frame and the second frame, and the image compression processing method further comprises: a step of generating the original matrix (A), a step of dividing the original matrix (A) into a plurality of sub-matrices (S), and a step of converting the sub-matrices (S) into the difference matrix (D), wherein the first frame is used as the original image and the steps are performed or are performed simultaneously, and a step of extracting reference data from the first frame; and a step of extracting two-dimensional difference data between the second frame and the first frame based on the reference data. Claim 8 A computer-readable recording medium having a program recorded thereon for executing an image compression processing method for compressing and outputting an image through encoding, wherein the program is configured to execute an image compression processing method according to any one of claims 1 to 7. Claim 9 A restoration processing method for restoring and outputting a compressed image through decoding, comprising: a step of creating a plurality of small matrices (S') from a reference matrix (I) and a difference matrix (D), wherein the small matrix (S') corresponding to the reference matrix (I) contains each element of the reference matrix (I) as is, and the small matrix (S') corresponding to the difference matrix (D) has each element corresponding to the difference between the element at the corresponding position in the reference matrix (I) and the element at the corresponding position in the difference matrix (D); a step of combining the plurality of small matrices (S') to synthesize an original matrix (A'); and a step of constructing a restored image (O') from the original matrix (A'). Claim 10 A computer-readable recording medium having a program recorded thereon for executing a compressed image restoration processing method for restoring and outputting a compressed image through decoding, wherein the program is configured to execute the compressed image restoration processing method according to claim 9.
Citation Information
Patent Citations
A method and an apparatus for encoding a signal transporting data for reconstructing a sparse matrix
KR1020180067426A
Method and apparatus for compression of sparse matrix data
KR1020230096904A