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

By combining cameras with different focal lengths for image recognition, the camera with the smaller focal length is used for preliminary identification. If the object to be confirmed is identified, the camera with the larger focal length is switched to take a second picture. This solves the problem of poor accuracy in identifying small targets and improves the accuracy and efficiency of recognition.

CN116894935BActive Publication Date: 2026-02-17HANGZHOU HUACHENG SOFTWARE TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310915311.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-24
Publication Date
2026-02-17
Estimated Expiration
2043-07-24

AI Technical Summary

Technical Problem

In existing technologies, the recognition accuracy of small targets in images is poor after magnification or enhancement processing, which cannot effectively improve the clarity of information about small targets, resulting in high false alarm and false negative rates.

Method used

Object recognition is performed by combining cameras with different focal lengths. First, the camera with the shorter focal length is used for preliminary recognition. If the object to be confirmed is identified, the camera with the longer focal length is switched to retake the picture and re-identify the target area to obtain a clearer image.

Benefits of technology

By using a camera with a larger focal length, the accuracy of small target identification is improved, and the false alarm and false negative rates are reduced, making it particularly suitable for identifying small targets at a distance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116894935B_ABST
    Figure CN116894935B_ABST
Patent Text Reader

Abstract

The application discloses an object recognition method and device, a storage medium and an electronic device. The method comprises the following steps: performing object recognition on a first image captured by a first camera using a first shooting focal length, and obtaining a first recognition result; when the first recognition result indicates that a to-be-confirmed object is recognized in the first image, adjusting a first shooting area captured by a second camera using a second shooting focal length to a target shooting area, the to-be-confirmed object represents a solid object in a three-dimensional space, the solid object is located at a region center of the target shooting area, the second shooting focal length is greater than the first shooting focal length, the first camera and the second camera are the same camera or different cameras; and performing object recognition on a second image captured by the second camera in the target shooting area, and obtaining a second recognition result, the second recognition result is used to indicate whether the to-be-confirmed object is an object of a target type.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

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

[0002] At present, for object recognition in an image, mainly, a neural network high-end algorithm is used to recognize the collected image, and for a small target in the image, mainly, image interpolation magnification or image enhancement processing is used to recognize the small target.

[0003] However, for small target recognition, the above object recognition method does not increase effective image information through magnification or enhancement processing, and the information of the small target is still insufficient. Therefore, the object recognition method in the related art has the problem of poor object recognition accuracy. SUMMARY

[0004] Embodiments of the present application provide an object recognition method and device, a storage medium and an electronic device to at least solve the problem of poor object recognition accuracy in the related art.

[0005] According to an aspect of an embodiment of the present application, an object recognition method is provided, applied to an intelligent device, including: performing object recognition on a first image captured by a first camera using a first shooting focal length to obtain a first recognition result; in a case where the first recognition result indicates that a to-be-confirmed object is recognized in the first image, adjusting a first shooting area captured by a second camera using a second shooting focal length to a target shooting area, wherein the to-be-confirmed object represents a real object in a three-dimensional space, the real object is located at a region center of the target shooting area, the second shooting focal length is greater than the first shooting focal length, the first camera and the second camera are the same camera or different cameras; performing object recognition on a second image captured by the second camera in the target shooting area to obtain a second recognition result, wherein the second recognition result is used to indicate whether the to-be-confirmed object is an object of a target type.

[0006] According to another aspect of the embodiments of the present application, an object recognition apparatus is also provided, applied to a smart device, comprising: a first recognition unit, configured to perform object recognition on a first image captured by a first camera using a first photographing focal length, to obtain a first recognition result; a first adjustment unit, configured to, in a case where the first recognition result indicates that a to-be-confirmed object is recognized in the first image, adjust a first photographing region captured by a second camera using a second photographing focal length to a target photographing region, wherein the to-be-confirmed object represents a solid object in a three-dimensional space, the solid object is located at a region center of the target photographing region, the second photographing focal length is greater than the first photographing focal length, and the first camera and the second camera are the same camera or different cameras; and a second recognition unit, configured to perform object recognition on a second image captured by the second camera in the target photographing region, to obtain a second recognition result, wherein the second recognition result is used to indicate whether the to-be-confirmed object is an object of a target type.

[0007] According to still another aspect of the embodiments of the present application, a computer readable storage medium is also provided, which stores a computer program, wherein the computer program is configured to execute the above object recognition method when running.

[0008] According to still another aspect of the embodiments of the present application, an electronic device is also provided, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the above object recognition method through the computer program.

[0009] In the embodiment of the present application, the object recognition is performed by using cameras with different focal lengths. The first image captured by the first camera with the first focal length is used for object recognition to obtain the first recognition result. If the first recognition result indicates that the object to be confirmed is recognized in the first image, the first shooting area captured by the second camera with the second focal length is adjusted to the target shooting area. The object to be confirmed represents a solid object in the three-dimensional space, and the solid object is located at the center of the target shooting area. The second focal length is greater than the first focal length. The first camera and the second camera are the same camera or different cameras. The second image captured by the second camera in the target shooting area is used for object recognition to obtain the second recognition result. The second recognition result is used to indicate whether the object to be confirmed is a target type of object. Since the shooting range of the first camera with the smaller focal length is wider, the image captured by the first camera contains a larger range, which is more conducive to object recognition and tracking. For small targets that cannot be accurately recognized due to the long distance and blurred imaging, the second camera with the larger focal length is started to capture the small targets, so that clearer small target imaging can be obtained. The object recognition of the image captured by the second camera can improve the accuracy of object recognition, thereby solving the problem of poor accuracy of object recognition in the related art. BRIEF DESCRIPTION OF DRAWINGS

[0010] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.

[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor.

[0012] Figure 1 is a hardware environment schematic diagram of an object recognition method according to an embodiment of the present application;

[0013] Figure 2 is a flowchart of an optional object recognition method according to an embodiment of the present application;

[0014] Figure 3 is a schematic diagram of an optional object recognition method according to an embodiment of the present application;

[0015] Figure 4 is a schematic diagram of another optional object recognition method according to an embodiment of the present application;

[0016] Figure 5is a flowchart of another optional object recognition method according to an embodiment of the present application;

[0017] Figure 6 is a flowchart of yet another optional object recognition method according to an embodiment of the present application;

[0018] Figure 7 is a structural block diagram of an optional object recognition device according to an embodiment of the present application;

[0019] Figure 8 is a structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0020] In order to make the personnel in the technical field better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work should be within the scope of protection of the present application.

[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0022] According to an aspect of an embodiment of the present application, an object recognition method is provided. Optionally, in the present embodiment, the above-mentioned object recognition method can be applied in a hardware environment composed of a shooting device 102 and a server 104 as shown in Figure 1 As shown in Figure 1 The server 104 is connected with the shooting device 102 through a network, and can be used to provide services (such as application services, etc.) for the shooting device 102 or a client installed on the shooting device. A database can be set on the server or independently of the server, and is used to provide data storage services for the server 104.

[0023] The network can include, but is not limited to, at least one of the following: a wired network, a wireless network. The wired network can include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, a local area network. The wireless network can include, but is not limited to, at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The photographing device 102 can be, but is not limited to, a camera or the like.

[0024] The object recognition method of the embodiment of the present application can be executed by the server 104, or can be executed by the server 104 and the photographing device 102 together. Taking the case of executing the object recognition method in the embodiment by the server 104 as an example, Figure 2 is a flowchart of an optional object recognition method according to the embodiment of the present application, as shown in Figure 2 The flow of the method can include the following steps:

[0025] Step S202: performing object recognition on a first image photographed by a first camera using a first photographing focal length, to obtain a first recognition result.

[0026] The object recognition method in the embodiment can be applied to a scene of performing object recognition according to an image photographed by a camera. Here, the camera can be an RGB (Red Green Blue, red green blue three primary colors, i.e., a visible light imaging sensor) camera. The object recognition performed on the image can be human recognition performed on the image, i.e., detecting a person appearing in the image, or can be recognition performed on other objects in the image, such as a vehicle in the image.

[0027] Taking human recognition as an example, the traditional human recognition algorithm has a high human recognition false alarm rate when performing human recognition on an image. In order to improve the recognition accuracy, a neural network high-end algorithm is generally used to perform image recognition. However, neither the traditional algorithm nor the algorithm based on the neural network can accurately recognize small targets in the image.

[0028] As in patent 1 (CN115082960A), an image processing method, a computer device and a readable storage medium are disclosed. In a specific embodiment, the method includes: acquiring an image collected by an image collection device as an original image; performing human detection on the original image to obtain a person detection frame; performing super-resolution processing on the person detection frame to generate a processed image with the same resolution as the original image. This embodiment can maximize the effective information of the image by magnifying the information of the high-value person region in the image such as a video conference image, a behavior monitoring image, etc., and improve the user experience of the information receiver.

[0029] But the above method is only for small target object super-resolution processing, that is, digital magnification, and does not increase the effective image information. The information of small targets is insufficient, and the recognition rate cannot be greatly improved, and the false positive rate will also increase accordingly.

[0030] As patent 2 (CN114222065A), an image processing method, device, electronic equipment, storage medium and program product are provided. The method comprises: determining the size of a first lens frame, the first lens frame being used to intercept a recording picture in a collected camera picture; when a target object in the camera picture is in a first state, moving the first lens frame so that the target object is in the first lens frame; when the target object enters a second state, scaling the first lens frame to a second lens frame based on the relevant position of the target object in the second state in the camera picture; and when the target object ends the second state, restoring the second lens frame to the first lens frame. By intercepting a preset low-resolution recording picture in a collected high-resolution camera picture, the effect of camera rotation, zooming and variable magnification can be effectively simulated, and the purpose of replacing professional camera and improving shooting effect can be achieved.

[0031] But the above method is a zooming method based on double sensors, and does not involve identifying small targets in the image.

[0032] As patent 3 (CN113095120A), a system for reducing false positives in human upper body detection is provided. The system comprises: a mobile object detection frame acquisition module for detecting moving targets in the current frame, performing contour extraction, and determining the number of mobile detection frames; a judgment module for judging whether there is motion in the current frame according to the results in the mobile object detection frame acquisition module; if there is motion in the current frame, the detection module is entered for detection; otherwise, the mobile object detection frame acquisition module is returned to process; and a detection module for full-frame human detection.

[0033] But the above method mainly combines human detection and mobile detection module to judge whether the detected human region has motion, and cannot improve the recognition rate of small target objects.

[0034] In the prior art, the recognition of small target objects in images mainly involves image interpolation magnification or image enhancement processing for small target objects, but these methods do not have substantial improvement and cannot increase the clarity of small targets. The information of small targets is insufficient, and the false positive and false negative rates of image recognition are high.

[0035] To at least partially solve the above problems, in the embodiment, for an object that cannot be accurately recognized by the first camera, the second camera can be started to capture and recognize the object, the capturing focal length of the second camera can be greater than the capturing focal length of the second camera, and the imaging of the object captured by the second camera can be larger and clearer than the imaging of the same object captured by the first camera, thereby solving the false alarm and missed alarm problems of small target objects and improving the accuracy of recognition. At the same time, the human recognition distance is farther, and the appropriate long-focus lens recognition distance can reach 10m, 20m, 50m, or even 100m.

[0036] In the embodiment, object recognition can be performed on the first image captured by the first camera using the first capturing focal length to obtain a first recognition result. Here, the object recognition on the first image can be to identify whether there is a target type object in the first image. The target type can be a specified type of interest, such as a human form. Through the first camera with a smaller focal length but a wider observation range, preliminary recognition can be performed on more objects in fewer images, thereby improving the efficiency of object recognition.

[0037] Step S204, in the case where the first recognition result indicates that the to-be-confirmed object is recognized in the first image, adjusting the first capturing area captured by the second camera using the second capturing focal length to a target capturing area, wherein the to-be-confirmed object represents a solid object in a three-dimensional space, the solid object is located at the area center of the target capturing area, the second capturing focal length is greater than the first capturing focal length, and the first camera and the second camera are the same camera or different cameras.

[0038] Since there can be a target type object in the first image, there can also be no target type object, and there can also be a target type object with small imaging. The foregoing first recognition result can indicate that a target type object is recognized in the first image, can indicate that no target type object is recognized in the first image, or can indicate that a to-be-confirmed object is recognized in the first image. The to-be-confirmed object can be an object that needs to be confirmed again. It can be an object that is not recognized as a target type object due to small imaging, or it can be an object that is recognized as a target type object due to small imaging but needs to be identified again to avoid recognition errors.

[0039] In the case where the first recognition result indicates that the to-be-confirmed object is recognized in the first image, the first capturing area captured by the second camera using the second capturing focal length can be adjusted to a target capturing area. Here, the second capturing focal length is greater than the first capturing focal length. The to-be-confirmed object can represent a solid object in a three-dimensional space, and the adjustment of the capturing area of the second camera can be to make the solid object located at the area center of the target capturing area.

[0040] The second camera and the first camera can be the same camera, i.e., two different focal length lenses of one binocular camera.

[0041] The second camera and the first camera can also be different cameras, i.e., two cameras linked together.

[0042] Taking human body detection as an example of object recognition, as shown in Figure 3 , the camera in the embodiment can include sensor1+short focus lens, marked as the first camera; sensor2+long focus lens+pan-tilt device, marked as the second camera. The first camera is an RGB+short focus lens camera, which usually has a large field of view and a wide observation range, and the image of a distant object is blurred. The second camera is an RGB+long focus lens camera, which usually has a small field of view and a small observation range, and the image of a distant object is clear. In Figure 3 , the main control chip (Chip) includes a CPU (Central Processing Unit) or NPU (Neural network Processing Unit) device+two ISPs. The CPU / NPU is the operation resource of the chip, which is used to operate the human body detection algorithm. The ISP (Image Signal Processing) is an image processing unit inside the chip, which is logically abstracted as ISP1 and ISP2.

[0043] The adjustment of the shooting area of the second camera can be achieved by adjusting the pan-tilt device of the second camera.

[0044] In step S206, object recognition is performed on the second image captured by the second camera in the target shooting area to obtain a second recognition result, wherein the second recognition result is used to indicate whether the object to be confirmed is an object of a target type.

[0045] After the first shooting area of the second camera is adjusted to the target shooting area, the second camera can be controlled to perform image acquisition. The second image captured by the second camera in the target shooting area can be subjected to object recognition to obtain a second recognition result. Here, the second recognition result can be used to indicate whether the object to be confirmed is an object of a target type.

[0046] The first image captured by the first camera using the first photographing focal length is subjected to object recognition, and a first recognition result is obtained; in a case where the first recognition result indicates that the to-be-confirmed object is recognized in the first image, a first photographing region captured by the second camera using a second photographing focal length is adjusted as a target photographing region, the to-be-confirmed object represents an entity object in a three-dimensional space, the entity object is located at a region center of the target photographing region, and the second photographing focal length is greater than the first photographing focal length; and the second camera is subjected to object recognition on a second image captured in the target photographing region, and a second recognition result is obtained, where the second recognition result is used to indicate whether the to-be-confirmed object is an object of a target type, thereby solving the problem of poor object recognition accuracy in the related art, and improving the recognition accuracy.

[0047] In one example embodiment, the first image captured by the first camera using the first photographing focal length is subjected to object recognition, and a first recognition result is obtained, including:

[0048] S11, in a case where a first object of a target type is recognized in the first image, and a first region where the first object is located in the first image is less than or equal to a preset region threshold, the first recognition result is determined as indicating that the to-be-confirmed object is recognized in the first image, where the first object is the to-be-confirmed object.

[0049] For a case where the first object of the target type is recognized in the first image, but the first region where the first object is located in the first image is less than or equal to the preset region threshold, considering that there is a possibility of misrecognition of the first object due to the small first region, in order to improve the accuracy of image recognition, in the embodiment, in a case where the first object of the target type is recognized in the first image, and the first region where the first object is located in the first image is less than or equal to the preset region threshold, the first recognition result can be determined as indicating that the to-be-confirmed object is recognized in the first image, and the first object is the to-be-confirmed object, so as to be subjected to re-recognition by the second camera.

[0050] Taking object recognition as human body detection as an example, the above preset region threshold can be a threshold (for example, Region_Threshold1, that is, region threshold 1) for triggering human body detection of the second camera. YUV (Y represents luminance (Luminance or Luma), U and V represent chrominance (Chrominance or Chroma), and YUV is a color encoding method) data of the first camera is obtained, first video human body detection is performed, the largest detection target is selected, and it is judged whether the target region is greater than Region_Threshold1. If yes, the human body detection result is reported. If not, the target region is given to a second detection algorithm (that is, a human body detection algorithm of the second camera), and a second detection algorithm module is woken up.

[0051] Optionally, after the object recognition on the first image captured by the first camera using the first photographing focal length is performed to obtain a first recognition result, the method further includes:

[0052] In a case where the first recognition result indicates that a first object of a target type is recognized in the first image and a first region in the first image where the first object is located is greater than a preset region threshold, the first recognition result is reported.

[0053] Through the embodiment, in a case where a first object of a target type is recognized in the first image and a first region in the first image where the first object is located is less than or equal to a preset region threshold, the first object is taken as a to-be-confirmed object to be identified again by the second camera, so that the accuracy of object recognition can be improved.

[0054] In one example embodiment, in a case where the first recognition result indicates that the to-be-confirmed object is recognized in the first image, the first photographing region captured by the second camera using the second photographing focal length is adjusted to a target photographing region, including:

[0055] S21, in a case where the first recognition result indicates that the to-be-confirmed object is recognized in the first image, determining a first coordinate position of a region center of the first photographing region in a target coordinate system, wherein the target coordinate system is a coordinate system corresponding to the first image, a coordinate origin of the target coordinate system is a first vertex in the second photographing region, an X axis and a Y axis of the target coordinate system are two edges of the second photographing region, the two edges are adjacent to the first vertex, and the second photographing region is a photographing region when the first camera captures the first image using the first photographing focal length;

[0056] S22, determining a second coordinate position of a region center of a region where the to-be-confirmed object is located in the first image in the target coordinate system;

[0057] S23, in a case where the first coordinate position is different from the second coordinate position, adjusting the first photographing region to the target photographing region, so that a coordinate position of a region center of the target photographing region in the target coordinate system is the same as the second coordinate position.

[0058] In a case where the second camera is started to perform object recognition on the to-be-confirmed object, in order to improve the accuracy of object recognition and ensure that the second camera captures a clear and complete to-be-confirmed object, in the embodiment, the first photographing region captured by the second camera using the second photographing focal length can be controlled to be the target photographing region, so as to ensure that the to-be-confirmed object captured by the second camera is located at the center of the target photographing region.

[0059] To adjust the shooting area of the second camera, when the first recognition result indicates that the to-be-confirmed object is identified in the first image, a first coordinate position of a region center of the first shooting area in a target coordinate system can be determined first. Here, the target coordinate system can be a coordinate system corresponding to the first image, the coordinate origin of the target coordinate system can be a first vertex (for example, the lower left corner vertex of the shooting area of the first camera as shown in Figure 4 The X-axis and the Y-axis of the target coordinate system are two edges of the second shooting area, and the two edges are adjacent to the first vertex. The second shooting area is a shooting area when the first camera shoots the first image using the first shooting focal length.

[0060] As shown in Figure 4 Region1(x, y, w, h), x, y, w, and h are the starting Region1_x coordinate, the Region1_y coordinate, the region width Region1_w, and the region height Region1_h of the region, respectively. In the target coordinate system, Region1(x, y, w, h) can be Region1(0, 0, w, h). Taking the first camera resolution of 2560x1440 as an example, Region1(x, y, w, h) can be Region1(0, 0, 2560, 1440). The region Region2(x, y, w, h) shot by the second camera, x, y, w, and h are the starting Region2_x coordinate, the Region2_y coordinate, the region width Region2_w, and the region height Region2_h of the region, respectively.

[0061] For the to-be-confirmed object identified in the first image, a second coordinate position of a region center of the region where the to-be-confirmed object is located in the target coordinate system can be determined. The region where the to-be-confirmed object is located in the first image is recorded as ObjectRegion(x, y, w, h), and the second coordinate position of the region center can be determined according to ObjectRegion(x, y, w, h).

[0062] When the first coordinate position is different from the second coordinate position, the first shooting area can be adjusted to a target shooting area, so that the coordinate position of the region center of the target shooting area in the target coordinate system is the same as the second coordinate position.

[0063] Optionally, when the first coordinate position is the same as the second coordinate position, it can be determined that the current shooting direction of the second camera can shoot the to-be-confirmed object located at the center of the shooting area, and the second camera can be directly controlled to capture an image.

[0064] In this embodiment, a coordinate system is established with the shooting area of ​​the first camera. Based on the position of the shooting area of ​​the second camera in the coordinate system and the position of the image to be confirmed captured by the first camera in the coordinate system, it is determined whether the second camera should adjust its shooting direction, which can improve the efficiency of calculating the adjustment direction of the second camera.

[0065] In an exemplary embodiment, determining the first coordinate position of the center of the first shooting area in the target coordinate system includes:

[0066] S31, determine the width of the second region of the first shooting area in the target coordinate system based on the first shooting focal length, the second shooting focal length, and the width of the first region of the second shooting area;

[0067] S32, based on the first shooting focal length, the second shooting focal length, and the height of the first area of ​​the second shooting area, determine the height of the second area of ​​the first shooting area in the target coordinate system;

[0068] S33, based on the width of the first region and the width of the second region, as well as the height of the first region and the height of the second region, determine the third coordinate position of a second vertex in the target coordinate system within the first shooting region;

[0069] S34. Based on the third coordinate position, the width of the second region, and the height of the second region, determine the first coordinate position of the center of the first shooting area in the target coordinate system.

[0070] Since the first focal length of the first camera and the second focal length of the second camera are known, the width of the second region of the first shooting area in the target coordinate system can be determined based on the first focal length, the second focal length, and the width of the first region of the second shooting area. Similarly, the height of the second region of the first shooting area in the target coordinate system can be determined based on the first focal length, the second focal length, and the height of the first region of the second shooting area.

[0071] Given the widths of the first and second regions, a second vertex (e.g., within the first shooting region) can be determined. Figure 4 The lower left corner vertex of the second camera's shooting area (shown) is located at the x-coordinate in the target coordinate system. Given the height of the first area and the height of the second area, the y-coordinate of a second vertex in the first shooting area can be determined in the target coordinate system. The x-coordinate and y-coordinate of the second vertex in the target coordinate system are the third coordinate position of the second vertex in the target coordinate system.

[0072] For example, in the target coordinate system, the width and height of the region Region2(x,y,w,h), as well as the initial Region2_x coordinate and Region2_y coordinate, can be represented by formulas (1), (2), (3), and (4):

[0073]

[0074]

[0075]

[0076]

[0077] The first shooting focal length is F1, the second shooting focal length is F2, and ALGIN(x, a) in the formula is used to align x with a as a boundary, that is, (x / a)*a, alginx is the alignment parameter of the second camera region in the x direction, and alginy is the alignment parameter of the second camera region in the y direction.

[0078] Taking F1=2.8mm, F2=12mm, alginx=32, and alginy=32 as an example, and taking the first camera shooting region as Region1(0, 0, 2560, 1440), Region2(x, y, w, h) can be determined as Region(992, 380, 576, 320) according to the formulas (1), (2), (3), and (4).

[0079] According to the determined third coordinate position, the second region width, and the second region height, the first coordinate position of the region center of the first shooting region in the target coordinate system can be determined. As shown in the formulas (5) and (6), the x value of the third coordinate position plus half of the second region width can determine the coordinate x position of the region center of the first shooting region in the target coordinate system, the y value of the third coordinate position plus half of the second region height can determine the coordinate y position of the region center of the first shooting region in the target coordinate system, and the coordinate x position and the coordinate y position of the region center of the first shooting region in the target coordinate system can determine the first coordinate position.

[0080]

[0081]

[0082] Optionally, the calculation process of the second coordinate position can be similar to that of the first coordinate position, as shown in formulas (7) and (8), half of the region width of the region where the object to be confirmed is located plus the starting x coordinate position of the region where the object to be confirmed is located can determine the coordinate x position of the region center of the region where the object to be confirmed is located in the target coordinate system, half of the region height of the region where the object to be confirmed is located plus the starting y coordinate position of the region where the object to be confirmed is located can determine the coordinate y position of the region center of the region where the object to be confirmed is located in the target coordinate system, and according to the coordinate x position and the coordinate y position of the region center of the first shooting region in the target coordinate system, the second coordinate position can be determined.

[0083]

[0084]

[0085] The adjustment of the first shooting region can be completed by controlling the gimbal (Motor) device of the second camera. Motor_x is the current coordinate of the gimbal X axis direction, Motor_y is the current coordinate of the gimbal Y axis direction, Motor_x and Motor_y are the aforementioned second coordinate position. Motor_step is an example of the smallest unit of gimbal rotation. When the first coordinate position is different from the second coordinate position, the distance step_x that the Motor needs to rotate in the X axis direction and the distance step_y that the Motor needs to rotate in the Y axis direction can be shown in formulas (9) and (10). When step_x is greater than 0, the gimbal rotates in the positive direction of the X axis, when step_x is less than 0, the gimbal rotates in the negative direction of the X axis by -step_x, when step_y is greater than 0, the gimbal rotates in the positive direction of the Y axis, and when step_y is less than 0, the gimbal rotates in the negative direction of the Y axis by -step_y. After the gimbal rotates to the corresponding position, Motor_x and Motor_y are updated, and the updated Motor_x and Motor_y positions are shown in formulas (11) and (12).

[0086]

[0087]

[0088]

[0089]

[0090] In one example embodiment, object recognition is performed on a first image captured by the first camera using a first shooting focal length, and a first recognition result is obtained, including:

[0091] In a case where the object of the target type is not recognized in the first image, but a second object that moves is recognized, the first recognition result is determined to represent that the object to be confirmed is recognized in the first image, and the second object is the object to be confirmed.

[0092] In a case where the object of the target type is not recognized in the first image, but a second object that moves is recognized, the first recognition result is determined to represent that the object to be confirmed is recognized in the first image, and the second object is the object to be confirmed.

[0093] In a case where the object of the target type is not recognized in the first image, but a second object that moves is recognized, the first recognition result is determined to represent that the object to be confirmed is recognized in the first image, and the second object is the object to be confirmed.

[0094] In a case where the object of the target type is not recognized in the first image, but a second object that moves is recognized, the first recognition result is determined to represent that the object to be confirmed is recognized in the first image, and the second object is the object to be confirmed.

[0095] In one example embodiment, the object recognition is performed on a first image captured by a first camera using a first shooting focal length, including:

[0096] In a case where the second object of the target type is not recognized in the first image, the second object is recognized in a third image, and the position of the second object in the first image is different from the position of the second object in the third image, it is determined that the object of the target type is not recognized in the first image, but the second object that moves is recognized, wherein the third image is an image captured by the first camera before the first image, and the shooting direction and the shooting focal length of the first camera when capturing the third image are the same as the shooting direction and the shooting focal length of the first camera when capturing the first image; or

[0097] In a case where the second object of the target type is not recognized in the first image, the second object is recognized in each of a plurality of images, and the position of the second object in the first image is different from the position of the second object in each of the plurality of images, it is determined that the object of the target type is not recognized in the first image, but the second object that moves is recognized, wherein the plurality of images are images captured by the first camera before the first image, and the shooting direction and the shooting focal length of the first camera when capturing the plurality of images are the same as the shooting direction and the shooting focal length of the first camera when capturing the first image.

[0098] In the process of identifying the moving object, whether the object is moving can be determined according to the position of the same object in at least two images. In the embodiment, in the case that a second object which is not of the target type is identified in the first image, the second object is also identified in the third image, and the position of the second object in the first image is different from the position of the second object in the third image, it can be determined that the object of the target type is not identified in the first image, but the second object which is moving is identified. Here, the third image can be an image taken by the first camera before the first image, and the shooting direction and the shooting focal length when the first camera takes the third image can be the same as the shooting direction and the shooting focal length when the first camera takes the first image.

[0099] It is considered that in the process of taking images by the first camera, there is a part of the object moving, which causes the position of other objects in the image to change. For example, when an object is blocked and not displayed in the image, and when the blocking object disappears, the blocked object is displayed in the image, but the object can not actually move, and only because of the change of the blocking object, the relative position of the same object in the two images before and after can change.

[0100] In order to avoid the error in the identification of the moving object caused by the above-mentioned situation, in the case that a second object which is not of the target type is identified in the first image, the second object is also identified in each of the plurality of images, and the position of the second object in the first image is different from the position of the second object in each of the plurality of images, it is determined that the object of the target type is not identified in the first image, but the second object which is moving is identified. The plurality of images can be images taken by the first camera before the first image. The shooting direction and the shooting focal length when the first camera takes the plurality of images can be the same as the shooting direction and the shooting focal length when the first camera takes the first image.

[0101] Through the embodiment, whether the object is moving can be determined by the position of the same object in a plurality of images, and the moving object can be quickly and accurately identified, thereby improving the efficiency of object identification.

[0102] In an example embodiment, in the case that the object of the target type is not identified in the first image, but the second object which is moving is identified, the first identification result is determined to represent that the object to be confirmed is identified in the first image, and the method further comprises:

[0103] S61, determine a region position and a region size of a second mapping region of a second region in which the second object in the first image is located in a target coordinate system, wherein the second region is the same as the second mapping region, the region size comprises a region width of the second mapping region and a region height of the second region, the target coordinate system is a coordinate system corresponding to the first image, a coordinate origin of the target coordinate system is a first vertex in the second shooting region, X and Y axes of the target coordinate system are two edges of the second shooting region, the two edges are adjacent to the first vertex, and the second shooting region is a shooting region when the first camera shoots the first image using the first shooting focal length.

[0104] S62, adjust the region position and the region size so that the second mapping region is located in a first mapping region of the first shooting region in the target coordinate system, wherein the first shooting region is the same as the first mapping region.

[0105] It is considered that there may be multiple moving objects in the first image shot by the first camera, and since the multiple moving objects are all objects that are not identified as target types, the region boundaries between the multiple moving objects cannot be accurately distinguished, so that the multiple moving objects are identified as one second object. In this case, the region of the second object is likely to exceed the second camera shooting region, so the identification region of the second camera.

[0106] In the embodiment, for the determined second object, the region position and the region size of the second mapping region of the second region in which the second object in the first image is located in the target coordinate system can be determined first, and the region position and the region size are adjusted according to the shooting region of the second camera, so that the second mapping region is located in the first mapping region of the first shooting region in the target coordinate system.

[0107] The above-mentioned second region is the same as the second mapping region, and the region size can comprise a region width of the second mapping region and a region height of the second region. The above-mentioned target coordinate system is the aforementioned target coordinate system, which will not be described herein. The second shooting region can be a shooting region when the first camera shoots the first image using the first shooting focal length, and the first shooting region is the same as the first mapping region.

[0108] It should be noted that the adjusted second mapping region is used as the region of the object to be confirmed in the first image for related calculation of the region center.

[0109] Taking the second mapping region of the second region in which the second object is located in the target coordinate system as an example, the region position and the region size of the second mapping region can be adjusted as shown in formulas (13), (14), (15) and (16).

[0110]

[0111]

[0112]

[0113]

[0114] By adjusting the area position and area size of the second mapping area of the second region where the second object is located in the target coordinate system, it can be avoided that the second mapping area exceeds the recognition region corresponding to the second camera, so as to ensure the normal progress of object recognition.

[0115] In an example embodiment, in a case where the first recognition result indicates that the to-be-confirmed object is recognized in the first image, the first shooting region shot by the second camera using the second shooting focal length is adjusted to the target shooting region, including:

[0116] S71, the first shooting region is adjusted to the target shooting region, so that the entity object is located at the area center of the target shooting region, and the area proportion of the entity object in the target shooting region is greater than or equal to a preset proportion threshold; or

[0117] S72, the first shooting region is adjusted to the target shooting region, so that the entity object is located at the area center of the target shooting region, and the entity object is not blocked.

[0118] When adjusting the shooting region of the second camera, in order to improve the recognition efficiency of the image shot by the second camera, in this embodiment, the first shooting region can be adjusted to the target shooting region, so that the entity object is located at the area center of the target shooting region, and the area proportion of the entity object in the target shooting region is greater than or equal to a preset proportion threshold. Here, the preset proportion threshold is a threshold of the area proportion preset in advance. In a case where the area proportion of the entity object in the target shooting region is greater than or equal to the preset proportion threshold, the object type of the entity object can be more accurately recognized.

[0119] When the first shooting region shot by the second camera using the second shooting focal length is adjusted to the target shooting region, the first shooting region can also be adjusted to the target shooting region, so that the entity object is located at the area center of the target shooting region, and the entity object is not blocked.

[0120] Through this embodiment, when adjusting the shooting region of the second camera, the to-be-confirmed object is located at the center of the shooting region, and the area proportion of the to-be-confirmed object in the shooting region of the second camera is large or not blocked, so that the accuracy of recognizing the object type of the to-be-confirmed object can be improved.

[0121] In an example embodiment, the second image captured by the second camera in the target shooting area is subjected to object recognition, and a second recognition result is obtained, including:

[0122] S81, the second image is subjected to object recognition.

[0123] S82, in a case where a third object of the target type is recognized, the second recognition result is reported, wherein the second recognition result is used to indicate that the object to be confirmed is an object of the target type, and the object to be confirmed is the third object.

[0124] For the second image captured by the second camera in the target shooting area, object recognition can be performed to identify whether the object to be confirmed is an object of the target type. In a case where a third object of the target type is recognized, the second recognition result can be directly reported. Here, the second recognition result can be used to indicate that the object to be confirmed is an object of the target type, and the object to be confirmed is the third object.

[0125] Through the embodiment, the object to be confirmed is photographed and subjected to object recognition by the second camera with a larger focal length, and the recognition accuracy of the object to be confirmed can be improved.

[0126] In an example embodiment, the above method further includes:

[0127] S91, in a case where a third object of the target type is not recognized, the second image captured by the second camera in the target shooting area is re-acquired, and the second image is subjected to object recognition until one of the following conditions is met: the number of times of object recognition is greater than or equal to a preset number threshold, or a third object of the target type is recognized.

[0128] In order to avoid the problem of missed reporting caused by recognition error, in a case where a third object of the target type is not recognized, one recognition failure can be recorded, and the image captured by the second camera is subjected to object recognition. The image subjected to recognition can be an image that has failed to be recognized before, or an image captured by the second camera after the image that has failed to be recognized.

[0129] In the embodiment, in a case where a third object of the target type is not recognized, the second image captured by the second camera in the target shooting area can also be re-acquired, i.e., the second camera can be re-controlled to capture an image, and the captured second image is subjected to object recognition until one of the following conditions is met: the number of times of object recognition is greater than or equal to a preset number threshold, or a third object of the target type is recognized.

[0130] For example, taking human body detection as an example, as Figure 5As shown, the YUV image of the second camera is acquired for the second video human body detection algorithm, if the second human body detection algorithm detects the target, it is reported, and the detection is exited this time, and a state of waiting for the next target area is entered, if the human body is not detected, Fail (the number of failures) is added by 1, the image is repeatedly acquired for human body detection, if the number of detection failures is greater than the threshold of the number of detections, the detection is exited, and a state of waiting for the next target area is entered.

[0131] Through the embodiment, in the case that the third object of the target type is recognized, the object recognition is repeatedly performed, and the recognition false alarm rate can be reduced.

[0132] The object recognition method in the embodiment of the application is explained and described below in combination with an optional example. In the optional example, the object recognition is human body detection, and the first camera and the second camera are two lenses of a binocular camera.

[0133] The optional example provides a method and device for reducing human body false alarms based on long-short-focus binoculars, mainly relates to the technical field of human body detection of pan-tilt linkage control long-short-focus cameras, and in particular relates to the technology of combining double cameras of long-short-focus cameras, using the first camera to perform preliminary human body detection, reporting a target area, linking the pan-tilt of the second camera, rotating the pan-tilt to make the target in the shooting area of the second camera, starting the image human body detection of the second camera, and filtering invalid human body events according to the results, so that the image quality of human body detection can be improved, the human body detection accuracy can be improved, and human body false alarms can be reduced.

[0134] The flow of the object recognition method in the optional example can be as shown in Figure 6 may include the following steps:

[0135] Step 1, after the device is started, the parameters are initialized.

[0136] The shooting area Region1 (x, y, w, h) of the first camera is acquired, and the shooting area Region2 (x, y, w, h) of the second camera is calculated according to the focal length F1 and F2 parameters.

[0137] Step 2, the YUV image of the first camera is acquired, and the first video human body detection is performed.

[0138] Step 3, in the case that the target is not detected, the video motion detection is started, and the area of the detected moving body is marked as a target area; in the case that the target is detected, but the target area is smaller than the area threshold, the area of the target is marked as a target area.

[0139] Step 4, the target area is taken as an update area, and the second camera human body detection is woken up.

[0140] Step 5, driving the holder to make the second camera shoot the target area, i.e. adjusting the shooting direction of the second camera according to the target area.

[0141] Step 6, obtaining the YUV image of the second camera and performing second video human body detection.

[0142] Step 7, reporting the detection result if the target is detected, or repeating the detection if the target is not detected.

[0143] Through the optional example, the short-focus lens can ensure the detection field of view, the holder with the long-focus lens can obtain a small target high-definition image of any interested area, which can improve the accuracy of human body detection and the accuracy of small target objects, and greatly reduce the false alarm rate of small targets. At the same time, the distance of human body recognition is farther.

[0144] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the action sequence described, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.

[0145] From the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM (Read-Only Memory), a RAM (Random Access Memory), a magnetic disk, or an optical disk), and includes a number of instructions to make an end device (which can be a mobile phone, a computer, a server, or a network device) execute the methods of various embodiments of the present application.

[0146] According to another aspect of the embodiments of the present application, an object recognition device for implementing the above object recognition method is also provided, which can be applied to a smart device. Figure 7 is a structural block diagram of an optional object recognition device according to the embodiments of the present application, as shown in Figure 7 The device can include:

[0147] The first recognition unit 702 is configured to perform object recognition on the first image shot by the first camera using the first shooting focal length, to obtain a first recognition result.

[0148] The first adjusting unit 704, connected with the first identifying unit 702, is configured to adjust a first shooting area shot by the second camera using a second shooting focal length to a target shooting area in a case where the first identification result indicates that the to-be-confirmed object is identified in the first image, where the to-be-confirmed object represents a real object in a three-dimensional space, the real object is located at a region center of the target shooting area, the second shooting focal length is greater than the first shooting focal length, and the first camera and the second camera are the same camera or different cameras.

[0149] The second identifying unit 706, connected with the first adjusting unit 704, is configured to perform object identification on a second image shot by the second camera in the target shooting area to obtain a second identification result, where the second identification result is used to indicate whether the to-be-confirmed object is an object of a target type.

[0150] It should be noted that the first identifying unit 702 in this embodiment can be configured to perform the step S202, the first adjusting unit 704 in this embodiment can be configured to perform the step S204, and the second identifying unit 706 in this embodiment can be configured to perform the step S206.

[0151] By using the above modules, the first image shot by the first camera using the first shooting focal length is subjected to object identification to obtain a first identification result; in a case where the first identification result indicates that the to-be-confirmed object is identified in the first image, the first shooting area shot by the second camera using the second shooting focal length is adjusted to a target shooting area, where the to-be-confirmed object represents a real object in a three-dimensional space, the real object is located at a region center of the target shooting area, the second shooting focal length is greater than the first shooting focal length, and the first camera and the second camera are the same camera or different cameras; and the second image shot by the second camera in the target shooting area is subjected to object identification to obtain a second identification result, where the second identification result is used to indicate whether the to-be-confirmed object is an object of a target type, thereby solving the problem of poor accuracy of object identification in related technologies and improving the accuracy of identification.

[0152] In one example embodiment, the first identifying unit includes:

[0153] The first determining module is configured to determine the first identification result as indicating that the to-be-confirmed object is identified in the first image in a case where a first object of a target type is identified in the first image and a first region where the first object is located in the first image is less than or equal to a preset region threshold, where the first object is the to-be-confirmed object.

[0154] In one example embodiment, the first adjusting unit includes:

[0155] The second determining module is configured to determine a first coordinate position of a region center of the first shooting region in a target coordinate system in a case where the first identification result indicates that the to-be-confirmed object is identified in the first image, wherein the target coordinate system is a coordinate system corresponding to the first image, a coordinate origin of the target coordinate system is a first vertex in the second shooting region, an X-axis and a Y-axis of the target coordinate system are two edges of the second shooting region, the two edges are adjacent to the first vertex, and the second shooting region is a shooting region of the first camera when the first camera shoots the first image using the first shooting focal length.

[0156] The third determining module is configured to determine a second coordinate position of a region center of a region where the to-be-confirmed object is located in the first image in the target coordinate system.

[0157] The first adjusting module is configured to adjust the first shooting region to a target shooting region in a case where the first coordinate position is different from the second coordinate position, so that a coordinate position of the region center of the target shooting region in the target coordinate system is the same as the second coordinate position.

[0158] In an example embodiment, the second determining module includes:

[0159] The first determining submodule is configured to determine a second region width of the first shooting region in the target coordinate system according to the first shooting focal length, the second shooting focal length, and a first region width of the second shooting region.

[0160] The second determining submodule is configured to determine a second region height of the first shooting region in the target coordinate system according to the first shooting focal length, the second shooting focal length, and a first region height of the second shooting region.

[0161] The third determining submodule is configured to determine a third coordinate position of a second vertex in the first shooting region in the target coordinate system according to the first region width and the second region width, and the first region height and the second region height.

[0162] The fourth determining submodule is configured to determine the first coordinate position of the region center of the first shooting region in the target coordinate system according to the third coordinate position, the second region width, and the second region height.

[0163] In an example embodiment, the first identification unit includes:

[0164] The fourth determining module is configured to determine the first identification result as indicating that the to-be-confirmed object is identified in the first image in a case where no object of the target type is identified in the first image but a second object that moves is identified, wherein the second object is the to-be-confirmed object.

[0165] In an example embodiment, the first identification unit includes:

[0166] The fifth determining module is configured to determine that the object of the target type is not identified in the first image but the second object that moves is identified in a case where the second object that is not of the target type is identified in the first image, the second object is also identified in a third image, and a position of the second object in the first image is different from a position of the second object in the third image, wherein the third image is an image captured by the first camera before the first image, and a shooting direction and a shooting focal length when the first camera captures the third image are the same as a shooting direction and a shooting focal length when the first camera captures the first image; or

[0167] The sixth determining module is configured to determine that the object of the target type is not identified in the first image but the second object that moves is identified in a case where the second object that is not of the target type is identified in the first image, the second object is also identified in each of a plurality of images, and the position of the second object in the first image is different from a position of the second object in each of the plurality of images, wherein the plurality of images are images captured by the first camera before the first image, and a shooting direction and a shooting focal length when the first camera captures the plurality of images are the same as a shooting direction and a shooting focal length when the first camera captures the first image.

[0168] In an example embodiment, the apparatus described above further includes:

[0169] The first determining unit is configured to determine, in a case where the object of the target type is not identified in the first image but the second object that moves is identified, the first identification result as indicating a region position and a region size of a second mapping region of a second region in which the second object is located in the first image after the object to be confirmed is identified in the first image, wherein the second region is the same as the second mapping region, the region size includes a region width of the second mapping region and a region height of the second region, a coordinate system corresponding to the first image is the target coordinate system, a coordinate origin of the target coordinate system is a first vertex in the second shooting region, an X axis and a Y axis of the target coordinate system are two edges of the second shooting region, the two edges are adjacent to the first vertex, and the second shooting region is a shooting region when the first camera captures the first image using the first shooting focal length.

[0170] The second adjusting unit is configured to adjust the region position and the region size so that the second mapping region is located in a first mapping region of a first shooting region in the target coordinate system, wherein the first shooting region is the same as the first mapping region.

[0171] In an example embodiment, the first adjusting unit includes:

[0172] The second adjusting module is configured to adjust the first photographing region to a target photographing region, so that the entity object is located at a region center of the target photographing region, and an area proportion of the entity object in the target photographing region is greater than or equal to a preset proportion threshold.

[0173] The third adjusting module is configured to adjust the first photographing region to a target photographing region, so that the entity object is located at a region center of the target photographing region, and the entity object is not occluded.

[0174] In an example embodiment, the apparatus further includes:

[0175] The reporting unit is configured to, after object recognition is performed on a first image captured by the first camera using the first photographing focal length to obtain a first recognition result, report the first recognition result in a case where the first recognition result indicates that a first object of the target type is recognized in the first image, and a first region in which the first object is located in the first image is greater than a preset region threshold.

[0176] In an example embodiment, the second recognition unit includes:

[0177] The recognition module is configured to perform object recognition on the second image.

[0178] The reporting module is configured to, in a case where the third object of the target type is recognized, report the second recognition result, where the second recognition result is used to indicate that the to-be-confirmed object is the object of the target type, and the to-be-confirmed object is the third object.

[0179] In an example embodiment, the apparatus further includes:

[0180] The execution unit is configured to, in a case where the third object of the target type is not recognized, reacquire a second image captured by the second camera in the target photographing region, and perform object recognition on the second image until one of the following conditions is met: a recognition number of times of performing object recognition is greater than or equal to a preset number threshold, and the third object of the target type is recognized.

[0181] It should be noted that the above modules and the examples and application scenarios implemented by the corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should be noted that the above modules as part of the apparatus can run in the hardware environment as shown in Figure 1 The hardware environment includes a network environment.

[0182] According to another aspect of the embodiments of the present application, a storage medium is provided, which can be located on a smart device. Optionally, in the present embodiment, the storage medium can be used to execute program codes of any one of the object recognition methods described in the embodiments of the present application.

[0183] Optionally, in the embodiment, the storage medium can be located on at least one of the network devices in the network shown in the above embodiment.

[0184] Optionally, in the embodiment, the storage medium is configured to store program code for performing the following steps:

[0185] S1, performing object recognition on a first image captured by a first camera using a first shooting focal length, to obtain a first recognition result;

[0186] S2, in a case where the first recognition result indicates that an object to be confirmed is recognized in the first image, adjusting a first shooting area captured by a second camera using a second shooting focal length to a target shooting area, wherein the object to be confirmed represents a solid object in a three-dimensional space, the solid object is located at a region center of the target shooting area, the second shooting focal length is greater than the first shooting focal length, the first camera and the second camera are the same camera or are different cameras;

[0187] S3, performing object recognition on a second image captured by the second camera in the target shooting area, to obtain a second recognition result, wherein the second recognition result is used to indicate whether the object to be confirmed is an object of a target type.

[0188] Optionally, specific examples in the embodiment can refer to the examples described in the above embodiments, which will not be repeated here.

[0189] Optionally, in the embodiment, the storage medium can include but is not limited to a U disk, a ROM, a RAM, a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0190] According to another aspect of the embodiment of the present application, an electronic device for implementing the above object recognition method is also provided, and the electronic device can be a smart device, which can be a server, a terminal, or a combination thereof.

[0191] Figure 8 is a structural block diagram of an optional electronic device according to the embodiment of the present application, as shown in Figure 8 the processor 802, the communication interface 804 and the memory 806 complete mutual communication through the communication bus 808, wherein,

[0192] the memory 806, configured to store a computer program;

[0193] the processor 802, configured to execute the computer program stored in the memory 806, to implement the following steps:

[0194] S1, performing object recognition on a first image captured by a first camera using a first shooting focal length, to obtain a first recognition result;

[0195] S2, in a case where the first recognition result indicates that a to-be-confirmed object is recognized in the first image, adjusting a first shooting area captured by a second camera using a second shooting focal length to a target shooting area, wherein the to-be-confirmed object represents an entity object in a three-dimensional space, the entity object is located at a region center of the target shooting area, the second shooting focal length is greater than the first shooting focal length, and the first camera and the second camera are the same camera or different cameras;

[0196] S3, performing object recognition on a second image captured by the second camera in the target shooting area, to obtain a second recognition result, wherein the second recognition result is used to indicate whether the to-be-confirmed object is an object of a target type.

[0197] Optionally, the communication bus can be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 8 However, it does not mean that there is only one bus or only one type of bus. The communication interface is used for communication between the electronic device and other devices.

[0198] The memory can include a RAM and can also include a non-volatile memory, for example, at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.

[0199] As an example, the first identification unit 702, the first adjustment unit 704, and the second identification unit 706 in the push device of the resource information can be included in the memory 806, but are not limited thereto. In addition, other module units in the push device of the resource information can also be included, but are not limited thereto. Details are not described herein.

[0200] The processor can be a general processor, which can include but is not limited to: a CPU (Central Processing Unit), a NP (Network Processor), etc.; or can be a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0201] Optionally, specific examples in the embodiments can refer to the examples described in the above embodiments, and the embodiments will not be described here again.

[0202] Those skilled in the art can understand that, Figure 8 The structure shown is only schematic, and the device implementing the above object recognition method can be a terminal device, which can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, etc. Figure 8 It does not limit the structure of the above electronic device. For example, the electronic device can further include more or less components (such as a network interface, a display device, etc.) than Figure 8 shown, or have a different configuration from Figure 8 shown.

[0203] Those skilled in the art can understand that all or part of the steps of the various methods in the above embodiments can be completed by instructing the relevant hardware of the terminal device through a program, and the program can be stored in a computer readable storage medium, which can include: a flash disk, a ROM, a RAM, a magnetic disk or an optical disk, etc.

[0204] The serial number of the above embodiments of the present application is only for description, not representing the advantages and disadvantages of the embodiments.

[0205] The integrated units in the above embodiments, if implemented in the form of software function units and sold or used as independent products, can be stored in the above computer-readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.

[0206] In the above embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0207] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented by other means. Among them, the above-described device embodiments are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed mutual units can be indirect coupling or communication connection through some interface, unit or module, and can be electrical or other forms.

[0208] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place or distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the scheme provided in the embodiments.

[0209] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or at least two units can be integrated in one unit. The above integrated unit can be realized in the form of hardware or software function unit.

[0210] The above is only the preferred embodiment of the present application, and it should be pointed out that for those skilled in the art, without departing from the principle of the present application, a number of improvements and refinements can be made, which should be regarded as the protection scope of the present application.

Claims

1. A method of object recognition, characterized by, The method comprises the following steps: performing object recognition on a first image captured by a first camera using a first shooting focal length to obtain a first recognition result; in a case where the first recognition result indicates that a to-be-confirmed object is recognized in the first image, adjusting a first shooting area captured by a second camera using a second shooting focal length to a target shooting area, wherein the to-be-confirmed object represents a real object in a three-dimensional space, the real object is located at a region center of the target shooting area, the second shooting focal length is greater than the first shooting focal length, and the first camera and the second camera are the same camera or different cameras; performing object recognition on a second image captured by the second camera in the target shooting area to obtain a second recognition result, wherein the second recognition result is used to indicate whether the to-be-confirmed object is an object of a target type; wherein, in a case where the first recognition result indicates that a to-be-confirmed object is recognized in the first image, adjusting a first shooting area captured by a second camera using a second shooting focal length to a target shooting area comprises: determining a first coordinate position of a region center of the first shooting area in a target coordinate system, wherein the target coordinate system is a coordinate system corresponding to the first image, a coordinate origin of the target coordinate system is a first vertex in a second shooting area, X and Y axes of the target coordinate system are two edges of the second shooting area, the two edges are adjacent to the first vertex, and the second shooting area is a shooting area when the first camera captures the first image using the first shooting focal length; determining a second coordinate position of a region center of a region where the to-be-confirmed object is located in the first image in the target coordinate system; in a case where the first coordinate position is different from the second coordinate position, adjusting the first shooting area to the target shooting area, so that a coordinate position of a region center of the target shooting area in the target coordinate system is the same as the second coordinate position.

2. The method of claim 1, wherein, The method further comprises the following steps: in a case where a first object of the target type is recognized in the first image, and a first region where the first object is located in the first image is less than or equal to a preset region threshold, determining the first recognition result as indicating that the to-be-confirmed object is recognized in the first image, wherein the first object is the to-be-confirmed object.

3. The method of claim 1, wherein, The method further comprises the following steps: determining a second region width of the first shooting area in the target coordinate system according to the first shooting focal length, the second shooting focal length, and a first region width of the second shooting area; determining a second region height of the first shooting area in the target coordinate system according to the first shooting focal length, the second shooting focal length, and a first region height of the second shooting area; determining a third coordinate position of a second vertex in the first photographing region in the target coordinate system according to the first region width and the second region width, and the first region height and the second region height; determining the first coordinate position of the region center of the first photographing region in the target coordinate system according to the third coordinate position, the second region width and the second region height.

4. The method of claim 1, wherein, performing object recognition on the first image captured by the first camera using the first photographing focal length to obtain a first recognition result, including: in a case where no object of the target type is recognized in the first image but a second object that moves is recognized, determining the first recognition result as representing that the to-be-confirmed object is recognized in the first image, wherein the second object is the to-be-confirmed object.

5. The method of claim 4, wherein, performing object recognition on the first image captured by the first camera using the first photographing focal length, including: in a case where a second object that is not of the target type is recognized in the first image, the second object is also recognized in a third image, and a position of the second object in the first image is different from a position of the second object in the third image, determining that no object of the target type is recognized in the first image but the second object that moves is recognized, wherein the third image is an image captured by the first camera before the first image, and a photographing direction and a photographing focal length when the first camera captures the third image are the same as a photographing direction and a photographing focal length when the first camera captures the first image; or in a case where a second object that is not of the target type is recognized in the first image, the second object is also recognized in each of a plurality of images, and a position of the second object in the first image is different from a position of the second object in each of the plurality of images, determining that no object of the target type is recognized in the first image but the second object that moves is recognized, wherein the plurality of images are images captured by the first camera before the first image, and a photographing direction and a photographing focal length when the first camera captures the plurality of images are the same as a photographing direction and a photographing focal length when the first camera captures the first image.

6. The method of claim 4, wherein, in a case where no object of the target type is recognized in the first image but a second object that moves is recognized, determining the first recognition result as representing that the to-be-confirmed object is recognized in the first image after the first recognition result is determined, the method further includes: in a case where no object of the target type is recognized in the first image but a second object that moves is recognized, determining the first recognition result as representing that the to-be-confirmed object is recognized in the first image after the first recognition result is determined, the method further includes: determining a region position and a region size of a second mapping region of a second object in the first image in a target coordinate system, wherein the second region is the same as the second mapping region, the region size comprises a region width of the second mapping region and a region height of the second region, the target coordinate system is a coordinate system corresponding to the first image, a coordinate origin of the target coordinate system is a first vertex in a second shooting region, X and Y axes of the target coordinate system are two edges of the second shooting region, the two edges are adjacent to the first vertex, and the second shooting region is a shooting region of the first camera when the first camera shoots the first image using the first shooting focal length; adjusting the region position and the region size, so that the second mapping region is located in a first mapping region of the first shooting region in the target coordinate system, wherein the first shooting region is the same as the first mapping region.

7. The method according to any one of claims 1 to 6, characterized in that, In a case where the first identification result indicates that the to-be-confirmed object is identified in the first image, the first shooting region of the second camera using the second shooting focal length is adjusted to a target shooting region, comprising: adjusting the first shooting region to the target shooting region, so that the entity object is located at a region center of the target shooting region, and an area proportion of the entity object in the target shooting region is greater than or equal to a preset proportion threshold; or adjusting the first shooting region to the target shooting region, so that the entity object is located at the region center of the target shooting region, and the entity object is not blocked.

8. The method of claim 1, wherein, After the object identification on the first image shot by the first camera using the first shooting focal length is performed, the method further comprises: in a case where the first identification result indicates that the first object of the target type is identified in the first image, and a first region of the first object in the first image is greater than a preset region threshold, the first identification result is reported.

9. The method of claim 1, wherein, The object identification on the second image shot by the second camera in the target shooting region is performed to obtain a second identification result, comprising: performing object identification on the second image; in a case where the third object of the target type is identified, the second identification result is reported, wherein the second identification result is used to indicate that the to-be-confirmed object is an object of the target type, and the to-be-confirmed object is the third object.

10. The method of claim 9, wherein, The method further comprises: in a case where the third object of the target type is not identified, the second image shot by the second camera in the target shooting region is re-acquired, and object identification is performed on the second image, until one of the following conditions is met: a number of times of object identification is greater than or equal to a preset number threshold, or the third object of the target type is identified.

11. An object recognition apparatus characterized by comprising: comprising: a first identification unit, configured to perform object identification on a first image shot by a first camera using a first shooting focal length, to obtain a first identification result; The first adjusting unit is configured to, in a case where the first identification result indicates that an object to be confirmed is identified in the first image, adjust a first shooting area shot by a second camera using a second shooting focal length to a target shooting area, wherein the object to be confirmed represents a real object in a three-dimensional space, the real object is located at a region center of the target shooting area, the second shooting focal length is greater than the first shooting focal length, and the first camera and the second camera are the same camera or different cameras. The second identifying unit is configured to perform object identification on a second image shot by the second camera in the target shooting area to obtain a second identification result, wherein the second identification result is used to indicate whether the object to be confirmed is an object of a target type. The device is further configured to determine a first coordinate position of a region center of the first shooting area in a target coordinate system, wherein the target coordinate system is a coordinate system corresponding to the first image, a coordinate origin of the target coordinate system is a first vertex in a second shooting area, X and Y axes of the target coordinate system are two edges of the second shooting area, the two edges are adjacent to the first vertex, and the second shooting area is a shooting area of the first camera when the first image is shot using the first shooting focal length; determine a second coordinate position of a region center of a region where the object to be confirmed is located in the first image in the target coordinate system; and in a case where the first coordinate position is different from the second coordinate position, adjust the first shooting area to the target shooting area, so that a coordinate position of the region center of the target shooting area in the target coordinate system is the same as the second coordinate position.

12. A computer readable storage medium, characterized in that, The computer-readable storage medium comprises a stored program, wherein the program is configured to execute the method of any one of claims 1 to 10 when the program is run. 13.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 10 by using the computer program.

Citation Information

Patent Citations

  • System for reducing false alarm of human-shaped upper body detection

    CN113095120A

  • Image processing method and device, electronic equipment, storage medium and program product

    CN114222065A

  • Image processing method, computer equipment and readable storage medium

    CN115082960A

  • Image acquisition method and device based on double lenses, medium and automobile data recorder

    CN115499565A

  • Shooting equipment control method and device, storage medium and electronic device

    CN116017136A