CN112053283A - Image scaling method, storage medium and electronic device - Google Patents

Image scaling method, storage medium and electronic device Download PDF

Info

Publication number
CN112053283A
CN112053283A CN202010810213.6A CN202010810213A CN112053283A CN 112053283 A CN112053283 A CN 112053283A CN 202010810213 A CN202010810213 A CN 202010810213A CN 112053283 A CN112053283 A CN 112053283A
Authority
CN
China
Prior art keywords
image
image data
ram
read
control unit
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
CN202010810213.6A
Other languages
Chinese (zh)
Other versions
CN112053283B (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.)
Shenzhen Zhouming Technology Co Ltd
Original Assignee
Shenzhen Zhouming Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Zhouming Technology Co Ltd filed Critical Shenzhen Zhouming Technology Co Ltd
Priority to CN202010810213.6A priority Critical patent/CN112053283B/en
Priority claimed from CN202010810213.6A external-priority patent/CN112053283B/en
Publication of CN112053283A publication Critical patent/CN112053283A/en
Application granted granted Critical
Publication of CN112053283B publication Critical patent/CN112053283B/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 transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4007Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0007Image acquisition
    • 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
    • G06T3/4023Scaling of whole images or parts thereof, e.g. expanding or contracting based on decimating pixels or lines of pixels; based on inserting pixels or lines of pixels

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses an image zooming method, a storage medium and an electronic device, wherein the image zooming method comprises the following steps: s1, reading original image data and zooming parameters, and screening and storing effective pixel lines participating in interpolation operation from the original image data according to the zooming parameters; s2, writing the current image frame into an image data RAM unit according to the stored effective pixel row; s3, reading out the effective pixel value of the current image frame from the image data RAM unit, and carrying out interpolation calculation according to the effective pixel value and the interpolation coefficient to obtain the pixel value of the current zoom image frame; and S4, reading the next image frame as the current image frame, and repeating the steps S2-S4 to finish image scaling. The invention can save storage resources while ensuring the quality of the zoomed image.

Description

Image scaling method, storage medium and electronic device
Technical Field
The invention relates to the technical field of image zooming of LED display screens, in particular to an image zooming method, a storage medium and electronic equipment.
Background
In computer image processing and computer graphics, image scaling refers to the process of resizing a digital image. Image scaling is a non-trivial process requiring a trade-off in processing efficiency and smoothness and sharpness of the result. The existing image scaling algorithm mostly adopts an interpolation algorithm, and the interpolation algorithm is mainly divided into traditional interpolation, edge-based interpolation and region-based interpolation. The bilinear interpolation algorithm is an image scaling algorithm which is widely applied.
Patent publication No. CN104869284A proposes a high-efficiency FPGA implementation method and apparatus for bilinear interpolation amplification algorithm, which focuses on controlling the number of multiplier resources, and therefore proposes a concept of weight coefficient reuse, but the real-time performance is not good. Patent publication No. CN108986033A also proposes an image scaling method based on bilinear interpolation algorithm processing, which focuses on optimizing the usage of resources, but the image quality after scaling is poor. Patent publication No. CN106910162A also proposes an image scaling processing method and apparatus based on FPGA, which focuses on storage resources, optimizes external storage, and uses all internal storage of FPGA, but currently, the mainstream bilinear interpolation will not use external storage any more, because the current bilinear interpolation does not use external storage resources any more under the condition of 4 pixel correlations, that is, under the condition of two-line or two-column correlations, and under the condition of sufficient internal storage resources of FPGA.
Therefore, the existing bilinear interpolation implementation method based on the FPGA can not ensure the quality of the zoomed image, and can save the storage resource and the zooming time.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: provided are an image scaling method, a storage medium, and an electronic device, which can save storage resources while ensuring the quality of a scaled image.
In order to solve the technical problems, the invention adopts the technical scheme that:
an image scaling method, comprising the steps of:
s1, reading original image data and scaling parameters, and screening and storing effective pixel lines participating in interpolation operation from the original image data according to the scaling parameters;
s2, writing the current image frame into an image data RAM unit according to the stored effective pixel row;
s3, reading out the effective pixel value of the current image frame from the image data RAM unit, and carrying out interpolation calculation according to the effective pixel value and the interpolation coefficient to obtain the pixel value of the current zooming image frame;
and S4, reading the next image frame as the current image frame, and repeating the steps S2-S4 to finish image scaling.
In order to solve the technical problem, the invention adopts another technical scheme as follows:
a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the image scaling method as described above.
In order to solve the technical problem, the invention adopts another technical scheme as follows:
an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the image scaling method as described above when executing the computer program.
The invention has the beneficial effects that: a write-in control unit screens and stores effective pixel lines participating in interpolation operation from original image data according to scaling parameters before a current image frame starts scaling, so that only the effective pixel lines participating in interpolation operation can be written into an image data RAM, and are correspondingly read by a read control unit and subjected to interpolation calculation by corresponding interpolation coefficients, and therefore the pixel value of each point on a scaled image is obtained. Therefore, all the effective pixel lines participating in interpolation operation are stored in the image data RAM, and the ineffective pixel lines not participating in interpolation operation are directly discarded, so that RAM storage resources are saved, and the zooming image quality can be ensured and meanwhile the storage resources can be saved.
Drawings
FIG. 1 is a flowchart illustrating an image scaling method according to an embodiment of the present invention;
FIG. 2 is a schematic illustration of bilinear interpolation according to an embodiment of the present invention;
FIG. 3 is a block diagram of an implementation of an image scaling method according to an embodiment of the present invention;
FIG. 4 is a diagram of an implementation structure of a write control unit according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a RAM control unit according to an embodiment of the present invention performing read/write control on four image data RAMs;
FIG. 6 is a block diagram of an implementation of a read control unit according to an embodiment of the present invention;
FIG. 7 is a schematic control timing diagram illustrating an image scaling method according to an embodiment of the invention;
FIG. 8 is a schematic diagram illustrating an application of the image scaling method according to the embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Description of reference numerals:
1. an electronic device; 2. a processor; 3. a memory.
Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
Referring to fig. 1 to 8, the image scaling method includes the steps of:
s1, reading original image data and scaling parameters, and screening and storing effective pixel lines participating in interpolation operation from the original image data according to the scaling parameters;
s2, writing the current image frame into an image data RAM unit according to the stored effective pixel row;
s3, reading out the effective pixel value of the current image frame from the image data RAM unit, and carrying out interpolation calculation according to the effective pixel value and the interpolation coefficient to obtain the pixel value of the current zooming image frame;
and S4, reading the next image frame as the current image frame, and repeating the steps S2-S4 to finish image scaling.
From the above description, the beneficial effects of the present invention are: the writing control unit screens and stores effective pixel lines participating in interpolation operation from original image data according to the zooming parameters before the current image frame starts zooming, so that only the effective pixel lines participating in interpolation operation can be written into the image data RAM, and the effective pixel lines are correspondingly read by the reading control unit and subjected to interpolation calculation by corresponding interpolation coefficients, and therefore the pixel value of each point on the zoomed image is obtained. Therefore, all the effective pixel lines participating in interpolation operation are stored in the image data RAM, and the ineffective pixel lines not participating in interpolation operation are directly discarded, so that RAM storage resources are saved, and the zooming image quality can be ensured and meanwhile the storage resources can be saved.
Furthermore, the image data RAM unit is provided with N image data RAMs which are sequentially arranged and connected end to end, the size of each image data RAM is larger than that of one line of data of the original image, and N is an integer larger than or equal to 1.
Here, the end-to-end means that the last image data RAM is the last image data RAM of the first image data RAM.
Further, the writing of the image data RAM unit includes sequentially queuing to write the image data RAM; and/or said reading out from said image data RAM unit comprises reading out from two adjacent image data RAMs.
Furthermore, the image data RAM unit comprises an RAM control unit and four image data RAMs which are sequentially arranged and connected end to end;
the RAM control unit controls writing of the four image data RAMs, including the steps of:
when the RAM control unit receives a write-in-advance signal, the address of the image data RAM which is arranged in front of the two image data RAMs which are currently involved in interpolation calculation is used as the address of the write RAM which needs to be written currently; and/or
The RAM control unit controls writing of four image data RAMs, including:
when the RAM control unit receives a read-in signal of the read control unit, if the read-in signal is a read-in one-line signal, the address of the image data RAM arranged behind two image data RAMs participating in interpolation calculation last time and the address of the next image data RAM arranged behind the image data RAM are used as two read-in RAM addresses needing to be read currently, and if the read-in signal is a read-in two-line signal, the addresses of the two image data RAMs except the two image data RAMs participating in interpolation calculation last time are used as two read-in RAM addresses needing to be read currently, and the two read-in RAM addresses are returned to the read control unit.
As can be seen from fig. 5, the four image data RAMs are sequentially RAM1-4, and fig. 5 shows a case where only one effective pixel row is updated, when the RAM1 and the RAM2 are reading data, the RAM4 that is the last image data RAM of the RAM1 is used as an image data RAM that needs to be written, and after the RAM1 and the RAM2 read data, the effective pixel rows in the RAM2 and the RAM3 are needed for the next calculation, at this time, the effective pixel row of the RAM1 is not used again, and the RAM4 is the newest effective data line, so the RAM1 is used as the image data RAM that needs to be written.
As is apparent from the above description, the four image data RAMs are each written and read in succession in units of one effective pixel line of an image, in which any two adjacent image data RAMs are read in sequence when reading data to perform interpolation operation, and therefore, the effective pixel line that has been read before is stored in the last image data RAM of the two image data RAMs involved in interpolation operation, and is therefore taken as the next written image data RAM, to update the effective pixel line stored in the image data RAM. In this case, there are cases where the next row does not need to be updated, only one row is updated, and both rows are updated, but in any case, the four image data RAMs all store the effective pixel row that needs to be operated next time, and thus, the RAM control unit can determine whether the write RAM address needs to be updated to the write control unit and the read RAM address needs to be updated to the read control unit according to the effective pixel row, so as to implement continuous writing and reading of the effective pixel row in the image data RAM, which not only can save storage resources, but also ensures the access speed of the cache, so that scaling processing has certain real-time performance, so as to implement high resolution, high pixel bit width, low RAM resource consumption, and low delay.
Further, the read control unit generating the read-ahead signal includes the steps of:
after the calculation of the pixel points of the M-th row on the zoomed image is completed, the reading control unit judges whether the mapping row number of the pixel points of the M + 1-th row on the zoomed image and the mapping row number of the pixel points of the M-th row have intersection, if the intersection is 1, a reading row signal is generated, if the intersection is 2, the reading row signal is not sent, if the intersection is 0, two rows of reading signals are generated, and N is a positive integer.
From the above description, it can be known that whether the two previous and subsequent calculations have an intersection is determined by the mapped line number, so as to realize accurate read-write control of the image data RAM.
The step S2 specifically includes the following steps:
the writing control unit receives a current image frame starting signal and initializes the filled number fillcount, wherein the filled number fillcount is the number of the RAMs which are filled with rows and are not read in the image data RAM unit, and the filled number fillcount is less than or equal to N;
the write-in control unit judges whether the filled number fillcount is smaller than N in real time, if so, a write-in signal in advance is sent to the image data RAM unit, and if not, the data writing is stopped;
the image data RAM unit receives the write-in signal in advance, carries out accumulation counting on the filled number fillcount and updates the next write RAM address, feeds back a write-in updating signal comprising the filled number fillcount subjected to accumulation counting and the updated write RAM address to the write-in control unit, and feeds back the filled number fillcount subjected to accumulation counting to the read control unit;
and the writing control unit receives the writing updating signal and writes the effective pixel row mapped by the current image frame calculation line number into the image data RAM corresponding to the updated writing RAM address, and one image data RAM stores one effective pixel row.
Further, the step S3 specifically includes:
s31, the reading control unit receives the reading updating signal returned by the image data RAM unit in real time;
s32, reading the effective pixel value corresponding to the M-th row of pixel points on the current image frame from the image data RAM unit according to the reading updating signal by the reading control unit, wherein M is a positive integer;
s33, the reading control unit sends the read effective pixel values corresponding to the M-th row of pixel points and the corresponding interpolation coefficients to an interpolation calculation circuit for interpolation calculation;
and S36, repeating the steps until the pixel value of each point on the current zoom image frame is obtained.
Further, the step S31 specifically includes the following steps:
the reading control unit receives an external output request signal;
the reading control unit receives the filled number fillcount fed back by the image data RAM unit in real time, wherein the filled number fillcount is the number of the RAMs which are filled with rows and are not read in the image data RAM unit, and the filled number fillcount is less than or equal to N;
and the reading control unit judges whether the filled number fillcount received in real time is greater than or equal to 2, if so, receives a reading updating signal returned by the image data RAM unit in real time, and if not, stops outputting data.
Further, the step S3 further includes:
s34, the reading control unit judges whether the mapping row number of the pixel point of the M +1 th row and the mapping row number of the pixel point of the M th row have intersection, if the intersection is 0, a reading two-row signal is generated, if the intersection is 1, a reading one-row signal is generated, and if the intersection is 2, the reading-in-advance signal is not sent.
Further, the step S3 further includes:
and S35, the image data RAM unit receives the read-in signal of the read control unit, if the read-in signal is a read-in one-line signal, the filled number fillcount is counted down by one and the next read-in RAM address is updated, if the read-in signal is a read-in two-line signal, the filled number fillcount is counted down by two and the next read-in RAM address is updated, the read-in update signal comprising the filled number fillcount counted down and the updated read-in RAM address is fed back to the read control unit, and the filled number fillcount read by the count down is fed back to the write control unit.
As can be seen from the above description, the writing control unit needs to fully write the four image data RAMs when starting the scaling, while the reading control unit can start reading data to perform interpolation calculation after the two image data RAMs are fully written, and the two control units respectively and independently complete writing data and reading data. Meanwhile, the writing control unit, the RAM control unit and the reading control unit realize accurate correspondence of reading data and writing data through synchronous updating of the filled number fillcount and the RAM address and mutual correspondence of the line number, so that continuous writing and reading of effective pixel lines in the image data RAM are realized.
Further, the step S1 specifically includes the following steps:
the writing control unit acquires a Y-direction scaling, calculates Y-direction coordinate information of each line of the scaled image on the original image according to the Y-direction scaling, then acquires original image Y-direction information of two lines adjacent to the Y-direction coordinate information on the original image in the Y direction, and performs Y-direction mapping on the scaling Y-direction information of each line on the scaled image and the original image Y-direction information of two corresponding lines on the original image;
the write control unit takes a pixel row that is Y-mapped with the scaled image as an effective pixel row.
As can be seen from the above description, the pixel rows participating in the interpolation operation are calculated according to the Y-direction scaling to obtain the effective pixel rows.
Further, the step S3 is preceded by the following steps:
the reading control unit acquires an X-direction scaling and a Y-direction scaling, original image coordinate information of each point on the scaled image on the original image is respectively calculated according to the X-direction scaling and the Y-direction scaling, then original image position information of four points adjacent to the original image coordinate information is acquired on the original image, and the scaling X-direction information of each point on the scaled image and the X-direction information of two original images of four corresponding points on the original image are subjected to X-direction mapping;
and obtaining an interpolation coefficient of each point on the zoomed image according to the distance between the position information of each point on the zoomed image and the position information of the corresponding four points on the original image.
As can be seen from the above description, in conjunction with fig. 2, the interpolation coefficients include X-direction interpolation coefficients and Y-direction interpolation coefficients. Therefore, each point on the scaled image corresponds to the original image according to the scaling ratio, because the points are integers, such as the first row and the first column, but different scaling ratios may occur at positions which are not integers, at this time, the four adjacent points which obtain the corresponding point (i + u, j + v) are actually (i, j), (i +1, j), (i, j +1), and (i +1, j +1), where u is an X-direction interpolation coefficient, v is a Y-direction interpolation coefficient, such as the corresponding point (1.4,1.6) the four adjacent points are (1,1), (2,1), (1,2), and (2,2), where the X-direction interpolation coefficient u is 0.4, and the Y-direction interpolation coefficient v is 0.6, so that the X-direction interpolation coefficient and the Y-direction interpolation coefficient of each point on the scaled image can be obtained according to the four adjacent points. At this time, since the writing control unit performs Y-direction mapping, the Y-direction mapping is already calculated for two effective pixel rows read by the reading control unit, for example, as described above, when the reading control unit reads the 1 st row and the 2 nd row, it only needs to know the X-direction mapping relationship, because, for the image frames arranged in order, the X-direction mapping relationship on each row is the same, that is, the Y-direction mapping is calculated and written in advance, and when the interpolation operation is performed subsequently, the corresponding pixel value can be quickly read only according to the X-direction mapping relationship, thereby increasing the reading speed of data and further increasing the scaling speed.
Another embodiment of the invention provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the image scaling method as described above.
Referring to fig. 9, another embodiment of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the image scaling method as described above when executing the computer program.
With regard to the specific implementation process and the corresponding effect of the image scaling method included in the computer program in the above two embodiments, reference may be made to the related description in the garbage collection optimization method in the foregoing embodiments.
Referring to fig. 1 to 8, a first embodiment of the present invention is:
for the understanding of the present embodiment, bilinear interpolation and partial english are briefly described as follows:
as shown in fig. 2, the core principle of bilinear interpolation is weighted summation of four adjacent points of a mapping point, the closer points are weighted more, the mapping point is the position of a point of a scaled image relative to the position of an original image, bilinear interpolation is an extension of linear interpolation, which is essentially the result of interpolation of two rows in the horizontal direction and then vertical interpolation, or the result of interpolation of two columns in the vertical direction and then horizontal interpolation, and the two-dimensional interpolation results shown in fig. 2 are the same as follows:
P0=(1-u)×f(i,j)+u×f(i+1,j)
P1=(1-u)×f(i,j+1)+u×f(i+1,j+1)
f(i+u,j+v)=(1-v)×P0+v×P1
regardless of the horizontal or vertical interpolation, the bilinear interpolation formula is finally sorted out to obtain:
f(i+u,j+v)=(1-u)(1-v)×f(i,j)+(1-u)×v×f(i,j+1)+u×(1-v)×f(i+1,j)+u×v×f(i+1,j+1)
meanwhile, the bilinear interpolation scaling of the embodiment is realized in an FPGA (field programmable gate array), a video processing library selected and sourced is OpenCV, which is an Intel sourced computer vision library and is composed of a series of C functions and a small amount of C + + classes, and a plurality of general algorithms in the aspects of image processing and computer vision are realized. The scaling interface of OpenCV is void cv: (InputAlray _ src, OutputAlray _ dst, Size dsize, double inv _ scale _ x, double inv _ scale _ y, int interpolation), which respectively represents as follows:
InputAlray _ src: the method comprises the steps of representing a data source, an image data source needing to be scaled, and also comprising image size and channel number information;
OutputAlray _ dst: representing a target source, and storing the data generated after scaling;
size dsize: to show the scaled size, only the length and width need be listed
double inv _ scale _ x: represents a lateral scaling factor, which may also be referred to as an X-direction scaling factor;
double inv _ scale _ y: represents a vertical scaling factor, which may also be referred to as a Y-direction scaling factor;
int interplation: representing a scaling interpolation mode;
the scaling coefficients of the interface are divided into two groups, one group is a scaling size dsize, the other group is a horizontal scaling coefficient and a vertical scaling coefficient, the scaling size dsize is calculated according to the dsize preferentially, the two groups of coefficients cannot be 0 at the same time, input parameters used in the interface in the embodiment are _ src and dsize, output parameters are only _ dst, scaling processing results are stored, and hardware is implemented to output signals.
Wherein, the following and English shown in the figures are respectively explained as follows:
RAM file control: a write control unit of the image data RAM;
RAM FIFO control: a read-write control unit of the image data RAM, which is called RAM control unit for short;
read control: a read control unit;
RAM-FIFO: namely, the combination of the RAM FIFO control and the 4 image data RAMs is called as a short term;
advance write: a write-ahead signal;
advance Read: reading a signal in advance;
fillcount: the number of RAMs which are filled with rows and are not read in the RAM-FIFO corresponds to the number of filled data in the text;
dst _ w: zooming the image width;
dst _ h: zooming the image height;
src _ w: the width of the original image;
src _ h: the original image height;
cn: the number of color channels;
CalcTable: calculating a mapping table signal;
y axis Coordinate mapping preservation: a Y-direction position mapping calculation module;
y axis Coordinate mapping RAM: a Y-direction position mapping storage RAM;
valid Line Input control: an input effective data control module;
x axis Coordinate mapping preservation: an X-direction position mapping calculation module;
x axis interaction coeffient study: an X direction interpolation coefficient calculation module;
y axis interaction coeffient evaluation: a Y direction interpolation coefficient calculation module;
x axis Coordinate mapping RAM: an X-direction position mapping storage RAM;
x axis interference coefficient RAM: an X-direction interpolation coefficient storage RAM;
y axis interference coeffient RAM: a Y-direction interpolation coefficient storage RAM;
valid Line output control: an output valid data control module;
nextDin: notifying external input enable;
dIn: inputting image data;
nextDout: an external output request;
dOut: outputting the image data;
dOutValid: outputting a data valid signal;
IN-CA: the abbreviation of interpolation computation, which stands for OpenCV bilinear interpolation circuit.
The image scaling method provided by the embodiment comprises the following steps:
s1, reading original image data and zooming parameters, and screening and storing effective pixel lines participating in interpolation operation from the original image data according to the zooming parameters;
specifically, as shown in fig. 3, scaling related parameters Dst _ w, Dst _ h, Src _ w, Src _ h, and cn are set at the time of first start, and after the parameters are set, calculation of the related interpolation coefficient table and the position mapping table is started after receiving the calcttable signal.
As shown in fig. 4, the write control unit mainly reads the original image data and screens the data participating in the interpolation operation to write into the RAM-FIFO, calculates the position mapping in the Y direction by the Y axis coding mapping caching after receiving the calcdable signal according to the scaled image parameters Dst _ w and Dst _ h, the original image parameters Src _ w and Src _ h, and the color channel number cn, and stores the calculated position mapping in the Y axis coding mapping RAM, and these calculations are all completed before starting the start signal. Therefore, the RAM file control can screen the effective pixel lines participating in the interpolation operation according to the mapping, and only the effective pixel lines participating in the interpolation operation can enter the image data RAM, so that the time consumed by the position mapping floating point real-time operation can be saved. The Valid Line Pixel Count represents the coordinate number of a currently Input Pixel of an effective Pixel Line on an X axis, and is called a dot number for short, the dot number is used for recording the number of effective pixels entering a Line of RAM-FIFO and also used for judging the end of the Line according to the comparison between a Count value and Src _ w, the Valid Line Input control module selects the effective Pixel Line to Input according to Y-axis position mapping, dInValid is a Line Pixel Input effective signal, an inputDiscardCnt parameter is the length of frame header data (or clipping) discarding, and nextDin is the data for notifying external Input pixels; RAM Write Control is to manage Write RAM-FIFO address and enable; the RAM Fifo Write Control manages which RAM in the RAM-FIFO is written to by selection and issues an advance Write signal;
s2, writing the current image frame into an image data RAM unit according to the stored effective pixel row;
starting a Start signal when each frame of image starts, inputting original image data from dIn, taking out a mapping line number of a current calculation line number, judging whether read original image line data needs to be discarded, writing into a RAM when finding effective pixel line data participating in calculation, finishing writing one line, namely one RAM, and then sending Advance write to a RAM FIFO control module to update a write RAM address.
That is, the RAM is controlled by the RAM-FIFO Control for which image data is written or Read, and whether to write and Read the RAM, and which RAM to write or Read, are arranged based on the advanced write signal generated by the RAM file Control signal and the advanced Read1 and advanced Read2 signals generated by the Read Control.
S3, reading out the effective pixel value of the current image frame from the image data RAM unit, and carrying out interpolation calculation according to the effective pixel value and the interpolation coefficient to obtain the pixel value of the current zooming image frame; the Read control is a core module, receives scaling parameters Dst _ w, Dst _ h, Src _ w, Src _ h and channel number cn in advance, calculates a position map of each point in the X direction, an X-direction Interpolation coefficient of each point and a Y-direction Interpolation coefficient of each point through three calculation modules X axis coding mapping, X axis Interpolation coefficient calculation and Y axis Interpolation coefficient calculation after receiving a caltable signal, and respectively stores the position map, the X axis Interpolation coefficient and the Y-direction Interpolation coefficient in an X axis coding mapping RAM, an X axis Interpolation coefficient RAM and a Y axis Interpolation coefficient RAM, so that a mapping position and an Interpolation coefficient are directly Read in a RAM manner during subsequent Interpolation calculation, and time consumed by floating point operation is saved; these calculations are all completed before the start signal is initiated.
After the calculation is started, after the Read control module selects the image data RAM in the RAM-FIFO, the data in the X axis coding mapping storage RAM can be sequentially output as the Read RAM address, and similarly, the interpolation coefficients in the X axis interpolation coefficient RAM and the Y axis interpolation coefficient RAM can also be sequentially output and the pixels selected and output from the RAM-FIFO are subjected to interpolation calculation, so that the current zoomed pixel value is calculated.
As shown in fig. 6, the Valid Line output control module is an output control section, which receives an external output preparation signal nextDout, and outputs a frame end signal end output after comparing a synchronization Valid enable signal dOutValid of the scaled interpolation calculation data with Dst _ h; counting the number of pixels of a current calculation Line of the zoom image by the Valid Line Pixel Count, and comparing the Count with Dst _ w to judge the end of the calculation Line; the RAM READ Control selects which image data RAM in the RAM-FIFO to READ, and READs data from the X axis coding mapping RAM to provide address for reading the RAM, the RAM FIFO READ Control has the function of sending or not sending a line feed signal advance READ according to the data updating degree after the last line of calculation is finished, so that the reading updating signal returned by the RAM Control unit enables the reading Control unit to know which image data RAM is to be READ in the next line, and the calculation of each line on an image frame is finished.
And S4, reading the next image frame as the current image frame, and repeating the steps S2-S4 to finish image scaling.
Referring to fig. 1 to 8, a second embodiment of the present invention is:
in the image scaling method provided by this embodiment, on the basis of the first embodiment, data interaction among the write control unit, the RAM control unit, and the read control unit is performed to realize continuous reading and writing of four image data RAMs.
As shown in fig. 3, the image data RAM unit is provided with N image data RAMs arranged in sequence and end-to-end, each image data RAM having a size larger than that of one line of data of the original image, where N is an integer greater than or equal to 1. Thus, in the present embodiment, writing the image data RAM unit includes queuing writing the image data RAM in order; and/or reading out from the image data RAM unit includes reading out from two adjacent image data RAMs.
As shown in fig. 3, in the present embodiment, the image data RAM unit includes a RAM control unit and four image data RAMs arranged in sequence and connected end to end, that is, N is 4; the four image data RAMs are in turn RAM1-4, where the last image data RAM is the last image data RAM of the first image data RAM, i.e., RAM4 in the figure is the last image data RAM of RAM 1.
In this embodiment, step S1 specifically includes the following steps:
s11, the writing control unit acquires a Y-direction scaling, calculates Y-direction coordinate information of each line of the scaled image on the original image according to the Y-direction scaling, then acquires original image Y-direction information of two lines adjacent to the Y-direction coordinate information on the original image in the Y direction, and performs Y-direction mapping on the scaled image Y-direction information of each line and the original image Y-direction information of two corresponding lines on the original image;
s12, the write control unit sets the pixel line Y-mapped with the zoom image as an effective pixel line.
In this embodiment, N is 4, and in other equivalent embodiments, N may be another integer greater than or equal to 1, so that step S2 specifically includes the following steps:
s21, the writing control unit receives a current image frame starting signal and initializes the filled number fillcount, wherein the filled number fillcount is the number of the RAMs which are filled with rows and are not read in the image data RAM unit, and the filled number fillcount is less than or equal to 4;
thus, the initialized filled number fillcount is 0;
s22, the writing control unit judges whether the filled number fillcount is smaller than 4 in real time, if yes, a signal for writing in advance is sent to the RAM control unit, and if not, the writing of data is stopped;
when the image data is just started, the filled number fillcount is certainly less than 4, so that 4 effective pixel rows can be continuously written into 4 image data RAMs during the first writing;
s23, the RAM control unit receives the write-in signal in advance, carries out accumulation counting on the filled number fillcount, takes the address of the previous image data RAM of the image data RAM arranged in front of the two image data RAMs currently participating in interpolation calculation as the current write RAM address needing to be written in, feeds back the write-in updating signal comprising the filled number fillcount after accumulation counting and the updated write RAM address to the write-in control unit, and feeds back the filled number fillcount after accumulation counting to the read control unit;
for example, when writing is performed for the first time, the filled number fillcount is 0, and if an early writing signal is received, the accumulated count of the filled number fillcount is 1, and then the RAM1 arranged at the forefront is used as the current write RAM address to be written, so that 4 image data RAMs are sequentially written, and the accumulated count of the filled number fillcount is 4;
s24, the writing control unit receives the writing updating signal, and writes the effective pixel row mapped by the current image frame calculation line number into the image data RAM corresponding to the updated writing RAM address, wherein one image data RAM stores one effective pixel row, and the storage size of each image data RAM is larger than the data size of one line of the original image;
receiving the address of the RAM1, writing the stored effective pixel row into the RAM 1;
in this embodiment, step S3 is preceded by the following steps:
s30, after receiving the CalcTable signal, the reading control unit acquires an X-direction scaling and a Y-direction scaling, respectively calculates original image coordinate information of each point on the scaled image on the original image according to the X-direction scaling and the Y-direction scaling, then acquires original image position information of four points adjacent to the original image coordinate information on the original image, and performs X-direction mapping on the scaling image X-direction information of each point in the X direction of the scaled image and two original image X-direction information of corresponding four points on the original image;
and obtaining the interpolation coefficient of each point on the scaled image according to the distance between the position information of each point on the scaled image and the position information of the corresponding four points on the original image.
Since the writing control unit performs Y-mapping, the Y-mapping is already calculated for two effective pixel rows read by the reading control unit, for example, when the reading control unit reads rows 1 and 2, only the X-mapping relation needs to be known, and therefore only the X-mapping needs to be calculated in the reading control unit.
In this embodiment, step S3 specifically includes the following steps:
s31, the reading control unit receives the reading updating signal returned by the image data RAM unit in real time;
s32, reading the effective pixel value corresponding to the M-th row of pixel points on the current image frame from the image data RAM unit according to the reading updating signal by the reading control unit, wherein M is a positive integer;
s33, the reading control unit sends the read effective pixel values corresponding to the M-th row of pixel points and the corresponding interpolation coefficients to an interpolation calculation circuit for interpolation calculation;
s34, the reading control unit judges whether the mapping row number of the pixel point of the M +1 th row and the mapping row number of the pixel point of the M th row have intersection, if the intersection is 0, a reading two-row signal is generated, if the intersection is 1, a reading one-row signal is generated, and if the intersection is 2, the reading-in-advance signal is not sent;
in this embodiment, when the RAM control unit receives the read-ahead signal from the read control unit, if the read-ahead signal is a read-one-line signal, the address of the image data RAM arranged later in the two image data RAMs that have participated in the interpolation calculation last time and the address of the next image data RAM arranged later in the image data RAM are taken as two read RAM addresses that need to be read currently, and if the read-ahead signal is a read-two-line signal, the addresses of the two remaining image data RAMs excluding the two image data RAMs that have participated in the interpolation calculation last time are taken as two read RAM addresses that need to be read currently, and the two read RAM addresses are returned to the read control unit.
In bilinear difference calculation, two lines of effective pixels are required for calculation each time, and the following three conditions can occur according to different scaling ratios: the first situation is that line numbers of several continuous lines of amplified images are generated corresponding to two lines of original data which are the same when in amplification, so a module for reading data may not inform reading of new data to the RAM-FIFO, and data of the remaining two RAMs are not calculated data written before, and no advanced reading signal is sent out, and the data reading module is in a waiting state; fig. 5 illustrates a second case, where when the current calculation line number of the scaled image is mapped to the second line in two adjacent lines of the original image and the next calculation line number of the scaled image is mapped to the first line number in two adjacent lines of the original image, if the 1 st line of the scaled image is used in the 1 st and 2 nd lines of the original image and the 2 nd line of the scaled image is used in the 2 nd and 3 rd lines of the original image, at this time, the 2 nd line of the original image is used for 2 times, so the 2 nd line of the scaled image can be calculated only by reading the 3 rd line of the original image, at this time, the 1 st line of the original image is useless, and only the RAM in which the 1 st line of the original image is located needs to be updated, in this case, only one RAM in the remaining two RAMs needs to write data; in addition, there is a third case that the original image line number mapped by the next line number of the scaled image does not intersect with the two currently calculated original image line numbers, and the two remaining RAMs need to read new data.
As shown in fig. 5, the second case will be explained: when the RAM1 and the RAM2 are reading data, the last image data RAM of the RAM1, namely the RAM4, is used as an image data RAM to be written, after the RAM1 and the RAM2 read data, the effective pixel rows in the RAM2 and the RAM3 need to be used in next calculation, at this time, the effective pixel rows in the RAM1 cannot be used any more subsequently, and the RAM4 is a latest row of effective data lines, so that the RAM1 is used as an image data RAM to be written, and so on, and when the effective pixel rows in the RAM3 and the RAM4 are read, the RAM2 is used as an image data RAM to be written; when the effective pixel rows in the RAM4 and the RAM1 are read, the RAM3 functions as an image data RAM that needs to be written.
S35, the image data RAM unit receives the read-in signal of the read control unit, if the read-in signal is a read-in one-line signal, the filled number fillcount is counted down by one and the next read-in RAM address is updated, if the read-in signal is a read-in two-line signal, the filled number fillcount is counted down by two and the next read-in RAM address is updated, the read update signal comprising the filled number fillcount counted down and the updated read-in RAM address is fed back to the read control unit, and the filled number fillcount read by the count down is fed back to the write control unit;
that is, as described above, after the RAM1 and the RAM2 Read data, the Read control unit generates the Read one line signal Advance Read1, decrements the filled number fillcount by one count to 3 and updates the address of the RAM3, which is the next Read RAM address, at this time, the write control unit finds that the filled number fillcount is 3, and generates the write-ahead signal, and the RAM control unit increments the filled number fillcount by 4, updates the address of the write RAM address, which is the RAM4, and writes two lines if it is a Read two line signal, so that during the calculation, writing and reading can be performed in parallel while reading and writing, to ensure the real-time performance of scaling.
And S36, repeating the steps until the pixel value of each point on the current zoom image frame is obtained.
The RAM FIFO control module receives the signal to start processing, reduces the filled number fillcount by one after receiving the Advance Read1 signal, reduces the filled number fillcount by two after receiving the Advance Read2 signal, updates two next RAM reading addresses of the Read control, feeds the filled number fillcount back to the RAM file control module and the Read control module after the processing is finished, performs a series of processing of the reading data when the RAM file control module judges that the filled number fillcount is less than 4, and starts the next line of image calculation when the Read control module judges that the filled number fillcount is greater than or equal to 2. The filled number fillcount fed back by the RAM FIFO control module is used for controlling the Read control module and the RAM file control module to work, the Read control module and the RAM file control module send out Advance Read1, Advance Read2 and Advance write to control the addition and subtraction of the filled number fillcount of the RAM FIFO control module and the update of the Read-write RAM address, the three modules interact until the frame calculation is finished to send out an end signal, and a new frame repeats the steps from the Start signal.
Meanwhile, as shown in fig. 7, the timing control diagram related to the above steps is that firstly, the start signal start module starts, then the nextDin signal is output to request the external input data, then the external input signal DInValid is set to high level, since the current frame is loaded for the first time, Din continuously inputs 4 rows of data Line1-4, at this time, the filled number fillcount is 4, the RAM file control module is closed, the nextDin signal is set to low level to stop the external input, then the output receiving end will send out the ready signal nextput signal, the Read control module is started, the filled number fillcount is judged to be greater than or equal to 2, interpolation calculation is started to output doutvalnd is set to high level, since the Read control module judges whether to send out the Advance Read signal at the end of the Line, doutvalld is set to low level for a while, the original data used when calculating L1 is consistent with L0, no data update is performed, and no Din input is performed when L0 is calculated, the input and output conditions are affected by the scaling, the input is not performed after certain output, and the condition that two RAM data need to be updated after each output is mainly considered, which is described in detail above.
Referring to fig. 1 to 8, a third embodiment of the present invention is:
in this embodiment, on the basis of the second embodiment, in order to achieve a better interpolation effect, position mapping centrosymmetric processing is adopted, where calculating, according to an X-direction scaling ratio and a Y-direction scaling ratio, original image coordinate information of each point on a scaled image on an original image specifically is:
src_x=(dst_x+0.5)×xscale–0.5
src_y=(dst_y+0.5)×yscale–0.5
the thumbnail coordinate information of each point on the zoom image is (dst _ X, dst _ Y), the original image coordinate information on the original image is (src _ X, src _ Y), the X-direction zoom ratio is xscale, and the Y-direction zoom ratio is yscale. Assuming that xscale and yscale are both 2, then (0,0) on the scaled image is also (0.5 ) on the original image, and the adjacent four points are (0,0), (1,0), (0,1) and (1,1), but the interpolation coefficients are both 0.5, so that the adjacent four points can participate in the interpolation calculation to achieve a better interpolation effect.
Referring to fig. 1 to 8, a fourth embodiment of the present invention is:
in the image scaling method provided in this embodiment, based on the second embodiment, in order to achieve the effect consistent with the OpenCV effect, interpolation optimization processing is adopted.
As shown in fig. 3, the interpolation circuit is an OpenCV bilinear interpolation operation circuit, and the interpolation calculation specifically includes:
f(i+u,j+v)=((V1*(P0>>4)>>16)+(V0*(P1>>4)>>16)+2)>>2
P0=U1×f(i,j)+U0×f(i+1,j)
P1=U1×f(i,j+1)+U0×f(i+1,j+1)
U0=cvRound(u*2048)
U1=2048–U0
V0=cvRound(v*2048)
V1=2048–V0
cvRound is a rounding function, u is an X-direction interpolation coefficient, v is a Y-direction interpolation coefficient, f (i + u, j + v) is a pixel value of a certain point on the scaled image, and f (i, j), f (i +1, j), f (i, j +1) and f (i +1, j +1) are pixel values of four points on the original image which are mapped with the certain point on the scaled image.
The method optimizes floating point calculation into integer shift calculation and shifts right three times on the basis of OpenCV, thereby not only ensuring the consistency with OpenCV results, but also improving the real-time performance of scaling processing and reducing calculation errors.
In the first to fourth embodiments, in the case of processing scaling at 4K resolution, the frame rate can reach 200 frames of processing speed, the pixel bit width can support 12bits, and the RAM resource consumption is only 90 Kbyte.
The fifth embodiment of the invention is as follows:
another embodiment of the invention provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the image scaling method as described above.
Referring to fig. 9, a sixth embodiment of the present invention is:
an electronic device 1 comprises a memory 3, a processor 2 and a computer program stored on the memory 3 and operable on the processor 2, wherein the processor 2 implements the image scaling method of any one of the first to fourth embodiments when executing the computer program.
In summary, according to the image scaling method, the storage medium, and the electronic device provided by the present invention, before the current image frame starts scaling, the write control unit screens and stores the effective pixel lines participating in interpolation operation from the original image data according to the scaling parameters, so that only the effective pixel lines participating in interpolation operation can be written into the image data RAM, and then the effective pixel lines in the image data RAM can be continuously written into and read from the RAM through the RAM control unit, the write control unit, and the read control unit, thereby not only saving the storage resources, but also ensuring the access speed of the cache, so that the scaling process has a certain real-time property, and thus high resolution, high pixel bit width, low RAM resource consumption, and low delay are realized; meanwhile, position mapping central symmetry processing and interpolation optimization processing are adopted, so that a better interpolation effect is achieved, the real-time performance of scaling processing is improved, the calculation error is reduced, and the consistency of the OpenCV result on point to point is ensured.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (13)

1. An image scaling method, characterized by comprising the steps of:
s1, reading original image data and scaling parameters, and screening and storing effective pixel lines participating in interpolation operation from the original image data according to the scaling parameters;
s2, writing the current image frame into an image data RAM unit according to the stored effective pixel row;
s3, reading out the effective pixel value of the current image frame from the image data RAM unit, and carrying out interpolation calculation according to the effective pixel value and the interpolation coefficient to obtain the pixel value of the current zooming image frame;
and S4, reading the next image frame as the current image frame, and repeating the steps S2-S4 to finish image scaling.
2. The image scaling method according to claim 1, wherein the image data RAM unit is provided with N sequentially arranged and end-to-end image data RAMs, each of the image data RAMs having a size larger than a size of one line of data of an original image, and N is an integer greater than or equal to 1.
3. The image scaling method of claim 2, wherein said writing an image data RAM unit comprises sequentially queuing writing the image data RAM; and/or said reading out from said image data RAM unit comprises reading out from two adjacent image data RAMs.
4. The image scaling method according to claim 1, wherein the image data RAM unit includes a RAM control unit and four sequentially arranged image data RAMs end to end;
the RAM control unit controls writing of four image data RAMs, including:
when the RAM control unit receives a write-in-advance signal, the address of the image data RAM which is arranged in front of the two image data RAMs which are currently involved in interpolation calculation is used as the address of the write RAM which needs to be written currently; and/or
The RAM control unit controls writing of four image data RAMs, including:
when the RAM control unit receives a read-in signal of the read control unit, if the read-in signal is a read-in one-line signal, the address of the image data RAM arranged behind two image data RAMs participating in interpolation calculation last time and the address of the next image data RAM arranged behind the image data RAM are used as two read-in RAM addresses needing to be read currently, and if the read-in signal is a read-in two-line signal, the addresses of the two image data RAMs except the two image data RAMs participating in interpolation calculation last time are used as two read-in RAM addresses needing to be read currently.
5. The image scaling method according to claim 2, wherein said step S2 specifically comprises the steps of:
the writing control unit receives a current image frame starting signal and initializes the filled number fillcount, wherein the filled number fillcount is the number of the RAMs which are filled with rows and are not read in the image data RAM unit, and the filled number fillcount is less than or equal to N;
the write-in control unit judges whether the filled number fillcount is smaller than N in real time, if so, a write-in signal in advance is sent to the image data RAM unit, and if not, the data writing is stopped;
the image data RAM unit receives the write-in signal in advance, carries out accumulation counting on the filled number fillcount and updates the next write RAM address, feeds back a write-in updating signal comprising the filled number fillcount subjected to accumulation counting and the updated write RAM address to the write-in control unit, and feeds back the filled number fillcount subjected to accumulation counting to the read control unit;
and the writing control unit receives the writing updating signal and writes the effective pixel row mapped by the current image frame calculation line number into the image data RAM corresponding to the updated writing RAM address, and one image data RAM stores one effective pixel row.
6. The image scaling method according to claim 2, wherein said step S3 specifically comprises:
s31, the reading control unit receives the reading updating signal returned by the image data RAM unit in real time;
s32, reading the effective pixel value corresponding to the M-th row of pixel points on the current image frame from the image data RAM unit according to the reading updating signal by the reading control unit, wherein M is a positive integer;
s33, the reading control unit sends the read effective pixel values corresponding to the M-th row of pixel points and the corresponding interpolation coefficients to an interpolation calculation circuit for interpolation calculation;
and S36, repeating the steps until the pixel value of each point on the current zoom image frame is obtained.
7. The image scaling method according to claim 6, wherein said step S31 specifically comprises the steps of:
the reading control unit receives an external output request signal;
the reading control unit receives the filled number fillcount fed back by the image data RAM unit in real time, wherein the filled number fillcount is the number of the RAMs which are filled with rows and are not read in the image data RAM unit, and the filled number fillcount is less than or equal to N;
and the reading control unit judges whether the filled number fillcount received in real time is greater than or equal to 2, if so, receives a reading updating signal returned by the image data RAM unit in real time, and if not, stops outputting data.
8. The image scaling method according to claim 6 or 7, wherein said step S3 further comprises:
s34, the reading control unit judges whether the mapping row number of the pixel point of the M +1 th row and the mapping row number of the pixel point of the M th row have intersection, if the intersection is 0, a reading two-row signal is generated, if the intersection is 1, a reading one-row signal is generated, and if the intersection is 2, an advance reading signal is not sent.
9. The image scaling method according to claim 8, wherein said step S3 further includes:
and S35, the image data RAM unit receives the read-in signal of the read control unit, if the read-in signal is a read-in one-line signal, the filled number fillcount is counted down by one and the next read-in RAM address is updated, if the read-in signal is a read-in two-line signal, the filled number fillcount is counted down by two and the next read-in RAM address is updated, the read update signal comprising the filled number fillcount counted down and the updated read-in RAM address is fed back to the read control unit, and the filled number fillcount read and fed back to the write control unit.
10. The image scaling method according to claim 1, wherein said step S1 specifically comprises the steps of:
the writing control unit acquires a Y-direction scaling, calculates Y-direction coordinate information of each line of a scaled image on the original image according to the Y-direction scaling, then acquires original image Y-direction information of two lines adjacent to the Y-direction coordinate information on the original image in the Y direction, and performs Y-direction mapping on the scaled image Y-direction information of each line and the original image Y-direction information of two corresponding lines on the original image;
the write control unit takes a pixel row that is Y-mapped with the scaled image as an effective pixel row.
11. The image scaling method according to claim 1, characterized in that said step S3 is preceded by the steps of:
the reading control unit acquires an X-direction scaling and a Y-direction scaling, original image coordinate information of each point on the scaled image on the original image is respectively calculated according to the X-direction scaling and the Y-direction scaling, then original image position information of four points adjacent to the original image coordinate information is acquired on the original image, and the scaling X-direction information of each point on the scaled image and the X-direction information of two original images of four corresponding points on the original image are subjected to X-direction mapping;
and obtaining an interpolation coefficient of each point on the zoomed image according to the distance between the position information of each point on the zoomed image and the position information of the corresponding four points on the original image.
12. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program, when executed by a processor, implements the image scaling method of any of claims 1-11.
13. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the image scaling method according to any of claims 1-11 when executing the computer program.
CN202010810213.6A 2020-08-13 Image scaling method, storage medium and electronic device Active CN112053283B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010810213.6A CN112053283B (en) 2020-08-13 Image scaling method, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010810213.6A CN112053283B (en) 2020-08-13 Image scaling method, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN112053283A true CN112053283A (en) 2020-12-08
CN112053283B CN112053283B (en) 2024-05-31

Family

ID=

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112508793A (en) * 2020-12-22 2021-03-16 深圳开立生物医疗科技股份有限公司 Image scaling method and device, electronic equipment and storage medium
CN113256763A (en) * 2021-05-14 2021-08-13 安谋科技(中国)有限公司 Electronic device, image processing method thereof, system on chip, and medium
CN113763250A (en) * 2021-09-10 2021-12-07 四川创安微电子有限公司 Adaptive image scaling processing method and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020154123A1 (en) * 2001-01-19 2002-10-24 Michal Harasimiuk Image scaling
CN101789228A (en) * 2010-03-30 2010-07-28 无锡致新电子科技有限公司 video scaler
CN102222317A (en) * 2011-06-22 2011-10-19 王洪剑 Image scaling method and system
CN102263880A (en) * 2010-05-25 2011-11-30 安凯(广州)微电子技术有限公司 Image scaling method and apparatus thereof
CN104361555A (en) * 2014-11-24 2015-02-18 中国航空工业集团公司洛阳电光设备研究所 Infrared image scaling method based on FPGA
US20160307540A1 (en) * 2015-04-20 2016-10-20 Apple Inc. Linear scaling in a display pipeline
CN106910162A (en) * 2017-02-07 2017-06-30 深圳市爱协生科技有限公司 Image zoom processing method and device based on FPGA
CN111476718A (en) * 2020-04-15 2020-07-31 深圳市爱协生科技有限公司 Image amplification method and device, storage medium and terminal equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020154123A1 (en) * 2001-01-19 2002-10-24 Michal Harasimiuk Image scaling
CN101789228A (en) * 2010-03-30 2010-07-28 无锡致新电子科技有限公司 video scaler
CN102263880A (en) * 2010-05-25 2011-11-30 安凯(广州)微电子技术有限公司 Image scaling method and apparatus thereof
CN102222317A (en) * 2011-06-22 2011-10-19 王洪剑 Image scaling method and system
CN104361555A (en) * 2014-11-24 2015-02-18 中国航空工业集团公司洛阳电光设备研究所 Infrared image scaling method based on FPGA
US20160307540A1 (en) * 2015-04-20 2016-10-20 Apple Inc. Linear scaling in a display pipeline
CN106910162A (en) * 2017-02-07 2017-06-30 深圳市爱协生科技有限公司 Image zoom processing method and device based on FPGA
CN111476718A (en) * 2020-04-15 2020-07-31 深圳市爱协生科技有限公司 Image amplification method and device, storage medium and terminal equipment

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
冉峰等: "基于FPGA的图像缩放算法设计", 《光电子技术》, no. 1, pages 23 - 28 *
孙红进: "FPGA实现的视频图像缩放显示", 《液晶与显示》, no. 1, 15 February 2010 (2010-02-15), pages 134 - 137 *
杨丽娟等: "基于双线性插值的内容感知图像缩放算法仿真", 《计算机仿真》, no. 12, 15 December 2019 (2019-12-15), pages 250 - 254 *
王平等: "基于双线性插值的图像缩放在GPU上的实现", 《微电子学与计算机》, no. 11, 5 November 2016 (2016-11-05), pages 136 - 139 *
胡学钢等: "《数据结构》", 安徽大学出版社, pages: 66 - 72 *
邹学瑜等: "基于双线性插值算法的缩放IP核设计", 《计算技术与自动化》, vol. 36, no. 1, pages 113 - 117 *
龙芬等: "视频图像缩放器设计与实现", 《软件导刊》, vol. 16, no. 5, pages 93 - 95 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112508793A (en) * 2020-12-22 2021-03-16 深圳开立生物医疗科技股份有限公司 Image scaling method and device, electronic equipment and storage medium
CN113256763A (en) * 2021-05-14 2021-08-13 安谋科技(中国)有限公司 Electronic device, image processing method thereof, system on chip, and medium
CN113763250A (en) * 2021-09-10 2021-12-07 四川创安微电子有限公司 Adaptive image scaling processing method and system
CN113763250B (en) * 2021-09-10 2023-09-01 四川创安微电子有限公司 Adaptive image scaling processing method and system

Similar Documents

Publication Publication Date Title
CN108681984B (en) Acceleration circuit of 3*3 convolution algorithm
CN100552712C (en) Image processing apparatus, image processing method and aberration emendation method
CN102263880B (en) Image scaling method and apparatus thereof
US11593913B2 (en) Method and system for correcting a distorted input image
CN100455002C (en) Method and circuit for zooming digital video image based on dual quadratic interpolation
US20060061601A1 (en) Image processing circuit and image processing method
CN103916612A (en) Random proportion zoom system and method
CN112053283B (en) Image scaling method, storage medium and electronic device
CN112053283A (en) Image scaling method, storage medium and electronic device
CN110570793B (en) Testing method and device adaptive to different types of display screens and terminal equipment
CN113658049A (en) Image transposition method, equipment and computer readable storage medium
JP2005109967A (en) Image processing method and image processor
CN109599056A (en) Image processing method and device, image data processor and its application
US7573482B2 (en) Method for reducing memory consumption when carrying out edge enhancement in multiple beam pixel apparatus
CN103093485A (en) Full view video cylindrical surface image storage method and system
CN102340638B (en) A kind of method and apparatus of parallel data processing in video processing device
CN110634114A (en) Image equalization method and device
CN117011146B (en) Image scaling method and device, electronic equipment and storage medium
EP2063625B1 (en) Method and device for generating multi -site modulating web point simultaneously
CN117710201A (en) Image scaling method and device, electronic equipment and computer storage medium
CN113487477B (en) Super-resolution image reconstruction method and device
CN103474049B (en) Image processing apparatus and image processing method
CN116071245B (en) Image processing method, device and system
CN117057982B (en) Integrated circuit for performing distortion transformation on image and electronic equipment
CN101431637B (en) Frame data processing apparatus and method

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