View preview method, device and storage medium
By calculating and minimizing the difference between screen dimensions and supported preview modes, the method ensures proper image scaling and alignment, improving user comfort and ASR recognition during video recording and communication.
Patent Information
- Application Number
- CN202110943889.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-17
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2041-08-17
AI Technical Summary
During the video recording process, the mismatch between the screen size and preview mode of the terminal device leads to poor recording effect, low ASR recognition rate and low preview screen comfort.
By calculating the screen size of the terminal device and the size deviation values of the multiple preview modes supported by the terminal device, the preview mode that best matches the screen is determined to ensure the appropriate image proportions and avoid deterioration in recording effects and reduced ASR recognition rate caused by the device being distant.
It improves the recording effect, ASR recognition rate and preview screen comfort, solving the problems of poor recording effect, low ASR recognition rate and inappropriate preview screen.
Smart Images

Figure CN115914825B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of mobile intelligent terminals, and particularly to a view preview method, device, and storage medium. Background Art
[0002] With the progress of technology, current terminal devices can perform video recording or remote video communication. During the recording process, users need to preview their own images on the screen of the terminal device. When the full screen is displayed and the image ratio is appropriate, the user experience is good. Since there are a rich variety of Android models, parameters such as screen size, width-to-height ratio, preview sizes supported by the system, and screen density vary widely among different models and there is no unified standard. If a fixed preview size is used for image preview display, the following situations may occur: (1) The image shows an overly large ratio on the screen; (2) The picture is horizontally compressed and the figure becomes thinner; (3) The picture is vertically compressed and the figure becomes fatter.
[0003] Moreover, during the dual-recording process, users will hold the terminal device farther away due to the overly large head image, thereby reducing the ratio of the head image on the screen, resulting in a poor recording effect and a reduced ASR recognition rate (ASR stands for automatic speech recognition. When the terminal device is too far away from the person, the sound collection is affected, leading to a reduced speech recognition rate). In addition, when the user's image display screen is vertically compressed or stretched, it will cause visual discomfort to the user.
[0004] Regarding the technical problems of poor recording effect, low ASR recognition rate, and low comfort level of the preview screen existing in the above-mentioned prior art during the dual-recording process, no effective solution has been proposed yet. Summary of the Invention
[0005] Embodiments of the present application provide a view preview method, device, and storage medium to at least solve the technical problems of poor recording effect, low ASR recognition rate, and low comfort level of the preview screen existing in the prior art during the dual-recording process.
[0006] According to one aspect of the embodiments of the present application, a view preview method is provided, including: obtaining the screen size of the screen of the terminal device, where the screen size includes the width value, height value, and width-to-height ratio of the screen; obtaining the preview sizes of multiple preview modes supported by the terminal device, where the preview sizes include the width values, height values, and width-to-height ratios respectively corresponding to the multiple preview modes; determining a first deviation value between the width-to-height ratios of the multiple preview modes and the width-to-height ratio of the screen; determining a second deviation value between the width values of the multiple preview modes and the width value of the screen; and determining a preview mode that matches the screen according to the first deviation value and the second deviation value.
[0007] According to another aspect of the embodiments of the present application, there is also provided a storage medium, which includes a stored program, wherein the above-mentioned method according to any one of the above is executed by a processor when the program runs.
[0008] According to another aspect of the embodiments of the present application, there is also provided a view preview device, including: a first acquisition module, configured to acquire the screen size of the screen of the terminal device, where the screen size includes the width value, height value, and width-to-height ratio of the screen; a second acquisition module, configured to acquire the preview sizes of a plurality of preview modes supported by the terminal device, where the preview sizes include the width values, height values, and width-to-height ratios respectively corresponding to the plurality of preview modes; a first determination module, configured to determine a first deviation value between the width-to-height ratios of the plurality of preview modes and the width-to-height ratio of the screen; a second determination module, configured to determine a second deviation value between the width values of the plurality of preview modes and the width value of the screen; and a third determination module, configured to determine a preview mode matching the screen according to the first deviation value and the second deviation value.
[0009] According to another aspect of the embodiments of the present application, there is also provided a view preview device, including: a processor; and a memory, connected to the processor, for providing instructions for the processor to perform the following processing steps: acquiring the screen size of the screen of the terminal device, where the screen size includes the width value, height value, and width-to-height ratio of the screen; acquiring the preview sizes of a plurality of preview modes supported by the terminal device, where the preview sizes include the width values, height values, and width-to-height ratios respectively corresponding to the plurality of preview modes; determining a first deviation value between the width-to-height ratios of the plurality of preview modes and the width-to-height ratio of the screen; determining a second deviation value between the width values of the plurality of preview modes and the width value of the screen; and determining a preview mode matching the screen according to the first deviation value and the second deviation value.
[0010] In the embodiments of the present application, the computing device calculates a first deviation value and a second deviation value by using the screen size of the terminal device and the preview sizes of multiple preview modes supported by the terminal device, and then determines the preview mode that matches the screen. In this way, according to the first deviation value, the ratio closest to the screen size of the terminal device is found among all preview modes. According to the second deviation value, the width value closest to the screen size of the terminal device is found among all preview modes. Thus, the preview mode most suitable for the screen size of the terminal device is screened out, so that the visual experience of the image during preview is good, and the user's image display screen will not be vertically compressed or stretched, improving user comfort. And the user does not need to move the terminal device far away to obtain a suitable avatar ratio on the screen, avoiding problems such as poor recording effect and reduced ASR recognition rate caused by the terminal device being too far away from the user. Therefore, the technical solution of the present application achieves good recording effect, high ASR recognition rate and high comfort of the display screen, and further solves the technical problems of poor recording effect, low ASR recognition rate and low comfort of the preview screen in the prior art during dual recording. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments and descriptions thereof of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:
[0012] Figure 1 is a hardware structure block diagram of a computing device for implementing the method described in Embodiment 1 of the present application;
[0013] Figure 2 is a flowchart of a view preview method according to the first aspect of Embodiment 1 of the present application;
[0014] Figure 3 is a schematic diagram of an enlarged preview size according to the first aspect of Embodiment 1 of the present application;
[0015] Figure 4 is a schematic diagram of a view preview device according to Embodiment 2 of the present application; and
[0016] Figure 5 is a schematic diagram of a view preview device according to Embodiment 3 of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0017] To enable those skilled in the art to better understand the technical solutions of this application, the following will clearly and completely describe the technical solutions in the embodiments of this application in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative work shall fall within the scope of protection of this application.
[0018] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of this application described here can be implemented in an order different from those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0019] Embodiment 1
[0020] According to this embodiment, a method embodiment for view preview is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from here.
[0021] The method embodiment provided by this embodiment can be executed in a mobile terminal, a computer terminal, a server or a similar computing device. Figure 1 A hardware structure block diagram of a computing device for implementing the view preview method is shown. As Figure 1 shown, the computing device may include one or more processors (the processor may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory for storing data, and a transmission device for communication functions. In addition to this, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports in the I / O interface), a network interface, a power supply, and / or a camera. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned electronic device. For example, the computing device may also include more or fewer components than Figure 1 shown, or have the same asFigure 1 The different configurations shown.
[0022] It should be noted that one or more of the above-mentioned processors and / or other data processing circuits can generally be referred to as "data processing circuits" herein. The data processing circuit can be embodied in software, hardware, firmware, or any combination thereof, in whole or in part. In addition, the data processing circuit can be a single independent processing module, or incorporated in whole or in part into any one of other elements in the computing device. As involved in the embodiments of the present application, the data processing circuit is a kind of processor control (such as the selection of a variable resistance terminal path connected to an interface).
[0023] The memory can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the view preview method in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implements the view preview method of the above-mentioned application program. The memory can include high-speed random access memory, and can also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory can further include a memory remotely located relative to the processor, and these remote memories can be connected to the computing device through a network. Examples of the above network include but are not limited to the Internet, intranet, local area network, mobile communication network, and combinations thereof.
[0024] The transmission device is used to receive or send data via a network. Specific examples of the above network can include the wireless network provided by the communication provider of the computing device. In one instance, the transmission device includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0025] The display can be, for example, a touch-screen liquid crystal display (LCD), which enables the user to interact with the user interface of the computing device.
[0026] It should be noted here that in some alternative embodiments, the above Figure 1 shown computing device can include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware elements and software elements. It should be pointed out that Figure 1 is only an example of a specific specific instance, and is intended to show the types of components that can exist in the above computing device.
[0027] Under the above operating environment, according to the first aspect of this embodiment, a view preview method is provided. Figure 2 The flowchart of the method is shown. Refer to Figure 2 As shown, the method includes:
[0028] S202: Obtain the screen size of the screen of the terminal device, where the screen size includes the width value, height value, and width-to-height ratio of the screen;
[0029] S204: Obtain the preview sizes of multiple preview modes supported by the terminal device, where the preview sizes include the width values, height values, and width-to-height ratios corresponding to the multiple preview modes respectively;
[0030] S206: Determine the first deviation value between the width-to-height ratios of the multiple preview modes and the width-to-height ratio of the screen;
[0031] S208: Determine the second deviation value between the width values of the multiple preview modes and the width value of the screen; and
[0032] S210: Determine the preview mode that matches the screen according to the first deviation value and the second deviation value.
[0033] Specifically, when the user is recording a video, the computing device first obtains the screen size of the screen of the terminal device. For example, the width value in the screen size is 1080, the height value is 1972, and the width-to-height ratio is 0.5477 (S202). The terminal device supports multiple preview modes, and each preview mode has a corresponding preview size. The computing device will obtain the preview sizes of the above multiple preview modes. For example, the preview size of preview mode 1 is: width value is 3000, height value is 4000, and width-to-height ratio is 0.75. The preview size of preview mode 2 is: width value is 2256, height value is 4000, and width-to-height ratio is 0.264. The preview size of preview mode 3 is: width value is 1080, height value is 1920, and width-to-height ratio is 0.5625. The preview size of preview mode 4 is: width value is 720, height value is 1280, and width-to-height ratio is 0.5625. The preview size of preview mode 5 is: width value is 540, height value is 960, and width-to-height ratio is 0.5625. The preview size of preview mode 6 is: width value is 360, height value is 640, and width-to-height ratio is 0.5625 (S204).
[0034] Further, after the computing device obtains the aspect ratio of the screen size of the terminal device and the aspect ratios of multiple preview modes, it will calculate the aspect ratios of the multiple preview modes respectively with the aspect ratio of the screen size of the terminal device. For example, the computing device calculates the aspect ratio 0.75 of preview mode 1 with the aspect ratio 0.5477 of the screen size of the terminal device to obtain a calculation result. Then it calculates the aspect ratio 0.264 of preview mode 2 with the aspect ratio 0.5477 of the screen size of the terminal device to obtain a calculation result, and so on, until the aspect ratios of all preview modes and the aspect ratio of the screen size of the terminal device are calculated. After that, the computing device obtains the first deviation value according to the calculation results (S206).
[0035] Further, after the computing device obtains the width value of the screen size of the terminal device and the width values of multiple preview modes, it will calculate the width values of the multiple preview modes respectively with the width value of the screen size of the terminal device. For example, the computing device calculates the width value 3000 of preview mode 1 with the width value 1080 of the screen size of the terminal device to obtain a calculation result. Then it calculates the width value 2256 of preview mode 2 with the width value 1080 of the screen size of the terminal device to obtain a calculation result, and so on, until the width values of all preview modes and the width value of the screen size of the terminal device are calculated. After that, the computing device obtains the second deviation value through the calculation results (S208).
[0036] Further, the computing device determines the preview mode that matches the screen according to the first deviation value and the second deviation value (S210).
[0037] As described in the background art, with the progress of technology, currently terminal devices can perform video recording or remote video communication. During the recording process, the user needs to preview their own image on the terminal device screen. When it is full-screen display and the image ratio is appropriate, the user experience is good. Since there are a large number of Android models, the parameters such as screen size, aspect ratio, preview size supported by the system, and screen density between different models are diverse and there is no unified standard. If a fixed preview size is used for image preview display, the following situations will occur: (1) The image shows an excessive ratio on the screen; (2) The picture is horizontally compressed and the figure becomes thinner; (3) The picture is vertically compressed and the figure becomes fatter.
[0038] And during the dual-recording process, the user will move the terminal device farther away due to the overly large avatar, so as to reduce the ratio of the avatar on the screen, resulting in a poor recording effect and a reduced ASR recognition rate (ASR is speech recognition. When the terminal device is too far away from the person, the sound collection is affected, resulting in a reduced speech recognition rate). And when the user's image display screen is vertically compressed or stretched, it will cause visual discomfort to the user.
[0039] In view of the above technical problems, through the technical solution of the embodiment of the present application, the computing device calculates a first deviation value and a second deviation value by using the screen size of the terminal device and the preview sizes of multiple preview modes supported by the terminal device, and then determines the preview mode that matches the screen. In this way, according to the first deviation value, the ratio closest to the screen size of the terminal device is found among all preview modes. According to the second deviation value, the width value closest to the screen size of the terminal device is found among all preview modes. Thus, the preview mode most suitable for the screen size of the terminal device is selected, so that the visual experience of the image during preview is good, and the user's image display screen will not be vertically compressed or stretched, improving user comfort. And the user does not need to hold the terminal device farther away to obtain a suitable avatar ratio on the screen, avoiding problems such as poor recording effect and reduced ASR recognition rate caused by the terminal device being too far away from the user. Therefore, the technical solution of the present application achieves good recording effect, high ASR recognition rate and high display screen comfort, and further solves the technical problems of poor recording effect, low ASR recognition rate and low preview screen comfort in the prior art during dual recording.
[0040] Optionally, the operation of determining the first deviation value between the aspect ratio of multiple preview modes and the aspect ratio of the screen includes: performing a subtraction operation on the aspect ratio of each preview mode and the aspect ratio of the screen respectively, and calculating the absolute value of the subtraction result to obtain the first deviation value.
[0041] Specifically, after the computing device obtains the aspect ratio of the terminal device screen size and the aspect ratios of multiple preview modes, it will perform a subtraction operation on the aspect ratios of all preview modes (i.e., preview modes 1 to 6) and the aspect ratio of the screen respectively. For example, the aspect ratio of preview mode 1 is 0.75, and the aspect ratio of the screen is 0.5477. Then the computing device subtracts the aspect ratio of the screen 0.5477 from the aspect ratio of preview mode 1 0.75, and the subtraction result is 0.2023 (i.e., 0.75 - 0.5477 = 0.2023). Then the computing device calculates the absolute value of the subtraction result 0.2023, and the absolute value result is 0.2023, which is used as the first deviation value. The other preview modes (i.e., preview modes 2 to 6) are calculated in the same way, and the obtained first deviation values are: the first deviation value corresponding to preview mode 2 is 0.0163, the first deviation value corresponding to preview mode 3 is 0.0148, the first deviation value corresponding to preview mode 4 is 0.0148, the first deviation value corresponding to preview mode 5 is 0.0148, and the first deviation value corresponding to preview mode 6 is 0.0148.
[0042] Therefore, by calculating the absolute value of the difference between the aspect ratio of the preview mode and the aspect ratio of the screen, the present technical solution can find the ratio closest to the screen size of the terminal device among all preview modes. When the absolute value approaches 0, it means that the preview size of the preview mode is closer to the screen size of the terminal device, and the enlarged image of the preview size fits the screen size better. Thus, the enlarged image will be exactly in the screen of the terminal device at an appropriate ratio, improving the user's visual comfort.
[0043] Optionally, the operation of determining the second deviation value between the width values of multiple preview modes and the width value of the screen includes: respectively determining whether the width values of multiple preview modes are greater than the width value of the screen; and in the case where the width values of multiple preview modes are greater than the width value of the screen, calculating the ratio of the width values of multiple preview modes to the width value of the screen to obtain the second deviation value, or in the case where the width values of multiple preview modes are not greater than the width value of the screen, calculating the ratio of the width value of the screen to the width values of multiple preview modes to obtain the second deviation value.
[0044] Specifically, after the computing device obtains the width value of the terminal device screen size and the width values of multiple preview modes, it will calculate the second deviation value between the width values of all preview modes (i.e., preview modes 1 to 6) and the width value of the screen. For example, the width value of preview mode 1 is 3000, and the width value of the screen is 1080. The computing device determines whether the width value of preview mode 1 is greater than the width value of the screen. When the width value 3000 of preview mode 1 is greater than the width value 1080 of the screen, the computing device will calculate the ratio of the width value 3000 of preview mode 1 to the width value 1080 of the screen, that is, the width value 3000 of preview mode 1 divided by the width value 1080 of the screen. The calculated result is 2.7778, and the computing device takes this calculated result 2.7778 as the second deviation value. In addition, the width value 2256 of preview mode 2 is also greater than the width value 1080 of the screen. Then, according to the calculation method of preview mode 1, calculate the ratio of the width value 2256 of preview mode 2 to the width value 1080 of the screen, and the obtained second deviation value is 2.0889.
[0045] For example, the width value of preview mode 3 is 1080, and the width value of the screen is 1080. The computing device determines whether the width value of preview mode 3 is greater than the width value of the screen. When the width value 1080 of preview mode 3 is equal to the width value 1080 of the screen, that is, the width value 1080 of preview mode 3 is not greater than the width value of the screen. Then the computing device will calculate the ratio of the width value 1080 of the screen to the width value 1080 of preview mode 3, that is, the width value 1080 of the screen divided by the width value 1080 of preview mode 3. The calculated result is 1, and the computing device takes this calculated result 1 as the second deviation value.
[0046] For another example, the width value of preview mode 4 is 720, and the width value of the screen is 1080. The computing device determines whether the width value of preview mode 4 is greater than the width value of the screen. When the width value 720 of preview mode 4 is not greater than the width value 1080 of the screen, the computing device will calculate the ratio of the width value 1080 of the screen to the width value 720 of preview mode 4, that is, the width value 1080 of the screen divided by the width value 720 of preview mode 4, and the calculated result is 1.5. The computing device uses this calculated result 1.5 as the second deviation value. In addition, the width value 540 of preview mode 5 and the width value 360 of preview mode 6 are also not greater than the width value 1080 of the screen. Then, according to the calculation method of preview mode 4, the ratios of the width values of preview mode 5 and preview mode 6 to the width value of the screen are calculated respectively. The second deviation value corresponding to preview mode 5 is 2, and the second deviation value corresponding to preview mode 6 is 3. It should be noted that when there are too many decimal places, the calculation result is retained to 4 decimal places.
[0047] Therefore, in this technical solution, by calculating the ratio between the width value of the preview mode (or the width value of the screen) and the width value of the screen (or the width value of the preview mode), the width value closest to the screen of the terminal device can be found among all preview modes. The closer the ratio is to 1, the smaller the difference between the width value of the preview mode and the width value of the terminal device screen, the smaller the degree of preview size magnification, and thus the clearer the enlarged image screen, thereby reducing the visual blur caused by the scaling of the preview image.
[0048] In addition, since the ratios of most terminal devices are that the height is much longer than the width, if the height value is used to calculate the second deviation value, the user avatar will be too large during preview. Therefore, this technical solution does not recommend using the height value to select the preview mode.
[0049] Optionally, the operation of determining the preview mode matching the screen according to the first deviation value and the second deviation value includes: performing an addition operation on the first deviation value and the second deviation value corresponding to each preview mode to obtain multiple calculation results corresponding to different preview modes; comparing the multiple calculation results to determine the smallest calculation result; and determining the preview mode corresponding to the smallest calculation result as the preview mode matching the screen.
[0050] Specifically, after obtaining the first deviation value and the second deviation value, the computing device performs an addition operation on the first deviation value and the second deviation value corresponding to each preview mode (i.e., preview modes 1 to 6). For example, the first deviation value corresponding to preview mode 1 is 0.2023, and the second deviation value is 2.7778. Then the computing device performs an addition operation on the first deviation value 0.2023 and the second deviation value 2.7778 corresponding to preview mode 1, and the calculation result is 2.9801 (i.e., 0.2023 + 2.7778 = 2.9801). Preview modes 2 to 6 are calculated according to the above method, and the obtained results are as follows: the calculation result corresponding to preview mode 2 is 2.9053, the calculation result corresponding to preview mode 3 is 1.0148, the calculation result corresponding to preview mode 4 is 1.5148, the calculation result corresponding to preview mode 5 is 2.0148, and the calculation result corresponding to preview mode 6 is 3.0148. Then the computing device compares the calculation results corresponding to preview modes 1 to 6, and the smallest calculation result is the calculation result 1.0148 corresponding to preview mode 3. Then the computing device determines preview mode 3 as the preview mode that matches the screen.
[0051] Thus, the computing device compares the added values of the first deviation value and the second deviation value corresponding to each preview mode, and determines the preview size that best suits the actual screen of the terminal device through the obtained smallest added value, so as to quickly and accurately obtain the preview mode that matches the screen.
[0052] Optionally, the method further includes: making the center point of the preview mode that matches the screen coincide with the center point of the screen of the terminal device, and scaling up the preview size of the preview mode that matches the screen to the screen size of the terminal device in proportion. Wherein the width value of the enlarged preview size is not greater than the width value of the screen of the terminal device, and the height value of the enlarged preview size is not greater than the height value of the screen of the terminal device.
[0053] Specifically, referring to Figure 3As shown, if the preview mode matching the screen is preview mode 3, the computing device will move the center point of preview mode 3 until it coincides with the center point of the screen of the terminal device, and scale up the preview size of preview mode 3 (i.e., the width value is 1080 and the height value is 1920) to the screen size of the terminal device (i.e., the width value is 1080 and the height value is 1972) in proportion. The width value of the scaled-up preview size is not greater than the width value of the screen of the terminal device, and the height value of the scaled-up preview size is not greater than the height value of the screen of the terminal device. That is, when the width value of the preview mode matching the screen is scaled up to the width value of the screen, but the height value has not reached the height value of the screen, the computing device stops the scaling operation. When the height value of the preview mode matching the screen is scaled up to the height value of the screen, but the width value has not reached the width value of the screen, the computing device stops the scaling operation. Therefore, the width value of preview mode 3 after scaling is 1080 and the height value is 1920.
[0054] Thus, by scaling up the preview mode matching the screen to a size suitable for the screen of the terminal device, the computing device enables the image screen to fill the screen of the terminal device without being vertically compressed or stretched, and the image screen will be centered after being scaled up, thereby improving the user's comfort when previewing images.
[0055] In addition, referring to Figure 1 As shown, according to the second aspect of this embodiment, a storage medium is provided. The storage medium includes a stored program, wherein the above-mentioned method according to any one of the above is executed by a processor when the program runs.
[0056] Thus, according to this embodiment, the computing device calculates the first deviation value and the second deviation value by using the screen size of the terminal device and the preview sizes of multiple preview modes supported by the terminal device, and then determines the preview mode matching the screen. In this way, according to the first deviation value, the ratio closest to the screen size of the terminal device is found among all preview modes. According to the second deviation value, the width value closest to the screen size of the terminal device is found among all preview modes. Thus, the preview mode most suitable for the screen size of the terminal device is selected, so that the visual experience of the image screen during preview is good, and the user's image display screen will not be vertically compressed or stretched, improving user comfort. And the user does not need to move the terminal device farther away to obtain a suitable avatar ratio on the screen, avoiding problems such as poor recording effect and reduced ASR recognition rate caused by the terminal device being too far away from the user. Thus, this technical solution achieves good recording effect, high ASR recognition rate, and high comfort of the display screen, and further solves the technical problems of poor recording effect, low ASR recognition rate, and low comfort of the preview screen in the prior art during dual recording.
[0057] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, some steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0058] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention.
[0059] Embodiment 2
[0060] Figure 4 The view preview device 400 according to the present embodiment is shown. The device 400 corresponds to the method described in the first aspect of Embodiment 1. Refer to Figure 4 As shown, the device 400 includes: a first acquisition module 410, configured to acquire the screen size of the screen of the terminal device, where the screen size includes the width value, height value, and width-to-height ratio of the screen; a second acquisition module 420, configured to acquire the preview sizes of multiple preview modes supported by the terminal device, where the preview sizes include the width values, height values, and width-to-height ratios corresponding to the multiple preview modes respectively; a first determination module 430, configured to determine a first deviation value between the width-to-height ratios of the multiple preview modes and the width-to-height ratio of the screen; a second determination module 440, configured to determine a second deviation value between the width values of the multiple preview modes and the width value of the screen; and a third determination module 450, configured to determine a preview mode matching the screen according to the first deviation value and the second deviation value.
[0061] Optionally, the first determination module 430 includes: a first calculation sub-module, configured to perform subtraction operations on the width-to-height ratios of the multiple preview modes and the width-to-height ratio of the screen respectively, and calculate the absolute value of the subtraction result to obtain the first deviation value.
[0062] Optionally, the second determination module 440 includes: a first judgment sub-module, configured to respectively judge whether the width values of multiple preview modes are greater than the width value of the screen; and a second calculation sub-module, configured to calculate, when the width values of multiple preview modes are greater than the width value of the screen, the ratio of the width values of multiple preview modes to the width value of the screen to obtain a second deviation value, or calculate, when the width values of multiple preview modes are not greater than the width value of the screen, the ratio of the width value of the screen to the width values of multiple preview modes to obtain a second deviation value.
[0063] Optionally, the third determination module 450 includes: a first operation sub-module, configured to perform an addition operation on the first deviation value and the second deviation value corresponding to each preview mode to obtain multiple calculation results corresponding to different preview modes; a first determination sub-module, configured to compare the multiple calculation results to determine the minimum calculation result; and a second determination sub-module, configured to determine the preview mode corresponding to the minimum calculation result as the preview mode matching the screen.
[0064] Optionally, the device 400 further includes: a first magnification module, configured to coincide the center point of the preview mode matching the screen with the center point of the screen of the terminal device, and scale up the preview size of the preview mode matching the screen to the screen size of the terminal device, where the width value of the magnified preview size is not greater than the width value of the screen of the terminal device, and the height value of the magnified preview size is not greater than the height value of the screen of the terminal device.
[0065] Therefore, according to this embodiment, the computing device calculates the first deviation value and the second deviation value by using the screen size of the terminal device and the preview sizes of multiple preview modes supported by the terminal device, and then determines the preview mode matching the screen. In this way, the technical solution finds the ratio closest to the screen size of the terminal device among all preview modes according to the first deviation value. According to the second deviation value, the width value closest to the screen size of the terminal device is found among all preview modes. Thus, the most suitable preview mode for the screen size of the terminal device is screened out, so that the visual experience of the image during preview is good, and the user's image display screen will not be vertically compressed or stretched, improving the user's comfort. And the user does not need to move the terminal device farther away to obtain a suitable avatar ratio on the screen, avoiding problems such as poor recording effect and reduced ASR recognition rate caused by the terminal device being too far away from the user. Therefore, the technical solution achieves good recording effect, high ASR recognition rate and high comfort of the display screen, and further solves the technical problems of poor recording effect, low ASR recognition rate and low comfort of the preview screen in the prior art during dual recording.
[0066] Embodiment 3
[0067] Figure 5Fig. 0 shows a view preview device 500 according to this embodiment, and the device 500 corresponds to the method according to the first aspect of Embodiment 1. Refer to Figure 5 As shown, the device 500 includes: a processor 510; and a memory 520 connected to the processor 510 for providing instructions for the processor 510 to process the following steps: obtaining the screen size of the screen of the terminal device, where the screen size includes the width value, height value, and width-to-height ratio of the screen; obtaining the preview sizes of multiple preview modes supported by the terminal device, where the preview sizes include the width values, height values, and width-to-height ratios corresponding to the multiple preview modes respectively; determining a first deviation value between the width-to-height ratios of the multiple preview modes and the width-to-height ratio of the screen; determining a second deviation value between the width values of the multiple preview modes and the width value of the screen; and determining a preview mode that matches the screen according to the first deviation value and the second deviation value.
[0068] Optionally, the operation of determining the first deviation value between the width-to-height ratios of the multiple preview modes and the width-to-height ratio of the screen includes: performing subtraction operations on the width-to-height ratios of the multiple preview modes and the width-to-height ratio of the screen respectively, and calculating the absolute value of the subtraction result to obtain the first deviation value.
[0069] Optionally, the operation of determining the second deviation value between the width values of the multiple preview modes and the width value of the screen includes: respectively determining whether the width values of the multiple preview modes are greater than the width value of the screen; and in the case where the width values of the multiple preview modes are greater than the width value of the screen, calculating the ratio of the width values of the multiple preview modes to the width value of the screen to obtain the second deviation value, or in the case where the width values of the multiple preview modes are not greater than the width value of the screen, calculating the ratio of the width value of the screen to the width values of the multiple preview modes to obtain the second deviation value.
[0070] Optionally, the operation of determining a preview mode that matches the screen according to the first deviation value and the second deviation value includes: performing addition operations on the first deviation value and the second deviation value corresponding to each preview mode to obtain multiple calculation results corresponding to different preview modes; comparing the multiple calculation results to determine the minimum calculation result; and determining the preview mode corresponding to the minimum calculation result as the preview mode that matches the screen.
[0071] Optionally, the memory 520 is further configured to provide instructions for the processor 510 to process the following steps: making the center point of the preview mode that matches the screen coincide with the center point of the screen of the terminal device, and scaling the preview size of the preview mode that matches the screen to the screen size of the terminal device in proportion, where the width value of the scaled preview size is not greater than the width value of the screen of the terminal device, and the height value of the scaled preview size is not greater than the height value of the screen of the terminal device.
[0072] Thus, according to this embodiment, the computing device calculates a first deviation value and a second deviation value by using the screen size of the terminal device and the preview sizes of multiple preview modes supported by the terminal device, and then determines the preview mode that matches the screen. In this way, according to the first deviation value, the ratio closest to the screen size of the terminal device is found among all preview modes. According to the second deviation value, the width value closest to the screen size of the terminal device is found among all preview modes. Thus, the preview mode most suitable for the screen size of the terminal device is screened out, making the visual experience of the image during preview good, and the user's image display screen will not be vertically compressed or stretched, improving user comfort. And the user does not need to hold the terminal device far away to obtain a suitable avatar ratio on the screen, avoiding situations such as poor recording effect and reduced ASR recognition rate caused by the terminal device being too far away from the user. Thus, this technical solution achieves good recording effect, high ASR recognition rate, and high comfort of the display screen, and further solves the technical problems of poor recording effect, low ASR recognition rate, and low comfort of the preview screen in the prior art during dual recording.
[0073] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0074] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0075] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the units or modules can be in electrical or other forms.
[0076] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0077] In addition, in each embodiment of the present invention, each functional unit can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0078] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs.
[0079] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A view preview method, characterized in that, including: obtaining the screen size of a terminal device, where the screen size includes the width value, height value, and width-to-height ratio of the screen; obtaining the preview sizes of multiple preview modes supported by the terminal device, where the preview sizes include the width values, height values, and width-to-height ratios corresponding to the multiple preview modes respectively; determining a first deviation value between the width-to-height ratios of the multiple preview modes and the width-to-height ratio of the screen; determining a second deviation value between the width values of the multiple preview modes and the width value of the screen; and determining a preview mode that matches the screen according to the first deviation value and the second deviation value; The operation of determining the first deviation value between the width-to-height ratios of the multiple preview modes and the width-to-height ratio of the screen includes: performing subtraction operations on the width-to-height ratios of the multiple preview modes and the width-to-height ratio of the screen respectively, and calculating the absolute value of the subtraction result to obtain the first deviation value; The operation of determining the second deviation value between the width values of the multiple preview modes and the width value of the screen includes: respectively determining whether the width values of the multiple preview modes are greater than the width value of the screen; and when the width values of the multiple preview modes are greater than the width value of the screen, calculating the ratio of the width values of the multiple preview modes to the width value of the screen to obtain the second deviation value, or when the width values of the multiple preview modes are not greater than the width value of the screen, calculating the ratio of the width value of the screen to the width values of the multiple preview modes to obtain the second deviation value; The operation of determining a preview mode that matches the screen according to the first deviation value and the second deviation value includes: performing addition operations on the first deviation value and the second deviation value corresponding to each preview mode to obtain multiple calculation results corresponding to different preview modes; comparing the multiple calculation results to determine the minimum calculation result; and determining the preview mode corresponding to the minimum calculation result as the preview mode that matches the screen; further including: coinciding the center point of the preview mode that matches the screen with the center point of the screen of the terminal device, and scaling up the preview size of the preview mode that matches the screen to the screen size of the terminal device, where the width value of the scaled-up preview size is not greater than the width value of the screen of the terminal device, and the height value of the scaled-up preview size is not greater than the height value of the screen of the terminal device.
2. A storage medium, characterized in that, The storage medium includes a stored program, where, when the program runs, the method according to claim 1 is executed by a processor.
3. A view preview device, characterized in that, including: a first obtaining module, configured to obtain the screen size of a terminal device, where the screen size includes the width value, height value, and width-to-height ratio of the screen; a second obtaining module, configured to obtain the preview sizes of multiple preview modes supported by the terminal device, where the preview sizes include the width values, height values, and width-to-height ratios corresponding to the multiple preview modes respectively; a first determining module, configured to determine a first deviation value between the width-to-height ratios of the multiple preview modes and the width-to-height ratio of the screen; A second determination module, configured to determine a second deviation value between the width values of the multiple preview modes and the width value of the screen; and A third determination module, configured to determine a preview mode matching the screen according to the first deviation value and the second deviation value; The operation of determining a first deviation value between the aspect ratio of the width and height of the multiple preview modes and the aspect ratio of the width and height of the screen includes: A first calculation sub-module, configured to perform a subtraction operation on the aspect ratio of the width and height of the multiple preview modes and the aspect ratio of the width and height of the screen respectively, and calculate the absolute value of the subtraction result to obtain the first deviation value; The operation of determining a second deviation value between the width values of the multiple preview modes and the width value of the screen includes: A first judgment sub-module, configured to respectively judge whether the width values of the multiple preview modes are greater than the width value of the screen; and A second calculation sub-module, configured to calculate a ratio of the width values of the multiple preview modes to the width value of the screen to obtain the second deviation value when the width values of the multiple preview modes are greater than the width value of the screen, or calculate a ratio of the width value of the screen to the width values of the multiple preview modes to obtain the second deviation value when the width values of the multiple preview modes are not greater than the width value of the screen; The operation of determining a preview mode matching the screen according to the first deviation value and the second deviation value includes: Performing an addition operation on the first deviation value and the second deviation value corresponding to each preview mode to obtain multiple calculation results corresponding to different preview modes; Comparing the multiple calculation results to determine the minimum calculation result; and Determining the preview mode corresponding to the minimum calculation result as the preview mode matching the screen; Further includes: Coinciding the center point of the preview mode matching the screen with the center point of the screen of the terminal device, and scaling the preview size of the preview mode matching the screen to the screen size of the terminal device in proportion, where The width value of the scaled preview size is not greater than the width value of the screen of the terminal device, and the height value of the scaled preview size is not greater than the height value of the screen of the terminal device.
4. A view preview device, characterized in that Includes: A processor; and A memory, connected to the processor, for providing instructions for the processor to perform the following processing steps: Obtaining the screen size of the terminal device, where the screen size includes the width value, height value, and aspect ratio of the width and height of the screen; Obtaining the preview sizes of multiple preview modes supported by the terminal device, where the preview sizes include the width value, height value, and aspect ratio of the width and height corresponding to the multiple preview modes respectively; Determining a first deviation value between the aspect ratio of the width and height of the multiple preview modes and the aspect ratio of the width and height of the screen; Determining a second deviation value between the width values of the multiple preview modes and the width value of the screen; and Determining a preview mode matching the screen according to the first deviation value and the second deviation value; The operation of determining a first deviation value between the aspect ratio of the width and height of the multiple preview modes and the aspect ratio of the width and height of the screen includes: The first calculation sub-module is configured to perform subtraction operations on the aspect ratio of the width to the height of each of the multiple preview modes and the aspect ratio of the width to the height of the screen, and calculate the absolute value of the subtraction result to obtain the first deviation value; The operation of determining the second deviation value between the width value of each of the multiple preview modes and the width value of the screen includes: The first judgment sub-module is configured to respectively judge whether the width value of each of the multiple preview modes is greater than the width value of the screen; and The second calculation sub-module is configured to, when the width value of each of the multiple preview modes is greater than the width value of the screen, calculate the ratio of the width value of each of the multiple preview modes to the width value of the screen to obtain the second deviation value, or when the width value of each of the multiple preview modes is not greater than the width value of the screen, calculate the ratio of the width value of the screen to the width value of each of the multiple preview modes to obtain the second deviation value; The operation of determining the preview mode that matches the screen according to the first deviation value and the second deviation value includes: Performing an addition operation on the first deviation value and the second deviation value corresponding to each preview mode to obtain multiple calculation results corresponding to different preview modes; Comparing the multiple calculation results to determine the minimum calculation result; and Determining the preview mode corresponding to the minimum calculation result as the preview mode that matches the screen; It further includes: Coinciding the center point of the preview mode that matches the screen with the center point of the screen of the terminal device, and scaling up the preview size of the preview mode that matches the screen to the screen size of the terminal device, where The width value of the scaled-up preview size is not greater than the width value of the screen of the terminal device, and the height value of the scaled-up preview size is not greater than the height value of the screen of the terminal device.
Citation Information
Patent Citations
Information processing method and electronic device
CN103888670A