CN106383679B - Positioning method and terminal equipment thereof - Google Patents

Positioning method and terminal equipment thereof Download PDF

Info

Publication number
CN106383679B
CN106383679B CN201610798466.XA CN201610798466A CN106383679B CN 106383679 B CN106383679 B CN 106383679B CN 201610798466 A CN201610798466 A CN 201610798466A CN 106383679 B CN106383679 B CN 106383679B
Authority
CN
China
Prior art keywords
image
information
subset
rgb
acquiring
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
CN201610798466.XA
Other languages
Chinese (zh)
Other versions
CN106383679A (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201610798466.XA priority Critical patent/CN106383679B/en
Publication of CN106383679A publication Critical patent/CN106383679A/en
Application granted granted Critical
Publication of CN106383679B publication Critical patent/CN106383679B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Image Processing (AREA)
  • Telephone Function (AREA)

Abstract

An embodiment of the present invention provides a positioning method, where a first device and a second device are in a connected state, including: the method comprises the steps that a first device acquires a first image, wherein the first image is a subset of a second image, the second image is a complete image displayed by a second device, the second image comprises a foreground image and a background image, the first image comprises the subset of the foreground image, and the first image further comprises the subset of the background image; the first device determines a position of the first device relative to the second device based on color information of the first image. Therefore, the embodiment of the invention can determine the position of the first device relative to the second device by acquiring the image displayed on the second device through the first device, and can improve the user experience without increasing hardware devices.

Description

Positioning method and terminal equipment thereof
Technical Field
The invention relates to the field of terminal display, in particular to a positioning method and terminal equipment thereof.
Background
With the enhancement and popularization of the functions of the smart phone, the smart phone becomes a second information center of users following a personal computer, and due to the advantages of hardware (such as a screen) and software (such as large application software and data) inherent in the personal computer, more and more people need combined interaction between the computer and the mobile phone, the interaction needs to be seamlessly connected with two devices, the user experience of the process can be met, extra hardware cost and background data processing services do not need to be added, and the premise for achieving the interaction is that the mobile phone and the PC screen are positioned. Therefore, how to determine the relative position between the user equipments is an urgent problem to be solved.
Disclosure of Invention
The embodiment of the method provides a positioning method which can determine the relative position between devices.
In a first aspect, a positioning method is provided, where a first device and a second device are in a connected state, and the method includes: the method comprises the steps that a first device acquires a first image, wherein the first image is a subset of a second image, the second image is a complete image displayed by a second device, the second image comprises a foreground image and a background image, the first image comprises the subset of the foreground image, and the first image further comprises the subset of the background image; the first device determines a position of the first device relative to the second device based on color information of the first image.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the determining, according to color information of the first image, a position of the first device relative to the second device includes: acquiring color information of the second image, and determining red, green and blue (RGB) information of the second image according to the color information of the second image; determining red, green and blue (RGB) information of the first image according to the color information of the first image; and determining the position of the first equipment relative to the second equipment in the horizontal direction according to the RGB information of the first image and the RGB information of the second image.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the determining a position of the first device relative to the second device according to the color information of the first image includes: acquiring information of a third image, wherein the third image is a subset of a second image, the third image comprises a subset of the foreground image, the third image further comprises a subset of the background image, and a vertical distance between the first device and the second device is different when the first device acquires the third image from when the first device acquires the first image; determining RGB information of the first image according to the color information of the first image; determining RGB information of the third image according to the color information of the third image; and acquiring the color difference between the first image and the third image according to the RGB information of the first image and the RGB information of the third image, and determining the distance between the first equipment and the second equipment in the vertical direction according to the color difference.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the acquiring, by the first device, a first image includes: the first device acquires the first image by using a camera of the first device.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the method further includes: sending, to the second device, location information of the first device relative to the second device.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, the method further includes: the first device acquiring a fourth image, wherein the fourth image comprises only a subset of the foreground image or a subset of the background image;
and the first device sends indication information to the second device, wherein the indication information is used for indicating the second device to update the second image, so that the first device determines the relative position with the second device according to the updated second image.
In a second aspect, a positioning method is provided, where a first device and a second device are in a connected state, and the method includes: the second device displays a second image, the second image comprising a foreground image and a background image; and the second equipment determines the position of the first equipment relative to the second equipment according to the color information of a first image acquired by the first equipment, wherein the first image is a subset of the second image, the first image comprises a subset of the foreground image, and the first image also comprises a subset of the background image.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the determining, by the second device, a position of the first device relative to the second device according to color information of the first image acquired by the first device includes: acquiring color information of the first image from the first device; acquiring red, green and blue (RGB) information of the first image according to the information of the first image; and determining the position of the first device relative to the second device in the horizontal direction according to the RGB information of the first image and the RGB information of the second image, wherein the color information of the second image comprises the RGB information of the second image.
With reference to the second aspect and the foregoing implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the determining a position of the first device relative to the second device according to the color information of the first image includes: acquiring color information of a third image from the first device, wherein the third image is a subset of a second image, the third image comprises a subset of the foreground image, the third image further comprises a subset of the background image, and the third image is acquired by the first device at a different vertical distance from the second device than when the first image is acquired by the device; acquiring color information of the first image from the first device; acquiring RGB information of the first image according to the color information of the first image; acquiring RGB information of the third image according to the color information of the third image; and acquiring the color difference between the first image and the third image according to the RGB information of the first image and the RGB information of the third image, and determining the distance between the first equipment and the second equipment in the vertical direction according to the color difference.
With reference to the second aspect and the foregoing implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the method further includes: when the fourth image acquired by the first device only comprises the subset of the foreground image or the subset of the background image, receiving indication information sent by the first device, wherein the indication information is used for indicating the second device to update the second image, so that the first device acquires a new image according to the updated second image.
In a third aspect, an apparatus is provided, the apparatus being in a connected state with a second apparatus, comprising:
an obtaining unit, configured to obtain a first image, where the first image is a subset of a second image, the second image is a complete image displayed by the second device, the second image includes a foreground image and a background image, the first image includes the subset of the foreground image, and the first image also includes the subset of the background image; a determination unit to determine a location of the device relative to the second device based on color information of the first image.
With reference to the third aspect, in a first possible implementation manner of the third aspect, the obtaining unit is configured to obtain color information of the second image, and determine red, green, and blue, RGB, information of the second image according to the color information of the second image; the determination unit is configured to: determining red, green and blue (RGB) information of the first image according to the color information of the first image; and determining the position of the equipment relative to the second equipment in the horizontal direction according to the RGB information of the first image and the RGB information of the second image.
With reference to the third aspect and the foregoing implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the obtaining unit is configured to: acquiring information of a third image, wherein the third image is a subset of a second image, the third image comprises a subset of the foreground image, the third image also comprises a subset of the background image, and the vertical distance between the apparatus and the second apparatus is different when the apparatus acquires the third image and when the apparatus acquires the first image; the determination unit is configured to: determining RGB information of the first image according to the color information of the first image; determining RGB information of the third image according to the color information of the third image; and acquiring the color difference between the first image and the third image according to the RGB information of the first image and the RGB information of the third image, and determining the distance between the equipment and the second equipment in the vertical direction according to the color difference.
With reference to the third aspect and the foregoing implementation manner of the third aspect, in a third possible implementation manner of the third aspect, the obtaining unit is configured to obtain the first image by using a camera of the apparatus.
With reference to the third aspect and the foregoing implementation manner of the third aspect, in a fourth possible implementation manner of the third aspect, the apparatus further includes: a sending unit, configured to send, to the second device, location information of the device relative to the second device.
With reference to the third aspect and the foregoing implementation manner of the third aspect, in a fifth possible implementation manner of the third aspect, the obtaining unit is configured to: acquiring a fourth image, wherein the fourth image only comprises a subset of the foreground image or a subset of the background image; the sending unit is configured to send indication information to the second device, where the indication information is used to indicate the second device to update the second image, so that the device determines a relative position with the second device according to the updated second image.
In a fourth aspect, there is provided a device, with which a first device is in a connected state, comprising: a display unit for displaying a second image, the second image comprising a foreground image and a background image; a determining unit, configured to determine a position of a first device relative to the device according to color information of a first image acquired by the first device, where the first image is a subset of a second image, the first image includes a subset of the foreground image, and the first image further includes a subset of the background image.
With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the determining unit is configured to: acquiring color information of the first image from the first device; acquiring red, green and blue (RGB) information of the first image according to the information of the first image; and determining the position of the first equipment relative to the equipment in the horizontal direction according to the RGB information of the first image and the RGB information of the second image, wherein the color information of the second image comprises the RGB information of the second image.
With reference to the fourth aspect and the foregoing implementation manner of the fourth aspect, in a second possible implementation manner of the fourth aspect, the determining unit is configured to: acquiring color information of a third image from the first device, wherein the third image is a subset of a second image, the third image comprises a subset of the foreground image, the third image further comprises a subset of the background image, and the third image is acquired by the first device at a different vertical distance from the first device than when the first image is acquired by the first device; acquiring color information of the first image from the first device; acquiring RGB information of the first image according to the color information of the first image; acquiring RGB information of the third image according to the color information of the third image; and acquiring the color difference between the first image and the third image according to the RGB information of the first image and the RGB information of the third image, and determining the distance between the first equipment and the equipment in the vertical direction according to the color difference.
With reference to the fourth aspect and the foregoing implementation manner of the fourth aspect, in a third possible implementation manner of the fourth aspect, the apparatus further includes: a receiving unit, configured to receive indication information sent by the first device when the fourth image acquired by the first device only includes a subset of the foreground image or a subset of the background image, where the indication information is used to instruct the device to update the second image, so that the first device acquires a new image according to the updated second image.
Therefore, the embodiment of the invention can determine the position of the first device relative to the second device by acquiring the image displayed on the second device through the first device, and can improve the user experience without increasing hardware devices.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of an application scenario of one embodiment of the present invention.
FIG. 2 is a schematic flow diagram of a method of one embodiment of the invention.
Fig. 3 is a schematic flow diagram of a method of another embodiment of the invention.
Fig. 4 is a schematic flow diagram of a method of another embodiment of the invention.
Fig. 5 is a schematic flow diagram of another embodiment of the present invention.
Fig. 6 is a schematic block diagram of an apparatus of one embodiment of the present invention.
Fig. 7 is a schematic structural view of an apparatus of another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, shall fall within the scope of protection of the present invention.
FIG. 1 is a schematic diagram of an application scenario of one embodiment of the present invention. As shown in fig. 1, when a device (e.g., a mobile phone) and a device (e.g., a personal computer) need to be combined and interactively used, connection may be performed through bluetooth, infrared or WiFi (wireless fidelity) technology, and data transmission may be performed. The existing mobile phone and the large screen are mutually positioned by a physical marking method, so that hardware equipment may need to be modified.
FIG. 2 is a schematic flow diagram of a method of one embodiment of the invention. As shown in fig. 2, wherein the first device is in a connected state with the second device, the method includes:
step 210, a first device acquires a first image, where the first image is a subset of a second image, the second image is a complete image displayed by the second device, the second image includes a foreground image and a background image, the first image includes the subset of the foreground image, and the first image also includes the subset of the background image.
In step 220, the first device determines the position of the first device relative to the second device based on the color information of the first image.
Specifically, the first device and the second device being in the connected state means that the first device and the second device can transmit and communicate data, for example, the first device and the second device are connected in a wireless or wired manner through technologies such as bluetooth and WiFi, and it should be understood that the invention is not limited thereto.
Specifically, the first device may be an intelligent terminal device having a camera function, and the second device may be a terminal device having an on-screen display function.
In step 210, the second image is a complete image displayed by the second device, the second image is a color image, the second image includes a foreground image and a background image, for example, the second image may be a masked graphic, the first device knows the pattern of the second graphic in advance or by means of message transmission, and the foreground image and the background image are different in color;
the first image is an image obtained when the first device takes the second image through the camera, and the first image is also a color image, so the first image is a subset of the second image, specifically, the first image includes a part of a foreground image of the second image, that is, a subset of the foreground image, and the first image also includes a part of a background image of the second image.
Specifically, in step 220, since the first device knows the specific pattern of the second image, the position of the first device relative to the second device can be determined by comparing the color information of the first image obtained by the first device with the known second image.
Therefore, the embodiment of the invention can determine the position of the first device relative to the second device by acquiring the image displayed on the second device through the first device, thereby improving the user experience.
Optionally, as an embodiment of the present invention, determining a position of the first device relative to the second device according to color information of the first image includes: acquiring color information of a second image, and determining red, green and blue (RGB) information of the second image according to the color information of the second image; determining red, green and blue (RGB) information of the first image according to the color information of the first image; and determining the position of the first device relative to the second device in the horizontal direction according to the RGB information of the first image and the RGB information of the second image.
That is, the first device may acquire color information of the second image by receiving the second device information, and further, determine the position of the first device with respect to the second device in the XY-axis direction from the RGB information of the first image and the RGB information of the second image.
For example, a mask color pattern is displayed on a computer screen, a camera of the mobile phone captures RGB values, and X and Y coordinates of the mobile phone relative to the computer screen are obtained through calculation.
Optionally, as an embodiment of the present invention, determining a position of the first device relative to the second device according to color information of the first image includes: acquiring information of a third image, wherein the third image is a subset of the second image, the third image comprises a subset of the foreground image and a subset of the background image, and the vertical distance between the first device and the second device is different when the first device acquires the third image and when the first device acquires the first image; determining RGB information of the first image according to the color information of the first image; determining RGB information of the third image according to the color information of the third image; and acquiring the color difference between the first image and the third image according to the RGB information of the first image and the RGB information of the third image, and determining the distance between the first equipment and the second equipment in the vertical direction according to the color difference.
That is, when the first device is positioned at a different position in the vertical direction from the second device, two images, that is, the first image and the third image, are taken at different positions, and the two images can determine the distance in the vertical direction of the first device with respect to the second device by calculating the color deviation.
For example, if the first image is obtained when the first device is relatively close to the second device, and the first image has a first color contrast, the third image is obtained when the first device is relatively far from the second device, and the third image has a second color contrast, the vertical position of the first device relative to the second device can be determined based on such a correspondence between the Z-axis position and the first and second color contrasts.
Optionally, as an embodiment of the present invention, the acquiring, by the first device, the first image includes: the first device acquires a first image by using a camera of the first device.
Optionally, as an embodiment of the present invention, the method further includes: and sending the position information of the first device relative to the second device.
That is to say, after the first device determines the relative position with the second device, the position information of the first device relative to the second device can be sent to the second device, so that the second device can perform data communication with the first device according to the position of the first device, and more intuitively perform information interaction.
Optionally, the method further includes: the first device acquires a fourth image, wherein the fourth image only comprises a subset of the foreground image or a subset of the background image; and the first device sends indication information to the second device, wherein the indication information is used for indicating the second device to update the second image, so that the first device determines the relative position with the second device according to the updated second image.
That is to say, the fourth image is also an image obtained when the first device takes the second image through the camera, and the fourth image only includes a subset of the foreground image or a subset of the background image in the second image, that is, the fourth image is only composed of the foreground image or only composed of the background image of the second image, at this time, the first device may not know the position relative to the second device by using the fourth image, at this time, the first device sends instruction information to the second device to instruct the second device to update the second image, at this time, the first device takes the updated second image, and the position determination is continued according to the obtained image.
In other words, when the image acquired by the first device includes only a foreground image or a background image, it may not be possible to determine the relative positions of the first device and the second device, and therefore, the second device is to update the image displayed on the screen.
Fig. 3 is a schematic flow diagram of a method of another embodiment of the invention. As shown in fig. 3, wherein the first device is in a connected state with the second device, the method includes:
in step 310, the second device displays a second image, the second image comprising a foreground image and a background image.
And step 320, the second device determines the position of the first device relative to the second device according to the color information of the first image acquired by the first device, wherein the first image is a subset of the second image, the first image comprises a subset of the foreground image, and the first image also comprises a subset of the background image.
Specifically, the second image is a color image, and the second device can determine the position of the first device relative to the second device according to the color information of the first image and the second image.
Therefore, the second device can determine the position of the first device relative to the second device according to the color information of the first image acquired by the first device, and user experience is improved.
Optionally, as an embodiment of the present invention, the determining, by the second device, the position of the first device relative to the second device according to the color information of the first image acquired by the first device includes: acquiring color information of a first image from a first device; acquiring red, green and blue (RGB) information of the first image according to the information of the first image; and determining the position of the first equipment relative to the second equipment in the horizontal direction according to the RGB information of the first image and the RGB information of the second image, wherein the color information of the second image comprises the RGB information of the second image.
Optionally, determining the position of the first device relative to the second device according to the color information of the first image comprises: acquiring color information of a third image from the first device, wherein the third image is a subset of the second image, the third image comprises a subset of the foreground image and a subset of the background image, and the vertical distance between the first device and the second device is different when the first device acquires the third image and when the device acquires the first image; acquiring color information of a first image from a first device; acquiring RGB information of the first image according to the color information of the first image; acquiring RGB information of the third image according to the color information of the third image; and acquiring the color difference between the first image and the third image according to the RGB information of the first image and the RGB information of the third image, and determining the distance between the first equipment and the second equipment in the vertical direction according to the color difference.
Optionally, as an embodiment of the present invention, the method further includes: when the fourth image acquired by the first device only comprises the subset of the foreground image or the subset of the background image, receiving indication information sent by the first device, wherein the indication information is used for indicating the second device to update the second image, so that the first device acquires a new image according to the updated second image.
That is, when the fourth image acquired by the first device only includes the subset of the foreground image of the second image or only includes the subset of the background image of the second image, indication information is sent to the second device, and the second device updates the second image, that is, updates the image displayed on the second device according to the indication information, so that the first device acquires a new image according to the updated second image, and the second device can acquire the position of the first device relative to the second device according to the new image if the acquired new image includes the subset of the foreground image and the subset of the background image of the second image.
In particular, the second device is able to dynamically track the position of the first device relative to the second device by dynamically adjusting the position and size of the mask color pattern, i.e. updating the second image as described above.
Therefore, according to the embodiment of the invention, the position of the first device relative to the second device can be determined by acquiring the image displayed on the second device and shot by the first device, so that no hardware device is added, the user experience is improved, and the positioning of the short-distance contact to the distance of 10-20CM can be provided.
Fig. 4 is a schematic flow diagram of a method of another embodiment of the invention. In the method, the first device is a mobile phone, and the second device is a Personal Computer (English: Personal Computer, abbreviated as PC).
As shown in fig. 4, the method comprises a step 401 of displaying a masked color image, i.e. the above-mentioned second image, on the screen of the PC.
And step 402, the mobile phone acquires a second image displayed on the PC screen by using the camera, and a first image is obtained by shooting.
In step 403, RGB values of the first image are calculated.
Step 404, calculating 2D (X, Y) coordinates of the mobile phone relative to the PC according to the RGB value of the first image.
In step 405, the relative position of the handset in the horizontal direction with respect to the PC is obtained.
And step 406, calculating the color difference of the two first images obtained before and after the position of the mobile phone from the Z axis of the PC is changed.
Step 407, calculating the coordinate of the mobile phone in the vertical direction relative to the PC according to the color difference, and acquiring the relative position of the mobile phone relative to the PC.
Step 408, calculating an adjustment vector of the mask color image.
In step 409, the second device adjusts the size and/or position of the mask color image. That is, the second device performs the update of the second image.
Therefore, according to the embodiment of the invention, the position of the first device relative to the second device can be determined by acquiring the image displayed on the second device and shot by the first device, so that no hardware device is added, the user experience is improved, and the positioning of the short-distance contact to the distance of 10-20CM can be provided.
Fig. 5 is a schematic flow diagram of another embodiment of the present invention.
As shown in fig. 5, step 501, a mask pattern, that is, a foreground image in a second image displayed by the second device, is displayed on the PC screen, and a portion of the second image other than the mask pattern is a background image.
Step 502, the mobile phone obtains an image through the camera, that is, the first image obtained by the first device.
In step 503, the mobile phone detects whether a masked pattern exists in the first image, that is, whether the first image includes a foreground image of the second image, if so, the step 504 is performed, otherwise, the step 505 is performed.
Step 504, color sampling is performed on the image detected by the mobile phone, and a sampling point is obtained.
In step 505, the PC updates the second image, i.e., adjusts the size and position of the mask image.
And step 506, calculating the position of the mobile phone relative to the PC in the X and Y axis directions according to the color sampling in the step 504, namely the position calculated by the inner point in the figure.
And step 507, determining the position of the mobile phone relative to the Z-axis direction of the PC by determining the color difference of the two frames of images acquired by the mobile phone. Specifically, with the color difference of two frames, an outlier can be determined, that is, with the color difference from the previous frame.
At step 508, an adjustment vector can be determined from the location of the outliers.
In step 509, the size and position of the masked image on the PC screen can be determined and modulated according to the adjustment vector.
Therefore, according to the embodiment of the invention, the position of the first device relative to the second device can be determined by acquiring the image displayed on the second device and shot by the first device, so that no hardware device is added, the user experience is improved, and the positioning of the short-distance contact to the distance of 10-20CM can be provided.
Fig. 6 is a schematic block diagram of an apparatus of one embodiment of the present invention. As shown in fig. 6, the apparatus 600 includes:
an obtaining unit 610, where the obtaining unit 610 is configured to obtain a first image, where the first image is a subset of a second image, the second image is a complete image displayed by the second device, the second image includes a foreground image and a background image, the first image includes the subset of the foreground image, and the first image also includes the subset of the background image.
A determining unit 620, the determining unit 620 being configured to determine a position of the device relative to the second device according to color information of the first image.
Optionally, as an embodiment of the present invention, the obtaining unit 610 is configured to obtain color information of the second image, and determine red, green, blue, RGB information of the second image according to the color information of the second image; the determination unit is configured to: determining red, green and blue (RGB) information of the first image according to the color information of the first image; and determining the position of the equipment relative to the second equipment in the horizontal direction according to the RGB information of the first image and the RGB information of the second image.
Optionally, as an embodiment of the present invention, the obtaining unit 610 is configured to: acquiring information of a third image, wherein the third image is a subset of a second image, the third image comprises a subset of the foreground image, the third image also comprises a subset of the background image, and the vertical distance between the apparatus and the second apparatus is different when the apparatus acquires the third image and when the apparatus acquires the first image; the determining unit 620 is configured to: determining RGB information of the first image according to the color information of the first image; determining RGB information of the third image according to the color information of the third image; and acquiring the color difference between the first image and the third image according to the RGB information of the first image and the RGB information of the third image, and determining the distance between the equipment and the second equipment in the vertical direction according to the color difference.
Optionally, as an embodiment of the present invention, the obtaining unit 610 is configured to obtain the first image by using a camera of the apparatus.
Optionally, as an embodiment of the present invention, the apparatus further includes: a sending unit, configured to send, to the second device, location information of the device relative to the second device.
Optionally, as an embodiment of the present invention, the obtaining unit 610 is configured to: acquiring a fourth image, wherein the fourth image only comprises a subset of the foreground image or a subset of the background image; the sending unit is configured to send indication information to the second device, where the indication information is used to indicate the second device to update the second image, so that the device determines a relative position with the second device according to the updated second image.
Fig. 7 is a schematic structural view of an apparatus of another embodiment of the present invention. As shown in fig. 7, the apparatus 700 includes:
a display unit 710, wherein the display unit 710 is configured to display a second image, and the second image includes a foreground image and a background image;
a determining unit 720, wherein the determining unit 720 is configured to determine a position of the first device relative to the device according to color information of a first image acquired by the first device, the first image is a subset of a second image, the first image includes a subset of the foreground image, and the first image also includes a subset of the background image.
Optionally, as an embodiment of the present invention, the determining unit 720 is configured to: acquiring color information of the first image from the first device; acquiring red, green and blue (RGB) information of the first image according to the information of the first image; and determining the position of the first equipment relative to the equipment in the horizontal direction according to the RGB information of the first image and the RGB information of the second image, wherein the color information of the second image comprises the RGB information of the second image.
Optionally, as an embodiment of the present invention, the determining unit 720 is configured to: acquiring color information of a third image from the first device, wherein the third image is a subset of a second image, the third image comprises a subset of the foreground image, the third image further comprises a subset of the background image, and the third image is acquired by the first device at a different vertical distance from the first device than when the first image is acquired by the first device; acquiring color information of the first image from the first device; acquiring RGB information of the first image according to the color information of the first image; acquiring RGB information of the third image according to the color information of the third image; and acquiring the color difference between the first image and the third image according to the RGB information of the first image and the RGB information of the third image, and determining the distance between the first equipment and the equipment in the vertical direction according to the color difference.
Optionally, as an embodiment of the present invention, the apparatus further includes: a receiving unit, configured to receive indication information sent by the first device when the fourth image acquired by the first device only includes a subset of the foreground image or a subset of the background image, where the indication information is used to instruct the device to update the second image, so that the first device acquires a new image according to the updated second image.
Those of ordinary skill in the art will appreciate that the various method steps and elements described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or combinations of both, and that the steps and elements of the various embodiments have been described above generally in terms of their functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The methods or steps described in connection with the embodiments disclosed herein may be embodied in hardware, a software program executed by a processor, or a combination of both. The software routines may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or alterations to the embodiments of the present invention may be made by those skilled in the art without departing from the spirit and scope of the present invention, and such modifications or alterations are intended to be within the scope of the present invention.

Claims (20)

1. A positioning method, wherein a first device and a second device are in a connected state, comprising:
the method comprises the steps that a first device acquires a first image, wherein the first image is a subset of a second image, the second image is a complete image displayed by a second device, the second image comprises a foreground image and a background image, the first image comprises the subset of the foreground image, and the first image further comprises the subset of the background image;
the first device determines a position of the first device relative to the second device based on color information of the first image.
2. The method of claim 1, wherein determining the position of the first device relative to the second device from the color information of the first image comprises:
acquiring color information of the second image, and determining red, green and blue (RGB) information of the second image according to the color information of the second image;
determining red, green and blue (RGB) information of the first image according to the color information of the first image;
and determining the position of the first equipment relative to the second equipment in the horizontal direction according to the RGB information of the first image and the RGB information of the second image.
3. The method of claim 1 or 2, wherein determining the position of the first device relative to the second device from the color information of the first image comprises:
acquiring information of a third image, wherein the third image is a subset of a second image, the third image comprises a subset of the foreground image, the third image further comprises a subset of the background image, and a vertical distance between the first device and the second device is different when the first device acquires the third image from when the first device acquires the first image;
determining RGB information of the first image according to the color information of the first image;
determining RGB information of the third image according to the color information of the third image;
and acquiring the color difference between the first image and the third image according to the RGB information of the first image and the RGB information of the third image, and determining the distance between the first equipment and the second equipment in the vertical direction according to the color difference.
4. The method of any of claims 1-2, wherein the first device acquires a first image comprising:
the first device acquires the first image by using a camera of the first device.
5. The method according to any one of claims 1 to 2, further comprising:
sending, to the second device, location information of the first device relative to the second device.
6. The method according to any one of claims 1 to 2, further comprising:
the first device acquiring a fourth image, wherein the fourth image comprises only a subset of the foreground image or a subset of the background image;
and the first device sends indication information to the second device, wherein the indication information is used for indicating the second device to update the second image, so that the first device determines the relative position with the second device according to the updated second image.
7. A positioning method, wherein a first device and a second device are in a connected state, comprising:
the second device displays a second image, the second image comprising a foreground image and a background image;
and the second equipment determines the position of the first equipment relative to the second equipment according to the color information of a first image acquired by the first equipment, wherein the first image is a subset of the second image, the first image comprises a subset of the foreground image, and the first image also comprises a subset of the background image.
8. The method of claim 7, wherein the second device determines the position of the first device relative to the second device according to color information of the first image acquired by the first device, comprising:
acquiring color information of the first image from the first device;
acquiring red, green and blue (RGB) information of the first image according to the information of the first image;
and determining the position of the first device relative to the second device in the horizontal direction according to the RGB information of the first image and the RGB information of the second image, wherein the color information of the second image comprises the RGB information of the second image.
9. The method of claim 7 or 8, wherein determining the position of the first device relative to the second device from the color information of the first image comprises:
acquiring color information of a third image from the first device, wherein the third image is a subset of a second image, the third image comprises a subset of the foreground image, the third image further comprises a subset of the background image, and the third image is acquired by the first device at a different vertical distance from the second device than when the first image is acquired by the device;
acquiring color information of the first image from the first device;
acquiring RGB information of the first image according to the color information of the first image;
acquiring RGB information of the third image according to the color information of the third image;
and acquiring the color difference between the first image and the third image according to the RGB information of the first image and the RGB information of the third image, and determining the distance between the first equipment and the second equipment in the vertical direction according to the color difference.
10. The method according to any one of claims 7 to 8, further comprising:
when the fourth image acquired by the first device only comprises the subset of the foreground image or the subset of the background image, receiving indication information sent by the first device, wherein the indication information is used for indicating the second device to update the second image, so that the first device acquires a new image according to the updated second image.
11. A terminal device, wherein the terminal device is in a connected state with a second device, comprising:
an obtaining unit, configured to obtain a first image, where the first image is a subset of a second image, the second image is a complete image displayed by the second device, the second image includes a foreground image and a background image, the first image includes the subset of the foreground image, and the first image also includes the subset of the background image;
a determining unit, configured to determine a position of the terminal device relative to the second device according to color information of the first image.
12. The terminal device of claim 11,
the acquisition unit is configured to: acquiring color information of the second image, and determining red, green and blue (RGB) information of the second image according to the color information of the second image;
the determination unit is configured to: determining red, green and blue (RGB) information of the first image according to the color information of the first image; and determining the position of the terminal equipment relative to the second equipment in the horizontal direction according to the RGB information of the first image and the RGB information of the second image.
13. The terminal device according to claim 11 or 12,
the acquisition unit is configured to: acquiring information of a third image, wherein the third image is a subset of a second image, the third image comprises a subset of the foreground image, the third image also comprises a subset of the background image, and the vertical distance between the terminal device and the second device is different when the terminal device acquires the third image and when the terminal device acquires the first image;
the determination unit is configured to: determining RGB information of the first image according to the color information of the first image;
determining RGB information of the third image according to the color information of the third image;
and acquiring the color difference between the first image and the third image according to the RGB information of the first image and the RGB information of the third image, and determining the distance between the terminal equipment and the second equipment in the vertical direction according to the color difference.
14. The terminal device according to any one of claims 11 to 12, wherein the acquiring unit is configured to acquire the first image by using a camera of the terminal device.
15. The terminal device according to any of claims 11 to 12, wherein the terminal device further comprises:
a sending unit, configured to send, to the second device, location information of the terminal device relative to the second device.
16. The terminal device according to any of claims 11 to 12,
the acquisition unit is configured to: acquiring a fourth image, wherein the fourth image only comprises a subset of the foreground image or a subset of the background image;
the sending unit is configured to send instruction information to the second device, where the instruction information is used to instruct the second device to update the second image, so that the terminal device determines a relative position with the second device according to the updated second image.
17. A terminal device, wherein a first device is in a connected state with the terminal device, comprising:
a display unit for displaying a second image, the second image comprising a foreground image and a background image;
a determining unit, configured to determine a position of a first device relative to the terminal device according to color information of a first image acquired by the first device, where the first image is a subset of a second image, the first image includes the subset of the foreground image, and the first image further includes the subset of the background image.
18. The terminal device according to claim 17, wherein the determining unit is configured to:
acquiring color information of the first image from the first device;
acquiring red, green and blue (RGB) information of the first image according to the information of the first image;
and determining the position of the first equipment relative to the terminal equipment in the horizontal direction according to the RGB information of the first image and the RGB information of the second image, wherein the color information of the second image comprises the RGB information of the second image.
19. The terminal device according to claim 17 or 18, wherein the determining unit is configured to:
acquiring color information of a third image from the first device, wherein the third image is a subset of a second image, the third image comprises a subset of the foreground image, the third image also comprises a subset of the background image, and the vertical distance between the first device and the terminal device is different when the first device acquires the third image and when the terminal device acquires the first image;
acquiring color information of the first image from the first device;
acquiring RGB information of the first image according to the color information of the first image;
acquiring RGB information of the third image according to the color information of the third image;
and acquiring the color difference between the first image and the third image according to the RGB information of the first image and the RGB information of the third image, and determining the distance between the first equipment and the terminal equipment in the vertical direction according to the color difference.
20. The terminal device according to any of claims 17 to 18, wherein the terminal device further comprises:
a receiving unit, configured to receive indication information sent by the first device when the fourth image acquired by the first device only includes a subset of the foreground image or a subset of the background image, where the indication information is used to instruct the terminal device to update the second image, so that the first device acquires a new image according to the updated second image.
CN201610798466.XA 2016-08-31 2016-08-31 Positioning method and terminal equipment thereof Active CN106383679B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610798466.XA CN106383679B (en) 2016-08-31 2016-08-31 Positioning method and terminal equipment thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610798466.XA CN106383679B (en) 2016-08-31 2016-08-31 Positioning method and terminal equipment thereof

Publications (2)

Publication Number Publication Date
CN106383679A CN106383679A (en) 2017-02-08
CN106383679B true CN106383679B (en) 2020-03-24

Family

ID=57938943

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610798466.XA Active CN106383679B (en) 2016-08-31 2016-08-31 Positioning method and terminal equipment thereof

Country Status (1)

Country Link
CN (1) CN106383679B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109711398B (en) * 2018-12-29 2021-02-19 联想(北京)有限公司 Sensor spatial relationship acquisition method and device and electronic equipment
CN112947872B (en) * 2019-12-10 2022-10-04 上海品奇科技有限公司 Method for placing detection equipment on display screen based on multilayer convolutional neural network

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102957877A (en) * 2011-08-26 2013-03-06 卡西欧计算机株式会社 Image processing device and image processing method
CN103292779A (en) * 2012-02-28 2013-09-11 联想(北京)有限公司 Method for measuring distance and image acquisition equipment
CN103365572A (en) * 2012-03-26 2013-10-23 联想(北京)有限公司 Electronic equipment remote control method and electronic equipment
CN103377673A (en) * 2012-04-20 2013-10-30 联想(北京)有限公司 Method for controlling electronic equipment and electronic equipment
CN103852066A (en) * 2012-11-28 2014-06-11 联想(北京)有限公司 Equipment positioning method, control method, electronic equipment and system
WO2015188898A1 (en) * 2014-06-12 2015-12-17 Sony Corporation Input handover from a first device to a second device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102957877A (en) * 2011-08-26 2013-03-06 卡西欧计算机株式会社 Image processing device and image processing method
CN103292779A (en) * 2012-02-28 2013-09-11 联想(北京)有限公司 Method for measuring distance and image acquisition equipment
CN103365572A (en) * 2012-03-26 2013-10-23 联想(北京)有限公司 Electronic equipment remote control method and electronic equipment
CN103377673A (en) * 2012-04-20 2013-10-30 联想(北京)有限公司 Method for controlling electronic equipment and electronic equipment
CN103852066A (en) * 2012-11-28 2014-06-11 联想(北京)有限公司 Equipment positioning method, control method, electronic equipment and system
WO2015188898A1 (en) * 2014-06-12 2015-12-17 Sony Corporation Input handover from a first device to a second device

Also Published As

Publication number Publication date
CN106383679A (en) 2017-02-08

Similar Documents

Publication Publication Date Title
KR101859312B1 (en) Image processing method and apparatus, and computer device
EP3410390A1 (en) Image processing method and device, computer readable storage medium and electronic device
CN109165606B (en) Vehicle information acquisition method and device and storage medium
KR20110112405A (en) Method and apparatus for creating virtual graffiti in a mobile virtual and augmented reality system
CN108198146B (en) Noise reduction method, equipment and computer readable storage medium
CN103826201A (en) Geographical position-based virtual interaction method and system thereof
US10168984B2 (en) Image receiving apparatus and method thereof for determining an orientation of a screen of an electronic apparatus
US10922042B2 (en) System for sharing virtual content and method for displaying virtual content
KR20150098362A (en) Head mounted display and method for controlling the same
CN108198150B (en) Method for eliminating image dead pixel, terminal and storage medium
CN103425488B (en) Locating a device
CN112017133B (en) Image display method and device and electronic equipment
CN113115000B (en) Map generation method and device, electronic equipment and storage medium
CN110191369A (en) Image interception method, apparatus, equipment and storage medium
CN109819163A (en) A kind of image processing control, terminal and computer readable storage medium
CN106383679B (en) Positioning method and terminal equipment thereof
CN110069311A (en) Application window display methods, device, mobile terminal and readable storage medium storing program for executing
CN110536236B (en) Communication method, terminal equipment and network equipment
CN110807769A (en) Image display control method and device
US9904984B1 (en) Wireless communication device configured to capture orientation information and orientation information gathering method
CN110708742B (en) Method, device, electronic equipment and medium for selecting frequency points
CN111540060B (en) Display calibration method and device of augmented reality equipment and electronic equipment
CN110766028B (en) Pixel type determination method and device
KR102409616B1 (en) Color filter substrates, displays, and terminals
CN107193552B (en) Theme color setting method and device and computer readable storage medium

Legal Events

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