CN111260559B - Image zooming display method and device and terminal equipment - Google Patents

Image zooming display method and device and terminal equipment Download PDF

Info

Publication number
CN111260559B
CN111260559B CN202010098334.2A CN202010098334A CN111260559B CN 111260559 B CN111260559 B CN 111260559B CN 202010098334 A CN202010098334 A CN 202010098334A CN 111260559 B CN111260559 B CN 111260559B
Authority
CN
China
Prior art keywords
image
pixel
sub
scaling
output
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
CN202010098334.2A
Other languages
Chinese (zh)
Other versions
CN111260559A (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.)
Chip Wealth Technology Ltd
Original Assignee
Chip Wealth Technology 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 Chip Wealth Technology Ltd filed Critical Chip Wealth Technology Ltd
Priority to CN202010098334.2A priority Critical patent/CN111260559B/en
Publication of CN111260559A publication Critical patent/CN111260559A/en
Application granted granted Critical
Publication of CN111260559B publication Critical patent/CN111260559B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the application provides an image scaling display method, an image scaling display device and terminal equipment, and relates to the technical field of display, wherein the image scaling display method comprises the steps of firstly determining scaling coefficients of a first pixel in an output image and at least one second pixel in an input image based on scaling; wherein the first pixel is any one pixel in the output image; the second pixel corresponds to the first pixel position; the input image is the same size as the output image; the pixel value of the first pixel is then determined based on the scaling coefficients of the first pixel and the second pixel, and the pixel value of the second pixel. Therefore, the technical scheme provided by the embodiment of the application can relieve the technical problem of image distortion in the prior art and can improve the display quality of images.

Description

Image zooming display method and device and terminal equipment
Technical Field
The present application relates to the field of display technologies, and in particular, to an image scaling display method, device and terminal equipment.
Background
At present, aiming at an image scaling display technology in the prior art, a common scaling method mainly adopts a nearest neighbor interpolation method to scale an image, however, the image scaling display method relying on the nearest neighbor interpolation method is simpler in calculation and easier in hardware realization, but the image distortion is larger, and the image display quality is affected.
Disclosure of Invention
In view of the above, the present application aims to provide an image scaling display method, an image scaling display device and a terminal device.
In order to achieve the above object, the technical scheme adopted by the embodiment of the application is as follows:
in a first aspect, an embodiment of the present application provides an image scaling display method, including:
determining a scaling factor of a first pixel in the output image and at least one second pixel in the input image based on the scaling; wherein the first pixel is any one pixel in the output image; the second pixel corresponds to the first pixel position; the output image and the input image have the same size;
a pixel value of the first pixel is determined based on a scaling factor of the first pixel and the second pixel, and a pixel value of the second pixel.
With reference to the first aspect, an embodiment of the present application provides a first possible implementation manner of the first aspect, where the method further includes:
the scaling is determined.
With reference to the first possible implementation manner of the first aspect, the embodiment of the present application provides a second possible implementation manner of the first aspect, where the step of determining the scaling includes:
the scaling is determined based on the first resolution of the input image and the second resolution of the output image.
With reference to the first aspect, an embodiment of the present application provides a third possible implementation manner of the first aspect, wherein the step of determining a scaling factor of a first pixel in the output image and at least one second pixel in the input image based on the scaling includes:
determining a first sub-image where the first pixel is located and a second sub-image where the second pixel is located; wherein the first sub-image is any one image block in the output image; the second sub-image is an image block corresponding to the first sub-image position in the input image; the first sub-image and the second sub-image have the same size;
and determining the scaling coefficients of the first pixel and the second pixel based on the first sub-image where the first pixel is and the second sub-image where the second pixel is.
With reference to the third possible implementation manner of the first aspect, an embodiment of the present application provides a fourth possible implementation manner of the first aspect, where the method further includes:
and respectively blocking the output image and the input image to obtain at least one first sub-image and at least one second sub-image.
With reference to the fourth possible implementation manner of the first aspect, the embodiment of the present application provides a fifth possible implementation manner of the first aspect, where the step of dividing the output image and the input image into blocks to obtain at least one first sub-image and at least one second sub-image includes:
determining a correspondence between pixel matrices of the input image and the output image based on the scaling;
dividing an output image into at least one first sub-image and dividing the input image into at least one second sub-image based on a correspondence between pixel matrices of the input image and the output image; wherein each first sub-image corresponds to a second sub-image; and each first sub-image is the same size as the corresponding second sub-image.
In a second aspect, an embodiment of the present application provides an image scaling display apparatus, including:
a first determination module for determining a scaling factor of a first pixel in the output image and at least one second pixel in the input image based on the scaling; wherein the first pixel is any one pixel in the output image; the second pixel corresponds to the first pixel position; the output image and the input image have the same size;
and a second determining module, configured to determine a pixel value of the first pixel based on the scaling coefficients of the first pixel and the second pixel, and the pixel value of the second pixel.
With reference to the first possible implementation manner of the first aspect, the embodiment of the present application provides a second possible implementation manner of the first aspect, where the method further includes:
and a third determining module, configured to determine the scaling.
In a third aspect, an embodiment of the present application further provides a terminal device, including a processor and a memory, where the memory stores machine executable instructions executable by the processor, where the processor may execute the machine executable instructions to implement the image scaling display method according to any one of the foregoing embodiments.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements an image scaling display method as in any of the preceding embodiments.
The embodiment of the application has the following beneficial effects: the image scaling display method, the image scaling display device, the terminal equipment and the computer readable storage medium provided by the embodiment of the application are characterized in that the scaling coefficients of a first pixel in an output image and at least one second pixel in an input image are firstly determined based on the scaling scale; wherein the first pixel is any one pixel in the output image; the second pixel corresponds to the first pixel position; the input image is the same size as the output image; the pixel value of the first pixel is then determined based on the scaling coefficients of the first pixel and the second pixel, and the pixel value of the second pixel. Therefore, the technical scheme provided by the embodiment of the application can relieve the technical problem of image distortion in the prior art and can improve the display quality of images.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of an image scaling display method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of another image scaling display method according to an embodiment of the present application;
FIG. 3 shows a schematic diagram of scaling factor generation provided by an embodiment of the present application;
FIG. 4 is a graph showing the relationship between input and output pixels and scaling factors for an output image and an input image provided by an embodiment of the present application at a scaling ratio of 3/2;
fig. 5 shows a schematic diagram of an image scaling display device according to an embodiment of the present application;
fig. 6 shows a schematic diagram of a terminal device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
It is noted that relational terms such as "first" and "second", and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
At present, aiming at an image scaling display technology in the prior art, a common scaling method mainly adopts a nearest neighbor interpolation method, a bilinear interpolation method, a bicubic interpolation method and the like to scale an image, however, the image scaling display method has the following defects: the nearest neighbor interpolation method is relatively simple in calculation, easy in hardware implementation, and large in image distortion; the bilinear interpolation method and the bicubic interpolation method are relatively complex in calculation, relatively small in image distortion, relatively large in hardware consumption and relatively complex in implementation.
Based on the above, the embodiment of the application provides an image scaling display method, an image scaling display device and terminal equipment, so as to alleviate the technical problem of image distortion in the prior art, and improve the display quality of images.
For the sake of understanding the present embodiment, first, a detailed description will be given of an image scaling display method disclosed in the embodiment of the present application.
First embodiment
Referring to fig. 1, an embodiment of the present application provides an image scaling display method, which includes the steps of:
step S102, determining a scaling coefficient of a first pixel in an output image and at least one second pixel in an input image based on the scaling; wherein the first pixel is any one pixel in the output image; the second pixel corresponds to the first pixel position; the output image and the input image have the same size;
specifically, a scaling factor of a first pixel in the output image and at least one second pixel in the input image corresponding to the first pixel position is determined based on the scaling; the first pixel is any pixel in the output image; wherein the output image is a scaled image of the input image; for example, an input image with a first resolution is scaled to obtain an output image with a second resolution; the input image is the same size as the output image;
here, the fact that the input image and the output image are the same in size means that the output image and the input image are completely overlapped, and therefore, the length and the width of the input image are equal to the length and the width of the output image, respectively.
Step S104, determining the pixel value of the first pixel based on the scaling coefficients of the first pixel and the second pixel and the pixel value of the second pixel.
Specifically, a pixel value of a first pixel in the output image is determined based on a scaling factor of the first pixel in the output image and at least one second pixel in the input image corresponding to the first pixel location and a pixel value of the first pixel in the output image and at least one second pixel in the input image corresponding to the first pixel location.
For example, when the second pixel is one, directly multiplying the scaling coefficients of the first pixel and the second pixel (abbreviated as the scaling coefficient of the second pixel) by the pixel values of the first pixel and the second pixel (abbreviated as the pixel value of the second pixel) to calculate the pixel value of the first pixel;
when the number of the second pixels is plural, the scaling coefficients of the first pixel and each of the second pixels are multiplied by the pixel value of the second pixel corresponding to the scaling coefficient (i.e., the pixel value is multiplied by the scaling coefficient), and then the pixel values of the first pixel are obtained by adding the pixel values.
In an alternative embodiment, the scaling factor of the first pixel and each second pixel (abbreviated as the scaling factor of each second pixel) may be obtained by dividing the area of the portion where the first pixel coincides with each second pixel by the area of the first pixel.
In an alternative embodiment, step S102 may be implemented by:
1. determining a first sub-image where the first pixel is located and a second sub-image where the second pixel is located;
wherein the first sub-image is any one image block in the output image; the second sub-image is an image block corresponding to the position of the first sub-image in the input image; i.e. the second sub-image is in one-to-one correspondence with the first sub-image; the first sub-image and the second sub-image have the same size;
specifically, the first sub-image where the first pixel is located and the second sub-image where the second pixel is located can be determined by searching a pre-built corresponding relation table of the first sub-image and the second sub-image in the output image and the input image after being segmented.
Of course, in other embodiments, the step 1 may further include determining the first sub-image in which the first pixel is located, then determining the second sub-image corresponding to the first sub-image in which the first pixel is located, and finally determining at least one second pixel corresponding to the first pixel position in the second sub-image, which is not described in detail herein.
It should be noted that, before the step of determining the first sub-image where the first pixel is located and the second sub-image where the second pixel is located, the method further includes the step of blocking: and respectively blocking the output image and the input image to obtain at least one first sub-image and at least one second sub-image.
The step of partitioning is used for realizing the pre-partitioning and corresponding storage of the output image and the input image to generate a corresponding table, so that the calling of the step 1 is facilitated, and the processing efficiency is improved.
Specifically, the step of dividing the output image and the input image into blocks to obtain at least one first sub-image and at least one second sub-image includes: determining a correspondence between pixel matrices of the input image and the output image based on the scaling;
dividing the output image into at least one first sub-image and dividing the input image into at least one second sub-image based on a correspondence between pixel matrices of the input image and the output image; wherein each first sub-image corresponds to a second sub-image; and each first sub-image is the same size as the corresponding second sub-image.
2. And determining the scaling coefficients of the first pixel and the second pixel based on the first sub-image where the first pixel is located and the second sub-image where the second pixel is located.
Specifically, based on a first sub-image where a first pixel is located and a second sub-image corresponding to the first sub-image where the first pixel is located, a position of at least one second pixel in the second sub-image and a scaling factor of the first pixel in the first sub-image and at least one second pixel corresponding to the first pixel position in the second sub-image are determined.
At this time, the step S104 of determining the pixel value of the first pixel based on the scaling coefficients of the first pixel and the second pixel, and the pixel value of the second pixel may be performed by:
the pixel value of the first pixel in the first sub-image is determined based on the scaling factor of at least one second pixel in the second sub-image corresponding to the first pixel location and the pixel value of at least one second pixel in the second sub-image corresponding to the first pixel location.
In the present embodiment, the above step S102 may be performed by:
a, determining a corresponding relation between a pixel matrix of an input image and a pixel matrix of an output image based on a scaling ratio;
b dividing the input image into a plurality of second sub-images and the output image into a plurality of first sub-images based on the correspondence between the pixel matrices of the input image and the output image; wherein each first sub-image corresponds to a second sub-image; and each first sub-image is equal in size to the corresponding second sub-image;
c, determining a first sub-image where the first pixel is located and a second sub-image corresponding to the first sub-image where the first pixel is located;
d, determining the scaling coefficient of the first pixel and the second pixel based on the first sub-image where the first pixel is and the second sub-image where the second pixel is.
It should be noted that, the steps a and b are only for convenience of description and do not represent the sequence thereof, that is, the steps a and b may be before or after any step before determining the first sub-image where the first pixel is located and the second sub-image corresponding to the first sub-image where the first pixel is located, which is not particularly limited in the present application.
In an alternative embodiment, the scaling factor is a number greater than 0 and less than or equal to 1.
The image scaling display method provided by the embodiment of the application comprises the steps of determining scaling factors of a first pixel in an output image and at least one second pixel corresponding to the first pixel position in an input image based on scaling; the first pixel is any pixel in the output image; wherein the input image is the same size as the output image; the pixel value of the first pixel in the output image is determined based on a scaling factor of the first pixel in the output image and at least one second pixel in the input image corresponding to the first pixel location and a pixel value of the first pixel in the output image and at least one second pixel in the input image corresponding to the first pixel location. The method obtains the scaling coefficient between each output pixel and the relevant input pixel by outputting the same display area as the input display area, and the pixel value of each output pixel is obtained by calculating the scaling coefficient, so that the distortion of the image is smaller, the occupied hardware consumption is smaller, and the method is simple and flexible.
Second embodiment
Referring to fig. 2, an embodiment of the present application provides another image scaling display method, which includes:
step S202, determining a scaling ratio;
specifically, the scaling of the output image and the input image is determined.
The scaling may be a parameter directly input by the user, or may be obtained from another parameter (e.g., resolution) input by the user.
Step S204, determining a scaling coefficient of a first pixel in the output image and at least one second pixel in the input image based on the scaling; wherein the first pixel is any one pixel in the output image; the second pixel corresponds to the first pixel position; the output image and the input image have the same size;
wherein the scaling factor may be determined from a minimum ratio of resolutions of the input image and the output image.
Step S206, determining the pixel value of the first pixel based on the scaling coefficients of the first pixel and the second pixel and the pixel value of the second pixel.
In an alternative embodiment, the step S202 may be implemented by the following steps:
a determines a scaling based on a first resolution of the input image and a second resolution of the output image.
In an alternative embodiment, the first resolution is the product of the number of horizontal pixels (number of rows) of the input image and the number of vertical pixels (number of columns) of the input image; the second resolution is the product of the number of horizontal pixels of the output image and the number of vertical pixels of the output image;
specifically, this step a may be implemented in any of the following ways:
mode A1:
dividing the number of horizontal pixels of the output image by the number of horizontal pixels of the input image to obtain a horizontal scaling ratio; obtaining a scaling based on the horizontal scaling;
specifically, after obtaining a horizontal scale (referred to herein as an initial scale, abbreviated as a second initial scale), the horizontal scale is subjected to a simplification process, for example, a maximum common divisor is divided by a numerator and a denominator of the horizontal scale, respectively, to obtain a simplest ratio, and a scaling (referred to herein as a final scale) is obtained by squaring the simplest ratio.
Mode A2:
dividing the number of vertical pixels of the output image by the number of vertical pixels of the input image to obtain a vertical scaling; obtaining a scaling based on the vertical scaling;
specifically, after obtaining the vertical scale (also referred to herein as the initial scale, simply referred to as the second initial scale), the vertical scale is subjected to a simplification process, for example, the numerator and the denominator of the vertical scale are divided by the greatest common divisor, respectively, to obtain the simplest ratio, and the simplest ratio is subjected to a square operation to obtain the scale (referred to herein as the final scale).
Mode A3:
dividing the number of horizontal pixels of the output image by the number of horizontal pixels of the input image to obtain a horizontal scaling ratio; dividing the number of vertical pixels of the output image by the number of vertical pixels of the input image to obtain a vertical scaling; scaling is based on horizontal scaling as well as vertical scaling.
Specifically, after the horizontal scaling and the vertical scaling are obtained, simplification processing is performed on the horizontal scaling and the vertical scaling, for example, the numerator and the denominator of the horizontal scaling are divided by the greatest common divisor and the numerator and the denominator of the vertical scaling are divided by the greatest common divisor, respectively, to obtain two simplest horizontal ratios and two simplest vertical ratios, and the scaling is obtained by multiplying the two simplest ratios.
Mode A4:
directly dividing the second resolution by the first resolution yields the scaling.
The above-described modes A1 and A2 are applicable to an image in which the image resolution (the number of lines by the number of columns) is fixed, for example, the line/column reduction or enlargement ratio is uniform; the above-described modes A3 and A4 are applicable to images in which rows and columns are reduced or enlarged inconsistencies.
For easy understanding, the image scaling display method provided by the embodiment of the application is described below with reference to fig. 3 and 4:
here, assuming that the first resolution of the input image is 1280 (number of lines) 720 (number of columns), the second resolution of the output image is 1920 (number of lines) 1080 (number of columns), and the x represents the multiplier, the scaling ratio determined by dividing the second resolution of the output image by the first resolution of the input image is 1920/1280 or 1080/720, i.e., 3/2. Therefore, according to the correspondence between the pixel matrix of the scaled input image and the pixel matrix of the output image, the input image and the output image can be segmented according to the output image of 3 rows and 3 columns corresponding to the input image of 2 rows and 2 columns, and according to the fact that the display area of the output image and the display area of the input image are identical (overlap), the scaling relationship between each output pixel and the relevant input pixel is obtained, and the scaling coefficient is the scaling coefficient.
As shown in fig. 3, the broken line represents a pixel of an output image, the solid line represents a pixel of an input image, and the scaling factor generation process is described by taking two examples of a1 st row and a2 nd column output pixel (i.e., a first pixel), an input pixel (i.e., a second pixel) corresponding to a1 st row and a2 nd column output pixel (i.e., a first pixel), and a1 st row and a1 st column input pixel and a1 st row and a2 nd column input pixel.
First, the total area of the 1 st row and 2 nd column output pixels is (s1+s2), where S1 is the area where the 1 st row and 2 nd column output pixels (i.e., the first pixel) intersect with the 1 st row and 1 st column input pixels (i.e., the second pixel), and S2 is the area where the 1 st row and 2 nd column output pixels intersect with the 1 st row and 2 nd column input pixels (i.e., the second pixel). The scaling factor of the 1 st row and 2 nd column output pixels and the 1 st row and 1 st column input pixels is S1/(s1+s2), and the scaling factor of the 1 st row and 2 nd column output pixels and the 1 st row and 2 nd column input pixels is S2/(s1+s2). Wherein the scale factor value ranges from 0 to 1, the general image input data is 8 bits, and the output data is 8 bits.
The pixel value of the 1 st row and 2 nd column output pixels can be obtained by:
P_out(1,2)=P_in(1,1)*S1/(S1+S2)+P_in(1,2)*S2/(S1+S2);
wherein P_out (1, 2) is the pixel value of the output pixel of row 1 and column 2; p_in (1, 1) is the pixel value of the 1 st row and 1 st column input pixel, S1/(S1+S2) is the corresponding scaling coefficient value (i.e., the scaling coefficient of the 1 st row and 2 nd column output pixel and the 1 st row and 1 st column input pixel); p_in (1, 2) is the pixel value of the input pixel of row 1 and column 2, and S2/(s1+s2) is the corresponding scaling coefficient value (i.e., the scaling coefficient of the output pixel of row 1 and column 2 and the input pixel of row 1 and column 2).
That is, the pixel value of the first pixel may be obtained based on the scaling coefficients of the first pixel and the second pixel, and the pixel value of the second pixel.
The relationship between the input/output pixels and the scaling factor when the scaling ratio of the output image and the input image is 3/2 (which may also be referred to herein as an enlargement ratio) is described in detail below with reference to fig. 4:
as shown in fig. 4, three graphs from left to right respectively represent an input pixel of 2x2 scale, a scaling factor of 3/2, and an output pixel of 3x3 scale. Referring to fig. 4, it can be seen that the relationship between the corresponding pixel values between the three graphs is as follows:
P_out(1,1)=P_in(1,1)*1;
P_out(1,2)=P_in(1,1)*(1/2)+P_in(1,2)*(1/2);
P_out(1,3)=P_in(1,2)*1;
P_out(2,1)=P_in(1,1)*(1/2)+P_in(2,1)*(1/2);
P_out(2,2)=P_in(1,1)*(1/4)+P_in(1,2)*(1/4)+P_in(2,1)*(1/4)+P_in(2,2)*(1/4);
P_out(2,3)=P_in(1,2)*(1/2)+P_in(2,2)*(1/2);
P_out(3,1)=P_in(2,1)*1;
P_out(3,2)=P_in(2,1)*(1/2)+P_in(2,2)*(1/2);
P_out(3,3)=P_in(2,2)*1;
where P_in represents the pixel value of the input pixel, P_out represents the output pixel value, and 1/2,1/4,1 represents the scaling factor. The scaling factor is multiplied by the input pixel value of the corresponding position and then added to obtain the output pixel value of the corresponding position.
Third embodiment
As shown in fig. 5, an embodiment of the present application further provides an image scaling display apparatus, including: a first determination module 501 and a second determination module 502.
Wherein the first determining module 501 is configured to determine a scaling factor of a first pixel in the output image and at least one second pixel in the input image based on the scaling; wherein the first pixel is any one pixel in the output image; the second pixel corresponds to the first pixel position; the output image and the input image have the same size;
the second determining module 502 is configured to determine a pixel value of the first pixel based on a scaling factor of the first pixel and the second pixel, and a pixel value of the second pixel.
In an alternative embodiment, the apparatus further comprises a third determining module 503 for determining the scaling.
In an alternative embodiment, the third determining module 503 is configured to determine the scaling based on the first resolution of the input image and the second resolution of the output image when determining the scaling.
In an alternative embodiment, the first determining module 501 is configured to determine, when determining the scaling factor of the first pixel in the output image and at least one second pixel in the input image based on the scaling factor, a first sub-image in which the first pixel is located and a second sub-image in which the second pixel is located; wherein the first sub-image is any one image block in the output image; the second sub-image is an image block corresponding to the first sub-image position in the input image; the first sub-image and the second sub-image have the same size; and determining the scaling coefficients of the first pixel and the second pixel based on the first sub-image where the first pixel is and the second sub-image where the second pixel is.
In an alternative embodiment, the first determining module 501 is further configured to block the output image and the input image respectively, to obtain at least one first sub-image and at least one second sub-image;
in an alternative embodiment, the first determining module 501 is configured to determine, when the output image and the input image are respectively segmented to obtain at least one first sub-image and at least one second sub-image, a correspondence between the input image and a pixel matrix of the output image based on the scaling; dividing an output image into at least one first sub-image and dividing the input image into at least one second sub-image based on a correspondence between pixel matrices of the input image and the output image; wherein each first sub-image corresponds to a second sub-image; and each first sub-image is the same size as the corresponding second sub-image.
In an alternative embodiment, the scaling factor is a number greater than 0 and less than or equal to 1.
It will be clear to those skilled in the art that, for convenience and brevity of description, reference may be made to the corresponding process in the foregoing method embodiment for the specific working process of the apparatus described above, which is not described herein again.
The image scaling display device provided by the embodiment of the application has the same technical characteristics as the image scaling display method provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
Referring to fig. 6, an embodiment of the present application further provides a terminal device 600, including: a processor 60, a memory 61, a bus 62 and a communication interface 63, the processor 60, the communication interface 63 and the memory 61 being connected by the bus 62; the processor 60 is arranged to execute executable modules, such as computer programs, stored in the memory 61.
The memory 61 may include a high-speed random access memory (RAM, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. The communication connection between the system network element and at least one other network element is achieved via at least one communication interface 63 (which may be wired or wireless), and may use the internet, a wide area network, a local network, a metropolitan area network, etc.
Bus 62 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 6, but not only one bus or type of bus.
The memory 61 is configured to store a program, and the processor 60 executes the program after receiving an execution instruction, and the method executed by the apparatus for flow defining disclosed in any of the foregoing embodiments of the present application may be applied to the processor 60 or implemented by the processor 60.
The processor 60 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware or instructions in software in the processor 60. The processor 60 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a digital signal processor (Digital Signal Processing, DSP for short), application specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA for short), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 61 and the processor 60 reads the information in the memory 61 and in combination with its hardware performs the steps of the method described above.
The embodiment of the application also provides a computer readable storage medium, which stores machine executable instructions, and when the computer executable instructions are called and executed by a processor, the computer executable instructions cause the processor to execute the image zooming display method provided by the embodiment of the application.
In this context, the processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processor, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The methods, steps and logic blocks disclosed in the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware decoding processor for execution, or in a combination of hardware and software modules in a decoding processor for execution. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus and modules described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above examples are only specific embodiments of the present application, and are not intended to limit the scope of the present application, but it should be understood by those skilled in the art that the present application is not limited thereto, and that the present application is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (7)

1. An image scaling display method, characterized by comprising:
determining a scaling factor of a first pixel in the output image and at least one second pixel in the input image based on the scaling; wherein the first pixel is any one pixel in the output image; the second pixel corresponds to the first pixel position; the output image and the input image have the same size;
determining a pixel value of the first pixel based on a scaling factor of the first pixel and the second pixel, and a pixel value of the second pixel;
a step of determining a scaling factor for a first pixel in an output image and at least one second pixel in an input image based on a scaling factor, comprising:
determining a first sub-image where the first pixel is located and a second sub-image where the second pixel is located; wherein the first sub-image is any one image block in the output image; the second sub-image is an image block corresponding to the first sub-image position in the input image; the first sub-image and the second sub-image have the same size;
determining a scaling factor of the first pixel and the second pixel based on a first sub-image where the first pixel is located and a second sub-image where the second pixel is located;
further comprises:
dividing the output image and the input image into blocks respectively to obtain at least one first sub-image and at least one second sub-image;
the step of dividing the output image and the input image into blocks to obtain at least one first sub-image and at least one second sub-image, respectively, comprises the following steps:
determining a correspondence between pixel matrices of the input image and the output image based on the scaling;
dividing an output image into at least one first sub-image and dividing the input image into at least one second sub-image based on a correspondence between pixel matrices of the input image and the output image; wherein each first sub-image corresponds to a second sub-image; and each first sub-image is the same size as the corresponding second sub-image.
2. The method as recited in claim 1, further comprising:
the scaling is determined.
3. The method of claim 2, wherein the step of determining the scaling comprises:
the scaling is determined based on the first resolution of the input image and the second resolution of the output image.
4. An image scaling display device, characterized by comprising:
a first determination module for determining a scaling factor of a first pixel in the output image and at least one second pixel in the input image based on the scaling; wherein the first pixel is any one pixel in the output image; the second pixel corresponds to the first pixel position; the output image and the input image have the same size;
a second determining module configured to determine a pixel value of the first pixel based on a scaling factor of the first pixel and the second pixel, and a pixel value of the second pixel;
the first determination module is further configured to:
determining a first sub-image where the first pixel is located and a second sub-image where the second pixel is located; wherein the first sub-image is any one image block in the output image; the second sub-image is an image block corresponding to the first sub-image position in the input image; the first sub-image and the second sub-image have the same size;
determining a scaling factor of the first pixel and the second pixel based on a first sub-image where the first pixel is located and a second sub-image where the second pixel is located;
the first determination module is further configured to:
dividing the output image and the input image into blocks respectively to obtain at least one first sub-image and at least one second sub-image;
the first determination module is further configured to:
determining a correspondence between pixel matrices of the input image and the output image based on the scaling;
dividing an output image into at least one first sub-image and dividing the input image into at least one second sub-image based on a correspondence between pixel matrices of the input image and the output image; wherein each first sub-image corresponds to a second sub-image; and each first sub-image is the same size as the corresponding second sub-image.
5. The apparatus as recited in claim 4, further comprising:
and a third determining module, configured to determine the scaling.
6. A terminal device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor, the processor executable instructions to implement the method of any one of claims 1-3.
7. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any of claims 1-3.
CN202010098334.2A 2020-02-18 2020-02-18 Image zooming display method and device and terminal equipment Active CN111260559B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010098334.2A CN111260559B (en) 2020-02-18 2020-02-18 Image zooming display method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010098334.2A CN111260559B (en) 2020-02-18 2020-02-18 Image zooming display method and device and terminal equipment

Publications (2)

Publication Number Publication Date
CN111260559A CN111260559A (en) 2020-06-09
CN111260559B true CN111260559B (en) 2023-09-22

Family

ID=70949256

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010098334.2A Active CN111260559B (en) 2020-02-18 2020-02-18 Image zooming display method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN111260559B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111951321A (en) * 2020-08-21 2020-11-17 上海西门子医疗器械有限公司 Method for processing images of a computer tomograph and computer tomograph

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0981106A2 (en) * 1998-07-17 2000-02-23 Pagemasters, Inc. Method and apparatus for image scaling
WO2002063560A2 (en) * 2001-02-06 2002-08-15 Orasee Corp. Method for scaling and interlacing multidimensional and motion images
CN102222317A (en) * 2011-06-22 2011-10-19 王洪剑 Image scaling method and system
CN104679466A (en) * 2013-11-29 2015-06-03 腾讯科技(深圳)有限公司 Image display method and device and electronic device
CN109741264A (en) * 2019-01-21 2019-05-10 厦门美图之家科技有限公司 The excessive representation method of image, device, electronic equipment and readable storage medium storing program for executing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10650496B2 (en) * 2018-02-13 2020-05-12 Ricoh Company, Ltd. Image scaling with efficient pixel resolution conversion

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0981106A2 (en) * 1998-07-17 2000-02-23 Pagemasters, Inc. Method and apparatus for image scaling
WO2002063560A2 (en) * 2001-02-06 2002-08-15 Orasee Corp. Method for scaling and interlacing multidimensional and motion images
CN102222317A (en) * 2011-06-22 2011-10-19 王洪剑 Image scaling method and system
CN104679466A (en) * 2013-11-29 2015-06-03 腾讯科技(深圳)有限公司 Image display method and device and electronic device
CN109741264A (en) * 2019-01-21 2019-05-10 厦门美图之家科技有限公司 The excessive representation method of image, device, electronic equipment and readable storage medium storing program for executing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张松轶 ; 马晓琳 ; .基于FPGA的图像缩放技术分析.无线电工程.2012,(06),全文. *
邓秀林 ; .数字图像的剪裁与缩放.电脑知识与技术(学术交流).2007,(11),全文. *

Also Published As

Publication number Publication date
CN111260559A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
US7660486B2 (en) Method and apparatus of removing opaque area as rescaling an image
CN111476718B (en) Image amplification method and device, storage medium and terminal equipment
CN111984189B (en) Neural network computing device, data reading method, data storage method and related equipment
CN111724304B (en) Image scaling method and device, terminal equipment and storage medium
JP4728744B2 (en) Image processing device
CN111260559B (en) Image zooming display method and device and terminal equipment
CN111443974A (en) Android device screen adapting method, related device and readable storage medium
US9015429B2 (en) Method and apparatus for an efficient hardware implementation of dictionary based lossless compression
CN113112561B (en) Image reconstruction method and device and electronic equipment
US8412003B2 (en) Image processing methods, apparatus and computer program products using interdependent pixel interpolation operations
CN107977923B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
US8902474B2 (en) Image processing apparatus, control method of the same, and program
US10332239B2 (en) Apparatus and method for parallel polyphase image interpolation
CN115190263B (en) Video scaling method, device, equipment and storage medium
JP3510662B2 (en) Smoothing scaling method for facsimile images
JP4621944B2 (en) Image filter device, method and computer program
CN111429384B (en) Image processing method and device
CN111713099A (en) Image correction method, image correction device and electronic equipment
KR102293883B1 (en) Simultaneous image compression and thumbnail generation
CN113111891B (en) Image reconstruction method and device, terminal equipment and storage medium
CN115205156B (en) Distortion-free median filtering boundary filling method and device, electronic equipment and storage medium
CN115984091A (en) Image processing method and device, electronic equipment and readable storage medium
JP2016103169A (en) Image processing apparatus, image processing method, and electronic apparatus
CN115033311A (en) Method, device and related assembly for realizing Qt preview of large-size picture
CN117974451A (en) Rendering method and device of inclined topological relation diagram, electronic equipment and 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