CN107135382A - A kind of quick Zoom method of image based on YUV signal processing - Google Patents

A kind of quick Zoom method of image based on YUV signal processing Download PDF

Info

Publication number
CN107135382A
CN107135382A CN201710144375.9A CN201710144375A CN107135382A CN 107135382 A CN107135382 A CN 107135382A CN 201710144375 A CN201710144375 A CN 201710144375A CN 107135382 A CN107135382 A CN 107135382A
Authority
CN
China
Prior art keywords
value
point
sampled point
signal processing
coordinate
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.)
Pending
Application number
CN201710144375.9A
Other languages
Chinese (zh)
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 Baer Technology Group Ltd By Share Ltd
Original Assignee
Guangdong Baer Technology Group Ltd By Share 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 Guangdong Baer Technology Group Ltd By Share Ltd filed Critical Guangdong Baer Technology Group Ltd By Share Ltd
Priority to CN201710144375.9A priority Critical patent/CN107135382A/en
Publication of CN107135382A publication Critical patent/CN107135382A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • 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)
  • Editing Of Facsimile Originals (AREA)

Abstract

The invention discloses a kind of quick Zoom method of image based on YUV signal processing, comprise the following steps:Target image pixel position is set up to the mapping relations of source image pixels point position;The coordinate value that source images are up-sampled with point is handled, and respectively obtains the fractional part and integer part of sampled point transverse axis coordinate value and ordinate of orthogonal axes value;Obtain the YUV values of source images up-sampling point four, periphery point;The Y value of four points of fractional part and integer part and periphery based on sampled point transverse axis coordinate value and ordinate of orthogonal axes value, the Y value of sampled point is calculated by quadratic linear interpolation algorithm;And fractional part and integer part and U, V value of four, periphery point based on sampled point transverse axis coordinate value and ordinate of orthogonal axes value, the U values and V values of sampled point are calculated by nearest sampled point algorithm;The above method combines the fast advantage of nearest sampled point algorithm sample rate and quadratic linear interpolation sampling and retains preferable advantage to picture quality.

Description

A kind of quick Zoom method of image based on YUV signal processing
Technical field
Quickly scaled the present invention relates to technical field of image processing, more particularly to a kind of image based on YUV signal processing Method.
Background technology
YUV is the color space that color is described by brightness-aberration, and luminance signal is frequently referred to as Y, and carrier chrominance signal is It is made up of two mutual independent signals.Different with form depending on color system, two kinds of carrier chrominance signals are frequently referred to as UV or CbCr, Cr reflects the difference between input signal RED sector and luminance signals value.And Cb reflections be input signal blue portion with Difference between luminance signals value.
YUV is mainly used in optimizing the transmission of colour-video signal, makes its compatible old-fashioned black-and-white television backward.With rgb video Signal transmission is compared, and its biggest advantage is need to only to take few frequency range that (RGB requires three independent vision signals simultaneously Transmission), it is separation using the luminance signal Y and carrier chrominance signal U, V that the importance of YUV color spaces is it.If only Y believes Number component is without U, V component, then the image so represented is exactly black and white gray level image.Color TV is using yuv space just It is to solve the compatibling problem of colour television set and black and white television set with luminance signal Y, black and white television set is also received coloured silk Color TV signal.
No matter carrying out image data acquiring to camera still decodes render video, it is directed to YUV color formats Processing, in the case of source YUV sizes are incongruent with target yuv format, it is necessary to which direct scaling processing is carried out to yuv data. Particularly in embedded system on various computer languages, image contracting is kept again with greater need for efficient scaling sampling algorithm Put quality.
It is common scaling algorithm have, nearest sampled point (POINT) algorithm, quadratic linear interpolation (LINER) algorithm, three times Interpolation (CUBIC) algorithm etc., wherein POINT sampling efficiencies highest, secondly, CUBIC sampling efficiencies are minimum for LINER samplings.But The effect of POINT samplings is poor, and sawtooth easily occurs in image object edge.The effect that LINER samples and CUBIC samples is preferable, but Sampling efficiency is low.
The content of the invention
In view of this, The embodiment provides a kind of sampling efficiency is high and picture quality is good based on YUV signal The quick Zoom method of image of processing.
Embodiments of the invention provide a kind of quick Zoom method of image based on YUV signal processing, comprise the following steps:
Target image pixel position is set up to the mapping relations of source image pixels point position;
The coordinate value that source images are up-sampled with point is handled, and respectively obtains sampled point transverse axis coordinate value and ordinate of orthogonal axes value Fractional part and integer part;
Obtain the YUV values of source images up-sampling point four, periphery point;
The Y of four points of fractional part and integer part and periphery based on sampled point transverse axis coordinate value and ordinate of orthogonal axes value Value, the Y value of sampled point is calculated by quadratic linear interpolation algorithm;And
U, V of four points of fractional part and integer part and periphery based on sampled point transverse axis coordinate value and ordinate of orthogonal axes value Value, the U values and V values of sampled point are calculated by nearest sampled point algorithm.
Preferably, source images are provided with width src_width, high src_height, and target image is provided with width dst_width, height The sampling step length in transverse axis x directions on dst_height, source imagesIn adopting for longitudinal y directions Sample step-length
Preferably, if the coordinate that origin (0,0) is mapped to the point on source images on target image is (x_start, y_ Start), so as to can obtain the value xm=x_start+x_step*x, the value ym of ordinate of the abscissa of source images up-sampling point =y_start+y_step*y.
Preferably, the integer part m_x=xm_pos > > 8 of sampled point transverse axis coordinate value, fractional part m_u=xm_ Pos&0xff, integer part m_y=ym_pos > > 8, the fractional part m_v=ym_pos&0xff of sampled point ordinate of orthogonal axes value, Fractional part m_u and m_v scope are between 0 to 255.
Preferably, if it is decimal expression symbol that u, which is m_u, v is that m_v is decimal expression symbol, then has u=(float) m_u/ 256, v=(float) m_v/256.
Preferably, four, sampled point periphery point be A, B, C, D, tetra- points of A, B, C, D be respectively sampled point upper left, upper right, Lower-left, the point that the coordinate value of bottom right is integer value, the coordinate of A points is (m_x, m_y), and the coordinate of B points is (m_x+1, m_y), C points Coordinate be (m_x, m_y+1), D point coordinates is (m_x+1, m_y+1), and the Y value of A, B, C, D each point is YA, YB, YC, YD respectively, U values are UA, UB, UC, UD respectively, and V values are VA, VB, VC, VD respectively, are calculated and sampled by modified quadratic linear interpolation algorithm Point P Y value YP=YA* (1-u) * (1-v)+YB*u* (1-v)+YC* (1-u) * v+YD*u*v.
Preferably, the U value UP=UA of sampled point, and V values VP=VA are calculated by nearest sampled point algorithm.
Compared with prior art, image quick Zoom method of the present invention based on YUV signal processing combines nearest The fast advantage of sampled point algorithm sample rate and quadratic linear interpolation sampling retain preferable advantage to picture quality.
Brief description of the drawings
Fig. 1 is the present invention a kind of source images and target image of the quick Zoom method of image based on YUV signal processing One schematic diagram.
Fig. 2 is a partial enlarged drawing of source images in Fig. 1.
Fig. 3 is an a kind of flow chart of the quick Zoom method of image based on YUV signal processing of the present invention.
Embodiment
The invention will be further described with reference to the accompanying drawings and examples.
The invention provides a kind of referring to Fig. 1, quickly being contracted the invention provides a kind of image based on YUV signal processing Method is put, it is used for handling a source images 10 and obtaining a target image 30, and the source images 10 are provided with width src_ Width, high src_height, the target image 30 are provided with width dst_width, high dst_height.
Referring to Fig. 2, the quick Zoom method of image based on YUV signal processing of the present invention comprises the following steps:
Step 201, the position of the pixel of target image 30 is set up to the mapping relations of the pixel position of source images 10.
Target image 30 and source images 10 are respectively positioned in two-dimensional coordinate, and the coordinate of the point in target image 30 is (x, y), should The coordinate that point is mapped to the point in source images 10 is (xm, ym), according to source images 10 and the wide and height of target image 30, is calculated The sampling step length x_step and y_step of transverse axis x directions and longitudinal y directions on source images 10, in the present embodiment, using 0 to 255 integer representation floating number part, integer is then to be multiplied by 256 namely to move to left 8, calculates the sampling in transverse axis x directions and walks It is longIn the sampling step length of longitudinal y directionsThus Can obtain target image 30 point (x, y) be mapped to source images 10 point (xm, ym) relation, if origin on target image 30 The coordinate that (0,0) is mapped to the point on source images 10 is (x_start, y_start), so as to can obtain the up-sampling point of source images 10 P coordinate xm=x_start+x_step*x, ym=y_start+y_step*y.
Step 202, the coordinate value that source images 10 up-sample point P is handled, respectively obtains sampled point P transverse axis coordinate values Xm and ordinate of orthogonal axes value ym fractional part and integer part.
In the present embodiment, the abscissa xm of sampled point integer part is m_x, and fractional part is m_u, sampled point it is vertical Coordinate ym integer part is m_y, and fractional part is m_v, then m_x=xm_pos > > 8, m_u=xm_pos&0xff, m_y= Ym_pos > > 8, m_v=ym_pos&0xff, wherein fractional part m_u and m_v scope is between 0 to 255;If u is m_u For decimal expression symbol, V is that m_v is decimal expression symbol, then has u=(float) m_u/256, v=(float) m_v/256.
Step 203, four, peripheries of the up-sampling point P of source images 10 point A, B, C, D are obtained, tetra- points of A, B, C, D are respectively P points Upper left, upper right, lower-left, the point that the coordinate value of bottom right is integer value, the coordinate of A points is (m_x, m_y), and the coordinate of B points is (m_x+ 1, m_y), the coordinate of C points is (m_x, m_y+1), and D point coordinates is (m_x+1, m_y+1), and obtains the YUV of tetra- points of A, B, C, D Value.
The Y value of A, B, C, D each point is YA, YB, YC, YD respectively, and U values are UA, UB, UC, UD respectively, V values be respectively VA, VB、VC、VD。
Step 204, sampled point P Y value YP=YA* (1- are calculated by modified quadratic linear interpolation (LINER) algorithm U) * (1-v)+YB*u* (1-v)+YC* (1-u) * v+YD*u*v, so as to obtain sampled point P Y value, i.e. grey decision-making.
Above-mentioned sampled point P Y value YP uses integer arithmetic to represent then as YP=(YA* (256-m_u) * (256-m_v)+YB* M_u* (256-m_v)+YC* (256-m_u) * m_v+D*m_u*m_v) > > 16 set tetra- points of A, B, C, D Y value weight coefficient It is w0, w1, w2 and w3 respectively, and w3=m_u*m_v, w2=(256-m_u) * m_v=(m_v < < 8)-w3, w1=m_u* (256-m_v)=(m_u < < 8)-w3, w0=(256-m_u) * (256-m_v)=65536-w1- (m_v < < 8).
Step 205, sampled point P U values and V values is calculated respectively by nearest sampled point (POINT) algorithm.
Sampled point P U values UP=UA, VP=VA.
In the above-mentioned quick Zoom method of image based on YUV signal processing, the Y value to each sampled point P passes through improvement Type quadratic linear interpolation (LINER) algorithm is obtained, and the U values and V values to each sampled point P pass through nearest sampled point (POINT) algorithm is obtained, the above-mentioned method of sampling combine the fast advantage of nearest sampled point (POINT) algorithm sample rate with And quadratic linear interpolation (LINER) sampling retains preferable advantage to picture quality, so as to allow image quickly to scale, and ensures The quality of image.
In the case where not conflicting, the feature in embodiment and embodiment herein-above set forth can be combined with each other.
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent substitution and improvements made etc. should be included in the scope of the protection.

Claims (7)

1. a kind of quick Zoom method of image based on YUV signal processing, it is characterised in that:Comprise the following steps:
Target image pixel position is set up to the mapping relations of source image pixels point position;
The coordinate value that source images up-sample point is handled, the small of sampled point transverse axis coordinate value and ordinate of orthogonal axes value is respectively obtained Number part and integer part;
Obtain the YUV values of source images up-sampling point four, periphery point;
The Y value of four points of fractional part and integer part and periphery based on sampled point transverse axis coordinate value and ordinate of orthogonal axes value, leads to Cross the Y value that quadratic linear interpolation algorithm calculates sampled point;And
U, V value of fractional part and integer part and four, periphery point based on sampled point transverse axis coordinate value and ordinate of orthogonal axes value, The U values and V values of sampled point are calculated by nearest sampled point algorithm.
2. the image quick Zoom method as claimed in claim 1 based on YUV signal processing, it is characterised in that:Source images are provided with width Src_width, high src_height, target image are provided with transverse axis x directions on width dst_width, high dst_height, source images Sampling step lengthIn the sampling step length of longitudinal y directions
3. the image quick Zoom method as claimed in claim 2 based on YUV signal processing, it is characterised in that:If target figure The coordinate for the point being mapped to as upper origin (0,0) on source images is (x_start, y_start), is adopted so as to can obtain on source images The value xm=x_start+x_step*x of the abscissa of sampling point, the value ym=y_start+y_step*y of ordinate.
4. the image quick Zoom method as claimed in claim 3 based on YUV signal processing, it is characterised in that:Sampled point is horizontal The integer part m_x=xm_pos > > 8 of axial coordinate value, fractional part m_u=xm_pos&0xff, sampled point ordinate of orthogonal axes value Integer part m_y=ym_pos > > 8, fractional part m_v=ym_pos&0xff, fractional part m_u and m_v scope are 0 To between 255.
5. the image quick Zoom method as claimed in claim 4 based on YUV signal processing, it is characterised in that:If u is m_u For decimal expression symbol, v is that m_v is decimal expression symbol, then has u=(float) m_u/256, v=(float) m_v/256.
6. the image quick Zoom method as claimed in claim 5 based on YUV signal processing, it is characterised in that:Sampled point week Four, side point be A, B, C, D, tetra- points of A, B, C, D be respectively sampled point upper left, upper right, lower-left, bottom right coordinate value be integer The point of value, the coordinate of A points is (m_x, m_y), and the coordinate of B points is (m_x+1, m_y), and the coordinate of C points is (m_x, m_y+1), D points Coordinate is (m_x+1, m_y+1), and the Y value of A, B, C, D each point is YA, YB, YC, YD respectively, and U values are UA, UB, UC, UD, V respectively Value is VA, VB, VC, VD respectively, and sampled point P Y value YP=YA* (1-u) * is calculated by modified quadratic linear interpolation algorithm (1-v)+YB*u*(1-v)+YC*(1-u)*v+YD*u*v。
7. the image quick Zoom method as claimed in claim 6 based on YUV signal processing, it is characterised in that:By nearest Neighbouring sampled point algorithm calculates the U value UP=UA of sampled point, and V values VP=VA.
CN201710144375.9A 2017-03-02 2017-03-02 A kind of quick Zoom method of image based on YUV signal processing Pending CN107135382A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710144375.9A CN107135382A (en) 2017-03-02 2017-03-02 A kind of quick Zoom method of image based on YUV signal processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710144375.9A CN107135382A (en) 2017-03-02 2017-03-02 A kind of quick Zoom method of image based on YUV signal processing

Publications (1)

Publication Number Publication Date
CN107135382A true CN107135382A (en) 2017-09-05

Family

ID=59720670

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710144375.9A Pending CN107135382A (en) 2017-03-02 2017-03-02 A kind of quick Zoom method of image based on YUV signal processing

Country Status (1)

Country Link
CN (1) CN107135382A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111666811A (en) * 2020-04-22 2020-09-15 北京联合大学 Method and system for extracting traffic sign area in traffic scene image

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004070723A (en) * 2002-08-07 2004-03-04 Canon Inc Color conversion processing method and device
US20040119886A1 (en) * 2000-01-07 2004-06-24 Intel Corporation Method and apparatus for implementing 4:2:0 to 4:2:2 and 4:2:2 to 4:2:0 color space conversion
CN101163252A (en) * 2007-11-27 2008-04-16 中国科学院计算技术研究所 Zoom method of multimedia video image
CN101374212A (en) * 2008-08-15 2009-02-25 上海茂碧信息科技有限公司 Method for implementing image interpolation arithmetic using memory structure with hierarchical speed
CN101795350A (en) * 2010-04-07 2010-08-04 浙江大学 Non-linear image double amplifying method based on relevance detection
CN102088614A (en) * 2010-11-23 2011-06-08 北京邮电大学 Method and device for magnifying video image
CN102793565A (en) * 2012-08-16 2012-11-28 无锡祥生医学影像有限责任公司 Image local amplification method and device for touch screen ultrasonic diagnostic apparatus

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040119886A1 (en) * 2000-01-07 2004-06-24 Intel Corporation Method and apparatus for implementing 4:2:0 to 4:2:2 and 4:2:2 to 4:2:0 color space conversion
JP2004070723A (en) * 2002-08-07 2004-03-04 Canon Inc Color conversion processing method and device
CN101163252A (en) * 2007-11-27 2008-04-16 中国科学院计算技术研究所 Zoom method of multimedia video image
CN101374212A (en) * 2008-08-15 2009-02-25 上海茂碧信息科技有限公司 Method for implementing image interpolation arithmetic using memory structure with hierarchical speed
CN101795350A (en) * 2010-04-07 2010-08-04 浙江大学 Non-linear image double amplifying method based on relevance detection
CN102088614A (en) * 2010-11-23 2011-06-08 北京邮电大学 Method and device for magnifying video image
CN102793565A (en) * 2012-08-16 2012-11-28 无锡祥生医学影像有限责任公司 Image local amplification method and device for touch screen ultrasonic diagnostic apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111666811A (en) * 2020-04-22 2020-09-15 北京联合大学 Method and system for extracting traffic sign area in traffic scene image
CN111666811B (en) * 2020-04-22 2023-08-15 北京联合大学 Method and system for extracting traffic sign board area in traffic scene image

Similar Documents

Publication Publication Date Title
US7920146B2 (en) User interface providing device
KR100935172B1 (en) Magnification and pinching of two-dimensional images
US7652717B2 (en) White balance correction in digital camera images
KR101335900B1 (en) Variable scaling of image data for aspect ratio conversion
WO2015032185A1 (en) Image super-resolution reconfiguration system and method
EP3211892A1 (en) Method and device for image display based on metadata, and recording medium therefor
JP2011216083A (en) Method for processing digital image, method for zooming digital input image, and method for smoothing digital input image
JP2009038498A (en) Unit and method for processing image
KR101450782B1 (en) Image processing device and program
US10943340B2 (en) Blending images
US6297801B1 (en) Edge-adaptive chroma up-conversion
WO2010089836A1 (en) Image processing device
TWI544785B (en) Image downsampling apparatus and method
US8861850B2 (en) Digital image color correction
JP2018196096A (en) Image processing system, image processing method and program
US20180139360A1 (en) Method and device for processing color image data representing colors of a color gamut
CN107135382A (en) A kind of quick Zoom method of image based on YUV signal processing
US20180146214A1 (en) Elimination of artifacts from lossy encoding of digital images by color channel expansion
CN106408617A (en) Interactive single image material acquiring system based on YUV color space and method
US7885487B2 (en) Method and apparatus for efficiently enlarging image by using edge signal component
JP2007142494A (en) Image processing apparatus and method, and program
TW202021330A (en) Image zooming method and device
EP1704556B1 (en) Method and system to combine a digital graphics object and a digital picture
KR100846798B1 (en) Method and system for displaying pixilated input image
US20070177171A1 (en) Inking on photographs

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170905