You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
673 B
6 lines
673 B
3 years ago
|
\begin{Verbatim}[commandchars=\\\{\}]
|
||
|
\PYG{k}{def} \PYG{n+nf}{calc\PYGZus{}simil}\PYG{p}{(}\PYG{n}{name}\PYG{p}{,} \PYG{n}{original\PYGZus{}image}\PYG{p}{,} \PYG{n}{image}\PYG{p}{):}
|
||
|
\PYG{n}{simil\PYGZus{}score}\PYG{p}{,} \PYG{n}{\PYGZus{}} \PYG{o}{=} \PYG{n}{ssim}\PYG{p}{(}\PYG{n}{original\PYGZus{}image}\PYG{p}{,} \PYG{n}{image}\PYG{p}{,} \PYG{n}{full}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)}
|
||
|
\PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+sa}{f}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+si}{\PYGZob{}}\PYG{n}{name}\PYG{l+s+si}{\PYGZcb{}}\PYG{l+s+s2}{ SSIM score is: }\PYG{l+s+si}{\PYGZob{}}\PYG{n}{simil\PYGZus{}score}\PYG{l+s+si}{\PYGZcb{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)}
|
||
|
\end{Verbatim}
|