CN110727489A - Screenshot image generation method, electronic device and computer-readable storage medium - Google Patents

Screenshot image generation method, electronic device and computer-readable storage medium Download PDF

Info

Publication number
CN110727489A
CN110727489A CN201910871813.0A CN201910871813A CN110727489A CN 110727489 A CN110727489 A CN 110727489A CN 201910871813 A CN201910871813 A CN 201910871813A CN 110727489 A CN110727489 A CN 110727489A
Authority
CN
China
Prior art keywords
screen
image
target plane
relative
screens
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.)
Granted
Application number
CN201910871813.0A
Other languages
Chinese (zh)
Other versions
CN110727489B (en
Inventor
钟宜峰
刘昕
张健
莫东松
张进
赵璐
马丹
马晓琳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
MIGU Culture Technology Co Ltd
Original Assignee
MIGU Culture Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by MIGU Culture Technology Co Ltd filed Critical MIGU Culture Technology Co Ltd
Priority to CN201910871813.0A priority Critical patent/CN110727489B/en
Publication of CN110727489A publication Critical patent/CN110727489A/en
Application granted granted Critical
Publication of CN110727489B publication Critical patent/CN110727489B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

Abstract

The invention provides a generation method of a screenshot image, an electronic device and a computer-readable storage medium, wherein the generation method is applied to the electronic device, the electronic device is associated with at least two screens, and the generation method comprises the following steps: acquiring a first screenshot image of each screen; determining a transformation mode corresponding to the first screen cut image of each screen according to the deflection state of each screen relative to the target plane and the watching state of a user relative to the target plane; respectively processing the first screen capture image of each screen according to the conversion mode to obtain a second screen capture image of each screen; the second screen capture image is a screen capture image of each screen relative to the target plane under the viewing angle of a user; and splicing the second screen capture images of each screen to obtain a target screen capture image with a folding three-dimensional effect. By using the embodiment of the invention, the target screenshot image with the folding three-dimensional effect can be obtained, and the user experience is improved.

Description

Screenshot image generation method, electronic device and computer-readable storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method for generating a screenshot image, an electronic device, and a computer-readable storage medium.
Background
At present, when an electronic device with a folding screen (including at least two screens) is subjected to screen capture, display contents in a single screen or all screens are directly captured. However, the visual effect brought to the user after the folding screen is different from that of the common plane screen, and the screen capture image obtained by the existing screen capture mode cannot bring the folding visual effect to the user.
Disclosure of Invention
The embodiment of the invention provides a screenshot image generation method, electronic equipment and a computer-readable storage medium, and aims to solve the problem that a screenshot image obtained in an existing screenshot mode cannot bring a folded visual effect to a user.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a method for generating a screenshot image, where the method is applied to an electronic device, the electronic device is associated with at least two screens, and the method includes:
acquiring a first screen capture image of each of the screens;
determining a transformation mode corresponding to the first screen cut image of each screen according to the deflection state of each screen relative to a target plane and the watching state of a user relative to the target plane;
according to the conversion mode, the first screen capture image of each screen is processed respectively to obtain a second screen capture image of each screen; wherein the second screen capture image is a screen capture image of each screen relative to the target plane at a user viewing perspective;
and splicing the second screen capture images of each screen to obtain a target screen capture image with a folding three-dimensional effect.
Optionally, the determining, according to the deflection state of each screen relative to the target plane and the viewing state of the user relative to the target plane, a transformation manner corresponding to the first screenshot image of each screen includes:
and determining a transformation matrix corresponding to the first cut screen image of each screen according to the deflection angle of each screen relative to the target plane and the viewing angle and the viewing distance of the user relative to the target plane.
Optionally, when the viewing angle is a normal angle, the determining, according to the deflection angle of each screen relative to the target plane, and the viewing angle and the viewing distance of the user relative to the target plane, a transformation matrix corresponding to the first screen cut image of each screen includes:
for a first screen, performing the steps of:
determining first coordinates of at least four pixel points in a first screenshot image of the first screen;
respectively determining second coordinates of the at least four pixel points in a second screen capture image of the first screen according to the deflection angle of the first screen relative to the target plane and the viewing distance of a user relative to the target plane;
determining a transformation matrix corresponding to the first screenshot image of the first screen by using the first coordinates and the second coordinates of the at least four pixel points;
wherein the first screen is any one of the at least two screens.
Optionally, the first coordinate (x) of the pixel pointi,yi) And a second coordinate (x'i,y′i) The relationship with the transformation matrix M is:
M*[xi,yi,1]T=[x′i,y′i,1]T
wherein M is a 3 × 3 matrix; and i is a positive integer greater than 0 and represents the serial number of the pixel point.
Optionally, the processing the first screenshot image of each screen according to the conversion manner to obtain a second screenshot image of each screen includes:
and transforming the coordinates of all pixel points in the first screenshot image of each screen by using the transformation matrix corresponding to the first screenshot image of each screen to obtain a second screenshot image of each screen.
Optionally, the determining, according to the deflection angle of each screen relative to the target plane and the viewing angle and the viewing distance of the user relative to the target plane, a transformation matrix corresponding to the first screen cut image of each screen includes:
based on a preset corresponding relation, determining a transformation matrix corresponding to a first cut screen image of each screen according to a deflection angle of each screen relative to the target plane, and a viewing angle and a viewing distance of a user relative to the target plane;
wherein, the corresponding relation is as follows: the transformation matrix corresponds to the deflection angle and the viewing angle and viewing distance of the user relative to the target plane.
Optionally, when the viewing angle is a side view angle, the determining a transformation matrix corresponding to the first screen cut image of each screen according to the deflection angle of each screen relative to the target plane, and the viewing angle and the viewing distance of the user relative to the target plane includes:
determining a first transformation matrix corresponding to a first cut screen image of each screen under the condition of a front view angle according to the deflection angle of each screen relative to the target plane and the viewing distance of a user relative to the target plane;
determining a perspective transformation matrix based on the pose angle information of the side view and the pose angle information of the front view;
and processing the first transformation matrix corresponding to the first screenshot image of each screen by using the perspective transformation matrix to obtain the transformation matrix corresponding to the first screenshot image of each screen.
Optionally, the splicing the second screenshot images of each screen to obtain a target screenshot image with a folded stereoscopic effect includes:
determining a positional relationship between the at least two screens;
and splicing the second screen capture image of each screen according to the position relation between the at least two screens to obtain the target screen capture image.
In a second aspect, an embodiment of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, may implement the steps of the screenshot image generation method described above.
In a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, can implement the steps of the screenshot image generation method described above.
In the embodiment of the invention, the target screen capture image with the folding three-dimensional effect can be obtained by obtaining the screen capture image of each screen relative to the target plane under the viewing angle of the user and splicing the screen capture images of each screen. Compared with the existing screen capture mode, the target screen capture image obtained by the embodiment of the invention can bring a folding visual effect to a user, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
FIG. 1 is a top view of a folding screen in an embodiment of the present invention;
FIG. 2 is a side view of a folding screen in an embodiment of the present invention;
FIG. 3 is a flow chart of a method for generating a screenshot image according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a screenshot image according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a screenshot image generation apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
To facilitate understanding of the embodiment of the present invention, an electronic device with a foldable screen, such as a mobile phone, an iPad, etc., is first described with reference to fig. 1 and 2.
Referring to fig. 1 and 2, fig. 1 is a top view of a foldable screen according to an embodiment of the present invention, and fig. 2 is a side view of the foldable screen according to the embodiment of the present invention. For the folded screens shown in fig. 1 and 2, two screens of the same size are included, a first screen 1 and a second screen 2 respectively. The width of the folding screen is w, the height of the folding screen is h, the width of the first screen 1 is w/2, and the height of the first screen is h; the second screen 2 has a width w/2 and a height h.
When a user views the folding screen in a folded state, the folding screen includes a width (i.e., a visible width) of the screen at a viewing angle of the userRather than actual width) may be less than actual width. As shown in fig. 1, in a case where a user views a folded screen at a front viewing angle, if the folded screen is in a folded state, the folded angle is α, that is, an included angle between a first screen 1 and a second screen 2 is α, and a viewing distance of the user with respect to the folded screen is d (for example, 0.25 m), widths (i.e., visible widths rather than actual widths) of the first screen 1 and the second screen 2 at the viewing angle of the user are w'/2 (smaller than the actual widths w/2), and a ratio of the visible width to the actual width of the first screen 1 (or the second screen 2) at the viewing angle of the user may be approximately equal to
Figure BDA0002203051700000051
When a user views the folding screen in the folded state, the visible height of the fold of the folding screen at the viewing angle of the user may be less than the actual height. As shown in fig. 2, the height of the folding screen is h, i.e. the actual height of the fold of the folding screen is h, the height of the outer edge of the folding screen (e.g. the first screen 1) is h, and the visible height of the fold of the folding screen is h' (smaller than the actual height is h) at the viewing angle of the user. Further, if the vertical viewing distance of the user relative to the fold of the folded screen is d + Δ d, the ratio of the visible height of the fold of the folded screen to the height at the outer edge may be approximated at the viewing angle of the user
Figure BDA0002203051700000052
As can be seen from the above, the folded screen brings different visual effects to the user from the common flat screen. When the user views the display image of the folding screen in the folded state, this display image may give the user a visual effect of folding. Based on this, the embodiment of the present invention may obtain the target screenshot image with the folded stereoscopic effect by obtaining the screenshot image of each screen with respect to the target plane (such as the plane formed by the outer edges of the first screen 1 and the second screen 2 shown in fig. 1) at the viewing angle of the user, and stitching the screenshot image of each screen.
It should be noted that, in the embodiment of the present invention, the viewing distance of the user relative to the folding screen may be understood as the viewing distance of the user relative to the target plane, such as the distance between the plane where the eyes of the user are located and the plane where the outer edges of the folding screen are located, for example, the viewing distance d shown in fig. 1. The viewing angle of the user relative to the folding screen may be understood as the viewing angle of the user relative to the target plane, for example, the angle between the line of sight of the user and the vertical direction of the unfolding plane of the folding screen, and the viewing angle shown in fig. 1 is 0 degrees, that is, the viewing angle shown in fig. 1 is a positive viewing angle.
The folding screen is exemplified by including two screens with the same size, but the embodiment of the present invention is not limited to this, and may also include more than two screens, such as three screens, four screens, etc., or include screens with different sizes based on actual situations.
The electronic device is exemplified to have a foldable screen, but the embodiment of the present invention is not limited thereto, and based on practical situations, the electronic device in the embodiment of the present invention may also be connected to at least two screens, where the connection may be a wired connection or a wireless connection, so as to obtain a target screenshot image with a foldable stereoscopic effect for the at least two screens.
Referring to fig. 3, fig. 3 is a flowchart of a method for generating a screenshot image, where the method is applied to an electronic device, and the electronic device is associated with at least two screens, where the association may be that the electronic device has a folding screen including at least two screens, or that the electronic device is connected with at least two screens, and the connection may be a wired connection or a wireless connection. As shown in fig. 3, the method comprises the steps of:
step 301: a first screen cut image is acquired for each screen.
Wherein, for the first screen-cut image, the first screen-cut image can be obtained by directly intercepting the display content in the corresponding screen. The applicable scene of this embodiment is specifically a scene in which the at least two screens are not in the same plane, for example, taking an electronic device with a foldable screen as an example, the foldable screen is in a folded state, or taking an electronic device connected to the two screens as an example, an included angle between the two screens is smaller than 180 °.
Step 302: and determining a transformation mode corresponding to the first screen cut image of each screen according to the deflection state of each screen relative to the target plane and the watching state of the user relative to the target plane.
In this embodiment, the target plane may be determined based on a preset rule, and the target plane is used to determine a screen capture image of a screen at a viewing angle of a user. For example, taking the electronic device shown in fig. 1 and 2 as an example, the corresponding target plane is a plane formed by the outer edges of the first screen 1 and the second screen 2.
The first screenshot image may be understood as a screenshot image obtained by capturing display content in a corresponding screen when a plane where the screen is located is the same as or parallel to a target plane, that is, the first screenshot image is related to the actual width and height of the screen.
The transformation mode corresponding to the first screenshot image can be understood as a transformation mode between the first screenshot image and a second screenshot image, wherein the second screenshot image is a screenshot image of each screen relative to the target plane under the viewing angle of the user. Optionally, when determining the transformation mode corresponding to the first screenshot image, the transformation mode may be determined based on a relationship between an actual width and height of the corresponding screen and a visible width and height of the corresponding screen at a viewing angle of the user.
Optionally, the above-mentioned deflected state may include a deflected angle. The deflection angle may be detected by an angle sensor in the electronic device. The viewing state of the user with respect to the target plane may include a viewing angle and a viewing distance. The viewing angle and the viewing distance can be obtained from a user image captured by an image capturing device (such as a camera) in the electronic device.
Step 303: and respectively processing the first screen capture image of each screen according to the conversion mode to obtain a second screen capture image of each screen.
Step 304: and splicing the second screen capture images of each screen to obtain a target screen capture image with a folding three-dimensional effect.
When the second screenshot image of each screen is spliced, the position relationship between at least two screens can be determined, and then the second screenshot image of each screen is spliced according to the position relationship between the at least two screens to obtain the target screenshot image with the folding three-dimensional effect. For example, the second screen capture images of adjacent screens need to be spliced together to obtain the target screen capture image with high matching degree.
According to the method for generating the screenshot image, the screenshot image of each screen relative to the target plane under the viewing angle of the user is obtained, and the screenshot image of each screen is spliced, so that the target screenshot image with the folding three-dimensional effect can be obtained. Compared with the existing screen capture mode, the target screen capture image obtained by the embodiment of the invention can bring a folding visual effect to a user, and the user experience is improved.
In the embodiment of the invention, when the transformation mode corresponding to the first screen image of each screen is determined, the transformation mode can be determined by determining the actual width and height of the corresponding screen and the relationship between the visible width and height of the corresponding screen under the viewing angle of a user based on the projection transformation principle. Optionally, in a case that the deflection state of each screen with respect to the target plane includes a deflection angle, and the viewing state of the user with respect to the target plane includes a viewing angle and a viewing distance, the step 302 may include: and determining a transformation matrix corresponding to the first cut screen image of each screen according to the deflection angle of each screen relative to the target plane, and the viewing angle and the viewing distance of the user relative to the target plane.
The transformation matrix can be understood as the relationship between the position coordinates of the pixel point in the first screenshot image and the position coordinates of the pixel point in the second screenshot image. Namely, after the position coordinates of the pixel points in the first screenshot image are transformed by using the transformation matrix, the position coordinates of the pixel points in the second screenshot image can be obtained. Therefore, by determining the transformation matrix corresponding to each screen, the screenshot image of each screen relative to the target plane under the viewing angle of the user can be accurately obtained, different screenshot images with the folding three-dimensional effect can be generated according to the difference of the polarization angle of each screen, and the 'what you see is what you get' effect is realized.
Optionally, after determining the transformation matrix corresponding to the first cut-screen image of each screen, the step 303 may include: and transforming the coordinates of all pixel points in the first screenshot image of each screen respectively by using the transformation matrix corresponding to the first screenshot image of each screen to obtain a second screenshot image of each screen.
Optionally, when the viewing angle of the user is a positive viewing angle, since the image projection at the positive viewing angle of the user is not deflected, the process of determining the transformation matrix corresponding to the first screen cut image of each screen according to the deflection angle of each screen relative to the target plane, the viewing angle and the viewing distance of the user relative to the target plane may include:
for a first screen, performing the steps of:
determining first coordinates of at least four pixel points in a first screen image of a first screen;
respectively determining second coordinates of the at least four pixel points in a second screen capture image of the first screen according to the deflection angle of the first screen relative to the target plane and the viewing distance of a user relative to the target plane;
determining a transformation matrix corresponding to the first screenshot image of the first screen by using the first coordinates and the second coordinates of the at least four pixel points;
wherein the first screen is any one of at least two screens. When the first coordinates of the pixel points are determined, a corresponding coordinate system can be set based on actual requirements, and the second coordinates of the pixel points are determined based on the coordinate system. Preferably, the plane in which the coordinate system lies may be the same as or parallel to the target plane.
First coordinate (x) of the pixel pointi,yi) And a second coordinate (x'i,y′i) The relationship between the transformation matrix M corresponding to the first cut screen image of the first screen may be selected as:
M*[xi,yi,1]T=[x′i,y′i,1]T
wherein M is a 3 × 3 matrix; and i is a positive integer greater than 0 and represents the serial number of the pixel point. It should be noted that the form of the transformation matrix M may be set based on the existing image perspective transformation principle.
For example, taking the folded screen shown in fig. 1 and 2 as an example, the first cut image of the first screen 1 is an image a, and the first cut image of the first screen 2 is an image B. Referring to fig. 4, if the corresponding coordinate system for image a is the origin o at the top left vertex, and the x-axis and y-axis are as shown in fig. 4, the coordinate of the top left vertex pixel point 1 in image a is the origin o
Figure BDA0002203051700000081
The coordinates of the top right vertex pixel point 2 are
Figure BDA0002203051700000082
The coordinates of the lower left vertex pixel point 3 are
Figure BDA0002203051700000083
The coordinates of the lower right vertex pixel point 4 are
Figure BDA0002203051700000084
After the folding screen is folded (folding angle α), the image A 'of the image A in the user's positive viewing angle can be as shown in FIG. 4, i.e. pixel point 1AThe coordinates in image A' are
Figure BDA0002203051700000085
Pixel point 2AThe coordinates in image A' are
Figure BDA0002203051700000086
Figure BDA0002203051700000087
Pixel point 3AThe coordinates in image A' are
Figure BDA0002203051700000088
Pixel point 4AThe coordinates in image A' are
Figure BDA0002203051700000089
If the corresponding coordinate system for image B is with the top left vertex as the origin o and the x-axis and y-axis are as shown in FIG. 4, the coordinate of the top left vertex pixel point 1 in image B is the same as the coordinate of the top left vertex pixel point 1 in image B
Figure BDA0002203051700000091
The coordinates of the top right vertex pixel point 2 areThe coordinates of the lower left vertex pixel point 3 are
Figure BDA0002203051700000093
The coordinates of the lower right vertex pixel point 4 are
Figure BDA0002203051700000094
After the folding screen is folded (folding angle α), the image B 'of the image B in the user's positive viewing angle can be as shown in FIG. 4, i.e. pixel point 1BThe coordinates in image B' are
Figure BDA0002203051700000095
Pixel point 2BThe coordinates in image B' are
Figure BDA0002203051700000096
Pixel point 3BThe coordinates in image B' are
Figure BDA0002203051700000097
Pixel point 4BThe coordinates in image B' are
Figure BDA0002203051700000098
Figure BDA0002203051700000099
If let the transformation matrix of the first screen 1
Figure BDA00022030517000000910
Transformation matrix for second screen 2
Figure BDA00022030517000000911
The following system of equations can be obtained:
Figure BDA00022030517000000912
based on the obtained coordinates of the pixel points 1 to 4, M can be obtained by solving the equation setAAnd MBI.e. determining the value of MAAnd MB
After determining MAAnd MBThereafter, using MATransforming the coordinates of all pixel points in the image A to obtain an image A', and using MBAnd transforming the coordinates of all the pixel points in the image B to obtain an image B'. Further, the transformed image A 'and the transformed image B' are spliced left and right, and then the target screen capture image with the folding three-dimensional effect can be obtained.
It should be noted that the corresponding target plane in fig. 4 can be selected as the plane where the folding screen is located in the unfolded state. Although M is obtainedAAnd MBThe coordinates of the pixel points in the images a 'and B' are determined on the basis of the folding angle α, but it will be understood that the angle of deflection of the first screen 1 and the second screen 2 relative to the target plane is related to the folding angle α, i.e. the angle of deflection is 90 ° - α/2, and thus M is determined on the basis of the angle of deflection relative to the target planeAAnd MB
In the embodiment of the present invention, for a single screen, the transformation matrix between the first screenshot image and the second screenshot image of the screen is related to the deflection angle of the screen relative to the target plane and the viewing state of the user relative to the target plane, so to simplify the calculation process, when implementing the embodiment of the present invention, the transformation matrix corresponding to the first screenshot image of each screen may be determined according to the deflection angle of each screen relative to the target plane, the viewing angle and the viewing distance of the user relative to the target plane based on a preset corresponding relationship. Wherein the corresponding relation is as follows: the transformation matrix corresponds to the deflection angle and the viewing angle and viewing distance of the user relative to the target plane.
It should be noted that, in the preset corresponding relationship, the deflection angle may not be limited to a specific angle value, and may be selected as a certain angle range; the viewing angle may not be limited to a specific angle value, and may be selected to be a certain angle range; the viewing distance may not be limited to a specific distance value, and may be selected to be a certain distance range, so as to determine the corresponding transformation matrix by effectively using the preset corresponding relationship.
The above-described embodiments have been described taking the user viewing angle as a positive viewing angle as an example. However, when the viewing angle of the user is a side viewing angle, the image projection at the side viewing angle of the user may be deflected, so that the influence of the side viewing angle needs to be considered when determining the transformation matrix corresponding to the screen.
Optionally, when the viewing angle is a side viewing angle, the determining a transformation matrix corresponding to the first cut image of each screen according to the deflection angle of each screen relative to the target plane, and the viewing angle and the viewing distance of the user relative to the target plane may include:
determining a first transformation matrix corresponding to a first cut screen image of each screen under the condition of a normal viewing angle according to the deflection angle of each screen relative to the target plane and the viewing distance of a user relative to the target plane;
determining a corresponding perspective transformation matrix based on the posture angle information of the side view and the posture angle information of the positive view;
and processing the first transformation matrix corresponding to the first screenshot image of each screen by using the perspective transformation matrix to obtain the transformation matrix corresponding to the first screenshot image of each screen.
The attitude angle information of the positive viewing angle is, for example, yaw _0, pitch _0, roll _0, and the attitude angle information of the side viewing angle is, for example, yaw _1, pitch _1, roll _ 1. Understandably, the posture angle information is represented by the relation between the body coordinate system and the ground coordinate system. Where yaw is the rotation about the Y axis, also called the yaw angle; pitch is the rotation about the X axis, also called pitch angle; a roll is a rotation about the Z axis, also called the roll angle. By means of the posture angle information of the front view angle and the side view angle, the deflection condition of the user under the conditions of the front view angle and the side view angle can be deduced, namely, the corresponding perspective transformation matrix under the two conditions can be deduced.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a device for generating a screenshot image according to an embodiment of the present invention, where the generating device 50 is applied to an electronic device, and the electronic device is associated with at least two screens. As shown in fig. 5, the generating device 50 includes:
an acquiring module 51, configured to acquire a first screenshot image of each of the screens;
the determining module 52 is configured to determine a transformation mode corresponding to the first screenshot image of each screen according to a deflection state of each screen relative to the target plane and a viewing state of a user relative to the target plane;
the processing module 53 is configured to process the first screenshot image of each screen according to the conversion manner, so as to obtain a second screenshot image of each screen; wherein the second screen capture image is a screen capture image of each screen relative to the target plane at a user viewing perspective;
and the splicing module 54 is configured to splice the second screenshot images of each screen to obtain a target screenshot image with a folded stereoscopic effect.
In the embodiment of the invention, the target screen capture image with the folding three-dimensional effect can be obtained by obtaining the screen capture image of each screen relative to the target plane under the viewing angle of the user and splicing the screen capture images of each screen. Compared with the existing screen capture mode, the target screen capture image obtained by the embodiment of the invention can bring a folding visual effect to a user, and the user experience is improved.
Optionally, the determining module 52 is specifically configured to:
and determining a transformation matrix corresponding to the first cut screen image of each screen according to the deflection angle of each screen relative to the target plane and the viewing angle and the viewing distance of the user relative to the target plane.
Optionally, in a case that the viewing angle is a normal angle, the determining module 52 is specifically configured to:
for a first screen, performing the steps of:
determining first coordinates of at least four pixel points in a first screenshot image of the first screen;
respectively determining second coordinates of the at least four pixel points in a second screen capture image of the first screen according to the deflection angle of the first screen relative to the target plane and the viewing distance of a user relative to the target plane;
determining a transformation matrix corresponding to the first screenshot image of the first screen by using the first coordinates and the second coordinates of the at least four pixel points;
wherein the first screen is any one of the at least two screens.
Optionally, the first coordinate (x) of the pixel pointi,yi) And a second coordinate (x'i,y′i) The relationship with the transformation matrix M is:
M*[xi,yi,1]T=[x′i,y′i,1]T
wherein M is a 3 × 3 matrix; and i is a positive integer greater than 0 and represents the serial number of the pixel point.
Optionally, the processing module 53 is specifically configured to:
and transforming the coordinates of all pixel points in the first screenshot image of each screen by using the transformation matrix corresponding to the first screenshot image of each screen to obtain a second screenshot image of each screen.
Optionally, the determining module 52 is specifically configured to:
based on a preset corresponding relation, determining a transformation matrix corresponding to a first cut screen image of each screen according to a deflection angle of each screen relative to the target plane, and a viewing angle and a viewing distance of a user relative to the target plane;
wherein, the corresponding relation is as follows: the transformation matrix corresponds to the deflection angle and the viewing angle and viewing distance of the user relative to the target plane.
Optionally, in a case that the viewing angle is a side viewing angle, the determining module 52 includes:
a first determining unit, configured to determine, according to a deflection angle of each screen relative to the target plane and a viewing distance of a user relative to the target plane, a first transformation matrix corresponding to a first cut screen image of each screen in a front view;
a second determination unit, configured to determine a corresponding perspective transformation matrix based on the pose angle information of the side view and the pose angle information of the front view;
and the processing unit is used for processing the first transformation matrix corresponding to the first screenshot image of each screen by using the perspective transformation matrix to obtain the transformation matrix corresponding to the first screenshot image of each screen.
Optionally, the splicing module 54 may include:
a third determination unit configured to determine a positional relationship between the at least two screens;
and the splicing unit is used for splicing the second screen capture image of each screen according to the position relation between the at least two screens to obtain the target screen capture image.
In addition, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program that is stored in the memory and is executable on the processor, where the computer program, when executed by the processor, can implement each process of the above-mentioned screenshot image generation method embodiment, and can achieve the same technical effect, and is not described herein again to avoid repetition.
Specifically, referring to fig. 6, an embodiment of the present invention further provides an electronic device, which includes a bus 61, a transceiver 62, an antenna 63, a bus interface 64, a processor 65, and a memory 66.
In an embodiment of the invention, the electronic device may be associated with at least two screens. The electronic device further includes: a computer program stored on the memory 66 and executable on the processor 65. Optionally, the computer program may be adapted to implement the following steps when executed by the processor 65:
acquiring a first screen capture image of each of the screens;
determining a transformation mode corresponding to the first screen cut image of each screen according to the deflection state of each screen relative to a target plane and the watching state of a user relative to the target plane;
according to the conversion mode, the first screen capture image of each screen is processed respectively to obtain a second screen capture image of each screen; wherein the second screen capture image is a screen capture image of each screen relative to the target plane at a user viewing perspective;
and splicing the second screen capture images of each screen to obtain a target screen capture image with a folding three-dimensional effect.
It can be understood that, in the embodiment of the present invention, when being executed by the processor 65, the computer program can implement each process of the screenshot image generation method embodiment shown in fig. 3, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
In fig. 6, a bus architecture (represented by bus 61), bus 61 may include any number of interconnected buses and bridges, bus 61 linking together various circuits including one or more processors, represented by processor 65, and memory, represented by memory 66. The bus 61 may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface 64 provides an interface between the bus 61 and the transceiver 62. The transceiver 62 may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor 65 is transmitted over a wireless medium via the antenna 63, and further, the antenna 63 receives the data and transmits the data to the processor 65.
The processor 65 is responsible for managing the bus 61 and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the memory 66 may be used to store data used by the processor 65 in performing operations.
Alternatively, the processor 65 may be a CPU, ASIC, FPGA or CPLD.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned screenshot image generation method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
Computer-readable media, which include both non-transitory and non-transitory, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for generating a screen capture image, the method being applied to an electronic device, the electronic device being associated with at least two screens, the method comprising:
acquiring a first screen capture image of each of the screens;
determining a transformation mode corresponding to the first screen cut image of each screen according to the deflection state of each screen relative to a target plane and the watching state of a user relative to the target plane;
according to the conversion mode, the first screen capture image of each screen is processed respectively to obtain a second screen capture image of each screen; wherein the second screen capture image is a screen capture image of each screen relative to the target plane at a user viewing perspective;
and splicing the second screen capture images of each screen to obtain a target screen capture image with a folding three-dimensional effect.
2. The method of claim 1, wherein determining a corresponding transformation mode of the first screenshot image of each of the screens according to the deflection state of each of the screens relative to a target plane and the viewing state of a user relative to the target plane comprises:
and determining a transformation matrix corresponding to the first cut screen image of each screen according to the deflection angle of each screen relative to the target plane and the viewing angle and the viewing distance of the user relative to the target plane.
3. The method according to claim 2, wherein in the case that the viewing angle is a front angle, the determining a transformation matrix corresponding to the first cut screen image of each screen according to the deflection angle of each screen relative to the target plane, and the viewing angle and the viewing distance of the user relative to the target plane comprises:
for a first screen, performing the steps of:
determining first coordinates of at least four pixel points in a first screenshot image of the first screen;
respectively determining second coordinates of the at least four pixel points in a second screen capture image of the first screen according to the deflection angle of the first screen relative to the target plane and the viewing distance of a user relative to the target plane;
determining a transformation matrix corresponding to the first screenshot image of the first screen by using the first coordinates and the second coordinates of the at least four pixel points;
wherein the first screen is any one of the at least two screens.
4. The method of claim 3, wherein the first of the pixel points isA coordinate (x)i,yi) And a second coordinate (x'i,y′i) The relationship with the transformation matrix M is:
M*[xi,yi,1]T=[x′i,y′i,1]T
wherein M is a 3 × 3 matrix; and i is a positive integer greater than 0 and represents the serial number of the pixel point.
5. The method according to claim 3, wherein the processing the first screenshot image of each of the screens separately according to the transformation manner to obtain the second screenshot image of each of the screens comprises:
and transforming the coordinates of all pixel points in the first screenshot image of each screen by using the transformation matrix corresponding to the first screenshot image of each screen to obtain a second screenshot image of each screen.
6. The method of claim 2, wherein determining a transformation matrix corresponding to the first screen cut image for each of the screens according to the deflection angle of each of the screens relative to the target plane, and the viewing perspective and viewing distance of the user relative to the target plane comprises:
based on a preset corresponding relation, determining a transformation matrix corresponding to a first cut screen image of each screen according to a deflection angle of each screen relative to the target plane, and a viewing angle and a viewing distance of a user relative to the target plane;
wherein, the corresponding relation is as follows: the transformation matrix corresponds to the deflection angle and the viewing angle and viewing distance of the user relative to the target plane.
7. The method of claim 2, wherein in the case that the viewing perspective is a side viewing perspective, the determining a transformation matrix corresponding to the first screen cut image of each of the screens according to a deflection angle of each of the screens relative to the target plane, and a viewing perspective and a viewing distance of a user relative to the target plane comprises:
determining a first transformation matrix corresponding to a first cut screen image of each screen under the condition of a front view angle according to the deflection angle of each screen relative to the target plane and the viewing distance of a user relative to the target plane;
determining a corresponding perspective transformation matrix based on the posture angle information of the side view and the posture angle information of the positive view;
and processing the first transformation matrix corresponding to the first screenshot image of each screen by using the perspective transformation matrix to obtain the transformation matrix corresponding to the first screenshot image of each screen.
8. The method of claim 1, wherein the stitching the second screenshot images of each of the screens to obtain the target screenshot image with a folded stereoscopic effect comprises:
determining a positional relationship between the at least two screens;
and splicing the second screen capture image of each screen according to the position relation between the at least two screens to obtain the target screen capture image.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the computer program, when executed by the processor, implements the steps of the method of generating a screenshot image according to any of claims 1-8.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of generating a screen capture image according to any one of claims 1 to 8.
CN201910871813.0A 2019-09-16 2019-09-16 Screen capturing image generation method, electronic device and computer readable storage medium Active CN110727489B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910871813.0A CN110727489B (en) 2019-09-16 2019-09-16 Screen capturing image generation method, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910871813.0A CN110727489B (en) 2019-09-16 2019-09-16 Screen capturing image generation method, electronic device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110727489A true CN110727489A (en) 2020-01-24
CN110727489B CN110727489B (en) 2023-07-14

Family

ID=69218990

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910871813.0A Active CN110727489B (en) 2019-09-16 2019-09-16 Screen capturing image generation method, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110727489B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114417036A (en) * 2021-12-20 2022-04-29 联想(北京)有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
CN116048350A (en) * 2022-07-08 2023-05-02 荣耀终端有限公司 Screen capturing method and electronic equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107194907A (en) * 2017-05-24 2017-09-22 维沃移动通信有限公司 A kind of sectional drawing synthetic method and mobile terminal
CN107765952A (en) * 2017-11-07 2018-03-06 广东欧珀移动通信有限公司 Screenshotss method, apparatus and terminal
CN108540641A (en) * 2018-02-28 2018-09-14 努比亚技术有限公司 Combination picture acquisition methods, flexible screen terminal and computer readable storage medium
CN109189534A (en) * 2018-08-29 2019-01-11 维沃移动通信有限公司 A kind of screenshotss method and terminal device
CN109240577A (en) * 2018-09-25 2019-01-18 维沃移动通信有限公司 A kind of screenshotss method and terminal
CN109358793A (en) * 2018-09-27 2019-02-19 维沃移动通信有限公司 A kind of screenshotss method and mobile terminal
CN109407936A (en) * 2018-09-21 2019-03-01 Oppo(重庆)智能科技有限公司 Screenshot method and relevant apparatus
CN109542306A (en) * 2018-11-23 2019-03-29 维沃移动通信有限公司 A kind of screenshotss method and terminal device
CN109597556A (en) * 2018-12-12 2019-04-09 维沃移动通信有限公司 A kind of screenshotss method and terminal
CN109857306A (en) * 2018-12-27 2019-06-07 维沃移动通信有限公司 Screenshotss method and terminal device
CN110012154A (en) * 2019-02-22 2019-07-12 华为技术有限公司 A kind of control method and electronic equipment of the electronic equipment with Folding screen
CN110209326A (en) * 2019-05-08 2019-09-06 珠海格力电器股份有限公司 A kind of screenshot method, folds screen equipment and storage medium at device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107194907A (en) * 2017-05-24 2017-09-22 维沃移动通信有限公司 A kind of sectional drawing synthetic method and mobile terminal
CN107765952A (en) * 2017-11-07 2018-03-06 广东欧珀移动通信有限公司 Screenshotss method, apparatus and terminal
CN108540641A (en) * 2018-02-28 2018-09-14 努比亚技术有限公司 Combination picture acquisition methods, flexible screen terminal and computer readable storage medium
CN109189534A (en) * 2018-08-29 2019-01-11 维沃移动通信有限公司 A kind of screenshotss method and terminal device
CN109407936A (en) * 2018-09-21 2019-03-01 Oppo(重庆)智能科技有限公司 Screenshot method and relevant apparatus
CN109240577A (en) * 2018-09-25 2019-01-18 维沃移动通信有限公司 A kind of screenshotss method and terminal
CN109358793A (en) * 2018-09-27 2019-02-19 维沃移动通信有限公司 A kind of screenshotss method and mobile terminal
CN109542306A (en) * 2018-11-23 2019-03-29 维沃移动通信有限公司 A kind of screenshotss method and terminal device
CN109597556A (en) * 2018-12-12 2019-04-09 维沃移动通信有限公司 A kind of screenshotss method and terminal
CN109857306A (en) * 2018-12-27 2019-06-07 维沃移动通信有限公司 Screenshotss method and terminal device
CN110012154A (en) * 2019-02-22 2019-07-12 华为技术有限公司 A kind of control method and electronic equipment of the electronic equipment with Folding screen
CN110209326A (en) * 2019-05-08 2019-09-06 珠海格力电器股份有限公司 A kind of screenshot method, folds screen equipment and storage medium at device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114417036A (en) * 2021-12-20 2022-04-29 联想(北京)有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
CN116048350A (en) * 2022-07-08 2023-05-02 荣耀终端有限公司 Screen capturing method and electronic equipment
CN116048350B (en) * 2022-07-08 2023-09-08 荣耀终端有限公司 Screen capturing method and electronic equipment

Also Published As

Publication number Publication date
CN110727489B (en) 2023-07-14

Similar Documents

Publication Publication Date Title
US10176595B2 (en) Image processing apparatus having automatic compensation function for image obtained from camera, and method thereof
US10594941B2 (en) Method and device of image processing and camera
KR101692194B1 (en) Image capturing apparatus, image capture system, image processing method, information processing apparatus, and computer-readable storage medium
CN106846409B (en) Calibration method and device of fisheye camera
US20200366838A1 (en) Panoramic image generation method and device
US9030524B2 (en) Image generating apparatus, synthesis table generating apparatus, and computer readable storage medium
US9591280B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium
CN104813654A (en) Image correction system, image correction method, and computer program product
CN113256742B (en) Interface display method and device, electronic equipment and computer readable medium
US20130243351A1 (en) Methods and Apparatus for Interfacing Panoramic Image Stitching with Post-Processors
US11205281B2 (en) Method and device for image rectification
CN103020900B (en) Method and device for image processing
CN111402404B (en) Panorama complementing method and device, computer readable storage medium and electronic equipment
CN110727489B (en) Screen capturing image generation method, electronic device and computer readable storage medium
CN108933902A (en) Panoramic picture acquisition device builds drawing method and mobile robot
US20190149798A1 (en) Method and device for image rectification
US20140085303A1 (en) Splitting of elliptical images
US9319666B1 (en) Detecting control points for camera calibration
CN116128744A (en) Method for eliminating image distortion, electronic device, storage medium and vehicle
EP4283986A1 (en) Electronic apparatus and control method thereof
US20160253780A1 (en) Image processing apparatus, image processing method, and storage medium
WO2021149509A1 (en) Imaging device, imaging method, and program
CN103077518A (en) Method and device for self-calibrating camera based on circular points
CN113724141A (en) Image correction method and device and electronic equipment
US20210266456A1 (en) Image capture control method, image capture control device, and mobile platform

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