Code Scanning Brightness Filtering for Faster Frame Identification
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing code scanning methods suffer from low scanning speeds due to the identification of invalid frame images, leading to inefficient use of computing resources and poor user experience.
Innovation Solution
The method selectively identifies frame images based on ambient light brightness, focusing on images with sufficient brightness and clarity, and drops invalid frames, thereby reducing the number of threads and memory usage.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If all identification frame images are processed for code scanning, then code scanning coverage is improved, but code scanning speed deteriorates due to low light frames wasting computing resources
Solution Approach 1:
The patent applies preliminary action by evaluating ambient light brightness before initiating the code scanning identification process. The processor determines whether to perform identification based on the ambient light brightness value obtained in advance, preventing unnecessary processing of low light frames before they consume computing resources.
Solution Approach 2:
The patent changes the parameter of frame selection criteria by introducing ambient light brightness as a decision parameter. Instead of processing all frames uniformly, the system adjusts processing behavior based on the ambient light brightness parameter, selectively identifying only frames with sufficient brightness.
2Reliability
If identification is performed on all frames including low light frames, then no frames are missed, but computing resources are wasted and identification time increases
Solution Approach 1:
The patent extracts and separates low light frames from the processing pipeline by comparing ambient light brightness against a threshold. Frames with insufficient brightness are excluded from the identification process, extracting only the useful high brightness frames for processing, thereby reducing identification time without compromising completeness of valid code detection.
3Reliability
If frame processing is performed without brightness filtering, then all potential codes are captured, but memory usage and thread creation increase
Solution Approach 1:
The patent performs preliminary filtering based on ambient light brightness before frames are passed to identification threads. By determining suitability for processing in advance, the system reduces the quantity of frames that require thread creation and memory allocation, while ensuring all potentially valid codes in sufficiently bright frames are captured.
Data Source
Figure 1(a)~1(b)
Figure 2
Figure 3
AI summary
Embodiments of this application provide a code scanning method and an electronic device. The method is applicable to the electronic device. The electronic device includes a camera. The method includes: The electronic device displays a code scanning interface, and then obtains an identification frame image and a preview frame image, where the identification frame image and the preview frame image are obtained by processing a code scanning image collected by the camera. The electronic device displays the preview frame image in the code scanning interface. The electronic device conducts, in a case that ambient light brightness of the identification frame image is greater than or equal to a threshold, code scanning identification on the identification frame image, and determines a code scanning identification result. According to the method, an invalid identification frame image is deleted, to improve code scanning efficiency.