CN115190263B - Video scaling method, device, equipment and storage medium - Google Patents

Video scaling method, device, equipment and storage medium Download PDF

Info

Publication number
CN115190263B
CN115190263B CN202211106986.1A CN202211106986A CN115190263B CN 115190263 B CN115190263 B CN 115190263B CN 202211106986 A CN202211106986 A CN 202211106986A CN 115190263 B CN115190263 B CN 115190263B
Authority
CN
China
Prior art keywords
data
data processing
pixel
video
processing frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211106986.1A
Other languages
Chinese (zh)
Other versions
CN115190263A (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.)
Guangdong Baolun Electronics Co ltd
Original Assignee
Guangzhou Baolun Electronics 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 Guangzhou Baolun Electronics Co Ltd filed Critical Guangzhou Baolun Electronics Co Ltd
Priority to CN202211106986.1A priority Critical patent/CN115190263B/en
Publication of CN115190263A publication Critical patent/CN115190263A/en
Application granted granted Critical
Publication of CN115190263B publication Critical patent/CN115190263B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/01Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level
    • H04N7/0135Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level involving interpolation processes

Landscapes

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

Abstract

The invention discloses a video zooming method, a device, equipment and a storage medium, comprising the following steps: acquiring source video data; wherein the source video data comprises a number of frames of video images; sequentially establishing a data processing frame corresponding to each pixel point in each frame of video image according to a preset scaling; the data processing block includes pixel data; sequentially carrying out first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient, and sequentially carrying out second convolution operation on the result of each first convolution operation according to a preset transverse weight coefficient to respectively obtain corresponding double-cubic interpolation values; and combining all the double cubic interpolation values to obtain a plurality of frames of zoomed video images, thereby obtaining zoomed source video data. The invention solves the technical problems of overlarge occupied operation resources and low operation efficiency in the prior art.

Description

Video scaling method, device, equipment and storage medium
Technical Field
The present invention relates to the field of video data processing technologies, and in particular, to a video scaling method, apparatus, device, and storage medium.
Background
With the existing spliced display screen, the spliced display screen is widely applied to monitoring systems such as monitoring, commanding and dispatching systems, public security, fire protection, military, meteorology, railways and aviation, video conferences, inquiry systems and the like, so that the display effect of video splicing is very important.
The existing splicer display system can use a scaling algorithm, including bilinear interpolation scaling and a bicubic interpolation scaling algorithm, obviously, the display effect of the bicubic interpolation scaling algorithm is better than that of the bilinear interpolation scaling, and the traditional bicubic interpolation scaling algorithm has more multiplication calculation during implementation, occupies more multiplier resources and causes that resources of a deployment device (a programmable logic device) are not enough; for example, when calculating the current pixel interpolation, the conventional double cubic scaling interpolation algorithm needs to obtain the pixel values of 4 × 4 pixels around the corresponding point of the original image and the weight parameters of each pixel in the X and Y directions, and then performs convolution operation to obtain interpolation, for a video stream of RGB (24 bits), R, G, and B components need to be separately subjected to double cubic interpolation operation, the whole video stream realizes convolution operation twice, and (16 +) 4) 3 multipliers need to be occupied, if there are 8 paths of video streams to be scaled down and amplified, then (16 +) 4) 3 × 8 multipliers need to be occupied, so that too many multiplier resources are occupied, which results in that the multiplier resources of a programmable logic device are not sufficient, the video display effect has to be sacrificed, and a bilinear interpolation scaling algorithm occupying little multiplier resources has to be selected, or a programmable logic device with enough multiplier resources and high cost is used.
Therefore, a video scaling method capable of effectively reducing the computational resources and improving the computational efficiency is needed.
Disclosure of Invention
The invention provides a video zooming method, which aims to solve the technical problems of overlarge occupied operation resources and low operation efficiency in the prior art.
In order to solve the foregoing technical problem, an embodiment of the present invention provides a video scaling method, including:
acquiring source video data; wherein the source video data comprises a number of frames of video images;
sequentially establishing a data processing frame corresponding to each pixel point in each frame of video image according to a preset scaling; the data processing block includes pixel data;
sequentially carrying out first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient, and sequentially carrying out second convolution operation on the result of each first convolution operation according to a preset transverse weight coefficient to respectively obtain corresponding double-cubic interpolation values;
and combining all the double cubic interpolation values to obtain a plurality of frames of zoomed video images, thereby obtaining zoomed source video data.
Compared with the prior art, the method has the advantages that the data processing frame corresponding to each pixel point is established for each frame of video image in the source video data through the preset scaling proportion, the existence of one corresponding data processing frame for each pixel point is guaranteed, the accuracy of the pixel point position after the subsequent video data are scaled is guaranteed, the pixel point precision is improved, meanwhile, the convolution operation is carried out on the pixel data in each data processing frame according to the preset longitudinal weight coefficient and the preset transverse weight coefficient, the transverse convolution operation is carried out on the longitudinal convolution operation result after the longitudinal convolution operation result is obtained, and therefore the scaled video data are obtained by combining double cubic interpolation.
As a preferred scheme, the sequentially establishing a data processing frame corresponding to each pixel point in each frame of video image according to a preset scaling ratio specifically includes:
and sequentially establishing a data processing frame corresponding to each pixel point in each frame of video image, so that in each frame of video image, the coordinates of the scaled pixel points corresponding to all the pixel points before scaling are calculated in the current video image according to a preset scaling, establishing the data processing frame corresponding to each pixel point according to the coordinates of the scaled pixel points, and outputting the data processing frame corresponding to each pixel point of each frame of video image until the video images of all the frames establish the data processing frame corresponding to each pixel point.
It can be understood that the coordinates of the zoomed pixel points corresponding to the pixel points before zooming can be accurately and quickly calculated by establishing the data processing frame corresponding to each pixel point in each frame of video image according to the preset zooming proportion, and the accuracy of the coordinate positions of the pixel points before and after zooming is ensured, so that the data processing frame corresponding to each pixel point of each frame of video image is accurately output.
As a preferred scheme, sequentially performing a first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient, and sequentially performing a second convolution operation on the result of each first convolution operation according to a preset transverse weight coefficient to obtain corresponding double-cube interpolation, specifically:
sequentially carrying out first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient to obtain a convolution value corresponding to each row of pixel data in each data processing frame;
and performing second convolution operation on convolution values corresponding to each column of pixel data in each data processing frame according to a preset transverse weight coefficient to respectively obtain the bicubic interpolation corresponding to each pixel point.
It can be understood that, through presetting longitudinal weight coefficients, a convolution value obtained by carrying out first convolution operation on pixel data in each data processing frame in sequence, and carrying out second convolution operation on the pixel data in each data processing frame in sequence on the basis of the convolution value according to preset transverse weight coefficients, double-cubic interpolation corresponding to each pixel point is directly, accurately and quickly obtained, occupied operation resources are reduced, various convolution operation circuits or multipliers in hardware equipment are reduced, the cost of video splicing is reduced, and the video splicing efficiency is improved.
As a preferred scheme, the first convolution operation is sequentially performed on the pixel data in each data processing frame according to a preset longitudinal weight coefficient to obtain a convolution value corresponding to each row of pixel data in each data processing frame, and the second convolution operation is performed on the convolution value corresponding to each row of pixel data in each data processing frame according to a preset transverse weight coefficient to respectively obtain a double cubic interpolation corresponding to each pixel point, specifically:
sequentially carrying out first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient so as to sequentially obtain a convolution value corresponding to each row of pixel data in the current data processing frame in each first convolution operation, circularly caching the calculated convolution value, and judging whether the cached convolution value corresponds to the pixel data in the data processing frame of the current pixel point;
if not, continuing to perform the first convolution operation on the pixel data in the next data processing frame, and updating the cache convolution value;
if so, performing second convolution operation on a convolution value corresponding to each column of pixel data in the current data processing frame according to a preset transverse weight coefficient to obtain double cubic interpolation corresponding to the current pixel point;
and outputting all the bicubic interpolation values until all the pixel points corresponding to all the data processing frames calculate the bicubic interpolation values.
It can be understood that, by performing the first convolution operation on the longitudinal pixel data, and in the first convolution operation, only each row of pixel data needs to be continuously and sequentially calculated to obtain the corresponding convolution value, and multiple rows of data do not need to be calculated at one time, the scheme is simple and easy to implement, and after the cached convolution value corresponds to the pixel data in the data processing frame of the current pixel point, the transverse second convolution operation is directly performed, so that the double cubic interpolation corresponding to the current pixel point is obtained, thereby avoiding the problem that in the prior art, the convolution operation needs to be respectively performed on the weight parameters in the X and Y directions of each pixel point to obtain the interpolation, and then the video scaling combination needs to be performed, reducing the occupied operation resources, further reducing the setting of various convolution operation circuits or multipliers and the like in hardware equipment, and reducing the equipment cost.
Preferably, the data processing block includes 4 × 4 pixel data.
Correspondingly, the invention also provides a video scaling device, comprising: the system comprises a source video module, a data processing frame module, a convolution module and a combination module;
the source video module is used for acquiring source video data; wherein the source video data comprises a number of frames of video images;
the data processing frame module is used for sequentially establishing a data processing frame corresponding to each pixel point in each frame of video image according to a preset scaling; the data processing block includes pixel data;
the convolution module is used for sequentially carrying out first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient, and sequentially carrying out second convolution operation on the result of each first convolution operation according to a preset transverse weight coefficient to respectively obtain corresponding double-cubic interpolation values;
and the combination module is used for combining all the bicubic interpolation values to obtain a plurality of frames of zoomed video images so as to obtain zoomed source video data.
As a preferred scheme, the establishing of the data processing frame corresponding to each pixel point in each frame of video image in sequence according to a preset scaling specifically includes:
and sequentially establishing a data processing frame corresponding to each pixel point in each frame of video image, so that in each frame of video image, the coordinates of the scaled pixel points corresponding to all the pixel points before scaling are calculated in the current video image according to a preset scaling, establishing the data processing frame corresponding to each pixel point according to the coordinates of the scaled pixel points, and outputting the data processing frame corresponding to each pixel point of each frame of video image until the video images of all the frames establish the data processing frame corresponding to each pixel point.
As a preferred scheme, sequentially performing a first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient, and sequentially performing a second convolution operation on the result of each first convolution operation according to a preset transverse weight coefficient to obtain corresponding double-cube interpolation, specifically:
sequentially carrying out first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient to obtain a convolution value corresponding to each row of pixel data in each data processing frame;
and performing second convolution operation on the convolution value corresponding to each row of pixel data in each data processing frame according to the preset transverse weight coefficient to respectively obtain the double cubic interpolation corresponding to each pixel point.
As a preferred scheme, according to a preset longitudinal weight coefficient, sequentially performing a first convolution operation on pixel data in each data processing frame to obtain a convolution value corresponding to each column of pixel data in each data processing frame, and according to a preset transverse weight coefficient, performing a second convolution operation on a convolution value corresponding to each column of pixel data in each data processing frame to respectively obtain a double cubic interpolation corresponding to each pixel point, specifically:
sequentially carrying out first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient so as to sequentially obtain a convolution value corresponding to each row of pixel data in the current data processing frame in each first convolution operation, circularly caching the calculated convolution value, and judging whether the cached convolution value corresponds to the pixel data in the data processing frame of the current pixel point;
if not, continuing to perform the first convolution operation on the pixel data in the next data processing frame, and updating the cache convolution value;
if so, performing second convolution operation on a convolution value corresponding to each column of pixel data in the current data processing frame according to a preset transverse weight coefficient to obtain double cubic interpolation corresponding to the current pixel point;
and outputting all the bicubic interpolation values until the pixel points corresponding to all the data processing frames calculate the bicubic interpolation values.
Preferably, the data processing block includes 4 × 4 pixel data.
Accordingly, the present invention also provides a terminal device comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the video scaling method as defined in any one of the above when executing the computer program.
Accordingly, the present invention also provides a computer readable storage medium comprising a stored computer program; wherein the computer program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the video scaling method as defined in any one of the above.
Drawings
FIG. 1: a step flow chart of a video scaling method provided by the embodiment of the invention;
FIG. 2: a schematic diagram of a data processing block provided by an embodiment of the present invention;
FIG. 3: a schematic diagram of a first convolution operation provided in an embodiment of the present invention;
FIG. 4 is a schematic view of: the splicer application diagram provided by the embodiment of the invention;
FIG. 5: the display system of the splicer is provided by the embodiment of the invention;
FIG. 6: the embodiment of the invention provides a schematic structural diagram of a video scaling device.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
Example one
Referring to fig. 1, a video scaling method according to an embodiment of the present invention includes the following steps S101-S104:
s101: acquiring source video data; wherein the source video data comprises a number of frames of video images.
In this embodiment, the length and width of the video image a corresponding to the source video data is M × N, the length and width of the scaled target video image B is M × N, the format of the video data includes, but is not limited to, RGB, YUV, and the like.
S102: sequentially establishing a data processing frame corresponding to each pixel point in each frame of video image according to a preset scaling; the data processing block includes pixel data.
As a preferable aspect of this embodiment, the data processing block includes 4 × 4 pieces of pixel data.
As a preferred scheme of this embodiment, the sequentially establishing, according to a preset scaling ratio, a data processing frame corresponding to each pixel point in each frame of video image specifically includes:
and sequentially establishing a data processing frame corresponding to each pixel point in each frame of video image, so that in each frame of video image, the coordinates of the scaled pixel points corresponding to all the pixel points before scaling are calculated in the current video image according to a preset scaling, establishing the data processing frame corresponding to each pixel point according to the coordinates of the scaled pixel points, and outputting the data processing frame corresponding to each pixel point of each frame of video image until the video images of all the frames establish the data processing frame corresponding to each pixel point.
In the present embodiment, for example, the coordinates of the point B (X, Y) on the target video image B on a are (X (M/M), Y (N/N)), that is, B' (X + u, Y + v), where X and Y are integer parts and u and v are fractional parts, and 4 × 4 pixels around the image a are selected as the parameters for calculating the pixel value of the target image B (X, Y), as shown in fig. 2. According to the method, the corresponding coordinates of a point B (X, Y) on an image B on A are B '(X (M) M, Y (N/N)), the corresponding 4X 4 pixel data around the point B' are regarded as a data processing box, the 4X 4 pixel data of the data processing box can be used for calculating the value of a target pixel point B (X, Y), and it can be understood that in order to find the corresponding data processing box of each target pixel point B (X, Y) on A, the data processing box corresponding to the first target pixel point can be found first, then the data processing box moves from left to right and then from top to bottom on the whole image A in sequence, and then the data processing box (4 pixel data) corresponding to each target point B (X, Y) on A can be obtained through confirmation of the corresponding relationship. Further, assuming that a (X (M/M), Y (N/N)) = a (X + u, Y + v), where X and Y are integer portions and u and v are fractional portions, the 16 pixel values are expressed as:
c=(f(x-1,y-1),f(x-1,y),f(x-1,y+1),f(x-1,y+2)
f(x,y-1),f(x,y),f(x,y+1),f(x,y+2)
f(x+1,y-1),f(x+1,y),f(x+1,y+1),f(x+1,y+2)
f(x+2,y-1),f(x+2,y),f(x+2,y+1),f(x+2,y+2))
it can be understood that the coordinates of the zoomed pixel points corresponding to the pixel points before zooming can be accurately and quickly calculated by establishing the data processing frame corresponding to each pixel point in each frame of video image according to the preset zooming proportion, and the accuracy of the coordinate positions of the pixel points before and after zooming is ensured, so that the data processing frame corresponding to each pixel point of each frame of video image is accurately output.
S103: and sequentially carrying out first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient, and sequentially carrying out second convolution operation on the result of each first convolution operation according to a preset transverse weight coefficient to respectively obtain corresponding double cubic interpolation values.
Note that, the weight coefficient D in the X direction and the weight coefficient E in the Y direction are obtained from the weight coefficient calculation formulas W (X) and b' (X + u, Y + v), and the weight coefficient calculation formulas are as follows (a constant values are-0.5, -0.75):
Figure 603080DEST_PATH_IMAGE001
the lateral weight coefficient in the X direction is: d = (W (-u-1), W (-u), W (-u + 1), W (-u + 2)).
The longitudinal weight coefficient in the Y direction is:
e = ( W(-v-1),
W(-v),
W(-v+1),
W(-v+2))。
suppose D = D T ,C=c T ,E=e T And then:
C=(f(x-1,y-1),f(x,y-1),f(x+1,y-1),f(x+2,y-1)
f(x-1,y),f(x,y),f(x+1,y),f(x+2,y)
f(x-1,y+1),f(x,y+1),f(x+1,y+1),f(x+2,y+1)
f(x-1,y+2),f(x,y+2),f(x+1,y+2),f(x+2,y+2))
E = ( W(-v-1),W(-v),W(-v+1),W(-v+2));
D = ( W(-u-1),
W(-u),
W(-u+1),
W(-u+2))。
where T denotes transposition.
As a preferred scheme of this embodiment, the sequentially performing a first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient, and sequentially performing a second convolution operation on the result of each first convolution operation according to a preset lateral weight coefficient to obtain corresponding double-cubic interpolation, specifically:
sequentially carrying out first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient to obtain a convolution value corresponding to each row of pixel data in each data processing frame; and performing second convolution operation on convolution values corresponding to each column of pixel data in each data processing frame according to a preset transverse weight coefficient to respectively obtain the bicubic interpolation corresponding to each pixel point.
Specifically, according to a preset longitudinal weight coefficient, sequentially performing a first convolution operation on pixel data in each data processing frame so as to sequentially obtain a convolution value corresponding to each column of pixel data in the current data processing frame in each first convolution operation, circularly caching the calculated convolution value, and judging whether the cached convolution value corresponds to the pixel data in the data processing frame of the current pixel point; if not, continuing to perform the first convolution operation on the pixel data in the next data processing frame, and updating the cache convolution value; if so, performing second convolution operation on a convolution value corresponding to each column of pixel data in the current data processing frame according to a preset transverse weight coefficient to obtain double cubic interpolation corresponding to the current pixel point; and outputting all the bicubic interpolation values until the pixel points corresponding to all the data processing frames calculate the bicubic interpolation values.
It should be noted that, please refer to fig. 3, since the coordinate parameters v of the target points b' located in the same row are all the same, that is, the corresponding weight parameters E in the Y direction are also the same, when calculating the bicubic interpolation of each target point, if reading 4 columns of video data and performing convolution operation with the weight parameters E each time, many repeated multiplication operations occur, so it is not necessary to perform convolution operation with E together with 4 columns of data each time the bicubic interpolation is performed, that is, only 4 data and E in each column need to perform convolution operation, and convolution values (EC values) are obtained and are respectively marked as h1, h2, h3, h4,. And hm; judging whether 4X 4 pixel points of the next target point b (X, Y) around the corresponding point b' on the source diagram A are 4 lines of data corresponding to the cached 4 EC values or not according to the corresponding coordinates (X (M/M), Y (N/N)) of the corresponding point b (X, Y) on the source diagram A; if not, continuously reading the next row of data, performing convolution operation on the data and the E, and continuously updating the cached 4 EC values; if yes, carrying out convolution operation on 4 EC values and the corresponding X-direction weight parameters D, namely when the ith row of video data is convolved with E to obtain hi, caching hi-3, hi-2, hi-1 and hi, carrying out convolution operation on the hi-3, hi-2, hi-1 and hi and the D to obtain double cubic interpolation, wherein the obtained result is the double cubic interpolation of the video component of the next target pixel point B.
Further, in this embodiment, the pixel values of the target points b are F (X, Y) = D × C × E, and the bicubic interpolation formula is converted into F (X, Y) = D × C × E = ((D × C × E) T = (eT × C) T = (eT = (cT ×) dT) T = (E × C =) T = E × C × D. The following advantages are obtained after the transformation of the bicubic interpolation formula: the data distribution characteristic of C is more consistent with the characteristic that the video stream is cached according to lines, and each line of data is conveniently read each time; carrying out convolution operation on the weight parameters in the Y direction, and then carrying out convolution operation on the weight parameters in the X direction, so that repeated operation can be reduced; e is related to v, Y-direction weight parameters corresponding to target points B 'in the same row are consistent, double-cube interpolation operation is carried out on the target points B' in the same row, when convolution operation is carried out on the target points B 'in the same row, a plurality of repeated operation occurs, 4 rows of data and E convolution operation are not needed each time, only each row of data and E convolution operation needs to be read, the EC value of the result is cached, and 4 EC values are circularly cached, so that the convolution result of 4 x 4 data and E corresponding to the target points B' in the same row can be obtained.
It can be understood that, through presetting longitudinal weight coefficients, a convolution value obtained by carrying out first convolution operation on pixel data in each data processing frame in sequence, and carrying out second convolution operation on the pixel data in each data processing frame in sequence on the basis of the convolution value according to preset transverse weight coefficients, double-cubic interpolation corresponding to each pixel point is directly, accurately and quickly obtained, occupied operation resources are reduced, various convolution operation circuits or multipliers in hardware equipment are reduced, the cost of video splicing is reduced, and the video splicing efficiency is improved.
Furthermore, the method and the device have the advantages that the first convolution operation is carried out on the longitudinal pixel data, in the first convolution operation, only each row of pixel data needs to be continuously and sequentially calculated to obtain the corresponding convolution value, the multi-row data does not need to be calculated at one time, the scheme is simple and easy to realize, in addition, after the cached convolution value corresponds to the pixel data in the data processing frame of the current pixel point, the transverse second convolution operation is directly carried out, the double-cube interpolation corresponding to the current pixel point is obtained, the situation that in the prior art, the convolution operation needs to be respectively carried out on the weight parameters of each pixel point in the X direction and the Y direction, the interpolation is obtained, then the video scaling combination is carried out is avoided, the occupied operation resources are reduced, the arrangement of various convolution operation circuits or multipliers and the like in hardware equipment is reduced, and the equipment cost is reduced.
S104: and combining all the double cubic interpolation values to obtain a plurality of frames of zoomed video images, thereby obtaining zoomed source video data.
It should be noted that the double-cubic interpolation of each video component is combined into video pixel data, the output is the target video image B, and further the scaled source video data is obtained, it can be understood that the embodiment of the present invention is deployed in a programmable logic device, and makes full use of the parallel code execution characteristic, all the operation processes are executed in parallel, the double-cubic interpolation operation of one video component requires two convolution operations, only 8 multipliers are occupied, 12 multipliers are reduced compared with the conventional double-cubic interpolation scaling implementation process, and the implementation is simpler.
The above embodiment is implemented, and has the following effects:
compared with the prior art, the method and the device have the advantages that the data processing frame corresponding to each pixel point is established for each frame of video image in the source video data through the preset scaling proportion, the condition that each pixel point has one corresponding data processing frame is guaranteed, the accuracy of the pixel point position after the subsequent video data are scaled is guaranteed, the pixel point precision is improved, meanwhile, the convolution operation is carried out on the pixel data in each data processing frame according to the preset longitudinal weight coefficient and the preset transverse weight coefficient, the transverse convolution operation is carried out on the longitudinal convolution operation result after the longitudinal convolution operation result is obtained, accordingly, the scaled video data are obtained through the combination of double cubic interpolation, the situation that in the prior art, the situation that the convolution operation is carried out on the weight parameters of each pixel point in the X direction and the Y direction respectively, the interpolation is obtained, and then the video scaling combination is carried out is avoided, the operation efficiency is obviously improved, the occupied operation resources are reduced, and obvious advantages exist in the video data with large data volume.
Example two
Please refer to fig. 4 and 5, which are a splicer and a splicer display system, and are used to implement the video scaling method according to the first embodiment, where n channels of video sources are input to an input card, the input card sends the video sources to a switch card, the switch card can switch the video sources on multiple channels of input cards to a splicing display system at will according to requirements, the splicing display system performs double-cubic interpolation reduction processing on 8 channels of video according to requirements and then caches the video in a DDR, reads video data in the DDR and performs double-cubic interpolation amplification processing on 8 channels of video according to requirements, and the 8 channels of video are output and displayed after being spliced.
The method is applied to a tiled display system, multi-channel video realizes double-cube scaling, occupation of a plurality of multipliers can be saved, double-cube interpolation of each video component is combined into video pixel data, and output is the target image B; the method has the advantages that one path of RGB (24-bit) system video is subjected to one-time double-cube interpolation scaling, 6 convolution operation circuits are needed, 24 multipliers are consumed, and occupation of 36 multipliers is reduced compared with a traditional implementation method; the method has the advantages that the 8-path video can be simultaneously subjected to one-time bi-cubic interpolation reduction and amplification, 96 convolution operation circuits are needed, 384 multipliers are consumed, and 576 multipliers are reduced compared with the traditional implementation method, so that programmable logic devices with fewer multiplier resources and lower cost can be selected, the cost of a splicer is greatly reduced, the display effect is good, and the condition that a bilinear interpolation scaling algorithm with poor display effect is selected due to the limitation of multiplier resources and cost cannot occur.
EXAMPLE III
Accordingly, please refer to fig. 6, which is a block diagram illustrating an exemplary embodiment of a video scaling apparatus, including: a source video module 201, a data processing block module 202, a convolution module 203 and a combination module 204.
The source video module 201 is configured to obtain source video data; wherein the source video data comprises a number of frames of video images.
The data processing frame module 202 is configured to sequentially establish a data processing frame corresponding to each pixel point in each frame of video image according to a preset scaling; the data processing block includes pixel data.
The convolution module 203 is configured to sequentially perform a first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient, and sequentially perform a second convolution operation on a result of each first convolution operation according to a preset lateral weight coefficient, so as to obtain corresponding double-cube interpolation values respectively.
The combining module 204 is configured to combine all the bicubic interpolations to obtain a plurality of frames of scaled video images, so as to obtain scaled source video data.
As a preferred scheme, the establishing of the data processing frame corresponding to each pixel point in each frame of video image in sequence according to a preset scaling specifically includes:
and sequentially establishing a data processing frame corresponding to each pixel point in each frame of video image, so that in each frame of video image, the coordinates of the scaled pixel points corresponding to all the pixel points before scaling are calculated in the current video image according to a preset scaling, establishing the data processing frame corresponding to each pixel point according to the coordinates of the scaled pixel points, and outputting the data processing frame corresponding to each pixel point of each frame of video image until the video images of all the frames establish the data processing frame corresponding to each pixel point.
As a preferred scheme, sequentially performing a first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient, and sequentially performing a second convolution operation on the result of each first convolution operation according to a preset transverse weight coefficient to obtain corresponding double-cube interpolation, specifically:
sequentially carrying out first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient to obtain a convolution value corresponding to each row of pixel data in each data processing frame; and performing second convolution operation on convolution values corresponding to each column of pixel data in each data processing frame according to a preset transverse weight coefficient to respectively obtain the bicubic interpolation corresponding to each pixel point.
As a preferred scheme, the first convolution operation is sequentially performed on the pixel data in each data processing frame according to a preset longitudinal weight coefficient to obtain a convolution value corresponding to each row of pixel data in each data processing frame, and the second convolution operation is performed on the convolution value corresponding to each row of pixel data in each data processing frame according to a preset transverse weight coefficient to respectively obtain a double cubic interpolation corresponding to each pixel point, specifically:
sequentially carrying out first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient so as to sequentially obtain a convolution value corresponding to each row of pixel data in the current data processing frame in each first convolution operation, circularly caching the calculated convolution value, and judging whether the cached convolution value corresponds to the pixel data in the data processing frame of the current pixel point; if not, continuing to perform the first convolution operation on the pixel data in the next data processing frame, and updating the cache convolution value; if yes, performing second convolution operation on convolution values corresponding to each column of pixel data in the current data processing frame according to a preset transverse weight coefficient to obtain double cubic interpolation values corresponding to current pixel points; and outputting all the bicubic interpolation values until all the pixel points corresponding to all the data processing frames calculate the bicubic interpolation values.
Preferably, the data processing block includes 4 × 4 pixel data.
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 embodiment of the invention has the following effects:
compared with the prior art, the method and the device have the advantages that the data processing frame corresponding to each pixel point is established for each frame of video image in the source video data through the preset scaling proportion, the condition that each pixel point has one corresponding data processing frame is guaranteed, the accuracy of the pixel point position after the subsequent video data are scaled is guaranteed, the pixel point precision is improved, meanwhile, the convolution operation is carried out on the pixel data in each data processing frame according to the preset longitudinal weight coefficient and the preset transverse weight coefficient, the transverse convolution operation is carried out on the longitudinal convolution operation result after the longitudinal convolution operation result is obtained, accordingly, the scaled video data are obtained through the combination of double cubic interpolation, the situation that in the prior art, the situation that the convolution operation is carried out on the weight parameters of each pixel point in the X direction and the Y direction respectively, the interpolation is obtained, and then the video scaling combination is carried out is avoided, the operation efficiency is obviously improved, the occupied operation resources are reduced, and obvious advantages exist in the video data with large data volume.
Example four
Correspondingly, the invention also provides a terminal device, comprising: a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the video scaling method as described in any of the above embodiments when executing the computer program.
The terminal device of this embodiment includes: a processor, a memory, and a computer program, computer instructions stored in the memory and executable on the processor. The processor, when executing the computer program, implements the steps in the first embodiment, for example, steps S101 to S104 shown in fig. 1. Alternatively, the processor implements the functions of each module/unit in the above device embodiments when executing the computer program, for example, the data processing block module.
Illustratively, the computer program may be partitioned into one or more modules/units, stored in the memory and executed by the processor, to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used for describing the execution process of the computer program in the terminal device. For example, the data processing frame module is configured to sequentially establish a data processing frame corresponding to each pixel point in each frame of video image according to a preset scaling; the data processing block includes pixel data.
The terminal device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The terminal device may include, but is not limited to, a processor, a memory. It will be appreciated by those skilled in the art that the schematic diagram is merely an example of a terminal device and does not constitute a limitation of a terminal device, and may include more or less components than those shown, or combine certain components, or different components, for example, the terminal device may also include input output devices, network access devices, buses, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like, said processor being the control center of said terminal device, and various interfaces and lines are used to connect the various parts of the whole terminal device.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the terminal device by running or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the mobile terminal, and the like. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Wherein, the terminal device integrated module/unit can be stored in a computer readable storage medium if it is implemented in the form of software functional unit and sold or used as a stand-alone product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments described above may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
EXAMPLE five
Accordingly, the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program runs, a device on which the computer-readable storage medium is located is controlled to execute the video scaling method according to any one of the above embodiments.
The above-mentioned embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, and it should be understood that the above-mentioned embodiments are only examples of the present invention and are not intended to limit the scope of the present invention. It should be understood that any modifications, equivalents, improvements and the like, which come within the spirit and principle of the invention, may occur to those skilled in the art and are intended to be included within the scope of the invention.

Claims (7)

1. A video zooming method, applied to a splicer and a splicer display system, comprises the following steps: acquiring source video data, and inputting the source video data into the input card so that the input card sends the source video data to the switch card; wherein the source video data comprises a number of frames of video images;
the switchboard card can freely switch the video sources on the multipath input card to the splicer display system according to the preset requirement;
the method comprises the following steps that a splicer display system performs double cubic interpolation reduction processing on source video data according to a preset requirement and then caches the source video data into a DDR (double data rate), reads the source video data in the DDR and performs double cubic interpolation amplification processing on the source video data according to the preset requirement; the method comprises the following steps that video component data of source video data are respectively cached in 4 lines of video data through a first memory, 4 data of each column are continuously and sequentially read and convolution operation is carried out on the 4 data and a preset longitudinal weight coefficient, and 4 weight values are obtained and cached in a circulating mode; splicing the zoomed source video data and outputting and displaying the spliced source video data;
wherein, the step of the double cubic interpolation minification processing or the double cubic interpolation amplification processing comprises the following steps: sequentially establishing a data processing frame corresponding to each pixel point in each frame of video image according to a preset scaling; the data processing block includes pixel data; sequentially carrying out first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient, and sequentially carrying out second convolution operation on the result of each first convolution operation according to a preset transverse weight coefficient to respectively obtain corresponding bicubic interpolation values; sequentially performing first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient to obtain a convolution value corresponding to each row of pixel data in each data processing frame; performing second convolution operation on convolution values corresponding to each column of pixel data in each data processing frame according to a preset transverse weight coefficient to respectively obtain bicubic interpolation values corresponding to each pixel point; specifically, according to a preset longitudinal weight coefficient, sequentially performing first convolution operation on pixel data in each data processing frame so as to sequentially obtain a convolution value corresponding to each column of pixel data in the current data processing frame in each first convolution operation, circularly caching the calculated convolution value, and judging whether the cached convolution value corresponds to the pixel data in the data processing frame of the current pixel point; if not, continuing to perform the first convolution operation on the pixel data in the next data processing frame, and updating the cache convolution value; if yes, performing second convolution operation on convolution values corresponding to each column of pixel data in the current data processing frame according to a preset transverse weight coefficient to obtain double cubic interpolation values corresponding to current pixel points; outputting all the bicubic interpolation values until the pixel points corresponding to all the data processing frames calculate the bicubic interpolation values; and combining all the double cubic interpolation values to obtain a plurality of frames of zoomed video images, thereby obtaining zoomed source video data.
2. The video scaling method according to claim 1, wherein the sequentially establishing, according to the preset scaling ratio, the data processing frame corresponding to each pixel point in each frame of the video image comprises:
and sequentially establishing a data processing frame corresponding to each pixel point in each frame of video image, so that in each frame of video image, the coordinates of the scaled pixel points corresponding to all the pixel points before scaling are calculated in the current video image according to a preset scaling, establishing the data processing frame corresponding to each pixel point according to the coordinates of the scaled pixel points, and outputting the data processing frame corresponding to each pixel point of each frame of video image until the data processing frame corresponding to each pixel point is established in the video image of all the frames.
3. A method for video scaling according to any of claims 1-2, wherein the data processing block comprises 4 x 4 pixel data.
4. A video scaling apparatus for use in a tile and tile display system, comprising: the system comprises a source video module, a data processing frame module, a convolution module and a combination module;
the source video module is used for acquiring source video data; inputting the source video data into the input card, so that the input card sends the source video data to the switch card; wherein the source video data comprises a number of frames of video images;
the video source on the multi-path input card can be switched to the splicing device display system by the exchange card according to the preset requirement; the splicer display system performs double-cubic interpolation reduction processing on the source video data according to a preset requirement, then caches the source video data in the DDR, reads the source video data in the DDR and performs double-cubic interpolation amplification processing on the source video data according to the preset requirement; the method comprises the following steps that video component data of source video data are respectively cached in 4 lines of video data through a first memory, 4 data in each row are continuously and sequentially read and are subjected to convolution operation with a preset longitudinal weight coefficient, and 4 weight values are obtained and cached in a circulating mode; splicing the zoomed source video data and outputting and displaying the spliced source video data;
the data processing frame module is used for sequentially establishing a data processing frame corresponding to each pixel point in each frame of video image according to a preset scaling; the data processing block includes pixel data;
the convolution module is used for sequentially carrying out first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient, and sequentially carrying out second convolution operation on the result of each first convolution operation according to a preset transverse weight coefficient to respectively obtain corresponding double-cube interpolation values; sequentially performing first convolution operation on the pixel data in each data processing frame according to a preset longitudinal weight coefficient to obtain a convolution value corresponding to each row of pixel data in each data processing frame; performing second convolution operation on convolution values corresponding to each row of pixel data in each data processing frame according to a preset transverse weight coefficient to respectively obtain double-cubic interpolation values corresponding to each pixel point; specifically, according to a preset longitudinal weight coefficient, sequentially performing a first convolution operation on pixel data in each data processing frame so as to sequentially obtain a convolution value corresponding to each column of pixel data in the current data processing frame in each first convolution operation, circularly caching the calculated convolution value, and judging whether the cached convolution value corresponds to the pixel data in the data processing frame of the current pixel point; if not, continuing to perform the first convolution operation on the pixel data in the next data processing frame, and updating the cache convolution value; if so, performing second convolution operation on a convolution value corresponding to each column of pixel data in the current data processing frame according to a preset transverse weight coefficient to obtain double cubic interpolation corresponding to the current pixel point; outputting all the bicubic interpolation values until the pixel points corresponding to all the data processing frames calculate the bicubic interpolation values;
and the combination module is used for combining all the bicubic interpolation values to obtain a plurality of frames of zoomed video images so as to obtain zoomed source video data.
5. The video scaling device according to claim 4, wherein the data processing frame corresponding to each pixel point is sequentially established in each frame of video image according to a preset scaling ratio, specifically:
and sequentially establishing a data processing frame corresponding to each pixel point in each frame of video image, so that in each frame of video image, the coordinates of the scaled pixel points corresponding to all the pixel points before scaling are calculated in the current video image according to a preset scaling, establishing the data processing frame corresponding to each pixel point according to the coordinates of the scaled pixel points, and outputting the data processing frame corresponding to each pixel point of each frame of video image until the video images of all the frames establish the data processing frame corresponding to each pixel point.
6. A terminal device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the video scaling method of any of claims 1-3 when executing the computer program.
7. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored computer program; wherein the computer program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the video scaling method of any of claims 1-3.
CN202211106986.1A 2022-09-13 2022-09-13 Video scaling method, device, equipment and storage medium Active CN115190263B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211106986.1A CN115190263B (en) 2022-09-13 2022-09-13 Video scaling method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211106986.1A CN115190263B (en) 2022-09-13 2022-09-13 Video scaling method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115190263A CN115190263A (en) 2022-10-14
CN115190263B true CN115190263B (en) 2022-12-20

Family

ID=83524331

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211106986.1A Active CN115190263B (en) 2022-09-13 2022-09-13 Video scaling method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115190263B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116156088B (en) * 2023-04-14 2023-08-15 广东电网有限责任公司中山供电局 Video image scaling processing system, method, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1622134A (en) * 2005-01-11 2005-06-01 北京中星微电子有限公司 Image conversion method capable of realizing zooming
CN103034973A (en) * 2012-12-05 2013-04-10 焦点科技股份有限公司 Self-adaptive image scaling method based on bicubic interpolation
CN107358575A (en) * 2017-06-08 2017-11-17 清华大学 A kind of single image super resolution ratio reconstruction method based on depth residual error network
CN110082072A (en) * 2019-04-30 2019-08-02 中国科学院合肥物质科学研究院 A kind of detector array target data processing method
CN111179169A (en) * 2019-12-18 2020-05-19 兰州恒达彩印包装有限责任公司 Parameter optimization method of bicubic image interpolation model
CN113689337A (en) * 2021-08-27 2021-11-23 华东师范大学 Ultrasonic image super-resolution reconstruction method and system based on generation countermeasure network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1622134A (en) * 2005-01-11 2005-06-01 北京中星微电子有限公司 Image conversion method capable of realizing zooming
CN103034973A (en) * 2012-12-05 2013-04-10 焦点科技股份有限公司 Self-adaptive image scaling method based on bicubic interpolation
CN107358575A (en) * 2017-06-08 2017-11-17 清华大学 A kind of single image super resolution ratio reconstruction method based on depth residual error network
CN110082072A (en) * 2019-04-30 2019-08-02 中国科学院合肥物质科学研究院 A kind of detector array target data processing method
CN111179169A (en) * 2019-12-18 2020-05-19 兰州恒达彩印包装有限责任公司 Parameter optimization method of bicubic image interpolation model
CN113689337A (en) * 2021-08-27 2021-11-23 华东师范大学 Ultrasonic image super-resolution reconstruction method and system based on generation countermeasure network

Also Published As

Publication number Publication date
CN115190263A (en) 2022-10-14

Similar Documents

Publication Publication Date Title
US8194098B2 (en) Apparatus, method, and product for downscaling an image
US8837854B2 (en) Image processing method for boundary resolution enhancement
US20170064227A1 (en) Pixel defect preprocessing in an image signal processor
CN111724304B (en) Image scaling method and device, terminal equipment and storage medium
CN106780336B (en) Image reduction method and device
CN108600783B (en) Frame rate adjusting method and device and terminal equipment
CN115190263B (en) Video scaling method, device, equipment and storage medium
EP2847998B1 (en) Systems, methods, and computer program products for compound image demosaicing and warping
US20210012459A1 (en) Image processing method and apparatus
CN110996026B (en) OSD display method, device, equipment and storage medium
US8902474B2 (en) Image processing apparatus, control method of the same, and program
JP2009094862A (en) Video signal processor
WO2011121563A1 (en) Detecting saliency in an image
WO2023070862A1 (en) Method and apparatus for correcting image distortion of wide-angle lens, and photographing device
CN111405200A (en) Video shrinking device, method and system and electronic equipment thereof
CN111260559B (en) Image zooming display method and device and terminal equipment
CN111105356B (en) Image processing method, device and computer readable storage medium
CN115809959A (en) Image processing method and device
CN109978766B (en) Image amplifying method and image amplifying device
KR100998220B1 (en) Method for adaptive image resizing
CA2011507A1 (en) Parallel image filtering using convolution
CN108833872B (en) Method for quickly zooming or amplifying YUY2 color space
CN117173019A (en) Method, device, medium and electronic equipment for scaling native image
CN117764819A (en) Image processing method, device, electronic equipment and storage medium
CN117274120A (en) Image processing apparatus, image processing method, electronic device, computer device, and storage medium

Legal Events

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

Address after: No. 56 Nanli East Road, Shiqi Town, Panyu District, Guangzhou City, Guangdong Province, 510000

Patentee after: Guangdong Baolun Electronics Co.,Ltd.

Address before: No.19 Chuangyuan Road, Zhongcun street, Panyu District, Guangzhou, Guangdong 510000

Patentee before: GUANGZHOU ITC ELECTRONIC TECHNOLOGY Co.,Ltd.

CP03 Change of name, title or address