CN102891998B - A kind of image scaling, coding method and system - Google Patents

A kind of image scaling, coding method and system Download PDF

Info

Publication number
CN102891998B
CN102891998B CN201110206576.XA CN201110206576A CN102891998B CN 102891998 B CN102891998 B CN 102891998B CN 201110206576 A CN201110206576 A CN 201110206576A CN 102891998 B CN102891998 B CN 102891998B
Authority
CN
China
Prior art keywords
data block
hsize
vsize
interpolation
size
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
CN201110206576.XA
Other languages
Chinese (zh)
Other versions
CN102891998A (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.)
Guangzhou Ankai Microelectronics Co.,Ltd.
Original Assignee
Anyka Guangzhou Microelectronics 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 Anyka Guangzhou Microelectronics Technology Co Ltd filed Critical Anyka Guangzhou Microelectronics Technology Co Ltd
Priority to CN201110206576.XA priority Critical patent/CN102891998B/en
Publication of CN102891998A publication Critical patent/CN102891998A/en
Application granted granted Critical
Publication of CN102891998B publication Critical patent/CN102891998B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The present invention is applicable to image processing field, provides a kind of image scaling, coding method and system.Described method comprises the steps: to obtain source images size, and the size of image and the size of each data block after specifying interpolation after specifying interpolation; Determine the sequence number of the current data block from source images reading; The data block read from source images is determined according to the size of each data block after the size of image after the size of source images, interpolation, interpolation and described data block sequence number; Successively following steps are performed to each data block read: interpolation processing is carried out to the data block read; Data block after terminating interpolation processing carries out coded treatment.The present invention owing to not needing just to encode after an image scaling terminates, and does not need to preserve the entire image that convergent-divergent terminates acquisition yet, therefore, it is possible to effectively reduce the times to be encoded such as view data and the memory space after preserving convergent-divergent shared by image.

Description

A kind of image scaling, coding method and system
Technical field
The invention belongs to image processing field, particularly relate to a kind of image scaling, coding method and system.
Background technology
In a practical situation, the equipment often owing to obtaining image is different with the equipment of display image and need to carry out convergent-divergent, coding to image.
Existing image scaling techniques realizes by adopting linear interpolation algorithm.Such as, when the convergent-divergent of horizontal direction being carried out to image, be utilize the consecutive points of horizontal direction to carry out interpolation to go out current point; And when the convergent-divergent of vertical direction is carried out to image, be then utilize the consecutive points of vertical direction to carry out interpolation to go out current point.Suppose that the size of source images is src_hsize × src_vsize, horizontal and vertical convergent-divergent is carried out to this source images, then first line by line horizontal direction interpolation is carried out to source images, obtain the intermediate object program picture of des_hsize × src_vsize, carry out vertical direction interpolation by column again, obtain the Target Photo of des_hsize × des_vsize.Wherein src_hsize, src_vsize represent horizontal size and the vertical dimension of source images respectively, and des_hsize, des_vsize represent horizontal size and the vertical dimension of target image respectively.
Also should encode accordingly after convergent-divergent is carried out to image.Existing coding method is after wait whole image interpolation completes, and just performs encoding operation to target image, thus the overlong time causing coded image to be waited for, and need before the coding to preserve whole logo image of opening one's eyes wide, occupy too much memory space.
Summary of the invention
The invention provides a kind of image scaling, coding method, be intended to solve existing image scaling, coding method needs just to encode after an image scaling terminates, after the wait scramble time caused long and preservation convergent-divergent, image takies the problem of too much memory space.
The present invention is achieved in that a kind of image scaling, coding method, and described method comprises the steps:
Obtain source images size, and the size of image and the size of each data block after specifying interpolation after specifying interpolation;
Determine the sequence number of the current data block from source images reading;
The data block read from source images is determined according to the size of each data block after the size of image after the size of source images, interpolation, interpolation and described data block sequence number;
Successively following steps are performed to each data block read:
Interpolation processing is carried out to the data block read;
Data block after terminating interpolation processing carries out coded treatment.
Another object of the present invention is to provide a kind of image scaling, coded system, described system comprises:
Parameter determination unit, for obtaining source images size, and after specifying interpolation image size and specify the size of each data block after interpolation;
Data block sequence number determining unit, for determining the sequence number of the current data block from source images reading;
Data block determining unit, determines the data block read from source images for the size of each data block after the size of image after the size according to source images, interpolation, interpolation and described data block sequence number;
Interpolation process unit, for carrying out interpolation processing to the data block read;
Coding processing unit, carries out coded treatment for the data block after terminating interpolation processing.
One width source images is divided into multiple data block by the present invention, and carries out interpolation processing to the plurality of data block respectively and the data block after terminating interpolation processing carries out corresponding coded treatment.Owing to not needing just to encode after an image scaling terminates, and do not need to preserve the entire image that convergent-divergent terminates acquisition, therefore, it is possible to effectively reduce the times to be encoded such as view data and the memory space after preserving convergent-divergent shared by image yet.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of the determination that provides of first embodiment of the invention from the sequence number of source images read block;
Fig. 2 be first embodiment of the invention provide image scaling, coding method flow chart;
Fig. 3 be second embodiment of the invention provide image scaling, coded system structural representation.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
In the embodiment of the present invention, a width source images is split as multiple data block, when after reading data block, interpolation processing and coded treatment is carried out to this data block, until by multiple data block interpolation of fractionation and end-of-encode.
Embodiments provide one: image scaling, coding method and system.
Described method comprises: obtain source images size, and the size of image and the size of each data block after specifying interpolation after specifying interpolation;
Determine the sequence number of the current data block from source images reading;
The data block read from source images is determined according to the size of each data block after the size of image after the size of source images, interpolation, interpolation and described data block sequence number;
Successively following steps are performed to each data block read:
Interpolation processing is carried out to the data block read;
Data block after terminating interpolation processing carries out coded treatment.
Described system comprises: parameter determination unit, for obtaining source images size, and after specifying interpolation image size and specify the size of each data block after interpolation;
Data block sequence number determining unit, for determining the sequence number of the current data block from source images reading;
Data block determining unit, determines the data block read from source images for the size of each data block after the size of image after the size according to source images, interpolation, interpolation and described data block sequence number;
Interpolation process unit, for carrying out interpolation processing to the data block read;
Coding processing unit, carries out coded treatment for the data block after terminating interpolation processing.
One width source images is divided into multiple data block by the embodiment of the present invention, and carries out interpolation processing to the plurality of data block respectively and the data block after terminating interpolation processing carries out corresponding coded treatment.Owing to not needing just to encode after an image scaling terminates, and do not need to preserve the entire image that convergent-divergent terminates acquisition, therefore, it is possible to effectively reduce the times to be encoded such as view data and the memory space after preserving convergent-divergent shared by image yet.In order to technical solutions according to the invention are described, be described below by specific embodiment.
embodiment one:
Fig. 1 shows the flow chart of image scaling that first embodiment of the invention provides, coding method, and in the present embodiment, an image is divided into multiple data block, and carries out interpolation, coded treatment to the plurality of data block, details are as follows.
In step s 11, obtain source images size, and the size of image and the size of each data block after specifying interpolation after specifying interpolation.
In the present embodiment, a first selected width source images, determines whether to carry out convergent-divergent, coded treatment to this width source images.After determining to need that corresponding convergent-divergent and coded treatment are carried out to this width source images, obtain the size of this source images, and specify the image size that this width image can obtain after interpolation processing, and the data block size that in the data block size assigned source image that at every turn can process according to encoder, each data block can obtain after interpolation processing.
Such as, by one large little be 640 × 480 source images, specify it after interpolation processing, be amplified to 1280 × 960.Because encoder is encoded to the data block that size is 8 × 8 usually, each data block size obtained after therefore can specifying interpolation processing is 8 × 8.
In step s 12, the sequence number of the current data block from source images reading is determined.
Wherein, determine that the step of the sequence number of the current data block from source images reading is specially:
A, with the most top left corner pixel point of source images for initial point, the right is x-axis positive direction, below for y-axis positive direction sets up rectangular coordinate system.In the present embodiment, set up a rectangular coordinate system, this rectangular coordinate system is with the most upper left angle point of source images for initial point, and to the right, y-axis positive direction is downward for x-axis positive direction.
B, the horizontal direction sequence number determining the data block of current reading according to this rectangular coordinate system and vertical direction sequence number.In the present embodiment, horizontal direction sequence number and the vertical direction sequence number of the current data block from source images reading is determined according to the rectangular coordinate system set up.Specifically as shown in Figure 2, wherein, N represents the horizontal direction sequence number of this data block, and M represents the vertical direction sequence number of this data block.From the upper left corner of source images, from left to right, each data block of source images is read from top to bottom.
In step s 13, the data block read from source images is determined according to the size of each data block after the size of image after the size of source images, interpolation, interpolation and this data block sequence number.
The present embodiment is by determining to determine to read those data blocks from source images from the starting point coordinate of source images read block and the data block size of reading.Coordinate due to the first pixel of Computer Storage image is (0,0), therefore the starting point abscissa (x coordinate) being the data block of 1 from source images read level direction sequence number is 0, and the starting point ordinate (y coordinate) being the data block of 1 from source images reading vertical direction sequence number is also 0.
Wherein, determine that the step of the data block read from source images is specially according to the size of each data block after the size of image after the size of source images, interpolation, interpolation and this data block sequence number:
C, when read level direction sequence number is not 1 and vertical direction sequence number is not the data block of 1, determine starting point abscissa and the starting point ordinate of the data block read from source images according to the size of each data block after the size of image after the size of source images, interpolation, interpolation and this data block sequence number.Suppose that the size of source images is src_hsize × src_vsize, the current horizontal direction sequence number read from source images is N number of (N is more than or equal to 2) data block, vertical direction sequence number is M block (M is more than or equal to 2), after appointment interpolation, the size of image is des_hsize × des_vsize, and after appointment interpolation, the size of each data block is k_hsize × k_vsize.First introducing two intermediate variable x_cnt, y_cnt, is the N number of piece of horizontal direction in the current data block obtained from source images, during M block of vertical direction, then:
x_cnt=[(src_hsize-1)×N×k_hsize÷(des_hsize-1)]
-[(src_hsize-1)×(N-1)×k_hsize÷(des_hsize-1)]+1(N=1)
x_cnt=[(src_hsize-1)×N×k_hsize÷(des_hsize-1)]
-[(src_hsize-1)×(N-1)×k_hsize÷(des_hsize-1)](N≥2)
y_cnt=[(src_vsize-1)×M×k_vsize÷(des_vsize-1)]
-[(src_vsize-1)×(M-1)×k_vsize÷(des_vsize-1)]+1(M=1)
y_cnt=[(src_vsize-1)×M×k_vsize÷(des_vsize-1)]
-[(src_vsize-1)×(M-1)×k_vsize÷(des_vsize-1)](M≥2)
Wherein, bracket [] represents floor operation.Represent that before then src_x_position equals horizontal direction, the x_cnt sum of N-1 block subtracts 1, namely from the abscissa corresponding to the starting point coordinate of source images read block and ordinate respectively with src_x_position and src_y_position before src_y_position equals vertical direction, the y_cnt sum of M-1 block subtracts 1, namely src _ y _ position = Σ i = 1 M - 1 y _ cnt i - 1 .
D, determine the data block size that reads from source images according to the size of each data block after the size of image after the size of source images, interpolation, interpolation and this data block sequence number.In the present embodiment, determine the data block size that need read from source images according to the size of whole source images, the image size after interpolation processing of specifying, the size of each data block after interpolation processing of specifying and the sequence number (horizontal direction sequence number and vertical direction sequence number) of the current data block from source images reading.Suppose that the data block size that need read from source images is t_hsize × t_vsize, if the data block read is first data block of horizontal direction, the intermediate variable x_cnt that then t_hsize equals this block adds 1, if not first of read level direction data block, then the intermediate variable x_cnt that t_hsize equals this block adds 2; If read first data block of vertical direction, then the intermediate variable y_cnt that t_vsize equals this block adds 1, if not read first data block of vertical direction, then the intermediate variable y_cnt that t_vsize equals this block adds 2.
Certainly, also can be determined the source image data that need read from source images by the starting point coordinate and terminal point coordinate determining reading data, repeat no more herein.
After source images reads the data block of specifying size, step S14 and S15 is performed to each data block read.
In step S14, interpolation processing is carried out to the data block read.
In the present embodiment, one by one interpolation processing is carried out to the source image data read in units of each piecemeal.Such as, after have read horizontal direction sequence number from source images be the data block of 1, according to the initial interpolation coefficient of level of picture level direction this data block of Size calculation after source picture level direction size and interpolation; After have read vertical direction sequence number from source images be the data block of 1, according to the vertical initial interpolation coefficient of this data block of picture vertical direction Size calculation after source picture vertical direction size and interpolation, and use the initial interpolation coefficient of this level or vertical initial interpolation coefficient to carry out level or vertical interpolation process to the data block read, then after interpolation processing terminates, preserve the Horizontal interpolation coefficient of this data block or the level initial interpolation coefficient of vertical interpolation coefficient as right side data block or the vertical initial interpolation coefficient of bottom data block.
Be 1 when have read horizontal direction sequence number from source images, vertical direction sequence number is also after the data block of 1.According to the initial interpolation coefficient of level of picture level direction this data block of Size calculation after source picture level direction size and interpolation, according to the vertical initial interpolation coefficient of this data block of picture vertical direction Size calculation after source picture vertical direction size and interpolation, the initial interpolation coefficient of this level is used to carry out horizontal and vertical interpolation processing with vertical initial interpolation coefficient to the data block read, the Horizontal interpolation coefficient of this data block and the level initial interpolation coefficient of vertical interpolation coefficient as right side data block and the vertical initial interpolation coefficient of bottom data block is preserved again after interpolation processing terminates.
Be 2 and after vertical direction sequence number is the data block of 1 when have read horizontal direction sequence number from source images, the horizontal direction sequence number of preserving is 1 and vertical direction sequence number is also the level initial interpolation coefficient of Horizontal interpolation coefficient as this data block of the data block of 1, according to the vertical initial interpolation coefficient of this data block of picture vertical direction Size calculation after source picture vertical direction size and interpolation, the initial interpolation coefficient of this level is used to carry out horizontal and vertical interpolation processing with vertical initial interpolation coefficient to the data block read, the Horizontal interpolation coefficient of this data block and the level initial interpolation coefficient of vertical interpolation coefficient as right side data block and the vertical initial interpolation coefficient of bottom data block is preserved again after interpolation processing terminates.
Be 1 and after vertical direction sequence number is the data block of 2 when have read horizontal direction sequence number from source images, according to the initial interpolation coefficient of level of picture level direction this data block of Size calculation after source picture level direction size and interpolation, the horizontal direction sequence number of preserving is 1 and vertical direction sequence number is also the vertical initial interpolation coefficient of vertical interpolation coefficient as this data block of the data block of 1, the initial interpolation coefficient of this level is used to carry out horizontal and vertical interpolation processing with vertical initial interpolation coefficient to the data block read, the Horizontal interpolation coefficient of this data block and the level initial interpolation coefficient of vertical interpolation coefficient as right side data block and the vertical initial interpolation coefficient of bottom data block is preserved again after interpolation processing terminates.
Be 2 and after vertical direction sequence number is the data block of 2 when have read horizontal direction sequence number from source images, the horizontal direction sequence number of preserving is 1 and vertical direction sequence number is the level initial interpolation coefficient of Horizontal interpolation coefficient as this data block of the data block of 2, the horizontal direction sequence number of preserving is 2 and vertical direction sequence number is the vertical initial interpolation coefficient of vertical interpolation coefficient as this data block of the data block of 1, the initial interpolation coefficient of this level is used to carry out horizontal and vertical interpolation processing with vertical initial interpolation coefficient to the data block read, the Horizontal interpolation coefficient of this data block and the level initial interpolation coefficient of vertical interpolation coefficient as right side data block and the vertical initial interpolation coefficient of bottom data block is preserved again after interpolation processing terminates.
In the present embodiment, when performing interpolation processing to each block data of source images, be all by left side block Horizontal interpolation at the end of interpolation coefficient, initial interpolation coefficient when starting as right side block Horizontal interpolation, and the interpolation coefficient at the end of upper block vertical interpolation, initial interpolation coefficient when then starting as lower block vertical interpolation, like this, the image obtained after effectively ensureing piecemeal interpolation is still continuous print, there is no the vestige of zone of fracture, the basis ensureing interpolation speed also maintains the good experience of user.
In step S15, the data block after terminating interpolation processing carries out coded treatment.
In the present embodiment, when the interpolation processing of a data block terminates, then at once coded treatment is carried out to the data block that this interpolation processing terminates.Wherein, coded system has multiple, as JPEG coding etc.
In the first embodiment of the invention, a width source images is divided into multiple data block, and respectively interpolation processing is carried out to the plurality of data block and the data block after terminating interpolation processing carries out corresponding coded treatment.Owing to not needing just to encode after an image scaling terminates, and do not need to preserve the entire image that convergent-divergent terminates acquisition, therefore, it is possible to effectively reduce the times to be encoded such as view data and the memory space after preserving convergent-divergent shared by image yet.In addition, occur simultaneously because the data of adjacent two data blocks in multiple data blocks that source images is divided into exist some, and the data block on right side carries out with the data block on the left of it interpolation coefficient that interpolation terminates rear acquisition to carry out interpolation, bottom data block carries out with its top data block the interpolation coefficient that interpolation terminates rear acquisition to carry out interpolation, therefore the image obtained after effectively ensureing piecemeal interpolation is still continuous print, there is no the vestige of zone of fracture, the basis ensureing interpolation speed also maintains the good experience of user.
embodiment two:
Fig. 3 shows the structure of image scaling that second embodiment of the invention provides, coded system, for convenience of explanation, illustrate only the part relevant to the embodiment of the present invention.
This image scaling, coded system may be used for the various information processing terminals by wired or wireless network connection server, such as mobile phone, pocket computer (Pocket Personal Computer, PPC), palmtop PC, computer, notebook computer, personal digital assistant (Personal Digital Assistant, PDA) etc., can be run on the software unit in these terminals, the unit that hardware cell or software and hardware combine, also can be integrated in these terminals as independently suspension member or run in the application system of these terminals, wherein:
Parameter determination unit 31, for obtaining source images size, and after specifying interpolation image size and specify the size of each data block after interpolation.
Data block sequence number determining unit 32, for determining the sequence number of the current data block from source images reading.
Wherein, data block sequence number determining unit 32 comprises: establishment of coordinate system module 321 and data block sequence number determination module 322.
Establishment of coordinate system module 321, for the most top left corner pixel point of source images for initial point, the right is x-axis positive direction, below for y-axis positive direction sets up rectangular coordinate system.
Data block sequence number determination module 322, for determining horizontal direction sequence number and the vertical direction sequence number of the data block of current reading according to this rectangular coordinate system.
Data block determining unit 33, determines the data block read from source images for the size of each data block after the size of image after the size according to source images, interpolation, interpolation and this data block sequence number.
Wherein, data block determining unit 33 comprises: the first point coordinates determination module 331 of data block, data block first size determination module 332, the second starting point coordinate determination module 333 of data block and the second size determination module 334 of data block.
The first point coordinates determination module 331 of data block is 0 for the starting point abscissa that to determine from source images read level direction sequence number be the data block of 1, and from source images, to read vertical direction sequence number be the starting point ordinate of the data block of 1 is also 0.
First size determination module 332 of data block, for when read level direction sequence number is the data block of 1, according to formula
x_cnt=[(src_hsize-1)×N×k_hsize÷(des_hsize-1)]
-[(src_hsize-1)×(N-1)×k_hsize÷(des_hsize-1)]+1(N=1)
And t_hsize=x_cnt+1 (N=1) determines the horizontal size of the data block read from source images, when reading vertical direction sequence number is the data block of 1, according to formula
y_cnt=[(src_vsize-1)×M×k_vsize÷(des_vsize-1)]
-[(src_vsize-1)×(M-1)×k_vsize÷(des_vsize-1)]+1(M=1)
And t_vsize=y_cnt+1 (M=1) determines the vertical dimension of the data block read from source images, wherein, bracket [] represents floor operation, src_hsize and src_vsize is respectively horizontal size and the vertical dimension of source images, N and M is respectively horizontal direction sequence number and the vertical direction sequence number of the data block of reading, the horizontal size of k_hsize and k_vsize each data block after being respectively interpolation and vertical dimension, des_hsize and des_vsize is respectively horizontal size and the vertical dimension of image after interpolation.
Second starting point coordinate determination module 333 of data block, for when read level direction sequence number is not 1 and vertical direction sequence number is not the data block of 1, the starting point coordinate according to following formula determination data block:
x_cnt=[(src_hsize-1)×N×k_hsize÷(des_hsize-1)]
-[(src_hsize-1)×(N-1)×k_hsize÷(des_hsize-1)]+1(N=1)
x_cnt=[(src_hsize-1)×N×k_hsize÷(des_hsize-1)]
-[(src_hsize-1)×(N-1)×k_hsize÷(des_hsize-1)](N≥2)
y_cnt=[(src_vsize-1)×M×k_vsize÷(des_vsize-1)]
-[(src_vsize-1)×(M-1)×k_vsize÷(des_vsize-1)]+1(M=1)
y_cnt=[(src_vsize-1)×M×k_vsize÷(des_vsize-1)]
-[(src_vsize-1)×(M-1)×k_vsize÷(des_vsize-1)](M≥2) src _ x _ postion = Σ i = 1 N - 1 x _ cnt i - 1 , src _ y _ position = Σ i = 1 M - 1 y _ cnt i - 1 , Wherein, bracket [] represents floor operation, src_hsize and src_vsize is respectively horizontal size and the vertical dimension of source images, N and M is respectively horizontal direction sequence number and the vertical direction sequence number of the data block of reading, the horizontal size of k_hsize and k_vsize each data block after being respectively interpolation and vertical dimension, des_hsize and des_vsize is respectively horizontal size and the vertical dimension of image after interpolation, x_cnt ifor x_cnt value when horizontal direction sequence number is i, y_cnt ifor y_cnt value when vertical direction sequence number is i, src_x_position and src_y_position represents starting point abscissa and the starting point ordinate of the data block read from source images respectively.
Second size determination module 334 of data block, for when read level direction sequence number is not 1 and vertical direction sequence number is not the data block of 1, horizontal size and vertical dimension according to following formula determination data block:
x_cnt=[(src_hsize-1)×N×k_hsize÷(des_hsize-1)]
-[(src_hsize-1)×(N-1)×k_hsize÷(des_hsize-1)](N≥2)
y_cnt=[(src_vsize-1)×M×k_vsize÷(des_vsize-1)]
-[(src_vsize-1)×(M-1)×k_vsize÷(des_vsize-1)](M≥2)
T_hsize=x_cnt+2 (N >=2) and t_vsize=y_cnt+2 (M >=2), wherein, bracket [] represents floor operation, src_hsize and src_vsize is respectively horizontal size and the vertical dimension of source images, N and M is respectively horizontal direction sequence number and the vertical direction sequence number of the data block of reading, the horizontal size of k_hsize and k_vsize each data block after being respectively interpolation and vertical dimension, des_hsize and des_vsize is respectively horizontal size and the vertical dimension of image after interpolation.
Interpolation process unit 34, for carrying out interpolation processing to the data block read.
In the present embodiment, when performing interpolation processing to each block data of source images, be all by left side block interpolation at the end of Horizontal interpolation coefficient, initial interpolation coefficient when starting as right side block Horizontal interpolation, and the vertical interpolation coefficient at the end of upper block interpolation, initial interpolation coefficient when then starting as lower block vertical interpolation, like this, the image obtained after effectively ensureing piecemeal interpolation is still continuous print, there is no the vestige of zone of fracture, the basis ensureing interpolation speed also maintains the good experience of user.
Coding processing unit 35, carries out coded treatment for the data block after terminating interpolation processing.
In second embodiment of the invention, data block determining unit 33 determines the data block that need read from source images according to the parameters that parameter determination unit 31 and data block sequence number determining unit 32 are determined, and independently interpolation processing is carried out to each data block read, after a data block interpolation processing terminates, directly coded treatment is carried out to this data block, therefore effectively can also reduce the times to be encoded such as view data and the memory space after preserving convergent-divergent shared by image on the basis ensureing user's good experience.
embodiment three:
Multiple data block is divided into a width source images carries out interpolation and coded treatment to be illustrated more clearly in, be described with an embody rule example below.
Suppose that source images size is 640 × 480, specify this source images to be amplified to 1280 × 960 after interpolation processing, suppose that encoder processes the data block of 18 × 8 size at every turn, then the size of a data block after interpolation processing of assigned source image is 8 × 8.Data due to a pixel need 1 byte space to preserve, and therefore after buffer memory interpolation, the unit of 8 × 8 data blocks only needs 64 bytes of storage space.According to the formula of embodiment one or embodiment two, work as N=1, during M=1, be (0 from the starting point coordinate of source images read block, 0), after determining the starting point coordinate of read block, the value of intermediate variable is determined according to formula x_cnt=[(640-1) × 1 × 8 ÷ (1280-1)]-[(640-1) × (1-1) × 8 ÷ (1280-1)]+1=4, and the horizontal size t_hsize=4+1=5 obtained from source images read block, in like manner, according to the respective formula of embodiment one or embodiment two, obtain t_vsize=4+1=5, namely from coordinate be (0, 0) start, reading source images size is the data block of 5 × 5.Read the data of source images from left to right, namely N=2 is worked as, during M=1, N=2 is read from source images, the starting point abscissa of the data block that M=1 is corresponding is 4-1=3, starting point ordinate is 0, namely N=2 is worked as, during M=1, first data reading this data block are coordinate (3, 0) corresponding data, the intermediate variable of this data block is calculated again according to formula x_cnt=[(640-1) × 2 × 8 ÷ (1280-1)] below-[(640-1) × (1-1) × 8 ÷ (1280-1)]=4, then from the horizontal size t_hsize=4+2=6 of source images read block, corresponding t_vsize=5.According to the method described above, from left to right, read the data block of source images from top to bottom, known through calculating, the maximum of t_hsize and t_vsize is all 6, then source data buffer unit only needs the memory space of 36 bytes to store source block.The times to be encoded such as each data block only have original (8 × 8) ÷ (1280 × 960) doubly, be about 5/100000ths, after storing interpolation, picture requisite space also only has original (8 × 8) ÷ (1280 × 960) doubly, is about 5/100000ths.
One width source images is divided into multiple data block by the present invention, and carries out interpolation processing to the plurality of data block respectively and the data block after terminating interpolation processing carries out corresponding coded treatment.Owing to not needing just to encode after an image scaling terminates, and do not need to preserve the entire image that convergent-divergent terminates acquisition, therefore, it is possible to effectively reduce the times to be encoded such as view data and the memory space after preserving convergent-divergent shared by image yet.In addition, occur simultaneously because the data of adjacent two data blocks in multiple data blocks that source images is divided into exist some, and the data block on right side carries out using the data block on the left of it the initial interpolation coefficient of Horizontal interpolation coefficient as its Horizontal interpolation that Horizontal interpolation terminates rear acquisition, bottom data block carries out using its top data block the initial interpolation coefficient of vertical interpolation coefficient as its vertical interpolation that vertical interpolation terminates rear acquisition, therefore the image obtained after effectively ensureing piecemeal interpolation is still continuous print, there is no the vestige of zone of fracture, the basis ensureing interpolation speed also maintains the good experience of user.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. image scaling, a coding method, is characterized in that, described method comprises the steps:
Obtain source images size, and the size of image and the size of each data block after specifying interpolation after specifying interpolation;
Determine the sequence number of the current data block from source images reading;
The data block read from source images is determined according to the size of each data block after the size of image after the size of source images, interpolation, interpolation and described data block sequence number;
Successively following steps are performed to each data block read:
Interpolation processing is carried out to the data block read; When interpolation processing is performed to the data block read, be all by left side block Horizontal interpolation at the end of interpolation coefficient, initial interpolation coefficient when starting as right side block Horizontal interpolation, and the interpolation coefficient at the end of upper block vertical interpolation, then initial interpolation coefficient when starting as lower block vertical interpolation;
Data block after terminating interpolation processing carries out coded treatment.
2. the method for claim 1, is characterized in that, describedly determines that the step of sequence number of the current data block read from source images is specially:
With the most top left corner pixel point of source images for initial point, the right is x-axis positive direction, below for y-axis positive direction sets up rectangular coordinate system;
Horizontal direction sequence number and the vertical direction sequence number of the data block of current reading is determined according to described rectangular coordinate system.
3. the method for claim 1, is characterized in that, after the described size according to source images, interpolation, after the size of image, interpolation, the size of each data block and described data block sequence number determine that the step of the data block read from source images is specially:
If read level direction sequence number is the data block of 1 or to read vertical direction sequence number be the data block of 1:
The starting point abscissa that to determine from source images read level direction sequence number be the data block of 1 is 0, and from source images, to read vertical direction sequence number be the starting point ordinate of the data block of 1 is also 0;
The data block size read from source images is determined according to the size of each data block after the size of image after the size of source images, interpolation, interpolation and described data block sequence number.
4. the method for claim 1, is characterized in that, after the described size according to source images, interpolation, after the size of image, interpolation, the size of each data block and described data block sequence number determine that the step of the data block read from source images is specially:
If read level direction sequence number is not the data block of 1 and reads the data block that vertical direction sequence number is not 1:
Starting point abscissa and the starting point ordinate of the data block read from source images is determined according to the size of each data block after the size of image after the size of source images, interpolation, interpolation and described data block sequence number;
The data block size read from source images is determined according to the size of each data block after the size of image after the size of source images, interpolation, interpolation and described data block sequence number.
5. method as claimed in claim 3, is characterized in that, after the described size according to source images, interpolation, after the size of image, interpolation, the size of each data block and described data block sequence number determine that the step of the data block size read from source images is specially:
When read level direction sequence number is the data block of 1, according to formula
x_cnt=[(src_hsize-1)×N×k_hsize÷(des_hsize-1)]
-[(src_hsize-1)×(N-1)×k_hsize÷(des_hsize-1)]+1(N=1)
And formula t_hsize=x_cnt+1 (N=1) determines the horizontal size of the data block read from source images;
When reading vertical direction sequence number is the data block of 1, according to formula
y_cnt=[(src_vsize-1)×M×k_vsize÷(des_vsize-1)]
-[(src_vsize-1)×(M-1)×k_vsize÷(des_vsize-1)]+1(M=1)
And formula t_vsize=y_cnt+1 (M=1) determines the vertical dimension of the data block read from source images;
Wherein, bracket [] represents floor operation, src_hsize and src_vsize is respectively horizontal size and the vertical dimension of source images, N and M is respectively horizontal direction sequence number and the vertical direction sequence number of the data block of reading, the horizontal size of k_hsize and k_vsize each data block after being respectively interpolation and vertical dimension, des_hsize and des_vsize is respectively horizontal size and the vertical dimension of image after interpolation.
6. method as claimed in claim 4, it is characterized in that, after the described size according to source images, interpolation, after the size of image, interpolation, the size of each data block and described data block sequence number determine that the starting point abscissa of data block that reads from source images and the step of starting point ordinate are specially:
When read level direction sequence number is not 1 and vertical direction sequence number is not the data block of 1, determine starting point abscissa and the starting point ordinate of the data block read from source images according to following formula:
x_cnt=[(src_hsize-1)×N×k_hsize÷(des_hsize-1)]
-[(src_hsize-1)×(N-1)×k_hsize÷(des_hsize-1)]+1(N=1)
x_cnt=[(src_hsize-1)×N×k_hsize÷(des_hsize-1)]
-[(src_hsize-1)×(N-1)×k_hsize÷(des_hsize-1)](N≥2)
y_cnt=[(src_vsize-1)×M×k_vsize÷(des_vsize-1)]
-[(src_vsize-1)×(M-1)×k_vsize÷(des_vsize-1)]+1(M=1)
y_cnt=[(src_vsize-1)×M×k_vsize÷(des_vsize-1)]
-[(src_vsize-1)×(M-1)×k_vsize÷(des_vsize-1)](M≥2)
src _ x _ position = Σ i = 1 N - 1 x _ cnt i - 1 , src _ y _ position = Σ i = 1 M - 1 y _ cnt i - 1 , Wherein, bracket [] represents floor operation, src_hsize and src_vsize is respectively horizontal size and the vertical dimension of source images, N and M is respectively horizontal direction sequence number and the vertical direction sequence number of the data block of reading, the horizontal size of k_hsize and k_vsize each data block after being respectively interpolation and vertical dimension, des_hsize and des_vsize is respectively horizontal size and the vertical dimension of image after interpolation, x_cnt ifor x_cnt value when horizontal direction sequence number is i, y_cnt ifor y_cnt value when vertical direction sequence number is i, src_x_position and src_y_position represents starting point abscissa and the starting point ordinate of the data block read from source images respectively.
7. method as claimed in claim 4, is characterized in that, after the described size according to source images, interpolation, after the size of image, interpolation, the size of each data block and described data block sequence number determine that the step of the data block size read from source images is specially:
When read level direction sequence number is not 1 and vertical direction sequence number is not the data block of 1, according to formula
x_cnt=[(src_hsize-1)×N×k_hsize÷(des_hsize-1)]
-[(src_hsize-1)×(N-1)×k_hsize÷(des_hsize-1)](N≥2)
y_cnt=[(src_vsize-1)×M×k_vsize÷(des_vsize-1)]
-[(src_vsize-1)×(M-1)×k_vsize÷(des_vsize-1)](M≥2)
T_hsize=x_cnt+2 (N≤2) and t_vsize=y_cnt+2 (M≤2) determines the data block size read from source images, wherein, bracket [] represents floor operation, src_hsize and src_vsize is respectively horizontal size and the vertical dimension of source images, N and M is respectively horizontal direction sequence number and the vertical direction sequence number of the data block of reading, the horizontal size of k_hsize and k_vsize each data block after being respectively interpolation and vertical dimension, des_hsize and des_vsize is respectively horizontal size and the vertical dimension of image after interpolation.
8. image scaling, a coded system, is characterized in that, described system comprises:
Parameter determination unit, for obtaining source images size, and after specifying interpolation image size and specify the size of each data block after interpolation;
Data block sequence number determining unit, for determining the sequence number of the current data block from source images reading;
Data block determining unit, determines the data block read from source images for the size of each data block after the size of image after the size according to source images, interpolation, interpolation and described data block sequence number;
Interpolation process unit, for carrying out interpolation processing to the data block read; When interpolation processing is performed to the data block read, be all by left side block Horizontal interpolation at the end of interpolation coefficient, initial interpolation coefficient when starting as right side block Horizontal interpolation, and the interpolation coefficient at the end of upper block vertical interpolation, then initial interpolation coefficient when starting as lower block vertical interpolation;
Coding processing unit, carries out coded treatment for the data block after terminating interpolation processing.
9. system as claimed in claim 8, it is characterized in that, described data block determining unit comprises:
Establishment of coordinate system module, for the most top left corner pixel point of source images for initial point, the right is x-axis positive direction, below for y-axis positive direction sets up rectangular coordinate system;
Data block sequence number determination module, for determining horizontal direction sequence number and the vertical direction sequence number of the data block of current reading according to described rectangular coordinate system.
10. system as claimed in claim 8, it is characterized in that, described data block determining unit comprises:
The first point coordinates determination module of data block is 0 for the starting point abscissa that to determine from source images read level direction sequence number be the data block of 1, and from source images, to read vertical direction sequence number be the starting point ordinate of the data block of 1 is also 0;
First size determination module of data block, for when read level direction sequence number is the data block of 1, according to formula
x_cnt=[(src_hsize-1)×N×k_hsize÷(des_hsize-1)]
-[(src_hsize-1)×(N-1)×k_hsize÷(des_hsize-1)]+1(N=1)
And formula t_hsize=x_cnt+1 (N=1) determines the horizontal size of the data block read from source images, when reading vertical direction sequence number is the data block of 1, according to formula
y_cnt=[(src_vsize-1)×M×k_vsize÷(des_vsize-1)]
-[(src_vsize-1)×(M-1)×k_vsize÷(des_vsize-1)]+1(M=1)
And formula t_vsize=y_cnt+1 (M=1) determines the vertical dimension of the data block read from source images, wherein, bracket [] represents floor operation, src_hsize and src_vsize is respectively horizontal size and the vertical dimension of source images, N and M is respectively horizontal direction sequence number and the vertical direction sequence number of the data block of reading, the horizontal size of k_hsize and k_vsize each data block after being respectively interpolation and vertical dimension, des_hsize and des_vsize is respectively horizontal size and the vertical dimension of image after interpolation;
Second starting point coordinate determination module of data block, for when read level direction sequence number is not 1 and vertical direction sequence number is not the data block of 1, the starting point coordinate according to following formula determination data block:
x_cnt=[(src_hsize-1)×N×k_hsize÷(des_hsize-1)]
-[(src_hsize-1)×(N-1)×k_hsize÷(des_hsize-1)]+1(N=1)
x_cnt=[(src_hsize-1)×N×k_hsize÷(des_hsize-1)]
-[(src_hsize-1)×(N-1)×k_hsize÷(des_hsize-1)](N≥2)
y_cnt=[(src_vsize-1)×M×k_vsize÷(des_vsize-1)]
-[(src_vsize-1)×(M-1)×k_vsize÷(des_vsize-1)]+1(M=1)
y_cnt=[(src_vsize-1)×M×k_vsize÷(des_vsize-1)]
-[(src_vsize-1)×(M-1)×k_vsize÷(des_vsize-1)](M≥2)
src _ x _ position = Σ i = 1 N - 1 x _ cnt i - 1 , src _ y _ position = Σ i = 1 M - 1 y _ cnt i - 1 , Wherein, bracket [] represents floor operation, src_hsize and src_vsize is respectively horizontal size and the vertical dimension of source images, N and M is respectively horizontal direction sequence number and the vertical direction sequence number of the data block of reading, the horizontal size of k_hsize and k_vsize each data block after being respectively interpolation and vertical dimension, des_hsize and des_vsize is respectively horizontal size and the vertical dimension of image after interpolation, x_cnt ifor x_cnt value when horizontal direction sequence number is i, y_cnt ifor y_cnt value when vertical direction sequence number is i, src_x_position and src_y_position represents starting point abscissa and the starting point ordinate of the data block read from source images respectively;
Data block second size determination module, for when read level direction sequence number is not 1 and vertical direction sequence number is not the data block of 1, horizontal size and vertical dimension according to following formula determination data block:
x_cnt=[(src_hsize-1)×N×k_hsize÷(des_hsize-1)]
-[(src_hsize-1)×(N-1)×k_hsize÷(des_hsize-1)](N≥2)
y_cnt=[(src_vsize-1)×M×k_vsize÷(des_vsize-1)]
-[(src_vsize-1)×(M-1)×k_vsize÷(des_vsize-1)](M≥2)
T_hsize=x_cnt+2 (N≤2) and t_vsize=y_cnt+2 (M≤2), wherein, bracket [] represents floor operation, src_hsize and src_vsize is respectively horizontal size and the vertical dimension of source images, N and M is respectively horizontal direction sequence number and the vertical direction sequence number of the data block of reading, the horizontal size of k_hsize and k_vsize each data block after being respectively interpolation and vertical dimension, des_hsize and des_vsize is respectively horizontal size and the vertical dimension of image after interpolation.
CN201110206576.XA 2011-07-22 2011-07-22 A kind of image scaling, coding method and system Active CN102891998B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110206576.XA CN102891998B (en) 2011-07-22 2011-07-22 A kind of image scaling, coding method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110206576.XA CN102891998B (en) 2011-07-22 2011-07-22 A kind of image scaling, coding method and system

Publications (2)

Publication Number Publication Date
CN102891998A CN102891998A (en) 2013-01-23
CN102891998B true CN102891998B (en) 2015-08-05

Family

ID=47535343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110206576.XA Active CN102891998B (en) 2011-07-22 2011-07-22 A kind of image scaling, coding method and system

Country Status (1)

Country Link
CN (1) CN102891998B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111093045B (en) * 2019-12-10 2021-03-26 北京佳讯飞鸿电气股份有限公司 Method and device for scaling video sequence resolution

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW563343B (en) * 2002-03-15 2003-11-21 Via Tech Inc Image frame scaling method
CN101359465A (en) * 2008-09-19 2009-02-04 成都九洲电子信息系统有限责任公司 Method for improving image scaling quality
CN101950523A (en) * 2010-09-21 2011-01-19 上海大学 Adjustable rectangular window image scaling method and device
CN102065253A (en) * 2009-11-17 2011-05-18 无锡华润矽科微电子有限公司 Software and hardware coordinated image horizontal zooming method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090189919A1 (en) * 2008-01-28 2009-07-30 Chou-Liang Tsai Image scaling method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW563343B (en) * 2002-03-15 2003-11-21 Via Tech Inc Image frame scaling method
CN101359465A (en) * 2008-09-19 2009-02-04 成都九洲电子信息系统有限责任公司 Method for improving image scaling quality
CN102065253A (en) * 2009-11-17 2011-05-18 无锡华润矽科微电子有限公司 Software and hardware coordinated image horizontal zooming method and device
CN101950523A (en) * 2010-09-21 2011-01-19 上海大学 Adjustable rectangular window image scaling method and device

Also Published As

Publication number Publication date
CN102891998A (en) 2013-01-23

Similar Documents

Publication Publication Date Title
EP3806043A1 (en) Point cloud encoding and decoding method and codec
US20080080778A1 (en) Image data compression method and apparatuses, image display method and apparatuses
CN105354809B (en) A kind of pre-distortion method and device based on output image location of pixels index
US20070245021A1 (en) Server apparatus and server control method in computer system
US9607407B2 (en) Variable-width differential memory compression
CN103067715A (en) Encoding and decoding methods and encoding and decoding device of range image
JP2008271046A5 (en)
CN101261740A (en) An image storage and processing method
CN101794566B (en) Method and related device for determining font data of character to be displayed in mobile terminal
CN102271251B (en) Lossless image compression method
CN102891998B (en) A kind of image scaling, coding method and system
CN102073987A (en) Method and system for converting YUV420 image into RGB565 image
JP2012208729A (en) Form managing system, form image managing method, and program
CN113160321B (en) Geometric mapping method and device for real-time image sequence
CN107172425B (en) Thumbnail generation method and device and terminal equipment
EP2838272A1 (en) Television cursor moving method and device
CN101389030B (en) Encoding method, system and video encoder
CN1231101A (en) Image mapping device and method, and image generating device and method
CN107124613A (en) The method that Doppler radar Equations of The Second Kind product data are carried out with recoding processing
CN101005619A (en) Loop circuit filtering method
CN108235028A (en) Video image decoding method and terminal based on hevc agreements
CN116527908B (en) Motion field estimation method, motion field estimation device, computer device and storage medium
CN106791881A (en) A kind of filtering method and device
CN110050458B (en) Method of concurrently performing image compression and thumbnail generation and apparatus therefor
CN107341136A (en) Generation method, generating means and the storage medium of sequence index number

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Image zooming and encoding method and system

Effective date of registration: 20171102

Granted publication date: 20150805

Pledgee: China Co truction Bank Corp Guangzhou economic and Technological Development Zone sub branch

Pledgor: Anyka (Guangzhou) Microelectronics Technology Co., Ltd.

Registration number: 2017990001008

PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20181227

Granted publication date: 20150805

Pledgee: China Co truction Bank Corp Guangzhou economic and Technological Development Zone sub branch

Pledgor: Anyka (Guangzhou) Microelectronics Technology Co., Ltd.

Registration number: 2017990001008

PC01 Cancellation of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Image zooming and encoding method and system

Effective date of registration: 20190130

Granted publication date: 20150805

Pledgee: China Co truction Bank Corp Guangzhou economic and Technological Development Zone sub branch

Pledgor: Anyka (Guangzhou) Microelectronics Technology Co., Ltd.

Registration number: 2019440000051

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20200320

Granted publication date: 20150805

Pledgee: China Co truction Bank Corp Guangzhou economic and Technological Development Zone sub branch

Pledgor: ANYKA (GUANGZHOU) MICROELECTRONICS TECHNOLOGY Co.,Ltd.

Registration number: 2019440000051

CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 3 / F, C1 area, innovation building, 182 science Avenue, Science City, Guangzhou, Guangdong 510663

Patentee after: Guangzhou Ankai Microelectronics Co.,Ltd.

Address before: 3 / F, C1 area, innovation building, 182 science Avenue, Science City, Guangzhou, Guangdong 510663

Patentee before: ANYKA (GUANGZHOU) MICROELECTRONICS TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 510555 No. 107 Bowen Road, Huangpu District, Guangzhou, Guangdong

Patentee after: Guangzhou Ankai Microelectronics Co., Ltd

Address before: 510663 floor 3, zone C1, innovation building, No. 182, science Avenue, Science City, Guangzhou, Guangdong

Patentee before: Guangzhou Ankai Microelectronics Co., Ltd