{"id":195,"date":"2017-07-19T11:10:41","date_gmt":"2017-07-19T14:10:41","guid":{"rendered":"http:\/\/web.inf.ufpr.br\/vri\/?page_id=195"},"modified":"2017-07-19T11:28:37","modified_gmt":"2017-07-19T14:28:37","slug":"tony-alexander-hild-msc-2012","status":"publish","type":"page","link":"https:\/\/web.inf.ufpr.br\/vri\/alumni\/tony-alexander-hild-msc-2012\/","title":{"rendered":"Tony Alexander Hild, MSc, 2012"},"content":{"rendered":"<div id=\"content-core\">\n<div id=\"parent-fieldname-text-c49515eaea98013dc8399dda6217a2e9\" class=\"\">\n<h2 id=\"parent-fieldname-description\" class=\"documentDescription\">Optimization of the Insight Segmentation and Registration Toolkit (ITK) using Streaming SIMD Extensions (SSE) and OpenMP<\/h2>\n<div id=\"content-core\">\n<div id=\"parent-fieldname-text-2ecb00e3-993d-4fc2-8fae-1d0c745807a9\" class=\"\">\n<p>This research was conducted as a requirement for obtaining the degree of Master of Science in Informatics by Federal University of Paran\u00e1 (UFPR).<\/p>\n<p>Author: Tony Alexander Hild (<a class=\"external-link\" href=\"http:\/\/lattes.cnpq.br\/8060668053527592\">Lattes<\/a>)<\/p>\n<p>Supervisor: <span class=\"link-external\"><a href=\"http:\/\/web.inf.ufpr.br\/danielw\">Daniel Weingaertner<\/a><\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><b>Abstract<\/b><\/h3>\n<p>The image processing has achieved great importance in a world that depends largely on visual stimuli. On this assumption, efficient image processing algorithms are needed to increase productivity in various fields such as medicine, industry and entertainment.\u00a0 For that, this work studied\u00a0 Multiple Instruction, Multiple Data (MIMD) optimization techniques with the use of OpenMP and Single Instruction, Multiple Data (SIMD), with the use of SSE, and implemented these techniques in convolution algorithms, and Canny edge detection algorithm, evaluating their performance. In addition, was proposed changes to the ITK library so that other filters may benefit from the studied optimizations. Was obtained a performance gain up to 7 times on the implementations of convolution algorithms\u00a0 and 16 times on the implementations of the Canny edge detection algorithm. It was concluded that still can achieve performance gains by optimizing algorithms to run on existing processors, with the cost of increased complexity of coding, and reduction of code portability.<\/p>\n<p>Key-words: MIMD, SIMD; SSE; OpenMP; Processamento de Imagens; ITK; Algoritmos de Convolu\u00e7\u00e3o; Detec\u00e7\u00e3o de Bordas; Canny.<\/p>\n<p><b><br \/>\nRelated Topics<\/b><\/p>\n<ul>\n<li>Parallel Computing<\/li>\n<li>Instruction Level Paralelism<\/li>\n<li>Image Processing using ITK<\/li>\n<li>Parallel Image Processing<\/li>\n<li>Canny Edge Detection<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><b>Files<\/b><\/h3>\n<ul>\n<li><a class=\"external-link\" href=\"http:\/\/www.acervodigital.ufpr.br\/handle\/1884\/28515\">Dissertation<\/a> (PDF &#8211; Portuguese)<\/li>\n<li><a class=\"external-link\" href=\"http:\/\/git.io\/B_rojg\">ITK patch<\/a><\/li>\n<li><a class=\"external-link\" href=\"https:\/\/github.com\/thild\/ITKOpCannyEdgeDetectionImageFilter\">ITKOpCannyEdgeDetectionFilter source code<\/a><\/li>\n<li><a class=\"external-link\" href=\"http:\/\/dl.dropbox.com\/u\/6882617\/opcanny_results.txt\"><span class=\"external-link\">TKOpCannyEdgeDetectionFilter testes results<\/span><\/a><\/li>\n<li><a class=\"external-link\" href=\"http:\/\/dl.dropbox.com\/u\/6882617\/dataset.tar.gz\">Images dataset<\/a><\/li>\n<li><a class=\"external-link\" href=\"https:\/\/github.com\/thild\/opConvolution\">opConvolution source code<\/a><\/li>\n<\/ul>\n<ul>\n<li><a class=\"external-link\" href=\"http:\/\/dl.dropbox.com\/u\/6882617\/opConvolution_results.tar.gz\"><span class=\"external-link\">opConvolution<\/span><span class=\"external-link\"> testes results<\/span><\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><b>Instructions to build ITKOpCannyEdgeDetectionFilter<\/b><\/h3>\n<p>Download one of the ITK versions between 3.16 and 3.20 from <a class=\"external-link\" href=\"http:\/\/www.itk.org\/ITK\/resources\/software.html\">http:\/\/www.itk.org\/ITK\/resources\/software.html<\/a>.<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Apply the patch:<\/li>\n<li>$ cd \/root\/directory\/where\/is\/found\/InsightToolkit-3.x<\/li>\n<li>$ wget <a class=\"external-link\" href=\"http:\/\/git.io\/B_rojg\">http:\/\/git.io\/B_rojg<\/a><\/li>\n<li>$ ln -s InsightToolkit-3.x\/Code Original-Code<\/li>\n<li>$ patch -p0 &lt; itkop.patch<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Build ITK:<\/p>\n<ul>\n<li>$ mkdir InsightTootlkit-3.x-Build<\/li>\n<li>$ cd InsightTootlkit-3.x-Build<\/li>\n<li>ccmake ..\/InsightToolkit-3.x<\/li>\n<\/ul>\n<ul>\n<li>add the following flags:<\/li>\n<\/ul>\n<p>CMAKE_CXX_COMPILER:FILEPATH=\/usr\/bin\/c++<br \/>\nCMAKE_BUILD_TYPE:STRING=Release<br \/>\nCMAKE_CXX_FLAGS:STRING=-fabi-version=5<br \/>\nCMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG -mfpmath=sse -march=native -mtune=native -ffast-math -ftree-vectorize<br \/>\nCMAKE_EXE_LINKER_FLAGS:STRING=-lrt<br \/>\nCMAKE_INSTALL_PREFIX:PATH=\/path\/to\/patched\/install<\/p>\n<ul>\n<li>$ make<\/li>\n<\/ul>\n<ul>\n<li>$ make install<\/li>\n<\/ul>\n<p>Download the latest ITKOpCannyEdgeDetectionFilter source code from <a class=\"external-link\" href=\"https:\/\/github.com\/thild\/ITKOpCannyEdgeDetectionImageFilter\">https:\/\/github.com\/thild\/ITKOpCannyEdgeDetectionImageFilter<\/a><\/p>\n<ul>\n<li>$ mkdir ITKOpCannyEdgeDetectionFilter-Build<\/li>\n<li>$ cd ITKOpCannyEdgeDetectionFilter-Build<\/li>\n<li>$ ccmake ..\/ITKOpCannyEdgeDetectionFilter<\/li>\n<\/ul>\n<ul>\n<li>add the following flags:<\/li>\n<\/ul>\n<p>CMAKE_CXX_COMPILER:FILEPATH=\/usr\/bin\/c++<br \/>\nCMAKE_BUILD_TYPE:STRING=Release<br \/>\nCMAKE_CXX_FLAGS:STRING=-fopenmp -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2 -fabi-version=5<br \/>\nCMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG -mfpmath=sse -march=native -mtune=native -ffast-math -ftree-vectorize<br \/>\nCMAKE_INSTALL_PREFIX:PATH=\/path\/to\/ITKOpCannyEdgeDetectionImageFilter-Bin<br \/>\nITK_DIR:PATH=\/path\/to\/patched\/install\/of\/InsightToolkit-3.x<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>$ make install<\/li>\n<li>$ cd \/path\/to\/ITKOpCannyEdgeDetectionImageFilter-Bin\/bin<\/li>\n<li>$ wget <a class=\"external-link\" href=\"http:\/\/dl.dropbox.com\/u\/6882617\/dataset.tar.gz\">http:\/\/dl.dropbox.com\/u\/6882617\/dataset.tar.gz<\/a><\/li>\n<li>$ tar zxf dataset.tar.gz<\/li>\n<li>$ cd dataset\/bin<\/li>\n<li>$ .\/generate_datasets 6<\/li>\n<li>$ cd ..\/..\/<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>$ .\/opcanny -pt -c test.cfg<\/p>\n<h3><\/h3>\n<h3><b>Instructions to build opConvolution<\/b><\/h3>\n<p>Download the latest opConvolution source code from <a class=\"external-link\" href=\"https:\/\/github.com\/thild\/opConvolution\">https:\/\/github.com\/thild\/opConvolution<\/a><\/p>\n<ul>\n<li>$ mkdir opConvolution-Build<\/li>\n<li>$ cd opConvolution-Build<\/li>\n<li>$ ccmake ..\/opConvolution<\/li>\n<li>add the fowlling flags:<\/li>\n<\/ul>\n<p>CMAKE_CXX_COMPILER:FILEPATH=\/usr\/bin\/c++<br \/>\nCMAKE_BUILD_TYPE:STRING=Release<br \/>\nCMAKE_CXX_FLAGS:STRING=-fopenmp -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2 -fabi-version=5<br \/>\nCMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG -mfpmath=sse -march=native -mtune=native -ffast-math -ftree-vectorize<br \/>\nCMAKE_INSTALL_PREFIX:PATH=\/path\/to\/opConvolve-Bin<\/p>\n<ul>\n<li>$ make install<\/li>\n<li>$ cd \/path\/to\/opConvolve-Bin\/opConvolve-Bin\/bin<\/li>\n<li>$ .\/opconv -c test.cfg<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><b>Code License<\/b><\/h3>\n<p>The source code is licensed by MIT\/X11 license (<a class=\"external-link\" href=\"http:\/\/www.opensource.org\/licenses\/mit-license.php\">http:\/\/www.opensource.org\/licenses\/mit-license.php<\/a>).<\/p>\n<p>Last Update: 10\/02\/2012<br \/>\n\u00a9 2012, Tony Alexander HIld &lt; tony_hild (at) yahoo (dot) com &gt;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Optimization of the Insight Segmentation and Registration Toolkit (ITK) using Streaming SIMD Extensions (SSE) and OpenMP This research was conducted as a requirement for obtaining the degree of Master of Science in Informatics by Federal University of Paran\u00e1 (UFPR). Author: <a href=\"https:\/\/web.inf.ufpr.br\/vri\/alumni\/tony-alexander-hild-msc-2012\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":14,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-195","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/pages\/195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/comments?post=195"}],"version-history":[{"count":5,"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/pages\/195\/revisions"}],"predecessor-version":[{"id":203,"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/pages\/195\/revisions\/203"}],"up":[{"embeddable":true,"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/pages\/14"}],"wp:attachment":[{"href":"https:\/\/web.inf.ufpr.br\/vri\/wp-json\/wp\/v2\/media?parent=195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}