Signal source picture cutting method and device based on Android equipment and electronic equipment

By responding to cropping operations and defining graphic layer transformation parameters, creating a crop window to display the cropping screen of the signal source screen, solving the problems of poor touch sensitivity and low efficiency when cropping, and achieving more efficient cropping operations and user experience .

CN119414952AActive Publication Date: 2025-02-11ZEN-AI TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411394372.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-02-11
Estimated Expiration
2044-10-08

AI Technical Summary

Technical Problem

Existing Android devices have poor touch sensitivity and low trimming efficiency when cutting screen content, making it difficult to achieve real-time preview and dynamic changes.

Method used

By responding to the cropping operation, determine the crop data and define the transformation parameters of the graphics layer, create a crop window, determine the cropping screen from the signal source screen, and display it in the cropping window.

Benefits of technology

It improves the touch sensitivity of Android devices when cropping the signal source screen, and improves the cutting efficiency, achieving a better user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119414952A_ABST
    Figure CN119414952A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a signal source picture cutting method and device based on Android equipment and electronic equipment, and the method comprises the steps: determining cutting data corresponding to a cutting operation in response to the cutting operation of a signal source picture played in a signal source window; according to the cutting data, defining transformation parameters of a graphic layer, and according to the transformation parameters of the graphic layer, creating a first cutting window; according to the clipping data, determining a clipping picture located at a clipping position from a second signal source picture; and displaying the clipping picture in the first clipping window. Therefore, the touch sensitivity during clipping of the signal source picture based on the Android device can be improved, and the clipping efficiency of the picture content is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a signal source image cropping method, device and electronic device based on an Android device. Background Art

[0002] In the prior art, Android devices usually use XML (Extensible Markup Language) framework to realize page interaction. However, XML has problems such as lengthy and complex code, low development efficiency, poor code readability and maintainability, difficulty in realizing dynamic page changes and responses, separation from other programming language codes, and difficulty in real-time preview.

[0003] For example, Android devices can play screen content. To meet the user's need to play a part of a complete screen content, Android devices need to support the function of partially selecting screen content. Among them, the XML UI (User Interface) system framework set by Android devices has poor touch sensitivity. Once the user captures too fast on the screen, the selection box will be disconnected; memory consumption is large.

[0004] It can be seen that how to improve the touch sensitivity when cropping the screen content of the Android device and improve the efficiency of cropping the screen content is a technical issue worthy of attention. Summary of the invention

[0005] In view of this, in order to solve some or all of the above-mentioned technical problems, the embodiments of the present application provide a signal source screen cropping method, device and electronic device based on an Android device.

[0006] In a first aspect, an embodiment of the present application provides a signal source screen cropping method based on an Android device, the method comprising:

[0007] In response to a cropping operation on a signal source picture played in a signal source window, determining cropping data corresponding to the cropping operation;

[0008] Defining transformation parameters of the graphics layer according to the clipping data, and creating a first clipping window according to the transformation parameters of the graphics layer;

[0009] Determine a cropping picture located at a cropping position from the second signal source picture according to the cropping data;

[0010] The cropping picture is displayed in the first cropping window.

[0011] In a possible implementation, defining a transformation parameter of a graphics layer according to the clipping data, and creating a first clipping window according to the transformation parameter of the graphics layer includes:

[0012] Adding the clipped data to the field properties of the signal source window;

[0013] Using a screen layout modifier to define a graphic layer, obtaining the clipping data of the field attribute from the graphic layer, and obtaining a first starting point and a first ending point that are diagonally related to each other according to the clipping data and the original data of the signal source window;

[0014] A first diagonal line is constructed with the first starting point and the first ending point, and a first rectangle is drawn according to the first diagonal line, and the first rectangle is used as the first cropping window.

[0015] In a possible implementation, the method further includes:

[0016] A window object is created for the signal source window, and field attributes are set in the window object, wherein the field attributes include at least one of the following cropping data: a horizontal coordinate value of a cropping start point, a vertical coordinate value of a cropping start point, a horizontal outer border ratio of the screen, and a vertical outer border ratio of the screen.

[0017] In a possible implementation manner, determining the cropped picture located at the cropped position from the second signal source picture according to the cropped data includes:

[0018] According to the first starting point, obtaining the coordinates of the starting point of the cropped image;

[0019] According to the first cut-off point, obtaining the cut-off point coordinates of the cropped image;

[0020] According to the first rectangle, obtaining a cropping outer frame of the cropping picture;

[0021] The picture of the second signal source picture that starts from the starting point coordinates and ends at the ending point coordinates and is located within the cropping outer frame is determined as the cropping picture.

[0022] In a possible implementation, the method further includes:

[0023] Based on the first rectangle and the signal source window, the ratio of the horizontal outer border value of the signal source window to the horizontal outer border value of the first rectangle is calculated to obtain a horizontal magnification ratio value; the ratio of the vertical outer border value of the signal source window to the vertical outer border value of the first rectangle is calculated to obtain a vertical magnification ratio value;

[0024] Based on the horizontal enlargement ratio value, the second signal source picture is enlarged in the horizontal direction; based on the vertical enlargement ratio value, the second signal source picture is enlarged in the vertical direction.

[0025] In a possible implementation, the method further includes:

[0026] Acquire the center coordinates of the signal source window based on the signal source window, and acquire the center coordinates of the first rectangle based on the first rectangle;

[0027] Subtracting the central horizontal coordinate of the signal source window from the central horizontal coordinate of the first rectangle to obtain a horizontal difference, multiplying the horizontal difference by the horizontal magnification ratio to obtain a horizontal movement displacement, and moving the center point of the amplified second signal source image horizontally based on the horizontal movement displacement;

[0028] The central vertical coordinate of the signal source window is subtracted from the central vertical coordinate of the first rectangle to obtain a longitudinal difference, and the longitudinal difference is multiplied by the longitudinal magnification ratio value to obtain a longitudinal movement displacement. Based on the longitudinal movement displacement, the center point of the amplified second signal source image is moved vertically.

[0029] In a possible implementation, the method further includes:

[0030] In response to a second cropping operation on a second signal source picture played in the first cropping window, determining second cropping data corresponding to the second cropping operation;

[0031] defining a second transformation parameter of the graphics layer according to the second clipping data, and creating a second clipping window according to the second transformation parameter of the graphics layer;

[0032] Determine, according to the second cropping data, a second cropping picture located at a cropping position from a third signal source picture;

[0033] The second cropping picture is displayed in the second cropping window.

[0034] In a possible implementation, the method further includes:

[0035] In response to a third cropping operation on a signal source picture played by the signal source window and a second signal source picture played by the first cropping window and displayed at least partially superimposed therewith, determining third cropping data corresponding to the third cropping operation;

[0036] defining a third transformation parameter of the graphics layer according to the third clipping data, and creating a third clipping window according to the third transformation parameter of the graphics layer;

[0037] Determine, according to the third cropping data, a third cropping picture located at a cropping position from a fourth signal source picture;

[0038] The third cropping picture is displayed in the third cropping window.

[0039] In a possible implementation, the method further includes:

[0040] In response to the fourth cropping operations at multiple intervals on the signal source picture played in the signal source window, determining the fourth cropping data respectively corresponding to the fourth cropping operations at multiple intervals to obtain a fourth cropping data group;

[0041] According to the fourth cropping data group, defining a cropping number of graphic layers corresponding to the fourth cropping data group, defining a fourth transformation parameter corresponding to one fourth cropping data for each graphic layer, and creating a plurality of fourth cropping windows corresponding to the cropping number according to the fourth transformation parameter of each graphic layer;

[0042] Determining, according to the fourth cropping data group, each fourth cropping picture located at a cropping position from the fifth signal source picture;

[0043] The corresponding fourth cropping picture is displayed in each fourth cropping window.

[0044] In a possible implementation, the method further includes:

[0045] Adding a point event input modifier to respond to a touch operation on the screen of the Android device;

[0046] Call the drag gesture detection function of the pointer input scope;

[0047] Obtain the drag start parameter and the drag end parameter of the drag gesture detection function;

[0048] According to the drag start parameter, the drag start point coordinates are obtained, and the coordinates corresponding to the drag start point coordinates are used as the starting point coordinates of the cropping picture;

[0049] The dragging cutoff point coordinates are determined according to the dragging end parameters, and the coordinates corresponding to the dragging cutoff point coordinates are used as the cutoff point coordinates of the cropping picture.

[0050] In a possible implementation, the method further includes:

[0051] According to the positional relationship between the drag start point coordinates and the drag interception point coordinates, performing at least one corresponding coordinate adjustment process on the drag start point coordinates and the drag interception point coordinates;

[0052] The corresponding coordinate adjustment processing includes: keeping the coordinate value unchanged, cross-taking the coordinate value, and exchanging the coordinate value.

[0053] In a second aspect, an embodiment of the present application provides a signal source image cropping device based on an Android device, the device comprising:

[0054] A first determining unit, configured to determine, in response to a cropping operation on a signal source picture played in a signal source window, cropping data corresponding to the cropping operation;

[0055] A first creating unit, configured to define a transformation parameter of a graphics layer according to the clipping data, and to create a first clipping window according to the transformation parameter of the graphics layer;

[0056] A second determining unit, configured to determine a cropping picture located at a cropping position from a second signal source picture according to the cropping data;

[0057] The first display unit is used to display the cropping picture in the first cropping window.

[0058] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0059] Memory for storing computer programs;

[0060] The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the method of any embodiment of the signal source screen cropping method based on an Android device of the first aspect of the present application is implemented.

[0061] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method of any embodiment of the signal source screen cropping method based on an Android device according to the first aspect above is implemented.

[0062] The signal source screen cropping method based on an Android device provided in an embodiment of the present application can determine the cropping data corresponding to the cropping operation in response to the cropping operation of the signal source screen played in the signal source window; define the transformation parameters of the graphic layer according to the cropping data, and create a first cropping window according to the transformation parameters of the graphic layer; determine the cropping screen located at the cropping position from the second signal source screen according to the cropping data; and display the cropping screen in the first cropping window. In this way, the touch sensitivity when cropping the signal source screen based on the Android device can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0064] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0065] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0066] Figure 1 A schematic diagram of a flow chart of a signal source image cropping method based on an Android device provided in an embodiment of the present application;

[0067] Figure 2 A flowchart of another method for cropping a signal source image based on an Android device provided in an embodiment of the present application;

[0068] Figure 3A-3D A schematic diagram of an application scenario of another signal source image cropping method based on an Android device provided in an embodiment of the present application;

[0069] Figure 4 A schematic diagram of the structure of a signal source image cropping device based on an Android device provided in an embodiment of the present application;

[0070] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0071] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. It should be noted that unless otherwise specifically stated, the relative arrangement of the components and steps, the numerical expressions and the numerical values ​​described in these embodiments do not limit the scope of the present application.

[0072] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of the present application are only used to distinguish between different steps, devices, modules and other objects, and do not represent any specific technical meanings, nor do they indicate the logical order between them.

[0073] It should also be understood that in this embodiment, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.

[0074] It should also be understood that any component, data or structure mentioned in the embodiments of the present application can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.

[0075] In addition, the term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.

[0076] It should also be understood that the description of the various embodiments in this application focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.

[0077] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present application, its application, or uses.

[0078] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the above-mentioned technologies, methods, and equipment should be considered as part of the specification.

[0079] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0080] It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other. To facilitate the understanding of the embodiments of the present application, the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0081] In the present invention, the various directions mentioned in the text, such as up, down, left, right, upper left, lower left, upper right, and lower right, refer to the direction close to the top of the Android device as the reference when the Android device is erected on a plane and the content in the Android device is displayed normally; the direction close to the bottom of the Android device is the bottom; when the user faces the Android device, the direction on the left hand side of the user is the left; when the user faces the Android device, the direction on the right hand side of the user is the right; when the user faces the Android device, the direction on the left hand side of the user and close to the top of the Android device is the upper left, and the direction on the left hand side of the user and close to the bottom of the Android device is the lower left; when the user faces the Android device, the direction on the right hand side of the user and close to the top of the Android device is the upper right, and the direction on the right hand side of the user and close to the bottom of the Android device is the lower right. Horizontal, lateral, etc. refer to the direction parallel to the horizontal plane based on the placement of the Android device erected on a plane and displayed normally. Vertical, longitudinal, etc. refer to the direction perpendicular to the horizontal plane based on the placement of the Android device erected on a plane and displayed normally.

[0082] In order to solve the technical problems in the prior art of improving the touch sensitivity when cropping the screen content of an Android device and improving the cropping efficiency of the screen content, the present application provides a signal source screen cropping method, device and electronic device based on an Android device, which can improve the touch sensitivity when cropping the screen content of an Android device and improve the cropping efficiency of the screen content.

[0083] Figure 1 A flow chart of a signal source screen cropping method based on an Android device provided in an embodiment of the present application. This method can be applied to one or more electronic devices such as smart phones, laptops, desktop computers, portable computers, servers, etc. In addition, the execution subject of this method can be hardware or software. When the above-mentioned execution subject is hardware, the execution subject can be one or more of the above-mentioned electronic devices. For example, a single electronic device can execute this method, or multiple electronic devices can cooperate with each other to execute this method. When the above-mentioned execution subject is software, this method can be implemented as multiple software or software modules, or as a single software or software module. It is not specifically limited here.

[0084] In one implementation of the present application, the screen content of the Android device may be a signal source screen, a local photo of the device, a local video of the device, a local file of the device, etc. The following takes the Android device playing the signal source screen as an example to elaborate. Figure 1 As shown, the method specifically includes:

[0085] Step 101: In response to a cropping operation on a signal source picture played in a signal source window, determine cropping data corresponding to the cropping operation.

[0086] In this embodiment, the signal source window may be a window for playing the signal source picture.

[0087] The signal source screen may be image content displayed on a signal source side device, for example, the image content may be a photo, a video, a document, and the like.

[0088] In practice, the signal source end (i.e., the device on the signal source side) can be used to provide the signal source signal, and the acquisition device in communication connection with the signal source end will acquire the signal source signal and encode it to obtain an encoded video stream, and then transmit the encoded video stream to the display control end (e.g., Android device) for displaying and controlling the signal source screen. After the display control end decodes the received encoded video stream to obtain the signal source screen, the signal source screen can be rendered and drawn, so as to display the signal source screen on the display control end.

[0089] Here, the number of signal source pictures displayed on the same screen on the Android device can be one or at least two. Each signal source picture can be correspondingly set in a signal source window. A combination of multiple signal source pictures can be correspondingly set in the same signal source window.

[0090] It should be noted that the technical solution of the present invention is particularly suitable for application scenarios in which there are multiple signal source windows in the display interface of an Android device. Each signal source window will be used to display a signal source screen, which can be a video, a picture, a recording, etc. The signal source screen is the content obtained by the Android device from other terminals. The function of the signal source window is to achieve visual separation and operational separation of different signal source screens. If there is no signal source window, the boundaries of each signal source screen in the display interface of the Android device are unclear, which will make it impossible for the user to perform effective multi-window operations.

[0091] The cropping operation can be used to crop the signal source screen. In practice, the cropping operation can be triggered by triggering a preset shortcut key (such as "Alt+a", etc.); or, after triggering a preset key, the cropping operation is triggered. In addition, the cropping operation can also be performed by inputting the cropping position.

[0092] Typically, after a cropping operation is triggered (the left mouse button is pressed), the cropping operation can be performed by dragging the mouse and releasing the mouse after dragging to the desired position. Alternatively, after a cropping operation is triggered (a finger / stylus clicks on the display), the cropping operation can be performed by moving the finger / stylus and releasing the finger / stylus after moving to the desired position.

[0093] The user can perform one or more cropping operations on the signal source picture played in the cropping window. The cropping window can represent a portion of the signal source window that is cropped by the cropping operation instruction. For example, the shape of the cropping window can be a rectangle, a triangle, etc.

[0094] The cropping data may be data generated by performing a cropping operation. As an example, the cropping data may include a cropping position.

[0095] The cropping position may represent the relative position between the cropping window and the signal source window. The cropping position may include at least one of the following: the displacement between the center position of the cropping window and the center position of the signal source window, the distance between the two vertices on the diagonal line of the cropping window and the border of the signal source window, etc.

[0096] In practice, whether a cropping operation is detected can be determined by detecting a mouse event or a gesture event.

[0097] Taking gesture events as an example, you can add the Modifier.pointerInput modifier (point event input modifier) ​​to the signal source window, manage screen touch gestures, call the PointerInputScope.detectDragGestures function (detect drag gesture function) of the pointer input scope to monitor specific gesture events, perform specific collection work, and thus determine whether the cropping operation is performed. In the Android system, you can detect drag gestures by implementing the View.OnTouchListener interface.

[0098] Among them, the Modifier.pointerInput modifier is a modifier used in the composable interface (Compose component) to handle pointer input (such as touch, mouse, etc.). It provides a convenient way to listen to and respond to pointer events, such as clicks, long presses, drags, etc.

[0099] For example, you can use the Modifier.pointerInput modifier by following the steps below:

[0100] 1. Create one or more pointer event listeners: Use the extension methods of the Modifier.pointerInput modifier, such as detectTapGestures, detectDragGestures, detectHorizontalDragGestures, detectVerticalDragGestures, etc., to define the pointer event types to be monitored and the corresponding callback functions.

[0101] 2. Handle pointer events: In the callback function, write the logic for handling pointer events. For example, in the callback of a click event, you can perform corresponding operations, such as updating the status, triggering animation, etc.

[0102] 3. Apply modifiers: Apply the Modifier.pointerInput modifier to the Composable element that you want to listen to pointer events.

[0103] Step 102: defining transformation parameters of a graphics layer according to the clipping data, and creating a first clipping window according to the transformation parameters of the graphics layer.

[0104] In this embodiment, the graphic layer may be a specific layer or area used to present visual elements such as graphics and images during the display or processing of a signal source image.

[0105] The transformation parameters may be data of the first cropping window obtained based on calculation of the cropping data. As an example, the transformation parameters may include the position, height, width, etc. of the first cropping window.

[0106] The first clipping window may be a clipping window created according to the transformation parameters of the graphics layer.

[0107] The first cropping window can be independent of the signal source window, that is, the first cropping window and the signal source window are arranged alternately; or, the first cropping window can also be superimposed on the signal source window, that is, the picture content displayed in the first cropping window covers the signal source picture located in the superimposition area of ​​the signal source window, and only the picture content displayed in the first cropping window is displayed in the superimposition area.

[0108] Step 103: Determine a cropping picture located at a cropping position from the second signal source picture according to the cropping data.

[0109] The signal source window and the first cropping window form their own layers respectively, and the two layers coexist without interfering with each other. Correspondingly, the signal source window obtains the display screen of the device through the signal source side device, and the first cropping window also obtains the display screen of the device through the signal source side device. Here and below, the signal source screen, the second signal source screen, the third signal source screen, the fourth signal source screen, and the fifth signal source screen represent the screen contents obtained from the signal source side device separately in batches, and the screen contents of each signal source screen can be the same (derived from the same signal source side device) or completely different (derived from different signal source side devices). In this embodiment, the cropping screen can correspond to the sub-screen of the signal source screen, for example, the cropping screen is a partial screen corresponding to the signal source screen corresponding to the cropping position indicated by the cropping data. Here, after determining the cropping position, the screen in the area covered by the above-mentioned cropping position in the second signal source screen can be used as the cropping screen.

[0110] Step 104: display the cropping image in the first cropping window.

[0111] In this embodiment, after the cropping picture is determined, the cropping picture can be displayed in the first cropping window. Specifically, the cropping picture can be displayed in the first cropping window arranged at intervals from the signal source window, or in the first cropping window arranged superimposed on the signal source window.

[0112] The signal source screen cropping method based on an Android device provided in the embodiment of the present application uses an Android device with a UI system framework of Compose to partially crop the signal source screen, thereby improving the touch sensitivity when cropping the signal source screen based on the Android device and improving the cropping efficiency of the signal source screen.

[0113] As an example, the Modifier.graphicsLayer modifier (screen layout modifier) ​​can be used to display the cropped screen in the first cropping window. Specifically, the reduction ratio of the first cropping window and the displacement of the first cropping window are sent as parameters to the Modifier.graphicsLayer modifier (screen layout). Among them, the Modifier.graphicsLayer modifier is a modifier in the Compose framework, which is used to set and control the graphics layer of the Composable element. It provides a convenient way to apply various graphic effects, such as reduction, rotation, transparency, shadow, and cropping.

[0114] Here are the general steps for using the Modifier.graphicsLayer modifier:

[0115] Create one or more graphics layer effects: You can use the parameters of the Modifier.graphicsLayer modifier to set various effects, such as scaleX, scaleY, translationX, translationY, etc.

[0116] Apply a graphics layer effect to a Composable element: Apply the Modifier.graphicsLayer modifier to the Composable element to which you want to add the graphics layer effect.

[0117] Combining multiple graphics layer effects: You can achieve more complex graphics transformations and effects by nesting multiple graphics layer effects in Modifier.graphicsLayer.

[0118] By using the Modifier.graphicsLayer modifier, you can easily achieve various graphics effects without directly manipulating the underlying graphics drawing code. This makes graphics customization and animation in Compose easier and more intuitive.

[0119] It should be noted that the transition from the signal source window to the first cropping window is just an intermediate key (transition) from the original (state) signal source screen to the intercepted state signal source screen, and the function of the first cropping window is only to send an interception signal to the program. The first cropping window is formed by intercepting in the signal source window, and the display size of the first cropping window must be smaller than the display size of the signal source window. The first cropping window initially obtains the complete signal source screen (the second signal source screen) from the signal source side device. In order to display the entire signal source screen in the first cropping window, the signal source screen (the second signal source screen) displayed in the first cropping window will be reduced as a whole relative to the signal source screen displayed in the signal source window. In order to achieve "displaying the signal source screen in the first cropping window (i.e., the partial signal source screen of the original signal source screen) in the same proportion as the signal source screen displayed in the signal source window", it is necessary to adjust (for example, enlarge) the display ratio of the initial signal source streaming media (i.e., the signal source screen) in the first cropping window to achieve this. That is, in order to display the signal source screen in the first cropping window in the same proportion as the signal source screen displayed in the signal source window, it is necessary to adjust and enlarge the initial display size of the signal source screen obtained in the first cropping window.

[0120] Adjusting the second signal source image requires the following two steps.

[0121] The first step is to calculate the ratio of the horizontal outer border value of the signal source window to the horizontal outer border value of the first rectangle based on the first rectangle and the signal source window to obtain a horizontal magnification ratio value; calculate the ratio of the vertical outer border value of the signal source window to the vertical outer border value of the first rectangle to obtain a vertical magnification ratio value. Based on the horizontal magnification ratio value, the second signal source screen is magnified horizontally; based on the vertical magnification ratio value, the second signal source screen is magnified vertically.

[0122] In some cases of the above application scenarios, the scaleX parameter and scaleY parameter of the Modifier.graphicsLayer modifier are used to adjust the display ratio of the second signal source screen. Specifically, the scaleX parameter indicates the horizontal magnification ratio of the signal source window relative to the first cropping window, which is also equal to the horizontal magnification ratio of the second signal source screen, scaleX = horizontal outer border value of the signal source window / horizontal outer border value of the first cropping window; the scaleY parameter indicates the vertical magnification ratio of the signal source window relative to the first cropping window, which is also equal to the vertical magnification ratio of the second signal source screen, scaleY = vertical outer border value of the signal source window / vertical outer border value of the first cropping window. After the second signal source screen is magnified horizontally and vertically, it will be proportional to the signal source screen of the signal source window.

[0123] In the second step, the center coordinates of the signal source window are obtained based on the signal source window, and the center coordinates of the first rectangle are obtained based on the first rectangle. The horizontal coordinates of the center of the signal source window are subtracted from the horizontal coordinates of the center of the first rectangle to obtain a horizontal difference, and the horizontal difference is multiplied by the horizontal magnification ratio to obtain a horizontal movement displacement. Based on the horizontal movement displacement, the center point of the second signal source image after the amplification processing is moved horizontally. The vertical coordinates of the center of the signal source window are subtracted from the vertical coordinates of the center of the first rectangle to obtain a vertical difference, and the vertical difference is multiplied by the vertical magnification ratio to obtain a vertical movement displacement. Based on the vertical movement displacement, the center point of the second signal source image after the amplification processing is moved vertically.

[0124] In some cases of the above application scenarios, the translationX parameter and translationY parameter of the Modifier.graphicsLayer modifier are used to adjust the coordinate position of the center point of the second signal source screen. Specifically, the translationX parameter represents the lateral movement displacement of the center point of the signal source window relative to the center point of the first cropping window, translationX = the horizontal coordinate value of the center point of the signal source window - the horizontal coordinate value of the center point of the first cropping window. The translationY parameter represents the longitudinal movement displacement of the center point of the signal source window relative to the center point of the first cropping window, translationY = the vertical coordinate value of the center point of the signal source window - the vertical coordinate value of the center point of the first cropping window. The value obtained by multiplying translationX by scaleX is used as the lateral movement distance of the center point of the second signal source screen; the value obtained by multiplying translationY by scaleY is used as the vertical movement distance of the center point of the second signal source screen.

[0125] Exemplarily, taking the case where the entire signal source window is located in the first quadrant of the coordinate system, and the lower left corner vertex of the signal source window is located at the origin of the coordinate system, if the value of translationX multiplied by scaleX is a negative number, and the value of translationY multiplied by scaleY is a negative number, it means that the center point of the second signal source screen is located on the upper right side of the center point of the signal source screen, then the center point of the second signal source screen needs to be moved to the lower left side, specifically, move to the left by the value of translationX multiplied by scaleX, and move downward by the value of translationY multiplied by scaleY, so as to move to coincide with the coordinate position of the center point of the signal source screen. If the value of translationX multiplied by scaleX is a negative number, and the value of translationY multiplied by scaleY is a positive number, it means that the center point of the second signal source screen is located on the lower right side of the center point of the signal source screen, then the center point of the second signal source screen needs to be moved to the upper left side, specifically, move to the left by the value of translationX multiplied by scaleX, and move upward by the value of translationY multiplied by scaleY, so as to coincide with the coordinate position of the center point of the signal source screen. If the value of translationX multiplied by scaleX is a positive number, and the value of translationY multiplied by scaleY is a negative number, indicating that the center point of the second signal source screen is located on the upper left side of the center point of the signal source screen, the center point of the second signal source screen needs to be moved to the lower right side, specifically, to the right by the value of translationX multiplied by scaleX, and to the downward by the value of translationY multiplied by scaleY, so as to coincide with the coordinate position of the center point of the signal source screen. If the value of translationX multiplied by scaleX is a positive number, and the value of translationY multiplied by scaleY is a positive number, indicating that the center point of the second signal source screen is located on the lower left side of the center point of the signal source screen, the center point of the second signal source screen needs to be moved to the upper right side, specifically, to the right by the value of translationX multiplied by scaleX, and to the upward by the value of translationY multiplied by scaleY, so as to coincide with the coordinate position of the center point of the signal source screen.

[0126] In this technical solution, since there may be multiple first cropping windows, the reduction ratio of each first cropping window may be different, so the magnification ratio of the second signal source image and the moved pixels are different. The calculated moving distance is designed according to the reduction ratio to avoid errors.

[0127] After the above two steps, the screen content captured by the user will be displayed in the first cropping window, and the display ratio of the screen content is consistent with the display ratio of the signal source screen in the signal source window. It should be noted that the signal source screen content outside the border of the first cropping window layer will be cropped and removed, or placed at the bottom layer, or set to a transparent color, so that only the signal source screen content within the circled range of the first cropping window is visible to the user. The Modifier.graphicsLayer is used to display the cropped screen solution, and the complete signal source screen of the signal source side device is encoded and decoded, without changing the underlying encoding and decoding logic. For example, the resolution of the signal source screen is 1080P. Regardless of whether the cropping process is performed, the codec always outputs the signal source screen according to this size. The Modifier.graphicsLayer modifier is to enlarge and shift the signal source screen, and will not interfere with the original data of the signal source side device. Therefore, the signal source screen will not be blurred or deformed due to the cropping operation. The processing response of the cropping operation is fast, and the displayed screen is clear. From the user's naked eye perspective, it seems like the local content is directly captured from the signal source image, which provides a good user experience.

[0128] In some optional implementations of this embodiment, the following method may be adopted to define the transformation parameters of the graphics layer according to the clipping data, and to create the first clipping window according to the transformation parameters of the graphics layer:

[0129] The first step is to add the clipping data to the field properties of the signal source window.

[0130] The field properties of the signal source window are used to save the corresponding cropping data when the signal source window is cropped.

[0131] Specifically, a window object (kotlin, development language) is created for the signal source window, and a field attribute (field) is set in the window object. The field attribute may include (save) at least one of the following cropping data: the horizontal coordinate value of the cropping starting point, the vertical coordinate value of the cropping starting point, the horizontal outer frame ratio of the picture, and the vertical outer frame ratio of the picture. Among them, the horizontal coordinate value of the cropping starting point may be the horizontal coordinate of the vertex of the upper left corner of the first cropping window, or the horizontal relative position of the starting point of the first cropping window and the starting point of the signal source window. The vertical coordinate value of the cropping starting point may be the vertical coordinate of the vertex of the upper left corner of the first cropping window, or the vertical relative position of the starting point of the first cropping window and the starting point of the signal source window. The horizontal outer frame ratio of the picture may represent the ratio of the horizontal outer frame of the first cropping window to the horizontal outer frame of the signal source window. The vertical outer frame ratio of the picture may represent the ratio of the vertical outer frame of the first cropping window to the vertical outer frame of the signal source window.

[0132] In the second step, a graphic layer is defined by using a screen layout modifier, the graphic layer obtains the cropping data of the field attribute, and a first starting point and a first ending point that are diagonally related to each other are obtained according to the cropping data and the original data of the signal source window.

[0133] Among them, the screen layout modifier is a tool or attribute used to adjust the screen layout, which can affect the position, size, alignment, spacing and other aspects of each element in the screen.

[0134] The first starting point may represent a starting point of a cropping operation performed in the cropping data.

[0135] The first cutoff point may represent a termination point of a cropping operation performed in the cropped data.

[0136] In the third step, a first diagonal line is constructed with the first starting point and the first end point, and a first rectangle is drawn according to the first diagonal line, and the first rectangle is used as the first cropping window.

[0137] The first diagonal line may be a diagonal line from the first starting point to the first ending point.

[0138] The first rectangle may be a rectangle formed by drawing based on the first diagonal line.

[0139] It can be understood that in the above optional implementation, since the first cropping window is determined by the screen layout modifier, the encoding and decoding logic of the signal source video stream will not be changed.

[0140] In some application scenarios of the above optional implementations, the following method may be adopted to determine the cropped picture located at the cropped position from the second signal source picture according to the cropped data:

[0141] The first step is to obtain the coordinates of the starting point of the cropped image according to the first starting point.

[0142] Here, the coordinates of the top left corner of the first cropping window in a preset coordinate system may be determined as the coordinates of the starting point of the cropping image.

[0143] The second step is to obtain the coordinates of the cutoff point of the cropped image according to the first cutoff point.

[0144] Here, the coordinates of the vertex of the lower right corner of the first cropping window in the preset coordinate system may be determined as the coordinates of the cutoff point of the cropping picture.

[0145] The third step is to obtain a cropping outer frame of the cropping image according to the first rectangle.

[0146] Here, for example, the first rectangle may be used as the cropping outer frame of the cropping picture.

[0147] In the fourth step, the picture of the second signal source picture, which starts from the starting point coordinates and ends at the ending point coordinates and is located within the cropping outer frame, is determined as the cropping picture.

[0148] It can be understood that in the above application scenario, the cropped image can be determined more accurately through the first starting point, the first ending point and the first rectangle.

[0149] In some cases of the above application scenarios, the following steps may also be performed:

[0150] The first step is to determine second cropping data corresponding to the second cropping operation in response to a second cropping operation on the second signal source picture played in the first cropping window.

[0151] The second cropping operation may be used to crop the second signal source picture played in the first cropping window.

[0152] The second cropping data may be data generated by performing the second cropping operation. As an example, the second cropping data may include a cropping position indicated by the second cropping operation.

[0153] The second step is to define second transformation parameters of the graphics layer according to the second clipping data, and to create a second clipping window according to the second transformation parameters of the graphics layer.

[0154] A graphics layer may be a specific level or area used to present visual elements such as graphics and images during the display or processing of a signal source image.

[0155] The second transformation parameter may be data of the second cropping window obtained based on calculation of the second cropping data. As an example, the second transformation parameter may include the position, height, width, etc. of the second cropping window.

[0156] The second cropping window may be a cropping window created according to the second transformation parameters.

[0157] The clipping position may represent the relative position between the second clipping window and the signal source window (each clipping is calculated based on the relevant data of the signal source window). The clipping position may include at least one of the following: the displacement between the center position of the second clipping window and the center position of the signal source window, the distance between the two vertices of the diagonal line of the second clipping window and the border of the signal source window, etc.

[0158] In practice, whether a cropping operation is detected can be determined by detecting a mouse event or a gesture event.

[0159] The second cropping window may be independent of the first cropping window, or the second cropping window may be superimposed on the first cropping window.

[0160] The third step is to determine a second cropping picture located at a cropping position from the third signal source picture according to the second cropping data.

[0161] Here, after the cropping position is determined, the picture in the area covered by the cropping position in the picture of the third signal source may be used as the second cropping picture.

[0162] The fourth step is to display the second cropping picture in the second cropping window.

[0163] After determining the second cropping picture, the second cropping picture may be displayed in the second cropping window. Specifically, the second cropping picture may be displayed in a second cropping window spaced apart from the first cropping window, or in a second cropping window superimposed on the first cropping window.

[0164] Here, the specific method of displaying the second cropped picture can refer to the method of displaying the cropped picture, which will not be described in detail here.

[0165] It can be understood that in the above situation, the cropped picture obtained by cropping can be cropped again, thereby realizing multiple nested cropping of the signal source picture.

[0166] In an implementation manner of the present application, the starting point coordinates and the ending point coordinates of the second cropping window are calculated based on numerical values ​​such as the width and height of the first cropping window and the width and height of the signal source window.

[0167] The x coordinate of the starting point of the second cropping window = the x coordinate of the upper left corner of the second cropping window relative to the first cropping window / the signal source window width × the first cropping window width + the x coordinate of the upper left corner of the first cropping window relative to the signal source window.

[0168] The y coordinate of the starting point of the second cropping window = the y coordinate of the upper left corner of the second cropping window relative to the first cropping window / the height of the signal source window × the height of the first cropping window + the y coordinate of the upper left corner of the first cropping window relative to the signal source window.

[0169] It should be noted that the second cropping window is expressed relative to the first cropping window, and the values ​​of the second cropping window are determined based on the center of the first cropping window being located at the quadrant origin; the first cropping window is expressed relative to the signal source window, and the values ​​of the first cropping window are determined based on the center of the signal source window being located at the quadrant origin. Through the above calculation formula, the values ​​of the second cropping window relative to the signal source window are obtained.

[0170] The calculation formula of the width and height of the second cropping window is related to the values ​​of the signal source window and the first cropping window.

[0171] The width of the second cropping window = the width of the second cropping window relative to the first cropping window / the width of the signal source window × the width of the first cropping window relative to the signal source window.

[0172] The height of the second clipping window = the height of the second clipping window relative to the first clipping window / the height of the signal source window × the height of the first clipping window relative to the signal source window.

[0173] For example, the values ​​are as follows:

[0174] The width of the signal source window is 1000 pixels and the height is 800 pixels (the units below are all pixels).

[0175] The starting point coordinates of the second cropping window relative to the first cropping window are (100, 100), the width of the second cropping window relative to the first cropping window is 300 pixels, and the height of the second cropping window relative to the first cropping window is 200 pixels;

[0176] The starting point coordinates of the first cropping window relative to the signal source window are (200, 200), the width of the first cropping window relative to the signal source window is 500 pixels, and the height of the first cropping window relative to the signal source window is 400 pixels;

[0177] The x coordinate of the starting point of the second clipping window = 100 ÷ 1000 × 500 + 200 = 250;

[0178] The y coordinate of the starting point of the second clipping window = 100 ÷ 800 × 400 + 200 = 250;

[0179] The width of the second cropping window = 300 ÷ 1000 × 500 = 150;

[0180] The height of the second cropping window = 200 ÷ 800 × 400 = 100;

[0181] The starting coordinates of the second cropping window (relative to the signal source window) are (250, 250), the width of the second cropping window relative to the signal source window is 150 pixels, and the height of the second cropping window relative to the signal source window is 100 pixels.

[0182] In some cases of the above application scenarios, the following steps may also be performed:

[0183] The first step is to determine third cropping data corresponding to the third cropping operation in response to a third cropping operation on a signal source picture played by the signal source window and a second signal source picture played by the first cropping window which is at least partially overlapped and displayed.

[0184] The third cropping data may be data generated by performing the third cropping operation. As an example, the third cropping data may include a cropping position indicated by the third cropping operation.

[0185] The second step is to define a third transformation parameter of the graphics layer according to the third clipping data, and to create a third clipping window according to the third transformation parameter of the graphics layer.

[0186] Among them, the graphic layer can be a specific level or area used to present visual elements such as graphics and images during the display or processing of the signal source picture.

[0187] The third transformation parameter may be data of the third cropping window obtained based on calculation of the third cropping data. As an example, the third transformation parameter may include the position, height, width, etc. of the third cropping window.

[0188] The third cropping window may be a cropping window created according to the third transformation parameters.

[0189] The third step is to determine the third cropping picture located at the cropping position from the fourth signal source picture according to the third cropping data.

[0190] Here, after the cropping position is determined, the picture in the area covered by the cropping position in the fourth signal source picture can be used as the third cropping picture.

[0191] The fourth step is to display the third cropping picture in the third cropping window.

[0192] After determining the third cropping picture, the third cropping picture can be displayed in the third cropping window. Specifically, the third cropping picture can be displayed in the third cropping window that is separated from the first cropping window and the signal source window, or in the third cropping window that is superimposed on the first cropping window and the signal source window.

[0193] Here, the specific method of displaying the third cropping picture can refer to the method of displaying the cropping picture, which will not be described in detail here.

[0194] In an embodiment of the present application, after receiving the third cropping operation, it is determined whether the position of the third starting point (e.g., the top left corner vertex of the third cropping window) and the position of the third end point (e.g., the bottom right corner vertex of the third cropping window) of the third cropping window formed by the triggering cropping operation are located in the same layer. If the position of the third starting point and the position of the third end point are located in the same layer, the signal source screen of the layer is used as the target content of the interception operation. If the position of the third starting point and the position of the third end point are not located in the same layer, the signal source screen of the layer where the third starting point is located can be used as the target content of the interception operation; the signal source screen of the layer where the third end point is located can also be used as the target content of the interception operation; the signal source screen of the layer where the third starting point is located and the signal source screen of the layer where the third end point is located (dual signal source screens) can also be used as the target content of the interception operation.

[0195] Taking the case where the first cropping window is smaller than the signal source window and is displayed superimposed on the signal source window, the third starting point of the third cropping window is located in the signal source window, the third end point of the third cropping window is located in the first cropping window, and the signal source screen played in the signal source window where the third starting point is located is used as the target content of the capture operation, the user starts the cropping operation in the signal source window, the third starting point of the cropping operation is located on the signal source screen of the signal source window, and ends the cropping operation in the first cropping window, the third end point of the cropping operation is located on the second signal source screen of the first cropping window. The third end point is then transparently transmitted from the first cropping window to the signal source window located at the bottom of the first cropping window, and then the coordinate point (third end point) is located at the position of the signal source window, and then the signal source screen played in the signal source window is collected from the corresponding signal source device side to obtain the fourth signal source screen, and after the fourth signal source screen is enlarged and moved, the third cropped screen captured by the above process is displayed in the third cropping window. Through the technical solution of the present application, the user does not need to display the signal source screen to be captured (for example, moving, deleting, or placing other superimposed windows at the bottom), but only needs to clearly define the target content to be captured. Even if the content at the top layer is captured and framed, the screen content at the bottom layer of the above-mentioned top layer can still be displayed in the cropping window. The operation is simple and the user experience is good.

[0196] In the above situation, the signal source picture played by the signal source window and the second signal source picture played by the first cropping window at least partially superimposed and displayed therewith can be cropped again, thereby realizing cropping of the superimposed display picture.

[0197] Figure 2A flowchart of another method for cutting a signal source image based on an Android device provided in an embodiment of the present application. Figure 2 As shown, in some cases of the above application scenarios, the following steps may also be performed:

[0198] Step 201, in response to a plurality of fourth cropping operations at intervals on a signal source picture played in the signal source window, determining fourth cropping data respectively corresponding to the fourth cropping operations at intervals, to obtain a fourth cropping data group;

[0199] Step 202, defining a number of graphic layers corresponding to the fourth cropping data group according to the fourth cropping data group, defining a fourth transformation parameter corresponding to one fourth cropping data for each graphic layer, and creating a number of fourth cropping windows corresponding to the cropping number according to the fourth transformation parameter of each graphic layer;

[0200] Step 203, determining each fourth cropping picture located at a cropping position from the fifth signal source picture according to the fourth cropping data group;

[0201] Step 204: Display the corresponding fourth cropping picture in each fourth cropping window.

[0202] In this embodiment, the user can perform cropping operations on multiple locations of the signal source screen in the same batch, wherein the corresponding fourth cropping windows formed by the cropping operations at various locations are spaced apart and the selected contents of each frame do not intersect with each other. In this case, it is only necessary to collect the fifth signal source screen of the signal source side device once, perform the amplification and movement processing of the fifth signal source screen in the same logic as the above, and perform the screen content selection operation on each corresponding fourth cropping window on the processed fifth signal source screen to display the corresponding fourth cropping screen in multiple fourth cropping windows.

[0203] It should be noted that the control instructions for the signal source screen displayed by the Android device (such as opening a document, playing a video) will execute the operation corresponding to the control instruction on the signal source side device. However, the cropping instructions input to the Android device will only crop the screen displayed by the Android device, and will not crop the signal source screen of the signal source side device, that is, the encoding and decoding logic of the signal source screen of the signal source side device will not be changed.

[0204] In some optional implementations of this embodiment, the following steps may also be performed:

[0205] The first step is to add a point event input modifier to respond to a touch operation on the screen of the Android device;

[0206] The second step is to call the drag gesture detection function of the pointer input scope;

[0207] The third step is to obtain the drag start parameter and the drag end parameter of the drag gesture detection function;

[0208] Step 4, obtaining the drag start point coordinates according to the drag start parameters, and using the coordinates corresponding to the drag start point coordinates as the starting point coordinates of the cropping image;

[0209] The fifth step is to determine the dragging cutoff point coordinates according to the dragging end parameters, and use the coordinates corresponding to the dragging cutoff point coordinates as the cutoff point coordinates of the cropping image.

[0210] Specifically, taking gesture events as an example, you can add the Modifier.pointerInput modifier (point event input modifier) ​​to the signal source window, manage screen touch gestures (respond to touch operations on the screen of the Android device), call the PointerInputScope.detectDragGestures function (detect drag gesture function) of the pointer input scope to monitor specific gesture events, perform specific collection work, and thereby determine whether the cropping operation is performed.

[0211] In this application, the drag start parameter (onDragStart) and the drag end parameter (onDragEnd) can be obtained through the PointerInputScope.detectDragGestures function. Specifically, the drag operation (i.e., the clipping operation) can be performed and the data can be recorded as follows:

[0212] ① onDragStart (gesture start): Use your finger / stylus to click a certain location on the screen, and record the coordinates of that location as the coordinates of the dragging starting point (upper left corner vertex) of the selection box (cropping window);

[0213] ②onDrag (gesture movement): Move your finger / stylus pen to move the selected point of the selection box (cropping window) to the desired position of the screen content, update the coordinates in real time with the obtained position of the selected point, and record the latest updated coordinates of the selected point (after this update, no other updated coordinate information is obtained) as the coordinates of the end point (bottom right corner vertex) of the selection box;

[0214] ③onDragEnd (gesture ends): lift your finger / stylus and stop recording, which means that this gesture event group ends.

[0215] According to the drag start parameter, the drag start coordinates (upper left vertex coordinates) are obtained, and the coordinates corresponding to the drag start coordinates are used as the starting point coordinates of the cropping screen; according to the drag end parameter, it indicates that the touch selection box ends, and the end coordinates of the selection box are determined as the drag interception point coordinates (lower right vertex coordinates), and the coordinates corresponding to the drag interception point coordinates are used as the cutoff point coordinates of the cropping screen. The line connecting the upper left vertex and the lower right vertex is used as the diagonal line of the selection box, and the size of the rectangular selection box is determined according to the diagonal line.

[0216] It can be understood that in the above optional implementation, after the cropping window is displayed, the cropping window can be dragged to another location for display.

[0217] In some examples of the above situations, at least one corresponding coordinate adjustment process may be performed on the drag start point coordinates and the drag intercept point coordinates according to the positional relationship between the drag start point coordinates and the drag intercept point coordinates.

[0218] The corresponding coordinate adjustment processing includes: keeping the coordinate value unchanged, taking cross coordinate values, and exchanging coordinate values.

[0219] After the selection box is completed, the start and end points determined above are the initial forms. The end point is relative to the above start point, and the end point may be in any quadrant of the start point. Taking the 'diagonal line drawn from the upper left to the lower right to determine the selection box' as an example, the start and end points of the initial form need to be adjusted according to the specific quadrant situation. The following is an example of the start point being regarded as the origin of the quadrant.

[0220] Specifically, when the position relationship indicates that the end point is in the fourth quadrant relative to the starting point (that is, the drag starting point coordinates and the drag interception point coordinates present an upper left and lower right position relationship), that is, when the gesture moves to the lower right, the drag starting point coordinates are used as the starting point coordinates of the cropped screen; the drag interception point coordinates are used as the end point coordinates of the cropped screen, that is, the drag starting point coordinates and the drag interception point coordinates remain unchanged (the coordinate values ​​remain unchanged).

[0221] When the position relationship indicates that the end point is in the third quadrant relative to the starting point (that is, the drag starting point coordinates and the drag interception point coordinates present an upper right and lower left position relationship), that is, when the gesture moves to the lower left, the 'x coordinate in the drag interception point coordinates and the y coordinate in the drag starting point coordinates' are used as the starting point coordinates of the cropped screen; the 'x coordinate in the drag starting point coordinates and the y coordinate in the drag interception point coordinates' are used as the end point coordinates of the cropped screen, that is, the cross-value adjustment processing of the coordinate values ​​is performed.

[0222] When the position relationship indicates that the end point is in the second quadrant relative to the starting point (that is, the dragging starting point coordinates and the dragging interception point coordinates present a lower right and upper left position relationship), that is, when the gesture moves to the upper left, the dragging starting point coordinates are used as the end point coordinates of the cropped screen; the dragging interception point coordinates are used as the starting point coordinates of the cropped screen, that is, the coordinate value exchange adjustment processing is performed.

[0223] When the position relationship indicates that the end point is in the first quadrant relative to the starting point (that is, the drag starting point coordinates and the drag interception point coordinates present a lower left and upper right position relationship), that is, when the gesture moves to the upper right, the 'x coordinate in the drag starting point coordinates and the y coordinate in the drag interception point coordinates' are used as the starting point coordinates of the cropped screen; the 'x coordinate in the drag interception point coordinates and the y coordinate in the drag starting point coordinates' are used as the end point coordinates of the cropped screen, that is, the cross-value adjustment processing of the coordinate values ​​is performed.

[0224] It can be understood that in the above example, according to the positional relationship between the drag starting point coordinates and the drag interception point coordinates, performing at least one corresponding coordinate adjustment process on the drag starting point coordinates and the drag interception point coordinates can further improve the cropping accuracy of the signal source screen of the Android device.

[0225] In the related art, multiple signal source images can be displayed and played using an Android device. In order to meet the user's demand for playing a partial signal source image in a complete signal source image, the Android device needs to support the function of partially selecting the signal source image of the Android device, that is, signal source image cropping. In the prior art, an Android device may be provided with an XML UI system framework, or a Compose UI system framework. Among them, for the XML UI system framework, the cost of partially selecting the signal source image is high; the touch sensitivity is poor, and once the capture is particularly fast, the selection box will be disconnected; the API design is not good, and when moving, only the coordinate value relative to the screen is returned, and the difference before and after the movement is not returned. The difference before and after the movement needs to be further converted, which consumes memory. As for the Compose UI system framework, there is basically no solution on the market that supports partial selection of the signal source image.

[0226] This technical solution is designed and developed for Android devices based on the Compose UI system framework.

[0227] See also Figure 3A-3D , Figure 3A-3D A schematic diagram of an application scenario of another signal source image cropping method based on an Android device provided in an embodiment of the present application.

[0228] like Figure 3AAs shown, a page can display multiple (two in the figure) signal source pictures. Each signal source picture is displayed in a signal source window. Thus, a cropping operation can be performed on any signal source picture.

[0229] For example, in Figure 3B In the embodiment, cropping operations are performed on four different signal source images respectively, and the cropping operation performed on each signal source image can obtain a different cropped image.

[0230] exist Figure 3C In the embodiment, a cropping operation can be performed on the signal source picture to obtain a cropped picture of the signal source picture. Furthermore, a cropping operation can be performed again on the cropped picture to obtain a cropped picture of the cropped picture.

[0231] exist Figure 3D In the process, a cropping operation may be further performed on the cropping screen of the cropping screen.

[0232] Figure 4 A schematic diagram of the structure of a signal source image cropping device based on an Android device provided in an embodiment of the present application. Specifically comprising:

[0233] A first determining unit 401 is used to determine the cropping data corresponding to the cropping operation in response to the cropping operation on the signal source picture played in the signal source window;

[0234] A first creating unit 402, configured to define a transformation parameter of a graphics layer according to the clipping data, and create a first clipping window according to the transformation parameter of the graphics layer;

[0235] A second determining unit 403 is used to determine a cropping picture located at a cropping position from the second signal source picture according to the cropping data;

[0236] The first display unit 404 is configured to display the cropping image in the first cropping window.

[0237] The signal source image cropping device based on the Android device provided in this embodiment can be as follows Figure 4 The signal source screen cropping device based on the Android device shown in can execute all the steps of the signal source screen cropping methods based on the Android device described above, and thus achieve the technical effects of the signal source screen cropping methods based on the Android device described above. For details, please refer to the above related description. For the sake of brevity, it will not be repeated here.

[0238] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, Figure 5The electronic device 500 shown includes: at least one processor 501, a memory 502, at least one network interface 504 and other user interfaces 503. The various components in the electronic device 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 505 is not shown in FIG. Figure 5 Various buses are labeled as bus system 505 .

[0239] The user interface 503 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).

[0240] It can be understood that the memory 502 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0241] In some implementations, the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and an application program 5022 .

[0242] Among them, the operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 5022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present application can be included in the application 5022.

[0243] In this embodiment, by calling a program or instruction stored in the memory 502, specifically, a program or instruction stored in the application 5022, the processor 501 is used to execute the method steps provided by each method embodiment.

[0244] The method disclosed in the above embodiment of the present application can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 501. The above processor 501 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.

[0245] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the above functions of the present application, or a combination thereof.

[0246] For software implementation, the technology described above in this article can be implemented by a unit that performs the functions described above in this article. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0247] The electronic device provided in this embodiment may be Figure 5 The electronic device shown in can execute all the steps of the above-mentioned signal source screen cropping methods based on Android devices, and thus achieve the technical effects of the above-mentioned signal source screen cropping methods based on Android devices. Please refer to the above related description for details. For the sake of brevity, it will not be repeated here.

[0248] The embodiment of the present application also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.

[0249] When one or more programs in the storage medium can be executed by one or more processors, the signal source screen cropping method based on the Android device executed on the electronic device side can be implemented.

[0250] The above-mentioned processor is used to execute the signal source screen cropping program based on the Android device stored in the memory to implement the following steps of the signal source screen cropping method based on the Android device executed on the electronic device side.

[0251] The professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0252] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0253] It should be understood that the terms used in the text are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used in the text may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described in the text are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0254] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A signal source image cropping method based on an Android device, characterized in that: The method comprises: In response to a cropping operation on a signal source picture played in a signal source window, determining cropping data corresponding to the cropping operation; Defining transformation parameters of the graphics layer according to the clipping data, and creating a first clipping window according to the transformation parameters of the graphics layer; Determine a cropping picture located at a cropping position from the second signal source picture according to the cropping data; The cropping picture is displayed in the first cropping window.

2. The method according to claim 1, characterized in that The step of defining transformation parameters of a graphics layer according to the clipping data, and creating a first clipping window according to the transformation parameters of the graphics layer includes: Adding the clipped data to the field properties of the signal source window; Using a screen layout modifier to define a graphic layer, obtaining the clipping data of the field attribute from the graphic layer, and obtaining a first starting point and a first ending point that are diagonally related to each other according to the clipping data and the original data of the signal source window; A first diagonal line is constructed with the first starting point and the first ending point, and a first rectangle is drawn according to the first diagonal line, and the first rectangle is used as the first cropping window.

3. The method according to claim 2, characterized in that The method further comprises: A window object is created for the signal source window, and field attributes are set in the window object, wherein the field attributes include at least one of the following cropping data: a horizontal coordinate value of a cropping start point, a vertical coordinate value of a cropping start point, a horizontal outer border ratio of the screen, and a vertical outer border ratio of the screen.

4. The method according to claim 2, characterized in that: The step of determining a cropped picture located at a cropped position from the second signal source picture according to the cropped data comprises: According to the first starting point, obtaining the coordinates of the starting point of the cropped image; According to the first cut-off point, obtaining the cut-off point coordinates of the cropped image; According to the first rectangle, obtaining a cropping outer frame of the cropping picture; The picture of the second signal source picture that starts from the starting point coordinates and ends at the ending point coordinates and is located within the cropping outer frame is determined as the cropping picture.

5. The method according to claim 3, characterized in that: The method further comprises: Based on the first rectangle and the signal source window, the ratio of the horizontal outer border value of the signal source window to the horizontal outer border value of the first rectangle is calculated to obtain a horizontal magnification ratio value; the ratio of the vertical outer border value of the signal source window to the vertical outer border value of the first rectangle is calculated to obtain a vertical magnification ratio value; Based on the horizontal enlargement ratio value, the second signal source picture is enlarged in the horizontal direction; based on the vertical enlargement ratio value, the second signal source picture is enlarged in the vertical direction.

6. The method according to claim 5, characterized in that The method further comprises: Acquire the center coordinates of the signal source window based on the signal source window, and acquire the center coordinates of the first rectangle based on the first rectangle; Subtracting the central horizontal coordinate of the signal source window from the central horizontal coordinate of the first rectangle to obtain a horizontal difference, multiplying the horizontal difference by the horizontal magnification ratio to obtain a horizontal movement displacement, and moving the center point of the amplified second signal source image horizontally based on the horizontal movement displacement; The central vertical coordinate of the signal source window is subtracted from the central vertical coordinate of the first rectangle to obtain a longitudinal difference, and the longitudinal difference is multiplied by the longitudinal magnification ratio value to obtain a longitudinal movement displacement. Based on the longitudinal movement displacement, the center point of the amplified second signal source image is moved vertically.

7. The method according to claim 4, characterized in that The method further comprises: In response to a second cropping operation on a second signal source picture played in the first cropping window, determining second cropping data corresponding to the second cropping operation; defining a second transformation parameter of the graphics layer according to the second clipping data, and creating a second clipping window according to the second transformation parameter of the graphics layer; Determine, according to the second cropping data, a second cropping picture located at a cropping position from a third signal source picture; The second cropping picture is displayed in the second cropping window.

8. The method according to claim 4, characterized in that The method further comprises: In response to a third cropping operation on a signal source picture played by the signal source window and a second signal source picture played by the first cropping window and displayed at least partially superimposed therewith, determining third cropping data corresponding to the third cropping operation; defining a third transformation parameter of the graphics layer according to the third clipping data, and creating a third clipping window according to the third transformation parameter of the graphics layer; Determine, according to the third cropping data, a third cropping picture located at a cropping position from a fourth signal source picture; The third cropping picture is displayed in the third cropping window.

9. The method according to claim 1, characterized in that: The method further comprises: In response to the fourth cropping operations at multiple intervals on the signal source picture played in the signal source window, determining the fourth cropping data respectively corresponding to the fourth cropping operations at multiple intervals to obtain a fourth cropping data group; According to the fourth cropping data group, defining a cropping number of graphic layers corresponding to the fourth cropping data group, defining a fourth transformation parameter corresponding to one fourth cropping data for each graphic layer, and creating a plurality of fourth cropping windows corresponding to the cropping number according to the fourth transformation parameter of each graphic layer; Determining, according to the fourth cropping data group, each fourth cropping picture located at a cropping position from the fifth signal source picture; The corresponding fourth cropping picture is displayed in each fourth cropping window.

10. The method according to claim 4, characterized in that The method further comprises: Adding a point event input modifier to respond to a touch operation on the screen of the Android device; Call the drag gesture detection function of the pointer input scope; Obtain the drag start parameter and the drag end parameter of the drag gesture detection function; According to the drag start parameter, the drag start point coordinates are obtained, and the coordinates corresponding to the drag start point coordinates are used as the starting point coordinates of the cropping picture; The dragging cutoff point coordinates are determined according to the dragging end parameters, and the coordinates corresponding to the dragging cutoff point coordinates are used as the cutoff point coordinates of the cropping picture.

11. The method according to claim 10, characterized in that The method further comprises: According to the positional relationship between the drag start point coordinates and the drag interception point coordinates, performing at least one corresponding coordinate adjustment process on the drag start point coordinates and the drag interception point coordinates; The corresponding coordinate adjustment processing includes: keeping the coordinate value unchanged, cross-taking the coordinate value, and exchanging the coordinate value.

12. A signal source image cropping device based on an Android device, characterized in that: The device comprises: A first determining unit, configured to determine, in response to a cropping operation on a signal source picture played in a signal source window, cropping data corresponding to the cropping operation; A first creating unit, configured to define a transformation parameter of a graphics layer according to the clipping data, and to create a first clipping window according to the transformation parameter of the graphics layer; A second determining unit, configured to determine a cropping picture located at a cropping position from a second signal source picture according to the cropping data; The first display unit is used to display the cropping picture in the first cropping window.

13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program stored in the memory, and when the computer program is executed, the signal source screen cropping method based on the Android device of any one of claims 1 to 11 is implemented.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the signal source screen cropping method based on the Android device of any one of claims 1-11 is implemented.

Citation Information

Patent Citations

  • Processing panoramic pictures

    CN104335243A

  • Video processing method and electronic equipment

    CN116095249A

  • Video processing method, dynamic wallpaper setting method and equipment

    CN116132736A

  • Providing User Interfaces and Window Previews for Hosted Applications

    US20120084713A1

  • Display And Image Processing Method

    US20220014709A1