Android Image Data Invoking System for Memory Overflow Prevention
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Android applications face crashing issues due to excessive memory usage when invoking full-size images with high camera resolutions, leading to system-induced termination.
Innovation Solution
Implementing an image data invoking system that uses a capture mode library for full-size images and a preview mode library for binning-size images, with tags in the hardware abstraction and application framework layers to manage image resolution and parameters, ensuring the image resolution does not exceed available memory and passes Compatibility Test Suite (CTS) tests.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If full-size images are invoked from the Android system, then image quality is improved, but memory usage exceeds available memory causing application crashes
Solution Approach 1:
The patent divides image data into two segments: full-size images stored in capture mode library and binning-size images stored in preview mode library. The system selectively invokes appropriate image sizes based on application needs, preventing memory overflow while maintaining image quality when full-size images are required.
Solution Approach 2:
The patent changes the resolution parameter of images by implementing binning processing that converts full-size images into smaller binning-size images. This parameter transformation allows the system to use smaller images for preview functions, reducing memory consumption while full-size images remain available for high-quality requirements.
2Quantity of substance
If binning-size images are used, then memory usage is reduced, but image quality deteriorates
Solution Approach 1:
The patent implements a dynamic image invocation mechanism that adapts image selection based on real-time requirements. The system can dynamically switch between invoking binning-size images from preview mode library for memory efficiency and full-size images from capture mode library when high quality is needed, making the image quality flexible rather than fixed.
Solution Approach 2:
The patent introduces an image processing intermediary layer that includes capture mode library, preview mode library, and multiple tags (first tag, second tag, third tag, fourth tag) that mediate between the Android system and applications. This intermediary structure enables flexible image selection and processing, allowing the system to optimize between memory usage and image quality based on specific scenarios.
3Manufacturing precision
If full-size images are processed, then image detail is improved, but application stability deteriorates due to system termination
Solution Approach 1:
The patent performs preliminary processing of full-size images into binning-size images and stores them in advance in the preview mode library. This preliminary action ensures that when applications need images, they can use the pre-processed binning-size images that are guaranteed to fit within memory constraints, preventing system termination and ensuring application stability.
Solution Approach 2:
The patent creates a protective buffer by maintaining both full-size and binning-size image versions in separate libraries. This beforehand cushioning prepares the system in advance to handle memory constraints, ensuring that even if full-size images are requested, the system has pre-prepared binning-size alternatives that prevent memory overflow and application crashes.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
This application relates to an image data invoking method and system for an application, an electronic device, and a storage medium. When the electronic device identifies an entry file HalSensorList.cpp of a sensor, an image with an image resolution of binning size is filled. The electronic device obtains an image with an image resolution of binning size from a preview mode library at a kernel layer, fills an MTK_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_WITH_DURATIONS tag at a Hal layer with the image with an image resolution of binning size, and reports the binning size of the MTK_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_WITH_DURATIONS tag at the Hal layer to an android.scaler.availableStreamConfigurations tag at a framework layer. An application obtains the image with an image resolution of binning size with which the android.scaler.availableStreamConfigurations tag at the framework layer is filled from the android.scaler.availableStreamConfigurations tag. This application resolves the crashing problem of the application caused by the application invoking image data with an excessive resolution.