{"id":377,"date":"2013-03-13T19:30:22","date_gmt":"2013-03-14T00:30:22","guid":{"rendered":"http:\/\/sunapi386.ca\/wordpress\/?p=377"},"modified":"2015-10-28T16:51:24","modified_gmt":"2015-10-28T21:51:24","slug":"image-compression-with-dft-in-matlab","status":"publish","type":"post","link":"https:\/\/sunapi386.ca\/wordpress\/image-compression-with-dft-in-matlab\/","title":{"rendered":"Image compression with DFT in matlab"},"content":{"rendered":"<p>Image compression using a discrete Fourier transform in matlab. We can compress a lot and still have excellent picture. I.e. drop ratio of 70% and still good quality.<\/p>\n<figure id=\"attachment_380\" aria-describedby=\"caption-attachment-380\" style=\"width: 1841px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2013\/03\/plots1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-380\" src=\"https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2013\/03\/plots1.jpg\" alt=\"Same images, different compression\" width=\"1841\" height=\"1004\" srcset=\"https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2013\/03\/plots1.jpg 1841w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2013\/03\/plots1-300x163.jpg 300w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2013\/03\/plots1-1024x558.jpg 1024w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2013\/03\/plots1-500x272.jpg 500w\" sizes=\"auto, (max-width: 1841px) 100vw, 1841px\" \/><\/a><figcaption id=\"caption-attachment-380\" class=\"wp-caption-text\">Same images, different compression<\/figcaption><\/figure>\n<p><!--more--><\/p>\n<figure id=\"attachment_378\" aria-describedby=\"caption-attachment-378\" style=\"width: 1841px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2013\/03\/diff1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-378\" src=\"https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2013\/03\/diff1.jpg\" alt=\"Differences from  original file\" width=\"1841\" height=\"1004\" srcset=\"https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2013\/03\/diff1.jpg 1841w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2013\/03\/diff1-300x163.jpg 300w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2013\/03\/diff1-1024x558.jpg 1024w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2013\/03\/diff1-500x272.jpg 500w\" sizes=\"auto, (max-width: 1841px) 100vw, 1841px\" \/><\/a><figcaption id=\"caption-attachment-378\" class=\"wp-caption-text\">Differences from original file<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_379\" aria-describedby=\"caption-attachment-379\" style=\"width: 560px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2013\/03\/error1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-379\" src=\"https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2013\/03\/error1.jpg\" alt=\"Error between original and compressed image vs drop ratio\" width=\"560\" height=\"420\" srcset=\"https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2013\/03\/error1.jpg 560w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2013\/03\/error1-300x225.jpg 300w, https:\/\/sunapi386.ca\/wordpress\/wp-content\/uploads\/2013\/03\/error1-400x300.jpg 400w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/a><figcaption id=\"caption-attachment-379\" class=\"wp-caption-text\">Error between original and compressed image vs drop ratio<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>Note: I will not upload matlab code, this was done for a class assignment. The code is not important, it&#8217;s the method. If interested, you should check out CS 370 Numerical Computation from University of Waterloo. I&#8217;m leaving the lecture notes link <a href=\"https:\/\/cs.uwaterloo.ca\/~kogeddes\/cs370\/cs370_notes_f08.pdf\">here:\u00a0https:\/\/<b>cs<\/b>.<b>uwaterloo<\/b>.ca\/~kogeddes\/<b>cs370<\/b>\/<b>cs370<\/b>_<b>notes<\/b>_f08.pdf<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Image compression using a discrete Fourier transform in matlab. We can compress a lot and still have excellent picture. I.e. drop ratio of 70% and still good quality.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,11],"tags":[],"class_list":["post-377","post","type-post","status-publish","format-standard","hentry","category-academica","category-hack2600"],"_links":{"self":[{"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/posts\/377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/comments?post=377"}],"version-history":[{"count":5,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/posts\/377\/revisions"}],"predecessor-version":[{"id":506,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/posts\/377\/revisions\/506"}],"wp:attachment":[{"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/media?parent=377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/categories?post=377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sunapi386.ca\/wordpress\/wp-json\/wp\/v2\/tags?post=377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}