Commit e7349ae2 authored by Bryce Hepner's avatar Bryce Hepner

build check on JPEG addition

parent 53af98cd
Pipeline #2607 passed with stage
in 8 seconds
......@@ -16,25 +16,29 @@
\gdef\HyperFirstAtBeginDocument#1{#1}
\providecommand\HyField@AuxAddToFields[1]{}
\providecommand\HyField@AuxAddToCoFields[2]{}
\citation{ISO/IEC14495-1}
\citation{544819}
\citation{PNGoverview}
\citation{PNGdetails}
\citation{PNGdetails}
\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{1}{section.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Overview}{1}{subsection.1.1}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Background}{1}{subsection.1.2}\protected@file@percent }
\@writefile{brf}{\backcite{ISO/IEC14495-1}{{1}{1.1}{subsection.1.1}}}
\@writefile{brf}{\backcite{544819}{{1}{1.1}{subsection.1.1}}}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces The other 4 pixels are used to find the value of the 5th.\relax }}{1}{figure.caption.1}\protected@file@percent }
\providecommand*\caption@xref[2]{\@setref\relax\@undefined{#1}}
\newlabel{fig:pixels}{{1}{1}{The other 4 pixels are used to find the value of the 5th.\relax }{figure.caption.1}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Background}{1}{subsection.1.2}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {2}Related Work}{1}{section.2}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}PNG}{1}{subsection.2.1}\protected@file@percent }
\@writefile{brf}{\backcite{PNGoverview}{{1}{2.1}{subsection.2.1}}}
\@writefile{brf}{\backcite{PNGdetails}{{1}{2.1}{subsection.2.1}}}
\@writefile{brf}{\backcite{PNGdetails}{{1}{2.1}{subsection.2.1}}}
\citation{LZW}
\citation{PNGdetails}
\citation{ABRARDO1997321}
\citation{Dahlen1993}
\citation{AIAZZI20021619}
\@writefile{brf}{\backcite{PNGdetails}{{2}{2.1}{subsection.2.1}}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}LZW}{2}{subsection.2.2}\protected@file@percent }
\@writefile{brf}{\backcite{LZW}{{2}{2.2}{subsection.2.2}}}
\@writefile{brf}{\backcite{PNGdetails}{{2}{2.2}{subsection.2.2}}}
......@@ -48,11 +52,11 @@
\citation{Numpy}
\@writefile{brf}{\backcite{Numpy}{{3}{3}{section.3}}}
\@writefile{brf}{\backcite{Huffman}{{3}{3}{section.3}}}
\@writefile{brf}{\backcite{Numpy}{{3}{3}{figure.caption.3}}}
\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Encoding the Pixel Values\relax }}{3}{figure.caption.2}\protected@file@percent }
\newlabel{fig:sub1}{{2}{3}{Encoding the Pixel Values\relax }{figure.caption.2}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces Encoding the Error Values\relax }}{3}{figure.caption.3}\protected@file@percent }
\newlabel{fig:sub2}{{3}{3}{Encoding the Error Values\relax }{figure.caption.3}{}}
\@writefile{brf}{\backcite{Numpy}{{3}{3}{figure.caption.3}}}
\@writefile{toc}{\contentsline {section}{\numberline {4}Results}{3}{section.4}\protected@file@percent }
\citation{LAPACKAlgorithms}
\citation{LeastSquaredProblem}
......@@ -66,8 +70,10 @@
\bibcite{PNGdetails}{6}
\bibcite{Numpy}{7}
\bibcite{Huffman}{8}
\bibcite{PNGoverview}{9}
\bibcite{LZW}{10}
\bibcite{ISO/IEC14495-1}{9}
\bibcite{PNGoverview}{10}
\@writefile{toc}{\contentsline {section}{\numberline {5}Discussion}{4}{section.5}\protected@file@percent }
\@writefile{brf}{\backcite{LAPACKAlgorithms}{{4}{5}{section.5}}}
\@writefile{brf}{\backcite{LeastSquaredProblem}{{4}{5}{section.5}}}
\bibcite{LZW}{11}
\bibcite{544819}{12}
......@@ -50,6 +50,13 @@ D.~A. Huffman.
\newblock {\em Proceedings of the Institute of Radio Engineers},
40(9):1098--1101, Sept. 1952.
\bibitem{ISO/IEC14495-1}
JPEG.
\newblock {Information technology — Lossless and near-lossless compression of
continuous-tone still images}.
\newblock Standard, International Organization for Standardization, Geneva, CH,
Dec. 1999.
\bibitem{PNGoverview}
{Mark Adler, Thomas Boutell, John Bowler, Christian Brunschen, Adam M.
Costello, Lee Daniel Crocker, Andreas Dilger, Oliver Fromme, Jean-loup
......@@ -66,4 +73,11 @@ Welch.
\newblock A technique for high-performance data compression.
\newblock {\em Computer}, 17(6):8--19, 1984.
\bibitem{544819}
X.~Wu and N.~Memon.
\newblock Calic-a context based adaptive lossless image codec.
\newblock In {\em 1996 IEEE International Conference on Acoustics, Speech, and
Signal Processing Conference Proceedings}, volume~4, pages 1890--1893 vol. 4,
1996.
\end{thebibliography}
......@@ -172,6 +172,24 @@ doi={10.1007/BF02215679},
url={https://doi.org/10.1007/BF02215679}
}
@techreport{ISO/IEC14495-1,
type = {Standard},
key = {LosslessJPG},
author = {JPEG},
month = dec,
year = {1999},
title = {{Information technology — Lossless and near-lossless compression of continuous-tone still images}},
volume = {1999},
address = {Geneva, CH},
institution = {International Organization for Standardization}
}
@INPROCEEDINGS{544819,
author={Xiaolin Wu and Memon, N.},
booktitle={1996 IEEE International Conference on Acoustics, Speech, and Signal Processing Conference Proceedings},
title={CALIC-a context based adaptive lossless image codec},
year={1996},
volume={4},
number={},
pages={1890-1893 vol. 4},
doi={10.1109/ICASSP.1996.544819}}
......@@ -3,44 +3,44 @@ Capacity: max_strings=200000, hash_size=200000, hash_prime=170003
The top-level auxiliary file: main.aux
The style file: ieee.bst
Database file #1: main.bib
You've used 10 entries,
You've used 12 entries,
2120 wiz_defined-function locations,
578 strings with 6187 characters,
and the built_in function-call counts, 3623 in all, are:
= -- 332
> -- 230
< -- 0
+ -- 94
- -- 82
* -- 295
:= -- 638
add.period$ -- 33
call.type$ -- 10
change.case$ -- 71
591 strings with 6591 characters,
and the built_in function-call counts, 4378 in all, are:
= -- 411
> -- 250
< -- 2
+ -- 102
- -- 88
* -- 340
:= -- 750
add.period$ -- 39
call.type$ -- 12
change.case$ -- 81
chr.to.int$ -- 0
cite$ -- 10
duplicate$ -- 97
empty$ -- 247
format.name$ -- 82
if$ -- 720
cite$ -- 12
duplicate$ -- 130
empty$ -- 313
format.name$ -- 88
if$ -- 892
int.to.chr$ -- 0
int.to.str$ -- 10
missing$ -- 7
newline$ -- 56
num.names$ -- 20
pop$ -- 69
int.to.str$ -- 12
missing$ -- 8
newline$ -- 66
num.names$ -- 24
pop$ -- 78
preamble$ -- 1
purify$ -- 61
purify$ -- 68
quote$ -- 0
skip$ -- 69
skip$ -- 99
stack$ -- 0
substring$ -- 185
swap$ -- 10
text.length$ -- 0
substring$ -- 252
swap$ -- 24
text.length$ -- 2
text.prefix$ -- 0
top$ -- 0
type$ -- 40
type$ -- 48
warning$ -- 0
while$ -- 27
width$ -- 12
write$ -- 115
while$ -- 33
width$ -- 14
write$ -- 139
\backcite {ISO/IEC14495-1}{{1}{1.1}{subsection.1.1}}
\backcite {544819}{{1}{1.1}{subsection.1.1}}
\backcite {PNGoverview}{{1}{2.1}{subsection.2.1}}
\backcite {PNGdetails}{{1}{2.1}{subsection.2.1}}
\backcite {PNGdetails}{{1}{2.1}{subsection.2.1}}
\backcite {PNGdetails}{{2}{2.1}{subsection.2.1}}
\backcite {LZW}{{2}{2.2}{subsection.2.2}}
\backcite {PNGdetails}{{2}{2.2}{subsection.2.2}}
\backcite {ABRARDO1997321}{{2}{2.3}{subsection.2.3}}
......
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2020.7.20) 11 JUL 2022 13:27
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2020.7.20) 13 JUL 2022 10:21
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
......@@ -404,10 +404,10 @@ LaTeX Font Warning: Font shape `OMS/cmtt/m/n' undefined
(Font) using `OMS/cmsy/m/n' instead
(Font) for symbol `textbraceleft' on input line 92.
<PixelArrangement.png, id=44, 130.55226pt x 86.724pt>
<PixelArrangement.png, id=46, 130.55226pt x 86.724pt>
File: PixelArrangement.png Graphic file (type png)
<use PixelArrangement.png>
Package pdftex.def Info: PixelArrangement.png used on input line 113.
Package pdftex.def Info: PixelArrangement.png used on input line 117.
(pdftex.def) Requested size: 99.36972pt x 66.01147pt.
LaTeX Warning: `h' float specifier changed to `ht'.
......@@ -416,42 +416,24 @@ LaTeX Warning: `h' float specifier changed to `ht'.
<./PixelArrangement.png (PNG copy)>] [2]
<Uniform_No_Title.png, id=83, 462.528pt x 346.896pt>
<Uniform_No_Title.png, id=87, 462.528pt x 346.896pt>
File: Uniform_No_Title.png Graphic file (type png)
<use Uniform_No_Title.png>
Package pdftex.def Info: Uniform_No_Title.png used on input line 239.
(pdftex.def) Requested size: 237.13594pt x 177.8515pt.
<Normal_No_Title.png, id=85, 462.528pt x 346.896pt>
File: Normal_No_Title.png Graphic file (type png)
<use Normal_No_Title.png>
Package pdftex.def Info: Normal_No_Title.png used on input line 245.
Package pdftex.def Info: Uniform_No_Title.png used on input line 243.
(pdftex.def) Requested size: 237.13594pt x 177.8515pt.
LaTeX Warning: `h' float specifier changed to `ht'.
[3 <./Uniform_No_Title.png> <./Normal_No_Title.png>]
Underfull \hbox (badness 7273) in paragraph at lines 272--284
[]\OT1/cmr/m/n/10 This was tested on a set of a least 16
[]
Underfull \hbox (badness 5161) in paragraph at lines 272--284
\OT1/cmr/m/n/10 im-ages, so this does not af-fect us as much.
[]
Underfull \hbox (badness 4353) in paragraph at lines 272--284
\OT1/cmr/m/n/10 When tested on a ran-dom set of 16 im-ages,
[]
<Normal_No_Title.png, id=89, 462.528pt x 346.896pt>
File: Normal_No_Title.png Graphic file (type png)
<use Normal_No_Title.png>
Package pdftex.def Info: Normal_No_Title.png used on input line 249.
(pdftex.def) Requested size: 237.13594pt x 177.8515pt.
Underfull \hbox (badness 3428) in paragraph at lines 272--284
\OT1/cmr/m/n/10 the ra-tio only changed from $0\OML/cmm/m/it/10 :\OT1/cmr/m/n/1
0 3973$ to $0\OML/cmm/m/it/10 :\OT1/cmr/m/n/10 4193$.
[]
LaTeX Warning: `h' float specifier changed to `ht'.
(./main.bbl (./main.brf)
[3 <./Uniform_No_Title.png> <./Normal_No_Title.png>] (./main.bbl (./main.brf)
\tf@brf=\write4
\openout4 = `main.brf'.
......@@ -461,34 +443,36 @@ Underfull \hbox (badness 7362) in paragraph at lines 26--26
, Oct. 1999.
[]
)
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 317.
[4]
Package atveryend Info: Empty hook `AfterLastShipout' on input line 317.
[4])
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 321.
[5
]
Package atveryend Info: Empty hook `AfterLastShipout' on input line 321.
(./main.aux)
Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 317.
Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 321.
\snap@out=\write5
\openout5 = `main.dep'.
Dependency list written on main.dep.
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 317.
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 321.
Package rerunfilecheck Info: File `main.out' has not changed.
(rerunfilecheck) Checksum: 32E97EDE93C04899CE7128EA0CB0D790;513.
Package rerunfilecheck Info: File `main.brf' has not changed.
(rerunfilecheck) Checksum: BB047529470216DFDC4D0933E0F06F40;613.
(rerunfilecheck) Checksum: 9099E033D70D51ED61C40175FF1C40FF;711.
LaTeX Font Warning: Some font shapes were not available, defaults substituted.
)
Here is how much of TeX's memory you used:
8438 strings out of 481239
129046 string characters out of 5920377
403170 words of memory out of 5000000
23517 multiletter control sequences out of 15000+600000
8449 strings out of 481239
129190 string characters out of 5920377
404236 words of memory out of 5000000
23525 multiletter control sequences out of 15000+600000
541812 words of font info for 57 fonts, out of 8000000 for 9000
1142 hyphenation exceptions out of 8191
47i,9n,42p,782b,389s stack positions out of 5000i,500n,10000p,200000b,80000s
47i,9n,42p,782b,468s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb></us
r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/shar
e/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb></usr/share/texl
......@@ -503,10 +487,10 @@ y9.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb
></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmti9.pfb></usr/
share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb></usr/share/
texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt9.pfb>
Output written on main.pdf (4 pages, 247996 bytes).
Output written on main.pdf (5 pages, 250889 bytes).
PDF statistics:
180 PDF objects out of 1000 (max. 8388607)
152 compressed objects within 2 object streams
28 named destinations out of 1000 (max. 500000)
191 PDF objects out of 1000 (max. 8388607)
162 compressed objects within 2 object streams
31 named destinations out of 1000 (max. 500000)
96 words of extra memory for PDF output out of 10000 (max. 10000000)
No preview for this file type
No preview for this file type
......@@ -100,14 +100,18 @@ The resulting files were approximately 34\% smaller than their equivalent PNGs,
\section{Introduction}
\subsection{Overview}
The idea is based off of how images are scanned in originally.
The idea is based on how images are scanned in originally.
Like a cathode-ray tube in a television, the algorithm goes line by line, reading/writing each pixel individually in a raster pattern.
Each pixel, as long as it is not on the top or side boundaries, will have 4 neighbors that have already been read into the machine.
Those points can be analyzed and interpolated to find the next pixel's value.
The goal is to encode the error between that value and the original value, save that, and use that to compress and decompress the image.
Even though a possibly larger integer may need to be stored, it's more likely that the guess will be correct, or off by a small margin, making the distribution better for compression.
Even though a possibly larger integer may need to be stored, it is more likely that the guess will be correct or off by a small margin, making the distribution better for compression.
The approach of using the neighboring pixels for compression is not new, as evidenced by its use in ISO/IEC14495-1:1999 \cite{ISO/IEC14495-1} and ``CALIC-a context based adaptive lossless image codec''\cite{544819}, which were both written more than 20 years before the publication of this paper.
%This ``neighbor'' system is not as common as it should be, as it provides a base for simple implementation with high rates of compression.
Our final implementation differs from these methods and others in ways that we found beneficial, and ways others may find to be beneficial as well.
\begin{figure}[h]
\centering
\includegraphics[width=0.2\textwidth]{PixelArrangement.png}
......@@ -117,8 +121,8 @@ Even though a possibly larger integer may need to be stored, it's more likely th
The images that were used in the development of this paper were all thermal images, with values ranging from 19,197 to 25,935.
In the system, total possible values can range from 0 to 32,768.
Most images had ranges of at most 4,096 between the smallest and the largest pixel values.
The camera being used has 16 forward facing thermal sensors creating 16 similar thermal images every frame.
Everything detailed here can still apply to standard grayscale or RGB images, but only 16 bit thermal images were used in testing.
The camera being used has 16 forward-facing thermal sensors creating 16 similar thermal images every frame.
Everything detailed here can still apply to standard grayscale or RGB images, but only 16-bit thermal images were used in testing.
\section{Related Work}
......@@ -127,24 +131,24 @@ PNG is a lossless compression algorithm that also operates using a single pass s
The image is separated into several blocks of arbitrary size, which are then compressed using a combination of LZ77 and Huffman encoding \cite{PNGdetails}.
LZ77 operates by finding patterns in the data and creating pointers to the original instance of that pattern.
For example, if there are two identical blocks of just the color blue, the second one only has to make reference to the first.
Instead of saving two full blocks, the second one just contains the location of the first, telling the decoder to use that block.
Instead of saving two full blocks, the second one is saved as a pointer to the first, telling the decoder to use that block.
Huffman encoding is then used to save these numbers, optimizing how the location data is stored.
If one pattern is more frequent, the algorithm should optimize over this, producing an even smaller file\cite{PNGdetails}.
The Huffman encoding in conjunction with LZ77 helps form ``deflate'', the algorithm summarized here, and the one used in PNG.
Our algorithm has a similar use of Huffman encoding, but a completely different algorithm than LZ77.
LZ77 seeks patterns between blocks while ours has no block structure and no explicit pattern functionality.
Ours uses the equivalent block size of 1, and instead of encoding the data it encodes alternate data which is used to compress.
Our algorithm uses Huffman encoding similarly, but a completely different algorithm than LZ77.
LZ77 seeks patterns between blocks, while ours has no block structure and no explicit pattern functionality.
Ours uses the equivalent block size of 1, and instead of encoding the data, it encodes alternate data which is used to compress.
\subsection{LZW}
LZW operates differently by creating a separate code table that maps every sequence to a code.
Although this is used for an image, the original paper by Welch \cite {LZW} explains it through text examples, which will be done here as well .
Instead of looking at each character individually, it looks at variable length string chains and compresses those.
Passing through the items to be compressed, if a phrase has already been encountered, it saves the reference to the original phrase along with the next character in sequence.
Although this is used for an image, the original paper by Welch \cite {LZW} explains it through text examples, which will be done here as well.
Instead of looking at each character individually, it looks at variable-length string chains and compresses those.
Passing through the items to be compressed, if a phrase has already been encountered, it saves the reference to the original phrase along with the next character in the sequence.
In this way, the longer repeated phrases are automatically found and can be compressed to be smaller.
This system also uses blocks like PNG in order to save patterns in the data, but instead by looking at the entire data as it moves along, PNG only operates on a short portion of the text \cite{PNGdetails}.
This system also uses blocks like PNG in order to save patterns in the data, but instead by looking at the whole data set as it moves along, PNG only operates on a short portion of the text \cite{PNGdetails}.
Ours, similarly to PNG, only looks at a short portion of the data, which may have an advantage over LZW for images.
Images generally do not have the same patterns that text does, so it may be advantageous to not use the entire corpus in compressing an image and instead only evaluate it based off of nearby objects.
Images generally do not have the same patterns that text does, so it may be advantageous not to use the entire corpus in compressing an image and instead only evaluate it based on nearby objects.
The blue parts of the sky will be next to other blue parts of the sky, and in the realm of thermal images, temperatures will probably be most similar to nearby ones due to how heat flows.
\subsection{Similar Methods}
Our prior searches did not find any very similar approaches, especially with 16-bit thermal images.
......@@ -153,17 +157,17 @@ One paper that is close is ``Encoding-interleaved hierarchical interpolation for
This method seems to operate with a similar end goal, to save the interpolation, but operates using a different system, including how it interpolates.
Instead of using neighboring pixels in a raster format, it uses vertical and horizontal ribbons, and a different way of interpolating.
The ribbons alternate, going between a row that is directly saved and one that is not saved but is later interpolated.
In this way it is filling in the gaps of an already robust image and saving the finer details.
By doing this, it is filling in the gaps of an already robust image and saving the finer details.
This other method could possibly show an increase in speed but not likely in overall compression.
This will not have the same benefit as ours since ours uses interpolation on almost the entire image, instead of just parts, helping it optimize over a larger amount of data.
This paper is also similar to ``Iterative polynomial interpolation and data compression'' \cite{Dahlen1993}, where the researchers did a similar approach but with different shapes.
The error numbers were still saved, but they used specifically polynomial interpretation which we did not see fit to use in ours.
The error numbers were still saved, but they specifically used polynomial interpretation which we did not see fit to use in ours.
The closest method is ``Near-lossless image compression by relaxation-labelled prediction'' \cite{AIAZZI20021619} which is similar in the general principles of the interpolation and encoding.
The closest method is ``Near-lossless image compression by relaxation-labelled prediction'' \cite{AIAZZI20021619}, which is similar in the general principles of the interpolation and encoding.
The algorithm detailed in the paper uses a clustering algorithm of the nearby points to create the interpolation, saving the errors to be used later in the reconstruction of the original image.
This method is much more complex, not using a direct interpolation method but instead using a clustering algorithm to find the next point.
This could potentially have an advantage over what we did by using more points in the process, but in implementation it may become too complicated and lose value.
This could potentially have an advantage over what we did by using more points in the process, but in proper implementation it may become too complicated and lose value.
The goal for us was to have a simple and efficient encoding operation, and this would have too many errors to process.
It also has a binning system like ours, with theirs based off of the mean square prediction error.
The problem is that which bin it goes into can shift over the classification process adding to the complexity of the algorithm.
......@@ -174,7 +178,7 @@ To begin, the border values are encoded into the system, starting with the first
The values after that are just modifications from the first value.
There are not many values here and the algorithm needs a place to start.
Alternate things could have been done, but they would have raised temporal complexity with marginal gain.
Once the middle points are reached, the pixel to the left, top left, directly above, and top right have already been read in.
Once the middle points are reached, the pixel to the left, top left, directly above, and top right have already been read into the system.
Each of these values is given a point in the x-y plane, with the top left at (-1,1), top pixel at (0,1), top right pixel at (1,1), and the middle left pixel at (-1,0), giving the target the coordinates (0,0).
Using the formula for a plane in 3D ($ax + by + c = z$) we get the system of equations
$$-a + b + c = z_0$$
......@@ -231,7 +235,7 @@ $$
The new matrix is full rank and can therefore be solved using \verb|numpy.linalg.solve| \cite{Numpy}.
The x that results corresponds to two values followed by the original $c$ from the $ax+by+c=z$ form, which is the predicted pixel value.
Huffman encoding performs well on data with varying frequency \cite{Huffman}, which makes it a good candidate for saving the error numbers.
Huffman encoding performs well on data with varying frequency \cite{Huffman}, making it a good candidate for saving the error numbers.
Most pixels will be off the predicted values by low numbers since many objects have close to uniform surface temperature or have an almost uniform temperature gradient.
\begin{figure}[h]
......@@ -249,20 +253,20 @@ Most pixels will be off the predicted values by low numbers since many objects h
In order to adjust for objects in images that are known to have an unpredictable temperature (fail the cases before), a bin system is used.
The residuals from \verb|numpy.linalg.lstsq| \cite{Numpy} are used to determine the difference across the 4 known points, which is then used to place it in a category.
The residuals from \verb|numpy.linalg.lstsq| \cite{Numpy} are used to determine the difference across the 4 known points, which the difference is then used to place it in a category.
This number is the difference between trying to fit a plane between 4 different points.
If a plane is able to be drawn that contains all 4 points, it makes sense that the error will be much smaller than if the best fitted plane was not very close to any of the points.
If a plane is able to be drawn that contains all 4 points, it makes sense that the error will be much smaller than if the best-fitted plane was not very close to any of the points.
Something more certain is more likely to be correctly estimated.
5 bins were used with splits chosen by evenly distributing the difference numbers into evenly sized bins.
Many of the images had several different bin sizes ranging from 11 in the first category to a difference of 30 as the first category.
An average number between all of them was chosen, since using the average versus specific bins had an effect on compression of less than half a percent.
Many of the images had several different bin sizes ranging from 11 in the first category to a difference of 30 as the size of the first category.
An average number between all of them was chosen since using the average for bin sizes versus specific bin sizes had an effect on compression of less than half a percent.
\section{Results}
We attained an average compression ratio of $0.4057$ on a set of 262 images, with compression ratios on individual images ranging from $0.3685$ to $0.4979$.
Because the system runs off of a saved dictionary, it is better to think of the system as a cross between an individual compression system and a larger archival tool.
This means that there are large changes in compression ratios depending on how many files are compressed at a time, despite the ability to decompress files individually and independently.
This means that there are significant changes in compression ratios depending on how many files are compressed at a time, despite the ability to decompress files individually and independently.
When the size of the saved dictionary was included, the compression ratio on the entire set only changed from $0.4043$ to $0.4057$.
However, when tested on a random image in the set, it went from $0.3981$ to $0.7508$.
......@@ -271,6 +275,7 @@ These are outlined in the discussion section below.
This was tested on a set of a least 16 images, so this does not affect us as much.
When tested on a random set of 16 images, the ratio only changed from $0.3973$ to $0.4193$.
\begin{center}
\begin{tabular}{ |p{1.5cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}| }
\hline
\multicolumn{4}{|c|}{Compression Rates} \\
......@@ -281,7 +286,7 @@ When tested on a random set of 16 images, the ratio only changed from $0.3973$ t
\hline
\end{tabular}
\end{center}
Our method created files that are on average 33.7\% smaller than PNG and 34.5\% smaller than LWZ compression on TIFF.
......@@ -294,10 +299,10 @@ The issue with \verb|numpy.linalg.solve| was later addressed to fix the potentia
Calculating the inverse beforehand and using that in the system had marginal temporal benefit.
\verb|numpy.linalg.solve| runs in $O(N^3)$ for an $N\times N$ matrix, while the multiplication runs in a similar time. \cite{LAPACKAlgorithms}
The least squares method mentioned in this project also has a shortcoming, but this one cannot be solved as easily.
The psudoinverse can be calculated beforehand, but the largest problem is that it is solving the system for every pixel individually and calculating the norm.
\verb|numpy.linalg.lstsq| itself runs in $O(N^3)$ for an $N\times N$ matrix \cite{LeastSquaredProblem}, while the psudoinverse when implemented uses more python runtime, adding to temporal complexity.
The pseudoinverse can be calculated beforehand, but the largest problem is that it is solving the system for every pixel individually and calculating the norm.
\verb|numpy.linalg.lstsq| itself runs in $O(N^3)$ for an $N\times N$ matrix \cite{LeastSquaredProblem}, while the pseudoinverse, when implemented, uses more python runtime, adding to temporal complexity.
This compression suffers greatly when it is only used on individual images, which is not a problem for the project it was tested on.
This compression suffers when it is only used on individual images, which is not a problem for the use cases of this project.
The test images came from a camera that has 16 image sensors that work simultaneously.
The camera works in multiple image increments and therefore creates large packets that can be saved together, while still having the functionality of decompressing individually.
This saves greatly on the memory that is required to view an image.
......@@ -305,13 +310,12 @@ It was therefore not seen necessary to create a different system to compress ind
A potential workaround for this problem would be to code extraneous values into the image directly instead of adding them to the full dictionary.
This has the downside of not being able to integrate perfectly with Huffman encoding.
A leaf of the tree could be a trigger to not use Huffman encoding anymore and use an alternate system to read in the bits.
We did not to do this, but it would be a simple change for someone with a different use case.
A leaf of the tree could be a trigger to switch from Huffman encoding, and instead use an alternate system to read in the bits.
We did not do this, but it would be a simple change for someone with a different use case.
{\small
\bibliographystyle{ieee}
\bibliography{main}
}
\end{document}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment