Parameter obtaining method and terminal device
AssigneeVivo Mobile Communication Co., Ltd.
InventorConghua Fu
Life of this patent
Estimating the term…
Abstract
This disclosure provides a parameter obtaining method and a terminal device, and relates to the field of communications technologies, to resolve a problem that calibration of a distance sensor is relatively complex. The method includes: obtaining a preview image of a target object in a shooting preview screen; obtaining a first measurement value of a distance sensor when a degree of coincidence between the preview image and a calibration area in the shooting preview screen exceeds a threshold; and obtaining a calibration offset corresponding to the target object based on the first measurement value and the calibration distance.
Claims20
A parameter obtaining method, applied to a terminal device and comprising:
- obtaining a preview image of a target object in a shooting preview screen displayed by the terminal device;
- obtaining a first measurement value of a distance sensor when a degree of coincidence between the preview image and a calibration area in the shooting preview screen exceeds a threshold;
- when the degree of coincidence between the preview image and the calibration area in the shooting preview screen exceeds the threshold, obtaining, based on a pre-stored correspondence between objects and calibration distances, a calibration distance between the target object and the terminal device;
- and
- obtaining a calibration offset corresponding to the target object based on the first measurement value and the calibration distance,
- wherein the calibration area matches a shape of the target object, and the target object is selected by a user and provided with preset characteristics.
A terminal device, comprising a memory, a processor, and a computer program stored on the memory and capable of running on the processor, wherein when the computer program is executed by the processor, following steps are implemented:
- obtaining a preview image of a target object in a shooting preview screen displayed by the terminal device;
- obtaining a first measurement value of a distance sensor when a degree of coincidence between the preview image and a calibration area in the shooting preview screen exceeds a threshold;
- when the degree of coincidence between the preview image and the calibration area in the shooting preview screen exceeds the threshold, obtaining, based on a pre-stored correspondence between objects and calibration distances, a calibration distance between the target object and the terminal device;
- and
- obtaining a calibration offset corresponding to the target object based on the first measurement value and the calibration distance,
- wherein the calibration area matches a shape of the target object, and the target object is selected by a user and provided with preset characteristics.
A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, following steps are implemented:
- obtaining a preview image of a target object in a shooting preview screen displayed by the terminal device;
- obtaining a first measurement value of a distance sensor when a degree of coincidence between the preview image and a calibration area in the shooting preview screen exceeds a threshold;
- when the degree of coincidence between the preview image and the calibration area in the shooting preview screen exceeds the threshold, obtaining, based on a pre-stored correspondence between objects and calibration distances, a calibration distance between the target object and the terminal device;
- and
- obtaining a calibration offset corresponding to the target object based on the first measurement value and the calibration distance,
- wherein the calibration area matches a shape of the target object, and the target object is selected by a user and provided with preset characteristics.
Dependencies are inferred from the claim text.