From 03d6517111fc03615e5d6e936a5fcb593201422c Mon Sep 17 00:00:00 2001 From: Apostolof Date: Tue, 21 May 2019 21:12:04 +0300 Subject: [PATCH] Finalization --- Assignment_2/1.jpeg | Bin 0 -> 2816 bytes Assignment_2/2.jpeg | Bin 0 -> 6489 bytes Assignment_2/report/5.0.demo1.tex | 12 ++- Assignment_2/report/6.0.demo2.tex | 50 +++++----- Assignment_2/report/7.0.demo3.tex | 3 +- Assignment_2/report/7.1.demo3a.tex | 31 +++---- Assignment_2/report/7.2.demo3b.tex | 10 +- Assignment_2/report/7.3.demo3c.tex | 55 +++++++++++ Assignment_2/report/8.0.results.tex | 49 +++++++--- Assignment_2/report/report.tex | 2 +- Assignment_2/report/res/exp_1_c.pdf_tex | 58 ++++++++++++ Assignment_2/report/res/exp_1_c.svg | 116 ++++++++++++++++++++++++ Assignment_2/report/res/exp_1_o.pdf_tex | 58 ++++++++++++ Assignment_2/report/res/exp_1_o.svg | 116 ++++++++++++++++++++++++ Assignment_2/report/res/exp_2_c.pdf_tex | 58 ++++++++++++ Assignment_2/report/res/exp_2_c.svg | 116 ++++++++++++++++++++++++ Assignment_2/report/res/exp_2_o.pdf_tex | 58 ++++++++++++ Assignment_2/report/res/exp_2_o.svg | 116 ++++++++++++++++++++++++ Assignment_2/tester.m | 36 ++------ 19 files changed, 855 insertions(+), 89 deletions(-) create mode 100644 Assignment_2/1.jpeg create mode 100644 Assignment_2/2.jpeg create mode 100644 Assignment_2/report/res/exp_1_c.pdf_tex create mode 100644 Assignment_2/report/res/exp_1_c.svg create mode 100644 Assignment_2/report/res/exp_1_o.pdf_tex create mode 100644 Assignment_2/report/res/exp_1_o.svg create mode 100644 Assignment_2/report/res/exp_2_c.pdf_tex create mode 100644 Assignment_2/report/res/exp_2_c.svg create mode 100644 Assignment_2/report/res/exp_2_o.pdf_tex create mode 100644 Assignment_2/report/res/exp_2_o.svg diff --git a/Assignment_2/1.jpeg b/Assignment_2/1.jpeg new file mode 100644 index 0000000000000000000000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z#w||kYdJcsuQ^yC*pC8&Rb&f1K%-3GA0Ln$xKI;}RkqP15$6+L1xo{uu5|PUn(WKa z4B{t9hX!wE!8);%KCa@;uMb-{kG_dt^=w>mytBhW%Tb@(O2rnO3wDJL zcNCVk9;GNs__NJd3ysoMMcY*A_^=>Lh~c^Z7w`MifPVI^jt74qtf}pKm&!j_UX{fC z#Rh&>y7R6ByquchaJgxwloX<}ODs3}^Im#YA2S=td1l~#!glBwv{U*-?asdWE$Z@% zj)b%5zwU&l=X0Ayr)ykp6V^WP_y4}z3ITspbGCU{ zbu*31-piNelHc(1@u#`BjhNqqd{#2?zPX}L-SL4Z3-dMwM1$8A4!JT&71YylGxBq4 zGapa;`X?XOx#<#;nK@(KR06th{A(zdjSV;Juj5?wpX93JW.pdf_tex} +%% instead of +%% \includegraphics{.pdf} +%% To scale the image, write +%% \def\svgwidth{} +%% \input{.pdf_tex} +%% instead of +%% \includegraphics[width=]{.pdf} +%% +%% Images with a different path to the parent latex file can +%% be accessed with the `import' package (which may need to be +%% installed) using +%% \usepackage{import} +%% in the preamble, and then including the image with +%% \import{}{.pdf_tex} +%% Alternatively, one can specify +%% \graphicspath{{/}} +%% +%% For more information, please see info/svg-inkscape on CTAN: +%% http://tug.ctan.org/tex-archive/info/svg-inkscape +%% +\begingroup% + \makeatletter% + \providecommand\color[2][]{% + \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}% + \renewcommand\color[2][]{}% + }% + \providecommand\transparent[1]{% + \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}% + \renewcommand\transparent[1]{}% + }% + \providecommand\rotatebox[2]{#2}% + \newcommand*\fsize{\dimexpr\f@size pt\relax}% + \newcommand*\lineheight[1]{\fontsize{\fsize}{#1\fsize}\selectfont}% + \ifx\svgwidth\undefined% + \setlength{\unitlength}{67.49999915bp}% + \ifx\svgscale\undefined% + \relax% + \else% + \setlength{\unitlength}{\unitlength * \real{\svgscale}}% + \fi% + \else% + \setlength{\unitlength}{\svgwidth}% + \fi% + \global\let\svgwidth\undefined% + \global\let\svgscale\undefined% + \makeatother% + \begin{picture}(1,1)% + \lineheight{1}% + \setlength\tabcolsep{0pt}% + \put(0,0){\includegraphics[width=\unitlength,page=1]{exp_1_c.pdf}}% + \end{picture}% +\endgroup% diff --git a/Assignment_2/report/res/exp_1_c.svg b/Assignment_2/report/res/exp_1_c.svg new file mode 100644 index 0000000..7cb5788 --- /dev/null +++ b/Assignment_2/report/res/exp_1_c.svg @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Assignment_2/report/res/exp_1_o.pdf_tex b/Assignment_2/report/res/exp_1_o.pdf_tex new file mode 100644 index 0000000..57cdf4d --- /dev/null +++ b/Assignment_2/report/res/exp_1_o.pdf_tex @@ -0,0 +1,58 @@ +%% Creator: Inkscape inkscape 0.92.3, www.inkscape.org +%% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010 +%% Accompanies image file 'exp_1_o.pdf' (pdf, eps, ps) +%% +%% To include the image in your LaTeX document, write +%% \input{.pdf_tex} +%% instead of +%% \includegraphics{.pdf} +%% To scale the image, write +%% \def\svgwidth{} +%% \input{.pdf_tex} +%% instead of +%% \includegraphics[width=]{.pdf} +%% +%% Images with a different path to the parent latex file can +%% be accessed with the `import' package (which may need to be +%% installed) using +%% \usepackage{import} +%% in the preamble, and then including the image with +%% \import{}{.pdf_tex} +%% Alternatively, one can specify +%% \graphicspath{{/}} +%% +%% For more information, please see info/svg-inkscape on CTAN: +%% http://tug.ctan.org/tex-archive/info/svg-inkscape +%% +\begingroup% + \makeatletter% + \providecommand\color[2][]{% + \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}% + \renewcommand\color[2][]{}% + }% + \providecommand\transparent[1]{% + \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}% + \renewcommand\transparent[1]{}% + }% + \providecommand\rotatebox[2]{#2}% + \newcommand*\fsize{\dimexpr\f@size pt\relax}% + \newcommand*\lineheight[1]{\fontsize{\fsize}{#1\fsize}\selectfont}% + \ifx\svgwidth\undefined% + \setlength{\unitlength}{67.49999915bp}% + \ifx\svgscale\undefined% + \relax% + \else% + \setlength{\unitlength}{\unitlength * \real{\svgscale}}% + \fi% + \else% + \setlength{\unitlength}{\svgwidth}% + \fi% + \global\let\svgwidth\undefined% + \global\let\svgscale\undefined% + \makeatother% + \begin{picture}(1,1)% + \lineheight{1}% + \setlength\tabcolsep{0pt}% + \put(0,0){\includegraphics[width=\unitlength,page=1]{exp_1_o.pdf}}% + \end{picture}% +\endgroup% diff --git a/Assignment_2/report/res/exp_1_o.svg b/Assignment_2/report/res/exp_1_o.svg new file mode 100644 index 0000000..9fe552b --- /dev/null +++ b/Assignment_2/report/res/exp_1_o.svg @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Assignment_2/report/res/exp_2_c.pdf_tex b/Assignment_2/report/res/exp_2_c.pdf_tex new file mode 100644 index 0000000..5690eed --- /dev/null +++ b/Assignment_2/report/res/exp_2_c.pdf_tex @@ -0,0 +1,58 @@ +%% Creator: Inkscape inkscape 0.92.3, www.inkscape.org +%% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010 +%% Accompanies image file 'exp_2_c.pdf' (pdf, eps, ps) +%% +%% To include the image in your LaTeX document, write +%% \input{.pdf_tex} +%% instead of +%% \includegraphics{.pdf} +%% To scale the image, write +%% \def\svgwidth{} +%% \input{.pdf_tex} +%% instead of +%% \includegraphics[width=]{.pdf} +%% +%% Images with a different path to the parent latex file can +%% be accessed with the `import' package (which may need to be +%% installed) using +%% \usepackage{import} +%% in the preamble, and then including the image with +%% \import{}{.pdf_tex} +%% Alternatively, one can specify +%% \graphicspath{{/}} +%% +%% For more information, please see info/svg-inkscape on CTAN: +%% http://tug.ctan.org/tex-archive/info/svg-inkscape +%% +\begingroup% + \makeatletter% + \providecommand\color[2][]{% + \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}% + \renewcommand\color[2][]{}% + }% + \providecommand\transparent[1]{% + \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}% + \renewcommand\transparent[1]{}% + }% + \providecommand\rotatebox[2]{#2}% + \newcommand*\fsize{\dimexpr\f@size pt\relax}% + \newcommand*\lineheight[1]{\fontsize{\fsize}{#1\fsize}\selectfont}% + \ifx\svgwidth\undefined% + \setlength{\unitlength}{67.49999915bp}% + \ifx\svgscale\undefined% + \relax% + \else% + \setlength{\unitlength}{\unitlength * \real{\svgscale}}% + \fi% + \else% + \setlength{\unitlength}{\svgwidth}% + \fi% + \global\let\svgwidth\undefined% + \global\let\svgscale\undefined% + \makeatother% + \begin{picture}(1,1)% + \lineheight{1}% + \setlength\tabcolsep{0pt}% + \put(0,0){\includegraphics[width=\unitlength,page=1]{exp_2_c.pdf}}% + \end{picture}% +\endgroup% diff --git a/Assignment_2/report/res/exp_2_c.svg b/Assignment_2/report/res/exp_2_c.svg new file mode 100644 index 0000000..f4f99ea --- /dev/null +++ b/Assignment_2/report/res/exp_2_c.svg @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Assignment_2/report/res/exp_2_o.pdf_tex b/Assignment_2/report/res/exp_2_o.pdf_tex new file mode 100644 index 0000000..c7e93b8 --- /dev/null +++ b/Assignment_2/report/res/exp_2_o.pdf_tex @@ -0,0 +1,58 @@ +%% Creator: Inkscape inkscape 0.92.3, www.inkscape.org +%% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010 +%% Accompanies image file 'exp_2_o.pdf' (pdf, eps, ps) +%% +%% To include the image in your LaTeX document, write +%% \input{.pdf_tex} +%% instead of +%% \includegraphics{.pdf} +%% To scale the image, write +%% \def\svgwidth{} +%% \input{.pdf_tex} +%% instead of +%% \includegraphics[width=]{.pdf} +%% +%% Images with a different path to the parent latex file can +%% be accessed with the `import' package (which may need to be +%% installed) using +%% \usepackage{import} +%% in the preamble, and then including the image with +%% \import{}{.pdf_tex} +%% Alternatively, one can specify +%% \graphicspath{{/}} +%% +%% For more information, please see info/svg-inkscape on CTAN: +%% http://tug.ctan.org/tex-archive/info/svg-inkscape +%% +\begingroup% + \makeatletter% + \providecommand\color[2][]{% + \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}% + \renewcommand\color[2][]{}% + }% + \providecommand\transparent[1]{% + \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}% + \renewcommand\transparent[1]{}% + }% + \providecommand\rotatebox[2]{#2}% + \newcommand*\fsize{\dimexpr\f@size pt\relax}% + \newcommand*\lineheight[1]{\fontsize{\fsize}{#1\fsize}\selectfont}% + \ifx\svgwidth\undefined% + \setlength{\unitlength}{67.49999915bp}% + \ifx\svgscale\undefined% + \relax% + \else% + \setlength{\unitlength}{\unitlength * \real{\svgscale}}% + \fi% + \else% + \setlength{\unitlength}{\svgwidth}% + \fi% + \global\let\svgwidth\undefined% + \global\let\svgscale\undefined% + \makeatother% + \begin{picture}(1,1)% + \lineheight{1}% + \setlength\tabcolsep{0pt}% + \put(0,0){\includegraphics[width=\unitlength,page=1]{exp_2_o.pdf}}% + \end{picture}% +\endgroup% diff --git a/Assignment_2/report/res/exp_2_o.svg b/Assignment_2/report/res/exp_2_o.svg new file mode 100644 index 0000000..c583e94 --- /dev/null +++ b/Assignment_2/report/res/exp_2_o.svg @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Assignment_2/tester.m b/Assignment_2/tester.m index 24e9bfa..d5292bf 100644 --- a/Assignment_2/tester.m +++ b/Assignment_2/tester.m @@ -1,35 +1,15 @@ image = imageT; -k = 3; +k = 4; graph = Image2Graph(image); %clusters = mySpectralClustering(graph, k); -clusters = myNCuts(graph, k); +%clusters = myNCuts(graph, k); +clusters = recursiveNCuts(graph); -clusters = reshape(clusters, size(image, 1), []); - -redChannel = image(:, :, 1); -greenChannel = image(:, :, 2); -blueChannel = image(:, :, 3); - -segImR = clusters; -segImG = clusters; -segImB = clusters; +%calculateNcut(graph, clusters); +unique(clusters) -for cluster = 1:k - meanR = mean(redChannel(clusters == cluster)); - meanG = mean(greenChannel(clusters == cluster)); - meanB = mean(blueChannel(clusters == cluster)); - - segImR(clusters == cluster) = meanR; - segImG(clusters == cluster) = meanG; - segImB(clusters == cluster) = meanB; -end - -segIm = zeros(size(image, 1), size(image, 2), 3); -segIm(:, :, 1) = segImR; -segIm(:, :, 2) = segImG; -segIm(:, :, 3) = segImB; -imshow(segIm) +clusters = reshape(clusters, size(image, 1), []); +imshow(meanClustersColorRGB(imageT, clusters)) -clearvars segImR segImG segImB meanR meanG meanB graph redChannel ... - greenChannel blueChannel clusters k image cluster segIm \ No newline at end of file +clearvars graph clusters k image \ No newline at end of file