CN114422694B - Preview resolution adaptation method and device and electronic equipment - Google Patents

Preview resolution adaptation method and device and electronic equipment Download PDF

Info

Publication number
CN114422694B
CN114422694B CN202210056948.3A CN202210056948A CN114422694B CN 114422694 B CN114422694 B CN 114422694B CN 202210056948 A CN202210056948 A CN 202210056948A CN 114422694 B CN114422694 B CN 114422694B
Authority
CN
China
Prior art keywords
resolution
preview
expected
initial target
width
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
CN202210056948.3A
Other languages
Chinese (zh)
Other versions
CN114422694A (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.)
Hangzhou Douku Software Technology Co Ltd
Original Assignee
Hangzhou Douku Software 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 Hangzhou Douku Software Technology Co Ltd filed Critical Hangzhou Douku Software Technology Co Ltd
Priority to CN202210056948.3A priority Critical patent/CN114422694B/en
Publication of CN114422694A publication Critical patent/CN114422694A/en
Application granted granted Critical
Publication of CN114422694B publication Critical patent/CN114422694B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

The application relates to a preview resolution adaptation method, comprising the following steps: acquiring a candidate resolution set supported by the device and expected preview resolution; obtaining an enlarged preview resolution based on the desired preview resolution, the desired preview resolution being less than the enlarged preview resolution; screening the candidate resolution set based on the expected preview resolution and the enlarged preview resolution to obtain an initial target resolution set, wherein the resolution corresponding to the initial target resolution in the initial target resolution set is between the expected preview resolution and the enlarged preview resolution; determining the equipment resolution ratio corresponding to the initial target resolution in the initial target resolution set, determining the expected resolution ratio corresponding to the expected preview resolution, and screening from the initial target resolution set to obtain the target preview resolution; and the image is acquired through the target preview resolution, so that the preview effect of the image is improved.

Description

Preview resolution adaptation method and device and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a preview resolution adaptation method and apparatus, an electronic device, and a computer readable storage medium.
Background
Along with the development of the technology in the technical field of computers, shooting pictures becomes an important function of a terminal, and the terminal can display pictures shot by a camera in a preview window.
However, there will typically be a case where the preview window resolution of the terminal is not the same as all the preview resolutions supported by the camera. In this case, the screen resolution is generally used as the resolution of the preview interface, and the maximum preview resolution closest to the screen resolution is selected from all the preview resolutions included in the camera.
Disclosure of Invention
The embodiment of the application provides a preview resolution adaptation method and device, electronic equipment and a computer readable storage medium, which can calculate the resolution of a camera closest to any expected resolution and adapt to a preview window with any self-defined size, thereby effectively improving the preview effect of an image.
A preview resolution adaptation method, comprising:
acquiring a candidate resolution set supported by the device and expected preview resolution;
obtaining an enlarged preview resolution based on the desired preview resolution, the desired preview resolution being less than the enlarged preview resolution;
Screening the candidate resolution set based on the expected preview resolution and the enlarged preview resolution to obtain an initial target resolution set, wherein the resolution corresponding to the initial target resolution in the initial target resolution set is between the expected preview resolution and the enlarged preview resolution;
determining equipment resolution ratio corresponding to initial target resolution in the initial target resolution set, determining expected resolution ratio corresponding to the expected preview resolution, and screening from the initial target resolution set based on the equipment resolution ratio and the expected resolution ratio to obtain target preview resolution;
and acquiring an image through the target preview resolution.
A preview resolution adaptation device comprising:
the acquisition module is used for acquiring a candidate resolution set supported by the device and the expected preview resolution;
an expansion module for obtaining an expanded preview resolution based on the desired preview resolution, the desired preview resolution being less than the expanded preview resolution;
a first screening module, configured to screen from the candidate resolution sets based on the desired preview resolution and the enlarged preview resolution to obtain an initial target resolution set, where a resolution corresponding to the initial target resolution in the initial target resolution set is between the desired preview resolution and the enlarged preview resolution;
The second screening module is used for determining equipment resolution ratio corresponding to the initial target resolution in the initial target resolution set, determining expected resolution ratio corresponding to the expected preview resolution, and screening the initial target resolution set to obtain target preview resolution based on the equipment resolution ratio and the expected resolution ratio;
and the acquisition module is used for acquiring images through the target preview resolution.
An electronic device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring a candidate resolution set supported by the device and expected preview resolution;
obtaining an enlarged preview resolution based on the desired preview resolution, the desired preview resolution being less than the enlarged preview resolution;
screening the candidate resolution set based on the expected preview resolution and the enlarged preview resolution to obtain an initial target resolution set, wherein the resolution corresponding to the initial target resolution in the initial target resolution set is between the expected preview resolution and the enlarged preview resolution;
Determining equipment resolution ratio corresponding to initial target resolution in the initial target resolution set, determining expected resolution ratio corresponding to the expected preview resolution, and screening from the initial target resolution set based on the equipment resolution ratio and the expected resolution ratio to obtain target preview resolution;
and acquiring an image through the target preview resolution.
A computer readable storage medium having stored thereon a computer program which, when executed by a processor, causes the processor to perform the steps of:
acquiring a candidate resolution set supported by the device and expected preview resolution;
obtaining an enlarged preview resolution based on the desired preview resolution, the desired preview resolution being less than the enlarged preview resolution;
screening the candidate resolution set based on the expected preview resolution and the enlarged preview resolution to obtain an initial target resolution set, wherein the resolution corresponding to the initial target resolution in the initial target resolution set is between the expected preview resolution and the enlarged preview resolution;
determining equipment resolution ratio corresponding to initial target resolution in the initial target resolution set, determining expected resolution ratio corresponding to the expected preview resolution, and screening from the initial target resolution set based on the equipment resolution ratio and the expected resolution ratio to obtain target preview resolution;
And acquiring an image through the target preview resolution.
The preview resolution adaptation method, the device, the electronic equipment and the computer readable storage medium are used for acquiring a candidate resolution set supported by the equipment and the expected preview resolution; obtaining an enlarged preview resolution based on the desired preview resolution, the desired preview resolution being less than the enlarged preview resolution; screening the candidate resolution set based on the expected preview resolution and the enlarged preview resolution to obtain an initial target resolution set, wherein the resolution corresponding to the initial target resolution in the initial target resolution set is between the expected preview resolution and the enlarged preview resolution; determining equipment resolution ratio corresponding to initial target resolution in an initial target resolution set, determining expected resolution ratio corresponding to expected preview resolution, and screening from the initial target resolution set based on the equipment resolution ratio and the expected resolution ratio to obtain target preview resolution; the image is acquired through the target preview resolution, and the target preview resolution is based on the enlarged preview resolution and the ratio of the device resolution to the expected resolution, so that the camera resolution closest to any expected resolution is calculated, the risks of terminal preview blocking and power consumption surge caused by overlarge resolution selection are reduced, and the self-defined preview window with any size can be adapted instead of limiting the preview window to the size of the screen resolution, so that the preview effect of the image is effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is an application environment diagram of a preview resolution adaptation method in one embodiment;
FIG. 2 is a flow chart of a preview resolution adaptation method in one embodiment;
FIG. 3 is a schematic diagram of an interface for displaying a target image through a preview window in one embodiment;
FIG. 4 is a flow diagram of determining a target preview resolution in one embodiment;
FIG. 5 is a flow diagram of adjusting display of an acquired target image based on a desired preview resolution in one embodiment;
FIG. 6 is a schematic diagram of determining a target preview resolution in one embodiment;
FIG. 7 is a block diagram of a preview resolution adaptation device in one embodiment;
fig. 8 is a block diagram of an internal structure of an electronic device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
FIG. 1 is an application environment diagram of a preview resolution adaptation method in one embodiment. As shown in fig. 1, the application environment includes a terminal 110 and a server 120, and the preview resolution adaptation method may be independently performed by the terminal 110 or the server 120, or may be performed by the terminal 110 or the server 120 in cooperation. The terminal 110 or the server 120 acquires a set of candidate resolutions for which preview resolution and device support are desired; obtaining an enlarged preview resolution based on the desired preview resolution, the desired preview resolution being less than the enlarged preview resolution; screening the candidate resolution set based on the expected preview resolution and the enlarged preview resolution to obtain an initial target resolution set, wherein the resolution corresponding to the initial target resolution in the initial target resolution set is between the expected preview resolution and the enlarged preview resolution; determining equipment resolution ratio corresponding to initial target resolution in the initial target resolution set, determining expected resolution ratio corresponding to the expected preview resolution, and screening from the initial target resolution set based on the equipment resolution ratio and the expected resolution ratio to obtain target preview resolution; if done in terminal 110, the image is captured at the terminal with the target preview resolution, and if done in server 120, the target preview resolution is sent to terminal 110 to cause terminal 110 to capture the image with the target preview resolution. The terminal 110 may be a terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant ), a car computer, a wearable device, etc. Wherein the server 120 may be a server or a cluster of servers.
When the optimal preview resolution is calculated in a conventional mode, when a value consistent with the screen resolution is not obtained, the maximum value in the estimated size range is taken, and the larger the resolution is, the larger the size of a preview frame captured in real time is, the higher the memory occupation is, the problems of preview blocking and the like are easily caused, and particularly, the power consumption is rapidly increased on some machines with poor performance; the calculated optimal preview resolution is closest to the screen resolution ratio and is not suitable for preview windows with any size, if the difference between the user-defined preview window and the screen resolution is larger, a more obvious preview stretching problem can occur.
FIG. 2 is a flow diagram of a preview resolution adaptation method in one embodiment. The preview resolution adaptation method shown in fig. 2 may be applied to the terminal 110 or the server 120, and includes:
step 202, a set of candidate resolutions for which preview resolution and device support are desired is obtained.
The expected preview resolution is the window size required by the service, if the code scanning service is full-screen, the expected preview resolution is equal to the screen resolution at the moment, and the face detection window can be a small-range round or square window for the face detection service, the expected preview resolution is smaller than the screen resolution, and the expected preview resolution is not fixed in size according to the preview resolution appointed by the actual scene by a user, and is related to the application type and the shooting scene type, wherein the application type comprises code scanning payment type, face recognition type and the like, and the shooting scene type comprises face shooting, article shooting, scene shooting and the like. In one embodiment, the desired preview resolution is determined according to at least one of an application type, a shooting scene type, and a shooting subject category.
Specifically, the candidate resolution set supported by the device is an attribute of the terminal camera hardware, and the candidate resolution set supported by the terminal camera can be obtained through an operating system of the device. There are many sizes in the candidate resolution set that are different, i.e., candidate preview resolutions. When photographing, only one resolution can be selected from the candidate resolution sets, and if the resolution outside the candidate resolution sets is set, photographing cannot be completed. In the candidate resolution set, sizes without terminal screen resolution may occur. For example, the screen resolution of the terminal is 1080 x 1980, the aspect ratio is about 1.83, but the preview resolution list has no size 1080 x 1980, and only 1280 x 2560, the aspect ratio is about 2. In one embodiment, for example, the terminal screen resolution is 1080×1920 the candidate resolution set { an } supported by the camera is { (540×960), (720×1080) }.
In step 204, an enlarged preview resolution is derived based on the desired preview resolution, the desired preview resolution being less than the enlarged preview resolution.
Where the product of the desired width and the desired height is the desired preview resolution, such as 1080 x 1980 for the desired preview resolution, where the desired width is 1080 and the desired height is 1980.
Specifically, the enlarged preview resolution is obtained based on the desired preview resolution, at least one of the desired width and the desired height is enlarged by an enlarging operation, so that the enlarged preview resolution is obtained, at least one of the corresponding enlarged width and the enlarged height is obtained by calculating by the enlarging function with the at least one of the desired width and the desired height as variables, respectively, and the enlarging operation for obtaining the enlarged width and the enlarged height may be the same or different. The expansion operation may be a linear operation or a nonlinear operation based on at least one of the desired width and the desired height.
In one embodiment, the at least one of the desired width and the desired height is enlarged by an enlargement parameter that may be custom, such as an enlargement parameter of 1.5 for the desired width, an enlargement parameter of 1.2 for the desired height, or an enlargement parameter of 1.5 for both the desired width and the desired height. In one embodiment, the expansion parameter is related to the application type, the shooting scene type.
Step 206, screening the candidate resolution set based on the desired preview resolution and the enlarged preview resolution to obtain an initial target resolution set, wherein the resolution corresponding to the initial target resolution in the initial target resolution set is between the desired preview resolution and the enlarged preview resolution.
Specifically, traversing the candidate resolution set, and screening from the candidate resolution set to obtain an initial target resolution set, wherein each initial target resolution in the initial target resolution set meets the following conditions: the initial target resolution corresponds to a resolution between the desired preview resolution and the enlarged preview resolution. The resolution corresponding to the initial target resolution being between the desired preview resolution and the enlarged preview resolution means that the resolution corresponding to the initial target resolution may be any one of a value greater than or equal to the desired preview resolution and less than or equal to the enlarged preview resolution.
Step 208, determining a device resolution ratio corresponding to the initial target resolution in the initial target resolution set, determining an expected resolution ratio corresponding to the expected preview resolution, and screening the initial target resolution set to obtain the target preview resolution based on the device resolution ratio and the expected resolution ratio.
The device resolution ratio refers to a ratio between a resolution width and a resolution height corresponding to the initial target resolution, and may be a ratio obtained by comparing the resolution width with the resolution height, or a ratio obtained by comparing the resolution height with the resolution width. The desired resolution ratio is a ratio between a resolution width and a resolution height corresponding to the desired preview resolution, and may be a ratio obtained by comparing the resolution width with the resolution height, or a ratio obtained by comparing the resolution height with the resolution width. It will be appreciated that the device resolution ratio is consistent with the manner in which the ratio is calculated with respect to the desired resolution ratio, e.g., the device resolution ratio is an aspect ratio, the desired resolution ratio is an aspect ratio, the device resolution ratio is an aspect ratio, and the desired resolution ratio is an aspect ratio.
And screening the target preview resolution from the initial target resolution set based on the equipment resolution ratio and the expected resolution ratio, wherein the screening condition is that the smaller the distance between the equipment resolution ratio and the expected resolution ratio is, the better the distance is, and the calculation mode of the distance can be customized.
At step 210, an image is acquired with a target preview resolution.
Specifically, the camera acquires the picture according to the target preview resolution, and the target preview resolution is based on the enlarged width and the enlarged height, and the device resolution ratio is the camera resolution closest to any desired resolution, so that the risk of terminal preview jamming and power consumption rising caused by excessive resolution selection is reduced, and the method can adapt to the preview window with any size defined by users, rather than limit the preview window to the size of the screen resolution. After the image is acquired with the target preview resolution, it can be presented through a preview window corresponding to the desired preview resolution.
In one embodiment, the preview window can be adjusted based on the target preview resolution, so that the preview window is more suitable for the image acquired by the target preview resolution, and the optimal display effect is achieved by dynamically adjusting the layout size of the preview window, so that the preview stretching problem is avoided. As shown in fig. 3, in an embodiment, the image is acquired by the target preview resolution and then displayed in the preview window, and the image is matched with the preview window, so that there is no preview stretching problem.
The preview resolution adaptation method in the embodiment obtains a candidate resolution set supported by the device and expected preview resolution; obtaining an enlarged preview resolution based on a desired preview resolution, the desired preview resolution being less than the enlarged preview resolution; screening an initial target resolution set from the candidate resolution sets based on the expected preview resolution and the enlarged preview resolution, wherein the resolution corresponding to the initial target resolution in the initial target resolution set is between the expected preview resolution and the enlarged preview resolution; determining equipment resolution ratio corresponding to initial target resolution in an initial target resolution set, determining expected resolution ratio corresponding to expected preview resolution, and screening from the initial target resolution set based on the equipment resolution ratio and the expected resolution ratio to obtain target preview resolution; the image is acquired through the target preview resolution, and the target preview resolution is based on the enlarged preview resolution and the ratio of the device resolution to the expected resolution, so that the camera resolution closest to any expected resolution is calculated, the risks of terminal preview blocking and power consumption surge caused by overlarge resolution selection are reduced, and the self-defined preview window with any size can be adapted instead of limiting the preview window to the size of the screen resolution, so that the preview effect of the image is effectively improved.
In one embodiment, step 204 includes: and acquiring the expected width and the expected height corresponding to the expected preview resolution, and obtaining the expanded width and the expanded height through expansion operation based on the expected width and the expected height.
Specifically, the expansion operation is used to expand the desired width and the desired height, and the corresponding expansion width and expansion height may be obtained by calculating the expansion function with the desired width and the desired height as variables, respectively, and the expansion operations corresponding to the expansion width and expansion height may be the same or different. The expansion operation may be a linear operation or a nonlinear operation based on a desired width and a desired height.
Step 206 comprises: and screening the initial target resolution set from the candidate resolution set based on the expected width and the expected height, wherein the resolution width corresponding to the initial target resolution in the initial target resolution set is between the expected width and the expected width, and the resolution height corresponding to the initial target resolution is between the expected width and the expected width.
Specifically, traversing the candidate resolution set, and screening from the candidate resolution set to obtain an initial target resolution set, wherein each initial target resolution in the initial target resolution set meets the following conditions: the resolution width corresponding to the initial target resolution is between the desired width and the enlarged width, and the resolution height corresponding to the initial target resolution is between the desired width and the enlarged width. The resolution width between the desired width and the enlarged width means that the resolution width may be any one of a value greater than or equal to the desired width and less than or equal to the enlarged width, and the resolution height between the desired width and the enlarged width means that the resolution height may be any one of a value greater than or equal to the desired height and less than or equal to the enlarged height.
In one embodiment, each candidate resolution in the candidate resolution set { an } is scaledOrdering from big to small, get { Sn }, where x ai Representing the resolution width, y, corresponding to the candidate resolution ai Representing the resolution height corresponding to the candidate resolution. Traversing { Sn }, taking all options that satisfy the following two conditions simultaneously:
q1*x b ≥x si ≥x b
q2*y b ≥y si ≥y b
wherein x is b Representing the resolution width, y, corresponding to the desired preview resolution b The resolution height corresponding to the desired preview resolution is represented, where q1, q2 represent the expansion parameters, which may be the same or different. X is x si Representing the resolution width, y, corresponding to each candidate resolution in Sn si Representing the correspondence of each candidate resolution in SnIs high.
In this embodiment, the desired width and the desired height are both enlarged, and the resolution width corresponding to the initial target resolution is between the desired width and the enlarged width, and the resolution height corresponding to the initial target resolution is between the desired width and the enlarged width, so that the selection of the initial target resolution strictly satisfies the condition, the matching degree of the camera resolution and the preview window is further improved, and the preview effect of the image can be further improved.
In one embodiment, step 204 includes: and acquiring an expansion factor, expanding the expected width by a corresponding multiple of expansion factor to obtain an expanded width, and expanding the expected height by a corresponding multiple of expansion factor to obtain an expanded height. Step 206 comprises: screening an initial target resolution from the candidate resolution set, wherein the resolution width corresponding to the initial target resolution is larger than or equal to the expected width, and the resolution width corresponding to the initial target resolution is smaller than or equal to the expansion width; the resolution height corresponding to the initial target resolution is larger than or equal to the expected height, and the resolution height corresponding to the initial target resolution is smaller than or equal to the expansion height; the initial target resolutions satisfying the condition constitute an initial target resolution set.
Specifically, the expansion factor is a value for expanding the desired width by a corresponding multiple, and the size of the expansion factor may be customized, in this embodiment, the expansion factor corresponding to the desired width is the same as the expansion factor corresponding to the desired width, for example, 1.5. The desired width is enlarged by a corresponding multiple of the enlargement factor, and the desired height is enlarged by a corresponding multiple of the same enlargement factor. All options are fetched that meet the following two conditions simultaneously:
q*x b ≥x ai ≥x b
q*y b ≥y ai ≥y b
wherein x is b Representing the resolution width, y, corresponding to the desired preview resolution b Representing the resolution height corresponding to the desired preview resolution, where q represents an expansion factor, x ai Representation ofResolution width, y, corresponding to each candidate resolution in candidate resolution set an ai Representing the resolution height corresponding to each candidate resolution in an.
In this embodiment, the desired width and the desired width can be rapidly enlarged only by the same enlarging factor, and the resolution width corresponding to the initial target resolution is limited to be smaller than or equal to the enlarging width; the resolution height corresponding to the initial target resolution is larger than or equal to the expected height, the resolution height corresponding to the initial target resolution is smaller than or equal to the enlarged height, and the initial target resolution meeting the conditions is formed into an initial target resolution set, so that the selected resolution is ensured to be at least not smaller than the expected preview resolution, the selected resolution is prevented from being smaller than the actual resolution, the resolution is reduced after enlargement and is smaller than the expected preview resolution after enlargement, the selected resolution is ensured not to be excessively large, and the risks of preview clamping and power consumption rising caused by excessively large resolution selection are reduced.
In one embodiment, as shown in FIG. 4, step 208 includes: .
In step 208A, a ratio of the resolution height to the resolution width corresponding to the initial target resolution is calculated to obtain a corresponding device resolution ratio.
Specifically, the initial target resolution set is denoted as { Pm }, where m represents the total number of initial target resolutions in the initial target resolution set, and the resolution height y corresponding to the initial target resolution is calculated pi And resolution width x pi Ratio of (2)The device resolution ratio is obtained.
In step 208B, a ratio of the resolution height to the resolution width corresponding to the desired preview resolution is calculated to obtain a corresponding desired resolution ratio.
Specifically, a resolution height y corresponding to the desired preview resolution is calculated b And resolution width x b The ratio of (2) to the corresponding desired resolution ratio
In step 208C, the absolute error of the device resolution scale to the desired resolution scale is calculated to obtain a scale error.
Specifically, the absolute error of the device resolution ratio to the desired resolution ratio is calculated by the following formula:
step 208D, sorting the scale errors according to the size, and selecting the initial target resolution corresponding to the minimum value in the scale errors as the target preview resolution.
Specifically, it willSorting by size, selecting the initial target resolution corresponding to the minimum value in the scale error as the target preview resolution, in one embodiment, { Pm } is scaled + ->Sequencing from small to large to obtain { Qm }, and taking the first term of { Qm }, namely the minimum value in the proportional error, to obtain Q0 as the target preview resolution. In one embodiment, the preview window corresponding to the desired preview resolution is adjusted according to the target preview resolution to obtain the target preview window, so that the proportion of the target preview window is consistent with the proportion of the target preview resolution, and the effect of the preview image is improved.
In this embodiment, by calculating the absolute error between the resolution ratio of the device and the desired resolution ratio, the initial target resolution corresponding to the minimum value in the ratio error is used as the target preview resolution, so that the obtained target preview resolution is guaranteed to be closest to the desired resolution ratio, thereby reducing the deformation of the image ratio, avoiding the preview stretching problem, and adapting to the preview window with any size defined by users.
In one embodiment, as shown in fig. 5, after step 210, the method further includes:
in step 310, a target image acquired by the target preview resolution is acquired, and the target image is enlarged based on the desired preview resolution, so that the aspect ratio of the enlarged adjustment image is consistent with the desired resolution ratio corresponding to the desired preview resolution.
Specifically, if the target preview resolution is 100×80, but the closest target preview resolution is 100×100, adjustment is needed, and the target image is enlarged based on the desired preview resolution, so that the aspect ratio of the enlarged adjustment image is consistent with the desired resolution ratio corresponding to the desired preview resolution, and the specific enlarging manner may be customized, so that the resolution ratio of the enlarged adjustment image also reaches the ratio of 100/80, and in one embodiment, the image with the aspect ratio of 100×100 may be enlarged to an image with the aspect ratio of 100×100/80 and the aspect ratio of 100 is high, so as to ensure that the aspect ratio is consistent with the aspect ratio corresponding to the desired preview resolution.
And step 320, clipping the adjustment image based on the expected preview resolution to obtain a target display image, and displaying the target display image in a preview window corresponding to the expected preview resolution.
Specifically, when the enlarged adjustment image is displayed to the preview window corresponding to the expected preview resolution, there is a problem that part of the edge image cannot be displayed, then the image exceeding the preview window corresponding to the expected preview resolution is cut to obtain the target display image, the target display image is displayed only in the preview window corresponding to the expected preview resolution, if the enlarged image is an image with the width of 100 x 100/80 and the height of 100, and the size of the preview window is 100 x 80, then the exact center of the image and the exact center of the preview window can be overlapped, and the part of the preview window which cannot be displayed is cut to obtain the target display image.
In this embodiment, the target image is enlarged based on the desired preview resolution, so that the aspect ratio of the enlarged adjustment image is consistent with the desired resolution ratio corresponding to the desired preview resolution, so that the problem of stretching deformation when the image is displayed in the preview window can be avoided, the target display image is obtained by clipping the adjustment image based on the desired preview resolution, the target display image is displayed in the preview window corresponding to the desired preview resolution, the preview display compatibility is better, the custom preview window with any size can be adapted, and the adaptation can be performed on the circular window for face detection and the double-preview window with double-shot and same opening.
In one embodiment, prior to step 202, further comprising: acquiring the type of the current application; the desired preview resolution is determined based on the type of current application.
Specifically, the types of the current application include various types, such as a code scanning payment type, a face verification type, a video communication type and the like, and the corresponding expected preview resolution is determined according to the type of the application, if full screen display is usually required for the code scanning payment type, the expected preview resolution is equal to the screen resolution, and for the face verification type, a window with a preset size can be used, and the expected preview resolution is smaller than the screen resolution. If a plurality of cameras exist, the expected preview resolution corresponding to each window can be determined according to the function corresponding to the window, and different functions can correspond to different expected preview resolutions, so that the matching of the preview image and the service function is achieved.
In this embodiment, the corresponding desired preview resolution is determined according to the type of the current application, so that the size of the preview window is matched with the function of the application, and the effectiveness of the application in image preview is improved.
In one embodiment, the method further comprises: different application windows which dynamically change along with time and sequentially appear are acquired, expected preview resolutions matched with the application windows are sequentially acquired, the application window corresponding to the current frame video image is acquired, the target preview resolution corresponding to the current frame video image is determined according to the method described in the embodiment based on the expected preview resolution of the application window corresponding to the current frame video image, the current frame image is acquired through the target preview resolution, and the current frame image is displayed in the corresponding application window.
Specifically, for the application window which dynamically changes along with time, the corresponding target preview resolution can be determined in sequence, so that the appropriate target preview resolution is dynamically selected along with time to acquire an image, the target preview resolution matched with the window can be determined even if the window dynamically changes along with time, and the image preview effect of each different window is improved. If the first time period shows the code scanning payment window, the corresponding expected preview resolution is determined to be the screen resolution, the second time period shows the face recognition window, the corresponding expected preview resolution is determined to be the preset resolution smaller than the screen resolution, and the corresponding target preview resolution is determined based on the method, so that the proper target preview resolution can be determined for each frame of image when the video stream is continuously acquired.
In this embodiment, by dynamically determining the target preview resolution corresponding to each frame of image in the video stream according to the expected preview resolution dynamically changing with time and matching with each application window, the target preview resolution matching with the window can be determined even if the window dynamically changes with time, and the image preview effect of each different window can be improved.
In a specific embodiment, the method and the device can be applied to face verification scenes in mobile phones. The following describes a preview resolution adaptation method provided by the embodiment of the present application, taking a preview resolution adaptation of a mobile phone in a face verification scene as an example, including the following steps, which may be combined with the schematic diagram shown in fig. 6:
1. scene determination
The method comprises the steps of obtaining a current application type, wherein the current application is a face verification type application, the screen resolution of a mobile phone is 1980 x 1080, and determining the expected preview resolution corresponding to the face verification type application to be 100 x 80.
2. Acquiring a candidate resolution set supported by the device, and pressing each candidate resolution in { an }, intoOrdering from big to small to obtain { Sn }
The set of candidate resolutions supported by the handset is { an }, including { (540×960), (720×1080), (100×120,), (100×100) } Pressing downThe { Sn } is obtained from the order of large to small as { (720×1080), (540×960), (100×120), (100×100) }.
3. And acquiring the expected width and the expected height corresponding to the expected preview resolution, and obtaining the expanded width and the expanded height through expansion operation based on the expected width and the expected height.
Specifically, an expansion factor of 1.5 is obtained, the desired width 100 corresponding to the desired preview resolution 100×80 is expanded by a corresponding multiple of the expansion factor to obtain an expanded width 150, and the desired height 80 is expanded by a corresponding multiple of the expansion factor to obtain an expanded height 120.
4. The expanded width and the expanded height are filtered from the candidate resolution set to obtain an initial target resolution set based on the desired width and the desired height.
Traversing { Sn }, taking all options that satisfy the following two conditions simultaneously:
1.5*x b ≥x si ≥x b
1.5*y b ≥y si ≥y b
the initial set of target resolutions is denoted as { Pm }, where { Pm } is { (100 x 120), (100 x 100) }.
5. And determining equipment resolution ratio corresponding to the initial target resolution in the initial target resolution set, determining expected resolution ratio corresponding to the expected preview resolution, and screening the initial target resolution set to obtain target preview resolution based on the equipment resolution ratio and the expected resolution ratio.
Specifically, { Pm } is pressedThe scale error corresponding to (100 x 120) from small to large is +.>(100 x 100) the corresponding proportional error is +.>The scale errors are ranked according to the size, and the initial target resolution corresponding to the minimum value in the scale errors is selected as the target preview resolution, so that the target preview resolution is selected to be (100 x 100). As shown in fig. 5, the desired target preview resolution x si *x si +y si *y si Is equal to or greater than (x) b *x b +y b *y b ) Less than or equal to 1.5 x 1.5 (x b *x b +y b *y b ) It is necessary to ensure that the selected resolution is at least not less than the desired preview resolution, preventing the selected resolution from being less than the actual resolution and the resolution from being reduced after magnification. In the figure, si represents each candidate resolution in the candidate resolution set { Sn }, pi represents the initial target resolution in the initial target resolution set { Pm }, and q0 represents the target preview resolution. The shaded portion of the figure represents the region where the initial target resolution set { Pm }.
6. And acquiring a target image acquired by target preview resolution, and amplifying the target image based on the expected preview resolution, so that the aspect ratio of the amplified adjustment image is consistent with the expected resolution ratio corresponding to the expected preview resolution.
Specifically, a target image is acquired through target preview resolution of 100×100, and the target image is enlarged based on the desired preview resolution of 100×80, so that the resolution ratio of the enlarged adjustment image also reaches a ratio of 100/80, and the image of 100×100 can be enlarged to an image with a width of 100×100/80 and a height of 100, so that the aspect ratio is ensured to be consistent with the aspect ratio corresponding to the desired preview resolution, and the enlarged image is 125×100. And aligning the center of the 125 x 100 image with the center of the preview window, cutting the part which cannot be displayed in the preview window, thus obtaining a target display image, and displaying in the preview window with the size of 100 x 80.
In this embodiment, the desired preview resolution and the candidate resolution set supported by the device are obtained; acquiring a desired width and a desired height corresponding to the desired preview resolution, and obtaining an enlarged width and an enlarged height through enlarging operation based on the desired width and the desired height; based on the expected width and the expected height, screening the expanded width and the expanded height from the candidate resolution set to obtain an initial target resolution set, wherein the resolution width corresponding to the initial target resolution in the initial target resolution set is between the expected width and the expanded width, and the resolution height corresponding to the initial target resolution is between the expected width and the expanded width; determining equipment resolution ratio corresponding to initial target resolution in an initial target resolution set, determining expected resolution ratio corresponding to expected preview resolution, and screening from the initial target resolution set based on the equipment resolution ratio and the expected resolution ratio to obtain target preview resolution; the image is acquired through the target preview resolution, and the target preview resolution is based on the expansion width and the expansion height, and the equipment resolution ratio is calculated to obtain the camera resolution closest to any expected resolution, so that risks of terminal preview clamping and power consumption surge caused by overlarge resolution selection are reduced, and the self-defined preview window with any size can be adapted, instead of limiting the preview window to the size of the screen resolution, and the preview effect of the image is effectively improved. The target image is enlarged based on the expected preview resolution, so that the aspect ratio of the enlarged adjustment image is consistent with the proportion of the expected resolution corresponding to the expected preview resolution, the problem of stretching deformation when the image is displayed in the preview window can be avoided, the target display image is obtained by cutting the adjustment image based on the expected preview resolution, the target display image is displayed in the preview window corresponding to the expected preview resolution, the preview display compatibility is better, the preview window with any size can be self-defined, and the circular window for face detection and the double-shot double-preview window with the same opening can be adapted.
It should be understood that, although the steps in the flowcharts of fig. 2, 4-5 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps of fig. 2, 4-5 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or stages are performed necessarily occur in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
Fig. 7 is a block diagram of a preview resolution adaptation apparatus 400 of an embodiment. As shown in fig. 7, a preview resolution adaptation apparatus 400 includes: an acquisition module 402, an expansion module 404, a first screening module 406, a second screening module 408, an acquisition module 410. Wherein:
an acquisition module 402 is configured to acquire a set of candidate resolutions for which preview resolution and device support are desired.
The expanding module 404 is configured to obtain an expanded preview resolution based on a desired preview resolution, where the desired preview resolution is less than the expanded preview resolution.
The first filtering module 406 is configured to filter an initial target resolution set from the candidate resolution sets based on the desired preview resolution and the enlarged preview resolution, where a resolution corresponding to the initial target resolution in the initial target resolution set is between the desired preview resolution and the enlarged preview resolution.
The second screening module 408 is configured to determine a device resolution ratio corresponding to an initial target resolution in the initial target resolution set, determine an expected resolution ratio corresponding to an expected preview resolution, and screen the target preview resolution from the initial target resolution set based on the device resolution ratio and the expected resolution ratio.
An acquisition module 410 for acquiring an image with a target preview resolution.
The preview resolution adapting device 400 in the present embodiment obtains a set of candidate resolutions for which preview resolution and device support are desired; obtaining an enlarged preview resolution based on the desired preview resolution, the desired preview resolution being less than the enlarged preview resolution; screening the candidate resolution set based on the expected preview resolution and the enlarged preview resolution to obtain an initial target resolution set, wherein the resolution corresponding to the initial target resolution in the initial target resolution set is between the expected preview resolution and the enlarged preview resolution; determining equipment resolution ratio corresponding to initial target resolution in an initial target resolution set, determining expected resolution ratio corresponding to expected preview resolution, and screening from the initial target resolution set based on the equipment resolution ratio and the expected resolution ratio to obtain target preview resolution; the image is acquired through the target preview resolution, and the target preview resolution is based on the enlarged preview resolution and the ratio of the device resolution to the expected resolution, so that the camera resolution closest to any expected resolution is calculated, the risks of terminal preview blocking and power consumption surge caused by overlarge resolution selection are reduced, and the self-defined preview window with any size can be adapted instead of limiting the preview window to the size of the screen resolution, so that the preview effect of the image is effectively improved.
In one embodiment, the expanding module 404 is further configured to obtain a desired width and a desired height corresponding to the desired preview resolution, and obtain an expanded width and an expanded height based on the desired width and the desired height, the desired width being smaller than the expanded width, and the desired height being smaller than the desired height;
the first filtering module 406 is further configured to filter, from the candidate resolution sets, an initial target resolution set based on a desired width and a desired height, a resolution width corresponding to an initial target resolution in the initial target resolution set being between the desired width and the enlarged width, and a resolution height corresponding to the initial target resolution being between the desired width and the enlarged width.
In this embodiment, the desired width and the desired height are both enlarged, and the resolution width corresponding to the initial target resolution is between the desired width and the enlarged width, and the resolution height corresponding to the initial target resolution is between the desired width and the enlarged width, so that the selection of the initial target resolution strictly satisfies the condition, the matching degree of the camera resolution and the preview window is further improved, and the preview effect of the image can be further improved.
In one embodiment, the expansion module 404 is further configured to obtain an expansion factor, expand the desired width by a corresponding multiple of the expansion factor, and expand the desired height by a corresponding multiple of the expansion factor; the first screening module is further configured to screen an initial target resolution from the candidate resolution set, where a resolution width corresponding to the initial target resolution is greater than or equal to the desired width, and a resolution width corresponding to the initial target resolution is less than or equal to the enlarged width; the resolution height corresponding to the initial target resolution is larger than or equal to the expected height, and the resolution height corresponding to the initial target resolution is smaller than or equal to the expansion height; the initial target resolutions satisfying the condition constitute the initial target resolution set. The preview resolution adapting device 400 in this embodiment composes the initial target resolutions satisfying the conditions into an initial target resolution set, so as to ensure that the selected resolution cannot be at least smaller than the desired preview resolution, prevent the selected resolution from being smaller than the actual resolution, reduce the resolution after amplification, and be smaller than the desired preview resolution after amplification, ensure that the selected resolution is not too large, and reduce the risk of preview jamming and power consumption surge caused by too large selection of the resolution.
In one embodiment, the second filtering module 408 is further configured to calculate a ratio of the resolution height to the resolution width corresponding to the initial target resolution to obtain a corresponding device resolution ratio; calculating the ratio of the resolution height to the resolution width corresponding to the expected preview resolution to obtain a corresponding expected resolution ratio; calculating the absolute error of the equipment resolution ratio and the expected resolution ratio to obtain a ratio error; and sequencing the proportional errors according to the size, and selecting an initial target resolution corresponding to the minimum value in the proportional errors as the target preview resolution.
The preview resolution adapting apparatus 400 in this embodiment calculates, by calculating the absolute error between the device resolution ratio and the desired resolution ratio, the initial target resolution corresponding to the minimum value in the ratio error as the target preview resolution, and ensures that the obtained target preview resolution is closest to the desired resolution ratio, thereby reducing the distortion of the image ratio, avoiding the preview stretching problem, and adapting to the preview window of any size defined by users.
In one embodiment, the apparatus further comprises:
an adjustment module 412, configured to acquire a target image acquired by the target preview resolution; amplifying the target image based on the expected preview resolution, so that the aspect ratio of the amplified adjustment image is consistent with the expected resolution ratio corresponding to the expected preview resolution; and cutting the adjustment image based on the expected preview resolution to obtain a target display image, and displaying the target display image in a preview window corresponding to the expected preview resolution.
In this embodiment, the target image is enlarged based on the desired preview resolution, so that the aspect ratio of the enlarged adjustment image is consistent with the desired resolution ratio corresponding to the desired preview resolution, so that the problem of stretching deformation when the image is displayed in the preview window can be avoided, the target display image is obtained by clipping the adjustment image based on the desired preview resolution, the target display image is displayed in the preview window corresponding to the desired preview resolution, the preview display compatibility is better, the custom preview window with any size can be adapted, and the adaptation can be performed on the circular window for face detection and the double-preview window with double-shot and same opening.
In one embodiment, the obtaining module 402 is further configured to obtain a type of the current application; the desired preview resolution is determined based on the type of current application.
In this embodiment, the corresponding desired preview resolution is determined according to the type of the current application, so that the size of the preview window is matched with the function of the application, and the effectiveness of the application in image preview is improved.
The various modules in the preview resolution adaptation device described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
Fig. 8 is a schematic diagram of an internal structure of an electronic device in one embodiment. As shown in fig. 8, the electronic device includes a processor, a memory, and a memory connected via a system bus. Wherein the processor is configured to provide computing and control capabilities to support operation of the entire electronic device. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program is executable by a processor for implementing the preview resolution adaptation method provided by the above embodiments. The internal memory provides a cached operating environment for operating system computer programs in the non-volatile storage medium. The electronic device may be a cell phone, a server, etc.
The implementation of each module in the preview resolution adaptation apparatus provided in the embodiments of the present application may be in the form of a computer program. The computer program may run on a terminal or a server. Program modules of the computer program may be stored in the memory of the terminal or server. The computer program, when executed by a processor, implements the preview resolution adaptation method described in embodiments of the present application.
Embodiments of the present application also provide a computer-readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the preview resolution adaptation method described in embodiments of the present application.
A computer program product comprising instructions which, when run on a computer, cause the computer to perform the preview resolution adaptation method described in embodiments of the present application.
Any reference to memory, storage, database, or other medium used herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A preview resolution adaptation method, comprising:
acquiring a candidate resolution set supported by the device and expected preview resolution;
obtaining an enlarged preview resolution based on the desired preview resolution, the desired preview resolution being less than the enlarged preview resolution;
screening the candidate resolution set based on the expected preview resolution and the enlarged preview resolution to obtain an initial target resolution set, wherein the resolution corresponding to the initial target resolution in the initial target resolution set is between the expected preview resolution and the enlarged preview resolution;
determining equipment resolution ratio corresponding to initial target resolution in the initial target resolution set, determining expected resolution ratio corresponding to the expected preview resolution, and screening from the initial target resolution set based on the equipment resolution ratio and the expected resolution ratio to obtain target preview resolution;
and acquiring an image through the target preview resolution.
2. The method of claim 1, wherein the deriving the enlarged preview resolution based on the desired preview resolution comprises:
Acquiring a desired width and a desired height corresponding to the desired preview resolution, and obtaining an enlarged width and an enlarged height based on the desired width and the desired height, wherein the desired width is smaller than the enlarged width, and the desired height is smaller than the enlarged height;
the screening from the candidate resolution sets based on the expected preview resolution and the enlarged preview resolution to obtain an initial target resolution set, wherein the resolution corresponding to the initial target resolution in the initial target resolution set comprises the following steps between the expected preview resolution and the enlarged preview resolution:
and screening the initial target resolution set from the candidate resolution set by the expansion width and the expansion height based on the expected width and the expected height, wherein the resolution width corresponding to the initial target resolution in the initial target resolution set is between the expected width and the expansion width, and the resolution height corresponding to the initial target resolution is between the expected height and the expansion height.
3. The method of claim 2, wherein the obtaining the desired width and the desired height corresponding to the desired preview resolution, the expanding the width and the expanding the height based on the desired width and the desired height comprises:
Acquiring an expansion factor, expanding the expected width by a corresponding multiple of the expansion factor to obtain an expanded width, and expanding the expected height by a corresponding multiple of the expansion factor to obtain an expanded height;
the screening the candidate resolution set for an initial target resolution set based on the desired width and the desired height, wherein the expanding the width and the expanding the height comprises:
screening an initial target resolution from the candidate resolution set, wherein the resolution width corresponding to the initial target resolution is larger than or equal to the expected width, and the resolution width corresponding to the initial target resolution is smaller than or equal to the expansion width;
the resolution height corresponding to the initial target resolution is larger than or equal to the expected height, and the resolution height corresponding to the initial target resolution is smaller than or equal to the expansion height;
the initial target resolutions satisfying the condition constitute the initial target resolution set.
4. The method of claim 1, wherein the determining a device resolution ratio corresponding to an initial target resolution in the initial target resolution set, determining a desired resolution ratio corresponding to the desired preview resolution, and screening the initial target resolution set for a target preview resolution based on the device resolution ratio and the desired resolution ratio comprises:
Calculating the ratio of the resolution height to the resolution width corresponding to the initial target resolution to obtain a corresponding equipment resolution ratio;
calculating the ratio of the resolution height to the resolution width corresponding to the expected preview resolution to obtain a corresponding expected resolution ratio;
calculating the absolute error of the equipment resolution ratio and the expected resolution ratio to obtain a ratio error;
and sequencing the proportional errors according to the size, and selecting an initial target resolution corresponding to the minimum value in the proportional errors as the target preview resolution.
5. The method of any of claims 1 to 4, further comprising, after the capturing of the image with the target preview resolution:
acquiring a target image acquired by the target preview resolution;
amplifying the target image based on the expected preview resolution, so that the aspect ratio of the amplified adjustment image is consistent with the expected resolution ratio corresponding to the expected preview resolution;
and cutting the adjustment image based on the expected preview resolution to obtain a target display image, and displaying the target display image in a preview window corresponding to the expected preview resolution.
6. The method of claim 1, wherein prior to the obtaining the set of desired preview resolution and device supported candidate resolutions, further comprising:
acquiring the type of the current application;
a desired preview resolution is determined based on the type of the current application.
7. A preview resolution adaptation device, comprising:
the acquisition module is used for acquiring a candidate resolution set supported by the device and the expected preview resolution;
an expansion module for obtaining an expanded preview resolution based on the desired preview resolution, the desired preview resolution being less than the expanded preview resolution;
a first screening module, configured to screen from the candidate resolution sets based on the desired preview resolution and the enlarged preview resolution to obtain an initial target resolution set, where a resolution corresponding to the initial target resolution in the initial target resolution set is between the desired preview resolution and the enlarged preview resolution;
the second screening module is used for determining equipment resolution ratio corresponding to the initial target resolution in the initial target resolution set, determining expected resolution ratio corresponding to the expected preview resolution, and screening the initial target resolution set to obtain target preview resolution based on the equipment resolution ratio and the expected resolution ratio;
And the acquisition module is used for acquiring images through the target preview resolution.
8. The apparatus of claim 7, wherein the expansion module is further configured to obtain a desired width and a desired height corresponding to the desired preview resolution, the desired width being less than the expansion width and the desired height being less than the expansion height based on the desired width and the desired height;
the first screening module is further configured to screen, from the candidate resolution sets, an initial target resolution set based on the desired width and the desired height, a resolution width corresponding to an initial target resolution in the initial target resolution set being between the desired width and the enlarged width, and a resolution height corresponding to the initial target resolution being between the desired height and the enlarged height.
9. An electronic device comprising a memory and a processor, the memory having stored therein a computer program which, when executed by the processor, causes the processor to perform the preview resolution adaptation method of any of claims 1 to 6.
10. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the preview resolution adaptation method according to any of claims 1 to 6.
CN202210056948.3A 2022-01-18 2022-01-18 Preview resolution adaptation method and device and electronic equipment Active CN114422694B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210056948.3A CN114422694B (en) 2022-01-18 2022-01-18 Preview resolution adaptation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210056948.3A CN114422694B (en) 2022-01-18 2022-01-18 Preview resolution adaptation method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN114422694A CN114422694A (en) 2022-04-29
CN114422694B true CN114422694B (en) 2024-03-26

Family

ID=81272793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210056948.3A Active CN114422694B (en) 2022-01-18 2022-01-18 Preview resolution adaptation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114422694B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546689A (en) * 2013-10-11 2014-01-29 Tcl集团股份有限公司 Resolution ratio acquiring method and device of external camera of android system
WO2016145831A1 (en) * 2015-09-08 2016-09-22 中兴通讯股份有限公司 Image acquisition method and device
CN106293589A (en) * 2016-08-31 2017-01-04 宇龙计算机通信科技(深圳)有限公司 A kind of the method for preview resolution, device and terminal are set
CN113422906A (en) * 2021-06-22 2021-09-21 平安普惠企业管理有限公司 Method and device for setting resolution, computer equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017146696A1 (en) * 2016-02-24 2017-08-31 Entit Software Llc Application content display at target screen resolutions

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546689A (en) * 2013-10-11 2014-01-29 Tcl集团股份有限公司 Resolution ratio acquiring method and device of external camera of android system
WO2016145831A1 (en) * 2015-09-08 2016-09-22 中兴通讯股份有限公司 Image acquisition method and device
CN106293589A (en) * 2016-08-31 2017-01-04 宇龙计算机通信科技(深圳)有限公司 A kind of the method for preview resolution, device and terminal are set
CN113422906A (en) * 2021-06-22 2021-09-21 平安普惠企业管理有限公司 Method and device for setting resolution, computer equipment and storage medium

Also Published As

Publication number Publication date
CN114422694A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
US10334153B2 (en) Image preview method, apparatus and terminal
JP4960992B2 (en) Image processing method and image processing apparatus for fisheye correction and perspective distortion reduction
US20060045374A1 (en) Method and apparatus for processing document image captured by camera
US8503813B2 (en) Image rectification method
CN110661977B (en) Subject detection method and apparatus, electronic device, and computer-readable storage medium
CN113824876B (en) Picture stability processing method and device under digital zooming, mobile terminal and medium
CN111080571A (en) Camera shielding state detection method and device, terminal and storage medium
US8942513B2 (en) De-warping processing method for digital images
CN111932462A (en) Training method and device for image degradation model, electronic equipment and storage medium
CN114862735A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
KR102374022B1 (en) Apparatus and method of processing images
EP2200275B1 (en) Method and apparatus of displaying portrait on a display
CN114422694B (en) Preview resolution adaptation method and device and electronic equipment
US11069040B2 (en) Empirical exposure normalization
US20120327486A1 (en) Method and Device of Document Scanning and Portable Electronic Device
CN111885371A (en) Image occlusion detection method and device, electronic equipment and computer readable medium
EP2352110A1 (en) Object image cropping method, object image cropping system and digital image device
CN102088550A (en) Method and system for capturing object images and digital imaging device
CN112532875B (en) Terminal device, image processing method and device thereof, and storage medium
US20190007666A1 (en) Image details processing method, apparatus, terminal, and storage medium
CN105808180B (en) Picture adjusting method and system
CN113570531A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN112911152A (en) Preview image generation method, device, equipment and storage medium
JP5929379B2 (en) Image processing apparatus, image processing method, and program
CN115472140A (en) Display method, display device, electronic apparatus, and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant