CN114650407B - Naked eye 3D display method and device - Google Patents
Naked eye 3D display method and device Download PDFInfo
- Publication number
- CN114650407B CN114650407B CN202210257725.3A CN202210257725A CN114650407B CN 114650407 B CN114650407 B CN 114650407B CN 202210257725 A CN202210257725 A CN 202210257725A CN 114650407 B CN114650407 B CN 114650407B
- Authority
- CN
- China
- Prior art keywords
- preset
- coordinate system
- control
- axis
- offset angle
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 29
- 238000004364 calculation method Methods 0.000 claims description 6
- 238000005516 engineering process Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000004888 barrier function Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N13/00—Stereoscopic video systems; Multi-view video systems; Details thereof
- H04N13/30—Image reproducers
- H04N13/302—Image reproducers for viewing without the aid of special glasses, i.e. using autostereoscopic displays
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B21/00—Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant
- G01B21/02—Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant for measuring length, width, or thickness
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B21/00—Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant
- G01B21/22—Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant for measuring angles or tapers; for testing the alignment of axes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N13/00—Stereoscopic video systems; Multi-view video systems; Details thereof
- H04N13/30—Image reproducers
- H04N13/398—Synchronisation thereof; Control thereof
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- User Interface Of Digital Computer (AREA)
- Processing Or Creating Images (AREA)
Abstract
The application provides a naked eye 3D display method and device, when a target object is detected to deviate from a preset direction, calculating the deviation angle of the target object according to preset time and acquired angular velocity information of the target object in the preset time; acquiring control information of a control in a target object; determining the moving distance of the control based on the offset angle of the target object; according to the control information and the moving distance of the control, determining a target center point coordinate of the foreground image on a first preset coordinate system and a target center point coordinate of the background image on the first preset coordinate system; and keeping the current center point coordinate of the middle view picture unchanged, and moving the current center point coordinate of the foreground picture to the target center point coordinate of the foreground picture and the current center point coordinate of the background picture to the target center point coordinate of the background picture within preset time so that the content displayed on the target object swings along the offset direction. According to the invention, naked eye 3D display is realized under the condition that 3D display hardware is not required to be integrated.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a naked eye 3D display method and device.
Background
With the continuous development of computer technology, the application of naked eye 3D display technology is also becoming wider and wider. The naked eye 3D (Autostereoscopy) is a generic term for a technique for realizing stereoscopic effect without using external tools such as polarized glasses. Representative of this type of technology are mainly light barrier technology, lenticular technology.
In the prior art, naked eye 3D display is mainly realized by hardware, such as advertisement large screens of certain malls, but the mode needs to require that the display screen of an object has the function of hardware. For the mobile phone, the mobile phone screen does not have the function of related hardware, and if the related hardware is integrated, the production cost of the mobile phone can be greatly increased.
Disclosure of Invention
In view of this, the invention provides a naked eye 3D display method and device, which aims to realize naked eye 3D display without integrating 3D display hardware.
The first aspect of the invention discloses a naked eye 3D display method, which comprises the following steps:
when the deviation of the target object from the preset direction is detected, acquiring angular velocity information of the target object within preset time;
calculating the offset angle of the target object according to the preset time and the angular velocity information;
acquiring control information of a control in the target object, wherein the control at least comprises a foreground image, a middle image and a background image of the content currently displayed by the target object;
determining the moving distance of the control based on the offset angle of the target object;
according to the control information and the moving distance of the control, determining a target center point coordinate of the foreground image on a first preset coordinate system and a target center point coordinate of the background image on the first preset coordinate system; the first preset coordinate system is established by taking the upper left corner of the control as an origin;
and under the condition that the current center point coordinate of the middle view is kept unchanged, moving the current center point coordinate of the foreground view to the target center point coordinate of the foreground view and the current center point coordinate of the background view to the target center point coordinate of the background view in the preset time, so that the content displayed on the target object swings along the offset direction.
Optionally, the angular velocity information includes an X-axis angular velocity and a Y-axis angular velocity of the target object in a second preset coordinate system, and calculating, according to the preset time and the angular velocity information, an offset angle of the target object includes:
calculating an offset angle of the target object on an X axis on the second preset coordinate system according to the preset time and the X axis angular speed;
and calculating the offset angle of the target object on the Y axis on the second preset coordinate system according to the preset time and the Y axis angular speed.
Optionally, the determining the moving distance of the control based on the control information and the offset angle of the target object includes:
determining the X-axis moving distance of the control on the first preset coordinate system based on a preset horizontal maximum offset distance, an offset angle of the target object on the X-axis on the second preset coordinate system and a preset horizontal maximum offset angle;
and determining the Y-axis moving distance of the control on the first preset coordinate system based on the preset vertical maximum offset distance, the offset angle of the target object on the Y-axis on the second preset coordinate system and the preset vertical maximum offset angle.
Optionally, the determining the X-axis moving distance of the control on the first preset coordinate system based on the preset horizontal maximum offset distance, the offset angle of the target object on the X-axis on the second preset coordinate system, and the preset horizontal maximum offset angle includes:
judging whether the offset angle of the target object on the X axis on the second preset coordinate system is larger than the maximum offset angle in the preset horizontal direction;
if not, calculating the X-axis moving distance of the control on the first preset coordinate system according to the preset horizontal maximum offset distance, the X-axis offset angle and the preset horizontal maximum offset angle;
if so, calculating the X-axis moving distance of the control on the first preset coordinate system according to the preset horizontal direction maximum offset distance and the preset horizontal direction maximum offset angle.
Optionally, the determining the Y-axis moving distance of the control on the first preset coordinate system based on the preset vertical maximum offset distance, the offset angle of the target object on the Y-axis on the second preset coordinate system, and the preset vertical maximum offset angle includes:
judging whether the offset angle of the target object on the Y axis on the second preset coordinate system is larger than the maximum offset angle in the preset vertical direction or not;
if not, calculating the Y-axis moving distance of the control on the first preset coordinate system according to the preset vertical maximum offset distance, the Y-axis offset angle and the preset vertical maximum offset angle;
if so, calculating the Y-axis moving distance of the control on the first preset coordinate system according to the preset vertical maximum offset distance and the preset vertical maximum offset angle.
Optionally, the control information includes a target coordinate of the control, a width of the control, and a height of the control, and determining, according to the control information and a moving distance of the control, a target center point coordinate of the foreground map on a first preset coordinate system and a target center point coordinate of the background map on the first preset coordinate system includes:
calculating the center point coordinate of the foreground image on a first preset coordinate system and the center point coordinate of the background image on the first preset coordinate system according to the target coordinate, the height of the control, the width of the control, the preset horizontal maximum offset distance and the preset vertical maximum offset distance;
calculating a target center point coordinate of the foreground image on the first preset coordinate according to the center point coordinate of the foreground image on the first preset coordinate system and the moving distance of the control;
and calculating the target center point coordinate of the background image on the first preset coordinate system according to the center point coordinate of the background image on the first preset coordinate system and the moving distance of the control.
The second aspect of the invention discloses a naked eye 3D display device, which comprises:
the angular velocity information acquisition unit is used for acquiring the angular velocity information of the target object within preset time when the target object is detected to deviate from a preset direction;
an offset angle calculating unit, configured to calculate an offset angle of the target object according to the preset time and the angular velocity information;
the control information acquisition unit is used for acquiring control information of a control in the target object, wherein the control at least comprises a foreground image, a middle image and a background image of the content currently displayed by the target object;
the moving distance determining unit is used for determining the moving distance of the control based on the offset angle of the target object;
the target center point coordinate determining unit is used for determining target center point coordinates of the foreground image on a first preset coordinate system and target center point coordinates of the background image on the first preset coordinate system according to the control information and the moving distance of the control; the first preset coordinate system is established by taking the upper left corner of the control as an origin;
and the swinging unit is used for moving the current center point coordinate of the foreground image to the target center point coordinate of the foreground image and moving the current center point coordinate of the background image to the target center point coordinate of the background image in the preset time under the condition of keeping the current center point coordinate of the middle image unchanged, so that the content displayed on the target object swings along the offset direction.
Optionally, the angular velocity information includes an X-axis angular velocity and a Y-axis angular velocity of the target object on a second preset coordinate system, and the offset angle calculating unit includes:
the first offset angle calculation subunit is used for calculating the offset angle of the target object on the X axis of the second preset coordinate system according to the preset time and the X axis angular speed;
and the second offset angle calculation subunit is used for calculating the offset angle of the target object on the Y axis of the second preset coordinate system according to the preset time and the Y axis angular speed.
Optionally, the moving distance determining unit includes:
the first moving distance determining subunit is used for determining the moving distance of the X-axis of the control on the first preset coordinate system based on the maximum offset distance in the preset horizontal direction, the offset angle of the target object on the X-axis on the second preset coordinate system and the maximum offset angle in the preset horizontal direction;
the second moving distance determining subunit is used for determining the moving distance of the control on the Y-axis of the first preset coordinate system based on the preset maximum moving distance of the vertical direction, the moving angle of the target object on the Y-axis of the second preset coordinate system and the preset maximum moving angle of the vertical direction.
Optionally, the first moving distance determining subunit includes:
the first judging unit is used for judging whether the offset angle of the target object on the X axis on the second preset coordinate system is larger than the maximum offset angle in the preset horizontal direction;
the first moving distance calculating subunit is used for calculating the X-axis moving distance of the control on the first preset coordinate system according to the preset horizontal maximum offset distance, the X-axis offset angle and the preset horizontal maximum offset angle if not;
and the second moving distance calculating subunit is used for calculating the X-axis moving distance of the control on the first preset coordinate system according to the preset horizontal direction maximum offset distance and the preset horizontal direction maximum offset angle if yes.
The invention provides a naked eye 3D display method and device, which are used for detecting a target object in real time, acquiring angular velocity information of the target object in preset time when the target object is detected to deviate from a preset direction, and calculating the deviation angle of the target object according to the acquired angular velocity information and the preset time; acquiring control information of a control in a target object, and determining the moving distance of the control based on the control information and the offset angle of the target object; and finally, according to the control information and the moving distance of the control, determining the target center point coordinate of the foreground image of the content currently displayed by the target object in the control on a first preset coordinate system and the target center point coordinate of the background image on the first preset coordinate system, so that the current center point coordinate of the foreground image can be moved to the target center point coordinate of the foreground image in the preset time under the condition that the current center point coordinate of the background image in the control is kept unchanged, and the current center point coordinate of the background image can be moved to the target center point coordinate of the background image, so that the content displayed on the target object swings along the offset direction, and the content can be displayed in a 3D mode on the target object.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a naked eye 3D display method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a second preset coordinate system according to an embodiment of the present invention;
fig. 3 is a diagram illustrating a structure of a control according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a naked eye 3D display device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used for distinguishing between different devices, modules, or units and not for limiting the order or interdependence of the functions performed by these devices, modules, or units.
It should be noted that references to "one" or "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be interpreted as "one or more" unless the context clearly indicates otherwise.
Referring to fig. 1, a flow diagram of a naked eye 3D display method provided by an embodiment of the present invention is shown, where the naked eye 3D display method specifically includes the following steps:
s101: and when the target object is detected to deviate from the preset direction, acquiring angular velocity information of the target object within preset time.
In the embodiment of the present application, the target object may be a mobile phone. Taking the object as an example of the mobile phone, the mobile phone can be analogically taken as a plane, a coordinate system is established by taking the center point of the mobile phone as the origin (for convenience of distinguishing, the coordinate system established by taking the center point of the mobile phone as the origin is a second preset coordinate system), as shown in fig. 2, when the top of the mobile phone faces upwards, the mobile phone is upwards in the Y-axis negative direction, downwards in the Y-axis positive direction, rightwards in the X-axis positive direction and leftwards in the X-axis negative direction along the mobile phone screen.
It should be noted that, the direction of the top of the mobile phone facing upwards may be set as the predetermined direction, and the predetermined direction may be set according to the practical application, which is not limited in this embodiment of the present application.
In the specific execution process of step S101, the target object is detected in real time by the gyroscope, and when the target object is detected to deviate from the predetermined direction, angular velocity information of the target object based on the second preset coordinate system in the preset time is obtained. The preset time may be set to 30m, and may be set according to practical applications, which is not limited in the embodiments of the present application.
In this embodiment of the present application, the angular velocity information of the target object based on the second preset coordinate system at least includes an X-axis angular velocity and a Y-axis angular velocity of the target object located on the second preset coordinate system.
It should be noted that, the X-axis angular velocity of the target object located on the second preset coordinate system may be an average X-axis angular velocity of the target object located on the second preset coordinate in the preset time; the Y-axis angular velocity of the target object on the second preset coordinate system may be an average Y-axis angular velocity of the target object on the second preset coordinate in the preset time.
S102: and calculating the offset angle of the target object according to the preset time and the angular velocity information.
In the specific execution of step S102, after obtaining the angular velocity information of the target object within the preset time, the preset time may be multiplied by the angular velocity of the X axis to obtain the offset angle of the target object on the X axis on the second preset coordinate system; and multiplying the preset time by the Y-axis angular speed to obtain the offset angle of the target object on the Y axis on a second preset coordinate system.
S103: and acquiring control information of a control in the target object, wherein the control at least comprises a foreground image, a middle scene image and a background image of the content currently displayed by the target object.
In this embodiment of the present application, a general APP control (for convenience of viewing, the APP control is simply referred to as a control hereinafter) may be encapsulated in a target object, where the control includes three pictures, which are a foreground picture, a middle picture and a background picture.
In the embodiment of the application, if the width and height of the control are assumed to be { W1, H1}, where W1 is width and H1 is height; the width and height of the background image are consistent with the width and height of the control, the width and height of the background image is required to be larger than the width and height of the control, the size of the background image depends on the defined maximum offset, the preset horizontal maximum offset is Dmaxh, the preset vertical maximum offset is Dmaxv, the width and height of the background image can be { W1+Dmaxh, H1+Dmaxv }, and the width and height of the foreground image are consistent with the width and height of the control, as shown in fig. 3.
In this embodiment of the present application, a coordinate system may be established with the upper left corner of the control as the origin (for convenience of distinction, the coordinate system established with the upper left corner of the control as the origin is referred to as a first preset coordinate system), and then the center point coordinate of the control is set to (x, y) (for convenience of distinction, the center point coordinate of the control is referred to as a target coordinate).
In the specific execution process of step S103, after calculating the offset angle of the target object, control information of the control in the target object may be further obtained. The control information comprises target coordinates of the control, width of the control and height of the control.
S104: the moving distance of the control is determined based on the offset angle of the target object.
In this embodiment of the present application, after calculating the offset angle of the target object on the X axis of the second preset coordinate system, the X axis moving distance of the control on the first preset coordinate system may be further determined based on the preset horizontal direction maximum offset distance, the offset angle of the target object on the X axis of the second preset coordinate system, and the preset horizontal direction maximum offset angle.
Optionally, judging whether the offset angle of the target object on the X axis on the second preset coordinate system is larger than the maximum offset angle in the preset horizontal direction; if the offset angle of the target object on the X axis of the second preset coordinate system is not greater than the preset horizontal direction maximum offset angle, calculating the X axis moving distance of the control on the first preset coordinate system according to the preset horizontal direction maximum offset distance, the X axis offset angle and the preset horizontal direction maximum offset angle, wherein the X axis moving distance is shown in a formula (1).
D h =D maxh *θ h /θ maxh (1)
Wherein D is h For X-axis movement distance, theta of control on first preset coordinate system h For an X-axis offset angle, θ maxh For presetting the maximum offset angle in the horizontal direction, D maxh The maximum offset distance in the horizontal direction is preset.
If the offset angle of the target object on the X axis on the second preset coordinate system is larger than the maximum offset angle of the preset horizontal direction, determining the offset angle of the target object on the X axis on the first preset coordinate system as the maximum offset angle of the preset horizontal direction, namely, the offset angle of the target object on the X axis on the first preset coordinate system is equal to the maximum offset angle of the preset horizontal direction, and further calculating the X axis moving distance of the control on the first preset coordinate system according to the maximum offset distance of the preset horizontal direction and the maximum offset angle of the preset horizontal direction, as shown in a formula (2).
D h =D maxh *θ maxh /θ maxh= D maxh (2)
Optionally, judging whether the offset angle of the target object on the Y axis on the second preset coordinate system is larger than the maximum offset angle in the preset vertical and horizontal direction; if the offset angle of the target object on the Y axis on the second preset coordinate system is not greater than the preset vertical plane direction maximum offset angle, calculating the Y axis movement distance of the control on the first preset coordinate system according to the preset vertical direction maximum offset distance, the Y axis offset angle and the preset vertical direction maximum offset angle, as shown in a formula (3).
D v =D maxv *θ v /θ maxv (3)
Wherein D is V For Y-axis movement distance, theta of control on first preset coordinate system V For Y-axis offset angle, θ maxv For presetting the maximum offset angle in the vertical direction, D maxv Is the preset maximum offset in the vertical direction.
If the offset angle of the target object on the Y axis on the second preset coordinate system is larger than the preset vertical plane direction maximum offset angle, determining the preset vertical direction maximum offset angle according to the offset angle of the target object on the Y axis on the second preset coordinate system, namely, the offset angle on the Y axis on the second preset coordinate system is equal to the preset vertical direction maximum offset angle, and further calculating the Y axis moving distance of the control on the first preset coordinate system according to the preset vertical direction maximum offset distance and the preset vertical direction maximum offset angle, wherein the Y axis moving distance is shown in a formula (4).
D v =D maxv *θ maxv /θ maxv= D maxv (4)
S105: and determining the coordinates of the target center point of the foreground image on the first preset coordinate system and the coordinates of the target center point of the background image on the first preset coordinate system according to the control information and the moving distance of the control.
In the specific execution process of step S105, since the width and height of the foreground map are consistent with those of the control, the center point coordinate of the foreground map on the first preset coordinate system can be calculated according to the target coordinate, the height of the control and the width of the control, as shown in formula (5).
X Front part =x+W1*0.5,Y Front part =y+H1*0.5 (5)
Wherein, (X Front part ,Y Front part ) The method comprises the steps of taking a coordinate of a central point of a foreground image on a first preset coordinate system, taking (x, y) as a target coordinate, taking W1 as a width of a control, and taking H1 as a height of the control.
Since the width and height of the background map may be { w1+dmaxh, h1+dmaxv }, the center point coordinate of the background map on the first preset coordinate system may be calculated according to the target coordinate, the height of the control, the width of the control, the preset horizontal direction maximum offset distance and the preset vertical direction maximum offset distance, as shown in formula (6).
X Back of body =x+(W1+D maxh )*0.5,Y Back of body =y+(H1+D maxv )*0.5 (6)
Wherein, (X Back of body ,Y Back of body ) The center point coordinate (x, y) of the background image on a first preset coordinate system is the target coordinate, W1 is the width of the control, H1 is the height of the control, and D maxh For presetting the maximum offset in the horizontal direction as D maxv Is the preset maximum offset in the vertical direction.
In the embodiment of the application, after calculating the center point coordinate of the foreground image on the first preset coordinate system and the center point coordinate of the background image on the first preset coordinate system, calculating the target center point coordinate of the foreground image on the first preset coordinate according to the center point coordinate of the foreground image on the first preset coordinate system and the moving distance of the control, as shown in the formula (7); and calculating the target center point coordinate of the background image on the first preset coordinate system according to the center point coordinate of the background image on the first preset coordinate system and the moving distance of the control, wherein the target center point coordinate is shown in a formula (8).
X 1 Front part =X Front part -D h ,Y 1 Front part =Y Front part -D v (7)
Wherein, (X 1 Front part ,Y 1 Front part ) And the coordinates of the target center point of the foreground image on a first preset coordinate system are obtained.
X 1 Back of body =X Back of body -D h ,Y 1 Back of body =Y Back of body -D v (8)
Wherein, (X 1 Back of body ,Y 1 Back of body ) The coordinates of the target center point of the background image on a first preset coordinate system are obtained.
S106: under the condition that the current center point coordinate of the middle view is kept unchanged, the current center point coordinate of the foreground view is moved to the target center point coordinate of the foreground view in a preset time, and the current center point coordinate of the background view is moved to the target center point coordinate of the background view, so that the content displayed on the target object swings along the offset direction.
In the specific execution of step S106, after determining the target center point coordinates of the foreground image and the background image on the first preset coordinate system, the current center point coordinates of the foreground image may be moved to the target center point coordinates of the foreground image and the current center point coordinates of the background image within a preset time while the current center point coordinates of the middle image are kept unchanged, so that the content displayed on the object swings along the offset direction, thereby realizing the display of the content in a 3D form on the object.
The invention provides a naked eye 3D display method, which is used for detecting a target object in real time, acquiring angular velocity information of the target object in preset time when the target object is detected to deviate from a preset direction, and calculating the deviation angle of the target object according to the acquired angular velocity information and the preset time; acquiring control information of a control in a target object, and determining the moving distance of the control based on the control information and the offset angle of the target object; and finally, according to the control information and the moving distance of the control, determining the target center point coordinate of the foreground image in the control on the first preset coordinate system and the target center point coordinate of the background image on the first preset coordinate system, so that the current center point coordinate of the foreground image can be moved to the target center point coordinate of the foreground image and the current center point coordinate of the background image can be moved to the target center point coordinate of the background image in the preset time under the condition that the current center point coordinate of the foreground image in the control is kept unchanged, and the content displayed on the target object swings along the offset direction, thereby realizing the 3D display of the content on the target object.
Corresponding to the naked eye 3D display method disclosed in the embodiment of the present invention, the embodiment of the present invention further provides a naked eye 3D display device, as shown in fig. 4, where the naked eye 3D display device includes:
an angular velocity information acquiring unit 41 configured to acquire angular velocity information of a target object within a preset time when it is detected that the target object is shifted in a predetermined direction;
an offset angle calculating unit 42 for calculating an offset angle of the target object according to the preset time and angular velocity information;
the control information obtaining unit 43 is configured to obtain control information of a control in the target object, where the control includes at least a foreground image, a middle image, and a background image of a content currently displayed by the target object;
a movement distance determining unit 44, configured to determine a movement distance of the control based on the offset angle of the target object;
the target center point coordinate determining unit 45 is configured to determine, according to the control information and the moving distance of the control, a target center point coordinate of the foreground image on the first preset coordinate system and a target center point coordinate of the background image on the first preset coordinate system; the first preset coordinate system is established by taking the upper left corner of the control as an origin;
and a swinging unit 46, configured to move the current center point coordinate of the foreground map to the target center point coordinate of the foreground map and the current center point coordinate of the background map to the target center point coordinate of the background map within a preset time while keeping the current center point coordinate of the middle map unchanged, so that the content displayed on the object swings along the offset direction.
The specific principle and execution process of each unit in the naked eye 3D display device disclosed in the embodiment of the present invention are the same as those of the naked eye 3D display method disclosed in fig. 1 of the embodiment of the present invention, and reference may be made to corresponding parts in the naked eye 3D display method disclosed in fig. 1 of the embodiment of the present invention, and no further description is given here.
The invention provides a naked eye 3D display device, which detects a target object in real time, acquires angular velocity information of the target object in preset time when the target object is detected to deviate from a preset direction, and calculates the deviation angle of the target object according to the acquired angular velocity information and the preset time; acquiring control information of a control in a target object, and determining the moving distance of the control based on the control information and the offset angle of the target object; and finally, according to the control information and the moving distance of the control, determining the target center point coordinate of the foreground image in the control on the first preset coordinate system and the target center point coordinate of the background image on the first preset coordinate system, so that the current center point coordinate of the foreground image can be moved to the target center point coordinate of the foreground image and the current center point coordinate of the background image can be moved to the target center point coordinate of the background image in the preset time under the condition that the current center point coordinate of the foreground image in the control is kept unchanged, and the content displayed on the target object swings along the offset direction, thereby realizing the 3D display of the content on the target object.
Optionally, the angular velocity information includes an X-axis angular velocity and a Y-axis angular velocity of the target object located on a second preset coordinate system, and the offset angle calculating unit includes:
the first offset angle calculation subunit is used for calculating the offset angle of the target object on the X axis on a second preset coordinate system according to the preset time and the X axis angular speed;
and the second offset angle calculation subunit is used for calculating the offset angle of the target object on the Y axis on a second preset coordinate system according to the preset time and the Y axis angular speed.
Optionally, the moving distance determining unit includes:
the first moving distance determining subunit is used for determining the moving distance of the X-axis of the control on the first preset coordinate system based on the maximum offset distance of the preset horizontal direction, the offset angle of the target object on the X-axis on the second preset coordinate system and the maximum offset angle of the preset horizontal direction;
the second moving distance determining subunit is used for determining the Y-axis moving distance of the control on the first preset coordinate system based on the preset vertical-direction maximum offset distance, the offset angle of the target object on the Y-axis on the second preset coordinate system and the preset vertical-direction maximum offset angle.
Optionally, the first moving distance determining subunit includes:
the first judging unit is used for judging whether the offset angle of the target object on the X axis on the second preset coordinate system is larger than the maximum offset angle in the preset horizontal direction;
the first moving distance calculating subunit is used for calculating the X-axis moving distance of the control on a first preset coordinate system according to the preset horizontal maximum offset distance, the X-axis offset angle and the preset horizontal maximum offset angle if not;
and the second moving distance calculating subunit is used for calculating the X-axis moving distance of the control on the first preset coordinate system according to the preset horizontal direction maximum offset distance and the preset horizontal direction maximum offset angle if yes.
Optionally, the second moving distance determining subunit includes:
the second judging unit is used for judging whether the offset angle of the target object on the Y axis on a second preset coordinate system is larger than the maximum offset angle in the preset vertical direction;
the third moving distance calculating subunit is used for calculating the Y-axis moving distance of the control on the first preset coordinate system according to the preset vertical maximum offset distance, the Y-axis offset angle and the preset vertical maximum offset angle if not;
and the fourth moving distance calculating subunit is used for calculating the Y-axis moving distance of the control on the first preset coordinate system according to the preset vertical maximum offset distance and the preset vertical maximum offset angle if yes.
Optionally, the target center point coordinate determining unit includes:
the center point coordinate determining unit is used for calculating the center point coordinate of the foreground image on a first preset coordinate system and the center point coordinate of the background image on the first preset coordinate system according to the target coordinate, the height of the control, the width of the control, the preset horizontal direction maximum offset distance and the preset vertical direction maximum offset distance;
the first target center point coordinate determining subunit is used for calculating the target center point coordinate of the foreground image on the first preset coordinate according to the center point coordinate of the foreground image on the first preset coordinate system and the moving distance of the control;
and the second target center point coordinate determining subunit is used for calculating the target center point coordinate of the background image on the first preset coordinate system according to the center point coordinate of the background image on the first preset coordinate system and the moving distance of the control.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a system or system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, with reference to the description of the method embodiment being made in part. The systems and system embodiments described above are merely illustrative, wherein elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of 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 solution. 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 previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.
Claims (10)
1. A naked eye 3D display method, the method comprising:
when the deviation of the target object from the preset direction is detected, acquiring angular velocity information of the target object within preset time;
calculating the offset angle of the target object according to the preset time and the angular velocity information;
acquiring control information of a control in the target object, wherein the control at least comprises a foreground image, a middle image and a background image of the content currently displayed by the target object;
determining the moving distance of the control based on the offset angle of the target object;
according to the control information and the moving distance of the control, determining a target center point coordinate of the foreground image on a first preset coordinate system and a target center point coordinate of the background image on the first preset coordinate system; the first preset coordinate system is established by taking the upper left corner of the control as an origin;
and under the condition that the current center point coordinate of the middle view is kept unchanged, moving the current center point coordinate of the foreground view to the target center point coordinate of the foreground view and the current center point coordinate of the background view to the target center point coordinate of the background view in the preset time, so that the content displayed on the target object swings along the offset direction.
2. The method of claim 1, wherein the angular velocity information includes an X-axis angular velocity and a Y-axis angular velocity of the object on a second predetermined coordinate system, and wherein calculating the offset angle of the object based on the predetermined time and the angular velocity information includes:
calculating an offset angle of the target object on an X axis on the second preset coordinate system according to the preset time and the X axis angular speed;
and calculating the offset angle of the target object on the Y axis on the second preset coordinate system according to the preset time and the Y axis angular speed.
3. The method of claim 2, wherein the determining the movement distance of the control based on the control information and the offset angle of the target object comprises:
determining the X-axis moving distance of the control on the first preset coordinate system based on a preset horizontal maximum offset distance, an offset angle of the target object on the X-axis on the second preset coordinate system and a preset horizontal maximum offset angle;
and determining the Y-axis moving distance of the control on the first preset coordinate system based on the preset vertical maximum offset distance, the offset angle of the target object on the Y-axis on the second preset coordinate system and the preset vertical maximum offset angle.
4. The method of claim 3, wherein the determining the X-axis movement distance of the control on the first preset coordinate system based on the preset horizontal maximum offset distance, the offset angle of the target object on the X-axis on the second preset coordinate system, and a preset horizontal maximum offset angle comprises:
judging whether the offset angle of the target object on the X axis on the second preset coordinate system is larger than the maximum offset angle in the preset horizontal direction;
if not, calculating the X-axis moving distance of the control on the first preset coordinate system according to the preset horizontal maximum offset distance, the X-axis offset angle and the preset horizontal maximum offset angle;
if so, calculating the X-axis moving distance of the control on the first preset coordinate system according to the preset horizontal direction maximum offset distance and the preset horizontal direction maximum offset angle.
5. The method of claim 3, wherein the determining the Y-axis movement distance of the control on the first preset coordinate system based on the preset vertical maximum offset distance, the offset angle of the target object on the Y-axis on the second preset coordinate system, and the preset vertical maximum offset angle comprises:
judging whether the offset angle of the target object on the Y axis on the second preset coordinate system is larger than the maximum offset angle in the preset vertical direction or not;
if not, calculating the Y-axis moving distance of the control on the first preset coordinate system according to the preset vertical maximum offset distance, the Y-axis offset angle and the preset vertical maximum offset angle;
if so, calculating the Y-axis moving distance of the control on the first preset coordinate system according to the preset vertical maximum offset distance and the preset vertical maximum offset angle.
6. The method of claim 1, wherein the control information includes target coordinates of the control, a width of the control, and a height of the control, and wherein determining target center point coordinates of the foreground map and the background map on a first preset coordinate system according to the control information and a moving distance of the control includes:
calculating the center point coordinate of the foreground image on a first preset coordinate system and the center point coordinate of the background image on the first preset coordinate system according to the target coordinate, the height of the control, the width of the control, the preset horizontal maximum offset distance and the preset vertical maximum offset distance;
calculating a target center point coordinate of the foreground image on the first preset coordinate according to the center point coordinate of the foreground image on the first preset coordinate system and the moving distance of the control;
and calculating the target center point coordinate of the background image on the first preset coordinate system according to the center point coordinate of the background image on the first preset coordinate system and the moving distance of the control.
7. A naked eye 3D display device, the device comprising:
the angular velocity information acquisition unit is used for acquiring the angular velocity information of the target object within preset time when the target object is detected to deviate from a preset direction;
an offset angle calculating unit, configured to calculate an offset angle of the target object according to the preset time and the angular velocity information;
the control information acquisition unit is used for acquiring control information of a control in the target object, wherein the control at least comprises a foreground image, a middle image and a background image of the content currently displayed by the target object;
the moving distance determining unit is used for determining the moving distance of the control based on the offset angle of the target object;
the target center point coordinate determining unit is used for determining target center point coordinates of the foreground image on a first preset coordinate system and target center point coordinates of the background image on the first preset coordinate system according to the control information and the moving distance of the control; the first preset coordinate system is established by taking the upper left corner of the control as an origin;
and the swinging unit is used for moving the current center point coordinate of the foreground image to the target center point coordinate of the foreground image and moving the current center point coordinate of the background image to the target center point coordinate of the background image in the preset time under the condition of keeping the current center point coordinate of the middle image unchanged, so that the content displayed on the target object swings along the offset direction.
8. The apparatus according to claim 7, wherein the angular velocity information includes an X-axis angular velocity and a Y-axis angular velocity of the object on a second preset coordinate system, the offset angle calculating unit including:
the first offset angle calculation subunit is used for calculating the offset angle of the target object on the X axis of the second preset coordinate system according to the preset time and the X axis angular speed;
and the second offset angle calculation subunit is used for calculating the offset angle of the target object on the Y axis of the second preset coordinate system according to the preset time and the Y axis angular speed.
9. The apparatus according to claim 8, wherein the moving distance determining unit includes:
the first moving distance determining subunit is used for determining the moving distance of the X-axis of the control on the first preset coordinate system based on the maximum offset distance in the preset horizontal direction, the offset angle of the target object on the X-axis on the second preset coordinate system and the maximum offset angle in the preset horizontal direction;
the second moving distance determining subunit is used for determining the moving distance of the control on the Y-axis of the first preset coordinate system based on the preset maximum moving distance of the vertical direction, the moving angle of the target object on the Y-axis of the second preset coordinate system and the preset maximum moving angle of the vertical direction.
10. The apparatus of claim 9, wherein the first travel distance determination subunit comprises:
the first judging unit is used for judging whether the offset angle of the target object on the X axis on the second preset coordinate system is larger than the maximum offset angle in the preset horizontal direction;
the first moving distance calculating subunit is used for calculating the X-axis moving distance of the control on the first preset coordinate system according to the preset horizontal maximum offset distance, the X-axis offset angle and the preset horizontal maximum offset angle if not;
and the second moving distance calculating subunit is used for calculating the X-axis moving distance of the control on the first preset coordinate system according to the preset horizontal direction maximum offset distance and the preset horizontal direction maximum offset angle if yes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210257725.3A CN114650407B (en) | 2022-03-16 | 2022-03-16 | Naked eye 3D display method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210257725.3A CN114650407B (en) | 2022-03-16 | 2022-03-16 | Naked eye 3D display method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114650407A CN114650407A (en) | 2022-06-21 |
CN114650407B true CN114650407B (en) | 2024-01-26 |
Family
ID=81994138
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210257725.3A Active CN114650407B (en) | 2022-03-16 | 2022-03-16 | Naked eye 3D display method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114650407B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109842793A (en) * | 2017-09-22 | 2019-06-04 | 深圳超多维科技有限公司 | A kind of naked eye 3D display method, apparatus and terminal |
CN111044046A (en) * | 2019-12-09 | 2020-04-21 | 深圳市优必选科技股份有限公司 | Method and device for testing positioning accuracy of robot |
CN111914739A (en) * | 2020-07-30 | 2020-11-10 | 深圳创维-Rgb电子有限公司 | Intelligent following method and device, terminal equipment and readable storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120056799A1 (en) * | 2001-02-24 | 2012-03-08 | Dennis Solomon | Performance Audience Display System |
-
2022
- 2022-03-16 CN CN202210257725.3A patent/CN114650407B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109842793A (en) * | 2017-09-22 | 2019-06-04 | 深圳超多维科技有限公司 | A kind of naked eye 3D display method, apparatus and terminal |
CN111044046A (en) * | 2019-12-09 | 2020-04-21 | 深圳市优必选科技股份有限公司 | Method and device for testing positioning accuracy of robot |
CN111914739A (en) * | 2020-07-30 | 2020-11-10 | 深圳创维-Rgb电子有限公司 | Intelligent following method and device, terminal equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114650407A (en) | 2022-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9706118B2 (en) | Omnistereo imaging | |
CN106803884B (en) | Image processing apparatus | |
US9723203B1 (en) | Method, system, and computer program product for providing a target user interface for capturing panoramic images | |
US20170223266A1 (en) | Method, system, and computer program product for gamifying the process of obtaining panoramic images | |
US9041743B2 (en) | System and method for presenting virtual and augmented reality scenes to a user | |
US20170302910A1 (en) | Method and apparatus for merging depth maps in a depth camera system | |
CN104349095B (en) | A kind of image adjusting method, device and electronic equipment | |
US10080956B2 (en) | Detecting the changing position of a face to move and rotate a game object in a virtual environment | |
CN105809701A (en) | Panorama video posture calibrating method | |
CN104820978B (en) | A kind of origin reference location method of CCD camera | |
JP2010072477A (en) | Image display apparatus, image display method, and program | |
CN103852066A (en) | Equipment positioning method, control method, electronic equipment and system | |
CN109308153A (en) | Picture adjusting method and device, computer readable storage medium, terminal | |
CN105718232A (en) | Display method and display device of arbitrary angle plane rotation | |
CN104134235A (en) | Real space and virtual space fusion method and real space and virtual space fusion system | |
US20150334301A1 (en) | System and method for generating a surround view | |
CN105049827B (en) | Bore hole 3D imaging method and system | |
KR101897549B1 (en) | Apparatus and method for displaying camera view area in a portable terminal | |
CN102170576A (en) | Processing method and device for double camera stereoscopic shooting | |
CN114286066B (en) | Projection correction method, apparatus, storage medium and projection device | |
CN114650407B (en) | Naked eye 3D display method and device | |
CN105340258A (en) | Location detection device | |
CN106973143A (en) | Information cuing method and mobile terminal | |
CN110548289B (en) | Method and device for displaying three-dimensional control | |
CN110310492B (en) | Speed measuring method and device for mobile vehicle |
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 |