Mathematics Behind Image Compression

Mathematics Behind Image Compression

Journal of Student Research (2014) Volume 3, Issue 1: pp. 46-62 Mathematics Behind Image Compression Stefany Franco1, Dr. Tanvir Prince1, Ildefonso Salva2, and Charlie Windolf3 Image compression is fundamental to NASA and the world’s daily operations. Images are transmitted to NASA from satellites and even Mars, making it very important to send data as efficiently as possible through the low-bandwidth links to these locations. This project focuses its studies in three areas. First, a hands-on mathematical analysis of the singular value decomposition (SVD) compression. Second, on the area of two field experiments that explore the effect of light conditions, shot composition and content, as well as the time of day and other variables on the file sizes of images generated in a digital camera that implements JPEG compression. Third, is about an in-depth study of the JPEG algorithm. In the SVD study, the team analyzed mathematically how matrices are manipulated to return to its equivalent original matrix and the theory about SVD is reinforced by using the software Wolfram Mathematica to compress images from NASA satellites and Mars rover. Mathematica analyzed the file size and timing data for the compression process. In the field experiment, a camera with fixed focus, aperture, and other shooting parameters was used to take pictures at various times of day of the same scene to see how the amount and quality of daylight influenced JPEG’s ability to compress images. The same camera with the parameters still fixed was used to shoot various locations, indoors and outdoors, at the same time of day to see how the content of the photo influenced JPEG file sizes. Finally, the team looked at JPEG’s compression algorithm using Wolfram Mathematica to better understand its efficiency and power, since NASA’s radiation-hardened computer processors are generally not powerful enough to compress images with JPEG. Loosely, the team found that JPEG is best able to compress images with little variation pixel to pixel in color or brightness, and that it provides better looking images at the same file size than SVD compression. Keywords: Image Compression; compression ratio; Singular Value Decomposition (SVD); JPEG; Decompression; Huffman Coding; Discrete Cosine Transform; quantization. Introduction Wolfram Mathematica program is significant for storing the digital files and transmission of information to NASA and to This research project is in connection to computer the unman robot from Mars. science and information theory. When something is Two field experiments have to be conducted to infer compressed, it simply means information is stored in fewer whether the JPEG file size of an image has relation with time bits than the original data. Compression can be classified in and various locations both indoors and outdoors provided that two categories: lossless or lossy. Lossless compression is the settings of the digital camera are constant. The results of when the data is compressed but the original information these two field experiments will be analyzed and will be remains intact. Lossy compression however, is when the illustrated through scatter plots and bar graphs. information is compressed but some data is lost along the The JPEG field experiments' outcomes will serve as a process. Compression is useful because it can save storage motivation to further the study of JPEG compression. space and also increases transmission capacity. Moreover, the team will examine the algorithm of JPEG The team focuses on three areas of study namely: the compression by transforming mathematically the given image exploration and manipulation of the mathematical algorithm and apply Wolfram Mathematica to perform JPEG of SVD and hands-on experiment of image compression using compression. To learn more about the mathematica software, SVD with the help of Wolfram Mathematica program; the please see (Purdue University) and (Wolfram Mathematica, actual two field experiments using digital camera with fixed 2013). settings to determine if there are changes in the files size of the same image from 9 AM to 2:00 PM with 30 minutes Importance of compression interval and to determine the files sizes of different images Data is something very useful in the present stage. done at fixed time of the day; and the analysis of the Basically everybody has access to it, some however need it mathematical algorithm and hands-on experiment of JPEG more than others. Some can be threatened by the amount of compression using Wolfram Mathematica program. space needed and their available budget for it. Others are SVD is applicable to image compression using the threatened not only by the budget, but by available technology principles and operation of matrices. The image can be and human patience. With this in mind many will rely on data represented by a matrix of m by n size and can be compression as a way to meet certain requirements and decomposed into three matrices. The result of the affordable data handling. multiplication of these matrices will reconstruct the original Image/Video data compression is a very critical image when all singular values in decreasing order are technology for many operations in NASA (White). The goal utilized. In order to compress the image, the first few singular of NASA is not only to lower the data amount by values are sufficient to produce a reduced file size of an compressing it, because this will save money and save space. image but still preserving the important elements of the said They also want to improve the time it takes to access that data image. The more detail procedure can be seen on (Cooper & as some people might need the data to be available right Lorenc, 2006). This principle of SVD compression using away, or their real time science may demand it. 1. Department of Mathematics, Hostos Community College, City University of New York. Bronx, NY 10451 2. Mott Haven Village Preparatory High School. Bronx NY 10466 3. Collegiate School. New York, NY 10024 Journal of Student Research (2014) Volume 3, Issue 1: pp. 46-62 In NASA, image compression is used for three main high rate video, low rate video, science imaging data, and reasons. First, compression saves space. NASA receives telerobotics video. millions of bits of data each day that require a huge storage Some of the image/video data mentioned before can facility. NASA also has two or more backups for all the benefit greatly from compression because it would take up information they have. By using compression, NASA saves less space and therefore can be transmitted faster. Other an enormous amount of hard drive space. Second, image/video data such as scientific data and telerobotics image/video compression saves transmission time. For videos are very valuable and irreplaceable, so NASA is example, the NASA Mars Rovers sends back pictures and reluctant to consider any type of compression on these data which can take up to years to reach Earth if (Group). uncompressed due to the massive distance between the two. Distance also has a direct relationship with transmission rate, Mathematics behind Singular Value Decomposition for example Mars is 3.74x108 km away from Earth, as (SVD): Here we will only summarize the known result. opposed to the moon that is only 4.05x103 km. Lastly, Readers are encouraged to consult any introductory books on compression saves money by saving hard drive space and linear algebra, for example, (Strang, 2009). A nice time (Rahman Z.). chronological history of “Singular Value Decomposition” can NASA identified various lunar/Mars mission be found on (Stewart, 1993). SVD is based on a theorem from requirements that involve transmission of image/video, these linear algebra that says that a rectangular matrix, “A”, can be can be categorized into several types; high rate video, edited decomposed into the product of three matrices. Where: Am,n is a given matrix that represents an image T Um,m is an orthogonal matrix wherein the columns of matrix U are the orthonormal eigenvectors of AA T T Vn,n is the transpose of an orthogonal matrix V wherein the columns of matrix V are the orthonormal eigenvectors of A A. Dm,n is a diagonal matrix wherein the diagonal elements are singular value, σi, equal to the square root of the eigenvalue associated with the eigenvectors ui and vi in descending order. σ1 ≥ σ2 ≥ .… ≥ σn ≥ 0 Mathematica Lab experiment for SVD compression In this experiment, the team used Wolfram Mathematica contain more information about the original matrix A than the to study the effects of SVD compression on an image. SVD later values. compression uses singular value decomposition of matrices to This decomposition can be used to compress images. reduce the amount of information stored in an image so that it Images are represented as matrices inside computers. Since can be stored in much less space than the original image was. the first singular values contain more information than the In singular value decomposition, a matrix – call it A – is later ones, by taking only the first few singular values it is decomposed into a series of coefficients multiplied by two possible to reduce the amount of information contained in an other matrices derived from A. These coefficients are that image and compress that image (Image Compression, 2011). matrix A’s singular values. The series of singular values is In Mathematica, we took an image of Hyperion, a small moon arranged in decreasing order, so that the first singular values of Saturn, displayed below (Spacetelescope, 2013) and (Space): Figure 1: Hyperion image - a small moon of Saturn We then used Mathematica to compress the image with SVD, varying the number of coefficients. A series of compressed picture using increasing number of singular values are given below, where we specify the number of singular value coefficients.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    16 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us