Target recognition method, electronic device and storage medium
By detecting the environmental brightness in the electronic device and performing multi-frame fusion processing on the target image, the difficulty in identifying targets caused by excessive light is solved, and the recognition efficiency and user experience are improved.
Patent Information
- Application Number
- CN202311075013.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-25
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2043-08-25
AI Technical Summary
In the prior art, the target cannot be recognized or the target has a long time to identify it due to the dark ambient light, which in turn affects the user experience.
By detecting the brightness value of the current environment, if it is less than or equal to the preset brightness threshold, a multi-frame fusion process is performed on a continuous n-frame target image with different exposures to obtain a brightness enhancement target image, and then target recognition is performed.
In darker light scenes, the brightness-enhanced target image is obtained through multi-frame fusion processing, which improves the target recognition efficiency and improves the user experience.
Smart Images

Figure CN116847204B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic technology, and in particular to a target recognition method, an electronic device and a storage medium. Background Art
[0002] In order to improve user experience, some applications in electronic devices such as mobile phones and tablets are usually equipped with a code scanning function. After the user triggers the code scanning function in the application, the camera on the electronic device can capture the image of the graphic code (for example, a QR code or a barcode, etc.), and by processing the graphic code image, it can identify the information carried by the graphic code pattern in the graphic code image, and then complete operations such as receiving money, making payments, downloading and opening websites.
[0003] In actual applications, the graphic code may not be recognized or the recognition time of the graphic code may be long due to the fact that the ambient light is too dark (for example, outdoor scenes at night), thereby affecting the user experience.
[0004] It should be pointed out that the information disclosed in the background technology section of this application is only intended to deepen the understanding of the general background technology of this application, and should not be regarded as an admission or suggestion in any form that the information constitutes prior art already known to those skilled in the art. Summary of the invention
[0005] The present application provides a target recognition method, an electronic device and a storage medium, so as to solve the problem in the prior art that the target cannot be recognized or the recognition time of the target is long due to the ambient light being too dark, thereby affecting the user experience.
[0006] In a first aspect, an embodiment of the present application provides a target recognition method, comprising:
[0007] Detect the brightness value of the current environment;
[0008] If the brightness value of the current environment is less than or equal to the preset brightness threshold, multi-frame fusion processing is performed on n consecutive target images with different exposures to obtain a brightness enhanced target image, n≥2;
[0009] Target recognition is performed using the brightness enhanced target image.
[0010] In a possible implementation, before performing multi-frame fusion processing on n consecutive target image frames with different exposures to obtain a brightness enhanced target image, the method further includes:
[0011] Obtain n consecutive frames of initial target images;
[0012] Determining variable exposure parameters corresponding to the consecutive n frames of initial target images;
[0013] The variable exposure processing is performed on the continuous n frames of initial target images according to the variable exposure parameters to obtain continuous n frames of target images with different exposures.
[0014] In a possible implementation, performing variable exposure processing on the continuous n frames of initial target images according to the variable exposure parameters to obtain continuous n frames of target images with different exposures includes: performing variable exposure processing on m frames of initial target images among the n frames of initial target images according to the variable exposure parameters to obtain m frames of variable exposure target images, n>m≥1.
[0015] In a possible implementation, performing multi-frame fusion processing on n consecutive target image frames with different exposures to obtain a brightness enhanced target image includes:
[0016] A multi-frame fusion process is performed on the m frames of variable exposure target images and the nm frames of initial target images that have not been subjected to variable exposure processing to obtain a brightness enhanced target image.
[0017] In a possible implementation, performing variable exposure processing on the consecutive n frames of initial target images according to the variable exposure parameter to obtain consecutive n frames of target images with different exposures includes:
[0018] Variable exposure processing is performed on each of the n frames of initial target images according to the variable exposure parameters to obtain n frames of variable exposure target images.
[0019] In a possible implementation, performing multi-frame fusion processing on n consecutive target image frames with different exposures to obtain a brightness enhanced target image includes:
[0020] A multi-frame fusion process is performed on the n frames of variable exposure target images to obtain a brightness enhanced target image.
[0021] In a possible implementation, the continuous n frames of target images with different exposures include overexposed target images and underexposed target images, and the number of frames of the overexposed target images is greater than or equal to the number of frames of the underexposed target images.
[0022] In a possible implementation, detecting the brightness value of the current environment includes:
[0023] Detect the brightness value of the current environment at preset time intervals.
[0024] In a possible implementation, detecting the brightness value of the current environment includes:
[0025] Get the brightness value of the initial target image of the current frame;
[0026] The brightness value of the current environment is determined according to the brightness value of the initial target image of the current frame.
[0027] In a possible implementation, if the brightness value of the current environment is less than or equal to a preset brightness threshold, performing multi-frame fusion processing on n consecutive target images with different exposures to obtain a brightness enhanced target image includes:
[0028] If the brightness value of the current environment is less than or equal to a preset first brightness threshold, a first multi-frame fusion strategy is used to perform multi-frame fusion processing on n1 consecutive frames of target images with different exposures to obtain a brightness enhanced target image;
[0029] If the brightness value of the current environment is greater than a preset first brightness threshold and less than or equal to a preset second brightness threshold, a second multi-frame fusion strategy is used to perform multi-frame fusion processing on the continuous n2 frames of target images with different exposures to obtain a brightness enhanced target image;
[0030] Among them, n1>n2≥2.
[0031] In a possible implementation, the method further includes:
[0032] The initial target image is displayed; or, the brightness-enhanced target image is displayed.
[0033] In a possible implementation manner, the target image is a graphic code image.
[0034] In a second aspect, an embodiment of the present application provides an electronic device, including:
[0035] processor;
[0036] Memory;
[0037] And a computer program, wherein the computer program is stored in the memory, and the computer program includes instructions, and when the instructions are executed by the processor, the electronic device executes any one of the methods described in the first aspect.
[0038] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described in the first aspect.
[0039] Compared with the prior art, in a dimly lit scene, the embodiment of the present application can obtain a brightness-enhanced target image by fusing multiple frames of target images with different exposures, and perform target recognition based on the brightness-enhanced target image, thereby improving target recognition efficiency and user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0041] Figure 1 A schematic diagram of an electronic device provided in an embodiment of the present application;
[0042] Figure 2 A software structure block diagram of an electronic device provided in an embodiment of the present application;
[0043] Figure 3A A schematic diagram of a two-dimensional code provided in an embodiment of the present application;
[0044] Figure 3B A schematic diagram of a barcode provided in an embodiment of the present application;
[0045] Figure 4 A schematic diagram of a graphic code recognition principle in the related art;
[0046] Figure 5 A schematic diagram of a graphic code recognition principle provided in an embodiment of the present application;
[0047] Figure 6 A flowchart of a target recognition method provided in an embodiment of the present application;
[0048] Figure 7 A schematic diagram of the principle of multi-frame fusion provided in an embodiment of the present application;
[0049] Figure 8 Another schematic diagram of the principle of graphic code recognition provided by an embodiment of the present application;
[0050] Fig. 9 A schematic flow chart of a method for acquiring multiple frames of target images with different exposure levels provided in an embodiment of the present application;
[0051] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0053] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0054] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0055] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0056] See also Figure 1 , is a schematic diagram of an electronic device provided in an embodiment of the present application. Figure 1 The electronic device is described in detail by taking the mobile phone 100 as an example. Figure 1 1 shows a front view and a rear view of a mobile phone 100, wherein a front camera 111 and a screen 120 are disposed on the front side of the mobile phone 100, and a rear camera 112 is disposed on the rear side of the mobile phone 100. Image data can be collected by the configured front camera 111 and / or rear camera 112, and after the mobile phone 100 performs a series of processing on the image data, the image collected by the front camera 111 and / or rear camera 112 can be displayed on the screen 120.
[0057] Understandable, Figure 1 The above is only an exemplary description and should not be used as a limitation on the scope of protection of this application. For example, different mobile phones may have different numbers and locations of cameras. In addition, in addition to mobile phones, the electronic devices involved in the embodiments of this application may also be tablet computers, personal computers (PCs), personal digital assistants (PDAs), smart watches, netbooks, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, vehicle-mounted devices, smart cars, smart speakers, robots, smart glasses, smart TVs, etc.
[0058] See also Figure 2, is a software structure block diagram of an electronic device provided in an embodiment of the present application. The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, namely, the application layer, the framework layer, the hardware abstraction layer, and the hardware layer from top to bottom.
[0059] The application layer (Application, App) may include a series of application packages. For example, the application package may include a code scanning application, that is, an application with a code scanning function.
[0060] The Framework layer (FWK) provides application programming interfaces (APIs) and programming frameworks for applications in the application layer, including some predefined functions. Figure 2 In the framework layer, the camera framework can be the camera access interface (Camera2 API). Camera2 API is a set of interfaces for accessing camera devices launched by Android. It adopts a pipeline design to make the data flow from the camera to the Surface. Camera2 API includes camera management (CameraManager) and camera device (CameraDevice). CameraManager is the management class of the Camera device. Through this class object, the Camera device information of the device can be queried to obtain the CameraDevice object. CameraDevice provides a series of fixed parameters related to the Camera device, such as basic settings and output formats.
[0061] The hardware abstraction layer (HAL) is an interface layer between the operating system kernel and the hardware circuit, and its purpose is to abstract the hardware. It hides the hardware interface details of a specific platform and provides a virtual hardware platform for the operating system, making it hardware-independent and portable on multiple platforms. For example, HAL includes the camera hardware abstraction layer (Camera HAL), which includes camera 1, camera 2, etc. It can be understood that camera 1 and camera 2 are abstract devices. In the shooting scene, HAL will create a data stream of corresponding size according to the resolution sent by the upper layer and the size of the Surface.
[0062] The hardware layer (HardWare, HW) is the hardware at the bottom layer of the operating system. For example, HW includes camera 1, camera 2, camera 3, etc. Among them, camera 1, camera 2, camera 3 can correspond to multiple cameras on the electronic device.
[0063] In order to improve the user experience, some applications in electronic devices such as mobile phones and tablets are usually equipped with a code scanning function (for example, Figure 2 After the user triggers the code scanning function in the application, the camera on the electronic device can capture the graphic code image, and by processing the graphic code image, the information carried by the graphic code pattern in the graphic code image can be identified, thereby completing operations such as receiving payment, making payment, downloading and opening a website. It should be noted that the graphic code involved in the embodiment of the present application can be a QR code (such as Figure 3A ), barcode (as shown), Figure 3B As shown), or other types of patterns that can be scanned and identified, the embodiments of the present application do not impose specific limitations on this.
[0064] See also Figure 4 , is a schematic diagram of a graphic code recognition principle in the related art. Figure 4 The sensor, image front engine (IFE), image processing engine (IPE) and code scanning application are shown in FIG. The image processing engine includes a first image processing engine and a second image processing engine. For ease of explanation, the first image processing engine and the second image processing engine are referred to as IPE0 and IPE1 respectively in the following text. In other parts of this article, IFE and IPE may also be collectively referred to as image signal processing (ISP) modules.
[0065] Specifically, the sensor (sensor in the camera) is used to convert optical signals into electrical signals. The data output by the sensor will first reach IFE, which will do some color correction, downsampling, de-mosaicing, and statistical 3A data processing. IFE outputs two data channels: one channel is transmitted to IPE0, which performs image processing such as hardware noise reduction (MFNR, MFSR), image cropping, noise reduction, color processing, detail enhancement, etc., and then outputs the display data stream to the code scanning application for display; the other channel is transmitted to IPE1, which performs image processing such as hardware noise reduction (MFNR, MFSR), image cropping, noise reduction, color processing, detail enhancement, etc., and then outputs the callback data stream to the code scanning application for graphic code recognition.
[0066] Under normal lighting conditions (for example, outdoors during the day, indoors with sufficient lighting, etc.), electronic devices can usually capture normal brightness graphic code images, and then the scanning application can complete normal graphic code recognition. However, if the ambient light is too dark (for example, outdoor scenes at night, etc.), the brightness of the graphic code image captured by the electronic device is low, which may cause the graphic code to be unable to be recognized or the recognition time of the graphic code is longer, thus affecting the user experience.
[0067] See also Figure 5 , is a schematic diagram of a graphic code recognition principle provided by an embodiment of the present application. Figure 5 As shown, the embodiment of the present application is Figure 4 Based on the above, a scene detection module, a variable exposure calculation module and a multi-frame fusion algorithm are added. Among them, the scene detection module can detect the brightness value of the current environment based on the brightness information in the IFE; if the brightness value of the current environment is less than or equal to the preset brightness threshold, the variable exposure calculation module is triggered to send variable exposure parameters, thereby obtaining multiple frames of target images with different exposures; finally, the multi-frame fusion algorithm performs multi-frame fusion processing on the multiple frames of target images with different exposures to obtain a brightness-enhanced target image.
[0068] That is to say, in a dark scene, the embodiment of the present application can obtain a brightness-enhanced target image by fusing multiple frames of target images with different exposures, and perform target recognition based on the brightness-enhanced target image, thereby improving target recognition efficiency and user experience. This is described in detail below in conjunction with a specific implementation method.
[0069] See also Figure 6 , is a flow chart of a target recognition method provided in an embodiment of the present application. The method can be applied to Figure 1 and Figure 2 The electronic equipment shown, such as Figure 6 As shown, it mainly includes the following steps.
[0070] Step S601: Detect the brightness value of the current environment.
[0071] The "target" involved in the embodiment of the present application may be the graphic code described above, such as a QR code, a barcode, etc. Of course, in some object recognition application scenarios, the "target" may also be an object to be recognized, such as an animal, a plant, a toy, a person, etc., and the embodiment of the present application does not specifically limit this.
[0072] Since electronic devices can usually capture target images of normal brightness and complete target recognition under normal lighting conditions (for example, outdoors during the day, indoors with sufficient lighting, etc.), it is usually only necessary to improve the recognition effect of the target through the method of multi-frame fusion when the ambient light is too dark. Based on this, in an embodiment of the present application, the brightness value of the current environment is first detected, and then in subsequent steps, it is determined whether it is necessary to improve the recognition effect of the target through the method of multi-frame fusion based on the brightness value of the current environment. The process of multi-frame fusion is described in detail below.
[0073] Generally, the brightness value of the target image (for the sake of convenience, the target image is referred to as the "initial target image") captured by the electronic device according to the default exposure parameters can reflect the brightness of the environment, so the brightness value of the current environment can be determined based on the brightness value of the initial target image. Specifically, firstly, the brightness value of the initial target image of the current frame is obtained; then, the brightness value of the current environment is determined based on the brightness value of the initial target image of the current frame.
[0074] Please continue reading Figure 5 After the data output by the sensor is transmitted to IFE, IFE will perform color correction, downsampling, de-mosaicing, and statistical 3A data on the data output by the sensor. The statistical data of IFE usually includes the brightness value of the collected target image. Therefore, in a possible implementation method, the brightness value of the initial target image of the current frame can be directly obtained from the statistical data of IFE. It can be understood that by using the existing statistical data of IFE to determine the brightness value of the current environment, the amount of data processing can be saved, thereby reducing the performance overhead of the system.
[0075] Of course, those skilled in the art may also recalculate the brightness value of the initial target image of the current frame according to actual needs. In addition, in addition to the above-mentioned method for detecting the ambient brightness, those skilled in the art may also set a brightness detection sensor in the electronic device to directly detect the brightness value of the current environment through the brightness detection sensor, and the embodiments of the present application do not specifically limit this.
[0076] In practical applications, if the multi-frame fusion method is continuously used for target recognition, the system data processing volume will be too large, thereby affecting the system performance. In a possible implementation, in order to take into account the target recognition effect and system performance of the electronic device, the judgment logic of multi-frame fusion is triggered once every period of time. Accordingly, the brightness value of the current environment can be detected at a preset time interval. For example, the brightness value of the current environment is detected every 0.1s or 0.2s. Of course, those skilled in the art can also characterize the time interval by the frame number interval. For example, the brightness value of the current environment is detected every 10 frames or 20 frames.
[0077] Step S602: if the brightness value of the current environment is less than or equal to a preset brightness threshold, a multi-frame fusion process is performed on n consecutive frames of target images with different exposures to obtain a brightness enhanced target image, where n≥2.
[0078] In the embodiment of the present application, a brightness threshold can be set in the electronic device, and after the brightness value of the current environment is detected, the brightness value of the current environment is compared with the preset brightness threshold. If the brightness value of the current environment is less than or equal to the preset brightness threshold, it means that the current environment light is too dark, and multi-frame fusion is required; on the contrary, if the brightness value of the current environment is greater than the preset brightness threshold, it means that the current environment light is normal, and multi-frame fusion is not required.
[0079] See also Figure 7 , is a schematic diagram of the principle of multi-frame fusion provided in an embodiment of the present application. Figure 7 , which are the first to the nth target images, are shown in FIG. After the n-frame target images are input into the multi-frame fusion algorithm, the n-frame target images are subjected to multi-frame fusion processing to obtain a brightness-enhanced target image. It can be understood that the brightness value of the brightness-enhanced target image obtained by multi-frame fusion should be greater than the brightness value of the target image acquired by the electronic device according to the default exposure parameters. By performing target recognition through the brightness-enhanced target image, the target recognition effect can be improved. The specific principle of the multi-frame fusion algorithm can refer to the relevant description in the prior art, and will not be repeated here for the sake of brevity.
[0080] Generally speaking, the more frames of the target image used in the multi-frame fusion algorithm, the higher the quality of the brightness enhanced target image obtained. However, if a large number of target images are used for multi-frame fusion, the data processing capacity of the electronic device will increase, thereby affecting the system performance. In order to take into account both the target recognition effect and the system performance, in one possible implementation, multiple brightness thresholds can be set, and the brightness range of the brightness value of the current environment can be divided by the multiple brightness thresholds, and then different multi-frame fusion strategies (target images with different frames) are used for multi-frame fusion processing.
[0081] Specifically, a first brightness threshold and a second brightness threshold are respectively set in the electronic device, wherein the first brightness threshold is less than the second brightness threshold. After the brightness value of the current environment is detected, the brightness value of the current environment is compared with the preset first brightness threshold and the second brightness threshold. Wherein, if the brightness value of the current environment is less than or equal to the preset first brightness threshold, the first multi-frame fusion strategy is used to perform multi-frame fusion processing on the continuous n1 frames of target images with different exposures to obtain a brightness-enhanced target image; if the brightness value of the current environment is greater than the preset first brightness threshold and less than or equal to the preset second brightness threshold, the second multi-frame fusion strategy is used to perform multi-frame fusion processing on the continuous n2 frames of target images with different exposures to obtain a brightness-enhanced target image; wherein, n1>n2≥2. Exemplarily, n1=5, n2=3.
[0082] That is to say, if the brightness value of the current environment is in a darker brightness range (less than or equal to the preset first brightness threshold), a target image with a larger number of frames is used for multi-frame fusion to obtain a higher-quality brightness-enhanced target image; if the brightness value of the current environment is in a brighter brightness range (greater than the first brightness threshold and less than or equal to the second brightness threshold), a target image with a smaller number of frames is used for multi-frame fusion to reduce the amount of data processing. It should be noted that when the brightness value of the current environment is in a brighter brightness range, a higher-quality brightness-enhanced target image can be obtained even if a target image with a smaller number of frames is used for multi-frame fusion.
[0083] Please continue reading Figure 7 In the embodiment of the present application, the n-frame target images for multi-frame fusion refer to n-frame target images with different exposures. In a specific implementation, the exposure of the target image can be represented by a brightness value or an exposure parameter, and the embodiment of the present application does not specifically limit this.
[0084] In a possible implementation, the n target images with different exposures are specifically: at least two of the n target images have different exposures. Exemplarily, n=3, and the n target images are respectively a first target image, a second target image, and a third target image. Among the first target image, the second target image, and the third target image, at least two of the first target image, the second target image, and the third target image have different exposures.
[0085] In another possible implementation, the n target images with different exposures are as follows: any two of the n target images have different exposures. For example, n=3, and the n target images are the first target image, the second target image, and the third target image. Among them, any two of the first target image, the second target image, and the third target image have different exposures.
[0086] In a possible implementation, target images with different exposures can be divided into underexposed target images, normally exposed target images, and overexposed target images according to different exposures. The normally exposed target image refers to a target image captured by an electronic device according to default exposure parameters, and may also be referred to as an initial target image. With the normally exposed target image as a reference, an underexposed target image refers to a target image with an exposure lower than that of a normally exposed target image; an overexposed target image refers to a target image with an exposure higher than that of a normally exposed target image. In a specific implementation, the exposure can be represented by a brightness value or an exposure parameter.
[0087] Since the application scenario of multi-frame fusion in the embodiment of the present application is a dark light environment, in order to improve the target recognition effect in a dark light environment, the number of frames of overexposed target images in n frames of target images should be greater than or equal to the number of frames of underexposed target images. For example, n=2, 2 frames of target images include 1 frame of normally exposed target image and 1 frame of overexposed target image; n=3, 3 frames of target images include 1 frame of underexposed target image, 1 frame of normally exposed target image and 1 frame of overexposed target image; n=5, 5 frames of target images include 1 frame of underexposed target image, 1 frame of normally exposed target image and 3 frames of overexposed target image; and so on.
[0088] It should be pointed out that when n frames of target images include underexposed target images, normally exposed target images and overexposed target images, the detailed features of the target images at different exposure levels can be obtained during the multi-frame fusion process, thereby obtaining a higher quality brightness enhanced target image.
[0089] Step S603: Perform target recognition by brightness enhancing the target image.
[0090] Specifically, after obtaining the brightness enhanced target image, the electronic device can perform target recognition based on the brightness enhanced target image. Since the brightness value of the brightness enhanced target image obtained by multi-frame fusion is greater than the brightness value of the target image captured by the electronic device according to the default exposure parameters, the target recognition effect can be improved by performing target recognition through the brightness enhanced target image.
[0091] In a dimly lit scene, the embodiment of the present application can obtain a brightness-enhanced target image by fusing multiple frames of target images with different exposures, and perform target recognition based on the brightness-enhanced target image, thereby improving target recognition efficiency and user experience.
[0092] It is understandable that during the process of target recognition, the display interface of the electronic device should also display the target image captured by the electronic device in real time for the user to view.
[0093] In a possible implementation, the initial target image is displayed in the display interface. That is, the brightness-enhanced target image obtained by multi-frame fusion is only used for target recognition, and the initial target image is still displayed in the display interface of the electronic device. Figure 5As shown, one channel of data output by IPE0 is directly sent to the application as a display data stream for display; the other channel of data output by IPE1 is sent to the application as a callback data stream for target recognition after multi-frame fusion processing by a multi-frame fusion algorithm. Since the amount of data processing in multi-frame fusion processing is large, for electronic devices with weak data processing capabilities, if the brightness enhanced target image is displayed in the display interface, it may cause the display interface to freeze. Therefore, in the embodiment of the present application, directly displaying the initial target image can avoid display interface freezes and improve user experience. This solution is particularly suitable for electronic devices with weak data processing capabilities.
[0094] In another possible implementation, the brightness-enhanced target image is displayed in the display interface. That is, the brightness-enhanced target image obtained by multi-frame fusion is used for target recognition and display at the same time. Figure 8 As shown, one channel of data output by IPE0 is processed by a multi-frame fusion algorithm for multi-frame fusion, and then sent to the application as a display data stream for display; the other channel of data output by IPE1 is processed by a multi-frame fusion algorithm for multi-frame fusion, and then sent to the application as a callback data stream for target recognition. Since the display effect of the brightness enhanced target image obtained by multi-frame fusion processing is better, displaying the brightness enhanced target image in the display interface can improve the user experience. As mentioned above, due to the large amount of data processing in the multi-frame fusion processing, for electronic devices with weak data processing capabilities, displaying the brightness enhanced target image in the display interface may cause the display interface to freeze. Therefore, this solution is particularly suitable for electronic devices with strong data processing capabilities.
[0095] It is understandable that before performing multi-frame fusion processing, it is necessary to first obtain multi-frame target images with different exposures. The following is a description of the method for obtaining multi-frame target images with different exposures provided by the embodiment of the present application in conjunction with the accompanying drawings.
[0096] See also Fig. 9 , is a flow chart of a method for acquiring multiple frames of target images with different exposures provided in an embodiment of the present application. Fig. 9 As shown, it mainly includes the following steps.
[0097] Step S901: Acquire n consecutive frames of initial target images.
[0098] Specifically, the electronic device can obtain n consecutive frames of initial target images according to the default exposure parameters. For example, 3 consecutive frames, 5 consecutive frames of initial target images, etc. are obtained. Since it takes a short time to obtain n consecutive frames of initial target images, the brightness value of the environment usually does not change significantly during the process of obtaining n consecutive frames of initial target images, so that the exposure parameters corresponding to the n consecutive frames of initial target images are usually basically the same. In other words, the exposure levels corresponding to the n consecutive frames of initial target images are usually basically the same.
[0099] Step S902: Determine variable exposure parameters corresponding to n consecutive frames of initial target images.
[0100] The variable exposure parameter involved in the embodiment of the present application may be a variable exposure parameter preset in the variable exposure calculation module, or may be a variable exposure parameter calculated by the variable exposure calculation module according to the brightness value of the current environment, and the embodiment of the present application does not impose any specific restrictions on this.
[0101] In a possible implementation, determining the variable exposure parameters corresponding to n consecutive frames of initial target images specifically includes: determining the variable exposure parameters corresponding to m frames of initial target images among the n consecutive frames of initial target images, n>m. That is to say, the variable exposure parameters of some initial target images among the n consecutive frames of initial target images are determined, and then variable exposure processing is performed on some initial target images in subsequent steps. Exemplarily, the n consecutive frames of initial target images are respectively the first initial target image, the second initial target image, and the third initial target image. In this step, the variable exposure parameters corresponding to the first initial target image and the third initial target image are determined, and then in subsequent steps, only the first initial target image and the third initial target image are subjected to variable exposure processing, and the second initial target image is used as a reference frame without variable exposure processing.
[0102] In another possible implementation, determining the variable exposure parameters corresponding to the continuous n frames of initial target images specifically includes: determining the variable exposure parameters of each frame of the continuous n frames of initial target images. That is to say, the variable exposure parameters of all the initial target images in the continuous n frames of initial target images are determined, and then the variable exposure processing is performed on all the initial target images in the subsequent steps. Exemplarily, the continuous n frames of initial target images are the first initial target image, the second initial target image, and the third initial target image. In this step, the variable exposure parameters corresponding to the first initial target image, the second initial target image, and the third initial target image are determined, and then the variable exposure processing is performed on the first initial target image, the second initial target image, and the third initial target image in the subsequent steps.
[0103] Step S903: performing variable exposure processing on the continuous n frames of initial target images according to the variable exposure parameters to obtain continuous n frames of target images with different exposures.
[0104] In a possible implementation, if the variable exposure parameters corresponding to the m-frame initial target image in the continuous n-frame initial target image are determined in the above step S902, then the m-frame initial target image is subjected to variable exposure processing respectively according to the variable exposure parameters corresponding to the m-frame initial target image to obtain the m-frame variable exposure target image. That is to say, the continuous n-frame target images with different exposures involved in the embodiment of the present application include m-frame variable exposure target images and nm-frame initial target images (target images not subjected to variable exposure processing). Accordingly, in subsequent steps, the m-frame variable exposure target images and the nm-frame initial target images not subjected to variable exposure processing can be subjected to multi-frame fusion processing to obtain a brightness enhanced target image. For the specific content of the multi-frame fusion processing, please refer to the above description, which will not be repeated here for the sake of brevity.
[0105] In another possible implementation, if the variable exposure parameter of each of the consecutive n frames of initial target images is determined in the above step S902, then variable exposure processing is performed on each of the n frames of initial target images according to the variable exposure parameter of each frame of initial target image to obtain n frames of variable exposure target images. That is, the consecutive n frames of target images with different exposures involved in the embodiment of the present application include n frames of variable exposure target images. Accordingly, in the subsequent steps, multi-frame fusion processing can be performed on the n frames of variable exposure target images to obtain a brightness enhanced target image.
[0106] It should be pointed out that the variable exposure target image involved in the embodiments of the present application can be an underexposed target image or an overexposed target image. For the specific contents of the underexposed target image and the overexposed target image, please refer to the above description. For the sake of brevity, it will not be repeated here.
[0107] To summarize, in the embodiment of the present application, the initial target image is first captured according to the default exposure parameters, and then the initial target image is subjected to variable exposure processing according to the variable exposure parameters to obtain a target image with different exposure levels, that is, the variable exposure of the target image is mainly achieved by software.
[0108] In addition to realizing variable exposure of the target image by means of software, in some possible implementations, variable exposure of the target image can also be realized by controlling the hardware of the electronic device. Specifically, the exposure parameter of the electronic device when acquiring the target image is directly adjusted according to the variable exposure parameter, that is, the target image is acquired according to the adjusted variable exposure parameter. It can be understood that the target image acquired at this time is the variable exposure target image, and there is no need to perform variable exposure processing in subsequent steps.
[0109] Corresponding to the above-mentioned embodiments, the present application also provides an electronic device, which includes a memory for storing computer program instructions and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute some or all of the steps in the above-mentioned method embodiments.
[0110] See also Fig.10 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.10 As shown, the electronic device 1000 may include a processor 1010, an external memory interface 1020, an internal memory 1021, a universal serial bus (USB) interface 1030, a charging management module 1040, a power management module 1041, a battery 1042, an antenna 1, an antenna 2, a mobile communication module 1050, a wireless communication module 1060, an audio module 1070, a speaker 1070A, a receiver 1070B, a microphone 1070C, an earphone interface 1070D, a sensor module 1080, a button 1090, a motor 1091, an indicator 1092, a camera 1093, a display screen 1094, and a subscriber identification module (SIM) card interface 1095, etc. The sensor module 1080 may include a pressure sensor 1080A, a gyroscope sensor 1080B, an air pressure sensor 1080C, a magnetic sensor 1080D, an acceleration sensor 1080E, a distance sensor 1080F, a proximity light sensor 1080G, a fingerprint sensor 1080H, a temperature sensor 1080J, a touch sensor 1080K, an ambient light sensor 1080L, a bone conduction sensor 1080M, etc.
[0111] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 1000. In other embodiments of the present application, the electronic device 1000 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0112] The processor 1010 may include one or more processing units, for example, the processor 1010 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0113] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0114] The processor 1010 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 1010 is a cache memory. The memory may store instructions or data that the processor 1010 has just used or cyclically used. If the processor 1010 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 1010, and thus improves the efficiency of the system.
[0115] In some embodiments, the processor 1010 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0116] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 1010 may include multiple I2C buses. The processor 1010 may be coupled to the touch sensor 1080K, the charger, the flash, the camera 1093, etc. through different I2C bus interfaces.
[0117] The I2S interface can be used for audio communication. In some embodiments, the processor 1010 can include multiple I2S buses. The processor 1010 can be coupled to the audio module 1070 via the I2S bus to achieve communication between the processor 1010 and the audio module 1070.
[0118] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 1070 and the wireless communication module 1060 can be coupled via a PCM bus interface.
[0119] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 1010 and the wireless communication module 1060.
[0120] The MIPI interface can be used to connect the processor 1010 with peripheral devices such as the display screen 1094 and the camera 1093. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 1010 and the camera 1093 communicate via the CSI interface to realize the shooting function of the electronic device 1000. The processor 1010 and the display screen 1094 communicate via the DSI interface to realize the display function of the electronic device 1000.
[0121] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 1010 with the camera 1093, the display 1094, the wireless communication module 1060, the audio module 1070, the sensor module 1080, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0122] The USB interface 1030 is an interface that complies with USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 1030 may be used to connect a charger to charge the electronic device 1000, and may also be used to transmit data between the electronic device 1000 and a peripheral device.
[0123] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 1000. In other embodiments of the present application, the electronic device 1000 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0124] The charging management module 1040 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 1040 may receive charging input from a wired charger through the USB interface 1030. In some wireless charging embodiments, the charging management module 1040 may receive wireless charging input through a wireless charging coil of the electronic device 1000. While the charging management module 1040 is charging the battery 1042, it may also power the terminal through the power management module 1041.
[0125] The power management module 1041 is used to connect the battery 1042, the charging management module 1040 and the processor 1010. The power management module 1041 receives input from the battery 1042 and / or the charging management module 1040, and supplies power to the processor 1010, the internal memory 1021, the display screen 1094, the camera 1093, and the wireless communication module 1060. The power management module 1041 can also be used to monitor parameters such as battery capacity, battery cycle number, and battery health status (leakage, impedance).
[0126] The wireless communication function of the electronic device 1000 can be implemented through the antenna 1, the antenna 2, the mobile communication module 1050, the wireless communication module 1060, the modem processor and the baseband processor.
[0127] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 1000 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0128] The mobile communication module 1050 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 1000. The mobile communication module 1050 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 1050 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 1050 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 1050 can be set in the processor 1010. In some embodiments, at least some of the functional modules of the mobile communication module 1050 can be set in the same device as at least some of the modules of the processor 1010.
[0129] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 1070A, a receiver 1070B, etc.), or displays an image or video through a display screen 1094.
[0130] The wireless communication module 1060 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 1000. The wireless communication module 1060 can be one or more devices integrating at least one communication processing module. The wireless communication module 1060 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 1010. The wireless communication module 1060 can also receive the signal to be sent from the processor 1010, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0131] In some embodiments, the antenna 1 of the electronic device 1000 is coupled to the mobile communication module 1050, and the antenna 2 is coupled to the wireless communication module 1060, so that the electronic device 1000 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0132] The electronic device 1000 implements the display function through a GPU, a display screen 1094, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 1094 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 1010 may include one or more GPUs that execute program instructions to generate or change display information.
[0133] The display screen 1094 is used to display images, videos, etc. The display screen 1094 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 1000 may include 1 or N display screens 1094, where N is a positive integer greater than 1.
[0134] The electronic device 1000 can realize the shooting function through ISP, camera 1093, video codec, GPU, display screen 1094 and application processor.
[0135] The ISP is used to process the data fed back by the camera 1093. For example, when taking a photo, the shutter is opened, and light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise and brightness of the image.
[0136] The camera 1093 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. In some embodiments, the electronic device 1000 may include 1 or N cameras 1093, where N is a positive integer greater than 1.
[0137] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 1000 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0138] Video codecs are used to compress or decompress digital videos. The electronic device 1000 may support one or more video codecs. Thus, the electronic device 1000 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0139] NPU is a neural network (NN) computing processor. It can quickly process input information by learning from the structure of biological neural networks, such as the transmission mode between neurons in the human brain, and can also continuously self-learn. NPU can realize applications such as intelligent cognition of electronic devices 1000.
[0140] The external memory interface 1020 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 1000. The external memory card communicates with the processor 1010 through the external memory interface 1020 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0141] The internal memory 1021 can be used to store computer executable program codes, which include instructions. The internal memory 1021 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 1000 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 1021 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 1010 executes various functional applications and data processing of the electronic device 1000 by running instructions stored in the internal memory 1021 and / or instructions stored in a memory provided in the processor.
[0142] The electronic device 1000 can implement audio functions such as music playing and recording through the audio module 1070, the speaker 1070A, the receiver 1070B, the microphone 1070C, the headphone jack 1070D, and the application processor.
[0143] The audio module 1070 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 1070 can also be used to encode and decode audio signals.
[0144] The speaker 1070A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 1000 can listen to music or listen to a hands-free call through the speaker 1070A.
[0145] The receiver 1070B, also called a "earpiece", is used to convert an audio electrical signal into a sound signal. When the electronic device 1000 receives a call or a voice message, the voice can be received by placing the receiver 1070B close to the human ear.
[0146] Microphone 1070C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by approaching the microphone 1070C with his mouth to input the sound signal into the microphone 1070C. The electronic device 1000 can be provided with at least one microphone 1070C.
[0147] The earphone interface 1070D is used to connect a wired earphone and can be a USB interface 1030, or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0148] The pressure sensor 1080A is used to sense pressure signals and can convert pressure signals into electrical signals. In some embodiments, the pressure sensor 1080A can be set on the display screen 1094. There are many types of pressure sensors 1080A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 1080A, the capacitance between the electrodes changes. The electronic device 1000 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 1094, the electronic device 1000 detects the intensity of the touch operation based on the pressure sensor 1080A. The electronic device 1000 can also calculate the position of the touch based on the detection signal of the pressure sensor 1080A.
[0149] The gyro sensor 1080B may be used to determine the motion posture of the electronic device 1000. In some embodiments, the angular velocity of the electronic device 1000 around three axes (ie, x, y, and z axes) may be determined by the gyro sensor 1080B. The gyro sensor 1080B may be used for anti-shake shooting.
[0150] The air pressure sensor 1080C is used to measure air pressure. In some embodiments, the electronic device 1000 calculates the altitude through the air pressure value measured by the air pressure sensor 1080C to assist positioning and navigation.
[0151] The magnetic sensor 1080D includes a Hall sensor, and the electronic device 1000 can use the magnetic sensor 1080D to detect the opening and closing of the flip leather case.
[0152] The acceleration sensor 1080E can detect the magnitude of the acceleration of the electronic device 1000 in all directions (generally three axes). When the electronic device 1000 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the terminal posture and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0153] The distance sensor 1080F is used to measure the distance. The electronic device 1000 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 1000 can use the distance sensor 1080F to measure the distance to achieve fast focusing.
[0154] The proximity light sensor 1080G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 1000 emits infrared light outward through the light emitting diode. The electronic device 1000 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 1000.
[0155] The ambient light sensor 1080L is used to sense the brightness of the ambient light. The electronic device 1000 can adaptively adjust the brightness of the display screen 1094 according to the sensed brightness of the ambient light.
[0156] The fingerprint sensor 1080H is used to collect fingerprints. The electronic device 1000 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0157] The temperature sensor 1080J is used to detect temperature. In some embodiments, the electronic device 1000 uses the temperature detected by the temperature sensor 1080J to execute a temperature processing strategy.
[0158] The touch sensor 1080K is also called a "touch control device". The touch sensor 1080K can be set on the display screen 1094, and the touch sensor 1080K and the display screen 1094 form a touch screen, also called a "touch control screen". The touch sensor 1080K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 1094. In other embodiments, the touch sensor 1080K can also be set on the surface of the electronic device 1000, which is different from the position of the display screen 1094.
[0159] The bone conduction sensor 1080M can obtain vibration signals. In some embodiments, the bone conduction sensor 1080M can obtain vibration signals of vibrating bones of the human body. The bone conduction sensor 1080M can also contact the human body's pulse to receive blood pressure beating signals.
[0160] The key 1090 includes a power key, a volume key, etc. The key 1090 may be a mechanical key or a touch key. The electronic device 1000 may receive key input and generate key signal input related to user settings and function control of the electronic device 1000.
[0161] Motor 1091 can generate vibration prompts. Motor 1091 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
[0162] Indicator 1092 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0163] The SIM card interface 1095 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 1000 by inserting it into the SIM card interface 1095 or pulling it out from the SIM card interface 1095. The electronic device 1000 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 1095 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 1095 at the same time. The types of the multiple cards can be the same or different. The electronic device 1000 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 1000 uses an eSIM, i.e., an embedded SIM card.
[0164] In a specific implementation, the present application further provides a computer storage medium, wherein the computer storage medium may store a program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute some or all of the steps in the above embodiment. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0165] In a specific implementation, an embodiment of the present application further provides a computer program product, which includes executable instructions. When the executable instructions are executed on a computer, the computer executes some or all of the steps in the above method embodiment.
[0166] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0167] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0168] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0169] In several embodiments provided by the present invention, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0170] The above is only a specific embodiment of the present invention. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. The protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A target recognition method is applied to an electronic device, wherein the electronic device comprises a camera and a screen, wherein the camera is used to collect image data, and the screen is used to display the image collected by the camera, wherein: The method comprises: Receiving a triggering of a target recognition function of the electronic device by a user; Detect the brightness value of the current environment; If the brightness value of the current environment is less than or equal to the preset brightness threshold, then acquiring n consecutive frames of initial target images according to the default exposure parameters through the camera, where n≥2; Determine the variable exposure parameter corresponding to m initial target images among the continuous n initial target images, n>m≥1; Performing variable exposure processing on m frames of initial target images among the continuous n frames of initial target images according to the variable exposure parameters to obtain m frames of variable exposure target images; the m frames of variable exposure target images and nm frames of initial target images that have not been subjected to variable exposure processing constitute continuous n frames of target images with different exposures, the continuous n frames of target images with different exposures include overexposed target images and underexposed target images, and the number of frames of the overexposed target images is greater than or equal to the number of frames of the underexposed target images; Performing multi-frame fusion processing on the m frames of variable exposure target images and the nm frames of initial target images that have not been subjected to variable exposure processing to obtain a brightness enhanced target image; Target recognition is performed using the brightness-enhanced target image, and the initial target image is displayed on the screen.
2. The method according to claim 1, characterized in that The detecting the brightness value of the current environment includes: Detect the brightness value of the current environment at preset time intervals.
3. The method according to claim 1 or 2, characterized in that: The detecting the brightness value of the current environment includes: Get the brightness value of the initial target image of the current frame; The brightness value of the current environment is determined according to the brightness value of the initial target image of the current frame.
4. The method according to claim 1, characterized in that: The method further comprises: When the brightness value of the current environment is less than or equal to the preset brightness threshold, specifically, the brightness value of the current environment is less than or equal to the preset first brightness threshold, n is n1, m is m1, wherein n1≥2, n1>m1≥1; When the brightness value of the current environment is less than or equal to the preset brightness threshold, specifically, the brightness value of the current environment is greater than the preset first brightness threshold and less than or equal to the preset second brightness threshold, n is n2, m is m2, wherein n2≥2, n2>m2≥1; Among them, n1>n2≥2.
5. The method according to claim 1, characterized in that The target image is a graphic code image.
6. An electronic device, characterized in that: include: processor; Memory; And a computer program, wherein the computer program is stored in the memory, and the computer program includes instructions, and when the instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Image processing method
CN109685727A
Two-dimensional code imaging and identification method based on multi-frame fusion, electronic equipment and medium
CN115760660A