Electronic device and object detection method
By using an estimation module and a keypoint estimation network in a single monocular camera and training with multiple sets of reference images, the accuracy problem of truncated image position determination is solved, achieving efficient object detection and position determination, which is suitable for automatic vehicle warning and autonomous driving.
Patent Information
- Application Number
- CN202111600306.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-10-15
- Filing Date
- 2021-12-24
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2041-12-24
AI Technical Summary
Existing image object detection technology cannot accurately determine the position of objects in truncated images, leading to incorrect judgments by vehicle automatic warning and autonomous driving functions.
By using a single monocular camera combined with an estimation module, and by training a keypoint estimation network, the two-dimensional and three-dimensional center coordinates of the object image are calculated using multiple sets of reference images and estimation parameters, thus achieving accurate location determination of the truncated image.
Without increasing cost or complexity, the range of truncated images in three-dimensional space can be accurately determined, improving the accuracy and efficiency of object detection and reducing reaction time.
Smart Images

Figure CN114255271B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an image analysis technique, and more particularly to an electronic device and an object detection method. Background Technology
[0002] For existing image object detection technologies to accurately determine the position of objects in an image, the object must be a complete image so that the processor can correctly analyze its entire range to determine the correct object center. In other words, if the object in the image is a truncated image, the processor will be unable to correctly determine the object center and obtain incorrect position information. For example, in applications related to vehicle distance sensing, if the vehicle image in the driving video is truncated, the driver's vehicle will not be able to determine its correct position, potentially leading to incorrect judgments in subsequent functions such as automatic vehicle warning, vehicle distance detection, or autonomous driving. This problem is particularly important to address in vehicle distance sensing applications that utilize only a single monocular camera. Summary of the Invention
[0003] In view of this, the present invention provides an electronic device and an object detection method that can correctly determine the position of an object image in a sensed image.
[0004] The electronic device of the present invention includes a storage device and a processor. The storage device stores an estimation module. The processor is coupled to the storage device and is used to execute the estimation module. The processor acquires a sensed image provided by an image sensor. The processor inputs the sensed image into the estimation module, causing the estimation module to output multiple estimation parameters. The processor calculates the two-dimensional image center coordinates of an object image in the sensed image based on the multiple estimation parameters. The processor calculates the three-dimensional solid center coordinates corresponding to the object image based on the two-dimensional image center coordinates and an offset parameter among the multiple estimation parameters.
[0005] The object detection method of the present invention includes the following steps: executing an estimation module; acquiring a sensing image provided by an image sensor; inputting the sensing image into the estimation module so that the estimation module outputs multiple estimation parameters; calculating the two-dimensional image center coordinates of the object image in the sensing image based on the multiple estimation parameters; and calculating the three-dimensional solid center coordinates corresponding to the object image based on the two-dimensional image center coordinates and the offset parameter among the multiple estimation parameters.
[0006] Based on the above, the electronic device and object detection method of the present invention can determine the three-dimensional center coordinates of an object corresponding to an object image in a sensed image, so as to accurately determine the position of the object.
[0007] To make the above features and advantages of the present invention more apparent and understandable, specific embodiments are described below in conjunction with the accompanying drawings. Attached Figure Description
[0008] Figure 1 This is a schematic diagram of an electronic device according to an embodiment of the present invention.
[0009] Figure 2 This is a schematic diagram of a reference image of an embodiment of the present invention.
[0010] Figure 3 This is a flowchart of an object detection method according to an embodiment of the present invention.
[0011] Figure 4 This is a schematic diagram of a sensed image according to an embodiment of the present invention.
[0012] Figure 5 This is a schematic diagram of the sensing image results using existing object detection methods.
[0013] The symbols in the attached diagram are briefly explained as follows:
[0014] 100: Electronic device; 110: Processor; 120: Storage device; 121: Estimation module; 200: Image sensor; 210, 220: Reference image; 201: Reference object image; 202, 402, 502: Rectangular marker; 203, 205, 403, 405, 503, 505: Center point; 204, 404, 504: Cube marker; 410, 500: Sensed image; 420: Real-world schematic diagram outside the sensed image; 401: Object image; 501: Object; S310~S350: Step. Detailed Implementation
[0015] To make the contents of this invention more readily apparent, the following specific embodiments are provided as examples on which this invention can indeed be implemented. Furthermore, wherever possible, elements / components / steps referred to by the same reference numerals in the drawings and embodiments represent the same or similar parts.
[0016] Existing object detection methods generally cannot accurately determine the object's location information in truncated object images. Figure 5 This is a schematic diagram of the sensing image results from a monocular camera using existing object detection methods, where the sensing image 500 includes a truncated image of object 501. The rectangular marker 502 determined by the existing object detection method indicates the image range of object 501 in the sensing image 500, and 503 is the center of the rectangular marker 502; the cubic marker 504 determined by the existing object detection method indicates the range of object 501 in three-dimensional space, and 505 is the center of the cubic marker 504 in three-dimensional space. Figure 5It can be seen that the range of object 501 in three-dimensional space (i.e., cube marker 504) determined by existing object detection methods differs significantly from the actual position of object 501. Some applications use multiple cameras to obtain panoramic images to avoid truncated images, but these practices increase cost and the complexity of the imaging system. This invention aims to improve the accuracy of object detection methods using only a single monocular camera in determining the object position information in truncated images without increasing cost or imaging system complexity.
[0017] Figure 1 This is a schematic diagram of an electronic device according to an embodiment of the present invention. (See reference) Figure 1 The electronic device 100 includes a processor 110 and a storage device 120. The processor 110 is coupled to the storage device 120 and an external image sensor 200. The storage device 120 stores an estimation module 121. In this embodiment, the electronic device 100 may be, for example, an embedded device integrated into a vehicle, and the image sensor 200 may be, for example, an automotive camera mounted on the vehicle to capture images of the traffic conditions in front of or around the vehicle. The processor 110 may, for example, analyze the real-time images provided by the image sensor 200 to detect the positions of other vehicles and objects near the vehicle, providing relevant data for functions such as automatic vehicle warnings or autonomous driving. However, the embodiments of the electronic device of the present invention are not limited thereto. In one embodiment, the electronic device 100 may also be mounted on other mobile or static devices, and the image sensor 200 senses surrounding images, allowing the processor 110 to perform surrounding object detection operations by analyzing the real-time images provided by the image sensor 200.
[0018] In this embodiment, the estimation module 121 can be an object detection neural network (NN) module, and can be, for example, a keypoint estimation network, wherein the keypoint estimation network can be implemented using, for example, the CenterNet algorithm or the ExternalNet algorithm. The keypoint estimation network can detect objects in the image as keypoints in the image, and estimate other properties of the objects (such as object size or position) as a regression problem for the keypoints. However, the estimation module 121 of the present invention is not limited to the above description. In other embodiments of the present invention, the estimation module 121 can also be implemented using other neural network models or other similar algorithms that can estimate multiple keypoints in an image.
[0019] In this embodiment, the processor 110 may be, for example, a central processing unit (CPU), a microprocessor control unit (MCU), or a field-programmable gate array (FPGA), or similar processing or control circuitry, and the invention is not limited thereto. In this embodiment, the storage device 120 may be, for example, a memory, and is used to store the estimation module 121, the image data provided by the image sensor 200, and related software programs or algorithms for access and execution by the processor 110. The image sensor 200 may be a CMOS image sensor (CIS) or a camera with a charge-coupled device (CCD).
[0020] Figure 2 This is a schematic diagram of a reference image according to an embodiment of the present invention. (Reference) Figure 1 as well as Figure 2 In this embodiment, the estimation module 121 can be pre-trained using multiple sets of reference images and multiple sets of reference estimation parameters corresponding to the multiple sets of reference images. Each set of reference images includes at least one reference object image, and each reference object corresponds to a set of reference estimation parameters. Each set of reference images may consist of multiple reference images acquired by multiple different image sensors of a reference image collection system (e.g., an image collection vehicle with multiple external cameras), such as multiple reference images acquired by a front (main) camera and a side (auxiliary) camera. In this way, an object that is truncated in the image of the front (main) camera can have other truncated image portions of the object acquired in the image of the side (auxiliary) camera to obtain a complete image of the object for training the estimation module 121. The reference estimation parameters corresponding to each reference object can be collected by multiple different sensors, such as a distance sensor, to annotate the corresponding reference estimation parameters for each reference object. In this embodiment, each set of reference images and reference estimation parameters used to train the estimation module 121 may be, for example, the NuScenes dataset or the KITTI dataset, but the present invention is not limited thereto.
[0021] like Figure 2 As shown, Figure 2Reference images 210 and 220 can be a set of reference images. Reference images 210 and 220 can be acquired by two different image sensors. In this embodiment, reference image 210 can be acquired, for example, by a front (main) camera, and reference image 220 can be acquired, for example, by a side (auxiliary) camera. Furthermore, reference images 210 and 220 can correspond to a set of reference estimation parameters, and this set of reference estimation parameters may include, for example, multiple estimation parameters as shown in Table 1 below.
[0022] Table 1
[0023] Reference Estimated Parameters Numerical range x_Left 0 ~ Image (frame) width y_Top 0 ~ Image (frame) height x_Right 0 ~ Image (frame) width y_Bottom 0 ~ Image (frame) height <![CDATA[H cub ]]> >0 <![CDATA[W cub ]]> >0 <![CDATA[L cub ]]> >0 Loc_Z >0 Rot_Y -π~π δx -∞~∞ δy -∞~∞
[0024] Referring to Table 1 above, a set of reference estimated parameters includes those corresponding to, for example: Figure 2 The rectangular marker 202 shown has four boundary coordinates: x_Left, y_Top, x_Right, and y_Bottom. The rectangular marker 202 defines the image range of a portion of the reference object image 201 within the reference image 210 acquired by the front (main) camera. The first boundary coordinates x_Left, y_Top, x_Right, and y_Bottom can be used to determine the two-dimensional image center coordinates (x_Left, y_Top, y_Right, and y_Bottom) of the center point 203 of the rectangular marker 202. C2D ,y C2D The first boundary coordinate x_Left can be used to describe the position of the left boundary of the rectangle 202. The second boundary coordinate y_Top can be used to describe the position of the top boundary of the rectangle 202. The third boundary coordinate x_Right can be used to describe the position of the right boundary of the rectangle 202. The fourth boundary coordinate y_Bottom can be used to describe the position of the bottom boundary of the rectangle 202. Furthermore, the units for the first boundary coordinate x_Left, the second boundary coordinate y_Top, the third boundary coordinate x_Right, and the fourth boundary coordinate y_Bottom can be pixels.
[0025] Referring to Table 1 above, a set of reference estimated parameters also includes parameters corresponding to, for example: Figure 2 The height parameter H of the cube marker 204 in the reference images 210 and 220 shown. cub Width parameter W cub Length parameter L cub The camera coordinate position parameters and rotation parameter Rot_Y are defined. Cube marker 204 defines the 3D object range corresponding to the reference object image 201 in 3D space, and the height parameter H... cub Width parameter W cub Length parameter Lcub The camera coordinate position parameter and rotation parameter Rot_Y are used to determine the three-dimensional center coordinates (x, y) of the projection of the center point 205 of the cube marker 204 onto the image plane. C3D ,y C3D Height parameter H cub This can be used to describe the height of cube marker 204. Width parameter W cub This can be used to describe the width of cube marker 204. Length parameter L cub The length of cube marker 204 can be described. The rotation parameter Rot_Y describes the angle by which cube marker 204 rotates around the camera coordinate Y-axis of the front (main) camera at its center point 205; that is, the angle between the major axis of cube marker 204 and the X-axis in the camera coordinate XZ plane. Additionally, the height parameter H... cub Width parameter W cub and length parameter L cub The unit can be the meter.
[0026] Referring to Table 1 above, the camera coordinate position parameters may include the parameter Loc_Z. The camera coordinate position parameter Loc_Z can be used to describe the spatial distance on the camera coordinate Z-axis between the stereo object corresponding to the reference object image 201 in three-dimensional space and the front (main) camera, that is, the depth of the stereo object corresponding to the reference object image 201 in three-dimensional space. Furthermore, the unit of the camera coordinate position parameter Loc_Z can be meters. In other embodiments, the camera coordinate position parameters may also include parameters Loc_X and Loc_Y to describe the spatial position of the stereo object corresponding to the reference object image 201 in three-dimensional space on the camera coordinate X-axis and Y-axis, respectively.
[0027] Referring to Table 1 above, the offset parameters may include a first offset parameter δx in the horizontal direction and a second offset parameter δy in the vertical direction on the image plane corresponding to the reference image 210. The first offset parameter δx and the second offset parameter δy can be determined based on the three-dimensional center coordinates (x...). C3D ,y C3D ) and the center coordinates of the two-dimensional image (x C2D ,y C2D The offset parameters, δx and δy, are used to describe the two-dimensional image center coordinates (x, y) of the center point 203 of the rectangular marker 202 in the image plane of the reference image 210. C2D ,y C2D The three-dimensional center coordinates (x) of the cube marker 204 and the center point 205 of the cube are... C3D ,y C3DThe coordinate distance between them. Additionally, the units for the first offset parameter δx and the second offset parameter δy can be the number of pixels.
[0028] When the reference image and reference estimation parameters (e.g., the NuScenes dataset or the KITTI dataset) used to train the estimation module 121 are not labeled with corresponding offset parameters, the offset parameters can be determined for each reference object using its three-dimensional solid center coordinates (x, y, y). C3D ,y C3D ) and the center coordinates of the two-dimensional image (x C2D ,y C2D The offset parameters are calculated and each reference object is labeled. Specifically, the center coordinates of the two-dimensional image (x...) are... C2D ,y C2D The coordinates (x, y) of the center point 205 of the cube marker 204 in the camera coordinate space are obtained by calculation using the following formula (1). Based on the camera calibration matrix P of the front (main) camera according to formula (2), the coordinates (x, y) of the center point 205 of the cube marker 204 in the camera coordinate space are obtained. cub ,y cub ,z cub The length, width, and height dimensions C of the cube marker 204 after rotation by the rotation parameter Rot_Y can be described by the following formula (6). The coordinates of the eight vertices of the cube marker 204 in the three-dimensional camera coordinate space can be described by the following formula (7). The projection coordinates of the eight vertices of the cube marker 204 on the two-dimensional image plane can be described by the following formula (9), where formula (9) can be generated based on the calculations of formula (7) and formula (8). The three-dimensional solid center coordinates (x, y, y) of the projection of the center point 205 of the cube marker 204 on the image plane. C3D ,y C3D The values can be obtained by calculation using the following formula (10). Finally, the offset parameters (δx, δy) can be obtained by calculation using the following formula (11).
[0029]
[0030]
[0031] z cub =Loc_Z-P 23 ……(3)
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039] (δx,δy)=(x C3D -x C2D ,y C3D -y C2D )……(11)
[0040] In another embodiment, if the first parameter δx and the second parameter δy of the offset parameters are already labeled in the reference estimation parameters (e.g., obtained in advance by other sensors), then the calculation of the above formulas (1)-(11) does not need to be performed. In other embodiments, the estimation parameters may also include other parameters, such as object type, object truncation state, object occlusion state, etc.
[0041] In this embodiment, the estimation module 121 is also trained using an L1 loss function, which can be used, for example, by training the neural network model using the L1 loss function of the following formula (12) to regress the offset parameters (δx, δy). In formula (12), N represents the number of keypoints in the image. The predicted result represents the offset parameters (δx, δy) of object k. δ k The true offset parameter represents object k. Therefore, after the estimation module 121 is trained using the loss function in the above formula (12), the estimation module 121 can achieve accurate regression estimation of the offset parameter. However, the estimation module 121 of the present invention is not limited to the training method of the above L1 loss function. The estimation module 121 can also be trained using other loss functions, such as the mean squared error (MSE) loss function or the mean squared logarithmic error (MSLE) loss function. Other estimation parameters in Table 1, such as parameters related to object position or object size, can also be obtained by training the estimation module 121 in a similar way to regress these estimation parameters, which will not be elaborated here.
[0042]
[0043] The training process of the aforementioned estimation module 121 includes all objects appearing in the image of the front (main) camera and their spatial positions and sizes, regardless of whether these objects are truncated images or not. Furthermore, for objects that are truncated images in the front (main) camera image, the remaining truncated portion of the object can be obtained from the image of the side (auxiliary) camera to train the estimation module 121 to recognize truncated images. Therefore, the estimation module 121 trained in the above way can more accurately identify and locate truncated objects in the image, so that it can correctly determine the range of the truncated object in three-dimensional space based on only a single monocular camera image (rather than multiple camera images), without encountering the aforementioned... Figure 5 The error in the image. Thus, after training, once the estimation module 121 is complete, it can output multiple detection estimation parameters as shown in Table 1 above, simply by inputting an image sensed by a single monocular camera. The processor 110 can then calculate the coordinates (x, y) of the two-dimensional image center based on these multiple detection estimation parameters output by the estimation module 121. C2D ,y C2D ), and can be based on the center coordinates (x) of the two-dimensional image. C2D ,y C2D The offset parameters (δx, δy) output by the estimation module 121 are used to further calculate the coordinates of the three-dimensional solid center (x). C3D ,y C3D ).
[0044] Figure 3 This is a flowchart of an object detection method according to an embodiment of the present invention. Figure 4 This is a schematic diagram of a sensed image according to an embodiment of the present invention. (See reference) Figure 1 , Figure 3 as well as Figure 4 The electronic device 100 can perform the following steps S310 to S350 to realize the object detection function, and Figure 4A sensed image 410 from an image sensor 200 (e.g., a monocular camera) and a real-world schematic diagram 420 outside the range of the sensed image 410 (i.e., not captured by the image sensor 200) are shown to aid the illustration. The sensed image 410 may include an object image 401, and the object image 401 is a vehicle image. Notably, the object image 401 is a truncated image in the sensed image 410. In step S310, the processor 110 may execute the estimation module 121. In step S320, the processor 110 may acquire the sensed image 410 provided by the image sensor 200. In this embodiment, the electronic device 100 only needs to perform object detection using a single image sensor 200 in actual object detection applications. In step S330, the processor 110 may input the sensed image 410 into the estimation module 121, so that the estimation module 121 outputs multiple key points and corresponding multiple sets of detection estimation parameters, wherein each key point corresponds to a specific object detected from the sensed image 410. Figure 4 Only one object image 401 is shown for illustration, but those skilled in the art will understand that multiple object images (e.g., multiple vehicles) may also be detected in the sensing image 410.
[0045] In this embodiment, the corresponding detection estimation parameters may include multiple estimation parameters as shown in Table 1 above. Specifically, the processor 110 may subsequently define a rectangular marker 402 for the object image 401, and the multiple estimation parameters include first boundary coordinates, second boundary coordinates, third boundary coordinates, and fourth boundary coordinates corresponding to the rectangular marker 402. The first boundary coordinates can be used to describe the position of the left boundary of the rectangular marker 402. The second boundary coordinates can be used to describe the position of the upper boundary of the rectangular marker 402. The third boundary coordinates can be used to describe the position of the right boundary of the rectangular marker 402. The fourth boundary coordinates can be used to describe the position of the lower boundary of the rectangular marker 402. In this embodiment, the processor 110 may subsequently define a cube marker 404 for the object image 401, and the multiple estimation parameters also include height parameters, width parameters, length parameters, camera coordinate position parameters, and rotation parameters corresponding to the cube marker 404. Figure 4 As shown, the rectangular marker 402 is the image range of the object image 401 in the sensing image 410, while the cube marker 404 is the range of the object in the object image 401 in three-dimensional space, which may have a portion located outside the range of the sensing image 410.
[0046] In step S340, the processor 110 can calculate the two-dimensional image center coordinates (x, y, x) of the object image 401 in the sensed image 410 based on multiple estimation parameters. C2D ,y C2DIn this embodiment, the processor 110 can calculate the two-dimensional image center coordinates (x, y) of the center point 403 of the rectangular mark 402 based on the first boundary coordinates, the second boundary coordinates, the third boundary coordinates, and the fourth boundary coordinates. C2D ,y C2D ).
[0047] In step S350, the processor 110 can determine the center coordinates (x, y) of the two-dimensional image based on the coordinates (x, y). C2D ,y C2D The offset parameters (δx, δy) are used to calculate the three-dimensional center coordinates (x, y) of the stereo object corresponding to the center of the stereo object in the object image 401. C3D ,y C3D (i.e., the projection of the center point 405 of the cube marker 404 onto the image plane). In this embodiment, the processor 110 can convert the center coordinates (x, y) of the two-dimensional image into coordinates (x, y). C2D ,y C2D The coordinates of the three-dimensional solid center (x) are added together with the offset parameters (δx, δy) to obtain the coordinates of the center (x). C3D ,y C3D In one embodiment, the processor 110 can also determine the three-dimensional solid center coordinates (x, y) of the center point 405 of the cube marker 404. C3D ,y C3D The corresponding height, width, length, camera coordinate position, and rotation parameters output by the estimation module 121 are used to calculate the coordinates of each vertex of the cube mark 404 corresponding to the object image 401. The calculation method can be deduced by reverse calculation process of the above formulas (1)-(11), and will not be elaborated here.
[0048] It is worth noting that since the object image 401 is a truncated image in the sensing image 410, at least one of the first and second parameters of the offset parameter is not 0. In other words, because the rectangular marker 402 only indicates the image range of the object image 401 in the sensing image 410, while the cube marker 404 indicates the complete range of the object in the object image 401 in three-dimensional space, and some parts may be located outside the sensing image 410, the center point 403 of the rectangular marker 402 and the center point 405 of the cube marker 404 will not overlap. Figure 4 As shown, the center point 405 of the cube marker 404 may even be outside the image range of the sensing image 410. Conversely, when the object image is a complete image, both the first and second parameters of the offset parameter are generally 0. Furthermore, in other embodiments, the center point 405 of the cube marker 404 may also be within or outside the image range of the sensing image 410, and is not limited to this. Figure 4As shown. The distance between the center point 403 of the rectangular marker 402 and the center point 405 of the cube marker 404 (i.e., the value of the offset parameter (δx, δy)) is affected by the degree of truncation of the object image 401. The distance between the center point 403 of the rectangular marker 402 and the center point 405 of the cube marker 404 can be positively correlated with the degree of truncation of the object image 401. In this way, the electronic device 100 can obtain the correct real position of the actual object in the image plane of the sensing image 410, so that subsequent functions such as automatic vehicle warning, vehicle distance detection, or automatic vehicle driving can be effectively executed using the correct object distance detection results.
[0049] From another perspective, when the vehicle performs functions such as automatic vehicle warning, vehicle distance detection, or autonomous driving, the processor 110 does not need to wait for the image sensor 200 to obtain a sensing image with a complete vehicle image before performing the correct distance and / or position determination. Instead, it can immediately perform the correct distance and / or position determination even for truncated vehicle images. Therefore, the electronic device and object detection method of the present invention can also improve object detection efficiency and shorten response time.
[0050] In addition, for the various estimation parameters and related parameter calculations in this embodiment, please refer to the above. Figure 2 The multiple estimated parameters and related parameter calculations described in the embodiments are used to derive and apply the methods accordingly, thus providing sufficient teaching, suggestions and implementation methods, and therefore will not be elaborated further here.
[0051] In summary, the electronic device and object detection method of the present invention can provide highly reliable estimation results of the actual position information of the object in the image plane of the sensed image for truncated object images. The present invention includes all objects appearing in the images of multiple cameras and their spatial positions and sizes during the training process of the estimation module. Furthermore, since an object that is truncated in one camera's image can have other truncated image portions obtained from another camera's image to train the estimation module to recognize truncated images, it can more accurately identify and locate truncated objects in images, enabling the correct determination of the truncated object's range in three-dimensional space based solely on a single monocular camera image.
[0052] The above description is only a preferred embodiment of the present invention, but it is not intended to limit the scope of the present invention. Any person skilled in the art can make further improvements and changes on this basis without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be determined by the scope defined in the claims of this application.
Claims
1. An electronic device, characterized in that, include: A storage device stores an estimation module, wherein the estimation module is pre-trained using multiple sets of reference images and multiple sets of reference estimation parameters corresponding to reference object images in the multiple sets of reference images, wherein the reference estimation parameters include a height parameter, a width parameter, and a length parameter, wherein the height parameter, the width parameter, and the length parameter are respectively the height, width, and length of the cube marker corresponding to the reference object image in three-dimensional space; as well as The processor, coupled to the storage device, is used to execute the estimation module. The processor acquires a sensed image provided by an image sensor and inputs this sensed image into the estimation module, causing the estimation module to output multiple estimation parameters. These multiple estimation parameters include the height parameter, the width parameter, and the length parameter corresponding to the object image in the sensed image. The processor calculates the two-dimensional image center coordinates of the object image in the sensed image based on the multiple estimation parameters. It also calculates the three-dimensional solid center coordinates corresponding to the object image based on the two-dimensional image center coordinates and the offset parameter among the multiple estimation parameters. Finally, it calculates the coordinates of each vertex of the cube marker corresponding to the object image based on the three-dimensional solid center coordinates, the height parameter, the width parameter, and the length parameter. The offset parameter includes a first parameter in the horizontal direction and a second parameter in the vertical direction on the image plane corresponding to the sensed image. The first parameter and the second parameter are determined based on the three-dimensional center coordinates and the two-dimensional image center coordinates. The first parameter and the second parameter are used to describe the coordinate distance between the two-dimensional image center coordinates and the three-dimensional center coordinates, which are affected by the degree of truncation of the object image.
2. The electronic device of claim 1, wherein when the object image is a complete image, the first parameter and the second parameter are 0. When the object image is a truncated image, at least one of the first parameter and the second parameter is not 0.
3. The electronic device of claim 1, wherein the processor defines a rectangular marker for the object image, and the plurality of estimated parameters include first boundary coordinates, second boundary coordinates, third boundary coordinates, and fourth boundary coordinates corresponding to the rectangular marker. The processor calculates the center coordinates of the two-dimensional image based on the first boundary coordinates, the second boundary coordinates, the third boundary coordinates, and the fourth boundary coordinates.
4. The electronic device of claim 1, wherein the three-dimensional center coordinates corresponding to the object image are outside the object image.
5. The electronic device of claim 1, wherein the processor adds the center coordinates of the two-dimensional image and the offset parameter to obtain the center coordinates of the three-dimensional solid.
6. The electronic device of claim 1, wherein the image sensor is a single monocular camera.
7. The electronic device of claim 1, wherein the offset parameter in the reference estimation parameters used to train the estimation module is calculated from other estimation parameters in the reference estimation parameters.
8. An object detection method, characterized in that, include: An estimation module is executed, wherein the estimation module is pre-trained using multiple sets of reference images and multiple sets of reference estimation parameters corresponding to reference object images in the multiple sets of reference images. The reference estimation parameters include height parameters, width parameters, and length parameters, wherein the height parameter, the width parameter, and the length parameter are respectively the height, width, and length of the cube marker corresponding to the reference object image in three-dimensional space. Acquire the sensor image provided by the image sensor; The sensed image is input into the estimation module so that the estimation module outputs multiple estimation parameters, including the height parameter, the width parameter, and the length parameter corresponding to the object image in the sensed image; The two-dimensional image center coordinates of the object image in the sensed image are calculated based on the multiple estimated parameters. as well as The three-dimensional center coordinates corresponding to the object image are calculated based on the center coordinates of the two-dimensional image and the offset parameter among the multiple estimated parameters. Then, the coordinates of each vertex of the cube marker corresponding to the object image are calculated based on the three-dimensional center coordinates, the height parameter, the width parameter, and the length parameter. The offset parameter includes a first parameter in the horizontal direction and a second parameter in the vertical direction on the image plane corresponding to the sensed image. The first parameter and the second parameter are determined based on the three-dimensional center coordinates and the two-dimensional image center coordinates. The first parameter and the second parameter are used to describe the coordinate distance between the two-dimensional image center coordinates and the three-dimensional center coordinates, which are affected by the degree of truncation of the object image.
9. The object detection method as described in claim 8, wherein when the object image is a complete image, the first parameter and the second parameter are both 0. When the object image is a truncated image, at least one of the first parameter and the second parameter is not 0.
10. The object detection method as described in claim 8, wherein the step of calculating the center coordinates of the image includes: Define a rectangular marker for the object image, wherein the plurality of estimated parameters include first boundary coordinates, second boundary coordinates, third boundary coordinates, and fourth boundary coordinates corresponding to the rectangular marker; and The center coordinates of the two-dimensional image are calculated based on the first boundary coordinates, the second boundary coordinates, the third boundary coordinates, and the fourth boundary coordinates.
11. The object detection method as claimed in claim 8, wherein the three-dimensional center coordinates corresponding to the object image are outside the object image.
12. The object detection method as described in claim 8, wherein the step of calculating the three-dimensional center coordinates of the object image includes: The center coordinates of the two-dimensional image and the offset parameter are added together to obtain the center coordinates of the three-dimensional solid.
13. The object detection method as claimed in claim 8, wherein the image sensor is a single monocular camera.
14. The object detection method as described in claim 8, wherein the step of training the estimation module includes: The offset parameter in the reference estimation parameter is calculated from the other estimation parameters in the reference estimation parameter.
Citation Information
Patent Citations
Object space parameter detection method and device, electronic device and storage medium
CN110826499A
Image detection method and device
CN111627001A