CN111260559A - 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
CN111260559A
CN111260559A CN202010098334.2A CN202010098334A CN111260559A CN 111260559 A CN111260559 A CN 111260559A CN 202010098334 A CN202010098334 A CN 202010098334A CN 111260559 A CN111260559 A CN 111260559A
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.)
Granted
Application number
CN202010098334.2A
Other languages
Chinese (zh)
Other versions
CN111260559B (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

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof

Abstract

The embodiment of the invention provides an image zooming display method, an image zooming display device and terminal equipment, and relates to the technical field of display, wherein the image zooming display method determines the zooming coefficients of a first pixel in an output image and at least one second pixel in an input image based on the zooming proportion; 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 factors of the first and second pixels, and the pixel value of the second pixel. Therefore, the technical scheme provided by the embodiment of the invention can relieve the technical problem of image distortion in the prior art and improve the display quality of the image.

Description

Image zooming display method and device and terminal equipment
Technical Field
The invention relates to the technical field of display, in particular to an image zooming display method, an image zooming display device and terminal equipment.
Background
At present, in the prior art, for an image scaling display technology, a common scaling method mainly scales an image by using a nearest neighbor interpolation method, however, the image scaling display method relying on the nearest neighbor interpolation method is simple in calculation and easy in hardware implementation, but image distortion is large, and image display quality is affected.
Disclosure of Invention
In view of the above, the present invention provides an image zooming display method, an image zooming display device and a terminal device.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present invention provides an image scaling display method, including:
determining a scaling factor for a first pixel in the output image and at least one second pixel in the input image based on the scaling ratio; wherein the first pixel is any one pixel in the output image; the second pixel corresponds to the first pixel position; the output image is the same size as the input image;
determining a pixel value of the first pixel based on scaling coefficients 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 invention 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, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where the determining the scaling includes:
the scaling is determined based on a first resolution of the input image and a second resolution of the output image.
With reference to the first aspect, an embodiment of the present invention 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 ratio includes:
determining a first sub-image in which the first pixel is positioned and a second sub-image in which the second pixel is positioned; wherein the first sub-image is any image block in the output image; the second sub-image is an image block in the input image corresponding to the first sub-image position; the first sub-image and the second sub-image are the same size;
and determining the scaling coefficients of the first pixel and the second pixel based on the first sub-image in which the first pixel is positioned and the second sub-image in which the second pixel is positioned.
With reference to the third possible implementation manner of the first aspect, an embodiment of the present invention provides a fourth possible implementation manner of the first aspect, where the method further includes:
the output image and the input image are respectively blocked 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, an embodiment of the present invention provides a fifth possible implementation manner of the first aspect, where the step of respectively blocking the output image and the input image to obtain at least one first sub-image and at least one second sub-image includes:
determining a correspondence between pixel matrices of an input image and an 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 invention provides an image scaling display apparatus, including:
a first determining module for determining a scaling factor for 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 is the same size as the input image;
a second determining module for determining 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, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where the method further includes:
a third determining module for determining the scaling.
In a third aspect, an embodiment of the present invention further provides a terminal device, including a processor and a memory, where the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the image scaling and displaying method according to any one of the foregoing embodiments.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the image scaling display method according to any one of the foregoing embodiments.
The embodiment of the invention has the following beneficial effects: according to 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 invention, the scaling coefficient of a first pixel in an output image and at least one second pixel in an input image is determined 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 input image is the same size as the output image; the pixel value of the first pixel is then determined based on the scaling factors of the first and second pixels, and the pixel value of the second pixel. Therefore, the technical scheme provided by the embodiment of the invention can relieve the technical problem of image distortion in the prior art and improve the display quality of the image.
In order to make the aforementioned and other objects, features and advantages of the present invention 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 invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a flow chart of an image zooming display method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another image scaling display method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating the generation of a scaling factor according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating the relationship between input and output pixels and scaling factors for an output image and an input image scaled at 3/2 according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an image scaling display apparatus according to an embodiment of the present invention;
fig. 6 shows a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention 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 present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that relational terms such as "first" and "second," and the like, may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
At present, in the prior art, for an image scaling display technology, a common scaling method mainly uses 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, hardware is easy to implement, and image distortion is large; the bilinear interpolation method and the bicubic interpolation method are relatively complex in calculation, image distortion is relatively small, but hardware consumption is large, and implementation is complex.
Based on this, embodiments of the present invention provide an image scaling display method, an image scaling display device, and a terminal device, so as to alleviate the technical problem of image distortion in the prior art, and improve the display quality of an image.
To facilitate understanding of the embodiment, a detailed description will be given first of all of an image scaling display method disclosed in the embodiment of the present invention.
First embodiment
Referring to fig. 1, an embodiment of the present invention provides an image scaling display method, including the following steps:
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 a scaling ratio; wherein the first pixel is any one pixel in the output image; the second pixel corresponds to the first pixel position; the output image has the same size as the input image;
specifically, a scaling factor of a first pixel in the output image and at least one second pixel corresponding to the first pixel position in the input image is determined based on the scaling; the first pixel is any one pixel in the output image; wherein the output image is an image of the scaled input image; for example, an input image of a first resolution may be scaled to obtain an output image of a second resolution; where the input image is the same size as the output image;
here, the input image and the output image having the same size mean that the output image and the input image completely overlap each other, and therefore, the length and width of the input image are equal to the length and width of the output image, respectively.
In step S104, a pixel value of the first pixel is determined based on the scaling coefficients of the first pixel and the second pixel and the pixel value of the second pixel.
Specifically, the pixel value of the first pixel in the output image is determined based on the scaling factor of the first pixel in the output image and the at least one second pixel corresponding to the first pixel position in the input image and the pixel value of the first pixel in the output image and the at least one second pixel corresponding to the first pixel position in the input image.
For example, when there is one second pixel, the scaling factor of the first pixel and the second pixel (referred to as the scaling factor of the second pixel) is directly multiplied by the pixel value of the first pixel and the second pixel (referred to as the pixel value of the second pixel) to obtain the pixel value of the first pixel;
when the number of the second pixels is multiple, the scaling coefficients of the first pixel and each second pixel 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 value of the first pixel is obtained by adding the pixel values.
In an alternative embodiment, the scaling factor of the first pixel and each second pixel (referred to as the scaling factor of each second pixel for short) 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 in which the first pixel is positioned and a second sub-image in which the second pixel is positioned;
wherein the first sub-image is any image block in the output image; the second sub-image is an image block in the input image corresponding to the first sub-image; namely, the second sub-images correspond to the first sub-images one by one; the first sub-image and the second sub-image have the same size;
specifically, the first sub-image in which the first pixel is located and the second sub-image in which the second pixel is located may be determined by searching a pre-constructed correspondence table between the first sub-image and the second sub-image in the output image and the input image after being subjected to blocking.
Of course, in other embodiments, step 1 may also be implemented by determining a first sub-image in which the first pixel is located, then determining a 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 location 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 in which the first pixel is located and the second sub-image in which the second pixel is located, the method further includes a step of blocking: the output image and the input image are respectively blocked to obtain at least one first sub-image and at least one second sub-image.
The step of partitioning realizes the generation of a corresponding table for the pre-division and the corresponding storage of the output image and the input image, so that the step 1 is convenient to call, and the processing efficiency is improved.
Specifically, the step of respectively blocking the output image and the input image 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 the input image and a pixel matrix of 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 in which the first pixel is positioned and the second sub-image in which the second pixel is positioned.
Specifically, based on a first sub-image in which the first pixel is located and a second sub-image corresponding to the first sub-image in which the first pixel is located, a position of at least one second pixel in the second sub-image and a scaling coefficient of the first pixel in the first sub-image and the at least one second pixel corresponding to the first pixel position in the second sub-image are determined.
At this time, step S104 determines 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, and 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 position and the pixel value of at least one second pixel in the second sub-image corresponding to the first pixel position.
In the present embodiment, the step S102 may be executed by:
a, determining the corresponding relation between the pixel matrixes of the input image and the output image based on the scaling;
b dividing the input image into a plurality of second sub-images and dividing 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 the size of each first sub-image is equal to that of the corresponding second sub-image;
c, determining a first sub-image in which the first pixel is positioned and a second sub-image corresponding to the first sub-image in which the first pixel is positioned;
d, determining the scaling coefficients of the first pixel and the second pixel based on the first sub-image in which the first pixel is positioned and the second sub-image in which the second pixel is positioned.
It should be noted that, the steps a and b are only used for convenience of description, and do not indicate the order of the steps, that is, the steps a and b may be performed 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, and the application is not limited in particular.
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 comprises the steps of determining scaling coefficients of a first pixel in an output image and at least one second pixel corresponding to the first pixel in an input image on the basis of a scaling ratio; the first pixel is any one pixel in the output image; wherein the input image is the same size as the output image; the 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 position 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 position. According to the method, the output area is the same as the input display area, the scaling coefficient between each output pixel and the related input pixel is obtained, the pixel value of each output pixel is obtained by applying the scaling coefficient, the image distortion is small, the occupied hardware consumption is small, and the method is simple and flexible.
Second embodiment
Referring to fig. 2, another image scaling display method according to an embodiment of the present invention 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 according to other parameters (e.g. resolution) input by the user.
Step S204, 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 has the same size as the input image;
wherein the scaling factor may be determined according to a minimum ratio of resolutions of the input image and the output image.
In step S206, a pixel value of the first pixel is determined 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, the step a may be implemented by any one of the following manners:
mode a 1:
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; obtaining a scaling based on the horizontal scaling;
specifically, after obtaining the horizontal scaling (referred to as an initial scaling, which is simply referred to as a second initial scaling), simplification processing is performed on the horizontal scaling, for example, a numerator and a denominator of the horizontal scaling are respectively divided by a greatest common divisor to obtain a simplest ratio, and the simplest ratio is squared to obtain the scaling (referred to as a final scaling herein).
Mode a 2:
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 the vertical scaling (also referred to as an initial scaling, which is simply referred to as a second initial scaling) is obtained, simplification processing is performed on the vertical scaling, for example, a numerator and a denominator of the vertical scaling are respectively divided by a greatest common divisor to obtain a simplest ratio, and the simplest ratio is squared to obtain the scaling (which is referred to as a final scaling).
Mode a 3:
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; 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; the scaling is derived based on the horizontal scaling as well as the 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, a numerator and a denominator of the horizontal scaling are respectively divided by a greatest common divisor and a numerator and a denominator of the vertical scaling are respectively divided by a greatest common divisor to obtain two simplest ratios of a horizontal simplest ratio and a vertical simplest ratio, and the two simplest ratios are subjected to multiplication to obtain the scaling.
Mode a 4:
the second resolution is directly divided by the first resolution to obtain the scaling.
The above-described modes a1 and a2 are applicable to images with fixed image resolution (i.e., the number of rows multiplied by the number of columns), for example, images with the same row and column reduction or enlargement ratio; the above-described modes A3 and a4 are applicable to images whose rows and columns are not uniformly reduced or enlarged.
For easy understanding, the following describes an image scaling display method provided by an embodiment of the present invention with reference to fig. 3 and 4:
assuming that the first resolution of the input image is 1280 (rows) × 720 (columns) and the second resolution of the output image is 1920 (rows) × 1080 (columns), where × represents a 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, which is the simplest ratio of 3/2. Therefore, the corresponding relation between the pixel matrix of the scaled input image and the pixel matrix of the output image is that the input image of 2 rows and 2 columns corresponds to the output image of 3 rows and 3 columns, so that the input image and the output image can be partitioned according to the input image of 2 rows and 2 columns corresponding to the output image of 3 rows and 3 columns, and the proportional relation between each output pixel and the related input pixel can be obtained according to the condition that the display areas of the output image and the input image are completely the same (overlapped), and the proportion is the scaling coefficient.
As shown in fig. 3, the dashed lines represent pixels of the output image, the solid lines represent pixels of the input image, and the generation process of the scaling factor is described by taking two examples, namely, a1 st row and a1 st column input pixel (i.e., a first pixel), and an input pixel (i.e., a second pixel) corresponding to the 1 st row and the 2 nd column output pixel (i.e., a first pixel) position as an input pixel of the 1 st row and the 1 st column and an input pixel of the 1 st row and the 2 nd column as an input pixel:
first, the total area of the row 1 and column 2 output pixels is (S1+ S2), where S1 is the area where the row 1 and column 2 output pixels (i.e., the first pixel) intersect the row 1 and column 1 input pixels (i.e., the second pixel), and S2 is the area where the row 1 and column 2 output pixels intersect the row 1 and column 2 input pixels (i.e., the second pixel). The scaling factor of the row 1, column 2 output pixel and the row 1, column 1 input pixel is S1/(S1+ S2), and the sum of the scaling factors of the row 1, column 2 output pixel and the row 1, column 2 input pixel is S2/(S1+ S2). Wherein the scaling factor value ranges from 0 to 1, the general image input data is 8 bits, and the output data is also 8 bits.
The pixel value of the row 1, column 2 output pixel 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, column 2; p _ in (1,1) is the pixel value of the input pixel at row 1, column 1, and S1/(S1+ S2) is the corresponding scaling factor value (i.e., the scaling factor of the output pixel at row 1, column 2 and the input pixel at row 1, column 1); p _ in (1,2) is the pixel value of the input pixel at row 1, column 2, and S2/(S1+ S2) is the corresponding scaling factor value (i.e., the scaling factor of the output pixel at row 1, column 2 and the input pixel at row 1, column 2).
That is, the pixel value of the first pixel can 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 the enlargement ratio) is described in detail below with reference to fig. 4:
as shown in fig. 4, the three graphs from left to right represent input pixels of 2x2 scale, a scaling factor of 3/2, and output pixels of 3x3 scale, respectively. Referring to fig. 4, it can be seen that the relationship between 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 denotes a pixel value of an input pixel, P _ out denotes an output pixel value, 1/2, 1/4, 1 denotes a scaling factor. And multiplying the scaling coefficient by the input pixel value of the corresponding position, and then adding to obtain the output pixel value of the corresponding position.
Third embodiment
As shown in fig. 5, an embodiment of the present invention further provides an image scaling display apparatus, including: a first determining module 501 and a second determining 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 ratio; wherein the first pixel is any one pixel in the output image; the second pixel corresponds to the first pixel position; the output image is the same size as the input image;
the second determining module 502 is 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.
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, when determining the scaling factor of a first pixel in the output image and at least one second pixel in the input image based on the scaling ratio, is configured to determine 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 image block in the output image; the second sub-image is an image block in the input image corresponding to the first sub-image position; the first sub-image and the second sub-image are the same size; and determining the scaling coefficients of the first pixel and the second pixel based on the first sub-image in which the first pixel is positioned and the second sub-image in which the second pixel is positioned.
In an alternative embodiment, the first determining module 501 is further configured to block the output image and the input image 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 a corresponding relationship between pixel matrices of the input image and the output image based on the scaling ratio when the output image and the input image are respectively blocked to obtain at least one first sub-image and at least one second sub-image; 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 is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
The image zooming display device provided by the embodiment of the invention has the same technical characteristics as the image zooming 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 invention further provides a terminal device 600, including: a processor 60, a memory 61, a bus 62 and a communication interface 63, wherein the processor 60, the communication interface 63 and the memory 61 are connected through 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) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 63 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
The bus 62 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 6, but that does not indicate only one bus or one type of bus.
The memory 61 is used for storing a program, the processor 60 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow process disclosed in any of the foregoing embodiments of the present invention 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 circuits of hardware or instructions in the form of software in the processor 60. The Processor 60 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention 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 invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is 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 above method.
The embodiment of the application also provides a computer-readable storage medium, and the computer-readable storage medium 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.
Herein, the processor may be an integrated circuit chip having signal processing capability. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps, and logic blocks disclosed in this 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 this application may be directly implemented by a hardware decoding processor, or may be implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The 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 such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. An image scaling display method, comprising:
determining a scaling factor for a first pixel in the output image and at least one second pixel in the input image based on the scaling ratio; wherein the first pixel is any one pixel in the output image; the second pixel corresponds to the first pixel position; the output image is the same size as the input image;
determining a pixel value of the first pixel based on scaling coefficients of the first pixel and the second pixel, and a pixel value of the second pixel.
2. The method of 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 a first resolution of the input image and a second resolution of the output image.
4. The method of claim 1, wherein the step of determining a scaling factor for a first pixel in the output image and at least one second pixel in the input image based on the scaling ratio comprises:
determining a first sub-image in which the first pixel is positioned and a second sub-image in which the second pixel is positioned; wherein the first sub-image is any image block in the output image; the second sub-image is an image block in the input image corresponding to the first sub-image position; the first sub-image and the second sub-image are the same size;
and determining the scaling coefficients of the first pixel and the second pixel based on the first sub-image in which the first pixel is positioned and the second sub-image in which the second pixel is positioned.
5. The method of claim 4, further comprising:
the output image and the input image are respectively blocked to obtain at least one first sub-image and at least one second sub-image.
6. The method according to claim 5, wherein the step of blocking the output image and the input image to obtain at least one first sub-image and at least one second sub-image comprises:
determining a correspondence between pixel matrices of an input image and an 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.
7. An image scaling display device, comprising:
a first determining module for determining a scaling factor for 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 is the same size as the input image;
a second determining module for determining 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.
8. The apparatus of claim 7, further comprising:
a third determining module for determining the scaling.
9. A terminal device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor to implement the method of any one of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-6.
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 true CN111260559A (en) 2020-06-09
CN111260559B 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)

Cited By (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 (6)

* 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
US20190251664A1 (en) * 2018-02-13 2019-08-15 Ricoh Company, Ltd. Image scaling with efficient pixel resolution conversion

Patent Citations (6)

* 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
US20190251664A1 (en) * 2018-02-13 2019-08-15 Ricoh Company, Ltd. Image scaling with efficient pixel resolution conversion
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的图像缩放技术分析" *
邓秀林;: "数字图像的剪裁与缩放" *

Cited By (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

Also Published As

Publication number Publication date
CN111260559B (en) 2023-09-22

Similar Documents

Publication Publication Date Title
CN111476718B (en) Image amplification method and device, storage medium and terminal equipment
EP3093757B1 (en) Multi-dimensional sliding window operation for a vector processor
CN106780336B (en) Image reduction method and device
JP5703769B2 (en) Image conversion apparatus, image conversion method, program, and electronic apparatus
CN111724304B (en) Image scaling method and device, terminal equipment and storage medium
CN111443974A (en) Android device screen adapting method, related device and readable storage medium
CN111223061A (en) Image correction method, correction device, terminal device and readable storage medium
CN110443751B (en) Image deformation method, device and equipment based on drawing lines and storage medium
JP4728744B2 (en) Image processing device
CN111260559B (en) Image zooming display method and device and terminal 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
CN113112561A (en) Image reconstruction method and device and electronic equipment
CN114493988A (en) Image blurring method, image blurring device and terminal equipment
CN109996085B (en) Model training method, image processing method and device and electronic equipment
US8902474B2 (en) Image processing apparatus, control method of the same, and program
US10332239B2 (en) Apparatus and method for parallel polyphase image interpolation
CN109522532B (en) Method and device for calculating selection range of line drawing frame
JP4621944B2 (en) Image filter device, method and computer program
CN111429384B (en) Image processing method and device
CN112261242B (en) Image data processing method and device
CN111626938B (en) Image interpolation method, image interpolation device, terminal device, and storage medium
CN115984091A (en) Image processing method and device, electronic equipment and readable storage medium
CN113111891B (en) Image reconstruction method and device, terminal equipment and storage medium
KR20130059546A (en) Methods of interpolation based on edge and apparatuses for using the same

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