IP Library › Granted Patent US 12,354,385
Granted Patent B2
US 12,354,385 · App. 17/901,704 · Granted Jul 8, 2025

Image processing method and apparatus, electronic device, and computer-readable storage medium for identifying two-dimensional shapes using a depth image

Inventors: Shenghao Zhang (Shenzhen, CN); Yonggen Ling (Shenzhen, CN); Wanchao Chi (Shenzhen, CN); Yu Zheng (Shenzhen, CN); Xinyang Jiang (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
G06V20/653G06T7/564G06T7/62G06T7/70G06T11/003G06T2207/10028
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,354,385
App. No.
17/901,704
Granted
Jul 8, 2025
Kind
B2
Abstract

The present disclosure provides an image processing method and apparatus, an electronic device, and a computer-readable storage medium. The method includes: obtaining a first three-dimensional image of a target object in a three-dimensional coordinate system; determining a target plane of the target object in the first three-dimensional image, the target plane comprising target three-dimensional points; projecting the target three-dimensional points to a two-dimensional coordinate system defined on the target plane, to obtain target two-dimensional points; determining a target polygon and a minimum circumscribed target graphic of the target polygon according to the target two-dimensional points; and recognizing the minimum circumscribed target graphic as a first target graphic of the target object in the first target three-dimensional image.

Claims (97)

1. An image processing method performed by an electronic device, the method comprising:

obtaining a depth image of a target object in a three-dimensional coordinate system by using a first image capture device;

obtaining a pose matrix of the first image capture device in the three-dimensional coordinate system;

performing coordinate transformation on the depth image according to the pose matrix of the first image capture device, to obtain a first target three-dimensional image of the target object in the three-dimensional coordinate system;

determining a target plane of the target object in the first three-dimensional image via plane fitting, the target plane comprising target three-dimensional points in the three-dimensional coordinate system;

projecting the target three-dimensional points to a two-dimensional coordinate system defined on the target plane, to obtain target two-dimensional points in the two-dimensional coordinate system;

determining a target polygon and a minimum circumscribed target graphic of the target polygon in the two-dimensional coordinate system according to the target two-dimensional points, wherein the minimum circumscribed target graphic is a target minimum circumscribed circle;

obtaining a first target center of the target minimum circumscribed circle in the two-dimensional coordinate system;

mapping the first target center from the two-dimensional coordinate system to the three-dimensional coordinate system, to obtain a target coordinate value of the first target center in the three-dimensional coordinate system, the target coordinate value being a first center coordinate value of the first target circle in the three-dimensional coordinate system; and

recognizing the target minimum circumscribed circle as a first target circle of the target object in the first target three-dimensional image when an area ratio between the target polygon and the target minimum circumscribed circle is greater than a predefined threshold.

2. The method according to claim 1 , wherein the method further comprises:

determining a radius of the first target circle in the three-dimensional coordinate system according to the first center coordinate value and a coordinate value of a three-dimensional contour point of the first target circle.

3. The method according to claim 2 , wherein the mapping the first target center from the two-dimensional coordinate system to the three-dimensional coordinate system, to obtain a target coordinate value of the first target center in the three-dimensional coordinate system comprises:

determining a three-dimensional start point in the target three-dimensional points;

mapping the three-dimensional start point from the three-dimensional coordinate system to the two-dimensional coordinate system, to obtain a two-dimensional start point;

obtaining a target distance between the two-dimensional start point and the first target center in the two-dimensional coordinate system;

using a target three-dimensional point adjacent to the three-dimensional start point as a three-dimensional search point, and mapping the three-dimensional search point from the three-dimensional coordinate system to the two-dimensional coordinate system to obtain a two-dimensional search point; and

using a coordinate value of the three-dimensional start point as the target coordinate value when a distance between the two-dimensional search point and the first target center is greater than or equal to the target distance.

4. The method according to claim 3 , wherein the mapping the first target center from the two-dimensional coordinate system to the three-dimensional coordinate system, to obtain a target coordinate value of the first target center in the three-dimensional coordinate system further comprises:

determining, when there are two-dimensional search points whose distances to the first target center are less than the target distance, a target two-dimensional search point that has a minimum distance to the first target center in the two-dimensional search points;

updating the target distance by using the distance between the target two-dimensional search point and the first target center, and updating the three-dimensional start point by using a three-dimensional search point corresponding to the target two-dimensional search point;

mapping an updated three-dimensional start point from the three-dimensional coordinate system to the two-dimensional coordinate system, to update the two-dimensional start point; and

updating the three-dimensional search point by using a target three-dimensional point adjacent to the updated three-dimensional start point, and mapping an updated three-dimensional search point from the three-dimensional coordinate system to the two-dimensional coordinate system to update the two-dimensional search point.

5. The method according to claim 1 , wherein the projecting the target three-dimensional points to a two-dimensional coordinate system defined on the target plane, to obtain target two-dimensional points in the two-dimensional coordinate system comprises:

determining target three-dimensional contour points of the target plane in the target three-dimensional points; and

projecting the target three-dimensional contour points from the three-dimensional coordinate system to the two-dimensional coordinate system, to obtain target two-dimensional contour points, so as to determine the target polygon according to the target two-dimensional contour points.

6. The method according to claim 2 , further comprising:

obtaining a second three-dimensional image of the target object in the three-dimensional coordinate system, and the target object comprising a target circular plane;

determining a second target circle and a second center coordinate value of a second target center of the second target circle in the second target three-dimensional image;

determining a first distance between the first target center and the first image capture device that captures the first target three-dimensional image;

determining a second distance between the second target center and the first image capture device that captures the second target three-dimensional image; and

determining a target center coordinate value of the target circular plane of the target object according to the first distance, the second distance, the first target center coordinate value, and the second target center coordinate value.

7. The method according to claim 6 , further comprising:

determining a first radius of the first target circle and a second radius of the second target circle; and

determining a target radius of the target circular plane according to the first distance, the second distance, the first radius, and the second radius.

8. The method according to claim 2 , wherein the mapping the first target center from the two-dimensional coordinate system to the three-dimensional coordinate system, to obtain a target coordinate value of the first target center in the target three-dimensional coordinate system comprises:

mapping the first target center from the two-dimensional coordinate system to the three-dimensional coordinate system, to obtain a target mapped point and a coordinate value of the target mapped point;

obtaining a distance between the target mapped point and the three-dimensional contour point of the first target circle; and

using the coordinate value of the target mapped point as the target coordinate value of the first target center in the three-dimensional coordinate system when the distance between the three-dimensional contour point of the first target circle and the target mapped point falls within a predefined range.

9. An electronic device, comprising:

one or more processors; and

a storage apparatus, configured to store one or more programs,

the one or more programs, when executed by the one or more processor, causing the electronic device to implement an image processing method including:

obtaining a depth image of a target object in a three-dimensional coordinate system by using a first image capture device;

obtaining a pose matrix of the first image capture device in the three-dimensional coordinate system;

performing coordinate transformation on the depth image according to the pose matrix of the first image capture device, to obtain a first target three-dimensional image of the target object in the three-dimensional coordinate system;

determining a target plane of the target object in the first three-dimensional image via plane fitting, the target plane comprising target three-dimensional points in the three-dimensional coordinate system;

projecting the target three-dimensional points to a two-dimensional coordinate system defined on the target plane, to obtain target two-dimensional points in the two-dimensional coordinate system;

determining a target polygon and a minimum circumscribed target graphic of the target polygon in the two-dimensional coordinate system according to the target two-dimensional points, wherein the minimum circumscribed target graphic is a target minimum circumscribed circle;

obtaining a first target center of the target minimum circumscribed circle in the two-dimensional coordinate system;

mapping the first target center from the two-dimensional coordinate system to the three-dimensional coordinate system, to obtain a target coordinate value of the first target center in the three-dimensional coordinate system, the target coordinate value being a first center coordinate value of the first target circle in the three-dimensional coordinate system; and

recognizing the target minimum circumscribed circle as a first target circle of the target object in the first target three-dimensional image when an area ratio between the target polygon and the target minimum circumscribed circle is greater than a predefined threshold.

10. The electronic device according to claim 9 , wherein the method further comprises:

determining a radius of the first target circle in the three-dimensional coordinate system according to the first center coordinate value and a coordinate value of a three-dimensional contour point of the first target circle.

11. The electronic device according to claim 10 , wherein the mapping the first target center from the two-dimensional coordinate system to the three-dimensional coordinate system, to obtain a target coordinate value of the first target center in the three-dimensional coordinate system comprises:

determining a three-dimensional start point in the target three-dimensional points;

mapping the three-dimensional start point from the three-dimensional coordinate system to the two-dimensional coordinate system, to obtain a two-dimensional start point;

obtaining a target distance between the two-dimensional start point and the first target center in the two-dimensional coordinate system;

using a target three-dimensional point adjacent to the three-dimensional start point as a three-dimensional search point, and mapping the three-dimensional search point from the three-dimensional coordinate system to the two-dimensional coordinate system to obtain a two-dimensional search point; and

using a coordinate value of the three-dimensional start point as the target coordinate value when a distance between the two-dimensional search point and the first target center is greater than or equal to the target distance.

12. The electronic device according to claim 11 , wherein the mapping the first target center from the two-dimensional coordinate system to the three-dimensional coordinate system, to obtain a target coordinate value of the first target center in the three-dimensional coordinate system further comprises:

determining, when there are two-dimensional search points whose distances to the first target center are less than the target distance, a target two-dimensional search point that has a minimum distance to the first target center in the two-dimensional search points;

updating the target distance by using the distance between the target two-dimensional search point and the first target center, and updating the three-dimensional start point by using a three-dimensional search point corresponding to the target two-dimensional search point;

mapping an updated three-dimensional start point from the three-dimensional coordinate system to the two-dimensional coordinate system, to update the two-dimensional start point; and

updating the three-dimensional search point by using a target three-dimensional point adjacent to the updated three-dimensional start point, and mapping an updated three-dimensional search point from the three-dimensional coordinate system to the two-dimensional coordinate system to update the two-dimensional search point.

13. The electronic device according to claim 9 , wherein the projecting the target three-dimensional points to a two-dimensional coordinate system defined on the target plane, to obtain target two-dimensional points in the two-dimensional coordinate system comprises:

determining target three-dimensional contour points of the target plane in the target three-dimensional points; and

projecting the target three-dimensional contour points from the three-dimensional coordinate system to the two-dimensional coordinate system, to obtain target two-dimensional contour points, so as to determine the target polygon according to the target two-dimensional contour points.

14. The electronic device according to claim 10 , wherein the method further comprises:

obtaining a second three-dimensional image of the target object in the three-dimensional coordinate system, and the target object comprising a target circular plane;

determining a second target circle and a second center coordinate value of a second target center of the second target circle in the second target three-dimensional image;

determining a first distance between the first target center and an image capture device that captures the first target three-dimensional image;

determining a second distance between the second target center and the image capture device that captures the second target three-dimensional image; and

determining a target center coordinate value of the target circular plane of the target object according to the first distance, the second distance, the first target center coordinate value, and the second target center coordinate value.

15. The electronic device according to claim 14 , wherein the method further comprises:

determining a first radius of the first target circle and a second radius of the second target circle; and

determining a target radius of the target circular plane according to the first distance, the second distance, the first radius, and the second radius.

16. The electronic device according to claim 10 , wherein the mapping the first target center from the two-dimensional coordinate system to the three-dimensional coordinate system, to obtain a target coordinate value of the first target center in the target three-dimensional coordinate system comprises:

mapping the first target center from the two-dimensional coordinate system to the three-dimensional coordinate system, to obtain a target mapped point and a coordinate value of the target mapped point;

obtaining a distance between the target mapped point and the three-dimensional contour point of the first target circle; and

using the coordinate value of the target mapped point as the target coordinate value of the first target center in the three-dimensional coordinate system when the distance between the three-dimensional contour point of the first target circle and the target mapped point falls within a predefined range.

17. The electronic device according to claim 9 , wherein the first three-dimensional image is obtained by using a depth image; and the obtaining a first three-dimensional image of a target object in a three-dimensional coordinate system comprises:

obtaining the depth image by using a first image capture device;

obtaining a pose matrix of the first image capture device in the three-dimensional coordinate system; and

performing coordinate transformation on the depth image according to the pose matrix of the first image capture device, to obtain the first target three-dimensional image.

18. A non-transitory computer-readable storage medium, storing a computer program, the program, when executed by a processor of an electronic device, causes the electronic device to implement an image processing method including:

obtaining a depth image of a target object in a three-dimensional coordinate system by using a first image capture device;

obtaining a pose matrix of the first image capture device in the three-dimensional coordinate system;

performing coordinate transformation on the depth image according to the pose matrix of the first image capture device, to obtain a first target three-dimensional image of the target object in the three-dimensional coordinate system;

determining a target plane of the target object in the first three-dimensional image via plane fitting, the target plane comprising target three-dimensional points in the three-dimensional coordinate system;

projecting the target three-dimensional points to a two-dimensional coordinate system defined on the target plane, to obtain target two-dimensional points in the two-dimensional coordinate system;

determining a target polygon and a minimum circumscribed target graphic of the target polygon in the two-dimensional coordinate system according to the target two-dimensional points, wherein the minimum circumscribed target graphic is a target minimum circumscribed circle;

obtaining a first target center of the target minimum circumscribed circle in the two-dimensional coordinate system:

mapping the first target center from the two-dimensional coordinate system to the three-dimensional coordinate system, to obtain a target coordinate value of the first target center in the three-dimensional coordinate system, the target coordinate value being a first center coordinate value of the first target circle in the three-dimensional coordinate system; and

recognizing the target minimum circumscribed circle as a first target circle of the target object in the first target three-dimensional image when an area ratio between the target polygon and the target minimum circumscribed circle is greater than a predefined threshold.

19. The non-transitory computer-readable storage medium according to claim 18 , wherein the method further comprises:

determining a radius of the first target circle in the three-dimensional coordinate system according to the first center coordinate value and a coordinate value of a three-dimensional contour point of the first target circle.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 27, 2022
From: ZHANG, SHENGHAO; LING, YONGGEN; CHI, WANCHAO; ZHENG, YU; JIANG, XINYANG
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 061231/0233 →
Priority Claims (1)
CN 202010825936.3 · Aug 17, 2020 · national
Continuity (2)
Continuation PCTCN2021102741 · Jun 28, 2021
Related Publication 20220415064A1 · Dec 29, 2022
References Cited (27)
US 10671835B2 · Zou · 2020 [cited by examiner]
US 20130114861A1 · Takizawa · 2013 [cited by applicant]
US 20190272411A1 · Zou et al. · 2019 [cited by applicant]
US 20190278288A1 · Xiong et al. · 2019 [cited by applicant]
US 20200198149A1 · Jiang et al. · 2020 [cited by applicant]
CN 101499132A · 2009 [cited by applicant]
CN 102316337A · 2012 [cited by applicant]
CN 105844631A · 2016 [cited by applicant]
CN 106204540A · 2016 [cited by applicant]
CN 106780617A · 2017 [cited by applicant]
CN 107194954A · 2017 [cited by applicant]
CN 109242874A · 2019 [cited by applicant]
CN 110012182A · 2019 [cited by applicant]
CN 110135278A · 2019 [cited by applicant]
CN 110942476A · 2020 [cited by applicant]
CN 111065048A · 2020 [cited by applicant]
CN 112052847A · 2020 [cited by applicant]
WO WO2019053468A1 · 2019 [cited by examiner]
Bochkarev, Sergey O., Igor B. Litus, and Natalia S. Kravchenko. “Irregular objects. shape detection and characteristic sizes.” Proceedings of the 1st International Workshop on Radio Electronics and Information Technolog… [cited by examiner]
Fu, Tianyu, et al. “Dynamically grasping with incomplete information workpiece based on machine vision.” 2019 IEEE International Conference on Unmanned Systems (ICUS). IEEE, 2019. (Year: 2019) [cited by examiner]
Tencent Technology, ISR, PCT/CN2021/102741, Sep. 29, 2021, 2 pgs. [cited by applicant]
Sergey O. Bochkarev et al., “Irregular Objects. Shape Detection and Characteristic Sizes”, Proceedings of the 1st International Workshop on Radio Electronics & Information Technologies, Mar. 15, 2017, XP093105354, 8 pgs. [cited by applicant]
Tencent Technology, Extended European Search Report and Supplementary Search Report, EP21857355.8, Dec. 6, 2023, 10 pgs. [cited by applicant]
Tencent Technology, WO, PCT/CN2021/102741, Sep. 29, 2021, 5 pgs. [cited by applicant]
Tencent Technology, IPRP, PCT/CN2021/102741, Feb. 16, 2023, 6 pgs. [cited by applicant]
Zhou et al., “A Method of Two Dimensional Otsu Image Threshold Segmentation Based on Improved Firefly Algorithm”, The 5 [cited by applicant]
Yi et al., “Face Feature-Points Location Based on 3D Transform Shape Search”, Journal of Computer Applications, vol. 30, No. 3, Mar. 2010, www.joca.en/EN/abstract/abstract12689.shtml. [cited by applicant]