| CPC G06T 7/50 (2017.01) [G02B 7/04 (2013.01); G06F 18/214 (2023.01); G06F 18/217 (2023.01); G06N 20/00 (2019.01); G06T 7/30 (2017.01); G06T 7/70 (2017.01); G06T 7/90 (2017.01); G06V 10/225 (2022.01); G06V 20/188 (2022.01); G06V 20/70 (2022.01); H04N 23/60 (2023.01); G06T 2207/10024 (2013.01); G06T 2207/20081 (2013.01); G06T 2207/30188 (2013.01); G06T 2207/30242 (2013.01); G06T 2207/30244 (2013.01)] | 17 Claims |

|
1. A method for measuring a growth height of a plant, the method being implemented by an electronic device, which is connected to a camera device, the method comprising:
in response to a received height measurement request, determining a plant to be detected according to the received height measurement request;
controlling the camera device to capture the plant to be detected, and obtaining a color image and a depth image of the plant to be detected, each of the color image and the depth image comprising a plurality of plants to be detected;
detecting the color image by a pre-trained detection model, and obtaining a plurality of detection boxes comprising the plurality of plants to be detected;
aligning the color image and the depth image by an image alignment algorithm and obtaining an alignment image, comprising: acquiring depth pixels of the depth image; mapping the depth pixels to a preset depth coordinate system, and obtaining depth coordinates of the depth pixels; determining global coordinates of the depth pixels according to the depth coordinates and a preset global coordinate system; determining positions of the depth pixels on the color image according to the global coordinates, determining color pixels corresponding to the positions on the color image; and obtaining the alignment image by merging each of the depth pixels with corresponding color pixel;
acquiring a plurality of target boxes corresponding to the plurality of detection boxes from the alignment image;
determining a plurality of depth values of the plurality of target boxes based on the alignment image, and determining a quantity of the plurality of target boxes; and
determining a height of the plant to be detected according to the plurality of depth values and the quantity of the plurality of target boxes.
|