Shooting scene identification method and device, equipment and storage medium
By acquiring preview images and motion information, determining the stability of the shooting scene and identifying the scene according to the stability, the problems of high power consumption and untimely recognition in the prior art are solved, and efficient and accurate shooting scene recognition is achieved.
Patent Information
- Application Number
- CN202311084342.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-25
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art is difficult to accurately identify the scene and optimize debug parameters during shooting, resulting in high power consumption or untimely identification.
By acquiring multiple preview images and motion information taken by the electronic device, the stability of the shooting scene is determined, and the scene is identified according to the frequency corresponding to the stability. The method includes identification using a preset correspondence and a multitasking neural network model.
The method of flexibly setting the frequency identification is realized, reducing the power consumption problems caused by fixed frequency settings and untimely identification problems, and improving the efficiency and accuracy of shooting scene recognition.
Smart Images

Figure CN119520978A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of photographing technology, and in particular to a photographing scene recognition method, device, equipment, and storage medium. Background Art
[0002] With the popularization and development of electronic camera equipment and computational photography, the scenarios in which users use electronic devices to take photos have also become more diverse. It is difficult for a single camera debugging parameter to meet all photo scenarios. Manufacturers of electronic camera equipment often use different parameter solutions for different scenarios. Therefore, accurately identifying the current scene and calling the corresponding debugging and optimization solutions are important parts of photography. During the shooting process, scene recognition has relatively high requirements for power consumption and real-time performance. At the same time, due to limitations such as device computing power, related scene recognition solutions often have problems such as high power consumption or untimely. Summary of the invention
[0003] The present invention provides a shooting scene recognition method, device, equipment, and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a shooting scene recognition method is provided, including:
[0005] Acquire a plurality of preview images captured by the electronic device and motion information of the electronic device during the process of capturing the plurality of preview images;
[0006] Determining a stability level of the shooting scene according to the plurality of preview images and / or the motion information;
[0007] The shooting scene of the electronic device is identified according to the frequency corresponding to the stability degree of the shooting scene.
[0008] In some embodiments, the identifying the shooting scene of the electronic device according to the frequency corresponding to the stability of the shooting scene includes:
[0009] In response to the stability of the shooting scene being greater than a preset stability threshold, determining a target frequency corresponding to the stability of the shooting scene according to a preset corresponding relationship; wherein the stability of the shooting scene in the preset corresponding relationship is negatively correlated with the frequency;
[0010] A shooting scene of the electronic device is identified at the target frequency.
[0011] In some embodiments, the method further comprises:
[0012] In response to the stability of the shooting scene being less than or equal to the preset stability threshold, identifying the shooting scene of the electronic device is prohibited.
[0013] In some embodiments, the identifying the shooting scene according to the frequency corresponding to the stability of the shooting scene includes:
[0014] The multi-task scene recognition model is called at a frequency corresponding to the stability of the shooting scene to obtain a recognition result of the shooting scene corresponding to each frequency call; wherein the multi-task scene recognition model is obtained by training a multi-task neural network model.
[0015] In some embodiments, the method further comprises:
[0016] Get shooting instructions;
[0017] Determine a target recognition result of the shooting scene based on a recognition result of the shooting scene whose time difference between the recognition time and the acquisition time of the shooting instruction is less than a preset time length threshold among the recognition results of each shooting scene recognized according to the frequency;
[0018] The target photographing parameters are determined according to the target recognition result of the photographing scene.
[0019] In some embodiments, the target recognition result of the shooting scene includes: a scene recognition result associated with focus and a scene recognition result associated with screen display, each recognition result corresponds to a confidence level; and determining the target shooting parameter according to the target recognition result of the shooting scene includes:
[0020] In the associated focus scene recognition results, a focus scene whose confidence level satisfies a first confidence level condition is used as a target focus scene;
[0021] According to a preset screen scene set corresponding to the screen debugging requirement, a screen scene in the scene recognition result displayed on the associated screen that belongs to the screen scene set and whose confidence satisfies a second confidence condition corresponding to the screen debugging requirement is used as a target screen scene;
[0022] Determining focus parameters according to the target focus scene;
[0023] Determine the acquisition parameters corresponding to the picture debugging requirements according to the target picture scene;
[0024] The target photographing parameter is determined according to the focusing parameter and / or the acquisition parameter.
[0025] In some embodiments, the method further comprises:
[0026] The multi-task scene recognition model is called by using an independent thread.
[0027] In some embodiments, the motion information includes multiple angular velocities within a preset time period, the preview image includes multiple preview images within the preset time period, and determining the stability of the shooting scene according to the preview image and / or the motion information includes:
[0028] determining a difference between the preview images in the plurality of preview images, and a change in angular velocity;
[0029] Based on the difference between the preview images and / or the change in angular velocity, the stability of the captured scene is determined.
[0030] In some embodiments, determining the stability of the captured scene according to the difference between the preview images and / or the change in angular velocity includes:
[0031] When the difference between the preview images is less than a first preset threshold value and the angular velocity satisfies a preset first condition, it is determined that the shooting scene is at a first stability level; wherein the preset first condition includes: the duration of the angular velocity being less than the first preset angular velocity threshold value is greater than a first preset duration, and / or the number of times the angular velocity is less than the first preset angular velocity threshold value is greater than a first preset number of times;
[0032] When the degree of difference between the preview images is greater than or equal to the first preset degree threshold, and / or the difference between the angular velocities satisfies a preset second condition, it is determined that the shooting scene is at a second stability degree; wherein the preset second condition includes: the duration of the difference between the angular velocities within the preset difference range is greater than a second preset duration, and / or the number of times the difference between the angular velocities is within the preset difference range is greater than a second preset number of times;
[0033] In the case where the angular velocity satisfies a preset third condition, determining that the shooting scene is at a third stability level; wherein the preset third condition includes: the duration for which the angular velocity is greater than the second preset angular velocity threshold is greater than a third preset duration, and / or the number of times the angular velocity is greater than the second preset angular velocity threshold is greater than a third preset number of times;
[0034] Among them, the second preset angular velocity threshold is greater than the first preset angular velocity threshold, the first stability level is greater than the second stability level, and the second stability level is greater than the third stability level.
[0035] According to a second aspect of an embodiment of the present disclosure, a shooting scene recognition device is provided, the device comprising:
[0036] A first acquisition module is configured to acquire a plurality of preview images captured by the electronic device and motion information of the electronic device during the process of capturing the plurality of preview images;
[0037] A first determination module, configured to determine the stability of the shooting scene according to the plurality of preview images and / or the motion information;
[0038] The recognition module is configured to recognize the shooting scene of the electronic device according to the frequency corresponding to the stability degree of the shooting scene.
[0039] In some embodiments, the identification module is further configured to determine a target frequency corresponding to the stability of the shooting scene according to a preset correspondence relationship in response to the stability of the shooting scene being greater than a preset stability threshold; wherein the stability of the shooting scene in the preset correspondence relationship is negatively correlated with the frequency; and identify the shooting scene of the electronic device at the target frequency.
[0040] In some embodiments, the apparatus further comprises:
[0041] The prohibition module is configured to prohibit the recognition of the shooting scene of the electronic device in response to the stability of the shooting scene being less than or equal to the preset stability threshold.
[0042] In some embodiments, the recognition module is further configured to call a multi-task scene recognition model at a frequency corresponding to the stability of the shooting scene to obtain a recognition result of the shooting scene corresponding to each frequency call; wherein the multi-task scene recognition model is obtained by training a multi-task neural network model.
[0043] In some embodiments, the apparatus further comprises:
[0044] A second acquisition module is configured to acquire a shooting instruction;
[0045] A second determination module is configured to determine a target recognition result of a shooting scene based on a recognition result of a shooting scene whose time difference between a recognition time and a time of obtaining the shooting instruction is less than a preset time length threshold among the recognition results of each shooting scene recognized according to the frequency;
[0046] The third determination module is configured to determine target photographing parameters according to the target recognition result of the shooting scene.
[0047] In some embodiments, the target recognition result of the shooting scene includes: an associated focus scene recognition result and an associated screen display scene recognition result, each recognition result corresponding to a confidence level; the third determination module is further configured to use the focus scene whose confidence level satisfies a first confidence level condition in the associated focus scene recognition result as the target focus scene; according to a set of screen scenes corresponding to a preset screen debugging requirement, use the screen scenes in the associated screen display scene recognition result that belong to the screen scene set and whose confidence level satisfies a second confidence level condition corresponding to the screen debugging requirement as the target screen scene; determine the focus parameters according to the target focus scene; determine the acquisition parameters corresponding to the screen debugging requirement according to the target screen scene; and determine the target shooting parameters according to the focus parameters and / or the acquisition parameters.
[0048] In some embodiments, the apparatus further comprises:
[0049] The calling module is configured to call the multi-task scene recognition model using an independent thread.
[0050] In some embodiments, the motion information includes multiple angular velocities within a preset time length, the preview image includes multiple preview images within the preset time length, and the first determination module is further configured to determine the difference between the preview images in the multiple preview images, and the change in angular velocity; determine the stability of the shooting scene based on the difference between the preview images and / or the change in angular velocity.
[0051] In some embodiments, the first determination module is further configured to determine that the shooting scene is at a first stability level when the difference between the preview images is less than a first preset threshold and the angular velocity satisfies a preset first condition; wherein the preset first condition includes: the duration of the angular velocity being less than the first preset angular velocity threshold being greater than the first preset duration, and / or the number of times the angular velocity is less than the first preset angular velocity threshold being greater than a first preset number of times; and when the difference between the preview images is greater than or equal to the first preset threshold and / or the difference between the angular velocities satisfies a preset second condition, determine that the shooting scene is at a second stability level; wherein the preset second condition includes: the angular velocity The time length of the difference between the angular velocities within the preset difference range is greater than a second preset time length, and / or the number of times the difference between the angular velocities is within the preset difference range is greater than a second preset number of times; under the circumstance that the angular velocity satisfies a preset third condition, it is determined that the shooting scene is at a third stability level; wherein the preset third condition includes: the time length of the angular velocity greater than the second preset angular velocity threshold value is greater than a third preset time length, and / or the number of times the angular velocity greater than the second preset angular velocity threshold value is greater than a third preset number of times; wherein the second preset angular velocity threshold value is greater than the first preset angular velocity threshold value, the first stability level is greater than the second stability level, and the second stability level is greater than the third stability level.
[0052] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, the electronic device comprising:
[0053] processor;
[0054] a memory for storing processor-executable instructions;
[0055] Wherein, the processor is configured to execute the shooting scene recognition method as described in the first aspect above.
[0056] According to a fourth aspect of an embodiment of the present disclosure, there is provided a storage medium, including:
[0057] When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the shooting scene recognition method as described in the first aspect above.
[0058] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0059] In the disclosed embodiments, the stability of the shooting scene is determined according to the preview image and / or motion information, and the shooting scene is identified according to the frequency corresponding to the stability of the shooting scene. This method of flexibly setting the frequency of identifying the shooting scene, relative to the method of using a fixed frequency for scene recognition, can, on the one hand, reduce the power consumption problem caused by frequent scene recognition when the fixed frequency is set too high; on the other hand, it can also reduce the problem of untimely scene recognition when the fixed frequency is set too low.
[0060] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0062] Figure 1 It is a flow chart of a shooting scene recognition method shown in an embodiment of the present disclosure.
[0063] Figure 2 This is a schematic diagram of a method for identifying a shooting scene by an electronic device in an asynchronous calling manner in an embodiment of the present disclosure.
[0064] Figure 3 This is an example diagram of the output of the multi-task scene recognition model in the embodiment of the present disclosure.
[0065] Figure 4 This is an example diagram of switching between states represented by different stability levels in an embodiment of the present disclosure.
[0066] Figure 5 This is an example diagram of a shooting scene recognition device in an embodiment of the present disclosure.
[0067] Figure 6 It is a block diagram of a device according to an exemplary embodiment. DETAILED DESCRIPTION
[0068] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0069] Figure 1 is a flow chart of a shooting scene recognition method shown in an embodiment of the present disclosure. Figure 1 As shown, the following steps are included:
[0070] S11, acquiring a plurality of preview images captured by the electronic device and motion information of the electronic device during the process of capturing the plurality of preview images;
[0071] S12, determining the stability of the shooting scene according to the plurality of preview images and / or the motion information;
[0072] S13: Identify the shooting scene of the electronic device according to the frequency corresponding to the stability degree of the shooting scene.
[0073] In some embodiments of the present disclosure, the shooting scene recognition method can be applied to electronic devices with cameras, such as mobile phones, cameras, camcorders, etc. The electronic devices capture preview images through the cameras and obtain their own motion information to further execute the shooting scene recognition method.
[0074] In other embodiments of the present disclosure, the shooting scene recognition method can be applied to other devices associated with the electronic device that shoots the preview image, such as a server. After the electronic device shoots the preview image through the camera and obtains its own motion information, the preview image and the motion information are sent to the server, and the server determines the stability of the shooting scene based on the multiple preview images and / or the motion information, thereby identifying the shooting scene of the electronic device at a frequency corresponding to the stability. In the embodiments of the present disclosure, the shooting scene recognition method is applied to an electronic device with a camera as an example for explanation.
[0075] In step S11, the electronic device obtains multiple preview images and motion information of the electronic device, wherein the motion information is obtained, for example, angular velocity information obtained by the electronic device through a built-in gyroscope, or acceleration information obtained through a built-in acceleration sensor, etc., which is not limited in the embodiments of the present disclosure.
[0076] In step S12, the electronic device determines the stability of the shooting scene based on the multiple preview images and / or motion information, wherein whether the shooting scene is stable may be affected by the electronic device or the subject. For example, when the user holds the electronic device to switch the viewing range, the preview image changes and the shooting scene is unstable; for another example, when the subject changes, the preview image also changes and the shooting scene is unstable.
[0077] It should be noted that, in the embodiments of the present disclosure, the shooting scenes include scenes represented by shooting objects, and different shooting objects represent different shooting scenes, for example, flowers and food belong to different shooting scenes; the shooting scenes also include scenes represented by shooting environments, for example, under different weather conditions, rainy days and snowy days belong to different shooting scenes; at different times, sunrise and sunset belong to different shooting scenes; different shooting locations, indoors and outdoors belong to different shooting scenes; in addition, shooting through glass and shooting without glass also belong to different shooting scenes.
[0078] In some embodiments, the electronic device may determine the stability of the captured scene based on the differences between multiple preview images; in other embodiments, the electronic device may determine the stability of the captured scene based on changes in motion information; in addition, the two may be combined to determine the stability of the captured scene.
[0079] In step S13, the electronic device identifies the shooting scene of the electronic device at a frequency corresponding to the stability of the shooting scene. For example, when the shooting scene is stable, the shooting scene is identified at a lower frequency; when the shooting scene changes frequently, the shooting scene is not identified, and so on.
[0080] In the disclosed embodiment, the electronic device may use a neural network model to identify the shooting scene of the electronic device based on one or more preview images, or may use a traditional image processing method to detect one or more preview images to determine the shooting scene. The one or more preview images may be the last frame or frames used to determine the stability of the shooting scene, or may be one or more images collected within a certain time period after the shooting scene is determined. In addition, in the disclosed embodiment, after the shooting scene is identified with the corresponding frequency, auxiliary photography may be performed based on the shooting scene or image enhancement may be performed on the captured image.
[0081] In the related art, when shooting scenes of electronic devices are identified with a fixed frequency, in order to meet the real-time requirements of the detection results, the identification is usually performed at a higher frequency, such as 6 times per second or once every 5 frames. However, this solution lacks flexibility and has high power consumption.
[0082] In contrast, in the disclosed embodiments, the stability of the shooting scene is determined based on the preview image and / or motion information, and the shooting scene is identified based on the frequency corresponding to the stability of the shooting scene. This method of flexibly setting the frequency of identifying the shooting scene, relative to the method of using a fixed frequency for scene recognition, can, on the one hand, reduce the power consumption problem caused by frequent scene recognition when the fixed frequency is set too high; on the other hand, it can also reduce the occurrence of problems of untimely scene recognition when the fixed frequency is set too low.
[0083] In some embodiments, the identifying the shooting scene of the electronic device according to the frequency corresponding to the stability of the shooting scene includes:
[0084] In response to the stability of the shooting scene being greater than a preset stability threshold, determining a target frequency corresponding to the stability of the shooting scene according to a preset corresponding relationship; wherein the stability of the shooting scene in the preset corresponding relationship is negatively correlated with the frequency;
[0085] A shooting scene of the electronic device is identified at the target frequency.
[0086] In the disclosed embodiment, the stability degree of the shooting scene may include multiple levels, for example, including a first stability degree of "stable state", at which the shooting scene is stable, and may include a third stability degree of "violent shaking", at which the shooting scene is particularly unstable; and may also include a second stability degree of "scene switching", which is between "violent shaking" and "stable state".
[0087] In the disclosed embodiment, when the stability of the shooting scene is greater than a preset stability threshold, the electronic device determines the target frequency corresponding to the stability according to a preset corresponding relationship. The preset stability threshold is, for example, the third stability corresponding to "violent shaking", then under the two stability levels of "scene switching" and "stable", the electronic device determines the corresponding target frequency according to the mapping relationship between the stability of the shooting scene and the negative correlation between the frequency, and identifies the shooting scene based on the target frequency.
[0088] Exemplarily, in the preset corresponding relationship, the frequency corresponding to the second stability level "scene switching" is greater than the frequency corresponding to the first stability level "steady state". When the electronic device determines that the stability level of the shooting scene is "scene switching", when it is in the "scene change" state, the user may be looking for a suitable shooting scene and needs to provide timely feedback on the scene recognition results to assist the electronic device in taking pictures or performing image enhancement. Therefore, the disclosed embodiment can perform scene recognition at a frequency of 5 or 6 times per second; and if the electronic device determines that the stability level of the shooting scene is "steady state", it can perform scene recognition 1 to 2 times per second.
[0089] It can be understood that in the embodiment of the present disclosure, when the stability reaches a preset stability threshold, the target frequency of scene recognition is determined according to the preset corresponding relationship in which the stability is negatively correlated with the frequency, so that the target frequency can be consistent with the current actual situation, with better flexibility.
[0090] In some embodiments, the method further comprises:
[0091] In response to the stability of the shooting scene being less than or equal to the preset stability threshold, identifying the shooting scene of the electronic device is prohibited.
[0092] In the disclosed embodiment, if the stability of the shooting scene is less than or equal to the preset stability threshold, it can be understood that the shooting scene is very unstable. In the disclosed embodiment, for example, when the shooting scene is "severely shaking", the shooting scene of the electronic device is not identified.
[0093] It is understandable that in the embodiment of the present disclosure, when the shooting scene is less stable, the photos taken will be blurry and have poor usability. Therefore, not identifying the shooting scene of the electronic device in this case can effectively save power consumption caused by meaningless identification.
[0094] In some embodiments, the identifying the shooting scene according to the frequency corresponding to the stability of the shooting scene includes:
[0095] The multi-task scene recognition model is called at a frequency corresponding to the stability of the shooting scene to obtain a recognition result of the shooting scene corresponding to each frequency call; wherein the multi-task scene recognition model is obtained by training a multi-task neural network model.
[0096] As mentioned above, the electronic device may use a neural network model to identify the shooting scene of the electronic device based on one or more preview images. In the embodiment of the present disclosure, the electronic device identifies the recognition result of the shooting scene based on a multi-task neural network model. Among them, the multi-task scene recognition model may include scene recognition corresponding to multiple tasks such as focus adjustment, exposure adjustment, or white balance adjustment. The multi-task scene recognition model can be a multi-gate mixture of experts (Multi-gate Mixture-of-Experts, MMOE) model, a sub-network routing (Sub-Network-Routing, SNR) model, etc., which is not limited by the embodiment of the present disclosure.
[0097] It should be noted that, in the embodiments of the present disclosure, the scene recognition result corresponding to each task output by the multi-task scene recognition model may include one or more results, and each result has a corresponding confidence level.
[0098] In the related art, when scene recognition results corresponding to multiple tasks need to be obtained, multiple models are often used for recognition, where one model completes one task. This method ignores the relevance of subdivided tasks in scene recognition, for example, different tasks can share the initially extracted features; and increases the power consumption and memory usage of model initialization, for example, different models need to load preview images once.
[0099] It can be understood that in the embodiments of the present disclosure, the multi-task scene recognition model can effectively reduce memory usage and power consumption, and improve the efficiency of scene recognition.
[0100] In some embodiments, the method further comprises:
[0101] The multi-task scene recognition model is called by using an independent thread.
[0102] In the disclosed embodiment, when the electronic device executes the shooting scene recognition method, it needs to perform multiple tasks such as determining the stability of the shooting scene, determining the frequency according to the stability of the shooting scene, and identifying the shooting scene according to the frequency. Due to the performance limitations of the electronic device of the user terminal, the running speed of the model may range from five or six milliseconds to tens or hundreds of milliseconds, and the preview running frame rate of general electronic devices is 30 frames per second or 60 frames per second. It is conceivable that if the same thread is used to complete multiple tasks in the previous order, there will be jams.
[0103] Based on this, the embodiment of the present disclosure takes into account that scene recognition based on a multi-task scene recognition model will occupy more memory, so an independent thread is used to call the model to facilitate asynchronous calling. This method can reduce the limitation of the computing power of the electronic device on the multi-task scene recognition model and reduce the occurrence of freezes. Of course, the embodiment of the present disclosure does not limit the asynchronous calling method, and the electronic device can also complete the aforementioned multiple tasks in the same thread.
[0104] It should be noted that in the embodiments of the present disclosure, if during the asynchronous call process, when the electronic device reads the scene recognition results of the multi-task scene recognition model, the multi-task scene recognition model has not yet been completed, the electronic device can use the previous scene device result as the current result. In this way, the jamming caused by waiting for the scene recognition results of the multi-task scene recognition model can be reduced.
[0105] Figure 2 FIG. 1 is a schematic diagram of a method for identifying a shooting scene by an electronic device in an asynchronous calling manner in an embodiment of the present disclosure. Figure 2As shown, the electronic device reads the image (i.e., preview image) through thread 1 and determines the stability of the shooting scene to further determine the frequency of scene recognition, that is, the calling frequency of the multi-task scene recognition model. Subsequently, the electronic device determines whether to call the model for the preview image of the current frame according to the frequency. If it is determined to call the model, the multi-task scene recognition model is called through instructions in thread 1, and thread 2 runs the multi-task model and saves the multi-task recognition results of the model after the operation is completed. Furthermore, thread 1 reads the multi-task results of the model through instructions, so that the results are output according to different task categories. It should be noted that in the embodiment of the present disclosure, if the task of thread 2 is not completed when the electronic device reads the multi-task results of the model, the electronic device will output the output result of the previous model as the current result.
[0106] In some embodiments, the method further comprises:
[0107] Get shooting instructions;
[0108] Determine a target recognition result of the shooting scene based on a recognition result of the shooting scene whose time difference between the recognition time and the acquisition time of the shooting instruction is less than a preset time threshold among the recognition results of each shooting scene recognized according to the frequency;
[0109] The target photographing parameters are determined according to the target recognition result of the photographing scene.
[0110] In an embodiment of the present disclosure, the electronic device may obtain a shooting instruction according to a user's operation of a physical button on the electronic device, or determine the shooting instruction according to a user's voice.
[0111] As mentioned above, the recognition results of the shooting scenes can be used to assist in taking photos. In this embodiment, the electronic device will determine the recognition results of the shooting scenes based on the recognition results of each shooting scene identified according to the frequency, based on the recognition result of the shooting scene whose time difference between the recognition time and the acquisition time of the shooting instruction is less than a preset time threshold, as the target recognition result of the shooting scene. For example, the recognition result most recent to the acquisition time of the shooting instruction is directly used as the target recognition result, or the recognition result with the highest confidence among multiple recognition results whose acquisition time of the shooting instruction is less than the preset time threshold is used as the target recognition result.
[0112] In the disclosed embodiments, target photographing parameters, such as exposure parameters, white balance parameters, focus range, etc., may be determined based on the target recognition result of the shooting scene. The target photographing parameters may assist the electronic device in taking photos.
[0113] It can be understood that in the embodiment of the present disclosure, the target recognition result of the shooting scene is selected according to the time of obtaining the shooting instruction and the recognition time of the shooting scene to assist in taking pictures, which can improve the quality of the pictures.
[0114] In some embodiments, the target recognition result of the shooting scene includes: a scene recognition result associated with focus and a scene recognition result associated with screen display, each recognition result corresponds to a confidence level; and determining the target shooting parameter according to the target recognition result of the shooting scene includes:
[0115] In the associated focus scene recognition results, a focus scene whose confidence level satisfies a first confidence level condition is used as a target focus scene;
[0116] According to a preset screen scene set corresponding to the screen debugging requirement, a screen scene in the scene recognition result displayed on the associated screen that belongs to the screen scene set and whose confidence satisfies a second confidence condition corresponding to the screen debugging requirement is used as a target screen scene;
[0117] Determining focus parameters according to the target focus scene;
[0118] Determine the acquisition parameters corresponding to the picture debugging requirements according to the target picture scene;
[0119] The target photographing parameter is determined according to the focusing parameter and / or the acquisition parameter.
[0120] In the disclosed embodiment, the results of the multi-task scene recognition model include the scene recognition results associated with focus and the scene recognition results associated with screen display. Among them, the scene recognition results associated with focus are used by the electronic device to determine the focus parameters adapted to the current shooting scene, such as whether the current scene is suitable for autofocus or a specific focus range; the scene recognition results associated with screen display are used by the electronic device to determine the image acquisition parameters corresponding to the current scene, such as white balance setting parameters, exposure parameters, etc.
[0121] Figure 3 is an output example diagram of a multi-task scene recognition model in an embodiment of the present disclosure, such as Figure 3As shown, after the preview image is input into the multi-task model (i.e., the multi-task scene recognition model), the detection result of the associated glass focus identified by L0 and the multi-classification recognition result of the associated screen classification identified by L1 are output. As mentioned above, the scene recognition results corresponding to each task output by the multi-task scene recognition model may include one or more results, and each result has a corresponding confidence level. In the glass focus detection results, the electronic device may output multiple scenes including moiré, night scene vista, sky vista, etc. Based on the recognition results of the task, the electronic device may determine how to set the focal length when shooting through the glass based on the confidence level corresponding to each result; in the multi-classification recognition results of the associated screen classification, the electronic device may output multiple classification results including documents, slides, food, snow scenes, sunrise / sunset, etc. The electronic device may determine how to set the image acquisition parameters based on the confidence level corresponding to each result.
[0122] In the disclosed embodiment, for the recognition result of the associated focus scene, the electronic device uses the focus scene whose confidence meets the first confidence condition as the target focus scene. For example, when there are multiple recognition results of the associated focus scene, the focus scene with the highest confidence is used as the target focus scene. It should be noted that when there is only one recognition result of the associated focus scene, the electronic device can use the only focus scene as the target focus scene.
[0123] In the embodiment of the present disclosure, different scene classification scenarios are concerned with different screen debugging requirements, as shown in the following Table 1:
[0124] Table 1
[0125]
[0126] For example, when debugging automatic exposure, you may focus on scenes with strong integrity, such as cloudy days and sunsets; when debugging white balance, you may focus on scenes that are sensitive to colors, such as wood grain and red flowers; other task requirements (filter styles) may focus on categories such as green plants, food, and the moon. Scene recognition tasks are often complex, and the same scene may have multiple categories with relatively high confidence. In order to prevent the output results of a single picture requirement from being interfered with by other results, the disclosed embodiment divides the output results of the task based on the picture debugging requirements, and further filters out the target picture scenes corresponding to the picture debugging requirements based on the confidence.
[0127] As shown in Table 1 above, taking the automatic exposure picture debugging requirement as an example, the picture scene set corresponding to the automatic exposure picture debugging requirement includes 6 scenes in total. Figure 3According to the confidences corresponding to different recognition results in the multi-classification recognition results of the associated picture classification identified by L1, the embodiment of the present disclosure can select the picture scene that meets the second confidence condition as the target picture scene according to the confidences corresponding to the six scenes. For example, the picture scene with the highest confidence is selected as the target picture scene.
[0128] It should be noted that, in the embodiment of the present disclosure, the second confidence conditions corresponding to different screen debugging requirements may be different. In addition, when there is only one recognition result corresponding to the screen debugging requirement, the electronic device may use the only screen scene as the target screen scene.
[0129] After the target focus scene and the target screen scene are determined based on the multi-task scene recognition model, the disclosed embodiment can determine the focus parameters according to the target focus scene, and can determine the acquisition parameters corresponding to the screen debugging requirements according to the target screen scene. Among them, the focus parameters are as described above, and this formula embodiment illustrates the acquisition parameters based on different screen debugging requirements.
[0130] In some embodiments, the image debugging requirement is an automatic white balance requirement, and the corresponding acquisition parameters are white balance parameters; in other embodiments, the image debugging requirement is a filter style requirement, and the corresponding acquisition parameters may include one or more of focus parameters, white balance parameters, automatic exposure parameters, etc.
[0131] After determining the focus parameters and acquisition parameters, the disclosed embodiment can determine the target photographing parameters according to the focus parameters and / or acquisition parameters to assist the electronic device in taking photos. It should be noted that in the disclosed embodiment, when the screen debugging requirement is a filter style requirement, the target photographing parameters can be determined only according to the acquisition parameters corresponding to the screen debugging requirement; when the screen debugging requirement is automatic white balance, the focus parameters and acquisition parameters can be combined to determine the target photographing parameters. The disclosed embodiment does not limit the use of the focus parameters and acquisition parameters.
[0132] It can be understood that in the embodiments of the present disclosure, the electronic device outputs separate recognition results for different debugging tasks (such as focusing tasks and tasks with different screen debugging requirements), so that the accuracy of a single task is not affected by other tasks and the intelligence is better.
[0133] In some embodiments, the motion information includes multiple angular velocities within a preset time period, the preview image includes multiple preview images within the preset time period, and determining the stability of the shooting scene according to the preview image and / or the motion information includes:
[0134] determining a difference between the preview images in the plurality of preview images, and a change in angular velocity;
[0135] Based on the difference between the preview images and / or the change in angular velocity, the stability of the captured scene is determined.
[0136] In an embodiment of the present disclosure, the electronic device determines the stability of the shooting scene based on multiple preview images and / or multiple angular velocities. When determining the stability of the shooting scene based on multiple preview images, the difference between the preview images is determined, for example, a histogram of each preview image is obtained, and the stability of the shooting scene is determined based on the difference between the histograms. Exemplarily, in an embodiment of the present disclosure, the difference between the number of pixels corresponding to the same pixel value in the histograms corresponding to different preview images can be counted, and the difference between the preview images can be determined based on the difference between the number of pixels corresponding to each pixel value.
[0137] In the embodiments of the present disclosure, the difference between the preview images may include a degree of difference, and the degree of difference may be continuous stability, continuous change, etc. Exemplarily, the electronic device may determine whether it is continuous stability or continuous change based on the number of differences in the number of pixels corresponding to each pixel value and / or the size of the difference between the numbers of pixels. In some embodiments, the electronic device may determine continuous change when the number of pixel values with differences in the number of pixels corresponding to the pixel values is greater than a number threshold and / or the difference between the numbers of pixels is greater than a preset difference threshold; and determine continuous stability when the number of pixel values with differences in the number of pixels corresponding to the pixel values is less than or equal to the number threshold and / or the difference between the numbers of pixels is less than or equal to the preset difference threshold.
[0138] In the embodiments of the present disclosure, the change in angular velocity may include a change trend and / or a change amplitude. The change trend may include continuously increasing, continuously decreasing, or continuously stable, etc. The change amplitude may include whether the angular velocity is greater than or less than an angular velocity threshold, etc. In addition, the change in angular velocity may also be whether the angular velocity is continuously greater than or less than an angular velocity threshold.
[0139] In the disclosed embodiment, when the electronic device determines the stability of the captured scene according to the difference between the preview images and / or the change of the angular velocity, it may determine it according to one or more of the difference degree of the preview images, the change trend of the angular velocity, and the change amplitude of the angular velocity.
[0140] It can be understood that due to the different stability levels of the shooting scenes, the collected preview images and angular velocities may change. Therefore, in the embodiment of the present disclosure, the electronic device determines the stability level of the shooting scene based on the differences between multiple preview images and the changes in multiple angular velocities, which is intuitive and effective.
[0141] In some embodiments, determining the stability of the captured scene according to the difference between the preview images and / or the change in angular velocity includes:
[0142] When the difference between the preview images is less than a first preset threshold value and the angular velocity satisfies a preset first condition, it is determined that the shooting scene is at a first stability level; wherein the preset first condition includes: the duration of the angular velocity being less than the first preset angular velocity threshold value is greater than a first preset duration, and / or the number of times the angular velocity is less than the first preset angular velocity threshold value is greater than a first preset number of times;
[0143] When the degree of difference between the preview images is greater than or equal to the first preset degree threshold, and / or the difference between the angular velocities satisfies a preset second condition, it is determined that the shooting scene is at a second stability degree; wherein the preset second condition includes: the duration of the difference between the angular velocities within the preset difference range is greater than a second preset duration, and / or the number of times the difference between the angular velocities is within the preset difference range is greater than a second preset number of times;
[0144] In the case where the angular velocity satisfies a preset third condition, determining that the shooting scene is at a third stability level; wherein the preset third condition includes: the duration for which the angular velocity is greater than the second preset angular velocity threshold is greater than a third preset duration, and / or the number of times the angular velocity is greater than the second preset angular velocity threshold is greater than a third preset number of times;
[0145] Among them, the second preset angular velocity threshold is greater than the first preset angular velocity threshold, the first stability level is greater than the second stability level, and the second stability level is greater than the third stability level.
[0146] In the embodiment of the present disclosure, the difference between the preview images is less than the first preset threshold, for example, the histogram is stable; the duration of the angular velocity being less than the first preset angular velocity threshold is greater than the first preset duration, and / or the number of times the angular velocity is less than the first preset angular velocity threshold is greater than the first preset number of times, for example, the angular velocity continues to be at a minimum value. In this case, it is determined that the shooting scene is at the first stability level. Since the difference between different preview images is small only when the electronic device is stable and the shooting object is stable, and the angular velocity will also continue to be small, it can be understood that the first stability level represents a relatively stable state between the electronic device and the shooting object.
[0147] In the embodiment of the present disclosure, the difference between the preview images is greater than or equal to the first preset threshold, which may be because the user is holding the electronic device to find a shooting scene or switching the subject. In this case, the angular velocity may also change, but in the case of finding a shooting scene, the angular velocity will not change particularly significantly. Therefore, in the embodiment of the present disclosure, when the difference between the preview images is greater than or equal to the first preset threshold, and / or the difference between the angular velocities remains stable, for example, the duration of the difference between the angular velocities within the preset difference range is greater than the second preset duration, and / or the number of times the difference between the angular velocities is within the preset difference range is greater than the second preset number of times, it is determined that the shooting scene is at the second stability level, the second stability level is lower than the first stability level, and the second stability level can represent the state of scene change.
[0148] In the embodiment of the present disclosure, the duration that the angular velocity is greater than the second preset angular velocity threshold is greater than the third preset duration, and / or the number of times that the angular velocity is greater than the second preset angular velocity threshold is greater than the third preset number of times, which may be a continuous maximum angular velocity value. In this case, the user may be shaking the electronic device violently, and at this time, it is determined that the shooting scene is at the third stability level. In the embodiment of the present disclosure, the third stability level is lower than the second stability level, and the third stability level can characterize the state of violent shaking. Considering that in the state of violent shaking, there may still be a fixed background in the preview image, for example, the user shakes the handheld device back and forth, or the subject shakes back and forth, when the shaking amplitude is not large, the fixed background may still exist in each image. In this case, the difference between the preview images may not be large, so the embodiment of the present disclosure does not consider the difference between the preview images when determining the third stability level.
[0149] It should be noted that in the embodiments of the present disclosure, the first preset degree threshold, the first preset angular velocity threshold, the second preset angular velocity threshold, the first preset duration, the second preset duration, the third preset duration, the first preset number of times, the second preset number of times, the third preset number of times and the preset difference range can all be obtained by testing in an experimental environment.
[0150] Since the electronic device needs to go through an intermediate state when changing from a stable state to a violently shaking state, that is, a state in which the electronic device or the subject moves slightly, the switching between different states in the embodiments of the present disclosure can be represented by a finite state machine, and the intermediate state can correspond to the scene change state represented by the second stability level in the embodiments of the present disclosure.
[0151] Figure 4 is an example diagram of switching between states represented by different stability levels in an embodiment of the present disclosure, Figure 4In the figure, the stable state corresponds to the first stability level, the scene change corresponds to the second stability level, and the violent shaking corresponds to the third stability level. When switching from the stable state to the scene change state, the image histogram changes continuously, that is, there are differences between the preview images; when switching from the violent shaking state to the scene change state, the angular velocity value is continuously stable, that is, the difference between the angular velocities continues to remain within the preset difference range. When switching from the scene change to the stable state, the angular velocity value is continuously extremely small and the histogram is stable, that is, the difference between the preview images is less than the first preset degree threshold, and the angular velocity is continuously less than the first preset angular velocity threshold. When switching from the scene change to the violent shaking state, the angular velocity is continuously too large, that is, the angular velocity is continuously greater than the second preset angular velocity threshold.
[0152] In the disclosed embodiment, the stability of the shooting scene is subdivided based on the difference between the preview images and the change of angular velocity. The solution is simple and the power consumption is low.
[0153] It should be noted that in the above method of the specific implementation mode, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0154] Figure 5 is an example diagram of a shooting scene recognition device in an embodiment of the present disclosure, referring to Figure 5 , the device comprises:
[0155] A first acquisition module 101 is configured to acquire a plurality of preview images captured by an electronic device and motion information of the electronic device during the process of capturing the plurality of preview images;
[0156] A first determination module 102, configured to determine the stability of the shooting scene according to the plurality of preview images and / or the motion information;
[0157] The identification module 103 is configured to identify the shooting scene of the electronic device according to the frequency corresponding to the stability degree of the shooting scene.
[0158] In some embodiments, the identification module 103 is further configured to determine a target frequency corresponding to the stability of the shooting scene according to a preset correspondence relationship in response to the stability of the shooting scene being greater than a preset stability threshold; wherein the stability of the shooting scene in the preset correspondence relationship is negatively correlated with the frequency; and identify the shooting scene of the electronic device at the target frequency.
[0159] In some embodiments, the apparatus further comprises:
[0160] The prohibition module 104 is configured to prohibit the recognition of the shooting scene of the electronic device in response to the stability of the shooting scene being less than or equal to the preset stability threshold.
[0161] In some embodiments, the recognition module 103 is further configured to call a multi-task scene recognition model at a frequency corresponding to the stability of the shooting scene to obtain a recognition result of the shooting scene corresponding to each frequency call; wherein the multi-task scene recognition model is obtained by training a multi-task neural network model.
[0162] In some embodiments, the apparatus further comprises:
[0163] A second acquisition module 105 is configured to acquire a shooting instruction;
[0164] The second determination module 106 is configured to determine the target recognition result of the shooting scene based on the recognition result of the shooting scene whose time difference between the recognition time and the acquisition time of the shooting instruction is less than a preset time length threshold among the recognition results of each shooting scene recognized according to the frequency;
[0165] The third determination module 107 is configured to determine target photographing parameters according to the target recognition result of the photographing scene.
[0166] In some embodiments, the target recognition result of the shooting scene includes: a scene recognition result of an associated focus and a scene recognition result of an associated screen display, each recognition result corresponding to a confidence level; the third determination module 107 is further configured to use the focus scene whose confidence level satisfies a first confidence level condition in the scene recognition result of the associated focus as a target focus scene; according to a set of screen scenes corresponding to a preset screen debugging requirement, use the screen scenes in the scene recognition result of the associated screen display that belong to the screen scene set and whose confidence level satisfies a second confidence level condition corresponding to the screen debugging requirement as the target screen scene; determine the focus parameters according to the target focus scene; determine the acquisition parameters corresponding to the screen debugging requirement according to the target screen scene; and determine the target shooting parameters according to the focus parameters and / or the acquisition parameters.
[0167] In some embodiments, the apparatus further comprises:
[0168] The calling module 108 is configured to call the multi-task scene recognition model using an independent thread.
[0169] In some embodiments, the motion information includes multiple angular velocities within a preset time length, the preview image includes multiple preview images within the preset time length, and the first determination module 102 is further configured to determine the difference between the preview images in the multiple preview images, and the change in angular velocity; determine the stability of the shooting scene based on the difference between the preview images and / or the change in angular velocity.
[0170] In some embodiments, the first determination module 102 is further configured to determine that the shooting scene is at a first stability level when the difference between the preview images is less than a first preset threshold and the angular velocity satisfies a preset first condition; wherein the preset first condition includes: the duration of the angular velocity being less than the first preset angular velocity threshold being greater than the first preset duration, and / or the number of times the angular velocity is less than the first preset angular velocity threshold being greater than a first preset number of times; and when the difference between the preview images is greater than or equal to the first preset threshold and / or the difference between the angular velocities satisfies a preset second condition, determine that the shooting scene is at a second stability level; wherein the preset second condition includes: the angular velocity being less than the first preset threshold The duration of the difference between the speeds within the preset difference range is greater than a second preset duration, and / or the number of times the difference between the angular velocities is within the preset difference range is greater than a second preset number of times; under the circumstance that the angular velocity satisfies a preset third condition, it is determined that the shooting scene is at a third stability level; wherein the preset third condition includes: the duration of the angular velocity greater than the second preset angular velocity threshold is greater than a third preset duration, and / or the number of times the angular velocity greater than the second preset angular velocity threshold is greater than a third preset number of times; wherein the second preset angular velocity threshold is greater than the first preset angular velocity threshold, the first stability level is greater than the second stability level, and the second stability level is greater than the third stability level.
[0171] about Figure 5 The specific manner in which each module performs operations in the device in the illustrated embodiment has been described in detail in the embodiment of the method, and will not be elaborated on here.
[0172] Figure 6 8 is a block diagram of a device apparatus 800 according to an exemplary embodiment. For example, the device 800 may be a smart phone or a camera.
[0173] Reference Figure 6 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0174] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0175] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0176] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0177] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0178] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0179] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0180] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0181] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as Wi-Fi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0182] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0183] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0184] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the aforementioned shooting scene recognition method.
[0185] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims above.
[0186] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A shooting scene recognition method, characterized in that: The method comprises: Acquire a plurality of preview images captured by the electronic device and motion information of the electronic device during the process of capturing the plurality of preview images; Determining a stability level of the shooting scene according to the plurality of preview images and / or the motion information; The shooting scene of the electronic device is identified according to the frequency corresponding to the stability degree of the shooting scene.
2. The method according to claim 1, characterized in that The identifying the shooting scene of the electronic device according to the frequency corresponding to the stability of the shooting scene includes: In response to the stability of the shooting scene being greater than a preset stability threshold, determining a target frequency corresponding to the stability of the shooting scene according to a preset corresponding relationship; wherein the stability of the shooting scene in the preset corresponding relationship is negatively correlated with the frequency; A shooting scene of the electronic device is identified at the target frequency.
3. The method according to claim 2, characterized in that The method further comprises: In response to the stability of the shooting scene being less than or equal to the preset stability threshold, identifying the shooting scene of the electronic device is prohibited.
4. The method according to claim 1, characterized in that: The identifying the shooting scene according to the frequency corresponding to the stability of the shooting scene includes: The multi-task scene recognition model is called at a frequency corresponding to the stability of the shooting scene to obtain a recognition result of the shooting scene corresponding to each frequency call; wherein the multi-task scene recognition model is obtained by training a multi-task neural network model.
5. The method according to claim 1 or 4, characterized in that: The method further comprises: Get shooting instructions; Determine a target recognition result of the shooting scene based on a recognition result of the shooting scene whose time difference between the recognition time and the acquisition time of the shooting instruction is less than a preset time threshold among the recognition results of each shooting scene recognized according to the frequency; The target photographing parameters are determined according to the target recognition result of the photographing scene.
6. The method according to claim 5, characterized in that The target recognition result of the shooting scene includes: a scene recognition result associated with focus and a scene recognition result associated with screen display, each recognition result corresponds to a confidence level; and determining the target shooting parameter according to the target recognition result of the shooting scene includes: In the associated focus scene recognition results, a focus scene whose confidence level satisfies a first confidence level condition is used as a target focus scene; According to a preset screen scene set corresponding to the screen debugging requirement, a screen scene in the scene recognition result displayed on the associated screen that belongs to the screen scene set and whose confidence meets a second confidence condition corresponding to the screen debugging requirement is used as a target screen scene; Determining focus parameters according to the target focus scene; Determine the acquisition parameters corresponding to the picture debugging requirements according to the target picture scene; The target photographing parameter is determined according to the focusing parameter and / or the acquisition parameter.
7. The method according to claim 4, characterized in that The method further comprises: The multi-task scene recognition model is called by using an independent thread.
8. The method according to claim 1, characterized in that The motion information includes a plurality of angular velocities within a preset time period, the preview image includes a plurality of preview images within the preset time period, and determining the stability of the shooting scene according to the preview image and / or the motion information includes: determining a difference between the preview images in the plurality of preview images, and a change in angular velocity; Based on the difference between the preview images and / or the change in angular velocity, the stability of the captured scene is determined.
9. The method according to claim 8, characterized in that The step of determining the stability of the shooting scene according to the difference between the preview images and / or the change of the angular velocity includes: When the difference between the preview images is less than a first preset threshold value and the angular velocity satisfies a preset first condition, it is determined that the shooting scene is at a first stability level; wherein the preset first condition includes: the duration of the angular velocity being less than the first preset angular velocity threshold value is greater than a first preset duration, and / or the number of times the angular velocity is less than the first preset angular velocity threshold value is greater than a first preset number of times; When the degree of difference between the preview images is greater than or equal to the first preset degree threshold, and / or the difference between the angular velocities satisfies a preset second condition, it is determined that the shooting scene is at a second stability degree; wherein the preset second condition includes: the duration of the difference between the angular velocities within the preset difference range is greater than a second preset duration, and / or the number of times the difference between the angular velocities is within the preset difference range is greater than a second preset number of times; When the angular velocity satisfies a preset third condition, determining that the shooting scene is at a third stability level; wherein the preset third condition includes: the duration during which the angular velocity is greater than the second preset angular velocity threshold is greater than a third preset duration, and / or the number of times the angular velocity is greater than the second preset angular velocity threshold is greater than a third preset number of times; Among them, the second preset angular velocity threshold is greater than the first preset angular velocity threshold, the first stability level is greater than the second stability level, and the second stability level is greater than the third stability level.
10. A shooting scene recognition device, characterized in that: The device comprises: A first acquisition module is configured to acquire a plurality of preview images captured by the electronic device and motion information of the electronic device during the process of capturing the plurality of preview images; A first determination module, configured to determine the stability of the shooting scene according to the plurality of preview images and / or the motion information; The recognition module is configured to recognize the shooting scene of the electronic device according to the frequency corresponding to the stability degree of the shooting scene.
11. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the shooting scene recognition method according to any one of claims 1 to 9.
12. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor in an electronic device, the electronic device is enabled to execute the shooting scene recognition method according to any one of claims 1 to 9.
Citation Information
Cited By
Double-click gesture recognition method based on infrared intensity change
CN120375591A