Font Size: a A A

Implementation Of Android Filter Based On Vulkan

Posted on:2018-04-26Degree:MasterType:Thesis
Country:ChinaCandidate:B B LiFull Text:PDF
GTID:2428330545468877Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the development of mobile Internet,especially the popularity of Android phones in recent years,the Android phone filter gets more and more popular.Two ways are used to implement the filter under the Android platform:One way is to use the development technology of the NDK(Native Development Kit)in native layer of Android platform,and then the image filter algorithm is processed using C/C++,this method takes up a large CPU resource,the mobile phone is easy to get hot,can not achieve real-time preview requirements.Another method is to use OpenGL ES(OpenGL for Embedded Systems)through GLSL(OpenGL Shading Language)to implement the filter algorithm,because GLSL is run in the GPU,although the rendering speed of the filter and the FPS(Frames Per Second)are greatly improved,but OpenGL based on the high burden of GPU drivers,so the image of the filter rendering performance is still not high,there is a lot of room for improvement.Mobile platform hardware architecture at the beginning of the latest 2D/3D rendering tool Vulkan was considered,the burden of GPU drivers has been significantly reduced,so,based on the above problems of the existing filter system,this thesis proposes to use Vulkan to render the filter system to improve the performance of the original filter system rendering.The main work of this thesis is as follows:(1)Camera functions and picture browsing have been re-customized,getting the image to be rendered from Camera preview interface and photo interface and picture browsing interface,and passing the image to be rendered to Android native layer.(2)The corresponding interface of native layer has been designed,providing concrete implementation method for Java layer corresponding interface,a rendering manager has been designed in native layer to manage the whole system's filter rendering work,to balance the frequency of the camera's image and the speed of the Vulkan rendering engine,a loop-free queue has been designed to buffer the camera's preview picture at the render management layer to design the rendering thread and the rendering event mechanism for starting and controlling the Vulkan rendering engine.(3)Rendering engine of the filter system has been built by Vulkan,designing the synchronization of the rendering command in GPU execution,the synchronization between GPU operation and CPU operation,GPU and CPU of various resources management,designing filter rendering scheme,combined with the compute pipeline and graphics pipeline to receive rendering management user's rendering request,the GLSL shader fragment that implements the filter algorithm has been executed in GPU,achieving filter rendering effect and enhancing the performance of filter rendering.(4)The original filter system is extended,and the implementation methods and steps of several filters are analyzed.(5)The system is tested and validated by the actual application scene.Then choose several filters and the original OpenGL ES implementation of the filter to do rendering performance contrast,the results show that the use of Vulkan to implement the Android filter is indeed faster than based on OpenGL ES implementation,improve the entire filter system rendering performance,completed the original design of this thesis.
Keywords/Search Tags:Android, Vulkan, Real-time filter, Image processing
PDF Full Text Request
Related items