An android dynamic adaptive screen camera test system
By combining light sensing, algorithms, parameterized templates, and distortion compensation engines, the test pattern is dynamically adjusted to adapt to changes in ambient light, solving the problems caused by sudden changes in lighting and curved screens in mobile device camera testing, and improving stability and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI INNOVATECH INFORMATION TECH
- Filing Date
- 2026-05-19
- Publication Date
- 2026-06-30
AI Technical Summary
Existing mobile device camera testing systems suffer from reduced contrast and feature loss in the displayed test patterns when external ambient light levels change abruptly. Issues such as geometric deformation caused by curved screens and high-power rendering latency remain unresolved.
The system employs a light sensor module to collect ambient light intensity data, an algorithm module to calculate the light intensity gradient, a parameterized template system to reconstruct the texture parameters of the test pattern, a distortion compensation engine to construct a three-dimensional geometric mesh model, a differential rendering module to perform shading resource reallocation, and a dual-threshold hysteresis logic to control the system state transition and match the camera exposure and screen refresh timing.
It achieves stable pattern contrast under sudden changes in lighting conditions, reduces geometric deformation errors, lowers system power consumption, avoids flicker stripes, and improves the accuracy and efficiency of camera testing.
Smart Images

Figure CN122317262A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mobile device camera testing technology, specifically to an Android dynamic adaptive screen camera testing system. Background Technology
[0002] In the production and testing of mobile device camera modules, using digital test patterns displayed on the device's screen to replace traditional physical printed test cards is gradually becoming a common testing method. However, existing screen-based camera testing solutions have limitations in terms of environmental adaptability and underlying hardware-software integration.
[0003] As a light-emitting display medium, the quality of the displayed pattern is easily affected by ambient light. When the illumination of the test environment changes suddenly, the visual contrast of the screen image will decrease, which can easily lead to the loss of line or grayscale features of the test chart. Existing testing systems can usually only output static graphic data and cannot dynamically adjust rendering parameters according to changes in ambient light, thus affecting the accuracy of camera optical evaluation.
[0004] Because modern mobile devices widely use curved screens, directly rendering traditional planar test patterns on a curved physical surface will produce visual geometric deformations at the curved edges of the screen. These physical deformations directly translate into spatial geometric errors in the camera's test images. Furthermore, to ensure the clarity of line details in the test patterns, conventional solutions often employ a globally uniform high-precision rendering method. This indiscriminate pixel calculation increases the computational load on the underlying graphics processing unit, easily leading to excessive system power consumption and rendering delays. In addition, existing testing procedures typically neglect the timing synchronization mechanism between the screen display hardware and the external camera under test. A time misalignment often exists between the camera's exposure cycle and the screen's scan refresh cycle, causing flickering stripes or localized dark bands in the acquired test images, preventing subsequent image quality analysis logic from functioning correctly. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides an Android dynamic adaptive screen camera testing system. This system solves the problems that, in mobile device camera screen display testing scenarios, sudden changes in external physical environment illumination can easily lead to a decrease in the contrast of the test pattern displayed on the screen and loss of features. Furthermore, the diverse curved physical shapes of mobile devices can cause geometric deformation of the screen edge image. At the same time, traditional global high-precision rendering methods can lead to excessively high system power consumption and graphics pipeline rendering latency during continuous testing.
[0006] To achieve the above objectives, the present invention provides the following technical solution: an Android dynamic adaptive screen camera testing system, comprising:
[0007] The light sensing module is used to collect absolute illuminance data of the external environment; The algorithm module is used to calculate the ambient light illuminance gradient based on absolute illuminance data, and to control the system to switch between normal state and abrupt compensation state based on the ambient light illuminance gradient. The parametric template system is used to perform reconstruction calculations on the basic texture parameters of the test pattern to be rendered based on the ambient light gradient when the system is in a mutation compensation state, to obtain the target texture parameters, and to generate the two-dimensional texture of the test pattern of the current graphics frame based on the target texture parameters. The distortion compensation engine is used to construct a three-dimensional geometric mesh model based on the screen curvature radius of the physical screen of the mobile device running the system, and to perform spatial distortion calculations on the vertex coordinates of the two-dimensional texture of the test pattern based on the three-dimensional geometric mesh model. The differential rendering module is used to obtain the feature mask map of the two-dimensional texture of the test pattern, perform shading resource reallocation calculation based on the feature mask map to generate processed graphic frame data, output the processed graphic frame data to the physical screen for display, and send a trigger command to the camera under test after the processed graphic frame data is rendered.
[0008] Preferably, the system performs memory allocation operations during the initialization phase: An independent frame buffer object is allocated in the video memory area of the graphics processing unit of the mobile device as a mask multiplexing pool for persistent storage of feature mask images. A dirty flag variable is declared in the system memory space of the mobile device, and its initial value is set to an invalid state. The system establishes cross-module data access permissions with the dirty flag variable through a mask multiplexing pool, reducing the frequent allocation of video memory resources.
[0009] Preferably, the parametric template system records the historical rendering parameters of the previous graphics frame, calculates the absolute difference between the target texture parameters and the historical rendering parameters, and divides the absolute difference by the sum of the historical rendering parameters and a very small positive constant to obtain the relative offset.
[0010] When the relative offset exceeds the system's preset rendering tolerance threshold, the dirty flag variable is set to an invalid state. The system uses this calculation logic to avoid division-by-zero anomalies when historical parameters are zero, and to block graphics redrawing instructions below the visual tolerance limit to save computational overhead.
[0011] Preferably, the differential rendering module obtains the feature mask map of the two-dimensional texture of the test pattern by: when the dirty mark variable is read as invalid, calculating the adaptive edge threshold based on the basic texture parameters, obtaining the pixels in the two-dimensional texture of the test pattern whose gradient magnitude is greater than or equal to the adaptive edge threshold to generate the feature mask map of the current frame, storing the feature mask map in the mask multiplexing pool, and overwriting the dirty mark variable as valid. When the dirty flag variable is read as valid, the system retrieves the historical feature mask from the mask multiplexing pool and uses it as the feature mask for the current frame. The system dynamically establishes an adaptive threshold to avoid feature omissions caused by changes in ambient light when using a fixed threshold.
[0012] Preferably, the differential rendering module performs shading resource reallocation calculations based on the feature mask map, including: The system divides the image into feature regions and non-feature regions based on the feature mask image. Full-resolution coloring computation resources are allocated to the feature regions, while adjacent pixel clusters within the non-feature regions are bound into individual coloring computation units, which are then allocated half-resolution coloring computation resources for color filling. The system adjusts the coloring rate of the graphics pipeline according to the spatial distribution of the image content, ensuring the sharpness of key lines while reducing the computational load on flat background areas.
[0013] Preferably, the algorithm module controls the transition between the normal state and the abrupt compensation state based on the ambient light intensity gradient, including: The light sensing module collects and saves historical illuminance data according to a preset sampling time interval; the algorithm module calculates the absolute value of the difference between the absolute illuminance data of the current sampling period and the historical illuminance data of the previous valid period, and divides the absolute value of the difference by the sampling time interval to obtain the ambient light illuminance gradient. When the system is in normal mode and the ambient light intensity gradient exceeds the system's preset high trigger threshold, the algorithm module controls the system to switch to abrupt change compensation mode. When the system is in abrupt change compensation mode and the number of consecutive preset periods of the ambient light intensity gradient is less than the system's preset low fallback threshold, the algorithm module controls the system to switch back to normal mode, where the high trigger threshold is greater than the low fallback threshold. The system establishes a dual-threshold hysteresis comparison logic to separate the triggering and recovery criteria of the state, preventing high-frequency oscillations in the system's calculation state caused by minor fluctuations in ambient light intensity.
[0014] Preferably, the parametric template system performs reconstruction calculations on the base texture parameters of the test pattern to be rendered to obtain the target texture parameters, including: The ambient light gradient is input into a preset nonlinear smoothing transition function to obtain a smoothing weight factor. This smoothing weight factor is multiplied by a preset compensation gain coefficient to obtain a dynamic gain compensation amount. This dynamic gain compensation amount is then superimposed on the currently effective base texture parameters to obtain the reconstructed target texture parameters. The system calculates the dynamic gain compensation amount using a software algorithm to counteract the interference of external light on the physical screen's display contrast.
[0015] Preferably, the parametric template system provides an interactive interface with UI controls featuring custom sliders, extracts the graphic parameters that are triggered by the user through the UI controls with custom sliders, and uses the graphic parameters as the basic texture parameters. The graphic parameters include line density, color saturation, and grayscale levels.
[0016] Preferably, the distortion compensation engine constructs a three-dimensional geometric mesh model and performs spatial distortion calculations, including: A three-dimensional geometric mesh model is generated based on the screen curvature radius. The mesh vertex density in the flat central region of the corresponding physical screen is lower than that in the region near the curved edge. The origin of the planar coordinates of the two-dimensional texture of the test pattern is translated and centered. The planar vertex coordinates of the centered two-dimensional texture of the test pattern are mapped to three-dimensional space vertex coordinates. The observation matrix is calculated based on the camera's calibrated viewpoint position, and the model view projection matrix is constructed by combining the perspective projection parameters as a spatial projection mapping matrix. Spatial distortion calculation is then performed on the vertex coordinates of the two-dimensional texture of the test pattern using the spatial projection mapping matrix.
[0017] Preferably, the differential rendering module sends trigger commands to the camera under test by: obtaining the single refresh cycle of the physical screen through the underlying interface call; The single-frame exposure time of the camera under test is configured as the sum of a positive integer multiple of the single refresh cycle and the system's preset timing redundancy margin. The system establishes timing constraints in this way to match the camera's exposure cycle with the screen's physical refresh process, reducing flickering distortion in the test image caused by hardware and software timing misalignment.
[0018] This invention provides an Android dynamic adaptive screen camera testing system. It has the following beneficial effects: 1. This invention calculates the ambient light illuminance gradient using a light sensing module and an algorithm module, employs a dual-threshold hysteresis comparison logic to control the system state transition, and combines this with a parameterized template system to perform reconstruction calculations on the basic texture parameters of the test pattern based on this illuminance gradient. It can dynamically adjust the display contrast of the test pattern according to changes in external physical ambient light, reducing interference from direct strong light or dim light in a dark room on screen display quality. Simultaneously, the dual-threshold judgment logic prevents high-frequency oscillations in the system state and screen flicker caused by minor fluctuations in ambient illuminance, ensuring test stability under sudden changes in lighting conditions.
[0019] 2. This invention constructs a non-uniform three-dimensional geometric mesh model based on the screen curvature radius of the mobile device using a distortion compensation engine, and performs spatial distortion calculations on the vertex coordinates of the two-dimensional texture of the test pattern using the constructed spatial projection mapping matrix. This spatial transformation logic compensates for image deformation errors caused by the physical shape of the curved screen in the edge region from a three-dimensional geometric dimension, improving the spatial geometric accuracy of camera testing. At the same time, the non-uniform mesh division strategy with low density in the flat central region and high density in the curved edge region reduces unnecessary mesh division while preserving edge display accuracy, thus reducing the invalid video memory usage of the graphics processing unit.
[0020] 3. This invention extracts feature mask images through a differential rendering module to perform shading resource reallocation calculations. It combines a mask reuse pool resident in video memory with memory status markers, and sends trigger commands to the camera under test based on the screen's single refresh cycle and timing redundancy margin after rendering. While ensuring the sharpness of key feature edges in the test pattern, it reduces the amount of redundant fragment shading calculations in flat background areas and avoids video memory fragmentation, thus improving the execution efficiency of the rendering pipeline. Furthermore, by constraining the matching of camera shutter timing and screen physical refresh timing, it solves the problem of flickering stripes and dark band distortion in test images caused by hardware and software timing misalignment. Attached Figure Description
[0021] Figure 1 This is a system hardware architecture diagram of the present invention; Figure 2 This is a schematic diagram of the method flow of the present invention; Figure 3 This is a schematic diagram comparing the resolution stability under sudden changes in illumination according to the present invention; Figure 4 This is a comparison diagram of edge distortion errors in this invention; Figure 5 This is a performance comparison chart of the rendering pipeline resource scheduling strategy of the present invention. Detailed Implementation
[0022] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] See attached document Figure 1This invention provides an Android dynamic adaptive screen camera testing system, which runs on mobile devices supporting OpenGLES 3.2 and above. The Android dynamic adaptive screen camera testing system includes a light sensing module, an algorithm module, a parametric template system, a distortion compensation engine, and a differential rendering module.
[0024] Mobile devices provide a calling interface for their built-in hardware devices through the hardware abstraction layer at the bottom of their operating system. During the startup phase, the system reads the physical display resolution and screen curvature radius of the mobile device through this calling interface and initializes various modules in memory. The system allocates an independent frame buffer object in the video memory area of the graphics processing unit as a mask multiplexing pool, and declares a boolean dirty flag variable in memory to record the state of the feature mask.
[0025] The optical sensing module uses the front-facing ambient light sensor built into the mobile device to collect absolute illuminance data of the external environment at fixed sampling time intervals. The optical sensing module then transmits the collected absolute illuminance data along the system data bus to the subsequent algorithm processing stage.
[0026] The algorithm module receives absolute illuminance data transmitted from the optical sensing module and calculates the ambient illuminance gradient between adjacent sampling periods. Based on the calculated ambient illuminance gradient, the algorithm module triggers state switching in the state machine, controlling the system to transition between a normal state and abrupt change compensation state.
[0027] The parametric template system provides an interactive, customizable interface based on the underlying rendering engine, supporting personalized configuration of basic test templates. The system offers UI controls with customizable sliders, allowing operators to adjust parameters such as line density and color saturation of the test pattern in real time via touch interaction. When the algorithm module switches the system to abrupt change compensation mode, the parametric template system extracts the calculated ambient light gradient and performs reconstruction calculations on the basic texture parameters of the current test image during the underlying graphics texture generation stage. The parametric template system then calculates the relative offset between the reconstructed parameters and the historical rendering parameters. When the relative offset exceeds a preset rendering tolerance threshold, the parametric template system sets the dirty flag variable in memory to an invalid state and generates a 2D texture of the test pattern for the current graphics frame based on the reconstructed parameters.
[0028] The distortion compensation engine acquires the screen curvature radius of the mobile device and constructs a non-uniform 3D geometric mesh model in a 3D world coordinate system. It receives a test pattern 2D texture output from the parametric template system and, during the vertex shader computation stage of the graphics rendering pipeline, generates a spatial projection mapping matrix based on the pre-constructed 3D geometric mesh model. The distortion compensation engine then uses this mapping matrix to perform spatial distortion calculations on the vertex coordinates of each vertex on the 2D texture, thus offsetting the geometric deformation caused by the physical screen curvature during the graphics generation stage.
[0029] The differential rendering module is deployed in the fragment shader computation phase of the graphics rendering pipeline. The differential rendering module reads the state of the dirty flag variable in memory and, when the dirty flag variable is invalid, performs edge detection computation on the currently generated texture image to generate a feature mask map. The feature mask map is then stored in the mask reuse pool in the video memory region. When the dirty flag variable is valid, the differential rendering module directly retrieves the feature mask map from the mask reuse pool for the previous cycle. Based on the region attributes defined by the feature mask map, the differential rendering module allocates full-resolution shading computation resources for the feature regions and half-resolution shading computation resources for the non-feature regions in the fragment shader.
[0030] After the distortion compensation engine processes vertex deformation and the differential rendering module reallocates shading resources, the graphics frame data is written to the mobile device's system frame buffer and then output to the mobile device's physical screen for display. Once the system detects that the current graphics frame has finished rendering, it sends a trigger command to the mobile device's camera hardware module via the underlying communication interface, driving the camera module to complete the test image capture and subsequent performance analysis process.
[0031] See attached document Figure 2 This invention provides an Android dynamic adaptive screen camera testing method, comprising the following steps: S10 reads the physical display resolution and screen curvature radius of the mobile device through the underlying call interface, opens an independent frame buffer object in the video memory area as a mask multiplexing pool, and declares a dirty mark variable in memory. S20 uses a light sensing module to collect absolute illuminance data of the external environment at fixed sampling time intervals; S30 receives absolute illuminance data and calculates the ambient illuminance gradient between adjacent sampling periods, and controls the system to switch between normal state and sudden change compensation state based on the calculation result of the ambient illuminance gradient. S40, when entering the mutation compensation state, extract the ambient light gradient and perform reconstruction calculation on the basic texture parameters of the current test graphics card. When the relative offset between the reconstruction parameters and the historical rendering parameters exceeds the preset rendering tolerance threshold, set the dirty mark variable to the invalid state and generate the test pattern two-dimensional texture of the current graphics frame based on the reconstruction parameters. S50 constructs a non-uniform three-dimensional geometric mesh model based on the screen curvature radius, and generates a spatial projection mapping matrix during the vertex shader calculation stage. It then performs spatial distortion calculation on the vertex coordinates of the two-dimensional texture of the test pattern through the spatial projection mapping matrix. S60: During the fragment shader calculation phase, read the state of the dirty mark variable. When the dirty mark variable is in an invalid state, perform edge detection calculation to generate a feature mask map and store it in the mask reuse pool. When the dirty mark variable is in an effective state, retrieve the historical feature mask map from the mask reuse pool. Based on the feature mask map, allocate full-resolution coloring calculation resources for the feature region and allocate half-resolution coloring calculation resources for the non-feature region. S70 writes the processed graphics frame data into the system frame buffer and outputs it to the physical screen for display. After the graphics frame is rendered, it sends a trigger command to the camera hardware module of the mobile device to complete the test image capture.
[0032] In practice, in order to establish the connection between the physical testing environment and the underlying rendering computing power, the system needs to configure the underlying runtime environment and initialize the memory state before performing specific dynamic adaptive testing.
[0033] Specifically, the system needs to call the operating system's underlying interface to obtain physical device parameters. As a preferred approach, in this embodiment, the mobile device communicates with the underlying display driver through its operating system's hardware abstraction layer. When the system powers on and enters the application lifecycle, the application process calls the system's internal display management service interface to read the current mobile device's physical display resolution data and screen curvature radius. Regarding the specific call process by which a mobile device operating system obtains the factory default parameters of a hardware device through the underlying driver, those skilled in the art can refer to the official interface documentation of the operating system or the hardware development manual. The underlying communication protocol is well-known technology in this field and will not be elaborated upon here. Considering the differences in the physical structure of different mobile device forms, if the physical attribute of the mobile device read is a conventional flat screen, the system will use the screen curvature radius... The value is assigned a preset infinity value or a corresponding zero value to ensure compatibility with traditional planar rendering modes by the underlying graphics computing engine. Under normal circumstances, the obtained screen curvature radius... The values are measured in millimeters and stored in system memory as floating-point numbers, serving as the initial input for subsequent calculations of 3D geometric distortion.
[0034] After reading the physical parameters, to accommodate subsequent graphics computations and video memory caching, the system further initializes the graphics rendering pipeline environment and allocates a mask reuse pool. The system initializes a graphics application programming interface (API) context supporting OpenGL ES 3.2 and above in the main processing thread of the mobile device. After establishing the graphics context environment, the underlying engine requests video memory space from the graphics processing unit proportionally based on the previously read physical display resolution data. The system generates an independent framebuffer object within the allocated video memory area through the API and binds a corresponding 2D texture attachment to this framebuffer object. This 2D texture attachment is mainly used to continuously store the feature boundary space information obtained from the fragment shader calculations during subsequent rendering stages. In this embodiment, the system defines the framebuffer object configured with the 2D texture attachment as a mask reuse pool. By setting this pooled caching mechanism, the mask reuse pool resides in video memory throughout the system's runtime lifecycle, thereby reducing the risk of memory fragmentation and computational latency caused by frequent allocation and release of video memory resources during continuous graphics frame rendering.
[0035] Furthermore, to achieve cross-rendering frame data linkage and status monitoring, the system also needs to declare and initialize global status flag variables. The system declares a boolean data type status flag variable in the main system memory space and defines it as a dirty flag variable. As an initial safety setting for state machine transitions, the system sets dirty flag variables during the initialization phase. The initial value is set to Boolean true, indicating that no valid feature mask data is currently stored in the mask reuse pool of the current video memory, so that subsequent calculations know that the feature mask map needs to be regenerated. The system will mark the dirty variable. The memory address pointer is registered to the global shared memory region, thereby establishing cross-module data access permissions. This registration mechanism allows the parametric template system and the differential rendering module to directly access dirty-marked variables at the same physical memory address. This underlying memory-sharing scheduling strategy helps maintain data consistency across different modules during read or write operations.
[0036] In this embodiment, to enable the system to perceive the optical changes in the physical testing environment in real time, a continuous data polling acquisition mechanism is constructed using an underlying hardware sensor array. After memory initialization is complete, the system begins executing the data acquisition process for external ambient light.
[0037] Specifically, the optical sensing module invokes the underlying system application interface through the sensor management service of the mobile device's operating system to activate the device's built-in front-facing high dynamic range ambient light sensor. After establishing a communication connection, the optical sensing module sends configuration commands to the underlying driver to set a fixed sampling time interval. As a preferred method, the sampling time interval... Typically, the value is set within the range of 300 to 500 milliseconds. This range is designed to balance the power consumption of the underlying hardware with the response delay for capturing sudden changes in ambient light. To adapt to conditions such as direct sunlight or low light in dark rooms during camera testing, the optical sensing module synchronously configures the sensor's gain level and photoelectric integration time via an interface, enabling the hardware to operate within the linear response range. For details on how the operating system drives the sensor registers for analog-to-digital conversion and gain calibration, those skilled in the art can refer to relevant hardware development manuals. The underlying hardware communication control is well-known in the field and will not be elaborated upon here.
[0038] After the hardware configuration parameters are loaded and operational, the optical sensing module continuously receives hardware interrupt callback signals at set sampling intervals to read the absolute illuminance data of the external environment. The physical unit of this absolute illuminance data is lux, and its value represents the ambient light intensity received by the device's screen surface at the current moment. Considering that mobile devices may encounter situations where the sensor is obstructed by the operator or experience momentary hardware failures during actual testing, an anomaly filtering and verification mechanism is introduced after acquiring the raw data to avoid algorithm logic dead zones causing subsequent rendering pipeline crashes. If the hardware interface returns null values, negative values, or irrational data exceeding the sensor's measurement range limits within the current period, the optical sensing module will intercept the abnormal value and update the absolute illuminance data for the current period. The historical illuminance data from the previous valid period is overwritten. However, to prevent the underlying data stream from stalling due to physical damage to the sensor or prolonged physical obstruction, this embodiment further configures a continuous anomaly counting mechanism. When the system detects that the number of consecutively generated abnormal data exceeds a preset safety tolerance threshold (e.g., 5 consecutive sampling periods), the optical sensing module will actively block the historical data overwriting logic and instead output the system's preset standard ambient illuminance reference value, thereby ensuring the operation of the underlying basic data stream and preventing the correlation algorithm module from falling into a computational suspension state.
[0039] After the aforementioned data validity verification process, the optical sensing module packages the absolute illuminance data of the current period with the timestamp generated by the system clock to construct a standard optical sensing data frame. Upon completion of the packaging process, the optical sensing module transmits this data frame to the algorithm module via the system data bus or through inter-process communication mechanisms. This event-driven or message queue-based data push method eliminates the need for subsequent modules to frequently poll the hardware status and provides structured underlying data support for subsequent calculations and analysis of ambient illuminance gradients.
[0040] In this embodiment, the algorithm module is responsible for receiving data from the underlying sensors and executing state machine control logic, thereby guiding the system to adaptively respond to changes in the external lighting environment. During operation, the algorithm module continuously receives light-sensing data frames from the light-sensing module via the system data bus.
[0041] After parsing the absolute illuminance data for the current period and the historical illuminance data for the previous valid period, the algorithm module calculates the ambient light illuminance gradient based on the sampling time interval. It is important to note that abnormal lighting conditions in the test environment include not only sudden increases in illuminance caused by intense light, but also sudden drops in illuminance caused by light being turned off or blocked. To avoid logical dead zones caused by one-way decision-making, the calculation of the ambient light illuminance gradient should extract the absolute value of the rate of change of illuminance to characterize the instantaneous drastic change in the brightness of the physical test environment. Specifically, the algorithm module uses the absolute value of the difference between the absolute illuminance data of the current period and the historical illuminance data of the previous valid period, divided by the set sampling time interval, to obtain the quantified ambient light illuminance gradient value. After obtaining the ambient light illuminance gradient, the algorithm module faces the engineering problem of how to establish the state switching decision conditions.
[0042] Under conventional single-threshold judgment logic, when ambient light data fluctuates slightly around the threshold, it can easily lead to frequent switching between different rendering states. This high-frequency oscillation consumes underlying computing resources and causes flickering in the final output test image. To overcome this technical defect, the algorithm module in this embodiment incorporates dual-threshold hysteresis comparison logic, maintaining state stability by separating the trigger and recovery criteria. The system pre-sets a high trigger threshold. With low fall-off threshold And satisfy As a preferred method, a high trigger threshold The low fallback threshold can be set within the range of 500 to 800 lux / s, based on the data characteristics of typical light source transitions in the test environment. The value is set within the range of 100 to 200 lux / second, and the specific value can be calibrated according to the sensitivity index of the hardware sensor.
[0043] Based on a set hysteresis threshold parameter, the algorithm module controls the system to transition between a normal state and a sudden change compensation state. When the system is currently in the normal state, the algorithm module continuously compares the ambient light intensity gradient. With high trigger threshold If the calculation yields This indicates that the test environment has encountered a sudden disturbance. The algorithm module immediately switches the global operating mode to the sudden change compensation state and sends a state change signal to the parameterized template system. Simultaneously, if the system is currently in the sudden change compensation state, the algorithm module needs to evaluate whether the exit conditions are met. To prevent false drop-off judgments caused by temporary light obstruction or occasional low sensor readings, the algorithm module not only requires the detection results to meet... Furthermore, this condition must be met for multiple consecutive sampling periods. In this embodiment, the system is equipped with a fallback counter, when... When the algorithm module maintains a preset number of cycles (e.g., 3 sampling cycles) continuously, it confirms that the lighting environment has substantially returned to a stable state. After this continuous cycle condition is met, the algorithm module triggers a state machine reset action, smoothly switching the system back to the normal state.
[0044] In practical implementation, to meet the personalized needs of different test projects for pattern diversity and to break free from the limitations of fixed test cards, the parametric template system provides a highly flexible interactive configuration component on the system front end. This component utilizes the capacitive touchscreen of mobile devices to construct a UI interface with customizable sliders. The system parametrically decouples industry-standard test templates (such as ISO12233 resolution test cards, color reproduction cards, distortion test cards, etc.), exposing 12 adjustable graphic parameters to the user, including line density, color saturation, and grayscale levels. When an operator interacts with the slider to change specific parameters (for example, smoothly adjusting the line density of the resolution test image to 5 lp / mm), the template engine immediately captures the UI trigger event and sends the updated target parameter value to the underlying texture generation stage.
[0045] In addition to responding to explicit adjustment commands from front-end users, the parametric template system also automatically intervenes in the background workflow after the system enters abrupt change compensation state, using underlying environmental data to intervene in the graphics pipeline. Specifically, after receiving a state change signal from the algorithm module, the parametric template system extracts the calculated ambient light gradient through the system bus. Considering that drastic changes in ambient light can reduce the contrast and recognizability of test patterns on the physical screen—for example, strong light often causes the screen to appear washed out—the system needs to perform inverse compensation and reconstruction on the basic texture parameters of the current test pattern in the underlying graphics generation pipeline.
[0046] As a preferred approach, the base texture parameters may include the user-defined brightness value of the background color or the contrast value of the feature edges. The parameterized template system uses the set compensation gain logic to perform inverse reconstruction calculations. In specific implementation, the system first substitutes the calculated ambient light gradient into a preset normalized mapping function (such as using the Sigmoid function or a non-linear smooth transition function with interval truncation), converting the absolute gradient value into a smooth weighting factor between zero and one. Subsequently, the system multiplies this weighting factor by the system's preset compensation gain coefficient (usually set between 0.1 and 0.5 depending on the hardware response characteristics) to obtain a dynamic gain compensation amount to cope with sudden environmental changes. Finally, this dynamic gain compensation amount is applied to the currently effective base texture parameters through a preset compensation equation (such as additive bias or multiplicative scaling) to obtain the reconstructed target texture parameters. By combining the front-end active parameter tuning and the background dynamic gain control calculation mechanism, the system can inversely offset the interference of sudden changes in external physical illumination on the screen display quality at the software calculation level.
[0047] After completing the theoretical parameter calculations and obtaining the target texture parameters, the system needs to evaluate whether to immediately submit these parameters to the underlying rendering pipeline. Frequent parameter fine-tuning often increases unnecessary redrawing overhead for the graphics processing unit. Therefore, the parametric template system introduces a relative offset verification mechanism. The system reads the historical rendering parameters that were actually in effect in the previous frame and calculates the relative offset between the currently reconstructed target texture parameters and the historical rendering parameters. The calculation logic of the relative offset is expressed as an absolute difference ratio. Specifically, the system calculates the absolute difference between the target texture parameters and the historical rendering parameters and divides it by the historical rendering parameters and a very small positive constant (e.g., a value of 10). -5 The sum of these values yields the ratio of the relative offset. A very small positive constant is introduced here primarily to prevent the underlying calculation engine from triggering a division-by-zero exception when historical rendering parameters are zero, thus filling the logical dead zone of the algorithm in this extreme state. After obtaining the ratio, the system compares the calculated relative offset with a pre-set rendering tolerance threshold. As a preferred configuration, the rendering tolerance threshold can be set within a range of 5% to 10% based on the grayscale response hardware characteristics of the mobile device screen, used to filter out minute display fluctuations that are difficult to detect with the naked eye.
[0048] When the comparison results indicate that the relative offset exceeds the set rendering tolerance threshold, it signifies that a substantial graphics frame update is required. Upon confirming that this condition is met, the parametric template system accesses the dirty flag variables declared during the initialization phase via a memory-sharing mechanism. And force the dirty flag variable to be displayed. The value is set to the invalid state (i.e., reassigned to the Boolean truth value True). For the overall system scheduling, the invalid state in this embodiment indicates that the current two-dimensional texture features have undergone significant changes, and the original mask cache in the memory reuse pool is no longer applicable.
[0049] After updating the memory state markers, the parameterized template system will reconstruct the target texture parameters. The data is passed to the underlying graphics generation engine. The engine then refreshes the pixel matrix in memory and generates a new frame of test pattern 2D texture adapted to the current lighting environment and user-defined settings, for subsequent nodes in the rendering pipeline to use. For the specific programming instructions on how to generate or update 2D texture objects using the graphics application programming interface, those skilled in the art can refer to the development manuals of the relevant underlying graphics libraries. The basic texture data loading process is well-known in the field and will not be elaborated upon here.
[0050] After the parametric template system generates or updates the 2D texture of the test pattern, considering that current mobile devices typically employ complex physical structures such as curved or foldable screens, directly outputting a planar texture often leads to optical distortion of the image at the screen edges, thus affecting the accuracy of camera test results. In this embodiment, to mitigate the error caused by this physical hardware, a distortion compensation engine intervenes in the underlying graphics rendering pipeline, performing inverse distortion correction processing through spatial geometric transformations.
[0051] At the implementation level, the distortion compensation engine needs to construct a non-uniform three-dimensional geometric mesh model based on the hardware's physical characteristics. The system reads the screen curvature radius obtained during the initialization configuration phase. Compared to physical display resolution data, conventional uniform mesh generation methods are prone to insufficient texture sampling or pixel tearing when handling areas with large curvature when establishing a virtual 3D world coordinate system. As a preferred approach, in this embodiment, the distortion compensation engine employs a non-uniform vertex distribution strategy based on curvature gradients to construct a 3D geometric mesh model. During mesh distribution, the system pre-sets a threshold for the width of a flat central region (e.g., 70% to 80% of the total width of the physical screen) based on the size of the physical screen. This model has a lower mesh vertex density in the corresponding flat central region of the physical screen, while the mesh vertex density near the curved edges of the physical screen increases non-linearly (e.g., exponentially). This adaptive mesh density allocation mechanism ensures edge anti-aliasing accuracy while avoiding the problem of invalid video memory usage caused by a globally high-density mesh.
[0052] After completing the aforementioned 3D geometric mesh model construction process, in order to achieve inverse deformation in 3D space, the distortion compensation engine projects the original vertex coordinates on the 2D texture plane into 3D space. Taking a common hyperboloid screen as an example, its physical shape can be approximated as a cylindrical curved surface extending along the vertical axis. In this calculation step, to avoid mesh asymmetry and misalignment caused by directly using the standard image coordinate system with the upper left corner as the origin, the system first translates the origin of the 2D texture plane to the physical center of the screen and performs normalization processing. Subsequently, the distortion compensation engine uses the read screen curvature radius... The coordinates of the plane vertices of the centered 2D texture Mapped to vertex coordinates in three-dimensional space The specific coordinate space transformation formula is as follows: ; ; ; In the formula, The original horizontal and vertical coordinates of the test pattern in a two-dimensional normalized plane coordinate system with the center of the screen as the origin; Represents the spatial physical coordinates mapped onto a three-dimensional geometric mesh model; This represents the screen curvature radius of the mobile device. It should be noted that, thanks to the error-proofing mechanism designed for flat screens during system initialization, when the test device has a flat screen and a screen curvature radius... When the value is assigned to approach infinity, the above formula... It approaches zero. According to the principle of limit mathematics, The calculation results will naturally degenerate into the original x-coordinate. And depth coordinates It will degenerate to zero. This mathematical self-consistency ensures that the spatial mapping algorithm is backward compatible with traditional flat panel display devices, eliminating the algorithm logic dead zone caused by division by zero exceptions or data out-of-bounds errors.
[0053] After obtaining the mapped 3D vertex coordinate data, the distortion compensation engine generates a spatial projection mapping matrix in the vertex shader stage of the graphics rendering pipeline. The system calculates the viewing matrix based on the camera's calibrated viewpoint position and constructs a complete model-view projection matrix by combining it with perspective projection parameters. In this embodiment, the distortion compensation engine defines this model-view projection matrix as the spatial projection mapping matrix of this scheme.
[0054] Inside the vertex shader execution cycle, the underlying hardware utilizes the parallel floating-point arithmetic capabilities of the graphics processing unit to perform batch spatial warp calculations on the vertex coordinates of the test pattern's 2D texture. This calculation process involves left-multiplying each 3D vertex coordinate by a spatial projection mapping matrix. The homogeneous coordinate vectors are constructed to calculate the final position of each vertex in the screen clipping space. Through this spatial projection and vertex warping based on the underlying pipeline, the system achieves visual distortion correction with low computational latency. For the specific derivation process of the model-view projection matrix in the graphics application programming interface and the underlying assembly instructions for matrix multiplication within the vertex shader, those skilled in the art can consult relevant computer graphics textbooks and underlying graphics library documentation. The basic matrix transformation principles are well-known in the field and will not be elaborated upon here. The geometric data after vertex coordinate space warping calculation is then sent to the rasterization stage and handed over to the next stage, the differential rendering module, for fragment-level shading processing.
[0055] After vertex space distortion and rasterization by the distortion compensation engine, the graphics pipeline enters the fragment shading stage. In this embodiment, in order to optimize the power consumption of the underlying graphics computing unit while maintaining visual quality, the differential rendering module dynamically senses image content features to redistribute shading resources.
[0056] In practice, the differential rendering module reads the dirty flag variable through the shared memory region. The state of the variable. When the variable is determined to be in an invalid state, it indicates that the texture parameters of the test pattern have been reconstructed, and the historical data in the memory mask reuse pool is no longer applicable. Under this condition, in order to update the feature space information, the differential rendering module activates the edge detection routine in the underlying graphics generation pipeline. Considering that mobile devices are in complex lighting environments, a fixed edge detection threshold is easily affected by the decrease in global contrast, leading to missed feature detection and creating a dead zone in the algorithm logic. As a preferred approach, the differential rendering module calculates and sets an adaptive edge threshold based on the currently effective basic texture parameters. In engineering implementation, the system extracts the basic texture contrast value of the current test pattern and multiplies it by a pre-set empirical coefficient (which is usually calibrated between 0.1 and 0.3 based on the image noise tolerance) to obtain a dynamic adaptive edge threshold. .
[0057] After threshold calibration, the system uses a differential operator to perform spatial convolution on the rasterized pixel matrix to calculate the gradient magnitude of each pixel. From an image processing perspective, this gradient magnitude is typically derived by combining the squared and square-rooted partial derivatives of the pixel in the horizontal and vertical directions, quantitatively reflecting the spatial rate of change in local pixel brightness. Based on this, the system compares the calculated gradient magnitude of each pixel with the previously set adaptive edge threshold. If the gradient magnitude of a pixel is greater than or equal to the adaptive edge threshold, the feature mask value at that texture coordinate is marked as 1, indicating that this is a feature edge requiring high-precision rendering; conversely, if the gradient magnitude is less than the threshold, the feature mask value is marked as 0, indicating that this is a flat background. After traversing all pixels and obtaining the full-size feature mask matrix, the differential rendering module writes this matrix into the mask reuse pool established during the initialization phase and simultaneously adds the dirty marking variable... The state is overwritten to prevent repeated mask calculations from being performed on subsequent homogenized image frames. For the specific convolution kernel structure and pixel traversal process of underlying operators such as the Sobel or Canny operators, those skilled in the art can consult relevant digital image processing literature. The basic edge detection algorithms are well-known technologies in this field and will not be elaborated upon here.
[0058] Corresponding to the above reconstruction process, if the differential rendering module reads the dirty flag variable... If the state is active, it indicates that the current rendering parameters have not undergone a substantial shift. In this case, the system skips the edge detection routine and reads the historical feature mask matrix from the mask reuse pool for subsequent processing. This complete state machine branching design ensures low-power operation of the system under stable lighting conditions.
[0059] After obtaining a valid feature boundary mask, the differential rendering module faces the technical challenge of executing hierarchical rendering instructions during the fragment shader stage. The system adjusts the pixel shading rate for the corresponding screen area based on the input mask value. For feature edge areas with a mask value of 1, the differential rendering module schedules the graphics processing unit to perform pixel-level high-precision shading calculations at the native display resolution to ensure the sharpness and anti-aliasing effect of the test pattern lines. For flat background areas with a mask value of 0, the differential rendering module reduces the shading resolution of this area to a coarse-grained level by calling the variable-rate shading extension interface of the underlying graphics library. In practice, the system can bind 2×2 or 4×4 adjacent pixel clusters into a single shading calculation unit, with the fragment shader performing the shading equation calculation only once, and directly filling all physical pixels within that pixel cluster with the resulting uniform color value. This image feature-based collaborative allocation mechanism, while ensuring the display accuracy of key features in anti-distortion graphics, reduces redundant fragment calculations in smooth areas, helping to improve the overall computational efficiency and frame rate performance of the rendering pipeline when compensating for sudden changes in ambient light.
[0060] After the differential rendering module completes the coarse-grained and fine-grained collaborative fragment shading processing, the underlying computing system needs to convert the pixel matrix in the digital image space into light signals on the physical screen and form a linked test loop with the external camera device under test. The rendering output and test loop in this embodiment are detailed below.
[0061] The pixel color values calculated by the fragment shader are aggregated and written to the back-end frame buffer of the underlying graphics pipeline. To avoid screen tearing caused by overwriting video memory data during the screen refresh cycle, the underlying graphics system uses a double-buffering mechanism to manage video memory status. Specifically, the system suspends the current rendering thread, waiting for the vertical synchronization signal from the device's underlying hardware. When the vertical synchronization signal is detected, the system executes a pointer swap instruction between the front-end and back-end frame buffers within a very short time window. After the swap, the device's display driver chip reads the latest pixel array from the front-end frame buffer and controls the pixel array of the physical screen to emit light, thereby presenting the distortion-compensated and adaptively optimized test pattern to the physical world. For the specific process of how the underlying display driver controls screen illumination through digital-to-analog conversion, those skilled in the art can refer to relevant display hardware manuals; the basic display driver technology is well-known in the field and will not be elaborated upon here.
[0062] With the test pattern stably displayed on the physical screen, an externally mounted camera under test (DUT) needs to be aimed at the screen to perform image acquisition. Considering that modern display screens mostly use progressive scan or pulse-width modulation (PWM) dimming strategies, if the camera's shutter trigger timing does not match the screen's physical refresh timing, flickering stripes or localized dark bands can easily appear in the acquired image. This distortion of the test image caused by hardware timing misalignment will directly lead to a dead zone in subsequent test evaluation logic. To alleviate this hardware-software coordinating dead zone problem, the system introduces an exposure time constraint equation. As a preferred method, the test system control terminal sends configuration commands to the DUT, specifying its single-frame exposure time... The following relationship must be satisfied: In the formula, Represents the single-frame exposure time of the external camera under test; Represents the refresh cycle of a mobile device's physical screen; It is a preset positive integer multiplier (usually 1 or 2); This represents the timing redundancy margin used to absorb hardware clock jitter. In engineering implementation, The value can be calibrated within the range of 1 to 2 milliseconds based on the clock offset characteristics of the screen driver board. Through the above synchronization constraints, the system helps the photosensitive element of the camera under test to accumulate at least one full frame of screen luminous energy in one exposure cycle, thereby reducing test errors caused by timing misalignment.
[0063] After resolving the timing synchronization issue, the camera under test completes exposure acquisition. Its internal image signal processor or external host computer system extracts the captured two-dimensional test image and performs optical quality evaluation. The host computer system first locates and extracts the corresponding feature lines and regions of interest in the two-dimensional test image using an image registration algorithm or a preset calibration coordinate system. Subsequently, the system calculates the image contrast for the extracted feature line regions to quantify the lens resolution or autofocus accuracy of the current camera. From the perspective of optical measurement principles, the Michelson contrast principle is used here, which reflects feature sharpness by measuring the relative difference between the extreme values of brightness and darkness in local areas of the image. It is worth noting that directly extracting the absolute highest and lowest pixel values is susceptible to interference from single-point thermal noise or dead pixels of the camera sensor, and in extremely dark scenes, it can lead to a zero denominator in the calculation, creating a dead zone that causes the algorithm to crash.
[0064] To correct this logical flaw, the system performs histogram statistics on the area to be evaluated before calculation, using preset quantiles (e.g., extracting the 95th percentile brightness as the effective highlight pixel value and the 5th percentile brightness as the effective shadow pixel value) instead of absolute extreme values. In the specific contrast calculation, the system calculates the difference between the effective highlight pixel value and the effective shadow pixel value, and divides it by the sum of the two and a very small positive constant (e.g., 10). -5 The sum of the values is calculated. Introducing a small, error-proofing constant in the denominator avoids the division-to-zero dead zone caused by a completely black image. This corrected evaluation logic calculates the actual contrast of the acquired image. While the host computer system performs the above image quality evaluation, the light sensor module on the mobile device continues to monitor the ambient light gradient.
[0065] If the operator accidentally blocks the light source or turns on the supplementary lighting during the test, the light sensing module will immediately trigger a new data sampling cycle and transfer the updated illuminance data to the algorithm module and parameterized template system, thereby driving the distortion compensation engine and differential rendering module to generate the next frame compensation pattern. This closed-loop feedback chain helps improve the continuous stability of the entire hardware-software co-testing system and the objectivity of the test results in complex physical environments.
[0066] Specific application examples: In this embodiment, the system of the present invention is deployed on an automated testing production line for smartphone camera modules. The test display carrier is an Android tablet device with curved sides (screen curvature radius R=45mm, resolution 2560×1600, supports OpenGLES3.2). The device under test is an independent industrial-grade test camera mounted directly above the tablet by a robotic arm.
[0067] UI interaction and initial configuration: Before the test began, the test engineer ran the test system on an Android tablet. Through the system's UI, the engineer dragged a custom slider on the touchscreen to precisely adjust the line density parameter of the ISO12233 resolution test template to 5 lp / mm, with the feature edge contrast initially set to 0.8. The system captured these UI instructions, generated a two-dimensional texture of the initial test pattern, and projected the two-dimensional texture onto a non-uniform three-dimensional geometric mesh constructed based on a curvature R=45mm using a distortion compensation engine, thus offsetting the physical visual curvature caused by the curved sides of the tablet.
[0068] Sudden light interference and dynamic compensation: During the test, a high-brightness halogen detection lamp was suddenly turned on at an adjacent workstation, causing the ambient illuminance to spike from the normal 300 lux to 1100 lux instantly. The front-facing light sensor module of the Android tablet detected an illuminance gradient (GL) of approximately 1600 lux per second, far exceeding the set high trigger threshold. (600 lux / second). The algorithm module immediately triggers the mutation compensation state. The parameterized template system extracts gradient weights in the background and automatically compensates the feature edge contrast parameters of the test image card with inverse gain to 1.0 (i.e., maximizes black and white contrast) to counteract the screen whitening effect caused by strong light. Since the parameter offset exceeds the rendering tolerance threshold, the system resets the dirty flag variable and completes the re-rendering of the texture within one frame.
[0069] Differential Rendering and Loop Closure Testing: In the underlying rendering pipeline, the differential rendering module performs edge detection on the newly generated texture. For the intersection of lines (feature regions) with a mask value of 1, the system allocates full-resolution (100%) shading resources to ensure sharp lines; for pure white background areas (non-feature regions) with a mask value of 0, a 4×4 coarse-grained shading resource is used. After this compensated and optimized frame is rendered on the tablet screen, the system sends a synchronization trigger command to the external independent camera under test on the robotic arm via the local area network's underlying communication interface (following...). (Synchronization constraints). The camera under test captures the screen image, and its host computer calculates the MTF50 (modulation transfer function) value. Because the system performs optical compensation and distortion prevention in a timely manner, even under strong light interference, the host computer successfully extracts accurate resolution data.
[0070] Experimental verification and effect comparison: To verify the actual effect and technical advantages of the present invention, a comparative experimental platform was built.
[0071] Experimental group: The dynamic adaptive screen camera testing system described in this invention is used.
[0072] Control group: The traditional fixed rendering scheme was used (i.e., without mutation compensation, distortion correction and differential rendering, only static test images were displayed directly in full screen).
[0073] All test vehicles were curved-screen Android devices, and all devices under test were industrial test cameras of the same model.
[0074] 1. Verification of resolution stability under strong light abrupt change.
[0075] Test method: At the 5th second of the test, a strong light interference of 800 Lux was artificially introduced. The camera under test continuously captured 20 frames of images, and the host computer calculated the MTF50 value of the central region of each frame (the higher the value, the clearer the edge).
[0076] Experimental results: as attached Figure 3 As shown, before the strong light was introduced, the MTF50 values of both groups remained around 0.45. After the strong light was introduced at the 5th second, the MTF50 value of the control group plummeted to 0.21 due to the screen turning white and the contrast decreasing, resulting in a serious misjudgment of the camera's resolution. In contrast, the experimental group triggered inverse gain compensation, and the MTF50 value only fluctuated slightly before quickly stabilizing above 0.42, ensuring the continuity and objectivity of the test.
[0077] 2. Verification of the anti-distortion effect at the edge of the curved screen.
[0078] Test method: Render standard square test marks at the center of the screen and at the curved edge (where the curvature is the greatest). After the camera under test takes a picture, calculate the pixel offset error of the square in the image on the X and Y axes.
[0079] Experimental results: as attached Figure 4 As shown, the control group had a pixel offset of 18 pixels in the edge region, resulting in severe stretching distortion; the experimental group, due to the execution of 3D spatial inverse twist mapping in the vertex shader stage, had its edge distortion error controlled within 2 pixels, almost consistent with the display accuracy of the center region.
[0080] 3. GPU rendering power consumption and frame rate verification.
[0081] Test method: Run the test software continuously on the mobile device for 30 minutes and monitor the average frame rate (FPS) and average rendering power consumption of the underlying GPU.
[0082] Experimental results: as attached Figure 5 As shown, under the premise of outputting the same 4K resolution image, the average frame rate of traditional global high-precision rendering (control group) is only 42FPS and it generates serious heat. After introducing the differential rendering mechanism in this invention (experimental group), the amount of shading calculation in flat areas is reduced sharply, the average frame rate is stably increased to 60FPS full frame operation, and the overall power consumption of the GPU is reduced by about 28%.
Claims
1. An Android dynamic adaptive screen camera testing system, characterized in that, include: The light sensing module is used to collect absolute illuminance data of the external environment; The algorithm module is used to calculate the ambient light illuminance gradient based on the absolute illuminance data, and to control the system to switch between a normal state and a sudden change compensation state based on the ambient light illuminance gradient. A parameterized template system is used to perform reconstruction calculations on the basic texture parameters of the test pattern to be rendered based on the ambient light gradient when the system is in the mutation compensation state, to obtain target texture parameters, and to generate a two-dimensional texture of the test pattern of the current graphics frame based on the target texture parameters. The distortion compensation engine is used to construct a three-dimensional geometric mesh model based on the screen curvature radius of the physical screen of the mobile device running the system, and to perform spatial distortion calculations on the vertex coordinates of the two-dimensional texture of the test pattern based on the three-dimensional geometric mesh model. The differential rendering module is used to obtain the feature mask map of the two-dimensional texture of the test pattern, perform shading resource reallocation calculation based on the feature mask map to generate processed graphics frame data, output the processed graphics frame data to the physical screen for display, and send a trigger command to the camera under test after the processed graphics frame data is rendered.
2. The Android dynamic adaptive screen camera testing system according to claim 1, characterized in that, The system performs memory allocation operations during the initialization phase: An independent frame buffer object is allocated in the video memory area of the graphics processing unit of the mobile device as a mask multiplexing pool for persistently storing the feature mask map. Declare a dirty flag variable in the system memory space of the mobile device and set the initial value of the dirty flag variable to an invalid state.
3. The Android dynamic adaptive screen camera testing system according to claim 2, characterized in that, The parameterized template system records the historical rendering parameters of the previous graphics frame; Calculate the absolute difference between the target texture parameters and the historical rendering parameters; The relative offset is obtained by dividing the absolute difference by the sum of the historical rendering parameters and a very small positive constant. When it is determined that the relative offset exceeds the system's preset rendering tolerance threshold, the dirty flag variable is set to the failure state.
4. The Android dynamic adaptive screen camera testing system according to claim 3, characterized in that, The differential rendering module acquires the feature mask map of the two-dimensional texture of the test pattern, including: When the dirty flag variable is read as the failure state, an adaptive edge threshold is calculated based on the basic texture parameters, and pixels with gradient magnitudes greater than or equal to the adaptive edge threshold in the two-dimensional texture of the test pattern are obtained to generate the feature mask map of the current frame. The feature mask map is stored in the mask multiplexing pool, and the dirty flag variable is overwritten as the valid state. When the dirty flag variable is read as being in the valid state, the historical feature mask image is retrieved from the mask multiplexing pool and used as the feature mask image of the current frame.
5. The Android dynamic adaptive screen camera testing system according to claim 4, characterized in that, The differential rendering module performs shading resource reallocation calculations based on the feature mask map, including: The feature mask image is used to divide the feature region into feature regions and non-feature regions. Full-resolution coloring computation resources are allocated to the feature region, and adjacent pixel clusters in the non-feature region are bound as a single coloring computation unit to allocate half-resolution coloring computation resources to perform color filling.
6. The Android dynamic adaptive screen camera testing system according to claim 1, characterized in that, The algorithm module controls the transition between a normal state and abrupt change compensation state based on the ambient light intensity gradient control system, including: The optical sensing module collects and saves historical illuminance data according to a preset sampling time interval; The algorithm module calculates the absolute value of the difference between the absolute illuminance data of the current sampling period and the historical illuminance data of the previous valid period, and divides the absolute value of the difference by the sampling time interval to obtain the ambient light illuminance gradient. When the system is in the normal state and the ambient light gradient is greater than the system's preset high trigger threshold, the algorithm module controls the system to switch to the mutation compensation state; When the system is in the mutation compensation state and the number of consecutive preset cycles of the ambient light intensity gradient is less than the preset low fall-off threshold of the system, the algorithm module controls the system to switch back to the normal state, wherein the high trigger threshold is greater than the low fall-off threshold.
7. The Android dynamic adaptive screen camera testing system according to claim 1, characterized in that, The parametric template system performs reconstruction calculations on the base texture parameters of the test pattern to be rendered to obtain the target texture parameters, including: The ambient light intensity gradient is input into a preset nonlinear smooth transition function of the system to obtain a smoothing weight factor; The smoothing weight factor is multiplied by the system's preset compensation gain coefficient to obtain the dynamic gain compensation amount. The dynamic gain compensation is superimposed on the currently effective base texture parameters to obtain the reconstructed target texture parameters.
8. The Android dynamic adaptive screen camera testing system according to claim 1, characterized in that, The parameterized template system provides an interactive interface with UI controls featuring custom sliders; Extract the graphic parameters that are triggered by the user through the UI control of the custom slider, and use the graphic parameters as the basic texture parameters. The graphic parameters include line density, color saturation and gray level.
9. The Android dynamic adaptive screen camera testing system according to claim 1, characterized in that, The distortion compensation engine constructs a three-dimensional geometric mesh model and performs spatial distortion calculations, including: The three-dimensional geometric mesh model is generated based on the screen curvature radius, and the mesh vertex density of the three-dimensional geometric mesh model in the flat central region corresponding to the physical screen is lower than the mesh vertex density near the curved edge region; The origin of the two-dimensional texture of the test pattern is translated to perform a centering process; The plane vertex coordinates of the centered two-dimensional texture of the test pattern are mapped to three-dimensional space vertex coordinates; The observation matrix is calculated based on the camera's calibrated viewpoint position, and the model view projection matrix is constructed as the spatial projection mapping matrix in combination with the perspective projection parameters. The spatial distortion calculation is performed on the vertex coordinates of the two-dimensional texture of the test pattern using the spatial projection mapping matrix.
10. The Android dynamic adaptive screen camera testing system according to claim 1, characterized in that, The differential rendering module sends a trigger command to the camera under test, including: The single refresh cycle of the physical screen is obtained by calling the underlying interface; The single-frame exposure time of the camera under test is configured as the sum of a positive integer multiple of the single refresh cycle and the timing redundancy margin preset by the system.