CN104270579B - A kind of terminal applies interface pixel method of adjustment and terminal - Google Patents

A kind of terminal applies interface pixel method of adjustment and terminal Download PDF

Info

Publication number
CN104270579B
CN104270579B CN201410493952.1A CN201410493952A CN104270579B CN 104270579 B CN104270579 B CN 104270579B CN 201410493952 A CN201410493952 A CN 201410493952A CN 104270579 B CN104270579 B CN 104270579B
Authority
CN
China
Prior art keywords
pixel
application interface
display area
adjusted
aspect ratio
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410493952.1A
Other languages
Chinese (zh)
Other versions
CN104270579A (en
Inventor
朱晓亮
张景新
桑圣杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201410493952.1A priority Critical patent/CN104270579B/en
Publication of CN104270579A publication Critical patent/CN104270579A/en
Application granted granted Critical
Publication of CN104270579B publication Critical patent/CN104270579B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the present invention provides a kind of terminal applies interface pixel method of adjustment and terminal, it is related to android terminal field, can be distortionless in the picture for ensureing terminal applies interface, realize that full visual angle is shown, the Experience Degree of user is improved, this method includes:Obtain object pixel the ratio of width to height of application interface to be adjusted;Determine the display area of application interface to be adjusted;According to object pixel the ratio of width to height of application interface to be adjusted and the height and width of display area, the first pixel wide and the first pixels tall of display area are calculated;According to object pixel the ratio of width to height of application interface to be adjusted and the first pixel wide or the first pixels tall, optimal application interface pixel is obtained from the application interface pixel data storehouse of pre-configuration;The current pixel of application interface to be adjusted is adjusted to optimal application interface pixel.The present invention is applied to the adjustment of application interface pixel.

Description

Terminal application interface pixel adjusting method and terminal
Technical Field
The invention relates to the field of android terminals, in particular to a method for adjusting pixels of a terminal application interface and a terminal.
Background
Nowadays, a terminal device (abbreviated as android terminal) loaded with an android system is accepted by vast users by virtue of excellent performance and good user experience. The quality of the performance of the camera assembly in the android terminal is an important index when a user purchases the android terminal.
When a user uses the camera component to take a picture, the following problems generally exist:
specifically, because the size ratio of the screen of the android terminal has various conditions, and the output ratio of the image Sensor (Sensor) of the camera module is always fixed, when a user uses the android terminal to take a picture, if the two ratios are not consistent, the android system generally cuts a preview picture for an undistorted preview picture, so that the user cannot preview the picture at a full view angle, and the user experience of the consumer is seriously affected.
Disclosure of Invention
The embodiment of the invention provides a method for adjusting pixels of a terminal application interface and a terminal, which can realize full-view or full-screen display and improve user experience under the condition of ensuring no distortion of a picture of the terminal application interface.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in a first aspect, a method for adjusting a pixel of a terminal application interface is provided, including:
acquiring the aspect ratio of a target pixel of an application interface to be adjusted;
determining a display area of the application interface to be adjusted on a terminal screen, and acquiring the height and width of the display area;
calculating a first pixel width and a first pixel height of the display area according to the target pixel aspect ratio of the application interface to be adjusted, the height of the display area and the width of the display area; wherein the first pixel width and the first pixel height are pixel width and pixel height of an optimal undistorted picture that can be displayed when the display area displays an image with the target pixel aspect ratio;
acquiring an optimal application interface pixel from a pre-configured application interface pixel database according to the target pixel aspect ratio of the application interface to be adjusted and the first pixel width or the first pixel height;
and adjusting the current pixel of the application interface to be adjusted into the optimal application interface pixel.
Optionally, the application interface to be adjusted includes a preview interface of a camera of the terminal or a video playing interface of the terminal.
Optionally, the calculating a first pixel width and a first pixel height of the display area according to the aspect ratio of the target pixel of the application interface to be adjusted, the height of the display area, and the width of the display area specifically includes:
when the width of the display area is larger than the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, taking the height of the display area as the first pixel height of the display area, and rounding the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted as the first pixel width of the display area;
or,
and when the width of the display area is smaller than or equal to the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, taking the width of the display area as the first pixel width of the display area, and taking the product of the width of the display area and the target pixel aspect ratio of the application interface to be adjusted as the first pixel height of the display area.
Optionally, the obtaining an optimal application interface pixel from a preconfigured application interface pixel database according to the pixel aspect ratio of the application interface to be adjusted and the first pixel width or the first pixel height specifically includes:
matching the pixel aspect ratio of the application interface to be adjusted with the pixel aspect ratio of each application interface pixel in the application interface pixel database;
acquiring a target application interface pixel set; the target application interface pixel set comprises target application interface pixels which are the same as the pixel aspect ratio of the application interface to be adjusted and target application interface pixels of which the difference value with the pixel aspect ratio of the application interface to be adjusted is within a preset range; the aspect ratio of the target application interface pixels in the target application interface pixel set is the same as the pixel aspect ratio of the application interface to be adjusted;
when the width of the display area is larger than the product of the height of the display area and the aspect ratio of the target pixel of the application interface to be adjusted, selecting the target application interface pixel with the minimum difference value with the first pixel width from the application interface pixel set according to the first pixel width as the optimal application interface pixel;
or, when the width of the display area is less than or equal to the product of the height of the display area and the aspect ratio of the target pixel of the application interface to be adjusted, selecting the target application interface pixel with the smallest difference value with the first pixel height from the application interface pixel set according to the first pixel height as the optimal application interface pixel.
Optionally, after the aspect ratio of the pixel of the application interface to be adjusted is matched with the aspect ratio of each application interface pixel in the application interface pixel database, the method further includes:
if the application interface pixel database does not contain an application interface pixel which is the same as the pixel aspect ratio of the application interface to be adjusted or a target application interface pixel of which the difference value of the pixel aspect ratio of the application interface to be adjusted is within a preset range, and the width of the display area is greater than the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, selecting the application interface pixel with the minimum difference value with the first pixel width from the application interface pixel database as an optimal application interface pixel according to the first pixel width;
or, if the application interface pixel database does not include an application interface pixel having the same pixel aspect ratio as the application interface to be adjusted, and the width of the display area is less than or equal to the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, selecting the application interface pixel having the smallest difference with the first pixel height from the application interface pixel database as the optimal application interface pixel according to the first pixel height.
Optionally, when the application interface to be adjusted is a preview interface of the terminal camera and the terminal camera is tested; before the obtaining of the aspect ratio of the target pixel of the application interface to be adjusted, the method further includes:
selecting a photographing pixel for the terminal camera from the application interface pixel database; the pixel aspect ratio of the photographing pixel is the target pixel aspect ratio of the application interface to be adjusted; when the terminal camera is tested, the pixel aspect ratio of the photographed pixel is the same as the output ratio of the sensor in the terminal camera.
In a second aspect, a terminal is provided, including:
the first obtaining unit is used for obtaining the aspect ratio of a target pixel of the application interface to be adjusted;
the determining unit is used for determining a display area of the application interface to be adjusted on a terminal screen, and acquiring the height and the width of the display area;
a calculating unit, configured to calculate a first pixel width and a first pixel height of the display area according to the target pixel aspect ratio of the application interface to be adjusted, which is acquired by the first acquiring unit, and the height of the display area and the width of the display area, which are determined by the determining unit; wherein the first pixel width and the first pixel height are pixel width and pixel height of an optimal undistorted picture that can be displayed when the display area displays an image with the target pixel aspect ratio;
a second obtaining unit, configured to obtain an optimal application interface pixel from a preconfigured application interface pixel database according to the target pixel aspect ratio of the application interface to be adjusted obtained by the first obtaining unit and the first pixel width or the first pixel height calculated by the calculating unit;
and the adjusting unit is used for adjusting the current pixel of the application interface to be adjusted into the optimal application interface pixel.
Optionally, the application interface to be adjusted includes a preview interface of a camera of the terminal or a video playing interface of the terminal.
Optionally, the computing unit is specifically configured to: when the width of the display area is larger than the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, taking the height of the display area as the first pixel height of the display area, and rounding the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted as the first pixel width of the display area; or, when the width of the display area is less than or equal to the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, taking the width of the display area as the first pixel width of the display area, and taking the integral of the product of the width of the display area and the target pixel aspect ratio of the application interface to be adjusted as the first pixel height of the display area.
Optionally, the second obtaining unit includes:
the matching module is used for matching the pixel aspect ratio of the application interface to be adjusted acquired by the first acquisition unit with the pixel aspect ratio of each application interface pixel in the application interface pixel database;
the acquisition module is used for acquiring a target application interface pixel set; the target application interface pixel set comprises target application interface pixels which are the same as the pixel aspect ratio of the application interface to be adjusted and target application interface pixels of which the difference value with the pixel aspect ratio of the application interface to be adjusted is within a preset range;
a first selecting module, configured to select, when the width of the display area is greater than a product of the height of the display area and a target pixel aspect ratio of the application interface to be adjusted, a target application interface pixel having a smallest difference with the first pixel width from the application interface pixel set acquired by the acquiring module according to the first pixel width calculated by the calculating unit, as an optimal application interface pixel; or, when the width of the display area is less than or equal to the product of the height of the display area and the aspect ratio of the target pixel of the application interface to be adjusted, selecting the target application interface pixel with the smallest difference value with the first pixel height from the application interface pixel set according to the first pixel height calculated by the calculation unit, as the optimal application interface pixel.
Optionally, the second obtaining unit further includes:
a second selecting module, configured to select, if the application interface pixel database does not include an application interface pixel that is the same as the pixel aspect ratio of the application interface to be adjusted acquired by the first acquiring unit or a target application interface pixel whose difference between the pixel aspect ratio of the application interface to be adjusted and the pixel aspect ratio of the application interface to be adjusted is within a predetermined range, and the width of the display area is greater than a product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, an application interface pixel having a smallest difference between the first pixel width and the target application interface pixel width from the application interface pixel database as an optimal application interface pixel according to the first pixel width calculated by the calculating unit;
or, the application interface pixel database is configured to select, according to the first pixel height calculated by the calculation unit, an application interface pixel with a smallest difference with the first pixel height from the application interface pixel database as an optimal application interface pixel if the application interface pixel database does not include an application interface pixel with the same pixel aspect ratio as the application interface to be adjusted acquired by the first acquisition unit, and the width of the display area is less than or equal to the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted.
Optionally, when the application interface to be adjusted is a preview interface of the terminal camera and the terminal camera is tested; the terminal further comprises:
the selection unit is used for selecting a photographing pixel for the terminal camera from the application interface pixel database; the pixel aspect ratio of the photographing pixel is the target pixel aspect ratio of the application interface to be adjusted; when the terminal camera is tested, the pixel aspect ratio of the photographed pixel is the same as the output ratio of the sensor in the terminal camera.
According to the terminal application interface pixel adjusting method and the terminal provided by the embodiment of the invention, the aspect ratio of the target pixel of the application interface to be adjusted is obtained; determining a display area of an application interface to be adjusted, and acquiring the height and the width of the display area; calculating a first pixel width and a first pixel height of a display area according to a target pixel aspect ratio of an application interface to be adjusted, the height of the display area and the width of the display area; acquiring an optimal application interface pixel from a pre-configured application interface pixel database according to the aspect ratio of a target pixel of an application interface to be adjusted and the width or height of a first pixel; and adjusting the current pixel of the application interface to be adjusted into the optimal application interface pixel.
Compared with the prior art, when the screen size proportion of the Android terminal is not consistent with the sensor output proportion of the camera module, in order to achieve undistorted preview, the Android generally matches Android devices with different size proportions by cutting a preview picture. The method comprises the steps of setting the aspect ratio of a target pixel according to the application interface to be adjusted by selecting photographing pixels with different pixel ratios, and then calculating the optimal application interface pixel corresponding to the application interface to be adjusted under different aspect ratios of the target pixel. Therefore, full-view or full-screen display can be realized under the condition of ensuring no distortion of the picture of the terminal application interface, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for adjusting a pixel of a terminal application interface according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another method for adjusting pixels of a terminal application interface according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
An embodiment of the present invention provides a method for adjusting a pixel of a terminal application interface, as shown in fig. 1, the method specifically includes the following steps:
101. and the terminal acquires the aspect ratio of the target pixel of the application interface to be adjusted.
The terminal in the embodiment of the invention is a smart phone or a tablet computer (called android terminal for short) provided with an android system. The application interface to be adjusted includes a preview interface of the camera of the terminal or a video playing interface of the terminal, and the video playing interface of the terminal may be a video playing interface of the camera in the shooting mode or a video playing interface of a video playing application installed in the terminal.
Specifically, when a user adjusts pixels of an application interface installed in the terminal, the aspect ratio of the target pixel of the application interface to be adjusted may be obtained from a preconfigured application interface pixel database according to actual needs or personal preferences, for example, when the user takes a picture through a camera module of the terminal, the user may select different proportions of the taken picture pixels from the user interface pixel database according to his preferences. And when the terminal is performing the camera test, the aspect ratio of the target pixel of the application interface to be adjusted is the same as the output ratio of the imaging unit sensor of the terminal camera. For example, when the pixels of the application interface to be adjusted are: 640 x 480, the aspect ratio of the corresponding target pixel is 4: 3.
102. The terminal determines a display area of the application interface to be adjusted on a terminal screen, and obtains the height and the width of the display area.
Specifically, the height of the display area of the application interface to be adjusted is obtained by subtracting the heights of the application interface layout file and the control frame from the screen height of the terminal, and the width of the display area of the application interface to be adjusted is obtained by subtracting the widths of the application interface layout file and the control frame from the screen width of the terminal.
103. And the terminal calculates the first pixel width and the first pixel height of the display area according to the target pixel aspect ratio, the height of the display area and the width of the display area of the application interface to be adjusted.
The first pixel width and the first pixel height are the pixel width and the pixel height of the optimal undistorted picture which can be displayed when the display area displays the image according to the target pixel width-height ratio of the application interface to be adjusted. For example, when the width of the display area is greater than the product of the height of the display area and the aspect ratio of the target pixel of the application interface to be adjusted, the optimal undistorted picture that can be displayed by the display area, that is, the image that can be displayed when the pixel height of the image is the height of the display area and the image is not distorted, is displayed.
Optionally, step 103 specifically includes the following steps:
103a, when the width of the display area is larger than the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, the terminal takes the height of the display area as the first pixel height of the display area, and the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted is rounded as the first pixel width of the display area.
Or,
103b, when the width of the display area is smaller than or equal to the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, the terminal takes the width of the display area as the first pixel width of the display area, and takes the product of the width of the display area and the target pixel aspect ratio of the application interface to be adjusted as the first pixel height of the display area.
Specifically, when the Width of the display area of the application interface to be adjusted is greater than the product (i.e., Height × R) of the Height of the display area and the target pixel Width-to-Height ratio R of the application interface to be adjusted, the terminal may calculate the first pixel Width 'and the first pixel Height' of the display area according to the following formula one. When the Width of the display area of the application interface to be adjusted is less than or equal to the product (i.e., Height R) of the Height of the display area and the pixel Width-to-Height ratio R of the application interface to be adjusted, the terminal can calculate the first pixel Width 'and the first pixel Height' of the display area according to the following formula two.
Formula one
Formula two
Exemplarily, when the pixel aspect ratio R of the application interface to be adjusted is 16:9, and the Width is 640, and the Height is 480; first, it is determined that the first pixel Width 'and the first pixel Height' of the display region are calculated using the formula two since the Height R is 480 (16/9) is 853.3 and 853.3>640, where:
Width'=Width=640;
height' ═ Width/R +0.5 ═ 640/(16/9) +0.5 ═ 360. ([ ] represents rounding)
When the pixel aspect ratio R of the application interface to be adjusted is 4:3, the Width is 868, and the Height is 576; first, it is determined that the first pixel Width 'and the first pixel Height' of the display region are calculated using formula one because 768<868, where:
Width'=[Height*R+0.5]=[576*(4/3)+0.5]=768;
Height'=Height=576。
104. and the terminal acquires the optimal application interface pixel from a pre-configured application interface pixel database according to the target pixel aspect ratio and the first pixel width or the first pixel height of the application interface to be adjusted.
The application interface pixel database stores application interface pixels supported by the terminal.
Specifically, when the terminal selects an optimal application interface pixel from the application interface pixel database according to the target pixel aspect ratio and the first pixel width or the first pixel height of the application interface to be adjusted, the optimal application interface pixel needs to satisfy: when the width of the display area is larger than the product of the height of the display area and the target pixel width-height ratio of the application interface to be adjusted, the difference value between the display area and the pixel width-height ratio of the application interface to be adjusted is in a preset range or 0, and the difference value between the display area and the first pixel width is minimum; or, the difference with the first pixel width is minimum; when the width of the display area is smaller than or equal to the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, the difference value between the display area and the pixel aspect ratio of the application interface to be adjusted is within a preset range or 0, and the difference value between the display area and the first pixel height is minimum; or, the difference from the first pixel height is minimum.
Optionally, step 104 specifically includes the following steps:
104a, the terminal matches the pixel aspect ratio of the application interface to be adjusted with the pixel aspect ratio of each application interface pixel in the application interface pixel database.
If the application interface pixel database includes a target application interface pixel having the same aspect ratio as the pixel of the application interface to be adjusted, or a target application interface pixel having a difference value with the aspect ratio of the pixel of the application interface to be adjusted within a predetermined range, the process goes to step 104b1, and if the application interface pixel database does not include a target application interface pixel having the same aspect ratio as the pixel of the application interface to be adjusted and a target application interface pixel having a difference value with the aspect ratio of the pixel of the application interface to be adjusted within a predetermined range, the process goes to step 104 c.
104b1, the terminal acquires the target application interface pixel set.
The target application interface pixel set comprises target application interface pixels with the same aspect ratio as the pixels of the application interface to be adjusted, or target application interface pixels with the aspect ratio difference value of the pixels of the application interface to be adjusted within a preset range. That is, the difference between the aspect ratio of the target application interface pixel in the target application interface pixel set and the aspect ratio of the pixel of the application interface to be adjusted is 0 or within a preset range.
104b2, when the width of the display area is larger than the product of the height of the display area and the aspect ratio of the target pixel of the application interface to be adjusted, the terminal selects the target application interface pixel with the minimum difference with the first pixel width from the application interface pixel set according to the first pixel width as the optimal application interface pixel; or when the width of the display area is smaller than or equal to the product of the height of the display area and the aspect ratio of the target pixel of the application interface to be adjusted, the terminal selects the target application interface pixel with the minimum difference value with the height of the first pixel from the application interface pixel set according to the height of the first pixel as the optimal application interface pixel.
104c, if the application interface pixel database does not contain a target application interface pixel which is the same as the pixel aspect ratio of the application interface to be adjusted or a target application interface pixel of which the difference value with the pixel aspect ratio of the application interface to be adjusted is in a preset range, and the width of the display area is greater than the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, selecting the application interface pixel with the minimum difference value with the first pixel width from the application interface pixel database as an optimal application interface pixel by the terminal according to the first pixel width; or, if the application interface pixel database does not contain the target application interface pixel with the same pixel aspect ratio as the application interface to be adjusted, and the width of the display area is less than or equal to the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, selecting the application interface pixel with the smallest difference with the first pixel height from the application interface pixel database as the optimal application interface pixel according to the first pixel height.
In this embodiment, the terminal first matches the aspect ratio of the target pixel of the application interface to be adjusted with the aspect ratio of each application interface pixel in the application interface pixel database, if an application interface pixel is selected from the aspect ratios of the target pixel of the application interface to be adjusted, the selected application interface pixel is further screened according to the first pixel height or the first pixel width, and an optimal application interface pixel is screened from the application interface pixels, if an application interface pixel having the same aspect ratio as the target pixel of the application interface to be adjusted cannot be found, the first pixel height or the first pixel width is directly matched with each application interface pixel in the application interface pixel database, and the optimal application interface pixel is screened from the application interface pixel database.
For example, when the adjustment application interface is a preview interface of a terminal camera, if the Width-to-Height ratio R of the target pixel of the interface to be previewed is 4:3, the Width of the maximum display area of the preview interface is 868, and the Height is 576.
First, the first pixel Width '768 and the first pixel Height' 576 of the display area are calculated according to the formula two.
Then, based on R4: 3 and (Width 768), an application interface pixel with a pixel Width/height ratio of 4:3 and a similar pixel Width 768 is found from the application interface pixel database. For example 770 x 578.
105. And the terminal adjusts the current pixel of the application interface to be adjusted into the optimal application interface pixel.
The method for adjusting the pixels of the terminal application interface, provided by the embodiment of the invention, comprises the steps of obtaining the aspect ratio of target pixels of an application interface to be adjusted; determining a display area of an application interface to be adjusted; acquiring the height and the width of a display area; calculating a first pixel width and a first pixel height of a display area according to a target pixel aspect ratio of an application interface to be adjusted, the height of the display area and the width of the display area; acquiring an optimal application interface pixel from a pre-configured application interface pixel database according to the aspect ratio of a target pixel of an application interface to be adjusted and the width or height of a first pixel; and adjusting the current pixel of the application interface to be adjusted into the optimal application interface pixel.
Compared with the prior art, when the screen size proportion of the Android terminal is not consistent with the sensor output proportion of the camera module, in order to achieve undistorted preview, the Android generally matches Android devices with different size proportions by cutting a preview picture. According to the method, the aspect ratio of the target pixel according to the application interface to be adjusted is set, and then the optimal application interface pixel corresponding to the application interface to be adjusted under different aspect ratios of the target pixel is calculated. Therefore, full-view or full-screen display can be realized under the condition of ensuring no distortion of the picture of the terminal application interface, and the user experience is improved.
Example two
The second embodiment of the invention is mainly applied to an application scene of performing power detection on the android terminal camera module in the factory mode. In the prior art, in order to quickly and accurately judge the performance of each part of a produced android terminal and find out defective products in time during factory production, each part of the android terminal is usually subjected to power inspection at the initial stage of production. For the camera module test in the power inspection test, when the screen size ratio of the android terminal is not consistent with the sensor output ratio of the camera module, the android system usually cuts the preview picture for undistorted preview picture. However, this generally has the following problems:
specifically, if this camera module exists the quality problem (e.g., the vignetting problem, there is black dark line in preview picture or the photo corner of shooing promptly, or the red line problem, it appears red bright line in the twinkling of an eye to shoot promptly), if need tailor the picture this moment, can lead to cutting the back and cover vignetting or red line problem just so, make testing personnel just think the camera qualified by mistake, in case this problem is not detected, lead to the problem product to flow into the market, not only can seriously influence consumer's user experience, still can seriously influence producer's reputation and profit.
In order to solve the above problem, a second embodiment of the present invention provides a method for adjusting a pixel of a terminal application interface, where in this embodiment, an application interface to be adjusted is a preview interface of the terminal camera, as shown in fig. 2, the method specifically includes the following steps:
201. the terminal selects a photographed pixel for the terminal camera from the application interface pixel database.
The aspect ratio of the photographing pixel is a target aspect ratio of the application interface to be adjusted.
In this embodiment, when a user uses the terminal camera to take a picture normally, if the user wants to adjust the pixels of the preview interface of the terminal camera, a taking pixel needs to be set for the terminal camera first, and the aspect ratio of the taking pixel may be any ratio set by the user.
In addition, in this embodiment, when the terminal needs to test the camera of the terminal in the factory mode, the terminal needs to be set for the photographing pixel of the terminal in advance. For production detection angle considerations, the application interface pixel with the same output ratio as the sensor is selected as the photographed pixel from a pre-configured application interface pixel database by default. This is a prerequisite for achieving undistorted panoramic previews.
202. And the terminal acquires the aspect ratio of the target pixel of the application interface to be adjusted.
203. The terminal determines a display area of the application interface to be adjusted on a terminal screen, and obtains the height and the width of the display area.
204. And the terminal calculates the first pixel width and the first pixel height of the display area according to the target pixel aspect ratio, the height of the display area and the width of the display area of the application interface to be adjusted.
205. And the terminal acquires the optimal application interface pixel from a pre-configured application interface pixel database according to the target pixel aspect ratio and the first pixel width or the first pixel height of the application interface to be adjusted.
206. And the terminal adjusts the current pixel of the application interface to be adjusted into the optimal application interface pixel.
Specifically, the detailed process from step 202 to step 206 may refer to step 101 to step 105 in the first embodiment, and is not described herein again in the embodiments of the present invention.
The method for adjusting the pixels of the terminal application interface, provided by the embodiment of the invention, comprises the steps of obtaining the aspect ratio of target pixels of an application interface to be adjusted; determining a display area of an application interface to be adjusted; acquiring the height and the width of a display area; calculating a first pixel width and a first pixel height of a display area according to a target pixel aspect ratio of an application interface to be adjusted, the height of the display area and the width of the display area; acquiring an optimal application interface pixel from a pre-configured application interface pixel database according to the aspect ratio of a target pixel of an application interface to be adjusted and the width or height of a first pixel; and adjusting the current pixel of the application interface to be adjusted into the optimal application interface pixel.
Compared with the prior art, when the screen size proportion of the android terminal is inconsistent with the sensor output proportion of the camera module, the android system carries out a cutting process on a preview picture for the undistorted preview picture. When the camera module is detected, the photographing pixels which are the same as the photographing pixels of the output proportion of the sensor in the camera module are set, then the pixel width-height ratio of the preview interface of the terminal camera is the same as the output proportion of the sensor, and then the optimal application interface pixels of the preview interface under the pixel width-height ratio are calculated according to the set pixel width-height ratio of the preview interface, so that full-view angle display with equal proportion and no zooming is realized, a production line worker is facilitated to detect the quality of each imaging part of the camera module of the terminal camera module, missing detection of a problem product is avoided, and the power detection efficiency of a manufacturer is improved.
EXAMPLE III
An embodiment of the present invention provides a terminal, as shown in fig. 3, where the terminal 3 specifically includes: a first obtaining unit 31, a determining unit 32, a calculating unit 33, a second obtaining unit 34, and an adjusting unit 35, wherein:
the first obtaining unit 31 is configured to obtain a target pixel aspect ratio of the application interface to be adjusted.
The determining unit 32 is configured to determine a display area of the application interface to be adjusted on the terminal screen, and acquire a height and a width of the display area.
The calculating unit 33 is configured to calculate a first pixel width and a first pixel height of the display area according to the target pixel aspect ratio of the application interface to be adjusted, which is acquired by the first acquiring unit 31, and the height of the display area and the width of the display area, which are acquired by the determining unit 32.
The first pixel width and the first pixel height are the pixel width and the pixel height of an optimal undistorted picture that can be displayed when the display area displays an image with a target pixel width-height ratio.
And a second obtaining unit 34, configured to obtain an optimal application interface pixel from a preconfigured application interface pixel database according to the target pixel aspect ratio of the application interface to be adjusted obtained by the first obtaining unit 31 and the first pixel width or the first pixel height calculated by the calculating unit 33.
And the adjusting unit 35 is configured to adjust the current pixel of the application interface to be adjusted to the optimal application interface pixel 34 acquired by the second acquiring unit.
Optionally, the application interface to be adjusted includes a preview interface of a camera of the terminal or a video playing interface of the terminal.
Optionally, the calculating unit 33 is specifically configured to: when the width of the display area is larger than the product of the height of the display area and the aspect ratio of the target pixel of the application interface to be adjusted, taking the height of the display area as the first pixel height of the display area, and rounding the product of the height of the display area and the aspect ratio of the target pixel of the application interface to be adjusted as the first pixel width of the display area; or, when the width of the display area is less than or equal to the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, taking the width of the display area as the first pixel width of the display area, and taking the product of the width of the display area and the target pixel aspect ratio of the application interface to be adjusted as the first pixel height of the display area.
Optionally, as shown in fig. 4, the second obtaining unit 34 includes: a matching module 341, an obtaining module 342, and a first selecting module 343, where:
the matching module 341 is configured to match the pixel aspect ratio of the application interface to be adjusted, acquired by the first acquiring unit 31, with the pixel aspect ratio of each application interface pixel in the application interface pixel database.
The obtaining module 342 is configured to obtain a target application interface pixel set.
The target application interface pixel set comprises target application interface pixels with the same aspect ratio as the pixel of the application interface to be adjusted and target application interface pixels with the aspect ratio difference value of the pixel of the application interface to be adjusted within a preset range.
A first selecting module 343, configured to, when the width of the display area is greater than the product of the height of the display area and the aspect ratio of the target pixel of the application interface to be adjusted, select, from the application interface pixel set acquired by the acquiring module 342, a target application interface pixel with a smallest difference value with the first pixel width as an optimal application interface pixel according to the first pixel width calculated by the calculating unit 33; or, when the width of the display area is less than or equal to the product of the height of the display area and the aspect ratio of the target pixel of the application interface to be adjusted, the target application interface pixel with the smallest difference value with the first pixel height is selected from the application interface pixel set according to the first pixel height calculated by the calculating unit 33 as the optimal application interface pixel.
Optionally, as shown in fig. 4, the second obtaining unit 34 further includes: a second selection module 344, wherein:
a second selecting module 344, configured to select, according to the first pixel width calculated by the calculating unit 33, an application interface pixel having a smallest difference from the first pixel width from the application interface pixel database as an optimal application interface pixel if the application interface pixel database does not include an application interface pixel that is the same as the pixel width-to-height ratio of the application interface to be adjusted acquired by the first acquiring unit 31 or a target application interface pixel whose difference from the pixel width-to-height ratio of the application interface to be adjusted is within a predetermined range, and the width of the display area is greater than a product of the height of the display area and the target pixel width-to-height ratio of the application interface to be adjusted;
or, if the application interface pixel database does not include an application interface pixel having the same pixel aspect ratio as the application interface to be adjusted acquired by the first acquiring unit 31 and the width of the display area is less than or equal to the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, the application interface pixel database selects the application interface pixel having the smallest difference with the first pixel height as the optimal application interface pixel according to the first pixel height calculated by the calculating unit 33.
Optionally, when the application interface to be adjusted is a preview interface of the terminal camera and the terminal camera is tested; as shown in fig. 3, the terminal further includes:
a selecting unit 36, configured to select a photographing pixel for the terminal camera from the application interface pixel database; wherein, the pixel aspect ratio of the photographing pixel is the target pixel aspect ratio of the application interface to be adjusted; when the terminal camera is tested, the pixel aspect ratio of the above-described photographed pixel is the same as the output ratio of the sensor in the terminal camera.
The terminal provided by the embodiment of the invention obtains the aspect ratio of the target pixel of the application interface to be adjusted; determining a display area of an application interface to be adjusted, and acquiring the height and the width of the display area; calculating a first pixel width and a first pixel height of a display area according to a target pixel aspect ratio of an application interface to be adjusted, the height of the display area and the width of the display area; acquiring an optimal application interface pixel from a pre-configured application interface pixel database according to the aspect ratio of a target pixel of an application interface to be adjusted and the width or height of a first pixel; and adjusting the current pixel of the application interface to be adjusted into the optimal application interface pixel.
Compared with the prior art, when the screen size proportion of the Android terminal is not consistent with the sensor output proportion of the camera module, in order to achieve undistorted preview, the Android generally matches Android devices with different size proportions by cutting a preview picture. The method comprises the steps of setting the aspect ratio of a target pixel according to the application interface to be adjusted by selecting photographing pixels with different pixel ratios, and then calculating the optimal application interface pixel corresponding to the application interface to be adjusted under different aspect ratios of the target pixel. Therefore, full-view or full-screen display can be realized under the condition that the distortion of the picture of the terminal application interface is not guaranteed, the experience degree of a user is improved, the pixel width-height ratio of the preview interface of the android terminal is set to be the output proportion of the sensor in the camera module when the camera module is detected, and then the optimal application interface pixel is calculated according to the output proportion, so that the equal proportion and the zooming-free full-view display are realized, more comprehensive detection of each imaging part of the terminal camera module by a production line worker is facilitated, the omission of a problem product is avoided, and the work detection efficiency of a manufacturer is improved.
It will be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
All or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1.一种终端应用界面像素调整方法,其特征在于,包括:1. A terminal application interface pixel adjustment method, characterized in that, comprising: 获取待调整应用界面的目标像素宽高比;Obtain the target pixel aspect ratio of the application interface to be adjusted; 确定所述待调整应用界面在终端屏幕的显示区域,获取所述显示区域的高度和宽度;Determine the display area of the application interface to be adjusted on the terminal screen, and obtain the height and width of the display area; 根据所述待调整应用界面的目标像素宽高比,以及所述显示区域的高度和所述显示区域的宽度,计算所述显示区域的第一像素宽度和第一像素高度;calculating a first pixel width and a first pixel height of the display area according to the target pixel aspect ratio of the application interface to be adjusted, and the height of the display area and the width of the display area; 根据所述待调整应用界面的目标像素宽高比以及所述第一像素宽度,或,根据所述待调整应用界面的目标像素宽高比以及所述第一像素高度,从预配置的应用界面像素数据库中获取最优应用界面像素;According to the target pixel aspect ratio of the application interface to be adjusted and the first pixel width, or, according to the target pixel aspect ratio of the application interface to be adjusted and the first pixel height, from a preconfigured application interface Obtain the optimal application interface pixel from the pixel database; 将所述待调应用界面当前的像素调整为所述最优应用界面像素;Adjusting the current pixel of the application interface to be adjusted to the optimal application interface pixel; 所述根据所述待调整应用界面的目标像素宽高比,以及所述显示区域的高度和所述显示区域的宽度,计算所述显示区域的第一像素宽度和第一像素高度具体包括:The calculating the first pixel width and the first pixel height of the display area according to the target pixel aspect ratio of the application interface to be adjusted, and the height of the display area and the width of the display area specifically includes: 当所述显示区域的宽度大于所述显示区域的高度与所述待调整应用界面的目标像素宽高比的乘积时,则将所述显示区域的高度作为所述显示区域的第一像素高度,将所述显示区域的高度与所述待调整应用界面的目标像素宽高比的乘积取整作为所述显示区域的第一像素宽度;When the width of the display area is greater than the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, the height of the display area is used as the first pixel height of the display area, rounding off the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted as the first pixel width of the display area; 或者,or, 当所述显示区域的宽度小于或等于所述显示区域的高度与所述待调整应用界面的目标像素宽高比的乘积时,则将所述显示区域的宽度作为所述显示区域的第一像素宽度,将所述显示区域的宽度与所述待调整应用界面的目标像素宽高比的乘积取整作为所述显示区域的第一像素高度。When the width of the display area is less than or equal to the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, then use the width of the display area as the first pixel of the display area Width, the product of the width of the display area and the target pixel aspect ratio of the application interface to be adjusted is rounded to an integer as the first pixel height of the display area. 2.根据权利要求1所述的方法,其特征在于,所述待调整应用界面包括终端摄像头camera的预览界面或所述终端的视频播放界面。2 . The method according to claim 1 , wherein the application interface to be adjusted includes a preview interface of the terminal camera or a video playback interface of the terminal. 3 . 3.根据权利要求1或2所述的方法,其特征在于,所述根据所述待调整应用界面的目标像素宽高比以及所述第一像素宽度,或,根据所述待调整应用界面的目标像素宽高比以及所述第一像素高度,从预配置的应用界面像素数据库中获取最优应用界面像素具体包括:3. The method according to claim 1 or 2, characterized in that, according to the target pixel aspect ratio of the application interface to be adjusted and the first pixel width, or, according to the aspect ratio of the application interface to be adjusted The target pixel aspect ratio and the first pixel height, and obtaining the optimal application interface pixel from the pre-configured application interface pixel database specifically includes: 将所述待调整应用界面的目标像素宽高比与所述应用界面像素数据库中的每个应用界面像素的像素宽高比进行匹配;matching the target pixel aspect ratio of the application interface to be adjusted with the pixel aspect ratio of each application interface pixel in the application interface pixel database; 获取目标应用界面像素集;所述目标应用界面像素集中包含与所述待调整应用界面的目标像素宽高比相同的目标应用界面像素,以及与所述待调整应用界面的目标像素宽高比的差值在预定范围内的目标应用界面像素;Obtaining a target application interface pixel set; the target application interface pixel set includes target application interface pixels with the same target pixel aspect ratio as the application interface to be adjusted, and a target application interface pixel with the same aspect ratio as the target pixel aspect ratio of the application interface to be adjusted Target application interface pixels whose difference is within a predetermined range; 当所述显示区域的宽度大于所述显示区域的高度与所述待调整应用界面的目标像素宽高比的乘积时,则根据所述第一像素宽度,从所述应用界面像素集中,选择与所述第一像素宽度间的差值最小的目标应用界面像素,作为最优应用界面像素;When the width of the display area is greater than the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, then according to the first pixel width, from the set of pixels of the application interface, select and The target application interface pixel with the smallest difference between the first pixel widths is used as the optimal application interface pixel; 或者,当所述显示区域的宽度小于或等于所述显示区域的高度与所述待调整应用界面的目标像素宽高比的乘积时,则根据所述第一像素高度,从所述应用界面像素集中,选择与所述第一像素高度间的差值最小的目标应用界面像素,作为最优应用界面像素。Or, when the width of the display area is less than or equal to the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, according to the first pixel height, pixels from the application interface Concentrating on, selecting the target application interface pixel with the smallest difference from the first pixel height as the optimal application interface pixel. 4.根据权利要求3所述的方法,其特征在于,所述将所述待调整应用界面的目标像素宽高比与所述应用界面像素数据库中的每个应用界面像素的像素宽高比进行匹配之后,所述方法还包括:4. The method according to claim 3, wherein the step is to perform a comparison between the target pixel aspect ratio of the application interface to be adjusted and the pixel aspect ratio of each application interface pixel in the application interface pixel database. After matching, the method also includes: 若所述应用界面像素数据库中未包含与所述待调整应用界面的目标像素宽高比相同的应用界面像素或与所述待调整应用界面的目标像素宽高比的差值在预定范围内的目标应用界面像素,且所述显示区域的宽度大于所述显示区域的高度与所述待调整应用界面的目标像素宽高比的乘积时,则根据所述第一像素宽度,从所述应用界面像素数据库中,选择与所述第一像素宽度差值最小的应用界面像素作为最优应用界面像素;If the application interface pixel database does not contain the same application interface pixel as the target pixel aspect ratio of the application interface to be adjusted or the difference between the target pixel aspect ratio of the application interface to be adjusted is within a predetermined range target application interface pixels, and the width of the display area is greater than the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, then according to the first pixel width, from the application interface In the pixel database, select the application interface pixel with the smallest width difference from the first pixel as the optimal application interface pixel; 或者,若所述应用界面像素数据库中未包含与所述待调整应用界面的目标像素宽高比相同的应用界面像素,且所述显示区域的宽度小于或等于所述显示区域的高度与所述待调整应用界面的目标像素宽高比的乘积时,则根据所述第一像素高度,从应用界面像素数据库中,选择与所述第一像素高度差值最小的应用界面像素作为最优应用界面像素。Or, if the application interface pixel database does not contain an application interface pixel with the same aspect ratio as the target pixel aspect ratio of the application interface to be adjusted, and the width of the display area is less than or equal to the height of the display area and the When the product of the target pixel aspect ratio of the application interface is to be adjusted, according to the first pixel height, from the application interface pixel database, select the application interface pixel with the smallest difference from the first pixel height as the optimal application interface pixels. 5.根据权利要求1所述的方法,其特征在于,当所述待调整应用界面为所述终端camera的预览界面;所述获取待调整应用界面的目标像素宽高比之前,所述方法还包括:5. The method according to claim 1, wherein, when the application interface to be adjusted is the preview interface of the terminal camera; before the acquisition of the target pixel aspect ratio of the application interface to be adjusted, the method further include: 从所述应用界面像素数据库中,为所述终端camera选择拍照像素;其中,所述拍照像素的像素宽高比为所述待调整应用界面的目标像素宽高比;当对所述终端camera进行测试时,所述拍照像素的像素宽高比与所述终端camera中sensor的输出比例相同。From the application interface pixel database, select a camera pixel for the terminal camera; wherein, the pixel aspect ratio of the camera pixel is the target pixel aspect ratio of the application interface to be adjusted; when the terminal camera is performed During the test, the pixel aspect ratio of the camera pixel is the same as the output ratio of the sensor in the terminal camera. 6.一种终端,其特征在于,包括:6. A terminal, characterized in that, comprising: 第一获取单元,用于获取待调整应用界面的目标像素宽高比;The first acquisition unit is configured to acquire the target pixel aspect ratio of the application interface to be adjusted; 确定单元,用于确定所述待调整应用界面在终端屏幕的显示区域,获取所述显示区域的高度和宽度;A determining unit, configured to determine the display area of the application interface to be adjusted on the terminal screen, and obtain the height and width of the display area; 计算单元,用于根据所述第一获取单元获取的所述待调整应用界面的目标像素宽高比,以及所述确定单元获取的所述显示区域的高度和所述显示区域的宽度,计算所述显示区域的第一像素宽度和第一像素高度;A calculation unit, configured to calculate the aspect ratio of the target pixel of the application interface to be adjusted acquired by the first acquisition unit, and the height of the display area and the width of the display area acquired by the determination unit. The first pixel width and the first pixel height of the display area; 第二获取单元,用于根据所述第一获取单元获取的所述待调整应用界面的目标像素宽高比以及所述计算单元计算出的所述第一像素宽度,或,根据所述第一获取单元获取的所述待调整应用界面的目标像素宽高比以及所述第一像素高度,从预配置的应用界面像素数据库中获取最优应用界面像素;The second acquiring unit is configured to acquire according to the target pixel aspect ratio of the application interface to be adjusted acquired by the first acquiring unit and the first pixel width calculated by the calculation unit, or, according to the first The target pixel aspect ratio of the application interface to be adjusted and the first pixel height obtained by the obtaining unit obtain the optimal application interface pixel from a pre-configured application interface pixel database; 调整单元,用于将所述待调应用界面当前的像素调整为所述最优应用界面像素;An adjustment unit, configured to adjust the current pixel of the application interface to be adjusted to the optimal application interface pixel; 所述计算单元具体用于:当所述显示区域的宽度大于所述显示区域的高度与所述待调整应用界面的目标像素宽高比的乘积时,则将所述显示区域的高度作为所述显示区域的第一像素高度,将所述显示区域的高度与所述待调整应用界面的目标像素宽高比的乘积取整作为所述显示区域的第一像素宽度;或者,当所述显示区域的宽度小于或等于所述显示区域的高度与所述待调整应用界面的目标像素宽高比的乘积时,则将所述显示区域的宽度作为所述显示区域的第一像素宽度,将所述显示区域的宽度与所述待调整应用界面的目标像素宽高比的乘积取整作为所述显示区域的第一像素高度。The calculation unit is specifically configured to: when the width of the display area is greater than the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, then use the height of the display area as the The first pixel height of the display area, the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted is rounded as the first pixel width of the display area; or, when the display area When the width of the display area is less than or equal to the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, the width of the display area is taken as the first pixel width of the display area, and the The product of the width of the display area and the target pixel aspect ratio of the application interface to be adjusted is rounded to an integer as the first pixel height of the display area. 7.根据权利要求6所述的终端,其特征在于,所述待调整应用界面包括终端摄像头camera的预览界面或所述终端的视频播放界面。7. The terminal according to claim 6, wherein the application interface to be adjusted comprises a preview interface of a camera of the terminal or a video playback interface of the terminal. 8.根据权利要求6或7所述的终端,其特征在于,所述第二获取单元包括:8. The terminal according to claim 6 or 7, wherein the second obtaining unit comprises: 匹配模块,用于将所述第一获取单元获取的所述待调整应用界面的目标像素宽高比与所述应用界面像素数据库中的每个应用界面像素的像素宽高比进行匹配;A matching module, configured to match the target pixel aspect ratio of the application interface to be adjusted acquired by the first acquisition unit with the pixel aspect ratio of each application interface pixel in the application interface pixel database; 获取模块,用于获取目标应用界面像素集;所述目标应用界面像素集中包含与所述待调整应用界面的目标像素宽高比相同的目标应用界面像素,以及与所述待调整应用界面的目标像素宽高比的差值在预定范围内的目标应用界面像素;An acquisition module, configured to acquire a target application interface pixel set; the target application interface pixel set includes target application interface pixels with the same aspect ratio as the target pixel aspect ratio of the application interface to be adjusted, and a target application interface pixel set that is the same as the target pixel of the application interface to be adjusted Pixels of the target application interface whose pixel aspect ratio difference is within a predetermined range; 第一选择模块,用于当所述显示区域的宽度大于所述显示区域的高度与所述待调整应用界面的目标像素宽高比的乘积时,则根据所述计算单元计算的所述第一像素宽度,从所述获取模块获取的所述应用界面像素集中,选择与所述第一像素宽度间的差值最小的目标应用界面像素,作为最优应用界面像素;或者,用于当所述显示区域的宽度小于或等于所述显示区域的高度与所述待调整应用界面的目标像素宽高比的乘积时,则根据所述计算单元计算的所述第一像素高度,从所述应用界面像素集中,选择与所述第一像素高度间的差值最小的目标应用界面像素,作为最优应用界面像素。The first selection module is configured to: when the width of the display area is greater than the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, according to the first calculation unit calculated Pixel width, from the application interface pixel set acquired by the acquisition module, select the target application interface pixel with the smallest difference with the first pixel width as the optimal application interface pixel; or, when the When the width of the display area is less than or equal to the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, then according to the first pixel height calculated by the calculation unit, from the application interface In the pixel set, select the target application interface pixel with the smallest difference from the first pixel height as the optimal application interface pixel. 9.根据权利要求8所述的终端,其特征在于,所述第二获取单元,还包括:9. The terminal according to claim 8, wherein the second obtaining unit further comprises: 第二选择模块,用于若所述应用界面像素数据库中未包含与所述第一获取单元获取的所述待调整应用界面的目标像素宽高比相同的应用界面像素或与所述待调整应用界面的目标像素宽高比的差值在预定范围内的目标应用界面像素,且所述显示区域的宽度大于所述显示区域的高度与所述待调整应用界面的目标像素宽高比的乘积时,则根据所述计算单元计算的所述第一像素宽度,从所述应用界面像素数据库中,选择与所述第一像素宽度差值最小的应用界面像素作为最优应用界面像素;The second selection module is configured to: if the application interface pixel database does not contain an application interface pixel with the same aspect ratio as the target pixel aspect ratio of the application interface to be adjusted acquired by the first acquisition unit or an application interface pixel with the same aspect ratio as the application interface to be adjusted When the difference between the target pixel aspect ratio of the interface is within a predetermined range of target application interface pixels, and the width of the display area is greater than the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted , according to the first pixel width calculated by the calculation unit, from the application interface pixel database, select the application interface pixel with the smallest difference with the first pixel width as the optimal application interface pixel; 或者,用于若所述应用界面像素数据库中未包含与所述第一获取单元获取的所述待调整应用界面的目标像素宽高比相同的应用界面像素,且所述显示区域的宽度小于或等于所述显示区域的高度与所述待调整应用界面的目标像素宽高比的乘积时,则根据所述计算单元计算的所述第一像素高度,从应用界面像素数据库中,选择与所述第一像素高度差值最小的应用界面像素作为最优应用界面像素。Alternatively, if the application interface pixel database does not include an application interface pixel having the same aspect ratio as the target pixel aspect ratio of the application interface to be adjusted acquired by the first acquisition unit, and the width of the display area is smaller than or When it is equal to the product of the height of the display area and the target pixel aspect ratio of the application interface to be adjusted, then according to the first pixel height calculated by the calculation unit, from the application interface pixel database, select the The application interface pixel with the smallest first pixel height difference is used as the optimal application interface pixel. 10.根据权利要求6所述的终端,其特征在于,当所述待调整应用界面为所述终端camera的预览界面,且对所述终端进行camera测试时;所述终端还包括:10. The terminal according to claim 6, wherein when the application interface to be adjusted is a preview interface of the terminal camera, and the terminal is subjected to a camera test; the terminal further comprises: 选择单元,用于从所述应用界面像素数据库中,为所述终端camera选择拍照像素;其中,所述拍照像素的像素宽高比为所述待调整应用界面的目标像素宽高比;当对所述终端camera进行测试时,所述拍照像素的像素宽高比与所述终端camera中sensor的输出比例相同。A selection unit, configured to select a camera pixel for the terminal camera from the application interface pixel database; wherein, the pixel aspect ratio of the camera pixel is the target pixel aspect ratio of the application interface to be adjusted; When the terminal camera is testing, the pixel aspect ratio of the camera pixel is the same as the output ratio of the sensor in the terminal camera.
CN201410493952.1A 2014-09-24 2014-09-24 A kind of terminal applies interface pixel method of adjustment and terminal Active CN104270579B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410493952.1A CN104270579B (en) 2014-09-24 2014-09-24 A kind of terminal applies interface pixel method of adjustment and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410493952.1A CN104270579B (en) 2014-09-24 2014-09-24 A kind of terminal applies interface pixel method of adjustment and terminal

Publications (2)

Publication Number Publication Date
CN104270579A CN104270579A (en) 2015-01-07
CN104270579B true CN104270579B (en) 2018-06-05

Family

ID=52162064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410493952.1A Active CN104270579B (en) 2014-09-24 2014-09-24 A kind of terminal applies interface pixel method of adjustment and terminal

Country Status (1)

Country Link
CN (1) CN104270579B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446796B (en) * 2015-11-30 2018-10-23 金蝶软件(中国)有限公司 A kind of analogy method and equipment of mobile light application
CN105511829A (en) * 2015-12-09 2016-04-20 广州视睿电子科技有限公司 Method and system for adaptively adjusting display scale of office software
CN105809624B (en) * 2016-03-07 2018-11-13 中国科学院信息工程研究所 A kind of image display adaptation method relying on viewing condition
CN106331488A (en) * 2016-08-25 2017-01-11 天脉聚源(北京)传媒科技有限公司 Interface adjusting method and device
CN109697377B (en) * 2018-12-19 2021-04-09 Oppo广东移动通信有限公司 Anti-peeping method, apparatus, electronic device, and computer-readable storage medium
CN110636354A (en) * 2019-06-10 2019-12-31 青岛海信电器股份有限公司 Display device
CN112148398B (en) * 2019-06-28 2022-10-11 杭州海康机器人技术有限公司 Image processing method and device
CN113051010B (en) * 2019-12-28 2023-04-28 Oppo(重庆)智能科技有限公司 Application picture adjustment method and related device in wearable equipment
CN111770275B (en) * 2020-07-02 2022-05-03 维沃移动通信有限公司 Shooting method and device, electronic equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662605A (en) * 2009-09-17 2010-03-03 青岛海信电器股份有限公司 Method and device for adjusting display scale of television
CN102571769A (en) * 2010-12-31 2012-07-11 北京华夏未来信息技术有限公司 Terminal resolution adaptation method and system
CN103546689A (en) * 2013-10-11 2014-01-29 Tcl集团股份有限公司 Resolution ratio acquiring method and device of external camera of android system
WO2014036741A1 (en) * 2012-09-10 2014-03-13 华为技术有限公司 Image processing method and image processing device
CN103700360A (en) * 2013-12-09 2014-04-02 乐视致新电子科技(天津)有限公司 Screen display proportion regulating method and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662605A (en) * 2009-09-17 2010-03-03 青岛海信电器股份有限公司 Method and device for adjusting display scale of television
CN102571769A (en) * 2010-12-31 2012-07-11 北京华夏未来信息技术有限公司 Terminal resolution adaptation method and system
WO2014036741A1 (en) * 2012-09-10 2014-03-13 华为技术有限公司 Image processing method and image processing device
CN103546689A (en) * 2013-10-11 2014-01-29 Tcl集团股份有限公司 Resolution ratio acquiring method and device of external camera of android system
CN103700360A (en) * 2013-12-09 2014-04-02 乐视致新电子科技(天津)有限公司 Screen display proportion regulating method and electronic equipment

Also Published As

Publication number Publication date
CN104270579A (en) 2015-01-07

Similar Documents

Publication Publication Date Title
CN104270579B (en) A kind of terminal applies interface pixel method of adjustment and terminal
EP3694203A1 (en) Method and device for obtaining exposure compensation value of high-dynamic-range image
EP3308537B1 (en) Calibration of defective image sensor elements
CN109844804B (en) Image detection method, device and terminal
CN112565589A (en) Photographing preview method and device, storage medium and electronic equipment
CN104243813A (en) Image evaluation method, image capturing method and digital camera thereof
JP2017516421A (en) Mobile terminal and imaging method thereof
CN106576143A (en) Image photographing apparatus and image photographing method
CN103347152A (en) Method, device and terminal for picture processing
KR20140028131A (en) Adaptive text font and image adjustments in smart handheld devices for improved usability
WO2016112704A1 (en) Method and device for adjusting focal length of projector, and computer storage medium
JP2013125270A (en) System and method for automatically adjusting electronic display settings
US10567721B2 (en) Using a light color sensor to improve a representation of colors in captured image data
US9332175B2 (en) Image photographing apparatus and photographing method thereof
CN106454081A (en) Photographing method and device
US20190082092A1 (en) Imaging apparatus, image processing apparatus, imaging method, image processing method, and storage medium
US20130257896A1 (en) Display device
KR20170011876A (en) Image processing apparatus and method for operating thereof
KR20170048454A (en) Image processing method and device
TWI604413B (en) Image processing method and image processing device
CN111614865B (en) Multi-shot brightness synchronization method, equipment, device and storage medium
WO2016123850A1 (en) Photographing control method for terminal, and terminal
US20190052803A1 (en) Image processing system, imaging apparatus, image processing apparatus, control method, and storage medium
CN115134564A (en) Photographing method, photographing apparatus, electronic device, and readable storage medium
CN113709326A (en) Lens shadow correction method and device and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Country or region after: China

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.

Country or region before: China