Object recognition method, apparatus, electronic device, and computer storage medium

By configuring the zoom factor and autofocus parameters, switching the terminal camera device to call up the macro function camera device, the problem of blurry object recognition by the virtual camera is solved, and clear focus and efficient recognition are achieved.

CN116320743BActive Publication Date: 2026-03-20TAOBAO CHINA SOFTWARE

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In existing technologies, when using a virtual camera to scan an object to be identified, the macro function of the terminal's camera device cannot be effectively utilized, resulting in a blurry object that cannot be clearly focused.

Method used

By configuring the zoom factor and autofocus parameters, the terminal's camera device can be switched to call a camera device with macro function for focusing, thereby realizing the switching between camera devices and utilizing the macro function of multiple camera devices for focusing.

Benefits of technology

It achieves clear focus on the object to be identified in the application, improving the clarity and accuracy of object recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116320743B_ABST
    Figure CN116320743B_ABST
Patent Text Reader

Abstract

The application provides an object recognition method and device, electronic equipment and computer storage medium. In the method, the virtual lens in the target application can call the camera of the terminal. Based on the calling operation, the zoom coefficient for zooming the camera of the terminal can be configured according to the focusing parameter information of the camera of the terminal. The zoom coefficient is a parameter for indicating the focusing setting of the camera with a macro function in the terminal. After the zoom coefficient for zooming the camera of the terminal is configured, the camera of the terminal is called to recognize the object to be recognized based on the zoom coefficient. In the actual process, the zoom coefficient for indicating the camera with a macro function in the terminal can realize the switching between the cameras, so that the camera with a macro function in the terminal can be called for focusing, and the object to be recognized can be clearly focused when the object to be recognized is recognized in the application.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to an object recognition method and device, electronic equipment and computer storage medium. BACKGROUND

[0002] With the rapid development of image technology, image recognition has become particularly important. Specifically, the object to be recognized can be scanned in the application. The scanning is actually scanning the object to be recognized by using the virtual camera in the application.

[0003] However, when scanning the object to be recognized, it is generally done under macro conditions, which may cause the scanned object to be recognized to be blurred in most cases, that is, the object to be recognized cannot be focused, and thus the object in the object to be recognized cannot be recognized. Therefore, how to clearly focus the object to be recognized in the application has become a technical problem to be solved. SUMMARY

[0004] The present application provides an object recognition method to solve the problem of how to clearly focus the object to be recognized in the application. The present application also provides an object recognition device, electronic equipment and computer storage medium.

[0005] The present application provides an object recognition method, comprising:

[0006] In response to detecting the calling operation of the virtual camera in the target application to the camera device of the terminal, configuring a zoom coefficient for zooming the camera device of the terminal according to the focusing parameter information of the camera device of the terminal; the zoom coefficient is a parameter set for switching the camera device in the terminal to call the camera device with macro function for focusing;

[0007] Based on the zoom coefficient, calling the camera device of the terminal to recognize the object to be recognized.

[0008] Optionally, it further comprises configuring an auto-focusing parameter for zooming the camera device of the terminal;

[0009] The calling of the camera device of the terminal to recognize the object to be recognized based on the zoom coefficient comprises:

[0010] Based on the zoom coefficient and the auto-focusing parameter, calling the camera device of the terminal to recognize the object to be recognized.

[0011] Optionally, it further comprises:

[0012] Judging whether the switch controlling the macro function is in the open state;

[0013] If the switch controlling the macro function is in the open state, the configuring the zoom coefficient for zooming the camera of the terminal according to the focus parameter information of the camera of the terminal comprises invoking a first interface to configure the zoom coefficient for zooming the camera of the terminal.

[0014] If the switch controlling the macro function is in the closed state, the configuring the zoom coefficient for zooming the camera of the terminal according to the focus parameter information of the camera of the terminal comprises invoking a second interface to configure the zoom coefficient for zooming the camera of the terminal.

[0015] Optionally, before the configuring the zoom coefficient for zooming the camera of the terminal according to the focus parameter information of the camera of the terminal, the method further comprises:

[0016] creating a virtual camera in the target application, the virtual camera corresponding to the camera of the terminal;

[0017] initializing parameters of the virtual camera to obtain first output result information of the virtual camera;

[0018] configuring camera parameters of the camera of the terminal, adjusting the first output result information according to the configured camera parameters to obtain second output result information;

[0019] performing visual conversion on the second output result information to obtain visual result information corresponding to the second output result information.

[0020] Optionally, the configuring the zoom coefficient for zooming the camera of the terminal according to the focus parameter information of the camera of the terminal comprises:

[0021] configuring a zoom coefficient for zooming the virtual camera according to the visual result information and the focus parameter information of the camera of the terminal.

[0022] Optionally, after the configuring the zoom coefficient for zooming the virtual camera, the method further comprises:

[0023] judging whether the virtual camera currently adopts a target recognition scenario;

[0024] if the virtual camera currently adopts the target recognition scenario, focusing on a to-be-recognized object using a manual focusing mode and configuring a manual zoom parameter; and if the virtual camera currently does not adopt the target recognition scenario, resetting a value of the zoom coefficient.

[0025] Optionally, the calling the camera device of the terminal to identify the to-be-identified object based on the zoom factor and the auto-focusing parameter comprises:

[0026] determining calling sequence information and zoom time information of the camera device based on the zoom factor and the auto-focusing parameter; the calling sequence information and the zoom time information of the camera device are zoom information involved in zooming of the camera device of the terminal in the process of identifying the to-be-identified object;

[0027] calling the camera device of the terminal to identify the to-be-identified object according to the calling sequence information of the camera device and the zoom time information.

[0028] Optionally, the method further comprises: obtaining system version information of the terminal.

[0029] the calling the camera device of the terminal to identify the to-be-identified object according to the calling sequence information of the camera device and the zoom time information, comprises:

[0030] calling the camera device of the terminal to identify the to-be-identified object according to the system version information, the calling sequence information of the camera device and the zoom time information.

[0031] Optionally, the calling the camera device of the terminal to identify the to-be-identified object according to the system version information, the calling sequence information of the camera device and the zoom time information, comprises:

[0032] determining whether the system version information satisfies a first preset condition;

[0033] if the system version information satisfies the first preset condition, calling the camera device of the terminal to identify the to-be-identified object based on a preset calling strategy corresponding to the first preset condition, the calling sequence information of the camera device and the zoom time information;

[0034] if the system version information does not satisfy the first preset condition, calling the camera device of the terminal to identify the to-be-identified object based on a preset calling strategy corresponding to a second preset condition, the calling sequence information of the camera device and the zoom time information.

[0035] Optionally, before determining whether the system version information satisfies the first preset condition, the method further comprises:

[0036] determining whether to enable a rear camera device to identify the to-be-identified object;

[0037] if the rear camera device is enabled to identify the to-be-identified object, performing the step of determining whether the system version information satisfies the first preset condition;

[0038] If the rear camera is not enabled to identify the object to be identified, the calling the camera of the terminal to identify the object to be identified according to the system version information, the calling sequence information of the camera and the zooming time information comprises: calling the camera of the terminal to identify the object to be identified based on a preset calling strategy corresponding to the second preset condition, the calling sequence information of the camera and the zooming time information.

[0039] Optionally, the number of the zooming coefficients is one less than the number of the cameras of the terminal called.

[0040] The application provides an object identification device, comprising:

[0041] The configuration unit is configured to, in response to detecting that a virtual camera in a target application calls a camera of a terminal, configure a zooming coefficient for zooming the camera of the terminal according to focus parameter information of the camera of the terminal; the zooming coefficient is a parameter set for switching the camera in the terminal to call a camera with a macro function to focus.

[0042] The calling unit is configured to call the camera of the terminal to identify an object to be identified based on the zooming coefficient.

[0043] The application provides an electronic device, comprising:

[0044] A processor;

[0045] A memory configured to store a computer program, wherein the computer program is run by the processor to execute the object identification method.

[0046] The application provides a computer storage medium, wherein the computer storage medium stores a computer program, and the computer program is run by a processor to execute the object identification method.

[0047] Compared with the prior art, the embodiments of the application have the following advantages:

[0048] This application provides an object recognition method, comprising: responding to a detection of a virtual camera in a target application calling a camera device of a terminal, configuring a zoom factor for zooming the camera device of the terminal according to the focus parameter information of the camera device of the terminal; the zoom factor is a parameter set to indicate switching the calling of the camera device in the terminal to call a camera device with macro function for focusing; and calling the camera device of the terminal to recognize the object to be recognized based on the zoom factor. In this method, when identifying the object to be identified, the virtual camera in the target application calls the terminal's camera device. Based on this call operation, a zoom factor for zooming the terminal's camera device can be configured according to the focusing parameter information of the terminal's camera device. The zoom factor is a parameter set to indicate switching the camera device in the terminal to call a camera device with macro function for focusing. After configuring the zoom factor for zooming the terminal's camera device, the terminal's camera device is called to identify the object to be identified based on the zoom factor. In fact, in this process, based on the zoom factor indicating the calling of the camera device with macro function in the terminal, switching between camera devices can be realized, thereby enabling the macro function of the camera device with macro function in the terminal to be called for focusing, thus enabling clear focusing of the object to be identified when identifying it in the application. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0050] Figure 1 This is a schematic diagram of the first scenario of the object recognition method of this application;

[0051] Figure 1A This is a schematic diagram of a second scenario for the object recognition method of this application;

[0052] Figure 2 A schematic diagram of existing object recognition methods;

[0053] Figure 3 A flowchart of the object recognition method provided in the first embodiment of this application;

[0054] Figure 4 A flowchart for configuring a virtual camera;

[0055] Figure 5 Flowchart for adapting existing virtual camera configurations after adding macro functionality;

[0056] Figure 6 The adaptation flowchart of the camera device of the existing terminal is adapted to increase the macro function;

[0057] Figure 7 The schematic diagram of the object recognition device provided by the second embodiment of the present application is shown.

[0058] Figure 8 The schematic diagram of the electronic device provided by the third embodiment of the present application is shown. DETAILED DESCRIPTION

[0059] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, it will be apparent to one skilled in the art that the present application can be practiced without the specific details set forth in this description. In other instances, well-known methods have not been described in detail in order to avoid obscuring the present application.

[0060] The present application provides an object recognition method, an object recognition device, an electronic device and a computer storage medium. The object recognition method, the object recognition device, the electronic device and the computer storage medium are respectively introduced below through specific embodiments.

[0061] The object recognition method of the present application can be used in various applications that use a virtual camera to identify an object. For example, when using a virtual camera in a shopping application to identify some objects to be identified, the matching goods of the objects to be identified are identified so that the user can order the goods matching the objects to be identified, thereby avoiding the complex process of inputting search information to search for goods. When using a virtual camera to identify and shoot the objects to be identified, the objects to be identified may be shot at close range. In this case, the macro function of the camera is needed to clearly focus on the objects to be identified when shooting the objects to be identified at close range.

[0062] Focal length: The focal length is the distance between the center of the lens (i.e. the camera device) and the clear image formed on the sensor plane. The focal length of the lens determines the size of the image formed on the sensor by the object shot by the lens. The essence of the focal length is the "angle of view". The shorter the focal length, the larger the angle of view; the longer the focal length, the narrower the angle of view.

[0063] Focusing: When the focal plane falls on the imaging plane, the image is the clearest. If the imaging plane is outside the depth of field, the image is blurred. Therefore, sometimes in order to obtain a clear image, focusing needs to be adjusted, which can be manual focusing or automatic focusing.

[0064] Optical zoom: rely on the optical lens structure to achieve zoom. By moving the lens (focal length changes), to enlarge and reduce the object to be photographed, the larger the optical zoom, the farther the object can be photographed. Optical zoom is more common in SLR cameras. In mobile phone cameras, optical zoom is mainly achieved by switching lenses (camera devices).

[0065] Digital zoom: zoom in on a digital photo, such as changing a 10x10 pixel image to a 15x15 pixel image, which looks larger. This is a digital level operation without any optical lens intervention.

[0066] Multi-camera device: In order to achieve more powerful image effects on the terminal (such as a mobile phone), a multi-camera device combination route is adopted. By integrating multiple camera devices with different characteristics on the mobile phone, a variety of shooting effects can be achieved on the mobile phone. When the user operates the zoom in the shooting interface, different image focal lengths are handled by the corresponding camera device. When the focal length transitions, digital zoom and optical zoom are combined for interpolation. In this way, long focal length and short focal length are achieved on the mobile phone. Some wide-angle, large-aperture, depth-of-field, and color lenses are also configured to support powerful and diversified shooting capabilities.

[0067] However, in the existing application, when a virtual camera is used to identify a to-be-identified object, it is assumed that the terminal has multiple camera devices. However, in the process of identifying the to-be-identified object using the virtual camera in the application, only one camera device (the default camera device) can be used to identify the to-be-identified object. In the identification process, the camera device cannot be switched between multiple camera devices to identify the to-be-identified object using multiple camera devices, resulting in the inability to use the macro function of the camera device with the macro function to focus. The reason is that the entire process of identifying the to-be-identified object using the virtual camera in the prior art does not support switching camera devices to identify the to-be-identified object using multiple camera devices.

[0068] In this application, in order to be able to use the macro function of the camera device, in response to detecting a call operation of the virtual camera in the target application for the camera device of the terminal, the zoom coefficient and the auto-focus parameter for zooming the camera device of the terminal are configured according to the focus parameter information of the camera device of the terminal; the zoom coefficient and the auto-focus parameter are parameters set for switching the camera device in the terminal to call the camera device with the macro function to focus; after configuring the zoom coefficient and the auto-focus parameter for zooming the camera device of the terminal, the camera device of the terminal is called to identify the to-be-identified object based on the zoom coefficient and the auto-focus parameter.

[0069] In order to facilitate understanding of the above object identification method, please refer toFigure 1 , which is a first scene schematic diagram of the object recognition method of the present application. In this scene, Figure 1 , which is a corresponding actual rendering effect diagram of the object recognition method. In order to compare the difference in recognition effect between the method of the present application and the existing object recognition method, please refer to Figure 2 , which is a schematic diagram of the existing object recognition method. Since the existing object recognition method cannot utilize the macro function of the camera device of the terminal, the recognition effect of the recognized object in the rendering effect is relatively blurred.

[0070] In the present application, since the parameter for indicating the switching of the camera device in the terminal to call the camera device with macro function for focusing is pre-selected, when the camera device of the terminal is called by the virtual camera in the target application during the subsequent process of recognizing the object to be recognized, the camera device of the terminal can be switched to recognize the object to be recognized based on the zoom coefficient and the auto-focusing parameter.

[0071] In the above-mentioned scene, the above-mentioned object to be recognized can be an objective object existing in reality, i.e. using a virtual camera to recognize an objective object. For example, flowers, birds, fish, insects, people, objects, etc. can be recognized. Of course, the object to be recognized can also be an image.

[0072] In order to facilitate understanding of the above-mentioned object recognition method, please refer to Figure 1A , which is a second scene schematic diagram of the object recognition method of the present application. In this scene, taking the execution of the object recognition method on the server side as an example, the server side is a computing device for providing data processing, storage and other services for user terminals. Generally, the server side can refer to a server or a server cluster. The user terminal is generally an electronic device that is convenient for the user to directly operate.

[0073] In the present application, specifically, please refer to Figure 1A , the server side obtains the request message provided by the user terminal for calling multiple camera devices for focusing under macro conditions in the target application, and then based on the request message, according to the focusing parameter information of the camera device of the terminal, the zoom coefficient for zooming the camera device of the terminal is configured; the zoom coefficient is a parameter for indicating the switching of the camera device in the terminal to call the camera device with macro function for focusing; then, based on the zoom coefficient, the camera device of the terminal is called to recognize the object to be recognized, and the recognition result of the object to be recognized is obtained; finally, the recognition result of the object to be recognized is provided to the user terminal, so that the user terminal renders the recognition result of the object to be recognized on the page of the target application.

[0074] The above-mentioned Figure 1 , Figure 1AThe object recognition method provided in the first embodiment of the present application is illustrated in the following flowchart.

[0075] First embodiment

[0076] The object recognition method provided in the first embodiment of the present application is illustrated in the following flowchart. Figure 3 The application scenarios of the object recognition method provided in the first embodiment of the present application are not limited in the first embodiment of the present application. The application scenarios of the object recognition method provided in the first embodiment of the present application are only one of the application scenarios of the object recognition method provided in the present application, and the purpose of providing the application scenario is to facilitate the understanding of the object recognition method provided in the present application, but not to limit the object recognition method provided in the present application. The other application scenarios of the object recognition method provided in the first embodiment of the present application are not described herein.

[0077] The object recognition method provided in the first embodiment of the present application is illustrated in the following flowchart. Figure 3 The object recognition method provided in the first embodiment of the present application is illustrated in the following flowchart.

[0078] The object recognition method provided in the first embodiment of the present application is illustrated in the following flowchart.

[0079] Step S301: In response to detecting the calling operation of the virtual camera in the target application to the camera device of the terminal, configuring a zoom coefficient for zooming the camera device of the terminal according to the focusing parameter information of the camera device of the terminal.

[0080] In the first embodiment of the present application, in order to enable clear focusing on the to-be-recognized object under the macro condition, when the virtual camera in the target application calls the camera device of the terminal, the zoom coefficient for zooming the camera device of the terminal is configured according to the focusing parameter information of the camera device of the terminal. The zoom coefficient is a parameter for indicating the switching of the called camera device in the terminal to call the camera device with the macro function for focusing. At the same time, the automatic focusing parameter for zooming the camera device of the terminal is configured.

[0081] In the camera device of the terminal system, the focus parameter information of different camera devices is different. Some camera devices can be wide-angle camera devices, some camera devices can be super wide-angle camera devices, and some camera devices can be long-focus camera devices. In order to utilize the macro function of the camera device for focusing in the process of identifying the to-be-identified object, the zoom coefficient and the auto-focusing parameter for zooming the camera device of the terminal can be configured based on the wide-angle function, the super wide-angle function and the long-focus function of the camera device. The auto-focusing parameter includes the auto-focusing mode and the time interval information of auto-focusing. In fact, the camera device with the super wide-angle function can provide better macro function. In the embodiment, the macro function refers to shooting an object close to the lens, that is, the close-up shooting capability of the lens.

[0082] In the embodiment, the zoom coefficient and the auto-focusing parameter are parameters set for switching and calling the camera device in the terminal to call the camera device with the macro function. The zoom coefficient, that is, the focusing coefficient, is mainly used to change the focal length of the camera device to obtain a clear image. For example, when multiple camera devices (mainly referring to lenses) in the terminal are used for shooting, if each camera device corresponds to a certain focal length, the camera device has the auto-focusing parameter (including the auto-focusing mode and the time interval information of auto-focusing) corresponding to it, and the zoom coefficient is mainly used to switch and call multiple camera devices. For example, when the focus parameter information corresponding to the first camera device is that the first camera device has long-focus shooting function, and the focus parameter information corresponding to the second camera device is that the second camera device has super wide-angle shooting function, in order to utilize the macro function, the zoom coefficient and the auto-focusing parameter are set to realize the switching between the two camera devices.

[0083] In the embodiment, the macro function of the camera device is considered. In fact, when the camera device of the terminal has the super wide-angle shooting function, the macro function can be well utilized.

[0084] Generally, before the virtual camera calls the camera device of the terminal, the virtual camera needs to be configured in the target application. Specifically, the configuration of the virtual camera can be performed according to the flowchart as shown in FIG. 4. Figure 4 The flowchart for configuring the virtual camera. Figure 4 The flowchart for configuring the virtual camera.

[0085] Firstly, step S401 is performed: a virtual camera is created in the target application, and the virtual camera corresponds to the camera device of the terminal.

[0086] After that, step S402 is performed: the parameters of the virtual camera are initialized to obtain the first output result information of the virtual camera. This step corresponds to the generation of Session AVCaptureSession in the virtual camera configuration, that is, the audio and video capture session. AV, that is, Audio and Video.

[0087] After that, step S403 is performed: the camera shooting parameters of the terminal camera device are configured, and the first output result information is adjusted according to the configured camera shooting parameters to obtain the second output result information. This step corresponds to the generation of Device AVCaptureDevice in the virtual camera configuration, that is, the audio and video capture device (that is, the camera device).

[0088] After that, step S404 is performed: the second output result information is converted into visual result information corresponding to the second output result information. This step corresponds to the generation of Preview AVCaptureVideoPreviewLayer in the virtual camera configuration, that is, the audio and video capture preview layer.

[0089] The reason for obtaining the above visual result information is to facilitate the configuration of the zoom coefficient and the automatic focusing parameter for zooming the virtual camera. In this embodiment, the zoom coefficient and the automatic focusing parameter for zooming the virtual camera can be configured according to the visual result information and the focusing parameter information of the camera device of the terminal. The focusing parameter information of the camera device actually corresponds to the telephoto, wide-angle and ultra-wide-angle functions of the camera device.

[0090] After step S404 is performed, step S405 can be performed: the Session (that is, the session) frame rate and the focusing interval are configured (actually, the zoom coefficient and the automatic focusing parameter for zooming the camera device of the terminal are configured subsequently), and then the Preview (that is, the preview) can be added to the view.

[0091] In practice, the key step of the above process is to generate Device AVCaptureDevice. In the process of image or video capture, AVCaptureDevice can realize the initialization of the camera device and the microphone, and can perform some basic settings of the camera device, such as the basic settings of some parameters such as flash, flashlight, focus, exposure, white balance, etc.

[0092] The original generation Device logic is to call system DevicesWithMediaType (corresponding to the second interface), and this method cannot achieve the purpose when the terminal system is upgraded to a certain version and the multi-camera device on the terminal needs to be automatically switched. According to the API (Application Programming Interface) prompt, the new AVCaptureDeviceDiscoverySession (corresponding to the first interface) needs to be used.

[0093] For the above-mentioned first interface, there are three parameters: DeviceTypes (i.e., device type), MediaType (i.e., media type), and Position (i.e., position). Among them, MediaType is the media type of the device. For example, audio, text, etc. In this embodiment, AVMediaTypeVideo can be selected. Position is whether the camera device uses a front camera or a rear camera. Generally, a rear camera, i.e., AVCaptureDevicePositionBack (i.e., rear audio and video capture device, i.e., rear camera), is mainly used.

[0094] DeviceTypes can obtain the content of the camera device, and at this time, it needs to be selected according to the system version. Since the macro function is mainly used in this application, the acquisition of the ultra-wide-angle function needs to be increased. In this application, the terminal contains at least one wide-angle camera device and one ultra-wide-angle camera device. For terminals that do not contain an ultra-wide-angle camera device, corresponding adaptation can be performed.

[0095] The long-focus, wide-angle, and ultra-wide-angle functions (i.e., the focusing parameter information of the camera device) of the camera device are described below:

[0096] AVCaptureDeviceTypeBuiltInWideAngleCamera, i.e., a wide-angle camera device (the default camera device in the terminal, corresponding to a focal length of about 28 mm); AVCaptureDeviceTypeBuiltInTelephotoCamera, i.e., a telephoto camera device (2 times or 3 times the focal length of the default camera device, invoked using AVCaptureDeviceDiscoverySession); AVCaptureDeviceTypeBuiltInUltraWideCamera, i.e., an ultra-wide-angle camera device (0.5 times the focal length of the default camera device, invoked using AVCaptureDeviceDiscoverySession); AVCaptureDeviceTypeBuiltInDualCamera, i.e., a wide-angle camera device and a telephoto camera device, which can automatically switch between the camera devices, invoked using AVCaptureDeviceDiscoverySession; AVCaptureDeviceTypeBuiltInDualWideCamera, i.e., a wide-angle camera device and an ultra-wide-angle camera device, which can automatically switch between the camera devices, invoked using AVCaptureDeviceDiscoverySession; AVCaptureDeviceTypeBuiltInTripleCamera, i.e., a wide-angle camera device, a telephoto camera device, and an ultra-wide-angle camera device, which can automatically switch between the camera devices, invoked using AVCaptureDeviceDiscoverySession; and AVCaptureDeviceTypeBuiltInTrueDepthCamera, i.e., an infrared camera device, which can obtain depth data.

[0097] The built-in dual camera device in the terminal supports the following functions: automatically switching from one camera device to another when the zoom factor, light level, and focus position permit. Depth data can be generated by measuring the difference between images taken by the ultra-wide-angle and wide-angle camera devices. Photos are transferred from the constituent wide-angle and ultra-wide-angle camera devices through a single photo capture request.

[0098] The automatic switching from one camera device to another when the zoom factor, light level, and focus position permit. Therefore, the conditions required for the automatic switching of the camera device are that the zoom factor, light level, and focus position are within the range required by the terminal system.

[0099] The scene of the order application is shot by using automatic focusing, i.e. the focus position does not need to be set actively, and focusing is performed according to the position of the shot object. The light level can be used in normal environment. Therefore, only the zoom factor (VideoZoomFactor) needs to be determined.

[0100] The zoom factor is a value used to control the cropping and zooming of the image shot by the AVCaptureDevice, and is a coefficient; for example, when the value is 2.0, the size of the image subject is doubled (and the field of view is halved). The value range thereof can be from 1.0 (full field of view) to the value corresponding to the attribute VideoMaxZoomFactor (i.e. the maximum video zoom factor) of the active format AVCaptureDeviceFormat (i.e. the format of the audio / video capture device).

[0101] The AVCaptureDevice realizes the zooming effect by cropping around the center of the image captured by the sensor. At a low zoom factor, the cropped image is equal to or larger than the output size. At a higher zoom factor, the device must scale the cropped image to the output size, resulting in a decrease in image quality. The VideoZoomFactorUpscaleThreshold attribute of the active format AVCaptureDeviceFormat indicates the factor that will be scaled up.

[0102] Therefore, in the embodiment, in order to realize the automatic switching of the above-mentioned multi-camera device (automatic switching between the wide-angle camera device and the ultra-wide-angle camera device), the zoom factor and the automatic focusing parameter need to be set.

[0103] In fact, in order to realize the automatic switching of the camera device, the conditions that need to be met are that the zoom factor, the light level and the focus position are within the range required by the system. Since the scene of the order application is shot by using automatic focusing, i.e. the focus position does not need to be set actively, and focusing is performed according to the position of the shot object. The light level can be used in normal environment. Therefore, only the zoom factor (VideoZoomFactor, i.e. the video zoom factor, i.e. the zoom factor) needs to be determined.

[0104] The zoom factor is a value used to control the cropping and zooming of the image shot by the AVCaptureDevice, and is a coefficient; for example, when the value is 2.0, the size of the image subject is doubled (and the field of view is halved). In fact, when the zoom factor is set, the value range thereof can be from 1.0 (full field of view) to the value corresponding to the attribute VideoMaxZoomFactor (i.e. the maximum video zoom factor) of the active format AVCaptureDeviceFormat (i.e. the format of the audio / video capture device).

[0105] There are mainly two kinds of implementation of setting and verifying the zoom factor:

[0106] In the first implementation, by using the zoom tool of the target application (which can be a subscription application) page, after the Device is obtained by using AVCaptureDeviceTypeBuiltInDualWideCamera, according to the experimental conclusion of the video stream preview content in the range of 1-3.5 of VideoZoomFactor, in the case of automatically setting the focus position and the zoom factor of 2 times, the switching of the camera device occurs: the video is switched from the wide-angle camera device to the ultra-wide-angle camera device at 3 seconds, and is switched from the ultra-wide-angle camera device to the wide-angle camera device at 9 seconds.

[0107] The above-mentioned method adopts the method of parameter adjustment and verification. As a second implementation, there is a method for obtaining the value of VideoZoomFactor in the API of AVCaptureDevice: the field of view of one camera device matches the entire field of view of the next camera device, and the number of video zoom factors used for switching the camera device is always one less than the number of attributes, and the order of the zoom factors is the same as the order of the camera devices listed in the attribute. The number of attributes corresponds to the number of times the camera device is called. By debugging and setting the corresponding values of the attributes, the same conclusion as the first implementation is obtained, but the second implementation is more adaptive.

[0108] In the second implementation, after setting VideoZoomFactor from the Session to the value obtained in the above-mentioned second implementation, setting the auto focus, and setting the appropriate focus time interval, the video of the photographed object is recorded by using the terminal system camera and the virtual camera in the target application in the same scene. It is found that the video recorded by the two methods switches the camera device at the same point (both from the wide-angle camera device to the ultra-wide-angle camera device), and the field of view content after the switching is consistent, thereby verifying the feasibility of the VideoZoomFactor assignment method.

[0109] In this embodiment, after adding the macro function, the existing process of using the virtual camera to identify the target application is affected. In order to ensure the stability of the target application in the process of using the virtual camera to identify, the switch configuration needs to be done, that is, it is necessary to judge whether the switch controlling the macro function is in the open state; at the same time, considering whether the target recognition scene is used in the target application to identify the object, the target recognition scene can be specifically adapted to the recognition scene by using the scan function in the target application.

[0110] Specifically, please refer to Figure 5 which is an adaptation flowchart of adapting the existing configuration virtual camera after adding the macro function.

[0111] Firstly, step S501 is executed: creating a virtual camera in a target application; then, step S502 is executed: judging whether the switch controlling the macro function is in the open state; if yes, step S503 is executed: calling the first interface; if no, step S504 is executed: calling the second interface; the above-mentioned step S503 or step S504 is to call the appropriate interface to configure the zoom coefficient and the auto-focus parameter for zooming the camera device of the terminal.

[0112] After executing step S503 or executing step S504, step S505 is executed: configuring the zoom coefficient and the auto-focus parameter for zooming the camera device of the terminal using the first interface or the second interface.

[0113] Then, step S506 is executed: judging whether the current virtual camera adopts the target recognition scene; if yes, step S507 is executed: focusing on the object to be recognized using the manual zooming mode and configuring the manual zooming parameter; if no, step S508 is executed: resetting the value of the zoom coefficient.

[0114] In the above-mentioned process, the manual zoom coefficient is used to change the field of view of the object in the target recognition scene. If the target recognition scene is not adopted, the value of the zoom coefficient is reset to use the reset value of the zoom coefficient for the next round of object recognition in the target recognition scene.

[0115] Step S302: based on the zoom coefficient, calling the camera device of the terminal to recognize the object to be recognized.

[0116] In fact, based on the zoom coefficient, calling the camera device of the terminal to recognize the object to be recognized can mean: based on the zoom coefficient and the auto-focus parameter, calling the camera device of the terminal to recognize the object to be recognized.

[0117] In this embodiment, as an implementation scheme of calling the camera device of the terminal to recognize the object to be recognized based on the zoom coefficient and the auto-focus parameter, it can be: firstly, based on the zoom coefficient and the auto-focus parameter, determining the calling sequence information and the zoom time information of the camera device; then, according to the calling sequence information and the zoom time information of the camera device, calling the camera device of the terminal to recognize the object to be recognized. The calling sequence information and the zoom time information of the camera device are the zoom information involved in the zooming of the camera device of the terminal in the process of recognizing the object to be recognized.

[0118] For example, when the set zoom factor is 1.2 and the auto-focusing time is the 3rd second of the image recognition, the image recognition is performed using the wide-angle camera device in the 0th-3rd second of the image recognition; when the 3rd second, the image recognition is switched to using the ultra-wide-angle camera device and the recognition field of view range is expanded to 1.2 times; the calling order of the camera device involved in the zooming in the process of recognizing the to-be-recognized object is that the wide-angle camera device is used first and then the ultra-wide-angle camera device is used.

[0119] In the embodiment, the number of zoom factors is one less than the number of times of calling the camera device of the terminal. For example, when the number of times of calling the camera device of the terminal is twice, the wide-angle camera device is called first and the ultra-wide-angle camera device is called second, only one zoom factor 1.2 needs to be set.

[0120] It is mentioned above that for the terminal not containing the ultra-wide-angle camera device, the corresponding adaptation can be performed, and the adaptation mainly considers different terminal models, that is, whether the single camera device, two camera devices, or three camera devices can all use the above object recognition method. For some inapplicable cases, the terminal object recognition method is adjusted through the system version information.

[0121] First, the system corresponding to the terminal obtains which type of camera device (that is, what type of camera device is contained) is called in sequence according to the incoming DeviceTypes list. That is to say, after the appropriate parameters are input, the system can confirm whether the object recognition method is applicable. Secondly, since some enumeration values of DeviceTypes are limited, in particular, for AVCaptureDeviceTypeBuiltInDualWideCamera, it needs to meet certain system version information, so the system version needs to be adapted.

[0122] Since the camera device of some terminals may not contain the ultra-wide-angle camera device, in order to adapt to these cases, in the embodiment, the system version information of the terminal is also obtained. In fact, based on the system version information of the terminal, it can be judged whether the camera device of the terminal contains the ultra-wide-angle camera device.

[0123] Therefore, as one way of calling the camera device of the terminal to recognize the to-be-recognized object according to the calling order information of the camera device and the zoom time information, it can be that the camera device of the terminal is called to recognize the to-be-recognized object according to the system version information, the calling order information of the camera device, and the zoom time information.

[0124] Specifically, please refer to Figure 6 which is an adaptation flowchart of adapting the camera device of the existing terminal after adding the macro function.

[0125] Firstly, step S601 is performed: obtaining the calling sequence of the created camera device; then, step S602 is performed: judging whether to enable the rear camera to identify the object to be identified.

[0126] If the result of step S602 is yes, step S603 is performed: judging whether the system version information meets the first preset condition; if the result of step S603 is yes, step S604 is performed: based on the preset calling strategy corresponding to the first preset condition, the calling sequence information and the zoom time information of the camera device, the camera of the terminal is called to identify the object to be identified; if the result of step S603 is no, step S605 is performed: based on the preset calling strategy corresponding to the second preset condition, the calling sequence information and the zoom time information of the camera device, the camera of the terminal is called to identify the object to be identified.

[0127] At the same time, if the result of step S602 is no, step S605 is also performed: based on the preset calling strategy corresponding to the second preset condition, the calling sequence information and the zoom time information of the camera device, the camera of the terminal is called to identify the object to be identified.

[0128] For example, assuming that the first preset condition is to meet a certain system version, the preset calling strategy corresponding to the first preset condition can be to call the default camera (main camera, such as wide-angle camera) and ultra-wide-angle camera (the default camera and ultra-wide-angle camera can refer to the rear camera); the preset calling strategy corresponding to the second preset condition can be to call the normal camera (for example, it can be the front camera). In fact, when the system version information does not meet the first preset condition, it can be considered that the system version information meets the second preset condition; when the system version information meets the second preset condition, the camera may not have an ultra-wide-angle camera, and thus it cannot use the macro function focus, so only the normal camera is used to identify the object in this process.

[0129] The application provides an object recognition method, comprising: in response to detecting a virtual camera in a target application calling a camera device of a terminal, configuring a zooming coefficient for zooming the camera device of the terminal according to focus parameter information of the camera device of the terminal; the zooming coefficient is a parameter for indicating switching the camera device in the terminal to call a camera device with a macro function to focus; and based on the zooming coefficient, the camera device of the terminal is called to recognize an object to be recognized. In the method, when the object to be recognized is recognized, the virtual camera in the target application can call the camera device of the terminal, and based on the calling operation, the zooming coefficient for zooming the camera device of the terminal can be configured according to the focus parameter information of the camera device of the terminal, the zooming coefficient is a parameter for indicating switching the camera device in the terminal to call the camera device with the macro function to focus; and after the zooming coefficient for zooming the camera device of the terminal is configured, the camera device of the terminal is called to recognize the object to be recognized. In fact, in this process, based on the zooming coefficient for calling the camera device with the macro function in the terminal, the switching between the camera devices can be realized, and then the macro function of the camera device with the macro function in the terminal can be called to focus, and then the object to be recognized can be clearly focused when the object to be recognized is recognized in the application.

[0130] Second embodiment

[0131] Corresponding to the object recognition method provided by the first embodiment of the application, the second embodiment of the application further provides an object recognition device. Since the device embodiment is basically similar to the first embodiment, it is described simply, and the related parts refer to the part of the first embodiment. The device embodiment described below is only illustrative.

[0132] Please refer to Figure 7 which is a schematic diagram of the object recognition device provided by the second embodiment of the application.

[0133] The object recognition device 700 comprises:

[0134] A configuration unit 701 is configured to, in response to detecting a virtual camera in a target application calling a camera device of a terminal, configure a zooming coefficient for zooming the camera device of the terminal according to focus parameter information of the camera device of the terminal; the zooming coefficient is a parameter for indicating switching the camera device in the terminal to call a camera device with a macro function to focus.

[0135] A calling unit 702 is configured to, based on the zooming coefficient, call the camera device of the terminal to recognize an object to be recognized.

[0136] Optionally, the configuration unit is further configured to: configure an auto-focusing parameter for zooming the camera device of the terminal.

[0137] The calling unit is specifically configured to:

[0138] Call the camera device of the terminal to identify the to-be-identified object based on the zooming coefficient and the auto-focusing parameter.

[0139] Optionally, the method further comprises: a first judging unit, which is specifically configured to:

[0140] Judge whether the switch for controlling the macro function is in an open state or not.

[0141] The configuration unit is specifically configured to: if the judging result of the first judging unit is that the switch for controlling the macro function is in the open state, call a first interface to configure a zooming coefficient for zooming the camera device of the terminal.

[0142] If the judging result of the first judging unit is that the switch for controlling the macro function is in the closed state, call a second interface to configure a zooming coefficient for zooming the camera device of the terminal.

[0143] Optionally, the method further comprises: a virtual camera creating unit and a virtual camera parameter setting unit.

[0144] The virtual camera creating unit is specifically configured to: before configuring a zooming coefficient for zooming the camera device of the terminal according to the focusing parameter information of the camera device of the terminal, create a virtual camera in the target application, the virtual camera corresponding to the camera device of the terminal.

[0145] The virtual camera parameter setting unit is specifically configured to: initialize a parameter of the virtual camera to obtain first output result information of the virtual camera; configure a camera parameter of the camera device of the terminal, adjust the first output result information according to the configured camera parameter to obtain second output result information; and convert the second output result information into visual information to obtain visual result information corresponding to the second output result information.

[0146] Optionally, the configuration unit is specifically configured to:

[0147] Configure a zooming coefficient for zooming the virtual camera according to the visual result information and the focusing parameter information of the camera device of the terminal.

[0148] Optionally, the method further comprises: a second judging unit and a subsequent processing unit.

[0149] The second judging unit is configured to judge whether the virtual camera currently adopts a target identification scene after a zooming coefficient configured for zooming the virtual camera.

[0150] The subsequent processing unit is specifically configured to: if the virtual camera currently adopts the target identification scene, focus on the object to be identified in a manual focusing mode and configure a manual zooming parameter; and if the virtual camera currently does not adopt the target identification scene, reset the value of the zooming coefficient.

[0151] Optionally, the calling unit is specifically configured to:

[0152] determine calling sequence information and zooming time information of the camera equipment based on the zooming coefficient and the automatic focusing parameter; the calling sequence information and the zooming time information of the camera equipment are zooming information involved in zooming of the camera equipment of the terminal in the process of identifying the object to be identified;

[0153] call the camera equipment of the terminal to identify the object to be identified according to the calling sequence information of the camera equipment and the zooming time information.

[0154] Optionally, the system version information obtaining unit is further included.

[0155] The system version information obtaining unit is specifically configured to: obtain system version information of the terminal.

[0156] The calling unit is specifically configured to:

[0157] call the camera equipment of the terminal to identify the object to be identified according to the system version information, the calling sequence information of the camera equipment and the zooming time information.

[0158] Optionally, the calling unit is specifically configured to:

[0159] judge whether the system version information satisfies a first preset condition.

[0160] if the system version information satisfies the first preset condition, call the camera equipment of the terminal to identify the object to be identified based on a preset calling strategy corresponding to the first preset condition, the calling sequence information of the camera equipment and the zooming time information;

[0161] if the system version information does not satisfy the first preset condition, call the camera equipment of the terminal to identify the object to be identified based on a preset calling strategy corresponding to a second preset condition, the calling sequence information of the camera equipment and the zooming time information.

[0162] Optionally, the third judging unit is further included.

[0163] The third judgment unit is used to determine whether to enable the rear camera device to identify the object to be identified before determining whether the system version information meets the first preset condition;

[0164] If the judgment result of the third judgment unit is to enable the rear camera device to identify the object to be identified, then the calling unit is specifically used to: perform the step of judging whether the system version information meets the first preset condition;

[0165] If the judgment result of the third judgment unit is that the rear camera device is not enabled to identify the object to be identified, then the calling unit is specifically used to: call the camera device of the terminal to identify the object to be identified based on the preset calling strategy corresponding to the second preset condition, the calling order information of the camera device and the zoom time information.

[0166] Optionally, the number of zoom coefficients is one less than the number of times the camera device of the terminal is invoked.

[0167] Third Embodiment

[0168] Corresponding to the method of the first embodiment of this application, the third embodiment of this application also provides an electronic device.

[0169] like Figure 8 As shown, Figure 8 This is a schematic diagram of an electronic device provided in the third embodiment of this application.

[0170] In this embodiment, an optional hardware structure of the electronic device 800 may be as follows: Figure 8 As shown, it includes: at least one processor 801, at least one memory 802 and at least one communication bus 805; the memory 802 contains a program 803 and data 804.

[0171] Bus 805 can be a communication device for transmitting data between components within electronic device 800, such as an internal bus (e.g., CPU-memory bus, where the processor is the central processing unit, or CPU for short) or an external bus (e.g., a universal serial bus port or a peripheral component interconnection fast port).

[0172] In addition, the electronic device also includes at least one network interface 806, at least one peripheral interface 807. The network interface 806 provides wired or wireless communication related to an external network 808 (for example, the Internet, an intranet, a local area network, a mobile communication network, etc.); in some embodiments, the network interface 806 can include any combination of any number of network interface controllers (English: network interface controller, NIC for short), radio frequency (English: Radio Frequency, RF for short) modules, transponders, transceivers, modems, routers, gateways, wired network adapters, wireless network adapters, Bluetooth adapters, infrared adapters, near field communication (English: Near Field Communication, NFC for short) adapters, cellular network chips, etc.

[0173] The peripheral interface 807 is used to connect with peripherals, which can be peripherals 1 (809) in the figure, peripherals 2 (810) in the figure, and peripherals 3 (811) in the figure. The peripheral is a peripheral device, which can include but is not limited to a cursor control device (for example, a mouse, a touchpad, or a touch screen), a keyboard, a display (for example, a cathode ray tube display, a liquid crystal display, or a light emitting diode display), a video input device (for example, a video camera or an input interface communicatively coupled to a video archive), etc. Figure 8 Figure 8 Figure 8

[0174] The processor 801 can be a CPU, or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present application.

[0175] The memory 802 can include a high-speed RAM memory, and can also include a non-volatile memory, for example, at least one disk memory.

[0176] The processor 801 calls the program and data stored in the memory 802 to execute the method of the first embodiment of the present application.

[0177] Fourth embodiment

[0178] Corresponding to the method of the first embodiment of the present application, the fourth embodiment of the present application also provides a computer storage medium, which stores a computer program, and the computer program is run by a processor to execute the method of the first embodiment of the present application. ​​​

[0179] The application discloses the above-mentioned preferred embodiments, but is not intended to limit the application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the application. Therefore, the protection scope of the application should be defined by the scope of the claims of the application.

[0180] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. The memory can include non-persistent memory in the form of random access memory (RAM) and / or non-volatile memory such as read only memory (ROM) or flash memory, among others, in a computer readable medium. Memory is an example of computer readable media.

[0181] 1. Computer readable media includes permanent and non-permanent, removable and non-removable media can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tape, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. According to the definition in this paper, computer readable media does not include non-transitory computer readable storage media, such as modulated data signals and carriers.

[0182] 2. Those skilled in the art will appreciate that embodiments of the present application can be readily used as a method, a system or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer readable storage media (including, but not limited to, disk memory, CD-ROMs, optical storage devices, etc.) embodying computer readable program code thereon for use by or in connection with an instruction execution system. Such a computer program product can provide any one of the capabilities or functions described herein.

[0183] It should be noted that embodiments of the present application can involve the use of user data. In actual applications, user-specific personal data can be used in the schemes described herein in a manner that complies with applicable laws and regulations of the country in which the application is used (for example, the user has given explicit consent, the user has been effectively notified, etc.), within the scope permitted by applicable laws and regulations.

Claims

1. An object recognition method, characterized in that, include: In response to detecting a virtual camera in the target application calling the terminal's camera device, a zoom factor is configured for zooming the terminal's camera device based on the focus parameter information of the terminal's camera device; the zoom factor is a parameter set to indicate switching the calling of the camera device in the terminal to call a camera device with macro function for focusing; and autofocus parameters are configured for zooming the terminal's camera device. Based on the zoom factor, the terminal's camera device is invoked to identify the object to be identified, including: Based on the zoom factor and the autofocus parameters, determine the calling order information and zoom time information of the camera device; The camera device call sequence information and zoom time information are the zoom information involved when the terminal's camera device zooms during the process of recognizing the object to be recognized; Based on the calling order information of the camera devices and the zoom time information, the camera devices of the terminal are invoked to identify the object to be identified.

2. The method according to claim 1, characterized in that, Also includes: Determine whether the switch controlling the macro function is in the on state; If the switch controlling the macro function is in the on state, the step of configuring the zoom factor for zooming the terminal's camera device according to the focus parameter information of the terminal's camera device includes: calling the first interface to configure the zoom factor for zooming the terminal's camera device. If the switch controlling the macro function is in the off state, configuring the zoom factor for zooming the terminal's camera device according to the focus parameter information of the terminal's camera device includes: calling the second interface to configure the zoom factor for zooming the terminal's camera device.

3. The method according to claim 2, characterized in that, Before configuring the zoom factor for zooming the terminal's camera device based on the focusing parameter information of the terminal's camera device, the method further includes: A virtual camera is created in the target application, and the virtual camera corresponds to the camera device of the terminal; The parameters of the virtual camera are initialized to obtain the first output result information of the virtual camera; Configure the camera parameters of the terminal's camera device, and adjust the first output result information according to the configured camera parameters to obtain the second output result information; The second output result information is visualized to obtain the visualization result information corresponding to the second output result information.

4. The method according to claim 3, characterized in that, The step of configuring a zoom factor for zooming the terminal's camera device based on the focusing parameter information of the terminal's camera device includes: Based on the visualization results and the focus parameters of the terminal's camera device, a zoom factor is configured for zooming the virtual camera.

5. The method according to claim 4, characterized in that, After configuring the zoom factor for zooming the virtual camera, the method further includes: Determine whether the current virtual camera is using a target recognition scenario; If the virtual camera is currently used for a target recognition scenario, then the object to be recognized is focused using manual focus, and the manual zoom parameters are configured; if the virtual camera is not currently used for a target recognition scenario, then the zoom coefficient value is reset.

6. The method according to claim 1, characterized in that, Also includes: Obtain the terminal's system version information; The step of calling the terminal's camera device to identify the object to be identified based on the calling order information of the camera device and the zoom time information includes: Based on the system version information, the calling order information of the camera device, and the zoom time information, the camera device of the terminal is invoked to identify the object to be identified.

7. The method according to claim 6, characterized in that, The step of calling the terminal's camera to identify the object to be identified based on the system version information, the camera device's call order information, and the zoom time information includes: Determine whether the system version information meets the first preset condition; If the system version information meets the first preset condition, then based on the preset calling strategy corresponding to the first preset condition, the calling order information of the camera device and the zoom time information, the camera device of the terminal is called to identify the object to be identified; If the system version information does not meet the first preset condition, then based on the preset calling strategy corresponding to the second preset condition, the calling order information of the camera device, and the zoom time information, the camera device of the terminal is called to identify the object to be identified.

8. The method according to claim 7, characterized in that, Before determining whether the system version information meets the first preset condition, the process also includes: Determine whether to enable the rear camera device to identify the object to be identified; If the rear camera is enabled to identify the object to be identified, then the step of determining whether the system version information meets the first preset condition is executed; If the rear camera is not enabled to identify the object to be identified, then the step of calling the terminal's camera to identify the object to be identified based on the system version information, the camera's call order information, and the zoom time information includes: calling the terminal's camera to identify the object to be identified based on a preset call strategy corresponding to the second preset condition, the camera's call order information, and the zoom time information.

9. The method according to claim 1, characterized in that, The number of zoom coefficients is one less than the number of times the terminal's camera device is invoked.

10. An object recognition device, characterized in that, include: A configuration unit is configured to, in response to detecting a virtual camera in a target application calling a camera device on a terminal, configure a zoom factor for zooming the terminal's camera device based on the focusing parameter information of the terminal's camera device; the zoom factor is a parameter set to indicate switching the calling camera device in the terminal to call a camera device with macro function for focusing; and is also configured to configure autofocus parameters for zooming the terminal's camera device. The calling unit is used to call the camera device of the terminal to identify the object to be identified based on the zoom factor, including: determining the calling order information and zoom time information of the camera device based on the zoom factor and the autofocus parameters; The camera device call order information and zoom time information are the zoom information involved when the terminal's camera device zooms during the process of recognizing the object to be recognized; according to the camera device call order information and the zoom time information, the terminal's camera device is called to recognize the object to be recognized.

11. An electronic device, characterized in that, include: processor; A memory for storing a computer program that is executed by a processor to perform the method described in any one of claims 1-9.

12. A computer storage medium, characterized in that, The computer storage medium stores a computer program that is executed by a processor to perform the method described in any one of claims 1-9.

Citation Information

Patent Citations

  • Video shooting method and device, shooting terminal and storage medium

    CN113473018A

  • Multimedia processing chip, electronic equipment image fusion method and image cutting method

    CN113837937A

Cited By

  • Smart cell zooming - reinforcement learning for energy-saving

    US20260052485A1