Your browser does not allow JavaScript!
JavaScript is necessary for the proper functioning of this website. Please enable JavaScript or use a modern browser.
Open Science Slovenia
Open Science
DiKUL
slv
|
eng
Search
Browse
New in RUL
About RUL
In numbers
Help
Sign in
Vsebinsko zavedno spreminjanje velikosti slik v OpenCL
ID
MENCIN, MATEJA
(
Author
),
ID
Lotrič, Uroš
(
Mentor
)
More about this mentor...
PDF - Presentation file,
Download
(10,79 MB)
MD5: E1BA0B40A1366B268A326A59BF30B2A2
PID:
20.500.12556/rul/3aedf179-236c-485b-8868-8e431353b993
Image galllery
Abstract
Namen diplomskega dela je preveriti ali se izbrani algoritem za vsebinsko zavedno spreminjanje velikosti slik, dejansko izvede hitreje na grafično procesnih enotah v primerjavi z izvedbo na centralnih procesnih enotah. Za ta namen smo implementirali algoritem rezanja šivov, ki je postopek za spreminjanje dimenzij slike z upoštevanjem vsebine same slike. Pri algoritmu rezanja šivov dimenzijo slike spremenimo tako, da odrežemo ali dodamo šiv, ki je povezana pot iz ene strani slike na drugo. Šiv predstavlja najmanj pomemben del slike in ga zato lahko odrežemo ali dodamo, ne da bi s tem izgubili pomemben del slike. Pri testiranju smo ugotovili, da je algoritem uspešen na slikah z monotonim ozadjem. Ker algoritem ni bil glavni del diplomske naloge, se z izboljšavo le-tega nismo ukvarjali. Za implementacijo omenjenega algoritma na grafično procesnih enotah (ang. graphical processing unit, GPU) smo uporabili heterogeno programsko ogrodje OpenCL. OpenCL je standard za heterogeno paralelno računaje na različnih platformah različnih proizvajalcev. Njegovo arhitekturo lahko razdelimo na platformni, izvajalni, pomnilniški in programski model. Vse to je podrobneje opisano v tretjem poglavju. Četrto poglavje zajema opis naše implementacije algoritma rezanja šivov. Tega smo se lotili na dva načina. Prvi je rezanje enega šiva, pri katerem za vsak šiv, ki ga želimo odrezati, ponovno poračunamo energijo slike. Drugi pa je rezanje več šivov naenkrat. V tem primeru poizkušamo poiskati več šivov, ki jih na podlagi poračunane energije lahko odrežemo. Postopek ponavljamo dokler ne pridemo do želenih dimenzij. Ugotovili smo, da lahko izbira delovne skupine močno vpliva na čas izvajanja ščepca. Ravno tako na hitrost izvedbe močno vpliva tudi implementacija samega ščepca. Nepravilen pristop lahko močno upočasni njegovo izvajanje. To se lepo vidi pri implementaciji rezanja več šivov naenkrat. V tem primeru je bilo izvajanje algoritma hitrejše na centralno procesni enoti(angl. central processing unit, CPU), kot pa na GPE. Pri načinu rezanja samo enega šiva pa smo algoritem uspešno implementirali, saj je bila pohitritev velika.
Language:
Slovenian
Keywords:
GPE
,
CPE
,
OpenCL
,
algoritem rezanja šivov
Work type:
Bachelor thesis/paper
Organization:
FRI - Faculty of Computer and Information Science
Year:
2016
PID:
20.500.12556/RUL-81044
Publication date in RUL:
25.03.2016
Views:
1502
Downloads:
405
Metadata:
Cite this work
Plain text
BibTeX
EndNote XML
EndNote/Refer
RIS
ABNT
ACM Ref
AMA
APA
Chicago 17th Author-Date
Harvard
IEEE
ISO 690
MLA
Vancouver
:
Copy citation
Share:
Secondary language
Language:
English
Title:
Content-aware image resizing in OpenCL
Abstract:
The purpose of this thesis was to test if the algorithm for content-aware image resizing runs faster on graphics processing unit in comparison to central processing unit. For that we chose content-aware image resizing algorithm called seam carving. With seam carving we can change image dimensions by finding the optimal seam which we can carve out or put in, depending on weather we want to shrink or enlarge the image. Seam is connected path from one side of the image to another and holds least important information of the image. With our testing we realized that this algorithm works best in images with monotone background. Because algorithm itself was not the purpose of this thesis we did not try to improve it. For implementation of this algorithm on graphics processing unit we used heterogeneous programming framework called OpenCL. OpenCL is a standard for heterogeneous parallel computing on cross-vendor and cross-platform hardware. We can describe OpenCL architecture with platform model, execution model, memory model and programming model. Each of them is described in details in chapter three. In chapter four we look at our implementation of seam carving algorithm. We had two approaches. One is carving one seam at the time, which means recalculating energy and its cumulative every time we carve out a seam. Second approach is carving multiple seams at a time. In this case we try to find more seams that we can carve out based on calculated energy and cumulative. We repeat the process until we get the desired image dimensions. Based on testing we realised that choosing the right work group size is really important, as well as implementation of kernels. If we choose wrong approach we can slow down its execution considerably, which is evident from the results of second approach. In this case the execution of the algorithm on central processing unit was faster then execution of it on graphics processing unit. We were more successful with implementation of first approach which runs faster on graphics processing unit then on central processing unit.
Keywords:
GPU
,
CPU
,
OpenCL
,
seam carving algorithm
Similar documents
Similar works from RUL:
Similar works from other Slovenian collections:
Back