CN113014810B - Positioning method and device, electronic equipment and storage medium - Google Patents

Positioning method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113014810B
CN113014810B CN202110214932.6A CN202110214932A CN113014810B CN 113014810 B CN113014810 B CN 113014810B CN 202110214932 A CN202110214932 A CN 202110214932A CN 113014810 B CN113014810 B CN 113014810B
Authority
CN
China
Prior art keywords
distance
target
electronic equipment
electronic device
shooting object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110214932.6A
Other languages
Chinese (zh)
Other versions
CN113014810A (en
Inventor
张伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TetrasAI Technology Co Ltd
Original Assignee
Shenzhen TetrasAI Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TetrasAI Technology Co Ltd filed Critical Shenzhen TetrasAI Technology Co Ltd
Priority to CN202110214932.6A priority Critical patent/CN113014810B/en
Publication of CN113014810A publication Critical patent/CN113014810A/en
Application granted granted Critical
Publication of CN113014810B publication Critical patent/CN113014810B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Studio Devices (AREA)

Abstract

The disclosure relates to a positioning method and apparatus, an electronic device and a storage medium, wherein the method comprises: determining a first distance between the electronic equipment and a target shooting object; acquiring a target image of a target shooting object through the electronic equipment according to the first distance; and positioning the electronic equipment according to the target image to obtain the position information of the electronic equipment. The embodiment of the disclosure can improve the positioning precision.

Description

Positioning method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a positioning method and apparatus, an electronic device, and a storage medium.
Background
The VPS (visual positioning technology) technology can locate the position of the user in the reconstruction space, that is, the position of the user's mobile phone in the real world space, through image analysis, and can also accurately locate even indoors without satellite signals through the VPS technology.
Disclosure of Invention
The present disclosure proposes a technical solution for performing positioning.
According to an aspect of the present disclosure, there is provided a positioning method including:
determining a first distance between the electronic equipment and a target shooting object;
acquiring a target image of a target shooting object through the electronic equipment according to the first distance;
and positioning the electronic equipment according to the target image to obtain the position information of the electronic equipment.
According to the positioning method provided by the embodiment of the disclosure, the target image for positioning can be obtained through the first distance between the electronic device and the target shooting object, so that the quality of the obtained target image can be improved, and the positioning accuracy can be further improved. In a possible implementation manner, the acquiring, by the electronic device, a target image of a target photographic object according to the first distance includes:
and under the condition that the first distance is within a collection distance range, collecting a target image of a target shooting object through the electronic equipment.
According to the positioning method provided by the embodiment of the disclosure, the target image is acquired under the condition that the first distance between the electronic equipment and the target shooting object is moderate, so that the high-quality target image can be obtained, and the positioning accuracy of the electronic equipment can be further improved.
In a possible implementation manner, the acquiring, by the electronic device, a target image of a target photographic object according to the first distance includes:
under the condition that the first distance is not within the acquisition distance range, outputting prompt information, wherein the prompt information is used for indicating the position of the electronic equipment to be adjusted;
determining a second distance between the electronic equipment and the target shooting object after the position is adjusted;
and under the condition that the second distance is within the acquisition distance range, acquiring a target image of a target shooting object through the electronic equipment.
According to the positioning method provided by the embodiment of the disclosure, under the condition that the first distance between the electronic device and the target shooting object does not meet the image acquisition requirement, the user is prompted to adjust the position of the electronic device through the prompt message, so that the target image is obtained under the condition that the second distance between the electronic device and the target shooting object meets the image acquisition requirement, not only can the high-quality target image be obtained, but also the positioning accuracy of the electronic device can be improved, and the user experience can be greatly improved in an interactive mode.
In a possible implementation manner, the prompt information includes a moving distance and/or a moving direction, and the method further includes:
and determining the moving distance and/or the moving direction according to the first distance and the acquisition distance range, wherein the moving distance is used for indicating the distance that the electronic equipment at least needs to move, and the moving direction is used for indicating the direction that the electronic equipment needs to move.
According to the positioning method provided by the embodiment of the disclosure, the user can be instructed to move the electronic device through the moving distance and the moving direction, and the user experience and the positioning accuracy can be improved through an interactive prompting mode.
In one possible implementation, the method further includes:
acquiring a preview image through the electronic equipment, wherein the preview image comprises the target shooting object;
identifying the target shooting object in the preview image to obtain an identification result;
and determining the acquisition distance range according to the identification result.
In a possible implementation manner, the identification result includes a category to which the target photographic subject belongs and/or a size of the target photographic subject.
According to the positioning method provided by the embodiment of the disclosure, the acquisition distance range corresponding to the target shooting object can be dynamically determined according to the category of the target shooting object and/or the size of the target shooting object, whether the first distance between the electronic device and the target shooting object meets the image acquisition requirement or not can be measured in a targeted manner, the acquisition precision of image information can be improved, and the positioning precision is further improved.
In one possible implementation manner, the number of the target photographic objects is more than two;
the determining a first distance between the electronic device and a target photographic object comprises:
respectively determining object distances between the electronic equipment and each target shooting object in the preview image;
and determining the minimum distance in the object distances as the first distance.
According to the positioning method provided by the embodiment of the disclosure, the first distance can be determined under the condition that the scene comprises a plurality of target shooting objects, so that whether the electronic equipment meets the image acquisition condition currently or not can be accurately measured according to the first distance, the target image for positioning can be acquired, the quality of the acquired target image can be improved, and the positioning accuracy can be further improved.
In one possible implementation, the method further includes:
acquiring a preview image through the electronic equipment, wherein the preview image comprises the target shooting object;
the determining a first distance between the electronic device and a target photographic object comprises:
acquiring a focal length of the electronic equipment when the preview image is acquired;
and determining a first distance between the electronic equipment and the target shooting object according to the focal distance when the electronic equipment collects the preview image.
According to the positioning method provided by the embodiment of the disclosure, the first distance between the electronic equipment and the object shot by the target can be determined through the focal length when the electronic equipment collects the preview image, so that whether the electronic equipment meets the image collection condition currently or not can be accurately measured according to the first distance, the target image for positioning can be collected, the quality of the collected target image can be improved, and the positioning accuracy can be further improved.
In one possible implementation, the method further includes:
and under the condition that the output duration of the prompt message is greater than the output time threshold, stopping outputting the prompt message and jumping to a positioning initial interface.
The positioning method provided by the embodiment of the disclosure can relieve the problem that the electric quantity of the electronic equipment is continuously lost due to the fact that the electronic equipment always executes the ranging positioning process caused by reasons such as misoperation of a user.
According to an aspect of the present disclosure, there is provided a positioning apparatus applied to an electronic device, the apparatus including:
the first determining module is used for determining a first distance between the electronic equipment and a target shooting object;
the acquisition module is used for acquiring a target image of a target shooting object through the electronic equipment according to the first distance;
and the positioning module is used for positioning the electronic equipment according to the target image to obtain the position information of the electronic equipment.
In a possible implementation manner, the acquisition module is further configured to:
and under the condition that the first distance is within a collection distance range, collecting a target image of a target shooting object through the electronic equipment.
In a possible implementation manner, the acquisition module is further configured to:
under the condition that the first distance is not within the acquisition distance range, outputting prompt information, wherein the prompt information is used for indicating to adjust the position of the electronic equipment;
determining a second distance between the electronic equipment and the target shooting object after the position is adjusted;
and under the condition that the second distance is within the acquisition distance range, acquiring a target image of a target shooting object through the electronic equipment.
In a possible implementation manner, the prompt information includes a moving distance and/or a moving direction, and the apparatus further includes:
and the second determining module is used for determining the moving distance and/or the moving direction according to the first distance and the acquisition distance range, wherein the moving distance is used for indicating the distance that the electronic equipment at least needs to move, and the moving direction is used for indicating the direction that the electronic equipment needs to move.
In one possible implementation, the apparatus further includes:
the first preview module is used for acquiring a preview image through the electronic equipment, wherein the preview image comprises the target shooting object;
the identification module is used for identifying the target shooting object in the preview image to obtain an identification result;
and the third determining module is used for determining the acquisition distance range according to the identification result.
In a possible implementation manner, the identification result includes a category to which the target photographic subject belongs and/or a size of the target photographic subject.
In a possible implementation manner, the number of the target shooting objects is more than two; the first determining module is further configured to:
respectively determining object distances between the electronic equipment and all target shooting objects in the preview image;
determining a minimum distance among the object distances as the first distance.
In one possible implementation, the apparatus further includes:
the second preview module is used for acquiring a preview image through the electronic equipment, wherein the preview image comprises the target shooting object;
the first determining module is further configured to:
acquiring a focal length of the electronic equipment when the preview image is acquired;
and determining a first distance between the electronic equipment and the target shooting object according to the focal distance when the electronic equipment collects the preview image.
In one possible implementation, the apparatus further includes;
and the closing module is used for stopping outputting the prompt information and jumping to a positioning initial interface under the condition that the output duration of the prompt information is greater than the output time threshold.
According to an aspect of the present disclosure, there is provided an electronic device including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the memory-stored instructions to perform the above-described method.
According to an aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method.
In the embodiment of the disclosure, a first distance between the electronic device and the target photographic object can be determined, a target image of the target photographic object is acquired through the electronic device according to the first distance, and then the electronic device can be positioned according to the target image to obtain the position information of the electronic device. According to the positioning method and device, the electronic device and the storage medium provided by the embodiment of the disclosure, the target image for positioning can be acquired through the first distance between the electronic device and the target shooting object, the quality of the acquired target image can be improved, and the positioning accuracy can be further improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 shows a flow chart of a positioning method according to an embodiment of the present disclosure;
FIG. 2 shows a block diagram of a positioning device according to an embodiment of the present disclosure;
FIG. 3 illustrates a block diagram of an electronic device 800 in accordance with an embodiment of the disclosure;
fig. 4 shows a block diagram of an electronic device 1900 according to an embodiment of the disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" herein is merely an association relationship describing an associated object, and means that there may be three relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a variety or any combination of at least two of a variety, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
In VPS positioning, the quality of the image has a large impact on the positioning accuracy. The image characteristic information in the high-quality image is rich and accurate, so that when the high-quality image is used for positioning, the positioning precision is higher, and the positioned position information is more accurate; on the contrary, when the low-quality image is used for positioning, the positioning precision is low, and the accuracy of the positioned position information is low. Therefore, how to obtain a high-quality image to improve the positioning accuracy is a problem to be focused on in VPS positioning.
The embodiment of the disclosure provides a positioning method, which can determine a distance between an electronic device and a target shooting object, and further determine whether to acquire a target image of the target shooting object at a current position according to the distance. When the distance between the electronic equipment and the target shooting object is too close, the collected target image is possibly local and not comprehensive enough, the characteristic information is not rich enough, and when the distance is too far, the collected target image is not clear enough, so that the positioning precision is low during positioning.
For example, a first distance between the electronic device and the target photographic object may be determined, and in a case that the first distance between the electronic device and the target photographic object is within the acquisition distance range, a target image for positioning is acquired, the target image including the target photographic object, and VPS positioning is performed according to the target image. Or, when the first distance between the electronic device and the target shooting object is not within the acquisition distance range, prompt information may be generated, the user is prompted to adjust the distance between the electronic device and the target shooting object through the prompt information, and when the adjusted second distance between the electronic device and the target shooting object is within the acquisition distance range, a target image for positioning is acquired, and VPS positioning is performed according to the target image.
Therefore, the positioning method provided by the embodiment of the disclosure can acquire the target image for positioning through the distance between the electronic device and the target shooting object, and can improve the quality of the acquired target image, thereby improving the positioning accuracy.
Fig. 1 shows a flowchart of a positioning method according to an embodiment of the present disclosure, which may be performed by an electronic device such as a terminal device or a server, where the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, or the like, and the method may be implemented by a processor calling a computer readable instruction stored in a memory. Alternatively, the method may be performed by a server.
As shown in fig. 1, the positioning method may include:
in step S11, a first distance between the electronic device and a target photographic subject is determined.
For example, the electronic device may perform VPS positioning through a target image corresponding to a target photographic object, where the target photographic object may include a landmark object for positioning, for example: buildings, sculptures, billboards, etc., and the embodiment of the disclosure does not specifically limit the target shooting object.
Before the target image of the target shooting object is acquired, a first distance between the electronic device and the target shooting object can be determined, so that whether the corresponding target image of the target shooting object acquired by the electronic device at the current position is suitable for VPS positioning or not can be judged according to the first distance between the electronic device and the target shooting object. The obtaining of the first distance between the electronic device and the target shooting object may be by setting devices such as a relevant laser ranging device, an infrared ranging device, a radar ranging device, and the like in the electronic device, and obtaining the first distance through measurement of the devices; the electronic device may further include a camera, where the camera pre-captures a target object to obtain a preview image, and then obtains the first distance in an image analysis manner, which is not limited in this embodiment.
In step S12, a target image of a target photographic object is captured by the electronic device according to the first distance.
For example, after obtaining the first distance between the electronic device and the target photographic object, it may be determined whether a target image of the target photographic object acquired at the current location of the electronic device is suitable for VPS positioning according to the first distance, and then the target image of the target photographic object is acquired by the electronic device according to the first distance.
For example, when the first distance between the electronic device and the target photographic object is appropriate (within a preset acquisition distance range), it may be determined that the target image of the target photographic object acquired by the electronic device at the current position is of good quality, and the target image of the target photographic object may be acquired (photographed) by the electronic device; when the first distance between the electronic device and the target photographic object is smaller or larger (that is, the first distance is not within the preset acquisition distance range), it may be determined that the quality of the image information of the target photographic object acquired by the electronic device at the current position is poor, so that the position of the electronic device needs to be adjusted, and further the distance between the electronic device and the target photographic object needs to be adjusted, so as to obtain a target image with better quality when the distance between the electronic device and the target photographic object is proper.
In step S13, the electronic device is located according to the target image, so as to obtain the position information of the electronic device.
For example, after obtaining the target image, VPS positioning may be performed on the electronic device according to the target image to obtain the position information of the electronic device. For example, a visual positioning process of the electronic device may be implemented locally on the electronic device, or after the electronic device uploads a target image to a server, the server positions the electronic device according to the target image to obtain location information of the electronic device. For example, when the electronic device is not connected to the network or the electronic device is connected to the network but the network quality is poor, the electronic device may perform visual positioning locally according to the target image to obtain the location information of the electronic device; or, when the electronic device is connected to a network and the network quality is good, the electronic device may send information such as a target image and a current focal length of the electronic device to the server, and the server performs VPS positioning of the electronic device according to the target image to obtain location information of the electronic device.
Therefore, the first distance between the electronic equipment and the target shooting object can be determined, the target image of the target shooting object is collected through the electronic equipment according to the first distance, and then the electronic equipment can be positioned according to the target image so as to obtain the position information of the electronic equipment. According to the positioning method provided by the embodiment of the disclosure, the target image for positioning can be acquired through the first distance between the electronic device and the target shooting object, the quality of the acquired target image can be improved, and the positioning accuracy can be further improved.
In one possible implementation manner, the number of the target photographic objects is more than two;
the determining the first distance between the electronic device and the target photographic object may include:
respectively determining object distances between the electronic equipment and all target shooting objects in the preview image;
and determining the minimum distance in the object distances as the first distance.
For example, when only one target photographic subject is included in the current scene, the distance between the electronic device and the target photographic subject may be directly acquired and determined as the first distance. When more than two target photographic objects are included in the current scene, the object distance between the electronic device and each target photographic object may be determined respectively, and then the minimum object distance may be determined as the first distance. Of course, the first distance may be obtained by calculating an arithmetic average, a weighted average, a median, a mode, or the like of the distances of the respective objects. The object distance between the electronic device and each target shooting object can be obtained through radar ranging, infrared ranging, image analysis or the like. When the first distance is obtained, whether the first distance meets the image acquisition condition or not can be further determined, so that whether a target image for positioning is acquired or not can be further determined.
Therefore, the first distance can be determined under the condition that the scene comprises a plurality of target shooting objects, whether the electronic equipment meets the image acquisition condition currently or not can be measured accurately according to the first distance, the target image for positioning can be acquired, the quality of the acquired target image can be improved, and the positioning accuracy can be improved.
In one possible implementation, the method further includes:
acquiring a preview image through the electronic equipment, wherein the preview image comprises the target shooting object;
the determining a first distance between the electronic device and a target photographic object comprises:
acquiring a focal length of the electronic equipment when the preview image is acquired;
and determining a first distance between the electronic equipment and the target shooting object according to the focal distance when the electronic equipment collects the preview image.
In a specific implementation, the determining of the first distance between the electronic device and the target photographic object may be implemented by means of image analysis, and for convenience of description, the following is exemplified by a scene including only one target photographic object. The electronic device may perform image pre-acquisition (pre-shooting) on the target shooting object in advance to obtain a preview image, where the preview image includes the target shooting object. When the electronic equipment collects the preview image, the electronic equipment can focus on a target shooting object; at this time, the focal length of the electronic device when the electronic device collects the preview image can be obtained from the internal reference of the electronic device, and the first distance between the electronic device and the target shooting object can be determined through the focal length of the electronic device when the electronic device collects the preview image.
For example, the width of the target photographic object may be determined (in the embodiment of the present disclosure, the manner of obtaining the width of the target photographic object is not particularly limited, for example, the width of the target photographic object may be a preset value, may also be a value obtained through measurement, or may also be a value determined after coordinate conversion is performed on the number of pixels of the target photographic object in the image coordinate system to the world coordinate system, and the like), and the first distance between the electronic device and the target photographic object may be obtained through the width of the target photographic object, the width of pixels of the target photographic object in the image coordinate system, and the current focal distance, and the specific process may refer to formula (one).
D = (W x F)/P formula (one)
Wherein D may be used to represent a first distance between the electronic device and the target photographic subject, W may be used to represent a width of the target photographic subject, F may be used to represent a current focal length, and P may be used to represent a pixel width of the target photographic subject in the image coordinate system.
It should be noted that the above-mentioned manner of measuring the first focal length by using the current focal length of the electronic device is only an example in the embodiment of the present disclosure, and actually, the manner of determining the first distance between the electronic device and the target shooting object in the embodiment of the present disclosure is not limited at all, and any distance measuring manner can be applied to the embodiment of the present disclosure, including but not limited to radar ranging, infrared ranging, euclidean distance calculating, and the like.
Therefore, the first distance between the electronic equipment and the object shot by the target can be determined through the focal length of the electronic equipment when the preview image is collected, whether the electronic equipment meets the image collecting condition currently or not is measured accurately according to the first distance, the target image used for positioning is collected, the quality of the collected target image can be improved, and the positioning accuracy can be improved.
In a possible implementation manner, the acquiring, by the electronic device, a target image of a target photographic object according to the first distance may include:
and under the condition that the first distance is within a collection distance range, collecting a target image of the target shooting object through the electronic equipment.
For example, the collection distance range may be a numerical range used for measuring whether the first distance between the electronic device and the target photographic object meets the image collection requirement. Under the condition that the first distance is within the acquisition distance range (assuming that the acquisition distance range is (L1, L2), the first distance is greater than or equal to L1, and the first distance is less than or equal to L2), it can be determined that the first distance meets the image acquisition requirement, that is, in the image information acquired by the electronic device at the current position for the target photographic object, the target photographic object is relatively complete and clear, and the image information has rich characteristic information, so that the quality is good, and the VPS positioning can be performed, so that the target photographic object can be photographed by the electronic device to acquire the target image. If the image analysis is adopted when the first distance is determined, that is, the electronic device has obtained the preview image including the target photographic object, the target image may be obtained according to the preview image when the first distance is within the acquisition distance range (for example, the preview image is directly used as the target image, or the target image is obtained after the preview image is subjected to processing such as cropping and compressing), and of course, the target photographic object may be acquired again at the current position to obtain the target image.
Therefore, the target image of the target shooting object is acquired under the condition that the first distance between the electronic equipment and the target shooting object is moderate, so that the high-quality target image can be obtained, and the positioning accuracy of the electronic equipment can be improved.
In a possible implementation manner, the acquiring, by the electronic device, a target image of a target photographic object according to the first distance may include:
outputting prompt information under the condition that the first distance is smaller than or not within the acquisition distance range, wherein the prompt information is used for indicating to adjust the position of the electronic equipment;
determining a second distance between the electronic equipment and the target shooting object after the position is adjusted;
and under the condition that the second distance is within the acquisition distance range, acquiring a target image of a target shooting object through the electronic equipment.
For example, when the first distance is not within the acquisition distance range (still assuming that the acquisition distance range is (L1, L2), and the first distance is smaller than L1 or the first distance is greater than L2, it may be determined that the first distance is not within the acquisition distance range), it may be determined that the first distance does not meet the image acquisition requirement, that is, in a target image acquired by the electronic device at the current position for the target photographic object, the target photographic object is not complete or clear enough, and feature information in the image information is sparse, so the quality is poor. Therefore, the electronic device can output prompt information, and the prompt information can be used for indicating and adjusting the position of the electronic device, so as to adjust the distance between the electronic device and the target shooting object, and enable the second distance between the electronic device and the target shooting object after the position is adjusted to be within the acquisition distance range; the prompt information can be output in modes of interface display, pop-up window display, audio playing and the like, wherein the prompt information comprises at least one of voice information, character information, picture information, video information and animation information. And when the second distance between the electronic equipment and the target shooting object after the position adjustment is within the acquisition distance range, acquiring a target image of the target shooting object through the electronic equipment and using the target image for VPS positioning.
Illustratively, the prompt message may be output by pop-up window, wherein the prompt message includes, but is not limited to, at least one form of text message, audio message, image message, and video message.
Therefore, under the condition that the first distance between the electronic equipment and the target shooting object does not meet the image acquisition requirement, the user is prompted to adjust the position of the electronic equipment through the prompt message, so that the target image is obtained under the condition that the second distance between the electronic equipment and the target shooting object meets the image acquisition requirement, high-quality target images can be obtained, the positioning precision of the electronic equipment can be improved, and the user experience can be greatly improved in an interactive mode.
In a possible implementation manner, the prompt information includes a moving distance and/or a moving direction, and the method may further include:
and determining the moving distance and/or the moving direction according to the first distance and the acquisition distance range, wherein the moving distance is used for indicating the distance that the electronic equipment at least needs to move, and the moving direction is used for indicating the direction that the electronic equipment needs to move.
For example, a difference between the first distance between the electronic device and the target photographic subject and the two end values of the acquisition distance range may be determined, and the difference is the movement distance. For example, in the case where the first distance is smaller than L1, it may be determined that the difference between the first distance and L1 is a movement distance, and correspondingly, the movement direction is a movement in a direction away from the target photographic subject. Alternatively, in the case where the first distance is greater than L2, it may be determined that the difference between the first distance and L2 is a moving distance, and correspondingly, the moving direction is a direction moving toward the target photographic subject.
The prompt message may include the movement distance and/or the movement direction, and the movement distance and the movement direction may be used to prompt the electronic device to move at least a distance and a movement direction, that is, the electronic device needs to move the movement distance at least according to the indication of the movement direction, so as to acquire the image information meeting the image acquisition requirement.
After the electronic device moves, a second distance between the moved electronic device and the target shooting object can be determined again, and the target image is acquired under the condition that the second distance is within the acquisition distance threshold. Or, under the condition that the second distance is not within the acquisition distance range, the prompt information can be continuously output to prompt the user to continuously move the electronic device until the second distance between the electronic device and the target shooting object is within the acquisition distance range, so as to acquire the target image.
Therefore, the user can be instructed to move the electronic equipment through the moving distance and the moving direction, and the user experience and the positioning accuracy can be improved through an interactive prompting mode.
In one possible implementation, the method may further include:
and under the condition that the output duration of the prompt message is greater than the output time threshold, stopping outputting the prompt message and jumping to a positioning initial interface.
For example, the output duration of the prompt message is within the output time range, which may be a preset time range. For example: the threshold time range of the interface display prompt message is as follows: (t 1, t 2), namely the prompt message is displayed for t1 seconds at least on the interface and t2 seconds at most, wherein t2 is a display time threshold. After the prompt message is displayed for t1 second, the second distance between the electronic device and the target shooting object can be determined again, if the second distance is not within the acquisition distance range, the distance measurement process can be repeated after t1 second until the second distance between the electronic device and the target shooting object is within the acquisition distance range or the display duration of the prompt message reaches t2 seconds, and the prompt message is closed (output is stopped).
If the second distance is within the acquisition distance range, the target image can be acquired for positioning; if the duration of the prompt message reaches t2 seconds, jumping to a positioning initial interface, generating and outputting description information, wherein the description information can be used for informing a user of positioning failure, and the reason of the positioning failure is that the distance between the electronic equipment and a target shooting object is too short or too far, and reminding the user to restart positioning operation after adjusting the distance between the electronic equipment and the target shooting object, so that image information of the target shooting object is collected to perform VPS positioning, and the problem of continuous loss of electric quantity of the electronic equipment caused by the fact that the electronic equipment always performs a ranging positioning process due to reasons such as improper operation of the user is solved.
It should be noted that, the acquisition distance range for measuring whether the first distance between the electronic device and the target shooting object meets the image acquisition requirement may be a preset numerical range or a dynamically determined numerical range.
In one possible implementation, the method may further include:
acquiring a preview image through the electronic equipment, wherein the preview image comprises the target shooting object;
identifying the target shooting object in the preview image to obtain an identification result;
and determining the acquisition distance range according to the identification result.
In a specific implementation, the acquisition distance range used for determining whether the distance between the electronic device and the target photographic object is appropriate may be dynamically determined according to the target photographic object itself. For example, the target shooting object may be pre-shot by the electronic device, and a preview image is acquired, where the preview image includes the target shooting object. Then, the target shooting object in the preview image acquired by the electronic equipment can be identified to obtain an identification result, and the acquisition distance range corresponding to the target shooting object is dynamically determined according to the identification result. In one possible implementation manner, the category to which the target photographic subject belongs and/or the size of the target photographic subject may be included in the recognition result.
For example, the target photographic object may be identified through a pre-trained neural network, the category of the target photographic object and/or the size of the target photographic object may be identified, and then the acquisition distance range corresponding to the target photographic object may be determined according to the category of the target photographic object and/or the size of the target photographic object.
The acquisition distance ranges corresponding to the categories can be respectively preset, for example, for the categories with larger sizes such as buildings and the like, under the condition that the distance between the electronic equipment and the target shooting object under the category is longer, the integrity of the target shooting object in the acquired image information can be ensured, so that the category can be provided with a larger acquisition distance range, namely, the values of the two ends of the acquisition distance range are relatively larger; for the types with smaller sizes such as sculptures and billboards, under the condition that the distance between the electronic equipment and the target shooting object under the types is shorter, the integrality and the definition of the target shooting object in the collected image information can be ensured, so that a smaller distance threshold value can be set for the types, namely, the values of the two ends of the collection distance range are smaller than those of the collection distance range of the types such as buildings.
Similarly, the acquisition distance range corresponding to each size range may be preset, for example, the smaller the size range is, the smaller the value of the two ends of the corresponding acquisition distance range may be set. For example: in case the size is smaller than the first size, corresponding to a first acquisition distance range (A1, A2), in case the size is greater than or equal to the first size and smaller than or equal to the second size, corresponding to a second acquisition distance range (B1, B2), in case the size is greater than the second size, corresponding to a third acquisition distance range (C1, C2), wherein A1 is smaller than B1, B1 is smaller than C1, A2 is smaller than B2, B2 is smaller than C2.
Therefore, the acquisition distance range corresponding to the target shooting object can be dynamically determined according to the category of the target shooting object and/or the size of the target shooting object, whether the first distance between the electronic equipment and the target shooting object meets the image acquisition requirement or not can be measured in a targeted manner, the acquisition precision of image information can be improved, and the positioning precision can be further improved.
The embodiment of the disclosure can be applied to positioning, AR navigation, AR games and other scenes, and the distance between the electronic device and the target shooting object can be calculated before the image information for positioning is acquired. Under the condition that the distance is too close or too far, corresponding prompt information is output, and a user is guided to adjust the distance between the electronic equipment and the target shooting object, so that a target image with better quality for positioning is shot, the image quality of the obtained target image is improved from the aspect of interactive flow, the success rate and the accuracy rate of positioning are improved, and the user experience is greatly improved.
It is understood that the above-mentioned method embodiments of the present disclosure can be combined with each other to form a combined embodiment without departing from the logic of the principle, which is limited by the space, and the detailed description of the present disclosure is omitted. Those skilled in the art will appreciate that in the above methods of the specific embodiments, the specific order of execution of the steps should be determined by their function and possibly their inherent logic.
In addition, the present disclosure also provides a positioning apparatus, an electronic device, a computer-readable storage medium, and a program, which can be used to implement any one of the positioning methods provided by the present disclosure, and the corresponding technical solutions and descriptions and corresponding descriptions in the method sections are not repeated.
Fig. 2 shows a block diagram of a positioning apparatus according to an embodiment of the present disclosure, which, as shown in fig. 2, may include:
a first determining module 21, operable to determine a first distance between the electronic device and a target photographic subject;
the acquisition module 22 may be configured to acquire, by the electronic device, a target image of a target photographic object according to the first distance;
the positioning module 23 may be configured to position the electronic device according to the target image, so as to obtain location information of the electronic device.
Therefore, the first distance between the electronic equipment and the target shooting object can be determined, the target image of the target shooting object is collected through the electronic equipment according to the first distance, and then the electronic equipment can be positioned according to the target image so as to obtain the position information of the electronic equipment. According to the positioning device provided by the embodiment of the disclosure, the target image for positioning can be acquired through the first distance between the electronic equipment and the target shooting object, the quality of the acquired target image can be improved, and the positioning precision can be further improved.
In a possible implementation manner, the acquisition module 22 may be further configured to:
and under the condition that the first distance is within a collection distance range, collecting a target image of a target shooting object through the electronic equipment.
In a possible implementation manner, the acquisition module 22 may be further configured to:
under the condition that the first distance is not within the acquisition distance range, outputting prompt information, wherein the prompt information is used for indicating to adjust the position of the electronic equipment;
determining a second distance between the electronic equipment and the target shooting object after the position is adjusted;
and under the condition that the second distance is within the acquisition distance range, acquiring a target image of a target shooting object through the electronic equipment.
In a possible implementation manner, the prompt information may include a moving distance and/or a moving direction, and the apparatus may further include:
the second determining module may be configured to determine the moving distance and/or the moving direction according to the first distance and the collection distance range, where the moving distance may be used to indicate a distance that the electronic device needs to move at least, and the moving direction may be used to indicate a direction that the electronic device needs to move.
In one possible implementation, the apparatus may further include:
the first preview module can be used for acquiring a preview image through the electronic equipment, wherein the preview image comprises the target shooting object;
the identification module can be used for identifying the target shooting object in the preview image to obtain an identification result;
the third determining module may be configured to determine the acquisition distance range according to the recognition result.
In one possible implementation manner, the category to which the target photographic subject belongs and/or the size of the target photographic subject may be included in the recognition result.
In one possible implementation manner, the number of the target photographic objects is more than two; the first determining module 21 may be further configured to:
respectively determining object distances between the electronic equipment and all target shooting objects in the preview image;
and determining the minimum distance in the object distances as the first distance.
In one possible implementation, the apparatus may further include:
the second preview module can be used for acquiring a preview image through the electronic equipment, wherein the preview image comprises the target shooting object;
the first determining module may be further configured to:
acquiring a focal length of the electronic equipment when the preview image is acquired;
and determining a first distance between the electronic equipment and the target shooting object according to the focal distance when the electronic equipment collects the preview image.
In one possible implementation, the apparatus may further include;
and the closing module is used for stopping outputting the prompt information and jumping to a positioning initial interface under the condition that the output duration of the prompt information is greater than the output time threshold.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
Embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the above-mentioned method. The computer readable storage medium may be a non-volatile computer readable storage medium.
An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the memory-stored instructions to perform the above-described method.
The embodiments of the present disclosure also provide a computer program product, which includes computer readable code, and when the computer readable code runs on a device, a processor in the device executes instructions for implementing the positioning method provided in any of the above embodiments.
The embodiments of the present disclosure also provide another computer program product for storing computer readable instructions, which when executed cause a computer to perform the operations of the positioning method provided in any of the above embodiments.
The electronic device may be provided as a terminal, server, or other form of device.
Fig. 3 illustrates a block diagram of an electronic device 800 in accordance with an embodiment of the disclosure. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like terminal.
Referring to fig. 3, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communications component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the electronic device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as a wireless network (WiFi), a second generation mobile communication technology (2G) or a third generation mobile communication technology (3G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the electronic device 800 to perform the above-described methods.
Fig. 4 illustrates a block diagram of an electronic device 1900 in accordance with an embodiment of the disclosure. For example, the electronic device 1900 may be provided as a server. Referring to fig. 4, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system, such as the Microsoft Server operating system (Windows Server), stored in the memory 1932 TM ) Apple Inc. of the present application based on the graphic user interface operating System (Mac OS X) TM ) Multi-user, multi-process computer operating system (Unix) TM ) Free and open native code Unix-like operating System (Linux) TM ) Open native code Unix-like operating System (FreeBSD) TM ) Or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as a memory 1932, is also provided that includes computer program instructions executable by a processing component 1922 of an electronic device 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (9)

1. A positioning method is applied to an electronic device, and the method comprises the following steps:
determining a first distance between the electronic device and a target photographic object before acquiring a target image of the target photographic object;
acquiring a target image of a target shooting object through the electronic equipment according to the first distance;
positioning the electronic equipment according to the target image to obtain the position information of the electronic equipment;
the acquiring, by the electronic device, a target image of a target photographic object according to the first distance includes:
outputting prompt information under the condition that the first distance is not within the acquisition distance range, wherein the prompt information is used for indicating the position of the electronic equipment to be adjusted;
determining a second distance between the electronic equipment and the target shooting object after the position is adjusted;
acquiring a target image of a target shooting object through the electronic equipment under the condition that the second distance is within the acquisition distance range;
the method further comprises the following steps:
acquiring a preview image through the electronic equipment, wherein the preview image comprises the target shooting object;
identifying the target shooting object in the preview image to obtain an identification result;
determining the acquisition distance range according to the identification result;
the identification result comprises the category of the target shooting object and the size of the target shooting object.
2. The method of claim 1, wherein capturing, by the electronic device, a target image of a target photographic object according to the first distance further comprises:
and under the condition that the first distance is within a collection distance range, collecting a target image of a target shooting object through the electronic equipment.
3. The method of claim 1, wherein the hint information includes a moving distance and/or a moving direction, and wherein the method further comprises:
and determining the moving distance and/or the moving direction according to the first distance and the acquisition distance range, wherein the moving distance is used for indicating the distance at least needing to be moved by the electronic equipment, and the moving direction is used for indicating the direction in which the electronic equipment needs to be moved.
4. The method according to any one of claims 1 to 3, characterized in that the number of the target photographic subjects is two or more;
the determining a first distance between the electronic device and a target photographic object comprises:
respectively determining object distances between the electronic equipment and each target shooting object in the preview image;
and determining the minimum distance in the object distances as the first distance.
5. The method according to any one of claims 1 to 3, further comprising:
acquiring a preview image through the electronic equipment, wherein the preview image comprises the target shooting object;
the determining a first distance between the electronic device and a target photographic object comprises:
acquiring a focal length of the electronic equipment when the preview image is acquired;
and determining a first distance between the electronic equipment and the target shooting object according to the focal distance when the electronic equipment collects the preview image.
6. The method of claim 1, further comprising:
and under the condition that the output duration of the prompt message is greater than the output time threshold, stopping outputting the prompt message and jumping to a positioning initial interface.
7. A positioning device applied to an electronic device, the device comprising:
the electronic equipment comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a first distance between the electronic equipment and a target shooting object before acquiring a target image of the target shooting object;
the acquisition module is used for acquiring a target image of a target shooting object through the electronic equipment according to the first distance;
the positioning module is used for positioning the electronic equipment according to the target image to obtain the position information of the electronic equipment;
the acquisition module is used for outputting prompt information under the condition that the first distance is not within the acquisition distance range, wherein the prompt information is used for indicating the adjustment of the position of the electronic equipment; determining a second distance between the electronic equipment and the target shooting object after the position is adjusted; acquiring a target image of a target shooting object through the electronic equipment under the condition that the second distance is within the acquisition distance range;
the first preview module is used for acquiring a preview image through the electronic equipment, wherein the preview image comprises the target shooting object;
the identification module is used for identifying the target shooting object in the preview image to obtain an identification result;
the third determining module is used for determining the acquisition distance range according to the identification result;
the identification result comprises the category of the target shooting object and the size of the target shooting object.
8. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the memory-stored instructions to perform the method of any of claims 1 to 6.
9. A computer readable storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of any one of claims 1 to 6.
CN202110214932.6A 2021-02-25 2021-02-25 Positioning method and device, electronic equipment and storage medium Active CN113014810B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110214932.6A CN113014810B (en) 2021-02-25 2021-02-25 Positioning method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110214932.6A CN113014810B (en) 2021-02-25 2021-02-25 Positioning method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113014810A CN113014810A (en) 2021-06-22
CN113014810B true CN113014810B (en) 2023-01-31

Family

ID=76386227

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110214932.6A Active CN113014810B (en) 2021-02-25 2021-02-25 Positioning method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113014810B (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103067856A (en) * 2011-10-24 2013-04-24 康佳集团股份有限公司 Geographic position locating method and system based on image recognition
CN104853104B (en) * 2015-06-01 2018-08-28 深圳市微队信息技术有限公司 A kind of method and system of auto-tracking shooting moving target
CN105187719A (en) * 2015-08-21 2015-12-23 深圳市金立通信设备有限公司 Shooting method and terminal
CN105606086A (en) * 2015-08-28 2016-05-25 宇龙计算机通信科技(深圳)有限公司 Positioning method and terminal
CN106791426A (en) * 2017-01-09 2017-05-31 深圳市金立通信设备有限公司 Method and terminal that a kind of use light compensating lamp is taken pictures
CN107680128B (en) * 2017-10-31 2020-03-27 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
CN109977727A (en) * 2017-12-27 2019-07-05 广东欧珀移动通信有限公司 Sight protectio method, apparatus, storage medium and mobile terminal

Also Published As

Publication number Publication date
CN113014810A (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN107692997B (en) Heart rate detection method and device
CN110557547B (en) Lens position adjusting method and device
CN110569822A (en) image processing method and device, electronic equipment and storage medium
CN112465843A (en) Image segmentation method and device, electronic equipment and storage medium
CN111553864A (en) Image restoration method and device, electronic equipment and storage medium
CN112991553A (en) Information display method and device, electronic equipment and storage medium
CN112291631A (en) Information acquisition method, device, terminal and storage medium
CN112184787A (en) Image registration method and device, electronic equipment and storage medium
CN108174269B (en) Visual audio playing method and device
CN112085097A (en) Image processing method and device, electronic equipment and storage medium
CN112541971A (en) Point cloud map construction method and device, electronic equipment and storage medium
CN112860061A (en) Scene image display method and device, electronic equipment and storage medium
CN112950712B (en) Positioning method and device, electronic equipment and storage medium
CN113807253A (en) Face recognition method and device, electronic equipment and storage medium
CN112102300A (en) Counting method and device, electronic equipment and storage medium
CN113014810B (en) Positioning method and device, electronic equipment and storage medium
CN113506325B (en) Image processing method and device, electronic equipment and storage medium
CN113506229B (en) Neural network training and image generating method and device
CN113506324B (en) Image processing method and device, electronic equipment and storage medium
CN110858921A (en) Program video processing method and device
CN113506321A (en) Image processing method and device, electronic equipment and storage medium
CN113506320A (en) Image processing method and device, electronic equipment and storage medium
CN112461245A (en) Data processing method and device, electronic equipment and storage medium
CN110896492B (en) Image processing method, device and storage medium
CN111650554A (en) Positioning method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant