Mateja Mencin (2016) Content-aware image resizing in OpenCL. EngD thesis.
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.
Actions (login required)