Electronic device for obtaining distance information and method for controlling the same
An electronic device includes an image sensor, a light transmission module including light transmission elements, a light reception module including light reception elements, and a processor operatively connected with the image sensor, the light transmission module, and the light reception module. The processor obtains first distance information through the light transmission elements and the light reception elements, obtains a first frame and a second frame through the image sensor, obtains area information related to an area of the second frame, in which a difference in pixel value from the first frame is a set value or more, through the image sensor, activates a light transmission element corresponding to the area among the light transmission elements based on the area information, and obtains second distance information about the area through the activated light transmission element and at least one of the light reception elements.
1 . An electronic device comprising:
at least one image sensor;
at least one light detection and ranging (LIDAR) sensor, configured to obtain distance information about an area corresponding to at least a partial area of at least one frame obtained through the image sensor, comprising a light transmission module including a plurality of light transmission elements and a light reception module including a plurality of light reception elements, and
at least one processor operatively connected with the image sensor, the light transmission module, and the light reception module;
wherein the at least one processor is configured to:
obtain first distance information through the plurality of light transmission elements and the plurality of light reception elements,
obtain, through the at least one image sensor, at least one first frame and at least one second frame, wherein the at least one second frame is obtained after obtaining the at least one first frame,
obtain, through the at least one image sensor, area information related to an area of the at least one second frame satisfying a specified condition related to a pixel difference between the at least one first frame and the at least one second frame, while the at least one LIDAR sensor is deactivated,
based on the area information, activate a light transmission element corresponding to the area among the plurality of light transmission elements and a light reception element corresponding to the area among the plurality of light reception elements, and
obtain second distance information about the area by outputting light to the area from the activated light transmission element corresponding to the area and receiving reflected light of the output light from the area by at least one of the plurality of light reception elements.
2 . The electronic device of claim 1 , wherein the at least one processor is configured to,
identify the second distance information as distance information about the area and use the first distance information as distance information about an area other than the area.
3 . The electronic device of claim 1 , wherein the at least one processor is configured to:
obtain the second distance information about the area through the activated light transmission element and the activated light reception element.
4 . The electronic device of claim 1 , further comprising a memory,
wherein the image sensor is configured to:
store a pixel value of each of pixels included in the at least one first frame in the memory,
obtain the at least one second frame,
obtain, for each of the pixels, a difference between a pixel included in the at least one second frame among the pixels and the stored pixel value of the pixel included in the at least one first frame, and
wherein the specified condition related to a pixel difference includes the difference in pixel value from the at least one first frame and the at least one second frame is a set value or more.
5 . The electronic device of claim 1 , wherein the light transmission module and the light reception module include a plurality of element groups arrayed in a lattice form, and
wherein each of the plurality of element groups includes one or more light transmission elements and one or more light reception elements corresponding to the one or more light transmission elements.
6 . The electronic device of claim 5 , wherein the at least one processor is configured to,
activate the one or more light transmission elements included in at least one or more element group related to the area.
7 . The electronic device of claim 1 , wherein the at least one processor is configured to increase power of the activated light transmission element based on failing to obtain the second distance information about the area through the activated light transmission element and the at least one of the plurality of light reception elements.
8 . The electronic device of claim 1 , wherein the at least one processor is configured to increase a pulse interval of the activated light transmission element based on failing to obtain the second distance information about the area through the activated light transmission element and the at least one of the plurality of light reception elements.
9 . The electronic device of claim 1 , wherein the image sensor is provided in plural, and
the at least one processor is configured to obtain third distance information based on a disparity between a third frame and a fourth frame obtained through two of the plurality of image sensors based on failing to obtain the second distance information about the area through the activated light transmission element and the at least one of the plurality of light reception elements.
10 . A method for controlling an electronic device, the method comprising:
obtaining first distance information through a plurality of light transmission elements included in a light transmission module and a plurality of light reception elements included in a light reception module, wherein the light transmission module and the light reception module are included in at least one light detection and ranging (LIDAR) sensor configured to obtain distance information about an area corresponding to at least a partial area of at least one frame obtained through at least one image sensor of the electronic device;
obtaining, through the at least one image sensor, at least one first frame and at least one second frame, wherein the at least one second frame is obtained after obtaining the at least one first frame;
obtaining, through the at least one image sensor, area information related to an area of the at least one second frame satisfying a specified condition related to a pixel difference between the at least one first frame and the at least one second frame while the at least one LIDAR sensor is deactivated;
based on the area information, activating a light transmission element corresponding to the area among the plurality of light transmission elements and a light reception element corresponding to the area among the plurality of light reception elements based; and
obtaining second distance information about the area by outputting light to the area from the activated light transmission element corresponding to the area and receiving reflected light of the output light from the area by at least one of the plurality of light reception elements.
11 . The method of claim 10 , further comprising identifying the second distance information as distance information about the area and using the first distance information as distance information about an area other than the area.
12 . The method of claim 10 ,
wherein the obtaining the second distance information about the area comprises obtaining the second distance information about the area through the activated light transmission element and the activated light reception element.
13 . The method of claim 10 , wherein the obtaining the area information related to the area of the at least one second frame, in which the difference in pixel value from the at least one first frame is the set value or more, through the image sensor, comprises:
storing a pixel value of each of pixels included in the at least one first frame in a memory,
obtaining the at least one second frame,
obtaining, for each of the pixels, a difference between a pixel value of a pixel included in the at least one second frame among the pixels and the stored pixel value of the pixel included in the at least one first frame, and
wherein the specified condition related to a pixel difference includes the difference in pixel value from the at least one first frame and the at least one second frame is a set value or more.
14 . The method of claim 10 , wherein the light transmission module and the light reception module include a plurality of element groups arrayed in a lattice form, and
wherein each of the plurality of element groups includes one or more light transmission elements and one or more light reception elements corresponding to the one or more light transmission elements.
15 . The method of claim 14 , wherein the activating the light transmission element corresponding to the area comprising activating one or more light transmission elements included in at least one or more element group related to the area.
16 . The method of claim 10 , further comprising, increasing power of the activated light transmission element based on failing to obtain the second distance information about the area through the activated light transmission element and the plurality of light reception elements.
17 . The method of claim 10 , further comprising, increasing a pulse interval of the activated light transmission element based on failing to obtain the second distance information about the area through the activated light transmission element and the at least one of the plurality of light reception elements.
18 . The method of claim 10 , wherein the image sensor is provided in plural, and
the method further comprises obtaining third distance information based on a disparity between a third frame and a fourth frame obtained through two of the plurality of image sensors based on failing to obtain the second distance information about the area through the activated light transmission element and the at least one of the plurality of light reception elements.
19 . The electronic device of claim 1 , wherein the at least one second frame is captured in a second capture mode including a dynamic vision sensor (“DVS”) mode, and the at least one first frame and the at least one second frame are obtained by the at least one image sensor in an interleaved manner.
20 . The method of claim 10 , wherein the at least one second frame is captured in a second capture mode including a dynamic vision sensor (“DVS”) mode, and the at least one first frame and the at least one second frame are obtained by the at least one image sensor in an interleaved manner.