Explore chapters and articles related to this topic
Graphics Programming
Published in Aditi Majumder, M. Gopi, Introduction to Visual Computing, 2018
OpenGL is one of the oldest cross‐language cross‐platform interfaces for 3D graphics rendering providing a way to interact with GPUs. GLUT is the OpenGL Utility toolkit for writing OpenGL programs independent of the window system used for rendering the scene. It implements a simple windowing API for OpenGL making it much easier to learn OpenGL. GLUT also provides a portable API across multiple OS and PCs. OpenGL is defined as a set of functions which can be called by the client program. The functions are similar superficially to C, but are language independent. OpenGL’s popularity is primarily due to its quality of official documentation which are known by the colors of their covers (the red, orange, green and blue books are the first to fourth edition of the OpenGL Programming Guide). Often accompanying libraries like GLU, GLEE or GLEW bind with OpenGL to support useful features that may not be supported in contemporary hardware like mipmapping or tessellation. OpenGL Shading language (GLSL) is a high level shading language based on the syntax of C, first designed to allow OpenGL to access the programmable GPUs with using assembly level or hardware specific languages. OpenGL ES is an extension of OpenGL API for programming for embedded devices. WebGL is a Javascript API for rendering 3D graphics. Direct3D is a similar API offered by Microsoft which promises better performance on Windows OS while Metal is an API that debuted for Apple’s iOS8.
Rapid 3D measurement of colour objects based on three-channel sinusoidal fringe projection
Published in Journal of Modern Optics, 2022
Bao Wei, Fu Yanjun, Zhong Kejun, Ma Baiheng, Yan Zhanjun
The experimental system consisted of a DLP projector (Texas Instruments, DLP Lightcrafter 4500) with a resolution of 912 × 1140 pixels and a CMOS RGB camera (Daheng, MER-230-168u3c) with a resolution of 1920 × 1200 pixels. The exposure time was set to 3000 µs. The lens on the camera had a focal length of 16 mm and an aperture of F/1.4. The camera image acquisition speed and projector image refresh rate were both 120 Hz. As a group of 3D point cloud data was calculated for every two images, the system obtained 60 groups of 3D point cloud data every second. In order to rapidly process 3D data, the OpenGL Shading Language (GLSL) was used for GPU parallel computing. In the experiment, first of all, three pure-colour images (R, G, or B) with a brightness of 255 were projected onto the white plate in sequence, and the reflected light from the white board was received by the camera on the other side to calculate the crosstalk matrix. The computer established the equation relationship pixel by pixel to solve the crosstalk matrix: The matrix was used for fringe correction.
SSVEP-based brain–computer interface for music using a low-density EEG system
Published in Assistive Technology, 2022
Satvik Venkatesh, Eduardo Reck Miranda, Edward Braund
In order to utilize hardware-accelerated rendering and vertical synchronization (VSync), the visual stimulus is implemented with the help of Open Graphics Library (OpenGL). Vertex shader and fragment shader programs were written in OpenGL shading language (GLSL). The vertex shader specifies the coordinates of the flashing squares and the fragment shader varies the luminance of the region. The luminance is varied by Equation (1) with the help of sinusoidal stimulation (Manyakov et al., 2013).