Method for determining frequency of light source, and electronic device therefor

By employing multiple sampling rates to measure the frequency of light sources, the method effectively addresses the challenge of detecting frequencies beyond the Nyquist frequency, thereby preventing flicker phenomena and enhancing image quality.

WO2025116695A1PCT designated stage expired Publication Date: 2025-06-05SAMSUNG ELECTRONICS CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2024/096461
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-17
Filing Date
2024-11-13
Publication Date
2025-06-05

AI Technical Summary

Technical Problem

Existing electronic devices face difficulties in detecting the frequency of light sources with frequencies higher than the Nyquist frequency, leading to flicker phenomena in images captured under indoor lighting environments.

Method used

The method involves using multiple sampling rates to measure the frequency of a light source, allowing the electronic device to determine the frequency of the light source based on data frames sampled at different rates, thereby overcoming the limitations of the Nyquist frequency.

Benefits of technology

This approach enables accurate detection of light source frequencies higher than the Nyquist frequency, effectively preventing flicker phenomena and improving image quality in various lighting environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2024096461_05062025_PF_FP_ABST
    Figure KR2024096461_05062025_PF_FP_ABST
Patent Text Reader

Abstract

An electronic device according to one embodiment of the present disclosure may comprise a camera, a sensor, a processor and a memory for storing instructions. When executed by the processor, the instructions enable the electronic device to: sample, on the basis of a first sampling rate, brightness data acquired by the sensor when a camera application is executed, so as to acquire a first data frame; identify a first frequency on the basis of the first data frame; sample, on the basis of a second sampling rate, brightness data acquired by the sensor while the camera application is executed, so as to acquire a second data frame that follows the first data frame; identify a second frequency on the basis of the second data frame; and determine the frequency of a light source on the basis of the first frequency and the second frequency. Other various embodiments identified through the present document are possible.
Need to check novelty before this filing date? Find Prior Art

Description

Method for determining the frequency of a light source and electronic device thereof

[0001] The present disclosure relates to a method for determining the frequency of a light source and an electronic device thereof.

[0002] As the possession of portable electronic devices has become more common in daily life, the use of their camera functions has increased significantly. Taking pictures with these devices has become an essential feature, to the point where camera functions are becoming a criterion for selecting a portable electronic device. Recently, there has been a growing demand for user satisfaction with the images captured by the cameras of portable electronic devices. For example, when photographing a subject under indoor lighting conditions powered by AC power, such as incandescent or fluorescent lamps, the difference between the frequency of the light and the frequency of the camera's exposure time can cause flicker, a phenomenon that creates a repetitive dark stripe pattern in the image. To prevent this flicker, electronic devices can detect the frequency of the light and adjust the camera's exposure control in response to the detected frequency.

[0003] The above information may be provided as background art to aid in understanding the present disclosure. No claim or determination is made as to whether any of the above-described matters constitute prior art related to the present disclosure.

[0004] According to an embodiment of the present disclosure, an electronic device may include a camera, a sensor, a processor, and a memory storing instructions. The instructions, when executed by the processor, may cause the electronic device to obtain a first data frame by sampling brightness data acquired by the sensor based on a first sampling rate when a camera application is executed. The instructions, when executed by the processor, may cause the electronic device to determine a first frequency based on the first data frame. The instructions, when executed by the processor, may cause the electronic device to obtain a second data frame subsequent to the first data frame by sampling brightness data acquired by the sensor while the camera application is executed based on a second sampling rate different from the first sampling rate. The instructions, when executed by the processor, may cause the electronic device to determine a second frequency based on the second data frame. The above instructions, when executed by the processor, may cause the electronic device to determine a frequency of the light source based on the first frequency and the second frequency.

[0005] According to an embodiment of the present disclosure, a method may include an operation of obtaining a first data frame by sampling brightness data acquired by a sensor based on a first sampling rate when a camera application is executed. The method may include an operation of identifying a first frequency based on the first data frame. The method may obtain a second data frame subsequent to the first data frame by sampling brightness data acquired by the sensor while the camera application is executed based on a second sampling rate different from the first sampling rate. The method may include an operation of identifying a second frequency based on the second data frame. The method may include an operation of determining a frequency of the light source based on the first frequency and the second frequency.

[0006] A computer-readable recording medium according to an embodiment of the present disclosure may include programs executable on a computer. The programs may perform an operation of obtaining a first data frame by sampling brightness data acquired by a sensor based on a first sampling rate when a camera application is executed. The programs may perform an operation of identifying a first frequency based on the first data frame. The programs may perform an operation of obtaining a second data frame subsequent to the first data frame by sampling brightness data acquired by the sensor while the camera application is executed based on a second sampling rate different from the first sampling rate. The programs may perform an operation of identifying a second frequency based on the second data frame. The programs may perform an operation of determining a frequency of the light source based on the first frequency and the second frequency.

[0007] FIG. 1 is a block diagram of an electronic device within a network environment according to one embodiment.

[0008] FIG. 2 is a block diagram illustrating a camera module according to various embodiments.

[0009] FIGS. 3A and 3B are diagrams illustrating a case where a frequency folding phenomenon does not occur and a case where a frequency folding phenomenon occurs in a process of sampling brightness data to detect a frequency of a light source, according to one embodiment.

[0010] FIG. 4 is a drawing illustrating a configuration of an electronic device according to one embodiment.

[0011] FIG. 5 is a diagram illustrating a method for determining the frequency of a light source using multiple sampling rates, according to one embodiment.

[0012] FIGS. 6A and 6B are diagrams illustrating a method for calculating expected frequencies for a light source, according to one embodiment.

[0013] FIG. 7 is a diagram illustrating a method for measuring the frequency of a light source using multiple sampling rates while a camera application is running in an electronic device, according to one embodiment.

[0014] FIG. 8 is a flowchart illustrating a method of operating an electronic device according to one embodiment.

[0015] FIG. 9 is a flowchart illustrating a method for determining the frequency of a light source using multiple sampling rates while a camera application is running in an electronic device, according to one embodiment.

[0016] In connection with the description of the drawings, the same or similar reference numerals may be used for identical or similar components.

[0017] Hereinafter, various embodiments disclosed in this document will be described with reference to the attached drawings. It should be understood that this is not intended to limit the various embodiments of the present disclosure to a specific form, but rather to encompass various modifications, equivalents, and / or alternatives of the present disclosure.

[0018] When an electronic device captures an image using an image sensor, a flicker phenomenon may occur, in which a repetitive dark stripe pattern is formed on the image, depending on the frequency of the external light source and the exposure time of the image sensor. To mitigate the flicker phenomenon, the electronic device can detect the frequency of the actual light source using a flicker sensor. For example, the flicker sensor can check the frequency component data through a Fourier transform operation after applying a window filter to the raw data measured based on a specified sampling rate. In this case, the maximum detectable effective frequency may be the Nyquist frequency, which is half of the specified sampling rate. In other words, the electronic device may have difficulty detecting the frequency of an external light source having a frequency higher than the Nyquist frequency.

[0019] Increasing the sampling rate can be considered to detect frequencies above the Nyquist frequency. However, with the increasing number of light sources with frequencies exceeding 1000 Hz, increasing the sampling rate may face physical limitations. Furthermore, to maintain frequency resolution, increasing the sampling rate requires a corresponding increase in data volume, which can degrade the processing performance (e.g., computation time, memory load, etc.) of electronic devices.

[0020] Various embodiments of the present document provide various embodiments for detecting the frequency of a light source having a frequency greater than the maximum effective frequency detectable by the sampling rate (e.g., the Nyquist frequency) without increasing the sampling rate, by measuring the frequency of an external light source based on data acquired using different multiple sampling rates when capturing an image.

[0021] The technical tasks to be achieved in this document are not limited to the technical tasks mentioned above, and other technical tasks not mentioned will be clearly understood by those with ordinary knowledge in the technical field to which this document pertains.

[0022] FIG. 1 is a diagram illustrating an electronic device within a network environment (100) according to one embodiment.

[0023] Referring to FIG. 1, in a network environment (100), an electronic device (101) may communicate with an electronic device (102) via a first network (198) (e.g., a short-range wireless communication network), or may communicate with at least one of an electronic device (104) or a server (108) via a second network (199) (e.g., a long-range wireless communication network). According to one embodiment, the electronic device (101) may communicate with the electronic device (104) via the server (108). According to one embodiment, the electronic device (101) may include a processor (120), a memory (130), an input module (150), an audio output module (155), a display module (160), an audio module (170), a sensor module (176), an interface (177), a connection terminal (178), a haptic module (179), a camera module (180), a power management module (188), a battery (189), a communication module (190), a subscriber identification module (196), or an antenna module (197). In some embodiments, the electronic device (101) may omit at least one of these components (e.g., the connection terminal (178)), or may have one or more other components added. In some embodiments, some of these components (e.g., the sensor module (176), the camera module (180), or the antenna module (197)) may be integrated into one component (e.g., the display module (160)).

[0024] The processor (120) may control at least one other component (e.g., a hardware or software component) of the electronic device (101) connected to the processor (120) by executing, for example, software (e.g., a program (140)), and may perform various data processing or calculations. According to one embodiment, as at least a part of the data processing or calculation, the processor (120) may store a command or data received from another component (e.g., a sensor module (176) or a communication module (190)) in a volatile memory (132), process the command or data stored in the volatile memory (132), and store the resulting data in a non-volatile memory (134). According to one embodiment, the processor (120) may include a main processor (121) (e.g., a central processing unit or an application processor) or a secondary processor (123) (e.g., a graphics processing unit, a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor) that can operate independently or together therewith. For example, if the electronic device (101) includes a main processor (121) and a secondary processor (123), the secondary processor (123) may be configured to use less power than the main processor (121) or to be specialized for a specified function. The secondary processor (123) may be implemented separately from the main processor (121) or as a part thereof.

[0025] The auxiliary processor (123) may control at least a part of functions or states associated with at least one component (e.g., a display module (160), a sensor module (176), or a communication module (190)) of the electronic device (101), for example, on behalf of the main processor (121) while the main processor (121) is in an inactive (e.g., sleep) state, or together with the main processor (121) while the main processor (121) is in an active (e.g., application execution) state. In one embodiment, the auxiliary processor (123) (e.g., an image signal processor or a communication processor) may be implemented as a part of another functionally related component (e.g., a camera module (180) or a communication module (190)). In one embodiment, the auxiliary processor (123) (e.g., a neural network processing unit) may include a hardware structure specialized for processing artificial intelligence models. The artificial intelligence models may be generated through machine learning. This learning can be performed, for example, on the electronic device (101) itself where the artificial intelligence model is executed, or can be performed through a separate server (e.g., server (108)). The learning algorithm can include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but is not limited to the examples described above. The artificial intelligence model can include multiple artificial neural network layers.The artificial neural network may be one of a deep neural network (DNN), a convolutional neural network (CNN), a recurrent neural network (RNN), a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), a deep Q-network, or a combination of two or more of the above, but is not limited to the examples described above. In addition to, or alternatively to, a hardware structure, an artificial intelligence model may include a software structure.

[0026] The memory (130) can store various data used by at least one component (e.g., processor (120) or sensor module (176)) of the electronic device (101). The data can include, for example, software (e.g., program (140)) and input data or output data for commands related thereto. The memory (130) can include volatile memory (132) or non-volatile memory (134).

[0027] The program (140) may be stored as software in the memory (130) and may include, for example, an operating system (142), middleware (144), or an application (146).

[0028] The input module (150) can receive commands or data to be used in a component of the electronic device (101) (e.g., a processor (120)) from an external source (e.g., a user) of the electronic device (101). The input module (150) can include, for example, a microphone, a mouse, a keyboard, a key (e.g., a button), or a digital pen (e.g., a stylus pen).

[0029] The audio output module (155) can output audio signals to the outside of the electronic device (101). The audio output module (155) can include, for example, a speaker or a receiver. The speaker can be used for general purposes, such as multimedia playback or recording playback. The receiver can be used to receive incoming calls. According to one embodiment, the receiver can be implemented separately from the speaker or as part of the speaker.

[0030] The display module (160) can visually provide information to an external party (e.g., a user) of the electronic device (101). The display module (160) may include, for example, a display, a holographic device, or a projector and a control circuit for controlling the device. According to one embodiment, the display module (160) may include a touch sensor configured to detect a touch, or a pressure sensor configured to measure the intensity of a force generated by the touch.

[0031] The audio module (170) can convert sound into an electrical signal, or vice versa, convert an electrical signal into sound. According to one embodiment, the audio module (170) can acquire sound through the input module (150), output sound through the sound output module (155), or an external electronic device (e.g., electronic device (102)) (e.g., speaker or headphone) directly or wirelessly connected to the electronic device (101).

[0032] The sensor module (176) can detect the operating status (e.g., power or temperature) of the electronic device (101) or the external environmental status (e.g., user status) and generate an electrical signal or data value corresponding to the detected status. According to one embodiment, the sensor module (176) can include, for example, a gesture sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor.

[0033] The interface (177) may support one or more designated protocols that may be used to directly or wirelessly connect the electronic device (101) with an external electronic device (e.g., the electronic device (102)). In one embodiment, the interface (177) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.

[0034] The connection terminal (178) may include a connector through which the electronic device (101) may be physically connected to an external electronic device (e.g., electronic device (102)). According to one embodiment, the connection terminal (178) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).

[0035] A haptic module (179) can convert electrical signals into mechanical stimuli (e.g., vibration or movement) or electrical stimuli that a user can perceive through tactile or kinesthetic sensations. According to one embodiment, the haptic module (179) can include, for example, a motor, a piezoelectric element, or an electrical stimulation device.

[0036] The camera module (180) can capture still images and videos. According to one embodiment, the camera module (180) may include one or more lenses, image sensors, image signal processors, or flashes.

[0037] The power management module (188) can manage power supplied to the electronic device (101). According to one embodiment, the power management module (188) can be implemented as, for example, at least a part of a power management integrated circuit (PMIC).

[0038] A battery (189) may power at least one component of the electronic device (101). In one embodiment, the battery (189) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.

[0039] The communication module (190) may support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device (101) and an external electronic device (e.g., electronic device (102), electronic device (104), or server (108)), and the performance of communication through the established communication channel. The communication module (190) may operate independently from the processor (120) (e.g., application processor) and may include one or more communication processors that support direct (e.g., wired) communication or wireless communication. According to one embodiment, the communication module (190) may include a wireless communication module (192) (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module (194) (e.g., a local area network (LAN) communication module, or a power line communication module). Among these communication modules, the corresponding communication module can communicate with an external electronic device (104) via a first network (198) (e.g., a short-range communication network such as Bluetooth, Wi-Fi (wireless fidelity) direct, or IrDA (infrared data association)) or a second network (199) (e.g., a long-range communication network such as a legacy cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., a LAN or WAN)). These various types of communication modules can be integrated into a single component (e.g., a single chip) or implemented as multiple separate components (e.g., multiple chips). The wireless communication module (192) can verify or authenticate the electronic device (101) within a communication network such as the first network (198) or the second network (199) by using subscriber information (e.g., an international mobile subscriber identity (IMSI)) stored in the subscriber identification module (196).

[0040] The wireless communication module (192) can support 5G networks and next-generation communication technologies following the 4G network, such as NR access technology (new radio access technology). The NR access technology can support high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), minimization of terminal power and connection of multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency (URLLC (ultra-reliable and low-latency communications)). The wireless communication module (192) can support, for example, a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate. The wireless communication module (192) can support various technologies for securing performance in a high-frequency band, such as beamforming, massive multiple-input and multiple-output (MIMO), full dimensional MIMO (FD-MIMO), array antenna, analog beam-forming, or large scale antenna. The wireless communication module (192) can support various requirements specified in the electronic device (101), an external electronic device (e.g., the electronic device (104)), or a network system (e.g., the second network (199)). According to one embodiment, the wireless communication module (192) may support a peak data rate (e.g., 20 Gbps or more) for eMBB realization, a loss coverage (e.g., 164 dB or less) for mMTC realization, or a U-plane latency (e.g., 0.5 ms or less for downlink (DL) and uplink (UL), or 1 ms or less for round trip) for URLLC realization.

[0041] The antenna module (197) can transmit or receive signals or power to or from an external device (e.g., an external electronic device). According to one embodiment, the antenna module (197) may include an antenna including a radiator formed of a conductor or a conductive pattern formed on a substrate (e.g., a PCB). According to one embodiment, the antenna module (197) may include a plurality of antennas (e.g., an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network, such as the first network (198) or the second network (199), may be selected from the plurality of antennas, for example, by the communication module (190). A signal or power may be transmitted or received between the communication module (190) and an external electronic device via the selected at least one antenna. According to some embodiments, in addition to the radiator, another component (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as a part of the antenna module (197).

[0042] According to various embodiments, the antenna module (197) may form a mmWave antenna module. According to one embodiment, the mmWave antenna module may include a printed circuit board, an RFIC disposed on or adjacent to a first surface (e.g., a bottom surface) of the printed circuit board and capable of supporting a designated high-frequency band (e.g., a mmWave band), and a plurality of antennas (e.g., an array antenna) disposed on or adjacent to a second surface (e.g., a top surface or a side surface) of the printed circuit board and capable of transmitting or receiving signals in the designated high-frequency band.

[0043] At least some of the above components can be interconnected and exchange signals (e.g., commands or data) with each other via a communication method between peripheral devices (e.g., a bus, GPIO (general purpose input and output), SPI (serial peripheral interface), or MIPI (mobile industry processor interface)).

[0044] According to one embodiment, commands or data may be transmitted or received between the electronic device (101) and an external electronic device (104) via a server (108) connected to a second network (199). Each of the external electronic devices (102 or 104) may be the same or a different type of device as the electronic device (101). According to one embodiment, all or part of the operations executed in the electronic device (101) may be executed in one or more of the external electronic devices (102, 104, or 108). For example, when the electronic device (101) is to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device (101) may, instead of or in addition to executing the function or service itself, request one or more external electronic devices to perform the function or at least a part of the service. One or more external electronic devices that receive the request may execute at least a portion of the requested function or service, or an additional function or service related to the request, and transmit the result of the execution to the electronic device (101). The electronic device (101) may process the result as is or additionally and provide it as at least a portion of a response to the request. For this purpose, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used, for example. The electronic device (101) may provide an ultra-low latency service by using distributed computing or mobile edge computing, for example. In one embodiment, the external electronic device (104) may include an Internet of Things (IoT) device. The server (108) may be an intelligent server using machine learning and / or a neural network. According to one embodiment, the external electronic device (104) or the server (108) may be included in the second network (199).The electronic device (101) can be applied to intelligent services (e.g., smart home, smart city, smart car, or healthcare) based on 5G communication technology and IoT-related technology.

[0045] FIG. 2 is a block diagram (200) illustrating a camera module (180) according to various embodiments.

[0046] Referring to FIG. 2, the camera module (180) may include a lens assembly (210), a flash (220), an image sensor (230), an image stabilizer (240), a memory (250) (e.g., a buffer memory), or an image signal processor (260). The lens assembly (210) may collect light emitted from a subject that is a target of image capturing. The lens assembly (210) may include one or more lenses. According to one embodiment, the camera module (180) may include a plurality of lens assemblies (210). In this case, the camera module (180) may form, for example, a dual camera, a 360-degree camera, or a spherical camera. Some of the plurality of lens assemblies (210) may have the same lens properties (e.g., angle of view, focal length, autofocus, f-number, or optical zoom), or at least one lens assembly may have one or more lens properties that are different from the lens properties of the other lens assemblies. A lens assembly (210) may include, for example, a wide-angle lens or a telephoto lens.

[0047] The flash (220) can emit light used to enhance light emitted or reflected from a subject. According to one embodiment, the flash (220) can include one or more light-emitting diodes (e.g., red-green-blue (RGB) LED, white LED, infrared LED, or ultraviolet LED), or a xenon lamp. The image sensor (230) can acquire an image corresponding to the subject by converting light emitted or reflected from the subject and transmitted through the lens assembly (210) into an electrical signal. According to one embodiment, the image sensor (230) can include one image sensor selected from among image sensors having different properties, such as an RGB sensor, a black and white (BW) sensor, an IR sensor, or a UV sensor, a plurality of image sensors having the same property, or a plurality of image sensors having different properties. Each image sensor included in the image sensor (230) can be implemented using, for example, a CCD (charged coupled device) sensor or a CMOS (complementary metal oxide semiconductor) sensor.

[0048] The image stabilizer (240) can move at least one lens or image sensor (230) included in the lens assembly (210) in a specific direction or control the operating characteristics of the image sensor (230) (e.g., adjusting the read-out timing, etc.) in response to the movement of the camera module (180) or the electronic device (101) including the same. This allows compensating for at least some of the negative effects of the movement on the captured image. In one embodiment, the image stabilizer (240) can detect such movement of the camera module (180) or the electronic device (101) using a gyro sensor (not shown) or an acceleration sensor (not shown) disposed inside or outside the camera module (180). In one embodiment, the image stabilizer (240) can be implemented as, for example, an optical image stabilizer. The memory (250) can temporarily store at least a portion of the image acquired through the image sensor (230) for the next image processing task. For example, when image acquisition is delayed due to the shutter, or when multiple images are acquired at high speed, the acquired original image (e.g., a Bayer-patterned image or a high-resolution image) is stored in the memory (250), and a corresponding copy image (e.g., a low-resolution image) can be previewed through the display module (160). Thereafter, when a specified condition is satisfied (e.g., a user input or a system command), at least a portion of the original image stored in the memory (250) can be acquired and processed, for example, by the image signal processor (260). According to one embodiment, the memory (250) can be configured as at least a portion of the memory (130) or as a separate memory that operates independently therefrom.

[0049] The image signal processor (260) can perform one or more image processing operations on an image acquired through an image sensor (230) or an image stored in a memory (250). The one or more image processing operations may include, for example, depth map generation, 3D modeling, panorama generation, feature extraction, image synthesis, or image compensation (e.g., noise reduction, resolution adjustment, brightness adjustment, blurring, sharpening, or softening). Additionally or alternatively, the image signal processor (260) may perform control (e.g., exposure time control, read-out timing control, etc.) for at least one of the components included in the camera module (180) (e.g., image sensor (230)). An image processed by the image signal processor (260) may be stored back in the memory (250) for further processing or provided to an external component of the camera module (180) (e.g., memory (130), display module (160), electronic device (102), electronic device (104), or server (108)). According to one embodiment, the image signal processor (260) may include at least one of the processors (120). It may be configured as a separate processor that is configured as a part of the processor (120) or operates independently of the processor (120). If the image signal processor (260) is configured as a separate processor from the processor (120), at least one image processed by the image signal processor (260) may be displayed through the display module (160) as is or after undergoing additional image processing by the processor (120).

[0050] According to one embodiment, the electronic device (101) may include a plurality of camera modules (180), each having different properties or functions. In this case, for example, at least one of the plurality of camera modules (180) may be a wide-angle camera, and at least another may be a telephoto camera. Similarly, at least one of the plurality of camera modules (180) may be a front camera, and at least another may be a rear camera.

[0051] FIGS. 3A and 3B are diagrams illustrating a case where a frequency folding phenomenon does not occur and a case where a frequency folding phenomenon occurs in the process of sampling brightness data to detect a frequency of a light source, according to one embodiment. According to various embodiments, an electronic device (e.g., the electronic device (101) of FIG. 1) may acquire brightness data from a sensor (e.g., the sensor module (176) of FIG. 1) while a camera application is running in an indoor lighting environment, and may sample the acquired brightness data at a specified sampling rate to detect the frequency of a light source. When the electronic device (101) samples the brightness data at the specified sampling rate, the maximum detectable effective frequency may correspond to half of the sampling rate, i.e., the Nyquist frequency. For example, when a sampling rate of 2048 Hz is applied, the electronic device (101) may detect a light source frequency of up to 1024 Hz.

[0052] For example, as shown in FIG. 3A, if the light source frequency (310) that the electronic device (101) wants to detect is lower than the Nyquist frequency of the specified sampling rate, the light source frequency (310) falls within a range within the maximum effective frequency detectable with the specified sampling rate, so the electronic device (101) can accurately measure the frequency (311) corresponding to the light source.

[0053] For another example, as in FIG. 3b, if the light source frequency (320) that the electronic device (101) wants to detect is higher than the Nyquist frequency of the specified sampling rate, the high frequency components of the light source may not be properly sampled and may be distorted and appear as low frequencies due to the frequency folding phenomenon in which frequencies higher than the Nyquist frequency are symmetrically shifted downward based on the Nyquist frequency. As a result, the electronic device (101) may misdetect a frequency (321) lower than the frequency of the actual light source. Therefore, in a situation where the range of sampling rates applicable to the electronic device (101) is limited, a method may be needed to more accurately detect the light source frequency higher than the Nyquist frequency.

[0054] FIG. 4 is a drawing illustrating the configuration of an electronic device (400) according to one embodiment.

[0055] Referring to FIG. 4, an electronic device (400) is a device that detects the frequency of a light source having a frequency higher than the Nyquist frequency by using a plurality of different sampling rates when capturing an image, and may include a camera (410), a sensor (420), a display (430), a processor (440), or a memory (450). In FIG. 4, the electronic device (400) may correspond to the electronic device (101) illustrated in FIG. 1.

[0056] In one embodiment, the camera (410) (e.g., the camera module (180) of FIG. 1) can capture a subject according to a user's operation. For example, when a camera application is executed, the camera (410) can acquire a preview image including the subject in units of frames, and when a user input for capturing an image (e.g., a capture command or a shutter button input) is received while displaying the preview image, the camera (410) can capture an image including the subject. According to various embodiments, the camera (410) can set a shooting parameter (e.g., an exposure time or a shutter speed) considering the frequency of an external light source in order to prevent the occurrence of a flicker phenomenon in which a repetitive dark stripe pattern is formed on an image, and perform image (or video) capture based on the set shooting parameter.

[0057] In one embodiment, a sensor (420) (e.g., sensor module (176) of FIG. 1) may detect brightness data for an external light source while the camera application is running and providing the preview image.

[0058] In one embodiment, the display (430) (e.g., the display module (160) of FIG. 1) may display an image acquired using the camera (410). For example, the display (430) may display a preview image acquired from the camera (410) when a camera application is executed. In another example, the display (430) may display a captured image in response to an input capture command while providing the preview image.

[0059] In one embodiment, the display (430) may be configured with at least one of a liquid crystal display (LCD), a thin film transistor LCD (TFT-LCD), an organic light emitting diode (OLED), a light emitting diode (LED), an active matrix organic LED (AMOLED), a flexible display, and a 3-dimensional display. In addition, some of these displays may be configured as transparent or light-transmitting so that the outside can be viewed through them. This may be configured in the form of a transparent display including a TOLED (transparent OLED).

[0060] In one embodiment, the memory (450) (e.g., the memory (130) of FIG. 1) may store instructions that, when executed, cause the electronic device (400) to perform various operations by the processor (440) (e.g., the processor (120) of FIG. 1). For example, the processor (440) may control operations to be performed to detect the frequency of a light source using a plurality of different sampling rates.

[0061] In one embodiment, when a camera application is executed, the processor (440) may display a preview image acquired using the camera (410) on the display (430). The preview image may be acquired on a frame-by-frame basis.

[0062] In one embodiment, the processor (440) may acquire brightness data for the light source using the sensor (420) while displaying the preview image acquired from the camera (410), and sample the brightness data based on a first sampling rate to acquire a first data frame. When the processor (440) acquires the first data frame from the sensor (420), the processor (440) may identify a first frequency corresponding to the first data frame. The processor (440) may compensate for a flicker phenomenon based on the first frequency until receiving a data frame subsequent to the first data frame while providing the preview image. According to various embodiments, the sensor (420) may operate asynchronously or synchronously with the camera (410). For example, the sensor (420) may acquire data frames for measuring the frequency of the light source at different time intervals (e.g., 1 / 30 second or 1 / 60 second) than the time interval at which the camera (410) acquires frames of the preview image (for example, performing an operation for measuring the frequency of the light source at intervals of 1 / 2 second to 1 second). As another example, the sensor (420) may acquire the data frames at different time intervals at which the camera (410) acquires frames of the preview image.

[0063] According to various embodiments, the processor (440) may measure the first frequency in advance before the camera application is executed. When the camera application is not executed, the processor (440) may obtain the first data frame obtained by sampling brightness data for the light source from the sensor (420) at a first sampling rate, and confirm the first frequency corresponding to the first data frame. Thereafter, when the camera application is executed, the processor (440) may set the exposure value (or shutter speed) of the camera (410) based on the first frequency to provide the preview image.

[0064] In one embodiment, the processor (440) may obtain brightness data for the light source using the sensor (420) while displaying the preview image, and may obtain a second data frame by sampling the brightness data based on a second sampling rate different from the first sampling rate. Here, the second data frame is a data frame subsequent to the first data frame, and the second sampling rate may be determined in consideration of an error tolerance of the sensor (420). The processor (440) may confirm an error tolerance of the sensor (420) and determine the second sampling rate within the confirmed error tolerance range based on the first sampling rate. When the processor (440) obtains the second data frame from the sensor (420), it may confirm a second frequency corresponding to the second data frame.

[0065] In one embodiment, the processor (440) may determine the frequency of the light source based on the first frequency and the second frequency. According to various embodiments, the processor (440) may compare an expected frequency obtained based on the first frequency with an expected frequency obtained based on the second frequency, and may determine based on which sampling rate the expected frequencies obtained are to be used to determine the frequency of the light source based on the comparison result. For example, the processor (440) may obtain a plurality of first expected frequencies by a designated operation using the first frequency, and may obtain a plurality of second expected frequencies by the designated operation using the second frequency. The designated operation may be performed when performing data sampling, such as a Nyquist frequency ( ) may be an operation for detecting an alias frequency component generated by a frequency folding phenomenon in a frequency component larger than the Nyquist frequency. The processor (440) obtains the frequency value measured using each sampling rate as the expected frequency for a section smaller than the Nyquist frequency at each sampling rate, and for a section larger than the Nyquist frequency, the point where an out-of-phase signal is converted into an in-phase signal by the frequency folding phenomenon (e.g., , , ...) can be used to obtain the expected frequency. The processor (440) can compare the plurality of first expected frequencies and the plurality of second expected frequencies obtained in this manner with each other to check whether there are frequency values ​​that overlap with each other. If there are no frequency values ​​that overlap with each other as a result of the check, the processor (440) can determine one of the first frequency measured based on the first sampling rate or the second frequency measured based on the second sampling rate as the frequency of the light source (e.g., corresponding to operation 930-No and operation 915 of FIG. 9). If there are frequency values ​​that overlap with each other as a result of the check, the processor (440) can determine the overlapping frequency value as the frequency of the light source (e.g., corresponding to operation 930-Yes and operation 935 of FIG. 9). At this time, the processor (440) can decide to use two or three sampling rates depending on the number of frequency values ​​that overlap with each other among the plurality of first expected frequencies and the plurality of second expected frequencies. For example, if the number of overlapping frequency values ​​is 1, the processor (440) may determine that the frequency of the light source can be detected using the first sampling rate and the second sampling rate, and may determine the overlapping frequency value as the frequency of the light source. If the number of overlapping frequency values ​​is two or more, the processor (440) may determine that additional measurement using a third sampling rate different from the first sampling rate and the second sampling rate is necessary to determine the frequency of the light source.

[0066] In one embodiment, the processor (440) may obtain brightness data for the light source using the sensor (420) while displaying the preview image, and sample the brightness data based on a third sampling rate that is different from the first sampling rate and the second sampling rate to obtain a third data frame. Here, the third data frame may be a data frame subsequent to the second data frame. The processor (440) may check an error tolerance of the sensor (420) and determine the third sampling rate within the checked error tolerance based on the first sampling rate and / or the second sampling rate. When the processor (440) obtains the third data frame from the sensor (420), it may check a third frequency corresponding to the third data frame. According to various embodiments, when the number of expected frequency values ​​overlapping with each other among the expected frequencies obtained based on the first sampling rate and the expected frequencies obtained based on the second sampling rate is two or more, the processor (440) may determine the frequency of the light source by additionally considering the expected frequencies obtained based on the third sampling rate. The processor (440) may obtain a plurality of third expected frequencies by the designated operation using the third frequency, and determine a frequency value overlapping with the plurality of third expected frequencies among the two or more expected frequency values ​​as the frequency of the light source. If the processor (440) does not obtain a single overlapping frequency value among the plurality of first expected frequencies, the plurality of second expected frequencies, and the plurality of third expected frequencies, the processor (440) may perform an additional measurement using a sampling rate different from before until a single overlapping frequency value is obtained.

[0067] According to various embodiments, when the number of expected frequency values ​​overlapping each other among the expected frequencies obtained based on the first sampling rate and the expected frequencies obtained based on the second sampling rate is 1, the processor (440) can verify the frequency detection result of the light source determined using the first sampling rate and the second sampling rate by checking whether the overlapping expected frequency value exists among the expected frequencies obtained based on the third sampling rate. For example, when the processor (440) checks that the overlapping expected frequency value exists among the expected frequencies obtained based on the third sampling rate, the processor (440) can decide to maintain the frequency of the light source determined using the first sampling rate and the second sampling rate. According to various embodiments, when the processor (440) determines that there is no overlapping expected frequency value among the expected frequencies obtained based on the third sampling rate, or that the difference between the third frequency measured based on the third sampling rate and the frequency detection result of the light source determined using the first sampling rate and the second sampling rate exceeds a specified range, the processor (440) may determine that the lighting environment has changed and determine to update the frequency of the light source. The processor (440) may reset the frequency detection result of the light source determined using the first sampling rate and the second sampling rate, and update the frequency of the light source based on the third frequency measured using the third sampling rate.

[0068] In one embodiment, when the number (N) of sampling rates required to measure the frequency of the light source is determined, the processor (440) may apply the determined N sampling rates in a sliding window manner. For example, when it is determined that the frequency of the light source can be measured using three different sampling rates, the processor (440) may set a window of a specified size based on the three different sampling rates, and sequentially apply the window while moving it within the three different sampling rates each time a new data frame is acquired, thereby obtaining a plurality of expected frequencies by frequency measurement and a specified operation for each sampling rate, and may determine a frequency value that overlaps with each other in the plurality of expected frequencies acquired for each sampling rate as the frequency of the light source.

[0069] In one embodiment, the processor (440) may store, in the memory (450), the frequency value of the light source determined and / or updated based on a plurality of different sampling rates while the camera application is running and providing a preview image through the display (430). When the processor (440) determines that a user input for capturing an image (e.g., a capture command or a shutter button input) is input while providing the preview image, the processor (440) loads the frequency value of the light source from the memory (450) and sets the exposure value (or shutter speed) of the camera (410) based on the loaded frequency value of the light source, thereby obtaining a photographing result in which the flicker phenomenon is corrected.

[0070] FIG. 5 is a diagram illustrating a method for determining a frequency of a light source using multiple sampling rates, according to an embodiment. In an embodiment, the electronic device (400) can acquire a preview image in image frame units from a camera (e.g., the camera module (180) of FIG. 1 or the camera (410) of FIG. 4) while a camera application is running. While providing the preview image, the electronic device (400) can sample brightness data at different sampling rates according to a specified time interval (e.g., an interval of 1 / 2 second to 1 second) to acquire a data frame, and measure the frequency of the light source based on the acquired data frame.

[0071] Referring to FIG. 5, the electronic device (400) can sample brightness data detected from a sensor (e.g., the sensor module (176) of FIG. 1 or the sensor (420) of FIG. 4) at a first sampling rate (501) to obtain a first data frame (510), and can confirm a first frequency (511) based on the first data frame (510). The electronic device (400) can determine the confirmed first frequency (511) as the frequency of the light source before obtaining a new data frame, and can correct a flicker phenomenon based on the first frequency (511) while providing the preview image.

[0072] In one embodiment, the electronic device (400) can sample brightness data detected from the sensor (420) at a second sampling rate (502) different from the first sampling rate (501) to obtain a second data frame (520) subsequent to the first data frame (510), and can identify a second frequency (521) based on the second data frame (520).

[0073] In one embodiment, the electronic device (400) can estimate the frequency of the light source based on the first frequency (511) and the second frequency (521). If the actual frequency of the light source is greater than the Nyquist frequency of the first sampling rate (501) and / or the second sampling rate (502), the first frequency (511) and / or the second frequency (521) identified by the electronic device (400) may be a distorted value due to the frequency folding phenomenon. Therefore, in order to more accurately detect the frequency of the light source, the electronic device (400) can compare the expected frequencies acquired based on the first frequency (511) and the expected frequencies acquired based on the second frequency (521) and determine the expected frequency that overlaps with each other as the frequency of the light source.

[0074] In one embodiment, the electronic device (400) can obtain a plurality of first expected frequencies (511, 512, 513, 514) by a designated operation using the first frequency (511). Here, the designated operation is performed by performing sampling with the first frequency (511) and the first sampling rate (501), and the Nyquist frequency ( ) may be an operation for detecting an alias frequency component caused by a frequency folding phenomenon in a frequency component greater than the Nyquist frequency ( ) and the first frequency (511) measured in a smaller section than the Nyquist frequency ( ) can be obtained by frequency folding in a larger section, with the aliased components (512, 513, 514) as the plurality of first expected frequencies.

[0075] In one embodiment, the electronic device (400) can obtain a plurality of second expected frequencies (521, 522, 523, 524, 525) by the above-mentioned operation using the second frequency (521). The electronic device (400) can calculate a plurality of second expected frequencies for the second sampling rate (502) in the same manner as the first sampling rate (501). The electronic device (400) can calculate the Nyquist frequency ( ) and the second frequency (521) measured in a smaller section than the Nyquist frequency ( ) can be obtained as the plurality of second expected frequencies by frequency folding. The electronic device (400) can confirm that the frequency (514) among the plurality of first expected frequencies (511, 512, 513, 514) and the frequency (525) among the plurality of second expected frequencies (521, 522, 523, 524, 525) overlap with each other, and can determine the confirmed overlapping frequency as the frequency of the light source. Specific details regarding the calculation of the plurality of first / second expected frequencies are described with reference to FIGS. 6A and 6B.

[0076] Figures 6a and 6b are diagrams illustrating a method of calculating expected frequencies for a light source according to an embodiment. Referring to Figure 6a, an electronic device (400) samples brightness data at a specified sampling rate to measure the frequency f (600) and the Nyquist frequency (which is the maximum effective frequency measurable at the specified sampling rate). ) can be identified as multiple expected frequencies for the specified sampling rate, which are caused by the frequency folding phenomenon in a larger section. For example, the electronic device (400) can be identified as a Nyquist frequency ( ), the point where the out-of-phase signal is converted to an in-phase signal by the frequency folding phenomenon (e.g. , , ...) can be used to determine the frequency value (601) obtained by subtracting the measured frequency f (600) value and the frequency value (602) obtained by adding the measured frequency f (600) value as the alias frequency.

[0077] In one embodiment, the electronic device (400) can obtain multiple expected frequencies for two sampling rates by this principle as shown in Fig. 6b. The electronic device (400) calculates { , , , , , ...} can be obtained as a plurality of first expected frequencies. The electronic device (400) is operated for the second sampling rate (620). , , , , , ...} can be obtained as a plurality of second expected frequencies. For example, assuming that the first sampling rate (610) is 1800 Hz and the second sampling rate (620) is 2000 Hz, the electronic device (400) can obtain the Nyquist frequency ( ) is the Nyquist frequency, which is the maximum effective frequency that can be detected at 900 Hz and the second sampling rate (620). ) can be confirmed to be 1000 Hz. At this time, the first frequency ( measured at the first sampling rate (610) ) is 500 Hz and the second frequency ( measured at the second sampling rate (620) ) is 700 Hz, these values ​​can be applied to the calculation formula of Fig. 6b to obtain the expected frequencies as shown in Table 1 below.

[0078] First Expected FrequencySecond Expected Frequency50070013001300230027003100330041004700......

[0079] The electronic device (400) can determine 1300 Hz, which is an overlapping expected frequency among a plurality of first expected frequencies {500, 1300, 2300, 3100, 4100, ...} obtained for the first sampling rate (610) in Table 1 and a plurality of second expected frequencies {700, 1300, 2700, 3300, 4700, ...} obtained for the second sampling rate (620), as the frequency of the light source.

[0080] According to various embodiments, if the number of frequency values ​​overlapping with each other among the expected frequencies obtained for the first sampling rate (610) and the expected frequencies obtained for the second sampling rate (620) is two or more, the electronic device (400) may determine that a false detection has occurred and may perform an additional operation in the same manner for a third sampling rate that is different from the first sampling rate (610) and the second sampling rate (620). The electronic device (400) may determine a frequency value overlapping with the expected frequencies obtained for the third sampling rate among the two or more overlapping frequency values ​​as the frequency of the light source. The electronic device (400) may perform an additional measurement using a sampling rate different from the previous one until one overlapping frequency value is obtained.

[0081] FIG. 7 is a diagram illustrating a method for measuring the frequency of a light source using multiple sampling rates while a camera application is running on an electronic device (400), according to one embodiment. According to various embodiments, the electronic device (400) may apply multiple different sampling rates in a sliding window manner while the camera application is running and providing a preview image acquired from a camera (e.g., the camera module (180) of FIG. 1 or the camera (410) of FIG. 4).

[0082] Referring to FIG. 7, the electronic device (400) may receive a first data frame (710) obtained by sampling the brightness data of the light source from a sensor (e.g., the sensor module (176) of FIG. 1 or the sensor (420) of FIG. 4) at a first sampling rate of 2000 Hz, and detect a first frequency value of 500 Hz based on the first data frame (710). The electronic device (400) may determine the detected first frequency value (500 Hz) as the frequency of the light source, and may correct a flicker phenomenon based on the determined frequency value (500 Hz) of the light source until receiving a subsequent data frame while providing the preview image.

[0083] In one embodiment, the electronic device (400) may receive a second data frame (720) obtained by sampling the brightness data of the light source from the sensor (420) at a second sampling rate of 2048 Hz while the camera application is running to provide a preview image, and detect a second frequency value of 452 Hz based on the second data frame (720). Here, the second data frame (720) may be a data frame that follows the first data frame (710) in time. The electronic device (400) may calculate the frequency of the light source based on the first frequency value detected in response to receiving the first data frame (710) and the second frequency value detected in response to receiving the second data frame (720). For example, the electronic device (400) can compare a plurality of first expected frequencies obtained by a specified operation using the first frequency value (500 Hz) and a plurality of second expected frequencies obtained by the specified operation using the second frequency value (452 ​​Hz) to check for overlapping values. Here, the specified operation is the Nyquist frequency ( ) by detecting an alias frequency value generated by a frequency folding phenomenon in a frequency component greater than a frequency of the first expected frequency, the electronic device (400) can obtain the plurality of first / second expected frequencies in the manner described in FIGS. 6A and 6B. The electronic device (400) can confirm that there is an identical value of 2500 Hz among the plurality of first expected frequencies and the plurality of second expected frequencies, and can determine the confirmed frequency value (2500 Hz) as the frequency of the light source. As the frequency value determined for the light source changes in response to the reception of the second data frame (720), the electronic device (400) can correct the flicker phenomenon based on the determined frequency value (2500 Hz) of the light source until the light source frequency value is further changed after the reception of the second data frame (720).

[0084] In one embodiment, the electronic device (400) may receive a third data frame (730) obtained by sampling the brightness data of the light source from the sensor (420) at a third sampling rate of 2098 Hz while the camera application is running to provide a preview image, and detect a third frequency value of 402 Hz based on the third data frame (730). Here, the third data frame (730) may be a data frame that follows the second data frame (720) in time. The electronic device (400) may verify the determined frequency value (2500 Hz) of the light source based on the third frequency value detected in response to receiving the third data frame (730). For example, if the electronic device (400) determines that the plurality of third expected frequencies obtained by the specified operation using the third frequency value (402 Hz) include an overlapping frequency value (2500 Hz) of the plurality of first / second expected frequencies, the electronic device (400) can maintain the frequency value (2500 Hz) of the determined light source.

[0085] According to various embodiments, the electronic device (400) may set a window based on three different sampling rates, i.e., a first sampling rate (2000 Hz), a second sampling rate (2048 Hz), and a third sampling rate (2098 Hz), and sequentially apply the window by moving it within the three different sampling rates whenever brightness data of the light source is detected by the sensor (420).

[0086] In one embodiment, the electronic device (400) may receive a fourth data frame (740) obtained by resampling the brightness data of the light source from the sensor (420) at a first sampling rate of 2000 Hz while the camera application is running to provide a preview image, and detect a fourth frequency value of 500 Hz based on the fourth data frame (740). Here, the third data frame (740) may be a data frame that follows the third data frame (730) in time. The electronic device (400) may further verify the determined frequency value (2500 Hz) of the light source based on the fourth frequency value detected in response to receiving the fourth data frame (740). For example, the electronic device (400) determines that the plurality of fourth expected frequencies obtained by the specified operation using the fourth frequency value (500 Hz) include an overlapping frequency value (2500 Hz) of the plurality of second / third expected frequencies, and if it determines that the frequency value is the same as the frequency value (2500 Hz) of the determined light source, the electronic device (400) can maintain the frequency value (2500 Hz) of the determined light source.

[0087] In one embodiment, the electronic device (400) may receive a fifth data frame (750) obtained by resampling the brightness data of the light source from the sensor (420) at a second sampling rate of 2048 Hz while the camera application is running to provide a preview image, and detect a fifth frequency value of 234 Hz ​​based on the fifth data frame (750). Here, the fifth data frame (750) may be a data frame that follows the fourth data frame (740) in time. The electronic device (400) may determine that the lighting environment has changed based on the fifth frequency value detected in response to receiving the fifth data frame (750), and may change the frequency value of the light source. For example, the electronic device (400) may determine the detected fifth frequency value (234 Hz) as the changed frequency of the light source.

[0088] In one embodiment, the electronic device (400) may receive a sixth data frame (760) by sampling the brightness data of the light source again from the sensor (420) at a third sampling rate of 2088 Hz while the camera application is running to provide a preview image, and detect a sixth frequency value of 800 Hz based on the sixth data frame (760). Here, the sixth data frame (760) may be a data frame that follows the fifth data frame (750) in time. The electronic device (400) may determine that the lighting environment has further changed based on the sixth frequency value detected in response to receiving the sixth data frame (760), and update the detected sixth frequency value (800 Hz) with the changed frequency of the light source.

[0089] In one embodiment, the electronic device (400) may receive a seventh data frame (770) obtained by resampling the brightness data of the light source from the sensor (420) at a first sampling rate of 2000 Hz while the camera application is running to provide a preview image, and detect a seventh frequency value of 800 Hz based on the seventh data frame (770). Here, the seventh data frame (770) may be a data frame that follows the sixth data frame (760) in time. The electronic device (400) may confirm that the seventh frequency value detected in response to receiving the seventh data frame (770) is identical to the frequency (800 Hz) of the light source updated upon receiving the sixth data frame (760), and may maintain the frequency (800 Hz) of the light source. According to various embodiments, the electronic device (400) may determine and update the frequency of the light source by sequentially applying the three different sampling rates in the same manner to subsequent data frames received thereafter.

[0090] FIG. 8 is a flowchart illustrating an operating method of an electronic device (400) according to an embodiment. According to an embodiment, the electronic device (400) is a device that detects the frequency of a light source having a frequency higher than the Nyquist frequency by using a plurality of different sampling rates when capturing an image, and may correspond to the electronic device (101) illustrated in FIG. 1. The operations of FIG. 8 may be performed by a processor included in the electronic device (400) (e.g., the processor (120) of FIG. 1 or the processor (440) of FIG. 4).

[0091] Referring to FIG. 8, in operation 810, the electronic device (400) may obtain brightness data for the light source using a sensor (e.g., the sensor module (176) of FIG. 1 or the sensor (420) of FIG. 4), and may sample the brightness data based on a first sampling rate to obtain a first data frame. According to various embodiments, the sensor (420) may operate asynchronously or synchronously with the camera (410). For example, the sensor (420) may obtain data frames for measuring the frequency of the light source at a time interval different from the time interval (e.g., 1 / 30 second or 1 / 60 second) at which the camera (410) obtains frames of the preview image (for example, performing an operation for measuring the frequency of the light source at an interval of 1 / 2 second to 1 second). As another example, the sensor (420) may acquire the data frame at a time interval corresponding to the time interval at which the frame of the preview image is acquired from the camera (410).

[0092] According to one embodiment, in operation 820, the electronic device (400) can determine a first frequency based on the first data frame. The electronic device (400) can compensate for a flicker phenomenon by setting an exposure value (or shutter speed) of a camera (e.g., the camera module (180) of FIG. 1 or the camera (410) of FIG. 4) based on the first frequency until acquiring a data frame subsequent to the first data frame.

[0093] According to various embodiments, operations 810 and 820 may be performed before the camera application is launched, or may be performed within a specified time after the camera application is launched.

[0094] According to one embodiment, in operation 830, the electronic device (400) may obtain brightness data for the light source using the sensor (420) while the camera application is running and providing a preview image, and may obtain a second data frame by sampling the brightness data based on a second sampling rate different from the first sampling rate. The second data frame may be a data frame subsequent to the first data frame. In operation 830, the electronic device (400) may check an error tolerance of the sensor (420) and determine the second sampling rate within the checked error tolerance range based on the first sampling rate.

[0095] According to one embodiment, in operation 840, the electronic device (400) can identify a second frequency based on the second data frame.

[0096] According to one embodiment, in operation 850, the electronic device (400) may determine the frequency of the light source based on the first frequency and the second frequency. In operation 850, the electronic device (400) may compare the expected frequency acquired based on the first frequency with the expected frequency acquired based on the second frequency, and determine based on which sampling rate the expected frequencies acquired are to be determined for the frequency of the light source based on the comparison result. For example, the electronic device (400) may acquire a plurality of first expected frequencies by a designated operation using the first frequency, and may acquire a plurality of second expected frequencies by the designated operation using the second frequency. The designated operation may be performed based on the Nyquist frequency ( ) may be an operation for detecting an alias frequency component generated by a frequency folding phenomenon in a frequency component larger than the Nyquist frequency. The electronic device (400) obtains the frequency value measured using each sampling rate as the expected frequency for a section smaller than the Nyquist frequency at each sampling rate, and for a section larger than the Nyquist frequency, the point where an out-of-phase signal is converted into an in-phase signal by the frequency folding phenomenon (e.g., , , ...) can be added or subtracted from the measured frequency value to obtain the expected frequency. The electronic device (400) checks whether there are frequency values ​​that overlap with each other among the plurality of first expected frequencies and the plurality of second expected frequencies obtained in this manner, and if there are no frequency values ​​that overlap with each other as a result of the check, the electronic device (400) can determine one of the first frequency measured based on the first sampling rate or the second frequency measured based on the second sampling rate as the frequency of the light source. If there are frequency values ​​that overlap with each other as a result of the check, the electronic device (400) can determine the overlapping frequency value as the frequency of the light source. At this time, the electronic device (400) can decide to use two or three sampling rates depending on the number of overlapping frequency values ​​among the plurality of first expected frequencies and the plurality of second expected frequencies. If the number of overlapping frequency values ​​is 1, the electronic device (400) can determine that the frequency of the light source can be detected using the first sampling rate and the second sampling rate, and can determine the overlapping frequency value as the frequency of the light source. If the number of overlapping frequency values ​​is two or more, the electronic device (400) may determine that additional measurement using a third sampling rate different from the first sampling rate and the second sampling rate is necessary to determine the frequency of the light source.

[0097] According to one embodiment, after operation 850, the electronic device (400) may obtain brightness data for the light source using the sensor (420) while the camera application is running and providing a preview image, and may obtain a third data frame by sampling the brightness data based on a third sampling rate that is different from the first sampling rate and the second sampling rate. Here, the third data frame may be a data frame subsequent to the second data frame. The electronic device (400) may check an error tolerance of the sensor (420) and determine the third sampling rate within the checked error tolerance based on the first sampling rate and / or the second sampling rate. The electronic device (400) may check a third frequency based on the third data frame. According to various embodiments, when the number of expected frequency values ​​overlapping with each other among the expected frequencies obtained based on the first sampling rate and the expected frequencies obtained based on the second sampling rate is two or more, the electronic device (400) may determine the frequency of the light source by additionally considering the expected frequencies obtained based on the third sampling rate. For example, the electronic device (400) may obtain a plurality of third expected frequencies by the specified operation using the third frequency, and may determine a frequency value overlapping with the plurality of third expected frequencies among the two or more expected frequency values ​​as the frequency of the light source. If the electronic device (400) does not obtain a single overlapping frequency value among the plurality of first expected frequencies, the plurality of second expected frequencies, and the plurality of third expected frequencies, the electronic device (400) may perform an additional measurement using a sampling rate different from before until the single overlapping frequency value is obtained.

[0098] According to various embodiments, when the number of expected frequency values ​​overlapping each other among the expected frequencies acquired based on the first sampling rate and the expected frequencies acquired based on the second sampling rate is 1, the electronic device (400) can verify the frequency detection result of the light source determined using the first sampling rate and the second sampling rate by checking whether the overlapping expected frequency value exists among the expected frequencies acquired based on the third sampling rate. For example, when the electronic device (400) checks that the overlapping expected frequency value exists among the expected frequencies acquired based on the third sampling rate, the electronic device (400) can decide to maintain the frequency of the light source determined using the first sampling rate and the second sampling rate. According to various embodiments, when the electronic device (400) determines that there is no overlapping expected frequency value among the expected frequencies obtained based on the third sampling rate, or that the difference between the third frequency measured based on the third sampling rate and the frequency detection result of the light source determined using the first sampling rate and the second sampling rate exceeds a specified range, the electronic device (400) may determine that the lighting environment has changed and determine to update the frequency of the light source. The electronic device (400) may reset the frequency detection result of the light source determined using the first sampling rate and the second sampling rate, and update the frequency of the light source based on the third frequency measured using the third sampling rate.

[0099] According to one embodiment, the electronic device (400) may store the frequency values ​​of the light source, which are determined and / or updated based on different sampling rates, in a memory (e.g., the memory (130) of FIG. 1 or the memory (450) of FIG. 4) while the camera application is running and providing a preview image through the display (430). When the electronic device (400) determines that a user input for capturing an image (e.g., a capture command or a shutter button input) is input while providing the preview image, the electronic device (400) loads the frequency values ​​of the light source from the memory (450) and sets the exposure value (or shutter speed) of the camera (410) based on the loaded frequency values ​​of the light source, thereby obtaining a photographing result in which the flicker phenomenon is corrected.

[0100] FIG. 9 is a flowchart illustrating a method for determining the frequency of a light source using multiple sampling rates while a camera application is running in an electronic device (400), according to one embodiment. The operations of FIG. 9 may be understood as functions performed by a processor included in the electronic device (400) (e.g., the processor (120) of FIG. 1 or the processor (440) of FIG. 4).

[0101] Referring to FIG. 9, in operation 910, the electronic device (400) may obtain a first data frame from a sensor (e.g., the sensor module (176) of FIG. 1 or the sensor (420) of FIG. 4). For example, the electronic device (400) may obtain the first data frame by sampling the brightness data of the light source detected by the sensor (420) at a first sampling rate.

[0102] According to one embodiment, when the electronic device (400) acquires the first data frame in operation 915, it can calculate the light source frequency using one data frame. For example, the electronic device (400) can measure the first frequency based on the first data frame. The electronic device (400) can determine the measured first frequency as the light source frequency until acquiring a subsequent data frame.

[0103] According to various embodiments, operations 910 and 915 may be performed before the camera application is launched, or may be performed within a specified time after the camera application is launched.

[0104] According to one embodiment, in operation 920, the electronic device (400) may obtain a second data frame subsequent to the first data frame from the sensor (420). The electronic device (400) may obtain the second data frame by sampling the brightness data of the light source detected by the sensor (420) at a second sampling rate while the camera application is running.

[0105] According to one embodiment, when the electronic device (400) obtains the second data frame, it may calculate the light source frequency using the first data frame and the second data frame, i.e., two data frames, previously received in operation 925. For example, the electronic device (400) may measure the second frequency based on the second data frame, and calculate the light source frequency based on the first frequency and the second frequency measured for the first data frame previously. The electronic device (400) may compare a plurality of first expected frequencies obtained by a designated operation using the first frequency with a plurality of second expected frequencies obtained by a designated operation using the second frequency. The designated operation may be performed at each sampling rate to obtain the Nyquist frequency ( ) may be an operation to detect alias frequency components caused by frequency folding phenomenon in frequency components greater than .

[0106] According to one embodiment, in operation 930, the electronic device (400) may determine whether there is an expected frequency that overlaps with the plurality of first expected frequencies and the plurality of second expected frequencies. For example, the electronic device (400) may determine the overlapping expected frequencies by checking whether the plurality of first expected frequencies and the plurality of second expected frequencies contain the same expected frequency value.

[0107] As a result of the above determination, if there is no expected frequency that overlaps the plurality of first expected frequencies and the plurality of second expected frequencies (operation 930-No), the electronic device (400) returns to operation 915 and can determine the frequency measured corresponding to the first data frame or the second data frame, i.e., one data frame, as the light source frequency until acquiring a subsequent data frame.

[0108] As a result of the above determination, if there is an expected frequency that overlaps the plurality of first expected frequencies and the plurality of second expected frequencies (operation 930-Yes), the electronic device (400) may determine the overlapping expected frequency as the light source frequency in operation 935. According to various embodiments, if there are two or more overlapping expected frequencies, the electronic device (400) may determine a frequency value of one of the two or more overlapping expected frequencies as the light source frequency, and may further consider an operation result for a third sampling rate that is different from the first sampling rate and the second sampling rate applied respectively in response to the first data frame and the second data frame to re-determine the light source frequency.

[0109] According to one embodiment, in operation 940, the electronic device (400) may obtain a third data frame subsequent to the second data frame from the sensor (420). The electronic device (400) may obtain the third data frame by sampling the brightness data of the light source detected by the sensor (420) at a third sampling rate while the camera application is running.

[0110] According to one embodiment, when the electronic device (400) obtains the third data frame, it may calculate the light source frequency using the first / second data frames and the third data frame, i.e., three data frames, previously received in operation 945. For example, the electronic device (400) may measure the third frequency based on the third data frame, and calculate the light source frequency based on the first / second frequencies measured for the first / second data frames and the third frequency. The electronic device (400) may compare a plurality of first expected frequencies obtained by a designated operation using the first frequency, a plurality of second expected frequencies obtained by the designated operation using the second frequency, and a plurality of third expected frequencies obtained by the designated operation using the third frequency. The designated operation may be performed at each sampling rate to obtain the Nyquist frequency ( ) may be an operation to detect alias frequency components caused by frequency folding phenomenon in frequency components greater than .

[0111] According to one embodiment, in operation 950, the electronic device (400) may determine whether there are overlapping expected frequencies among the plurality of first expected frequencies, the plurality of second expected frequencies, and the plurality of third expected frequencies. For example, the electronic device (400) may determine the overlapping expected frequencies by checking whether the plurality of first expected frequencies, the plurality of second expected frequencies, and the plurality of third expected frequencies contain the same expected frequency value.

[0112] As a result of the above determination, if there is no expected frequency that overlaps the plurality of first expected frequencies, the plurality of second expected frequencies, and the plurality of third expected frequencies (operation 950-No), the electronic device (400) returns to operation 925 and can determine the light source frequency based on the measured frequency corresponding to the second data frame and the third data frame, i.e., two data frames, before acquiring a subsequent data frame.

[0113] As a result of the above determination, if there is an expected frequency that overlaps the plurality of first expected frequencies, the plurality of second expected frequencies, and the plurality of third expected frequencies (operation 950-Yes), the electronic device (400) may determine the overlapping expected frequency as the light source frequency in operation 955. According to various embodiments, if there are two or more overlapping expected frequencies, the electronic device (400) may perform additional measurements using a different sampling rate than before until obtaining one overlapping frequency value.

[0114] According to one embodiment, in operation 960, the electronic device (400) may obtain a new data frame subsequent to the third data frame from the sensor (420). According to various embodiments, the electronic device (400) may obtain the new data frame by applying the three sampling rates previously used in a sliding window manner. For example, the electronic device (400) may obtain the new data frame by setting windows of specified sizes for the first sampling rate, the second sampling rate, and the third sampling rate, and sequentially applying the windows while moving them within the three sampling rates. For example, the electronic device (400) may obtain the fourth data frame subsequent to the third data frame by sampling the brightness data of the light source detected by the sensor (420) again with the first sampling rate while the camera application is running.

[0115] According to one embodiment, when the electronic device (400) receives the new data frame in operation 965, it may calculate the light source frequency using the three most recently received data frames including the new data frame. For example, when the electronic device (400) obtains a fourth data frame subsequent to the third data frame, it may calculate the light source frequency using the two data frames (e.g., the second / third data frames) received before the fourth data frame and the three data frames including the fourth data frame. The electronic device (400) may calculate a plurality of expected frequencies for each of the three data frames, and may check frequency values ​​that overlap with each other among the plurality of expected frequencies calculated corresponding to each data frame. If there are no frequency values ​​that overlap with each other among the plurality of expected frequencies calculated corresponding to each data frame, the electronic device (400) may check the frequency value measured based on the new data frame (e.g., the fourth data frame).

[0116] According to one embodiment, at operation 970, the electronic device (400) can determine whether the expected frequency calculated using the most recent three data frames (e.g., the frequency value identified at operation 965) matches the light source frequency calculated using the previous three data frames (e.g., the light source frequency determined at operation 955).

[0117] As a result of the above judgment, if the expected frequency calculated using the most recent three data frames and the light source frequency calculated using the previous three data frames match each other (operation 970-Yes), the electronic device (400) can maintain the decision on the light source frequency and repeat operations 960 to 970 each time a subsequent data frame is received.

[0118] As a result of the above determination, if the expected frequency calculated using the most recent three data frames and the light source frequency calculated using the previous three data frames do not match each other (operation 970-No), the electronic device (400) may reset the determination of the light source frequency and return to operation 915 to determine the measured frequency for the new data frame (e.g., the fourth frame) as the light source frequency until a new subsequent data frame is acquired. According to various embodiments, the electronic device (400) may repeatedly perform the process of FIG. 9 while the camera application is running, and the process may also be terminated when the execution of the camera application is terminated.

[0119] In one embodiment, an electronic device (e.g., electronic device (400)) includes a camera (410), a sensor (420), a processor (440), and a memory (450) storing instructions, wherein the processor (440) may be configured to, when the instructions are executed, cause the electronic device (400) to sample brightness data acquired by the sensor (420) based on a first sampling rate to obtain a first data frame when a camera application is executed, determine a first frequency based on the first data frame, sample brightness data acquired by the sensor (420) while the camera application is executed based on a second sampling rate different from the first sampling rate to obtain a second data frame subsequent to the first data frame, determine a second frequency based on the second data frame, and determine a frequency of the light source based on the first frequency and the second frequency.

[0120] In one embodiment, the processor (440) may be configured to cause the electronic device (400) to compare an expected frequency obtained based on the first frequency with an expected frequency obtained based on the second frequency when the instructions are executed, and to determine the number of sampling rates required to measure the frequency of the light source based on the comparison result.

[0121] In one embodiment, the processor (440) may be configured to, when the instructions are executed, cause the electronic device (400) to compare a plurality of first expected frequencies obtained by a specified operation using the first frequency with a plurality of second expected frequencies obtained by a specified operation using the second frequency, determine whether there is an overlapping expected frequency among the plurality of first expected frequencies and the plurality of second expected frequencies, and, if the overlapping expected frequency exists as a result of the determination, determine the expected frequency as the frequency of the light source.

[0122] In one embodiment, the processor (440) may be configured to, when the instructions are executed, cause the electronic device (400) to, if the verification result shows that there are two or more overlapping expected frequencies, sample the brightness data based on a third sampling rate that is different from the first sampling rate and the second sampling rate to obtain a third data frame subsequent to the first data frame and the second data frame, verify a third frequency based on the third data frame, verify a plurality of third expected frequencies obtained by the designated operation using the third frequency, and determine an expected frequency overlapping with the plurality of third expected frequencies among the two or more expected frequencies as the frequency of the light source.

[0123] In one embodiment, the processor (440) may be configured to determine the first frequency or the second frequency as the frequency of the light source when the instructions are executed and the electronic device (400) determines that the overlapping expected frequency does not exist as a result of the verification.

[0124] In one embodiment, the processor (440) may be configured to cause the electronic device (400) to check the error tolerance of the sensor when the instructions are executed, and determine the second sampling rate within the checked error tolerance based on the first sampling rate.

[0125] In one embodiment, the processor (440) may be configured to cause the electronic device (400) to, when the instructions are executed, sample the brightness data based on a third sampling rate that is different from the first sampling rate and the second sampling rate to obtain a third data frame subsequent to the first data frame and the second data frame, determine a third frequency based on the third data frame, determine whether the expected frequency obtained based on the third frequency corresponds to the determined frequency of the light source, and maintain the determination on the frequency of the light source if the expected frequency obtained based on the third frequency corresponds to the determined frequency of the light source.

[0126] In one embodiment, the processor (440) may be configured to update the frequency of the light source based on the third frequency when the electronic device (400) determines that a difference between the third frequency and the frequency of the determined light source exceeds a specified range when the instructions are executed.

[0127] In one embodiment, the processor (440) may be configured to cause the electronic device (400) to store the frequency of the determined light source in the memory (450) when the instructions are executed.

[0128] In one embodiment, the electronic device (400) further includes a display (430), and the processor (440) may be configured to set an exposure value of the camera based on a frequency of the light source stored in the memory when the electronic device (400) identifies a capture command while providing a preview image through the display (430) when the instructions are executed.

[0129] According to one embodiment, a method may include, when a camera application is executed, sampling brightness data acquired from a sensor based on a first sampling rate to obtain a first data frame, identifying a first frequency based on the first data frame, sampling brightness data acquired by the sensor while the camera application is executed based on a second sampling rate different from the first sampling rate to obtain a second data frame subsequent to the first data frame, identifying a second frequency based on the second data frame, and determining a frequency of the light source based on the first frequency and the second frequency.

[0130] In one embodiment, the operation of determining the frequency of the light source may include an operation of comparing an expected frequency obtained based on the first frequency with an expected frequency obtained based on the second frequency, and an operation of determining the number of sampling rates required to measure the frequency of the light source based on the comparison result.

[0131] In one embodiment, the operation of determining the frequency of the light source may include an operation of comparing a plurality of first expected frequencies obtained by a specified operation using the first frequency with a plurality of second expected frequencies obtained by a specified operation using the second frequency, an operation of checking whether an overlapping expected frequency exists among the plurality of first expected frequencies and the plurality of second expected frequencies, and an operation of determining the expected frequency as the frequency of the light source if the overlapping expected frequency exists as a result of the checking.

[0132] In one embodiment, the method may further include, if the verification result shows that there are two or more overlapping expected frequencies, an operation of obtaining a third data frame subsequent to the first data frame and the second data frame by sampling the brightness data based on a third sampling rate that is different from the first sampling rate and the second sampling rate, an operation of confirming a third frequency based on the third data frame, an operation of confirming a plurality of third expected frequencies obtained by the designated operation using the third frequency, and an operation of determining an expected frequency overlapping with the plurality of third expected frequencies among the two or more expected frequencies as a frequency of the light source.

[0133] In one embodiment, the method may further include an operation of determining the first frequency or the second frequency as the frequency of the light source if the overlapping expected frequency does not exist as a result of the verification.

[0134] In one embodiment, the method may further include an operation of checking an error tolerance range of a sensor that acquires the brightness data, and an operation of determining the second sampling rate within the checked error tolerance range based on the first sampling rate.

[0135] In one embodiment, the method may further include: sampling the brightness data based on a third sampling rate different from the first sampling rate and the second sampling rate to obtain a third data frame subsequent to the first data frame and the second data frame; identifying a third frequency based on the third data frame; determining whether the expected frequency obtained based on the third frequency corresponds to the determined frequency of the light source; and maintaining the determination of the frequency of the light source if the expected frequency obtained based on the third frequency corresponds to the determined frequency of the light source.

[0136] In one embodiment, the method may further include an operation of updating the frequency of the light source based on the third frequency if it is determined that the difference between the third frequency and the frequency of the determined light source exceeds a specified range.

[0137] In one embodiment, the method may further include an operation of storing the frequency of the determined light source in a memory (450).

[0138] In one embodiment, the method may further include an operation of setting an exposure value of the camera based on a frequency of the light source stored in the memory (450) when the capture command is confirmed while the camera application is running and providing a preview image.

[0139] In one embodiment, a computer-readable recording medium having recorded thereon computer-executable programs may be caused by the computer to perform, when a camera application is executed, an operation of sampling brightness data acquired from a sensor based on a first sampling rate to obtain a first data frame, an operation of confirming a first frequency based on the first data frame, an operation of sampling brightness data acquired by the sensor while the camera application is executed based on a second sampling rate different from the first sampling rate to obtain a second data frame subsequent to the first data frame, an operation of confirming a second frequency based on the second data frame, and an operation of determining a frequency of the light source based on the first frequency and the second frequency.

[0140] The effects that can be obtained from the present disclosure are not limited to the effects mentioned above, and other effects that are not mentioned will be clearly understood by a person having ordinary skill in the art to which the present disclosure pertains.

[0141] Electronic devices according to the various embodiments disclosed in this document may take various forms. Electronic devices may include, for example, portable communication devices (e.g., smartphones), computer devices, portable multimedia devices, portable medical devices, cameras, wearable devices, or home appliances. Electronic devices according to the embodiments disclosed in this document are not limited to the aforementioned devices.

[0142] The various embodiments of this document and the terminology used therein are not intended to limit the technical features described in this document to specific embodiments, but should be understood to include various modifications, equivalents, or substitutes of the embodiments. In connection with the description of the drawings, similar reference numerals may be used for similar or related components. The singular form of a noun corresponding to an item may include one or more of the items, unless the context clearly indicates otherwise. In this document, each of the phrases "A or B," "at least one of A and B," "at least one of A or B," "A, B, or C," "at least one of A, B, and C," and "at least one of A, B, or C" can include any one of the items listed together in the corresponding phrase among those phrases, or all possible combinations thereof. Terms such as "first," "second," or "first" or "second" may be used merely to distinguish one component from another, and do not limit the components in any other respect (e.g., importance or order). When a component (e.g., a first component) is referred to as "coupled" or "connected" to another component (e.g., a second component), with or without the terms "functionally" or "communicatively," it means that the component can be connected to the other component directly (e.g., wired), wirelessly, or through a third component.

[0143] The term "module" as used herein may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit. A module may be an integral component, or a minimum unit or part of such a component that performs one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application-specific integrated circuit (ASIC).

[0144] Various embodiments of the present document may be implemented as software (e.g., a program (140)) including one or more commands stored in a storage medium (e.g., an internal memory (136) or an external memory (138)) readable by a machine (e.g., an electronic device (101)). For example, a processor (e.g., a processor (120)) of the machine (e.g., an electronic device (101)) may call at least one command among the one or more commands stored from the storage medium and execute it. This enables the machine to operate to perform at least one function according to the at least one command called. The one or more commands may include code generated by a compiler or code executable by an interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, "non-transitory" simply means that the storage medium is a tangible device and does not contain signals (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently or temporarily on the storage medium.

[0145] According to one embodiment, the method according to various embodiments disclosed in the present document may be provided as a computer program product. The computer program product may be traded between sellers and buyers as a product. The computer program product may be distributed in the form of a device-readable storage medium (e.g., compact disc read-only memory (CD-ROM)) or may be provided through an application store (e.g., Play Store). TM ) or directly between two user devices (e.g., smartphones), online distribution (e.g., downloading or uploading). In the case of online distribution, at least a portion of the computer program product may be at least temporarily stored or temporarily created in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server.

[0146] According to various embodiments, each component (e.g., a module or a program) of the above-described components may include a single or multiple entities. According to various embodiments, one or more components or operations of the aforementioned components may be omitted, or one or more other components or operations may be added. Alternatively or additionally, a plurality of components (e.g., a module or a program) may be integrated into a single component. In such a case, the integrated component may perform one or more functions of each of the plurality of components identically or similarly to those performed by the corresponding component among the plurality of components prior to the integration. According to various embodiments, the operations performed by a module, program, or other component may be executed sequentially, in parallel, iteratively, or heuristically, or one or more of the operations may be executed in a different order, omitted, or one or more other operations may be added.

Claims

1. In an electronic device (400), Camera (410); A sensor (420) that detects brightness of a light source; Processor (440); and Contains a memory (450) for storing instructions, The above instructions, when executed by the processor (440), cause the electronic device (400) to: When the camera application is executed, the brightness data acquired by the sensor (420) is sampled based on the first sampling rate to acquire the first data frame, Check the first frequency based on the first data frame above, While the above camera application is running, the brightness data acquired by the sensor (420) is sampled based on a second sampling rate different from the first sampling rate to acquire a second data frame subsequent to the first data frame, Check the second frequency based on the second data frame above, An electronic device configured to determine the frequency of the light source based on the first frequency and the second frequency.

2. In claim 1, The above instructions, when executed by the processor (440), cause the electronic device (400) to: Compare the expected frequency obtained based on the first frequency and the expected frequency obtained based on the second frequency, An electronic device configured to determine the number of sampling rates required to measure the frequency of the light source based on the results of the comparison.

3. In claim 2, The above instructions, when executed by the processor (440), cause the electronic device (400) to: Compare a plurality of first expected frequencies obtained by a specified operation using the first frequency and a plurality of second expected frequencies obtained by a specified operation using the second frequency, Check whether there is an overlapping expected frequency among the plurality of first expected frequencies and the plurality of second expected frequencies, An electronic device, wherein if the above verification result shows that the overlapping expected frequency exists, the expected frequency is set to be determined as the frequency of the light source.

4. In claim 3, The above instructions, when executed by the processor (440), cause the electronic device (400) to: If the above verification result shows that there are two or more overlapping expected frequencies, the brightness data is sampled based on a third sampling rate different from the first sampling rate and the second sampling rate to obtain a third data frame subsequent to the first data frame and the second data frame, Check the third frequency based on the third data frame above, Using the above third frequency, a plurality of third expected frequencies obtained by the above specified operation are verified, An electronic device configured to determine, as the frequency of the light source, an expected frequency that overlaps with the third expected frequency among the two or more expected frequencies.

5. In claim 3, The above instructions, when executed by the processor (440), cause the electronic device (400) to: An electronic device, wherein if the above verification result shows that the overlapping expected frequency does not exist, the first frequency or the second frequency is determined as the frequency of the light source.

6. In claim 1, The above instructions, when executed by the processor (440), cause the electronic device (400) to: Check the error tolerance of the above sensor, An electronic device set to determine the second sampling rate within the confirmed error tolerance range based on the first sampling rate.

7. In claim 1, The above instructions, when executed by the processor (440), cause the electronic device (400) to: Sampling the brightness data based on a third sampling rate different from the first sampling rate and the second sampling rate to obtain a third data frame subsequent to the first data frame and the second data frame, Check the third frequency based on the third data frame above, Determine whether the expected frequency obtained based on the above third frequency corresponds to the frequency of the determined light source, If the expected frequency obtained based on the above third frequency corresponds to the frequency of the determined light source, the decision on the frequency of the light source is maintained, An electronic device configured to update the frequency of the light source based on the third frequency when it is determined that the difference between the third frequency and the frequency of the determined light source exceeds a specified range.

8. In claim 1, The above instructions, when executed by the processor (440), cause the electronic device (400) to: An electronic device set to store the frequency of the above-determined light source in the memory (450).

9. In claim 8, Including more displays, The above instructions, when executed by the processor (440), cause the electronic device (400) to: An electronic device configured to set the exposure value of the camera (410) based on the frequency of the light source stored in the memory (450) when a capture command is confirmed while providing a preview image through the display.

10. In the method, When the camera application is executed, an operation of obtaining a first data frame by sampling brightness data acquired from the sensor based on a first sampling rate; An operation of checking a first frequency based on the first data frame; An operation of obtaining a second data frame subsequent to the first data frame by sampling brightness data acquired by the sensor while the camera application is running based on a second sampling rate different from the first sampling rate; An operation of checking a second frequency based on the second data frame; and An operation for determining the frequency of the light source based on the first frequency and the second frequency. A method comprising:

11. In claim 10, The operation of determining the frequency of the above light source is: An operation of comparing an expected frequency obtained based on the first frequency with an expected frequency obtained based on the second frequency; and A method including an operation of determining the number of sampling rates required to measure the frequency of the light source based on the comparison result.

12. In claim 11, The operation of determining the frequency of the above light source is: An operation of comparing a plurality of first expected frequencies obtained by a specified operation using the first frequency and a plurality of second expected frequencies obtained by a specified operation using the second frequency; An operation of checking whether there is an overlapping expected frequency among the plurality of first expected frequencies and the plurality of second expected frequencies; If the above verification result shows that the overlapping expected frequency exists, an operation of determining the expected frequency as the frequency of the light source; and A method comprising an operation of determining the first frequency or the second frequency as the frequency of the light source if the overlapping expected frequency does not exist as a result of the above verification.

13. In claim 12, If the above verification result shows that there are two or more overlapping expected frequencies, an operation of sampling the brightness data based on a third sampling rate different from the first sampling rate and the second sampling rate to obtain a third data frame subsequent to the first data frame and the second data frame; An operation of checking a third frequency based on the third data frame; An operation of confirming a plurality of third expected frequencies obtained by the above-mentioned specified operation using the above-mentioned third frequency; and A method further comprising an operation of determining an expected frequency that overlaps with the third expected frequency among the two or more expected frequencies as the frequency of the light source.

14. In claim 10, An operation for checking the error tolerance of the sensor that acquires the above brightness data; and A method further comprising an operation of determining the second sampling rate within the above-determined error tolerance range.

15. In claim 10, An operation of sampling the brightness data based on a third sampling rate different from the first sampling rate and the second sampling rate to obtain a third data frame subsequent to the first data frame and the second data frame; An operation of checking a third frequency based on the third data frame; An operation for determining whether the expected frequency obtained based on the third frequency corresponds to the frequency of the determined light source; If the expected frequency obtained based on the third frequency corresponds to the frequency of the determined light source, an operation of maintaining the determination on the frequency of the light source; and A method further comprising an operation of updating the frequency of the light source based on the third frequency, if it is determined that the difference between the third frequency and the frequency of the determined light source exceeds a specified range.

Citation Information

Patent Citations

  • Flicker detection device, flicker correction device, control method therefor and control program

    JP2014165800A

  • Imaging apparatus and flicker detection method

    KR1020090086103A

  • Method for determining flicker frequency due to the environmental lighting condition, digital photographing apparatus enabling to prosecute the method, an ...

    KR1020090098498A

  • Display device

    KR1020240043197A

  • Method for photographing under multiple artificial light sources, and related apparatus

    WO2022267762A1