android ANativeWindow rotation rendering angle

android ANativeWindow rotation rendering angle MediaCodec rotation angle reference videoExtractor opens an angled video file mediaFormat.getInteger(MediaFormat.KEY_ROTATION); gets the angle MediaFormat mediaFormat = videoExtractor.getTrackFormat(j); String mime = mediaFormat.getString(MediaFormat.KEY_MIME); if (mime.startsWith(KEY_VIDEO)) {//Match the track corresponding to the video videoExtractor.selectTrack(j);//Select the track corresponding to the video long duration = mediaFormat.getLong(MediaFormat.KEY_DURATION); int width = mediaFormat.getInteger(MediaFormat.KEY_WIDTH); int height = mediaFormat.getInteger(MediaFormat.KEY_HEIGHT); […]

Euler angles (roll angle, pitch angle, yaw angle), rotation matrix, quaternion conversion and solution to universal joint deadlock

1. Overview The description method of the pose (position and direction) of an object is generally represented by two coordinate systems. One is the world coordinate system or the ground coordinate system. Here I call it the ground coordinate system, which belongs to the reference coordinate system; the other is its own Coordinate system, it […]

Inverse transformation of time series into images using Gram’s Angle Field (GAF)

In the process of studying “Imaging Time-Series to Improve Classification and Imputation”, I had a question, that is, how to reconstruct the original time series from the obtained Gram sum/difference field (GASF/GADF)? That is, the inverse transformation of time series to image transformation. For the process of converting time series to GASF/GADF, refer to this […]

Qt opengl draws points, lines, triangles, polygons (2)

Article directory 1. Related macro definition parameters 2. Code and example diagrams 1. Point LG_POINTS 0x0000 2. Line GL_LINES 0x0001 3. Line GL_LINE_LOOP 0x0002 4. GL_LINE_STRIP 0x0003 5. GL_TRIANGLES 0x0004 6. GL_TRIANGLE_STRIP 0x0005 7. GL_TRIANGLE_FAN 0x0006 8. GL_QUADS 0x0007 9. GL_QUAD_STRIP 0x0008 10. GL_POLYGON 0x0009 Summarize 1. Related macro definition parameters #define GL_POINTS 0x0000 // […]

The 28byj48 stepper motor is controlled by the 51 microcontroller to rotate forward and reverse according to the angle.

1. Preface This project is based on the STC89C52 microcontroller and realizes the function of forward and reverse rotation according to the angle by controlling the 28BYJ-48 stepper motor. 28BYJ-48 stepper motor is a commonly used motor with precise positioning and high torque output, suitable for many small automation systems and mechanical devices. In this […]

C language to create a project and print out the Yang Hui triangle of any order

Table of Contents Engineering architecture: initial version: Algorithm principle: Problem 1: The space alignment function is not applicable to the Yang Hui triangle with large order Cause analysis: The appearance of two-digit and three-digit numbers makes the output results no longer aligned. Solution: Calculate the total number of bytes of quadratic items in each row […]

Fuzzy recognition problem of triangles

Problem background Causes of fuzzy recognition of triangles: In ancient times, people needed to study the properties and characteristics of triangles in order to measure land, calculate angles, and solve other practical problems. Nowadays, with the development of science and technology, triangle, as a basic geometric shape, is widely used in many fields such as […]

Touge Computer Graphics Experiment–Triangle Filling

Scan line filling method #include “pngimage.h” #include<stdio.h> #include <iostream> structVec2i { int x, y; }; void triangle(Vec2i t0, Vec2i t1, Vec2i t2, PNGImage & amp; image, PNGColor color) { // Please add your code here /********** Begin ************/ if (t0.y>t1.y) std::swap(t0, t1); if (t0.y>t2.y) std::swap(t0, t2); if (t1.y>t2.y) std::swap(t1, t2); int total_height = t2.y-t0.y; for […]

three.js implements sunshine analysis and simulates changes in the sun’s altitude angle and azimuth angle based on local (dimension and time)

1. Analysis Recently, there was a need to do a solar illumination simulation for a certain building, and the sunlight changes from 8 o’clock to 17 o’clock. To better simulate the changes of the sun throughout the day, we only need to know the solar altitude angle and solar azimuth angle of the current observation […]