Method of removing interference and electronic device performing the method
A method of reducing interference and an electronic device performing the method are provided. An electronic device may include: a sensor module including at least one sensor configured to identify illuminance of an external environment, a processor operatively connected to the sensor module, and a memory operatively connected to the processor and storing instructions executable by the processor. The processor may be configured to: identify the illuminance in a plurality of frames using the sensor module; determine, based on the illuminance, whether interference is present by an external light source that periodically emits light; identify, based on the illuminance, a light emitting period of the external light source; and control, based on the light emitting period, an operation of the sensor module such that the interference by the external light source does not occur.
1 . A wearable electronic device, comprising:
a sensor module comprising at least one sensor configured to identify illuminance of an external environment;
a processor, comprising processing circuitry, operatively connected to the sensor module;
a memory operatively connected to the processor and storing instructions executable by the processor,
wherein the processor comprises at least one processor and is individually and/or collectively configured to:
identify the illuminance in a plurality of frames based on brightness values of a plurality of pixels of the frames using the sensor module;
determine, in response to a frame-to-frame change in the measured illuminance exceeding a set threshold value, whether interference is present by an external light source that periodically emits light, wherein the frame-to-frame change is a largest value among differences of the illuminance measured within a range of a number of set frames;
calculate, based on the period of the frame-to-frame change in the illuminance, a light emitting period of the external light source;
control, based on the light emitting period, a set frame period and a start time point of the sensor module such that the interference by the external light source does not occur;
determine an expected interference time based on the set frame period, the start time point of the sensor module and the light emitting period of the external light source;
skip measuring the illuminance of the external environment at the expected interference time; and
control brightness of a display included in the wearable electronic device and transmittance of a visor included in the wearable electronic device according to the measured illuminance of the external environment.
2 . The electronic device of claim 1 , wherein the processor is configured to: identify a plurality of images obtained by capturing the external environment; and identify illuminance for each of a plurality of pixels included in the plurality of images.
3 . The electronic device of claim 1 , further comprising:
the visor configured to adjust a transmittance amount of external light incident on an eye of a user based on the transmittance.
4 . A method of reducing interference of a wearable electronic device, the method comprising:
identifying illuminance of an external environment in a plurality of frames based on brightness values of a plurality of pixels of the frames using a sensor module;
determining, in response to a frame-to-frame change in the measured illuminance exceeding a set threshold value, whether interference is present by an external light source that periodically emits light, wherein the frame-to-frame change is a largest value among differences of the illuminance measured within a range of a number of set frames;
calculating, based on the period of the frame-to-frame change in the illuminance, a light emitting period of the external light source;
controlling, based on the light emitting period, a set frame period and a start time point of the sensor module such that the interference by the external light source does not occur;
determining an expected interference time based on the set frame period, the start time point of the sensor module and the light emitting period of the external light source;
skipping measuring the illuminance of the external environment at the expected interference time; and
controlling brightness of a display included in the wearable electronic device and transmittance of a visor included in the wearable electronic device according to the measured illuminance of the external environment.
5 . The method of claim 4 , wherein the identifying of the illuminance of the external environment comprises:
identifying a plurality of images obtained by capturing the external environment; and
identifying illuminance for each of a plurality of pixels included in the plurality of images.