Abstract:
An electronic device and a method for setting a sensor are provided. The electronic device includes a sensor and a processor. The processor is coupled to the sensor and configured to calculate a plurality of groups of candidate sensor settings every calculation cycle, wherein each calculation cycle includes one or more frames, and each of the groups of candidate sensor settings corresponds to one respective frame of the calculation cycle. Every frame of the calculation cycle, the processor is further configured to determine a respective group of adoptable sensor settings for each frame of the calculation cycle according to the plurality of groups of candidate sensor settings, wherein the respective group of adoptable sensor settings is for provision to set a sensor.
Abstract:
A method for focusing an object to capture an image thereof is provided. The method includes obtaining the travel time between the point in time that an ultrasonic signal is sent and the point in time at which the reflected signal are received. The method also includes obtaining environment information of the electronic device based on location/position information. The method further includes determining local sound speed according to environment information and determining the distance to an object using the local sound speed and the travel time. In addition, the method can include providing the object distance for focusing the object according to the object distance.