CN106530234B - Image display method and device - Google Patents
Image display method and device Download PDFInfo
- Publication number
- CN106530234B CN106530234B CN201610899215.0A CN201610899215A CN106530234B CN 106530234 B CN106530234 B CN 106530234B CN 201610899215 A CN201610899215 A CN 201610899215A CN 106530234 B CN106530234 B CN 106530234B
- Authority
- CN
- China
- Prior art keywords
- rotation
- picture
- compression
- along
- compressed
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformation in the plane of the image
- G06T3/60—Rotation of a whole image or part thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/20—Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2219/00—Indexing scheme for manipulating 3D models or images for computer graphics
- G06T2219/20—Indexing scheme for editing of 3D models
- G06T2219/2016—Rotation, translation, scaling
Abstract
The invention discloses a kind of method and devices that picture is shown, belong to field of display technology.This method comprises:, according to the entrained direction of rotation of picture rotation instruction and rotation angle, being compressed along compression direction to picture, the compression direction is mutually perpendicular to the direction of rotation when detecting picture rotation instruction;Compressed picture will be carried out along the compression direction be divided into multiple picture regions;According to the direction of rotation and the rotation angle, the multiple picture region is compressed respectively along the direction of rotation;Display carries out compressed multiple picture regions along the direction of rotation.The embodiment of the present invention is by compressing picture along compression direction, and multiple picture regions are compressed respectively along direction of rotation, to make whole picture show the 3-D effect with far and near sense, and due to being not necessarily to load 3D engine, to reduce the hardware operating cost of terminal.
Description
Technical field
The present invention relates to field of display technology, in particular to a kind of image display method and device.
Background technique
With the rapid development of display technology, the display function of terminal is also more and more abundant, for example terminal is in display picture
When, it can not only show the picture of two-dimensional effects, can also show the picture of 3-D effect.
In order to show the picture of 3-D effect, the 3D engine such as OpenGL, DirectX can be usually installed at the terminal, eventually
End group shows that the realization process of the picture of 3-D effect can be in 3D engine are as follows: when terminal detects picture rotation operation, adjusts
With the image processing algorithm for including in 3D engine, is handled, obtained by picture of the image processing algorithm to two-dimensional effects
The picture of 3-D effect, then terminal shows the picture of the 3-D effect.
In the implementation of the present invention, the inventor finds that the existing technology has at least the following problems:
In 3D engine, for structure in picture and the more complicated figure of shape, corresponding image processing algorithm meeting
More complicated, the time for executing the image processing algorithm will be long, not only reduces the display effect of the picture of 3-D effect
Rate, and terminal executes the hardware operating cost of the image processing algorithm and can also increase accordingly.
Summary of the invention
In order to solve problems in the prior art, the embodiment of the invention provides a kind of image display method and devices.It is described
Technical solution is as follows:
On the one hand, a kind of image display method is provided, which comprises
When detecting picture rotation instruction, according to picture rotation instruction entrained direction of rotation and rotation angle
Degree, compresses picture along compression direction, the compression direction is mutually perpendicular to the direction of rotation;
Compressed picture will be carried out along the compression direction be divided into multiple picture regions;
According to the direction of rotation and the rotation angle, along the direction of rotation to the multiple picture region respectively into
Row compression;
Display carries out compressed multiple picture regions along the direction of rotation.
Optionally, the direction of rotation entrained according to picture rotation instruction and rotation angle, along compression direction
Picture is compressed, comprising:
According to the direction of rotation and the rotation angle, from the direction of rotation of storage, rotation angle and the first compression ratio
In corresponding relationship between example, corresponding first compression factor is obtained;
According to first compression factor, the picture is compressed along the compression direction.
It is optionally, described to be divided into multiple picture regions along the compressed picture of compression direction progress, comprising:
It determines and carries out length of the compressed picture on the compression direction along the compression direction;
According to determining length, from the corresponding relationship between the length range and division numbers of storage, obtain corresponding
Division numbers;
According to the division numbers of acquisition, compressed picture will be carried out along the compression direction and carry out etc. point dividing, will be obtained
The multiple picture region.
It is optionally, described to be divided into multiple picture regions along the compressed picture of compression direction progress, comprising:
It determines and carries out length of the compressed picture on the compression direction along the compression direction;
According to determining length, from the corresponding relationship between the length range and division numbers of storage, obtain corresponding
Division numbers;
According to the division numbers of the rotation angle and acquisition, from rotation angle, division numbers and the division proportion of storage
Between corresponding relationship in, obtain corresponding division proportion;
According to the division proportion, according to the direction of rotation, will be carried out along the compression direction compressed picture into
Row divides, and obtains the multiple picture region, the ratio in the multiple picture region between two neighboring picture region is
The division proportion.
Optionally, described to be carried out along the compression direction after compressed picture be divided into multiple picture regions, also
Include:
According to the sequence of the multiple picture region on the direction of rotation, for the multiple picture region addition mark
Know.
Optionally, described according to the direction of rotation and the rotation angle, along the direction of rotation to the multiple figure
Panel region is compressed respectively, comprising:
According to the mark of the multiple picture region, the direction of rotation and the rotation angle, from the picture region of storage
In corresponding relationship between domain identifier, direction of rotation, rotation angle and the second compression factor, obtains and carried out along the direction of rotation
Multiple second compression factors of compression, the multiple second compression factor and the multiple picture region correspond;
According to the multiple second compression factor, the multiple picture region is pressed respectively along the direction of rotation
Contracting.
On the other hand, a kind of image display apparatus is provided, described device includes:
First compression module, for when detecting picture rotation instruction, entrained according to picture rotation instruction
Direction of rotation and rotation angle, compress picture along compression direction, and the compression direction and the direction of rotation are mutually hung down
Directly;
Division module is divided into multiple picture regions for that will carry out compressed picture along the compression direction;
Second compression module is used for according to the direction of rotation and the rotation angle, along the direction of rotation to described
Multiple picture regions are compressed respectively;
Display module carries out compressed multiple picture regions along the direction of rotation for showing.
Optionally, first compression module includes:
First acquisition unit, for when detect picture rotation instruction when, according to the direction of rotation and the rotation angle
Degree obtains corresponding first compression from the corresponding relationship between the direction of rotation of storage, rotation angle and the first compression factor
Ratio;
First compression unit, for being pressed the picture along the compression direction according to first compression factor
Contracting.
Optionally, the division module includes:
First determination unit carries out compressed picture on the compression direction along the compression direction for determining
Length;
Second acquisition unit, for according to determining length, from corresponding between the length range and division numbers of storage
In relationship, corresponding division numbers are obtained;
First division unit will carry out compressed picture along the compression direction for the division numbers according to acquisition
It carries out etc. point dividing, obtains the multiple picture region.
Optionally, the division module includes:
Second determination unit carries out compressed picture on the compression direction along the compression direction for determining
Length;
Third acquiring unit, for according to determining length, from corresponding between the length range and division numbers of storage
In relationship, corresponding division numbers are obtained;
4th acquiring unit from the rotation angle of storage, is drawn for the division numbers according to the rotation angle and acquisition
In corresponding relationship between dosis refracta and division proportion, corresponding division proportion is obtained;
Second division unit, for according to the division proportion, according to the direction of rotation, will along the compression direction into
The compressed picture of row is divided, and the multiple picture region, two neighboring picture region in the multiple picture region are obtained
Ratio between domain is the division proportion.
Optionally, described device further include:
Mark module is the multiple figure for the sequence according to the multiple picture region on the direction of rotation
Panel region addition mark.
Optionally, second compression module includes:
5th acquiring unit, for according to the mark of the multiple picture region, the direction of rotation and the rotation angle
Degree is obtained from the corresponding relationship between the picture region mark of storage, direction of rotation, rotation angle and the second compression factor
Multiple second compression factors compressed along the direction of rotation, the multiple second compression factor and the multiple picture region
Domain corresponds;
Second compression unit is used for according to the multiple second compression factor, along the direction of rotation to the multiple figure
Panel region is compressed respectively.
Technical solution provided in an embodiment of the present invention has the benefit that in embodiments of the present invention, when detecting
When picture rotation instructs, first according to the entrained direction of rotation of picture rotation instruction and rotation angle, along compression direction to figure
Piece is compressed, and length when really being rotated due to picture on compression direction can change, along compression direction compressed picture
Picture can be made to produce the visual effect of rotation on compression direction.Then compressed picture will be carried out along compression direction to draw
Be divided into multiple picture regions, and multiple picture regions compressed respectively along direction of rotation, when really being rotated due to picture
Length on direction of rotation can change, and from the farther away picture region of human eye in a rotational direction length can change it is more, and
From the closer picture region of human eye in a rotational direction length can change it is less, therefore along direction of rotation respectively to multiple pictures
Region is compressed, and picture can be made to produce the visual effect of rotation in a rotational direction.The embodiment of the present invention passes through along pressure
Picture is compressed in contracting direction, and compresses along direction of rotation to multiple picture regions, so that whole picture be made to show
The 3-D effect of far and near sense is provided, and due to being not necessarily to load 3D engine, to reduce the hardware operating cost of terminal.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is the flow chart of image display method provided in an embodiment of the present invention;
Fig. 2A is the flow chart of image display method provided in an embodiment of the present invention;
Fig. 2 B is the schematic diagram that a kind of picture provided in an embodiment of the present invention is rotated along X-axis;
Fig. 2 C is the schematic diagram that a kind of picture provided in an embodiment of the present invention is rotated along Y-axis;
Fig. 3 A is the block diagram of image display apparatus provided in an embodiment of the present invention;
Fig. 3 B is the block diagram of the first compression module provided in an embodiment of the present invention;
Fig. 3 C is a kind of block diagram of division module provided in an embodiment of the present invention;
Fig. 3 D is the block diagram of another division module provided in an embodiment of the present invention;
Fig. 3 E is the block diagram of image display apparatus provided in an embodiment of the present invention;
Fig. 3 F is the block diagram of the second compression module provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
The embodiment of the invention provides a kind of image display methods, referring to Fig. 1, this method comprises:
Step 101: when detecting picture rotation instruction, according to picture rotation instruction entrained direction of rotation and rotation
Angle compresses picture along compression direction, and compression direction is mutually perpendicular to direction of rotation.
Step 102: compressed picture will be carried out along compression direction and be divided into multiple picture regions.
Step 103: according to direction of rotation and rotation angle, multiple picture regions being compressed respectively along direction of rotation.
Step 104: display carries out compressed multiple picture regions along direction of rotation.
In embodiments of the present invention, when detecting picture rotation instruction, first according to entrained by picture rotation instruction
Direction of rotation and rotation angle, are compressed picture along compression direction, when really being rotated due to picture on compression direction
Length can change, therefore picture can be made to produce the visual effect of rotation on compression direction along compression direction compressed picture.
Then compressed picture will be carried out along compression direction and is divided into multiple picture regions, and along direction of rotation respectively to multiple pictures
Region is compressed, and length can change in a rotational direction when really being rotated due to picture, and from the farther away picture region of human eye
Length can change more in a rotational direction in domain, and length can change in a rotational direction from the closer picture region of human eye
It is less, therefore multiple picture regions are compressed respectively along direction of rotation, picture can be made to produce rotation in a rotational direction
The visual effect turned.The embodiment of the present invention is by compressing picture along compression direction, and along direction of rotation to multiple figures
Panel region is compressed, thus so that whole picture is shown the 3-D effect with far and near sense, and due to being not necessarily to load 3D engine,
To reduce the hardware operating cost of terminal.
Optionally, according to the entrained direction of rotation of picture rotation instruction and rotation angle, along compression direction to picture into
Row compression, comprising:
According to direction of rotation and rotation angle, between the direction of rotation of storage, rotation angle and the first compression factor
In corresponding relationship, corresponding first compression factor is obtained;
According to the first compression factor, picture is compressed along compression direction.
Optionally, compressed picture will be carried out along compression direction be divided into multiple picture regions, comprising:
It determines and carries out length of the compressed picture on compression direction along compression direction;
According to determining length, from the corresponding relationship between the length range and division numbers of storage, obtain corresponding
Division numbers;
According to the division numbers of acquisition, compressed picture will be carried out along compression direction and carries out etc. point dividing, will be obtained multiple
Picture region.
Optionally, compressed picture will be carried out along compression direction be divided into multiple picture regions, comprising:
It determines and carries out length of the compressed picture on compression direction along compression direction;
According to determining length, from the corresponding relationship between the length range and division numbers of storage, obtain corresponding
Division numbers;
According to the division numbers of rotation angle and acquisition, between the rotation angle, division numbers and division proportion of storage
Corresponding relationship in, obtain corresponding division proportion;
According to division proportion compressed picture will be carried out along compression direction and divided, obtained more according to direction of rotation
A picture region, the ratio in multiple picture regions between two neighboring picture region is division proportion.
Optionally, compressed picture will be carried out along compression direction to be divided into after multiple picture regions, further includes:
According to multiple picture regions in a rotational direction sequence, for multiple picture regions addition mark.
Optionally, according to direction of rotation and rotation angle, multiple picture regions are compressed along direction of rotation respectively, is wrapped
It includes:
According to the mark of multiple picture regions, direction of rotation and rotation angle, from the picture region of storage mark, rotation side
To, rotation angle and the second compression factor between corresponding relationship in, obtain along direction of rotation compressed it is multiple second pressure
Contracting ratio, multiple second compression factors and multiple picture regions correspond;
According to multiple second compression factors, multiple picture regions are compressed respectively along direction of rotation.
All the above alternatives, can form the alternative embodiment of the disclosure according to any combination, and the present invention is real
It applies example and this is no longer repeated one by one.
The embodiment of the invention provides a kind of image display method, A referring to fig. 2, this method comprises:
Step 201: when detecting picture rotation instruction, according to picture rotation instruction entrained direction of rotation and rotation
Angle obtains corresponding first pressure from the corresponding relationship between the direction of rotation of storage, rotation angle and the first compression factor
Contracting ratio.
When terminal detects picture rotation instruction, it is necessary first to be compressed along compression direction to picture, it is therefore desirable to
First determine the first compression factor compressed along compression direction to picture, and then can be according to first compression factor to picture
It is compressed.Wherein, terminal determines that the mode of the first compression factor can be with are as follows: according to the entrained rotation side of picture rotation instruction
It obtains and corresponds to from the corresponding relationship between the direction of rotation of storage, rotation angle and the first compression factor to rotation angle
The first compression factor, and the first compression factor that will acquire be determined as along compression direction to picture compressed first compression
Ratio.
It should be noted that picture rotation instruction, which is used to indicate terminal, executes the operation for obtaining the first compression factor, the figure
The entrained direction of rotation of piece rotation instruction and rotation angle can be direction of rotation and rotation angle input terminal by user
The direction of rotation input frame of display is obtained with rotation angle input frame, can also be the direction of rotation shown by user from terminal
In list and rotation angle list, selects a direction of rotation and a rotation angle and obtain.
In addition, direction of rotation entrained by picture rotation instruction includes rotating along X-axis and rotating along Y-axis, picture rotation refers to
Enabling entrained rotation angle is the unspecified angle between 0 degree to 360 degree, such as the direction of rotation that picture rotation instruction is entrained
It can be to rotate 45 degree along X-axis, rotate 60 degree etc. along Y-axis with rotation angle.
Furthermore compression direction is mutually perpendicular to direction of rotation, such as when direction of rotation is along X-axis rotation, compression direction
For Y direction;When direction of rotation is along Y-axis rotation, compression direction is X-direction.
It should also be noted that, the first compression factor can be length and compression of the compressed picture on compression direction
Ratio of the preceding picture between the length on compression direction, certainly, in practical application, the first compression factor can also be picture
Ratio of the picture between the length on compression direction on compression direction before compressed length and compression.
For example, the corresponding relationship between the direction of rotation of terminal storage, rotation angle and the first compression factor can be for such as
Corresponding relationship shown in the following table 1, when detecting picture rotation instruction, the terminal rotation side entrained according to picture rotation instruction
To, to rotate along Y-axis, rotating angle is 45 degree, can be from rotation as shown in table 1 below with rotation angle, such as direction of rotation
In corresponding relationship between direction, rotation angle and the first compression factor, obtains and rotate 45 degree of first corresponding compressions along Y-axis
Ratio is 0.707: 1.
Table 1
Direction of rotation | Rotate angle | First compression factor |
It is rotated along X-axis | 30 degree | 0.866∶1 |
It is rotated along X-axis | 45 degree | 0.707∶1 |
It is rotated along X-axis | 60 degree | 0.500∶1 |
…… | …… | …… |
It is rotated along Y-axis | 30 degree | 0.866∶1 |
It is rotated along Y-axis | 45 degree | 0.707∶1 |
It is rotated along Y-axis | 60 degree | 0.500∶1 |
…… | …… | …… |
It should be noted that only with direction of rotation as listed in Table 1, rotation angle and the first pressure in the embodiment of the present invention
It is illustrated for corresponding relationship between contracting ratio, above-mentioned table 1 does not constitute the embodiment of the present invention and limits.
Step 202: according to the first compression factor of acquisition, picture being compressed along compression direction.
For example, when rotation angle is 60 degree, the first compression factor of acquisition can be when direction of rotation is to rotate along X-axis
0.500: 1, terminal can along the y axis compress picture according to the first compression factor of acquisition, and compressed picture exists
The ratio between the length of the picture before length and compression in the Y-axis direction in Y direction is 0.500: 1.
In practical application, terminal can compress picture along compression direction according to the first compression factor of acquisition, when
So, terminal can also by other means compress picture along compression direction.
Step 203: compressed picture will be carried out along compression direction and be divided into multiple picture regions.
On the one hand, the implementation of this step can be with are as follows: determines and carries out compressed picture in compression side along compression direction
Upward length;According to determining length, from the corresponding relationship between the length range and division numbers of storage, obtains and correspond to
Division numbers;According to the division numbers of acquisition, compressed picture will be carried out along compression direction and carries out etc. point dividing, will be obtained more
A picture region.
Wherein, terminal is obtained from the corresponding relationship between the length range and division numbers of storage according to determining length
Take the operation of corresponding division numbers can be with are as follows: terminal, which obtains in the corresponding relationship between length range and division numbers, includes
Multiple length ranges determine from multiple length range and carry out length of the compressed picture on compression direction along compression direction
Length range belonging to degree in the corresponding relationship between length range and division numbers, is obtained based on determining length range
Corresponding division numbers.
For example, the corresponding relationship between the length range and division numbers of terminal storage can be pair as shown in table 2 below
It should be related to, carrying out length L of the compressed picture on compression direction along compression direction can be 10 centimetres, and terminal can obtain
Take 8 centimetres of < L of multiple length ranges for including in the corresponding relationship between length range and division numbers as shown in table 2 below≤
10 centimetres, 10 centimetres of L≤12 centimetre <, 12 centimetres of L≤14 centimetre ... <, and determine from multiple length range along pressure
It is 8 centimetres of L≤10 centimetre <, terminal that contracting direction, which carries out length range belonging to length of the compressed picture on compression direction,
Pair based on determining 8 centimetres of L≤10 centimetre < of length range, shown in the following table 2 between length range and division numbers
In should being related to, obtaining corresponding division numbers is 1000.
Table 2
Length range | Division numbers |
8 centimetres of L≤10 centimetre < | 1000 |
10 centimetres of L≤12 centimetre < | 1200 |
12 centimetres of L≤14 centimetre < | 1400 |
…… | …… |
It should be noted that only with shown in table 2 as above between length range and division numbers in the embodiment of the present invention
It is illustrated for corresponding relationship, above-mentioned table 2 does not constitute the embodiment of the present invention and limits.
Multiple pictures are divided into when terminal will carry out compressed picture along compression direction based on above-mentioned equal part division mode
When region, it is only necessary to be divided according to the division numbers of length and determination of the picture on compression direction, so that it may obtain
Multiple picture regions realize that process is fairly simple, and the efficiency for dividing picture is also relatively high;And when division numbers are very big, human eye
It has been difficult to difference in length of multiple picture region on compression direction, therefore has been obtained by equal part division mode multiple
Picture region both can achieve the purpose for dividing picture, while the efficiency for dividing picture is also relatively high.
When terminal, which will carry out compressed picture along compression direction based on the above method, is divided into multiple picture regions, draw
Each picture region being equal in length along compression direction divided, that is to say pressure of the terminal to each picture region along compression direction
Contracting degree is all the same, and certainly, in practical application, the compression degree for each picture region along compression direction be can also be different,
Realization process can be realized by way of following another aspects:
On the other hand, the implementation of this step can be with are as follows: determines that carrying out compressed picture along compression direction is pressing
Length on contracting direction;According to determining length, from the corresponding relationship between the length range and division numbers of storage, obtain
Corresponding division numbers;According to the division numbers of rotation angle and acquisition, from the rotation angle of storage, division numbers and ratio is divided
In corresponding relationship between example, corresponding division proportion is obtained;It will be along pressure according to direction of rotation according to the division proportion of acquisition
Contracting direction carries out compressed picture and is divided, and obtains multiple picture regions, two neighboring picture region in multiple picture regions
Ratio between domain is the division proportion of acquisition.
For example, the corresponding relationship between the length range and division numbers of terminal storage can be right shown in table 2 as above
It should be related to, the corresponding relationship between the rotation angle of storage, division numbers and division proportion can be as shown in table 3 below corresponding
Relationship, direction of rotation can be to rotate along X-axis, and rotation angle can be 45 degree, and terminal determination first is pressed along compression direction
Length of the picture on compression direction after contracting is 10 centimetres;According to determining 10 centimetres of length, terminal can from storage as
In corresponding relationship shown in upper table 2 between length range and division numbers, obtaining corresponding division numbers is 1000;According to rotation
45 degree of gyration and the division numbers 1000 obtained, terminal can be from rotation angle as shown in table 3 below, the division numbers of storage
In corresponding relationship between division proportion, obtaining corresponding division proportion is 1: 1.04;According to the division proportion 1 of acquisition:
1.04, according to along the direction of X-axis, compressed picture will be carried out along the y axis and divided, and obtain multiple picture regions, it is more
Ratio in a picture region between two neighboring picture region is the division proportion 1: 1.04 of acquisition.
Table 3
Rotate angle | Division numbers | Division proportion |
45 degree | 1000 | 1∶1.04 |
45 degree | 1200 | 1∶1.03 |
45 degree | 1400 | 1∶1.02 |
…… | …… | …… |
It should be noted that only with rotation angle, division numbers shown in table 3 as above and division ratio in the embodiment of the present invention
It is illustrated for corresponding relationship between example, above-mentioned table 3 does not constitute the embodiment of the present invention and limits.
In addition, in practical application, when mode of the terminal based on above-mentioned another aspect will be carried out along compression direction it is compressed
When picture is divided into multiple picture regions, the last one remaining picture region may be smaller along the length of compression direction, makes
Division proportion of the ratio between the last one picture region previous picture region adjacent thereto not equal to acquisition is obtained,
In this case, picture region can be divided by following two ways, be respectively as follows: the last one picture region and adjacent
Previous picture region merges into a picture region;Alternatively, below the last one picture region or right add one
Divide white space, so that the ratio between the last one picture region after previous picture region and addition white space is equal to
The division proportion of acquisition, and length and the last one picture region be in a rotational direction in a rotational direction for the white space
Equal length.
When ratio cut partition mode of the terminal based on above-mentioned another aspect will carry out compressed picture division along compression direction
When for multiple picture regions, length of each picture region of division on compression direction is different, that is to say from human eye farther out
Length of the picture region on compression direction can be shorter, and the length meeting from the closer picture region of human eye on compression direction
Longer, therefore, obtained multiple picture regions human eye when the length on compression direction is closer to practical rotating image is seen
Length of multiple picture region on compression direction, therefore terminal can make this more by ratio cut partition model split picture
A picture region has more true 3-D effect.
Step 204: according to multiple picture regions in a rotational direction sequence, for multiple picture regions addition mark.
Wherein, when direction of rotation is along X-axis rotation, sequence of the terminal according to multiple picture regions in the X-axis direction, from
Multiple picture regions are successively identified as No. 1, No. 2, No. 3 ... by top to bottm;When direction of rotation is along Y-axis rotation, terminal is pressed
According to the sequence of multiple picture regions in the Y-axis direction, multiple picture regions are successively from left to right identified as No. 1, No. 2,3
Number ....
In practical application, when the picture difference of rotation, the multiple picture regions marked off are also different, in this case eventually
End can be multiple picture regions addition mark, and then according to the mark of addition, execute its mark to multiple picture region respectively
Know corresponding operation, that is to say when direction of rotation is consistent with the rotation angle mark of multiple picture regions all the same, it is right
Multiple picture region executes operation corresponding to the mark, without to each of multiple pictures picture region all
Different operations is executed, so as to so that the image display method all has applicability to different pictures.
Step 205: according to the mark of multiple picture regions, direction of rotation and rotation angle, from the picture region mark of storage
In corresponding relationship between knowledge, direction of rotation, rotation angle and the second compression factor, acquisition is compressed more along direction of rotation
A second compression factor, multiple second compression factor and multiple picture regions correspond.
When terminal needs compress multiple picture regions along direction of rotation respectively, it is necessary first to determine along rotation side
To multiple second compression factors compressed, and then multiple picture regions can be distinguished according to multiple second compression factor
It is compressed.Wherein, terminal determines that the mode of multiple second compression factor can be with are as follows: according to the mark of multiple picture regions,
Direction of rotation and rotation angle, between the picture region mark of storage, direction of rotation, rotation angle and the second compression factor
In corresponding relationship, multiple second compression factors compressed along direction of rotation, and multiple second compression ratios that will acquire are obtained
Example is determined as multiple second compression factors compressed along direction of rotation to multiple picture regions.
It should be noted that the second compression factor can be compressed picture region length and pressure in a rotational direction
Picture region before the contracting ratio between length in a rotational direction, certainly, in practical application, the second compression factor can be with
It is the picture region before picture region in a rotational direction compressed length and compression in a rotational direction between length
Ratio.
For example, the picture region of terminal storage identifies, direction of rotation, rotation angle and the second compression factor between it is corresponding
Relationship can be corresponding relationship as shown in table 4 below, be identified as No. 1 when picture region, direction of rotation be rotated along X-axis, and
When rotation angle is 60 degree, terminal, can be from such as the following table 4 institute according to the mark of the picture region, direction of rotation and rotation angle
In the corresponding relationship between picture region mark, direction of rotation, rotation angle and the second compression factor shown, obtain along rotation side
It is 0.65: 1 to the second compression factor compressed to the picture region.
Table 4
It should be noted that only with picture region mark, direction of rotation, rotation shown in table 4 as above in the embodiment of the present invention
It is illustrated for corresponding relationship between gyration and the second compression factor, above-mentioned table 4 is not constituted the embodiment of the present invention
It limits.
Step 206: according to multiple second compression factors of acquisition, multiple picture regions being pressed respectively along direction of rotation
Contracting.
For example, being identified as No. 1 when picture region, direction of rotation is to rotate along X-axis, when rotation angle is 60 degree, is obtained
The second compression factor can be 0.65: 1, terminal, can be along the x axis to the picture region according to the second compression factor of acquisition
Domain is compressed, the length of the picture region before the length and compression of compressed picture region in the X-axis direction in the X-axis direction
Ratio between degree is 0.65: 1.
For another example, No. 2 are identified as when picture region, direction of rotation is to rotate along Y-axis, when rotation angle is 45 degree, is obtained
The second compression factor taken can be 0.97: 1, and terminal, can be along the y axis to the picture according to the second compression factor of acquisition
Region is compressed, and picture region before the length and compression of compressed picture region in the Y-axis direction is in the Y-axis direction
Ratio between length is 0.97: 1.
Due to being compressed respectively to multiple picture regions along direction of rotation according to the second different compression factors, so that
The vision distance effect that the different picture region of compression factor brings user is also different, that is to say the big picture region of compression degree
It will use family and feel the picture region farther out from oneself, and the smaller picture region of compression degree will use family and feel the picture region
Domain is closer from oneself, so that whole picture be made to produce the 3-D effect with far and near sense.
In practical application, terminal can according to multiple second compression factors of acquisition along direction of rotation to multiple picture regions
It is compressed respectively, certainly, terminal can also by other means compress multiple picture regions along direction of rotation respectively.
Step 207: display carries out compressed multiple picture regions along direction of rotation.
Wherein, when the direction of rotation of picture is along X-axis rotation, according to all picture regions along same symmetry axis or so pair
The mode of title, display carry out compressed multiple picture regions along direction of rotation, as shown in Figure 2 B.When the direction of rotation of picture is
When along Y-axis rotation, terminal obtains corresponding from the corresponding relationship between the rotation angle and angles of display along Y-axis of storage
Angles of display, angle of the angles of display between any straight line and X-axis, according to the angles of display of acquisition, according to multiple pictures
The mode that the top side length center in region straight line determined by the angles of display is arranged successively, display are pressed along direction of rotation
Multiple picture regions after contracting, the company at the top side length center that compressed multiple picture regions are carried out along direction of rotation of display
Angle between line and X axis is the angles of display, as shown in Figure 2 C.
For example, the corresponding relationship between the rotation angle and angles of display along Y-axis of terminal storage can be following 5 institute of table
The corresponding relationship shown, when the direction of rotation of picture be along Y-axis rotate and rotate angle be 45 degree when, terminal can be from such as the following table 5
Shown in corresponding relationship between the rotation angle and angles of display of Y-axis, obtaining corresponding angles of display is 18 degree, root
According to 18 degree of angles of display of acquisition, according to the top side length center of multiple picture regions straight line determined by the angles of display
The mode being arranged successively, display carry out compressed multiple picture regions along direction of rotation, and display is pressed along direction of rotation
Angle between the line and X-axis at the top side length center of multiple picture regions after contracting is 18 degree.
Table 5
Along the rotation angle of Y-axis | Angles of display |
30 degree | 12 degree |
45 degree | 18 degree |
60 degree | 24 degree |
…… | …… |
It should be noted that only with the rotation angle and angles of display shown in table 5 as above along Y-axis in the embodiment of the present invention
Between corresponding relationship for be illustrated, above-mentioned table 5 not to the embodiment of the present invention constitute limit.
In embodiments of the present invention, when detecting picture rotation instruction, terminal is taken according to picture rotation instruction first
The direction of rotation of band and rotation angle determine the first compression factor, and according to first compression factor along compression direction to picture into
Row compression, length when really being rotated due to picture on compression direction can change, can be with along compression direction compressed picture
Picture is set to produce the visual effect of rotation on compression direction.Then terminal will carry out compressed picture stroke along compression direction
It is divided into multiple picture regions, and determines corresponding second compression factor of each picture region, according to second compression factor along rotation
Turning direction respectively to compress multiple picture regions, length can change in a rotational direction when really being rotated due to picture,
And from the farther away picture region of human eye, length can change more in a rotational direction, and revolve from the closer picture region of human eye
Turn the length on direction can change it is less, therefore according to the second different compression factors along direction of rotation respectively to multiple picture regions
Domain is compressed, and picture can be made to produce the visual effect of rotation in a rotational direction.The embodiment of the present invention passes through according to
One compression factor compresses picture along compression direction, and according to the second different compression factors along direction of rotation to multiple
Picture region is compressed, so that whole picture be made to show the 3-D effect with far and near sense.Meanwhile being implemented using the present invention
When the image display method that example provides shows picture, without loading 3D engine, and then without calling the graphics process in 3D engine
Algorithm, to reduce the hardware operating cost of terminal.
Referring to Fig. 3 A, the embodiment of the invention provides a kind of image display apparatus 300, which includes: the first compression mould
Block 301, division module 302, the second compression module 303 and display module 304.
First compression module 301, for instructing entrained rotation according to picture rotation when detecting picture rotation instruction
Turn direction and rotation angle, picture is compressed along compression direction, compression direction is mutually perpendicular to direction of rotation;
Division module 302 is divided into multiple picture regions for that will carry out compressed picture along compression direction;
Second compression module 303, for dividing multiple picture regions along direction of rotation according to direction of rotation and rotation angle
It is not compressed;
Display module 304 carries out compressed multiple picture regions along direction of rotation for showing.
Optionally, referring to Fig. 3 B, the first compression module 301 includes:
First acquisition unit 3011, for according to direction of rotation and rotating angle when detecting picture rotation instruction, from
In corresponding relationship between the direction of rotation of storage, rotation angle and the first compression factor, corresponding first compression factor is obtained;
First compression unit 3012, for being compressed to picture along compression direction according to the first compression factor.
Optionally, referring to Fig. 3 C, division module 302 includes:
First determination unit 3021 carries out length of the compressed picture on compression direction along compression direction for determining
Degree;
Second acquisition unit 3022, for according to determining length, between the length range and division numbers of storage
In corresponding relationship, corresponding division numbers are obtained;
First division unit 3023 will carry out compressed picture along compression direction for the division numbers according to acquisition
It carries out etc. point dividing, obtains multiple picture regions.
Optionally, referring to Fig. 3 D, division module 302 includes:
Second determination unit 3024 carries out length of the compressed picture on compression direction along compression direction for determining
Degree;
Third acquiring unit 3025, for according to determining length, between the length range and division numbers of storage
In corresponding relationship, corresponding division numbers are obtained;
4th acquiring unit 3026 from the rotation angle of storage, is drawn for the division numbers according to rotation angle and acquisition
In corresponding relationship between dosis refracta and division proportion, corresponding division proportion is obtained;
Second division unit 3027 will be used for according to division proportion, according to direction of rotation, after being compressed along compression direction
Picture divided, obtain multiple picture regions, the ratio in multiple picture regions between two neighboring picture region is
Division proportion.
Optionally, referring to Fig. 3 E, the device further include:
Mark module 305, for according to multiple picture regions in a rotational direction sequence, for multiple picture regions add
Mark.
Optionally, referring to Fig. 3 F, the second compression module 303 includes:
5th acquiring unit 3031, for according to the mark of multiple picture regions, direction of rotation and rotation angle, from storage
Picture region mark, direction of rotation, rotation angle and the second compression factor between corresponding relationship in, obtain along direction of rotation
Multiple second compression factors compressed, multiple second compression factors and multiple picture regions correspond;
Second compression unit 3032, for dividing multiple picture regions along direction of rotation according to multiple second compression factors
It is not compressed.
In conclusion in embodiments of the present invention, when detecting picture rotation instruction, being instructed first according to picture rotation
Entrained direction of rotation and rotation angle, is compressed picture along compression direction, compressed when really being rotated due to picture
Length on direction can change, therefore picture can be made to produce the view of rotation on compression direction along compression direction compressed picture
Feel effect.Then compressed picture will be carried out along compression direction and be divided into multiple picture regions, and right respectively along direction of rotation
Multiple picture regions are compressed, and length can change in a rotational direction when really being rotated due to picture, and farther out from human eye
Picture region length can change more in a rotational direction, and grown in a rotational direction from the closer picture region of human eye
Degree can change less, therefore compress respectively to multiple picture regions along direction of rotation, can make picture in a rotational direction
Produce the visual effect of rotation.The embodiment of the present invention is by compressing picture along compression direction, and along direction of rotation
Multiple picture regions are compressed, to make whole picture show the 3-D effect with far and near sense, and due to without adding
3D engine is carried, to reduce the hardware operating cost of terminal.
It should be understood that image display apparatus provided by the above embodiment is when showing picture, only with above-mentioned each function
The division progress of module can according to need and for example, in practical application by above-mentioned function distribution by different function moulds
Block is completed, i.e., the internal structure of equipment is divided into different functional modules, to complete all or part of function described above
Energy.In addition, image display apparatus provided by the above embodiment and image display method embodiment belong to same design, it is specific real
Existing process is detailed in embodiment of the method, and which is not described herein again.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and
Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.
Claims (6)
1. a kind of image display method, which is characterized in that the described method includes:
When detecting picture rotation instruction, according to the entrained direction of rotation of picture rotation instruction and angle is rotated, from
In corresponding relationship between the direction of rotation of storage, rotation angle and the first compression factor, corresponding first compression factor is obtained;
According to first compression factor, the picture is compressed along compression direction, the compression direction and the rotation
Direction is mutually perpendicular to;
It determines and carries out length of the compressed picture on the compression direction along the compression direction;
Corresponding division is obtained from the corresponding relationship between the length range and division numbers of storage according to determining length
Quantity;
According to the division numbers of the rotation angle and acquisition, between the rotation angle, division numbers and division proportion of storage
Corresponding relationship in, obtain corresponding division proportion;
According to the division proportion compressed picture will be carried out along the compression direction and be drawn according to the direction of rotation
Point, multiple picture regions are obtained, the ratio in the multiple picture region between two neighboring picture region is the division
Ratio;
According to the direction of rotation and the rotation angle, the multiple picture region is pressed respectively along the direction of rotation
Contracting;
Display carries out compressed multiple picture regions along the direction of rotation.
2. the method as described in claim 1, which is characterized in that described to carry out compressed picture stroke along the compression direction
It is divided into after multiple picture regions, further includes:
According to the sequence of the multiple picture region on the direction of rotation, for the multiple picture region addition mark.
3. method according to claim 2, which is characterized in that described according to the direction of rotation and the rotation angle, edge
The direction of rotation is compressed by the multiple picture region respectively, comprising:
According to the mark of the multiple picture region, the direction of rotation and the rotation angle, from the picture region mark of storage
In corresponding relationship between knowledge, direction of rotation, rotation angle and the second compression factor, acquisition is compressed along the direction of rotation
Multiple second compression factors, the multiple second compression factor and the multiple picture region correspond;
According to the multiple second compression factor, the multiple picture region is compressed respectively along the direction of rotation.
4. a kind of image display apparatus, which is characterized in that described device includes:
First compression module, for instructing entrained rotation according to the picture rotation when detecting picture rotation instruction
Direction and rotation angle, from the corresponding relationship between the direction of rotation of storage, rotation angle and the first compression factor, acquisition pair
The first compression factor answered is compressed the picture along compression direction, the compression side according to first compression factor
It is mutually perpendicular to the direction of rotation;
Division module carries out length of the compressed picture on the compression direction along the compression direction for determining;Root
Corresponding division numbers are obtained from the corresponding relationship between the length range and division numbers of storage according to determining length;Root
According to the division numbers of the rotation angle and acquisition, from corresponding between the rotation angle, division numbers and division proportion of storage
In relationship, corresponding division proportion is obtained;It will be along the compression direction according to the direction of rotation according to the division proportion
It carries out compressed picture to be divided, obtains multiple picture regions, two neighboring picture region in the multiple picture region
Between ratio be the division proportion;
Second compression module is used for according to the direction of rotation and the rotation angle, along the direction of rotation to the multiple
Picture region is compressed respectively;
Display module carries out compressed multiple picture regions along the direction of rotation for showing.
5. device as claimed in claim 4, which is characterized in that described device further include:
Mark module is the multiple picture region for the sequence according to the multiple picture region on the direction of rotation
Domain addition mark.
6. device as claimed in claim 5, which is characterized in that second compression module includes:
5th acquiring unit, for according to the mark of the multiple picture region, the direction of rotation and the rotation angle, from
In corresponding relationship between the picture region mark of storage, direction of rotation, rotation angle and the second compression factor, obtain along described
Multiple second compression factors that direction of rotation is compressed, the multiple second compression factor and the multiple picture region are one by one
It is corresponding;
Second compression unit is used for according to the multiple second compression factor, along the direction of rotation to the multiple picture region
It is compressed respectively in domain.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610899215.0A CN106530234B (en) | 2016-10-14 | 2016-10-14 | Image display method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610899215.0A CN106530234B (en) | 2016-10-14 | 2016-10-14 | Image display method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106530234A CN106530234A (en) | 2017-03-22 |
CN106530234B true CN106530234B (en) | 2019-09-20 |
Family
ID=58331803
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610899215.0A Active CN106530234B (en) | 2016-10-14 | 2016-10-14 | Image display method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106530234B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107908613B (en) * | 2017-12-21 | 2021-06-22 | 泰康保险集团股份有限公司 | Picture display method and device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1274439A (en) * | 1997-08-12 | 2000-11-22 | 松下电器产业株式会社 | Window display |
CN102193768A (en) * | 2010-03-17 | 2011-09-21 | 联想(新加坡)私人有限公司 | System, method and equipment of media integration and display |
CN102201126A (en) * | 2010-03-24 | 2011-09-28 | 联想(北京)有限公司 | Image processing method, system and terminal |
CN102279732A (en) * | 2010-06-09 | 2011-12-14 | 腾讯科技(深圳)有限公司 | Method and system for applying 3D to switch panels in instant communication tool |
CN103180881A (en) * | 2010-12-24 | 2013-06-26 | 中国科学院自动化研究所 | Fast rendering method of third dimension of complex scenes in internet |
CN103400339A (en) * | 2013-07-11 | 2013-11-20 | 上海星焰印务有限公司 | Manufacturing method of 3D (three-dimensional) ground stickers |
CN104103067A (en) * | 2013-04-04 | 2014-10-15 | 索尼公司 | Method and apparatus for generating an image cut-out |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7116342B2 (en) * | 2003-07-03 | 2006-10-03 | Sportsmedia Technology Corporation | System and method for inserting content into an image sequence |
-
2016
- 2016-10-14 CN CN201610899215.0A patent/CN106530234B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1274439A (en) * | 1997-08-12 | 2000-11-22 | 松下电器产业株式会社 | Window display |
CN102193768A (en) * | 2010-03-17 | 2011-09-21 | 联想(新加坡)私人有限公司 | System, method and equipment of media integration and display |
CN102201126A (en) * | 2010-03-24 | 2011-09-28 | 联想(北京)有限公司 | Image processing method, system and terminal |
CN102279732A (en) * | 2010-06-09 | 2011-12-14 | 腾讯科技(深圳)有限公司 | Method and system for applying 3D to switch panels in instant communication tool |
CN103180881A (en) * | 2010-12-24 | 2013-06-26 | 中国科学院自动化研究所 | Fast rendering method of third dimension of complex scenes in internet |
CN104103067A (en) * | 2013-04-04 | 2014-10-15 | 索尼公司 | Method and apparatus for generating an image cut-out |
CN103400339A (en) * | 2013-07-11 | 2013-11-20 | 上海星焰印务有限公司 | Manufacturing method of 3D (three-dimensional) ground stickers |
Also Published As
Publication number | Publication date |
---|---|
CN106530234A (en) | 2017-03-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104376545B (en) | A kind of method and a kind of electronic equipment of information processing | |
CN103984720B (en) | Tile map creation method and device based on OpenGL | |
CN103729833B (en) | A kind of image split-joint method and device | |
CN105915907A (en) | Compression and decompression method of panoramic image, apparatus and system thereof | |
CN107437273A (en) | Six degree of freedom three-dimensional reconstruction method, system and the portable terminal of a kind of virtual reality | |
CN103021023A (en) | Three-dimensional scene construction method based on browser | |
CN106162140B (en) | A kind of compression method and device of panoramic video | |
CN107146274A (en) | Image data processing system, texture mapping compression and the method for producing panoramic video | |
CN101662695B (en) | Method and device for acquiring virtual viewport | |
CN106530234B (en) | Image display method and device | |
CN107123163A (en) | A kind of plant three-dimensional reconstruction system based on various visual angles stereoscopic vision | |
CN103634588A (en) | Image composition method and electronic apparatus | |
CN102385752A (en) | Stereo matching method based on distance difference and color difference | |
CN106131641A (en) | A kind of barrage control method, system and Android intelligent television | |
CN105261050B (en) | Picture compression method and device and mobile terminal | |
TWI439961B (en) | Conversion algorithm for voids generated after converting 2D images | |
CN104331496A (en) | Photo sharing method and device | |
CN110430419A (en) | A kind of multiple views naked eye three-dimensional image composition method anti-aliasing based on super-resolution | |
CN105894031A (en) | Photo selection method and photo selection device | |
CN109859134A (en) | A kind of processing method and terminal of makeups material | |
CN104167009B (en) | A kind of implementation method of animation effect | |
CN106683141A (en) | Configurable quick texture compressing method | |
CN105893578A (en) | Method and device for selecting photos | |
CN103218775A (en) | Method of changing faces in portrait photos | |
CN109493376A (en) | Image processing method and device, storage medium and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 510660 Guangzhou City, Guangzhou, Guangdong, Whampoa Avenue, No. 315, self - made 1-17 Applicant after: Guangzhou KuGou Networks Co., Ltd. Address before: 510000 B1, building, No. 16, rhyme Road, Guangzhou, Guangdong, China 13F Applicant before: Guangzhou KuGou Networks Co., Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |