WO2010034202A1 - 图像缩放方法及装置 - Google Patents

图像缩放方法及装置 Download PDF

Info

Publication number
WO2010034202A1
WO2010034202A1 PCT/CN2009/072093 CN2009072093W WO2010034202A1 WO 2010034202 A1 WO2010034202 A1 WO 2010034202A1 CN 2009072093 W CN2009072093 W CN 2009072093W WO 2010034202 A1 WO2010034202 A1 WO 2010034202A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
scaling
source
source image
target
Prior art date
Application number
PCT/CN2009/072093
Other languages
English (en)
French (fr)
Inventor
刘源
王静
苏红宏
Original Assignee
华为终端有限公司
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 华为终端有限公司 filed Critical 华为终端有限公司
Priority to EP09815572.4A priority Critical patent/EP2334058B1/en
Publication of WO2010034202A1 publication Critical patent/WO2010034202A1/zh
Priority to US13/073,695 priority patent/US8649635B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440263Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA
    • H04N21/440272Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA for performing aspect ratio conversion
    • 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/0117Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level involving conversion of the spatial resolution of the incoming video signal
    • H04N7/0122Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level involving conversion of the spatial resolution of the incoming video signal the input and the output signals having different aspect ratios

Definitions

  • the present invention relates to the field of image processing technologies, and in particular, to an image scaling method and apparatus. Background technique
  • Image scaling is a commonly used image processing technology.
  • the scaling between different proportions of images has always been a technical difficulty. This is because the aspect ratio between the source image and the target image is inconsistent.
  • the distortion of the image is caused, especially in the case where the difference in the aspect ratio between the source image and the target image is large, and the distortion of the image is more conspicuous.
  • a typical application scenario for image scaling is an adaptation problem between an aspect ratio of 4:3 and an aspect ratio of 16:9 images.
  • Current video communication systems need to be compatible with standard-definition images with an aspect ratio of 4:3 (such as 4CIF) and new high-definition images with 16:9 aspect ratio (such as 720p and 1080p); while traditional CRT (Cthode Ray) Tube, cathode ray tube) TV basically adopts 4:3 display mode, the latest high-definition LCD (Liquid Crys ta l Di splay, LCD) TV generally adopts 16:9 display mode. Therefore, there is a problem with how the SD video with an aspect ratio of 4:3 is scaled for presentation on a HDTV with an aspect ratio of 16:9, and vice versa.
  • the image is scaled using a linear scaling method. Although the method is simple, the distortion between the images is more serious. Image scaling using the edge cropping method does not cause image distortion, but may cause the main subject of the image to be lost. Image is filled with black edges on the edges of the image Zooming causes the scaled image to become smaller than the source image and cannot fill the entire display area. In addition, the filled black edges can cause some interference to the viewer.
  • the horizontal scaling algorithm is used for image scaling. Since the main subject of the image is often concentrated in the middle, after the image is scaled by this method, the main subject area of the image is less deformed and the subjective effect is better.
  • Embodiments of the present invention provide an image scaling method and apparatus that reduces distortion between images during image scaling.
  • An image scaling method includes the following steps:
  • the source image is scaled to a target image according to a distribution direction of a main photographic subject in the source image by a nonlinear scaling method, wherein a scaling direction of the nonlinear scaling method is perpendicular to a distribution direction of a main photographic subject in the source image.
  • An image scaling device includes:
  • a distribution direction determining unit configured to determine a distribution direction of a main photographic subject in the source image
  • an image scaling unit configured to scale the source image to a non-linear scaling method according to a distribution direction of a main photographic subject in the source image a target image, wherein a zoom direction of the nonlinear zoom method is perpendicular to a distribution direction of a main subject in the source image.
  • the image scaling method and apparatus determines the distribution direction of the main subject in the image, and scales the source image to the target image according to the distribution direction of the main subject in the source image by using an appropriate nonlinear scaling method. Therefore, the method and apparatus according to the embodiments of the present invention can ensure that the transformed target image is not deformed in an important area sensitive to the human eye, and the image zooming process is reduced. The degree of distortion in the middle.
  • FIG. 1 is a flowchart of an image scaling method according to an embodiment of the present invention.
  • FIG. 2 is a schematic flow chart of a method for nonlinear scaling in a vertical direction in an image scaling method according to Embodiment 2 of the present invention
  • FIG. 3 is a schematic flow chart of a method for nonlinear scaling in a vertical direction in an image scaling method according to Embodiment 3 of the present invention
  • FIG. 4 is a schematic diagram of partitioning a source image and a target image in an image scaling method according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram showing a transformation relationship between a source image and a target image pixel position at different heights according to Embodiment 4 of the present invention.
  • FIG. 6a and 6b are schematic diagrams of a source image and a target image after being scaled by an image
  • FIG. 7 is a schematic diagram of partitioning a source image and a target image in an image scaling method according to an embodiment of the present invention
  • FIG. 8 is a schematic diagram of an image zooming apparatus according to Embodiment 6 of the present invention.
  • FIG. 9 is a structural diagram of a distribution direction determining unit in an image scaling apparatus according to Embodiment 6 of the present invention
  • FIG. 10 is a structural diagram of an image scaling unit in an image scaling apparatus according to Embodiment 6 of the present invention. detailed description
  • the first embodiment of the present invention proposes an image scaling method.
  • the image scaling method according to Embodiment 1 of the present invention includes:
  • Step 11 Determine a distribution direction of the main subject in the source image.
  • the method of determining a distribution direction of a main photographic subject in the source image may include: determining, etc., by detecting the source image.
  • the distribution direction of the main subject in the source image may be a direction with a large symmetry, or a direction with a relatively uniform distribution, or a direction with a rich texture.
  • the process of detecting the source image may use a face detection method, an edge detection method, an entropy coding method, or the like.
  • the face detection method it can be considered that the person in the scene is the main subject, so that the distribution of the face in the image can be detected before zooming, thereby knowing the distribution direction and symmetry of the corresponding person, thereby determining the zoom.
  • Face detection can take advantage of existing mature algorithms.
  • the edge detection method it can be considered that the human eye is sensitive to the edge-rich texture area (the main subject), but not to the flat area lacking the texture (non-primary subject), so Sobel (Sobel operator) can be utilized.
  • Edge detection algorithms such as Laplacian (Laplacian) calculate the edge distribution of the scene to determine the distribution of the main subject of the scene.
  • the entropy coding method may be used to detect a direction in which the main subject in the source image is uniformly distributed, thereby determining the distribution of the main subject of the scene.
  • step 12 according to the distribution direction of the main subject in the source image, the source image is scaled to a target image by using a nonlinear scaling method, wherein the zoom direction of the nonlinear zoom method is perpendicular to the distribution direction of the main subject in the source image.
  • the zoom direction of the image includes horizontal scaling, vertical scaling, and so on.
  • no matter which scaling method is used for image scaling it is only necessary to ensure that the zoom direction of the image and the distribution direction of the main subject are vertical.
  • the zoom is performed using the nonlinear scaling method in the vertical direction.
  • the image scaling method of the first embodiment of the present invention determines the image by detecting the image content.
  • the distribution direction of the main subject, and the source image is scaled to the target image using an appropriate nonlinear scaling method according to the distribution direction of the main subject in the source image. Therefore, the method according to the embodiment of the invention can ensure that the transformed target image is not deformed in an important area sensitive to the human eye, and the distortion in the image scaling process is reduced.
  • the method for performing image scaling by using the vertical direction nonlinear scaling method in the second embodiment of the present invention includes the following steps:
  • Step 21 Divide the source image into at least two partitions according to the zoom direction. Then the non-linear scaling for the vertical direction is specifically as follows: The source image is divided into at least two partitions in the vertical direction.
  • the main subjects such as people, objects, etc. in the shooting scene are distributed horizontally.
  • the movement of most people or objects with a wide range of changes is also horizontal, such as people walking around the scene.
  • the distribution of the main subject and the change of the content in the vertical direction are relatively small, and the symmetry distribution of the image content in the horizontal direction is much larger than the symmetry distribution in the vertical direction.
  • the existing non-linear scaling method is to scale the image in the horizontal direction, which will produce a relatively obvious deformation in the horizontal direction, so it is a better way to perform nonlinear scaling in the vertical direction.
  • the nonlinear scaling methods in the horizontal direction are basically symmetrical.
  • the embodiment of the present invention proposes to perform image scaling by using an asymmetric scaling method based on nonlinear scaling in the vertical direction. This is because in a general scene, the importance of distributing content in the vertical direction of the image is different. For indoor scenes, people and important objects tend to be concentrated in the middle and lower parts of the image, while some non-primary subjects are often distributed in the upper part of the image. From the viewer's point of view, the viewer is often sensitive to the main subject, and it should be ensured that the deformation of this part is as small as possible during zooming, while the area above the image is usually less important and allows for greater distortion.
  • the source image is divided into at least two partitions in the vertical direction.
  • the height of each partition can be arbitrarily specified according to needs, or can be determined according to the percentage of the total height of the source image occupied by each region.
  • the height of each partition may be the same or different. For example, taking a source image with an aspect ratio of 4:3 as an example, it can be divided into upper, middle, and lower partitions, and the height of each partition can be 30%, 50% of the total height of the source image, respectively. 20%.
  • Step 22 Set different scaling ratios for each partition in the source image.
  • the zoom ratio can be set for each partition according to the main subject in the source image and the partition where the non-main subject is located.
  • the zoom ratio can be set relatively small, and the partition containing a small portion of the main subject can be set to a relatively large scale.
  • the process of setting the zoom ratio can be done by artificial setting or by empirical value.
  • the scaling ratio of the middle and lower partitions may be set to 1 and the scaling of the upper partition may be set to 0.5.
  • each pixel in the source image can be viewed as an area, so each pixel can be assigned a different scaling.
  • Step 23 Convert pixels in each partition of the source image into a target image according to a corresponding scaling ratio.
  • the mapping between the pixels in the source image and the pixels in the target image is mainly established, thereby selecting effective image data for the target image.
  • the specific application process taking the reverse mapping method as an example, in the process of transforming, in the corresponding partition of the source image, one or more sources are found in the source image for each target pixel in the target image. a pixel, and then determining a coordinate position and a value of the target pixel in the source image according to coordinate positions and values of the one or more source pixels.
  • the difference filter algorithm can be used to calculate the value of the target pixel, such as bilinear difference filter.
  • the image is scaled by using an asymmetric scaling method based on the nonlinear scaling in the vertical direction. Therefore, the method described in the second embodiment of the present invention can not only ensure the transformation.
  • the target image is not deformed in an important area sensitive to the human eye, which reduces the distortion in the image zooming process, and also obtains a better image scaling effect.
  • the third embodiment of the present invention is based on the image scaling method described in the second embodiment.
  • the method according to the third embodiment of the present invention is further Can include:
  • Step 31 The target image is divided into at least two partitions corresponding to the source image.
  • the width and height of the target image can be calculated from the source image.
  • the target image when the target image is partitioned, it can be performed in the same manner as the source image partitioning method. For example, when the source image is partitioned, it is divided into upper, middle, and lower partitions. The height of each partition is 30%, 50%, and 20% of the total height, respectively.
  • partitioning the target image The height of the target image, the target image is divided into three regions, and the height of each partition in the target image is 20%, 60%, 20% of the total height of the target image, respectively.
  • the vertical direction non-linear image scaling method according to the second embodiment and the third embodiment of the present invention, according to the current image, the main shooting objects are generally distributed in the middle and lower sides of the image, and the source image is divided according to the vertical method. For at least two partitions, and set a different scaling for each partition, then transform the source image into the target image according to the scaling.
  • the method according to the second and third embodiments of the present invention can ensure the transformation after considering the distribution of the main photographic subject in the image and determining the partition of the source image and the corresponding scaling according to the distribution of the main photographic subject.
  • the target image is not deformed in an important area sensitive to the human eye, which reduces the distortion in the image zooming process.
  • the following is an image with an aspect ratio of 4:3 as the source image and an image with an aspect ratio of 16:9. Taking an image as an example, an image scaling method according to an embodiment of the present invention will be described.
  • the source image is detected to determine that the main subject in the source image is distributed in the vertical direction, so the following operations are performed.
  • the scaled target image has the same width and the height is H'.
  • the target image is divided into three partitions, the three partitions are respectively from top to bottom, and the heights of the sum are respectively , H 2 ' and H; , satisfied
  • Step 42 Perform scaling processing on each partition in the source image.
  • the inverse mapping method is used to find one or more source pixels corresponding to the target pixel in the target image in the target image, and the coordinate position and value of the target pixel in the target image are determined according to the coordinate position and value of the source pixel. .
  • the corresponding source pixel of the target pixel in the target image can be determined, and the coordinate position of the corresponding source pixel can be obtained correspondingly, thereby determining that the target image belongs to the target.
  • Valid image data for the image can be determined, and the coordinate position of the corresponding source pixel can be obtained correspondingly, thereby determining that the target image belongs to the target.
  • the transformation relationship between the source image and the target image pixel position at different heights is shown.
  • the scaling of the pixels in the same partition is linear, and the scaling of the different partitions changes, so the scaling of the overall image is non-linear.
  • the transformation relationship is presented as a polyline, and for the extreme case where each pixel is treated as a partition and a scaling is specified, the transformation relationship appears as a continuous curve.
  • Step 43 Perform data transformation processing on the transformed target image, for example, performing filtering or mean smoothing processing on the target image.
  • the interpolation image filtering algorithm is needed to process the target image, such as bilinear interpolation algorithm, cubic convolution method, and the like.
  • bilinear interpolation algorithm the linear interpolation algorithm is briefly introduced: The values of the four neighbors around a origin are linearly interpolated in two directions to obtain the value of the point to be sampled, that is, according to the distance between the point to be sampled and the adjacent point. The weight value calculates the value of the point to be sampled.
  • a fractional map position can be decomposed into an integer part and a fractional part in the interval [0,1), which is an integer part of the pixel, which is a fractional part, and M, ve [0, l). Then pixel / ( + w, y + v) The value can be determined from the value of 4 pixels around it, and the formula is as follows: f(i + M,7 + v) - (l - u)( ⁇ - v)f(i, j) + (1 - u )vf(i, 7 + l) + w(l - v)f(i + 1, j) + uvf(i + 1,7 + 1) . (6)
  • interpolation can also be performed using the cubic convolution method, which is an improvement of the bilinear interpolation method, taking into account not only the influence of the gray values of the four direct neighbors, but also the neighbors.
  • the influence of the rate of change of the gray value between the points utilizes the pixel values in the larger neighborhood around the point to be sampled for cubic interpolation.
  • the principle is the same as that in the prior art, and details are not described herein again.
  • Fig. 6a is a source image having an aspect ratio of 4:3, and Fig. 6b is a view showing an effect of asymmetrically nonlinearly scaling the source image in the vertical direction by the method according to the embodiment of the present invention.
  • the main subject of the image is distributed in the middle and lower parts of the miscellaneous image, that is, the position where the rectangle and the circle are located.
  • the interpolation algorithm uses a cubic convolution method. Since the main subject of the source image is concentrated in the middle and lower regions of the image and distributed horizontally, the scaling of the upper region is larger when zooming, while the scaling of the middle and lower regions is smaller, close to 1.
  • Fig. 6a and Fig. 6b it can be seen that in the scaled image, the sensitive area of the human eye - the main subject in the middle and the lower part of the image is less deformed, and the deformation of the upper non-main subject is larger.
  • the procedure for scaling an image having an aspect ratio of 16:9 to an image having an aspect ratio of 4:3 is the same as that described in the fourth embodiment.
  • the difference is that, in this case, the source image is an image having an aspect ratio of 16:9, and the target image is an image having an aspect ratio of 4:3.
  • the image scaling method according to Embodiment 4 of the present invention since the distribution of the main photographic subject in the image is taken into consideration, and the partition of the source image and the corresponding scaling ratio are determined according to the distribution of the main photographic subject, it can be ensured.
  • the transformed target image is not deformed in the area where the main subject is located, which reduces the distortion in the image zooming process, and the subjective effect is better.
  • Embodiment 5 of the present invention includes the following steps: Step 51: Divide the source image into three partitions in a direction of 45 degrees from the horizontal direction, which are upper, middle, and lower partitions respectively. Suppose that the source image is divided into three partitions from top to bottom, from top left to bottom right, respectively, ?1 2 and ?1 3 . Accordingly, the target image is divided into three partitions from the upper left to the lower right in a direction of 45 degrees from the horizontal direction, and the three partitions are ' 2 and 3 ⁇ 4 from top to bottom, respectively.
  • Step 52 Perform scaling processing on each partition in the source image.
  • the inverse mapping method is used to find one or more source pixels corresponding to the target pixel in the target image in the target image, and the coordinate position and value of the target pixel in the target image are determined according to the coordinate position and value of the source pixel. .
  • This step can be implemented according to the method described in Embodiment 4, and details are not described herein again.
  • Step 53 Perform data transformation processing on the transformed target image, for example, performing filtering or mean smoothing processing on the target image.
  • the pixel position of the target image mapped to the source image is often not an integer but a decimal, so an interpolation filtering algorithm is needed to process the target image, such as a bilinear interpolation algorithm, cube. Convolution method, etc.
  • the image scaling method of the fifth embodiment of the present invention determines the distribution direction of the main subject in the image by detecting the image content, and adopts the appropriate non-original source image according to the distribution direction of the main subject in the source image.
  • the linear scaling method is scaled to the target image. Therefore, the method according to the embodiment of the present invention can ensure that the transformed target image is not deformed in an important area sensitive to the human eye, and the distortion in the image scaling process is reduced.
  • Embodiment 6 of the present invention further provides an image scaling apparatus.
  • the image scaling apparatus includes: a distribution direction determining unit 81 and an image scaling unit 82.
  • the distribution direction determining unit 81 is configured to determine a distribution direction of the main photographic subject in the source image
  • the image scaling unit 82 is configured to adopt a nonlinear scaling method according to a distribution direction of the main photographic subject in the source image.
  • the zoom is a target image, wherein a zoom direction of the nonlinear zoom method is perpendicular to a distribution direction of a main subject in the source image.
  • the distribution direction determining unit 81 can determine the main shooting in the source image in different manners.
  • the distribution direction determining unit 81 may include: a detecting module 811, configured to detect the source image, and determine a distribution direction of a main photographic subject in the source image.
  • the image scaling unit 82 can optionally perform scaling using different scaling methods. For example, when the distribution of the main subject in the image is a vertical direction, the image scaling unit 82 performs scaling using a non-linear scaling method in the horizontal direction in the prior art. When the distribution of the main subject in the image is the horizontal direction, the image scaling unit 82 performs scaling using a non-linear scaling method in the vertical direction. Regardless of which scaling method is used for image scaling, it is only necessary to ensure that the zoom direction of the image and the distribution direction of the main subject are vertical.
  • the image scaling unit 82 includes: a partition setting module 821, configured to divide a source image into at least two partitions in a vertical direction, and set different zooms for each partition in the source image.
  • the image transformation module 822 is configured to transform pixels in each partition of the source image into a target image according to a corresponding scaling ratio.
  • the image transformation module 822 includes: a pixel mapping sub-module 8221, configured to find at least one corresponding source pixel for each target pixel in each partition in the target image in a corresponding partition of the source image.
  • the image generation sub-module 8222 is configured to determine a coordinate position of the target pixel and a value of the target pixel in the target image according to the coordinate position of the source pixel and the value of the source pixel.
  • the image scaling apparatus of the sixth embodiment of the present invention determines the distribution direction of the main subject in the image by detecting the image content, and scales the source image to an appropriate nonlinear scaling method according to the distribution direction of the main subject in the source image. Target image. Therefore, the device according to the embodiment of the invention can ensure that the transformed target image is not deformed in an important area sensitive to the human eye, and the distortion in the image scaling process is reduced.
  • the partition setting module 821 is further configured to compare the target image with the source image, based on the apparatus for image scaling shown in FIG. 9 and FIG.
  • the area is divided into at least two partitions.
  • the width and height of the target image can be calculated from the source image.
  • the target image is partitioned, it can be performed in the same manner as the source image partitioning method.
  • the apparatus of the seventh embodiment of the present invention can not only ensure that the transformed target image is not deformed in an important area sensitive to the human eye, reduce the distortion in the image scaling process, and further improve the image scaling efficiency and accuracy.
  • the image scaling method and apparatus determines the distribution direction of the main subject in the image by detecting the image content, and adopts the appropriate image according to the distribution direction of the main subject in the source image.
  • the nonlinear scaling method is scaled to the target image. Therefore, the method and apparatus according to the embodiments of the present invention can ensure that the transformed target image is not deformed in an important area sensitive to the human eye, and the distortion in the image scaling process is reduced.
  • the present invention can be implemented by hardware, or can be implemented by means of software plus necessary general hardware platform, and the technical solution of the present invention. It can be embodied in the form of a software product that can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for making a computer device (may It is a personal computer, a server, or a network device, etc.) that performs the methods described in various embodiments of the present invention.
  • a non-volatile storage medium which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.
  • a computer device may It is a personal computer, a server, or a network device, etc.

Landscapes

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

Description

图像缩放方法 ½置 本申请要求于 2008 年 9 月 28 日提交中国专利局、 申请号为 200810169225. 4、 发明名称为 "图像缩放方法及装置" 的中国专利申请的优 先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及图像处理技术领域, 尤其涉及一种图像缩放方法及装置。 背景技术
图像缩放是目前常用的图像处理技术, 其中不同比例的图像之间的缩放 一直是一个技术难点, 这是由于源图像和目标图像之间的宽高比不一致, 在 两幅图像之间缩放时会引起图像的失真, 尤其是在源图像和目标图像的宽高 比差异较大的情况下, 这种图像的失真的情况就更加明显。
图像缩放的一个典型的应用场景是宽高比为 4: 3和宽高比为 16: 9图像之 间的适配问题。 目前的视频通信系统需要兼容原来宽高比为 4: 3 的标清图像 (如 4CIF )和新的宽高比为 16: 9的高清图像(如 720p和 1080p ); 而传统的 CRT ( Ca thode Ray Tube, 阴极射线管) 电视基本采用 4: 3的显示模式, 最新 的高清 LCD ( Liquid Crys ta l Di splay,液晶显示器) 电视一般都采用 16: 9显 示模式。 因此, 这样就存在宽高比为 4: 3 的标清视频如何进行缩放以便在宽 高比为 16: 9的高清电视上呈现的问题, 反之亦然。
针对上述问题, 目前存在多种技术以解决不同比例的图像缩放问题, 例 如线性缩放方法, 边缘剪裁方法, 水平方向非线性缩放方法, 图像边缘填充 黑边方法等。 但是, 在实现本发明的过程中, 发明人发现现有技术至少存在 以下问题:
采用线性缩放方法对图像进行缩放, 虽然方法简单, 但是图像之间的失 真比较严重。 采用边缘剪裁方法进行图像缩放虽然不会造成图像的失真, 但 可能会使图像的主要拍摄对象丟失。 采用图像边缘填充黑边的方法进行图像 缩放会导致缩放后的图像相较于源图像变小, 无法填满整个显示区域。 此外, 填充的黑边对观看者也会造成一定的干扰。 采用水平方向非线性缩放算法进 行图像缩放, 由于图像的主要拍摄对象往往集中在中间, 利用该方法进行图 像缩放后, 图像的主要拍摄对象区域变形较小, 主观效果较好。 但是如果图 像的边缘部分存在主要拍摄对象, 如人, 则会导致边缘的人变形, 与中间的 人造成较大反差, 主观效果不好。 同时, 如果有物体在水平方向运动, 如文 字的水平滚动和人的水平运动, 则会出现跨区域时文字或人发生较大的变形, 对观看者来说很敏感。
发明内容
本发明的实施例提供一种图像缩放方法和装置, 降低在图像缩放过程中 图像之间的失真。
为达到上述目的, 本发明的实施例采用如下技术方案:
一种图像缩放方法, 包括如下步骤:
确定所述源图像中主要拍摄对象的分布方向;
根据所述源图像中主要拍摄对象的分布方向将所述源图像采用非线性缩 放方法缩放为目标图像, 其中所述非线性缩放方法的缩放方向和源图像中主 要拍摄对象的分布方向垂直。
一种图像缩放装置, 包括:
分布方向确定单元, 用于确定所述源图像中主要拍摄对象的分布方向; 图像缩放单元, 用于根据所述源图像中主要拍摄对象的分布方向将所述 源图像采用非线性缩放方法缩放为目标图像, 其中所述非线性缩放方法的缩 放方向和源图像中主要拍摄对象的分布方向垂直。
本发明实施例的图像缩放方法及装置, 通过确定图像中主要拍摄对象的 分布方向, 并根据源图像中主要拍摄对象的分布方向将源图像采用适当的非 线性缩放方法缩放为目标图像。 因此本发明实施例所述的方法及装置, 能够 保证变换后的目标图像在人眼敏感的重要区域不变形, 降低了图像缩放过程 中的失真度。
附图说明
图 1为本发明实施例一图像缩放方法的流程图;
图 2 为本发明实施例二图像缩放方法中垂直方向非线性缩放方法的流程 示意图;
图 3 为本发明实施例三图像缩放方法中垂直方向非线性缩放方法的流程 示意图;
图 4 为本发明实施例四图像缩放方法中, 将源图像和目标图像进行分区 后的示意图;
图 5 为本发明实施例四中, 显示不同高度上源图像和目标图像像素位置 的变换关系的示意图;
图 6a和图 6b分别为源图像和经图像缩放后的目标图像的示意图; 图 7 为本发明实施例五图像缩放方法中, 将源图像和目标图像进行分区 后的示意图;
图 8为本发明实施例六图像缩放装置的示意图;
图 9为本发明实施例六图像缩放装置中的分布方向确定单元的结构图; 图 10为本发明实施例六图像缩放装置中的图像缩放单元的结构图。 具体实施方式
为了更清楚地说明本发明实施例的技术方案, 下面将对实施例描述中所 需要使用的附图作一简单地介绍, 显而易见地, 下面描述中的附图仅仅是本 发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的 前提下, 还可以根据这些附图获得其他的附图。
实施例一
为了降低图像缩放过程中的失真度, 本发明实施例一提出了一种图像缩 放方法。 如图 1所示, 本发明实施例一所述图像缩放方法包括:
步骤 11、 确定所述源图像中主要拍摄对象的分布方向。 确定所述源图像中主要拍摄对象的分布方向的方法可包括: 通过对源图 像进行检测的方式确定等。 其中, 源图像中主要拍摄对象的分布方向可为对 称性较大的方向, 或分布较均匀的方向, 或纹理较丰富的方向。
对所述源图像进行检测的过程可利用人脸检测法, 边缘检测法, 熵编码 法等。 以人脸检测方法为例, 可以认为场景中的人是主要拍摄对象, 因此在 进行缩放前可以检测出图像中人脸的分布情况, 从而知道相应的人的分布方 向和对称情况, 从而决定缩放的方向。 人脸检测可以利用现有成熟的算法。 对于边缘检测方法, 可以认为人眼对于边缘丰富的纹理区域(主要拍摄对象) 是敏感的, 而对于缺乏纹理的平坦区域(非主要拍摄对象) 不敏感, 因此可 以利用 Sobel (索贝尔算子), Laplac ian (拉普拉斯算子)等边缘检测算法算 出场景的边缘分布, 从而确定场景的主要拍摄对象的分布。 或者还可通过熵 编码方法检测出源图像中主要拍摄对象分布较均匀的方向, 从而确定场景的 主要拍摄对象的分布。
另外, 还可通过预设图像中主要拍摄对象的方向的方式, 确定是采取水 平方向上的非线性缩放方法还是采用垂直方向上的非线性缩放方法。 当然, 步骤 12、 根据源图像中主要拍摄对象的分布方向, 将源图像采用非线性 缩放方法缩放为目标图像, 其中所述非线性缩放方法的缩放方向和源图像中 主要拍摄对象的分布方向垂直。
图像的缩放方向包括水平方向缩放, 垂直方向缩放等等。 但是无论采取 哪种缩放方法进行图像缩放, 只要保证图像的缩放方向和主要拍摄对象的分 布方向是垂直的即可。 例如, 当图像中主要拍摄对象的分布是垂直方向时, 要拍摄对象的分布是水平方向时, 则采用垂直方向上的非线性缩放方法进行 缩放。
本发明实施例一的图像缩放方法, 通过对图像内容的检测以确定图像中 主要拍摄对象的分布方向, 并根据源图像中主要拍摄对象的分布方向将源图 像采用适当的非线性缩放方法缩放为目标图像。 因此本发明实施例所述的方 法, 能够保证变换后的目标图像在人眼敏感的重要区域不变形, 降低了图像 缩放过程中的失真度。
以下, 以采用垂直方向非线性缩放方法进行图像的缩放过程为例进行详 细描述。
实施例二
如图 2 所示, 本发明实施例二采用垂直方向非线性缩放方法进行图像缩 放的方法包括如下步骤:
步骤 21、 将源图像按照缩放方向划分为至少两个分区。 那么对于垂直方 向上的非线性的缩放则具体为: 将源图像按照垂直方向划分为至少两个分区。
一般来说, 拍摄场景中的主要拍摄对象如人, 物体等都是水平方向上分 布的。 此外, 大部分变化范围较大的人或物体的运动也都是水平方向的, 如 人在拍摄场景内的走动。 垂直方向上的图像主要拍摄对象分布和内容的变化 相对来说是较小的, 而且图像内容在水平方向上的对称性分布也远多于垂直 方向上的对称性分布。 而现有非线性缩放方法是在水平方向上进行图像的缩 放, 会在水平方向上产生比较明显的变形, 因此在垂直方向上进行非线性缩 放是一个更好的方式。
在现有技术中, 水平方向上的非线性缩放方法基本上都是对称的。 为了 获得更好的图像缩放效果, 本发明实施例提出在垂直方向的非线性缩放的基 础上采用非对称缩放方式进行图像缩放。 这是因为在一般的场景中, 图像垂 直方向上分布内容的重要度是不一样的。 如对于室内场景, 人和重要物体往 往集中在图像的中下部, 而一些非主要拍摄对象往往分布在图像的上部。 从 观看者的角度来说, 观看者对主要拍摄对象往往比较敏感, 应该保证在缩放 时这部分的变形尽可能小, 而图像上部的区域通常不太重要, 可以允许较大 的变形。 基于上述原则, 在本发明实施例二所述的方法中, 将源图像在垂直方向 上划分为至少两个分区。 在划分分区的过程中, 各个分区的高度可以根据需 要任意指定, 也可以根据各个区域所占源图像总高度的百分比而定。 并且, 各个分区的高度可以相同, 也可不同。 例如, 以宽高比为 4: 3的源图像为例, 可以将其划分为上、 中、 下三个分区, 而每个分区的高度可分别为源图像总 高度的 30 % , 50 % , 20 % 。
步骤 22、 为所述源图像中的各分区设置不同的缩放比例。
在具体应用过程中, 可根据源图像中主要拍摄对象、 非主要拍摄对象所 在的分区, 为各分区设置缩放比例。 对于源图像中包含较多部分主要拍摄对 象的分区, 可以将其缩放比例设置的相对较小, 而包含较少部分主要拍摄对 象的分区, 可以将其缩放比例设置的相对较大。 设置缩放比例的过程可通过 人为设置的方式实现, 或者根据经验值设定。
以根据上述步骤 21中将源图像划分为三个分区为例,由源图像可以看出, 源图像中包含的主要拍摄对象多位于中、 下两个分区中, 而上分区中则包含 了较少的主要拍摄对象。 因此, 为了保证图像中人眼敏感的重要区域不变形, 可将所述中、 下两个分区的缩放比例设置为 1 , 而将上分区的缩放比例设置为 0. 5。 对于极端情况, 源图像中的每个像素都可以看成一个区域, 因而可以给 每个像素指定不同的缩放比例。
步骤 23、 将所述源图像各分区中的像素按照相应的缩放比例变换到目标 图像中。
在变换的过程中, 主要是建立源图像中的像素与目标图像中的像素的映 射, 从而为目标图像选取有效的图像数据。 在具体应用过程中, 以采用逆向 映射法为例, 在变换的过程中, 在源图像的对应分区中, 为目标图像中的每 个目标像素在源图像中找到相对应的一个或多个源像素, 然后再根据所述一 个或多个源像素的坐标位置和值, 确定所述源图像中目标像素的坐标位置和 值。 具体应用中, 可利用差值滤波算法计算目标像素的值, 如双线性差值滤 在本发明实施例二的图像缩放方法中, 是在垂直方向的非线性缩放的基 础上采用非对称缩放方式进行图像缩放, 因此, 利用本发明的实施例二所述 的方法, 不但能够保证变换后的目标图像在人眼敏感的重要区域不变形, 降 低了图像缩放过程中的失真度, 而且还能获得更好的图像缩放效果。
实施例三
为了提高图像缩放的效率和准确性, 本发明实施例三在实施例二所述的 图像缩放方法的基石出上, 在步骤 22后, 如图 3所示, 本发明实施例三所述方 法还可包括:
步骤 31、 将目标图像与所述源图像相对应地划分为至少两个分区。 在对 源图像进行分区的时候, 可根据源图像计算出目标图像的宽度和高度。 那么, 在对目标图像进行分区的时候, 可依照与源图像分区方法相同的方法进行。 例如, 在源图像分区的时候是分成上、 中、 下三个分区, 各个分区的高度分 别为总高的 30 % , 50 % , 20 % , 那么在对目标图像进行分区的时候, 也可根 据目标图像的高度, 将目标图像划分成三个区域, 并且目标图像中每个分区 的高度分别是目标图像总高度的 20 % , 60 % , 20 %。
本发明实施例二和实施例三所述的垂直方向非线性图像缩放方法, 根据 目前图像中主要拍摄对象一般都是分布在图像中的中、 下侧等规律, 将源图 像按照垂直方法上划分为至少两个分区, 并为每个分区设置不同的缩放比例, 然后根据所述缩放比例将源图像变换到目标图像中。 由于考虑到了图像中主 要拍摄对象的分布情况, 并根据所述主要拍摄对象的分布确定源图像的分区 及相对应的缩放比例, 因此本发明实施例二和三所述的方法, 能够保证变换 后的目标图像在人眼敏感的重要区域不变形, 降低了图像缩放过程中的失真 度。
实施例四
下面以由宽高比为 4 : 3的图像为源图像, 宽高比为 16: 9的图像为目标 图像为例, 描述一下本发明实施例的图像缩放方法。
对源图像进行检测, 确定源图像中的主要拍摄对象是按照垂直方向分布 的, 因此进行如下操作。
步骤 41、 如图 4所示, 将源图像划分成三个分区, 分别为上、 中、 下三 个分区。 假设源图像的宽为 高为 H, 从上到下分为三个分区由上到下分 别为 , ?2和 ?3, 高度分别为 H H2和 H3 , 满足 +H2 +H3 =H。 缩放后的 目标图像宽度不变, 高度为 H'。 相应地, 将目标图像划分成三个分区, 三个 分区由上到下分别为 , 和 的高度分别为
Figure imgf000010_0001
, H2'和 H; , 满足
H γ + Η 2 + Η ^二 Η ο
步骤 42、 对源图像中的每个分区进行缩放处理。 在此采用逆向映射法, 找到目标图像中的目标像素在源图像中对应的一个或多个源像素, 并根据所 述源像素的坐标位置和值, 确定目标图像中目标像素的坐标位置和值。
设源图像像素 /的坐标为(x,j), 目标图像像素 /'的坐标为(x', )。 根据二 维图像缩放变换理论( 1 )可知:
Figure imgf000010_0002
其中, 和 分别为由源图像到目标图像的水平方向和垂直方向的缩放 比例。
由目标图像到源图像的逆向映射关系为公式(2 ):
Figure imgf000010_0003
在本发明实施例中,根据公式( 2 )所述的逆向映射关系,可得如公式( 3 ) -公式(5 )所示的变换关系:
对于 满足:
Figure imgf000011_0001
对于 /,/' e i?2 , 满足:
Figure imgf000011_0002
满足:
Figure imgf000011_0003
通过上述公式(3 ) - ( 5 ), 即可确定目标图像中的目标像素在源图像中 的对应源像素, 并可相应地获得所对应的源像素的坐标位置, 从而确定源图 像中属于目标图像的有效图像数据。
如图 5所示, 显示了不同高度上源图像和目标图像像素位置的变换关系。 由图 5 可以看出, 同一分区内像素的缩放是线性的, 不同分区的缩放率会发 生变化, 因而整体图像的缩放是非线性的。 对于上述例子的情况, 该变换关 系呈现为一条折线, 而对于将每个像素视为一个分区并指定一个缩放比例的 极端情况, 该变换关系呈现为一条连续的曲线。
步骤 43、 对所述变换后的目标图像进行数据变换处理, 例如对目标图像 进行滤波或均值平滑处理等操作。
在进行变换时, 目标图像映射到源图像的像素位置往往不是整数而是小 数, 因此需要采用插值滤波算法对目标图像进行处理, 例如双线性插值算法, 立方卷积法等。 下面以双线性插值算法为例进行说明。 在此对线性插值算法 做简单介绍: 取某原点周围 4 个邻点的值在两个方向上作线性内插以得到待 采样点的值, 即根据待采样点与相邻点的距离确定相应的权值计算出待采样 点的值。可以将一个小数映射位置分解为整数部分和位于 [0,1)区间内的小数部 分,设 ·为像素的整数部分, 为小数部分,且 M,v e [0,l)。则像素 /( + w,y + v) 的值可以从其周 围邻近 4 个像素的值确定, 计算公式如下: f(i + M,7 + v) - (l - u)(\ - v)f(i, j) + (1 - u)vf(i, 7 + l) + w(l - v)f(i + 1, j) + uvf(i + 1,7 + 1) 。 ( 6 )
为了取得更好的处理效果, 也可以使用立方卷积法进行插值, 该方法是 对双线性内插法的改进, 不仅考虑到四个直接邻点灰度值的影响, 还考虑到 各邻点间灰度值变化率的影响, 利用了待采样点周围更大邻域内像素值作三 次插值。 其原理与现有技术中的相同, 在此不再贅述。
图 6a为宽高比为 4: 3的源图像, 图 6b显示了利用本发明实施例所述的 方法对源图像进行垂直方向非对称非线性缩放后的效果图。 在图 6a中, 图像 的主要拍摄对象分布杂图像的中下部, 也即图中的矩形和圓形所在的位置。 在图像缩放过程中, 插值算法使用了立方卷积法。 由于源图像的主要拍摄对 象都集中在图像的中间和下部区域且呈水平方向分布, 因此在缩放时上部区 域的缩放比例较大, 而中间和下部区域的缩放比例艮小, 接近于 1。 通过对比 图 6a和图 6b可以看出, 缩放后的图像中, 人眼比较敏感的区域——图像中 部和下部的主要拍摄对象的变形较小, 而上部的非主要拍摄对象的变形较大。
当从宽高比为 16: 9的图像缩放为宽高比为 4: 3的图像的过程, 与实施 例四中描述的原理相同。 不同之处在于, 在这种情况下, 所述源图像为宽高 比为 16: 9的图像, 目标图像为宽高比为 4: 3的图像。
在本发明实施例四所述的图像缩放方法中, 由于考虑到了图像中主要拍 摄对象的分布情况, 并根据所述主要拍摄对象的分布确定源图像的分区及相 对应的缩放比例, 因此能够保证变换后的目标图像主要拍摄对象所在的区域 不变形, 降低了图像缩放过程中的失真度, 并且主观效果较好。
实施例五
在本发明实施例五中, 如图 7 所示, 以源图像中的主要拍摄对象为与水 平方向成 45度角为例,采用的非线性缩放方法的缩放方向为与水平方向成 135 度角。 本发明实施例五包括如下步骤: 步骤 51、将源图像按照与水平方向成 45度的方向划分成三个分区, 分别 为上、 中、 下三个分区。 假设将源图像从上到下分为三个分区由左上到右下 分别为 , , ?12和 ?13。 相应地, 将目标图像按照与水平方向成 45度的方向由 左上到右下划分成三个分区, 三个分区由上到下分别为 '2和 ¾。
步骤 52、 对源图像中的每个分区进行缩放处理。 在此采用逆向映射法, 找到目标图像中的目标像素在源图像中对应的一个或多个源像素, 并根据所 述源像素的坐标位置和值, 确定目标图像中目标像素的坐标位置和值。 此步 骤可按照实施例四中所述的方法实现, 在此不再贅述。
步骤 53、 对所述变换后的目标图像进行数据变换处理, 例如对目标图像 进行滤波或均值平滑处理等操作。 与实施例四中描述的相同, 在进行变换时, 目标图像映射到源图像的像素位置往往不是整数而是小数, 因此需要采用插 值滤波算法对目标图像进行处理, 例如双线性插值算法, 立方卷积法等。
由上所述, 本发明实施例五的图像缩放方法, 通过对图像内容的检测以 确定图像中主要拍摄对象的分布方向, 并根据源图像中主要拍摄对象的分布 方向将源图像采用适当的非线性缩放方法缩放为目标图像。 因此本发明实施 例所述的方法, 能够保证变换后的目标图像在人眼敏感的重要区域不变形, 降低了图像缩放过程中的失真度。
实施例六
此外, 本发明实施例六还提供了一种图像缩放装置。
如图 8 所示, 本发明实施例六的图像缩放装置包括: 分布方向确定单元 81以及图像缩放单元 82。
其中, 所述分布方向确定单元 81 , 用于确定所述源图像中主要拍摄对象 的分布方向; 图像缩放单元 82 , 用于根据源图像中主要拍摄对象的分布方向 将源图像采用非线性缩放方法缩放为目标图像, 其中, 所述非线性缩放方法 的缩放方向和源图像中主要拍摄对象的分布方向垂直。
其中所述分布方向确定单元 81可通过不同的方式确定源图像中主要拍摄 对象的分布方向。 如图 9所示, 所述分布方向确定单元 81可包括: 检测模块 811 , 用于对所述源图像进行检测, 确定源图像中主要拍摄对象的分布方向。
根据所述分布方向确定单元 81的确定结果, 所述图像缩放单元 82可选 择采用不同的缩放方法进行缩放。 例如, 当图像中主要拍摄对象的分布是垂 直方向时, 则图像缩放单元 82采用现有技术中的水平方向上的非线性缩放方 法进行缩放。 而当图像中主要拍摄对象的分布是水平方向时, 图像缩放单元 82则采用垂直方向上的非线性缩放方法进行缩放。 无论采取哪种缩放方法进 行图像缩放, 只要保证图像的缩放方向和主要拍摄对象的分布方向是垂直的 即可。
其中, 如图 10所示, 所述图像缩放单元 82包括: 分区设置模块 821 , 用 于将源图像按照垂直方向划分为至少两个分区, 并为所述源图像中的各分区 设置不同的缩放比例; 图像变换模块 822 , 用于将所述源图像各分区中的像素 按照相应的缩放比例变换到目标图像中。
如图 10所示, 所述图像变换模块 822包括: 像素映射子模块 8221 , 用于 在源图像的对应分区中, 为目标图像中各分区中的每个目标像素找到至少一 个相对应的源像素; 图像生成子模块 8222 , 用于根据所述源像素的坐标位置 和源像素的值, 确定所述目标图像中所述目标像素的坐标位置和目标像素的 值。
本发明实施例六的图像缩放装置, 通过对图像内容的检测以确定图像中 主要拍摄对象的分布方向, 并根据源图像中主要拍摄对象的分布方向将源图 像采用适当的非线性缩放方法缩放为目标图像。 因此本发明实施例所述的装 置, 能够保证变换后的目标图像在人眼敏感的重要区域不变形, 降低了图像 缩放过程中的失真度。
实施例七
为了进一步提高图像缩放效率及准确性, 在图 9和图 10所示的图像缩放 的装置基础上, 所述分区设置模块 821 还用于将目标图像与所述源图像相对 应地划分为至少两个分区。 与本发明方法实施例中描述的相同, 在对源图像 进行分区的时候, 可根据源图像计算出目标图像的宽度和高度。 那么, 在对 目标图像进行分区的时候, 可依照与源图像分区方法相同的方法进行。
由上可知, 利用本发明实施例七的装置, 不但能够保证变换后的目标图 像在人眼敏感的重要区域不变形, 降低了图像缩放过程中的失真度, 而且还 能够进一步提高图像缩放效率及准确性。
综上所述, 本发明实施例的图像缩放方法及装置, 通过对图像内容的检 测以确定图像中主要拍摄对象的分布方向, 并根据源图像中主要拍摄对象的 分布方向将源图像采用适当的非线性缩放方法缩放为目标图像。 因此本发明 实施例所述的方法及装置, 能够保证变换后的目标图像在人眼敏感的重要区 域不变形, 降低了图像缩放过程中的失真度。
通过以上的实施方式的描述, 本领域的技术人员可以清楚地了解到本发 明可以通过硬件实现, 也可以可借助软件加必要的通用硬件平台的方式来实 现基于这样的理解, 本发明的技术方案可以以软件产品的形式体现出来, 该 软件产品可以存储在一个非易失性存储介质 (可以是 CD-ROM, U盘, 移动硬 盘等) 中, 包括若干指令用以使得一台计算机设备(可以是个人计算机, 服 务器, 或者网络设备等)执行本发明各个实施例所述的方法。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护 范围应所述以权利要求的保护范围为准。

Claims

权利要求 书
1、 一种图像缩放方法, 其特征在于, 所述方法包括如下步骤:
确定所述源图像中主要拍摄对象的分布方向;
根据所述源图像中主要拍摄对象的分布方向, 将所述源图像采用非线性缩 放方法缩放为目标图像, 其中所述非线性缩放方法的缩放方向和源图像中主要 拍摄对象的分布方向垂直。
2、 根据权利要求 1所述的图像缩放方法, 其特征在于, 所述确定所述源图 像中主要拍摄对象的分布方向的步骤具体为:
通过对源图像进行检测确定源图像中主要拍摄对象的分布方向。
3、 根据权利要求 2所述的图像缩放方法, 其特征在于, 当确定所述源图像 中的主要拍摄对象的分布方向为水平方向时, 根据所述源图像中主要拍摄对象 的分布方向将所述源图像采用非线性缩放方法缩放为目标图像的步骤具体为: 将源图像按照垂直方向划分为至少两个分区;
为所述源图像中的各分区设置不同的缩放比例;
将所述源图像各分区中的像素按照相应的缩放比例变换到目标图像中。
4、 根据权利要求 3所述的图像缩放方法, 其特征在于, 将源图像按照垂直 方向划分为至少两个分区的步骤后, 所述方法还包括:
将目标图像与所述源图像相对应地划分为至少两个分区。
5、 根据权利要求 3所述的图像缩放方法, 其特征在于, 为所述源图像中的 各分区设置不同的缩放比例的步骤具体为:
根据源图像中主要拍摄对象、 非主要拍摄对象所在的分区, 为各分区设置 缩放比例。
6、 根据权利要求 3所述的图像缩放方法, 其特征在于, 将所述源图像各分 区中的像素按照相应的缩放比例变换到目标图像中的步骤具体为:
在源图像的对应分区中, 为目标图像中各分区中的每个目标像素找到至少 一个相对应的源像素; 根据所述源像素的坐标位置和源像素的值, 确定所述目标图像中所述目标 像素的坐标位置和目标像素的值。
7、 一种图像缩放装置, 其特征在于, 包括:
分布方向确定单元(81 ),用于确定所述源图像中主要拍摄对象的分布方向; 图像缩放单元(82 ), 用于根据所述源图像中主要拍摄对象的分布方向, 将 所述源图像采用非线性缩放方法缩放为目标图像, 其中所述非线性缩放方法的 缩放方向和源图像中主要拍摄对象的分布方向垂直。
8、 根据权利要求 7所述的图像缩放装置, 其特征在于, 所述分布方向确定 单元 1 ) 包括:
检测模块(811 ), 用于对所述源图像进行检测, 确定源图像中主要拍摄对 象的分布方向。
9、 根据权利要求 7所述的图像缩放装置, 其特征在于, 所述图像缩放单元 ( 82 ) 包括:
分区设置模块(821 ), 用于将源图像按照垂直方向划分为至少两个分区, 并为所述源图像中的各分区设置不同的缩放比例;
图像变换模块( 822 ), 用于将所述源图像各分区中的像素按照相应的缩放 比例变换到目标图像中。
10、 根据权利要求 9 所述的图像缩放装置, 其特征在于, 所述分区设置模 块(821 )还用于将目标图像与所述源图像相对应地划分为至少两个分区。
11、 根据权利要求 9 所述的图像缩放装置, 其特征在于, 所述图像变换模 块( 822 ) 包括:
像素映射子模块( 8221 ), 用于在源图像的对应分区中, 为目标图像中各分 区中的每个目标像素找到至少一个相对应的源像素;
图像生成子模块( 8222 ), 用于根据所述源像素的坐标位置和源像素的值, 确定所述目标图像中所述目标像素的坐标位置和目标像素的值。
PCT/CN2009/072093 2008-09-28 2009-06-02 图像缩放方法及装置 WO2010034202A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP09815572.4A EP2334058B1 (en) 2008-09-28 2009-06-02 Image zooming method and apparatus
US13/073,695 US8649635B2 (en) 2008-09-28 2011-03-28 Image scaling method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2008101692254A CN101365077B (zh) 2008-09-28 2008-09-28 图像缩放方法及装置
CN200810169225.4 2008-09-28

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/073,695 Continuation US8649635B2 (en) 2008-09-28 2011-03-28 Image scaling method and apparatus

Publications (1)

Publication Number Publication Date
WO2010034202A1 true WO2010034202A1 (zh) 2010-04-01

Family

ID=40391182

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/072093 WO2010034202A1 (zh) 2008-09-28 2009-06-02 图像缩放方法及装置

Country Status (4)

Country Link
US (1) US8649635B2 (zh)
EP (1) EP2334058B1 (zh)
CN (1) CN101365077B (zh)
WO (1) WO2010034202A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102243858A (zh) * 2011-08-16 2011-11-16 青岛海信信芯科技有限公司 显示方法和显示装置
US8649635B2 (en) 2008-09-28 2014-02-11 Huawei Device Co., Ltd. Image scaling method and apparatus

Families Citing this family (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101789235B (zh) * 2009-01-22 2011-12-28 华为终端有限公司 一种图像处理方法及装置
EP2426638B1 (en) 2009-04-30 2013-09-18 Huawei Device Co., Ltd. Image conversion method, conversion device and display system
CN102170518B (zh) * 2010-02-26 2015-03-04 深圳艾科创新微电子有限公司 一种实现视频图像非线性缩放的系统及方法
CN101882300A (zh) * 2010-06-24 2010-11-10 深圳市万兴软件有限公司 一种图片拉伸处理方法和装置
CN102073986A (zh) * 2010-12-28 2011-05-25 冠捷显示科技(厦门)有限公司 实现显示装置画面放大的方法
CN102761709A (zh) * 2011-04-25 2012-10-31 张影 一种广播影像控制方法
CN102508653B (zh) * 2011-09-29 2014-06-25 奇智软件(北京)有限公司 一种用户界面的拉伸控制的方法
TWI560650B (en) * 2012-09-12 2016-12-01 Realtek Semiconductor Corp Image processing method, image output processing method, and image reception processing method
JP2015026891A (ja) * 2013-07-24 2015-02-05 ソニー株式会社 画像処理装置および記憶媒体
US8917329B1 (en) 2013-08-22 2014-12-23 Gopro, Inc. Conversion between aspect ratios in camera
CN103530845A (zh) * 2013-10-19 2014-01-22 深圳市晶日盛科技有限公司 一种改进的图像缩放方法
CN104867108B (zh) * 2014-02-20 2018-11-09 联想(北京)有限公司 一种图像处理的方法及电子设备
CN104077129B (zh) * 2014-06-10 2017-06-23 腾讯科技(深圳)有限公司 图标处理方法、装置及终端设备
CN105389313A (zh) * 2014-09-04 2016-03-09 华为技术有限公司 图片预览方法及其装置
CN104657206B (zh) * 2015-02-09 2018-09-28 青岛海信移动通信技术股份有限公司 一种图像数据的处理方法和装置
CN104657934B (zh) 2015-02-09 2018-08-10 青岛海信移动通信技术股份有限公司 一种图像数据的处理方法和装置
US9679356B2 (en) * 2015-03-19 2017-06-13 Xerox Corporation Vectorized two stage tile-based scaling
CN105335704B (zh) * 2015-10-16 2019-04-30 河南工业大学 一种基于双线性插值的车道线识别方法与装置
CN106204441B (zh) * 2016-06-27 2020-03-06 Tcl集团股份有限公司 一种图像局部放大的方法及装置
CN106204439A (zh) * 2016-06-28 2016-12-07 乐视控股(北京)有限公司 图片自适应处理的方法和系统
US10192143B1 (en) 2016-09-20 2019-01-29 Gopro, Inc. Systems and methods to distinguish between features depicted in images
US10186036B1 (en) 2016-11-04 2019-01-22 Gopro, Inc. Systems and methods for horizon identification in an image
US10194101B1 (en) 2017-02-22 2019-01-29 Gopro, Inc. Systems and methods for rolling shutter compensation using iterative process
US10200575B1 (en) 2017-05-02 2019-02-05 Gopro, Inc. Systems and methods for determining capture settings for visual content capture
US10536700B1 (en) 2017-05-12 2020-01-14 Gopro, Inc. Systems and methods for encoding videos based on visuals captured within the videos
CN108093177B (zh) * 2017-12-28 2021-01-26 Oppo广东移动通信有限公司 图像获取方法、装置、存储介质及电子设备
CN109271981A (zh) * 2018-09-05 2019-01-25 广东小天才科技有限公司 一种图像处理方法、装置及终端设备
CN111093045B (zh) * 2019-12-10 2021-03-26 北京佳讯飞鸿电气股份有限公司 一种缩放视频序列分辨率的方法及装置
CN111666811B (zh) * 2020-04-22 2023-08-15 北京联合大学 一种提取交通场景图像中交通标志牌区域方法及系统
CN113194267B (zh) * 2021-04-29 2023-03-24 北京达佳互联信息技术有限公司 图像处理方法及装置、拍照方法及装置

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5436669A (en) * 1993-06-25 1995-07-25 Sony Corporation Television display apparatus with adjustable vertical deflection waveform
CN1685715A (zh) * 2002-11-29 2005-10-19 松下电器产业株式会社 图像显示装置和图像显示方法
CN1894957A (zh) * 2003-12-17 2007-01-10 皇家飞利浦电子股份有限公司 图像格式转换
CN1967654A (zh) * 2005-10-27 2007-05-23 冲电气工业株式会社 图像变换电路
CN1997113A (zh) * 2006-12-28 2007-07-11 上海交通大学 基于多区域分割及模糊逻辑的自动曝光方法
CN101197957A (zh) * 2007-12-25 2008-06-11 上海广电集成电路有限公司 非线性图像缩放方法以及系统
CN101365077A (zh) * 2008-09-28 2009-02-11 深圳华为通信技术有限公司 图像缩放方法及装置

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5920659A (en) * 1996-06-24 1999-07-06 Intel Corporation Method and apparatus for scaling image data having associated transparency data
US6453069B1 (en) * 1996-11-20 2002-09-17 Canon Kabushiki Kaisha Method of extracting image from input image using reference image
DE19717140A1 (de) * 1997-04-23 1998-10-29 Thomson Brandt Gmbh Verfahren zur Formatumwandlung von Bildern sowie Vorrichtung zur Durchführung des Verfahrens
JP2000067247A (ja) * 1998-06-08 2000-03-03 Toshiba Corp 画像認識装置
JP2001338302A (ja) * 2000-05-29 2001-12-07 Nikon Corp 監視装置
FR2810765B1 (fr) * 2000-06-27 2002-08-23 Mannesmann Dematic Postal Automation Sa Segmentation d'une image numerique d'un objet postal par la transformation de hough
US7149369B2 (en) * 2002-04-23 2006-12-12 Hewlett-Packard Development Company, L.P. Method and system for image scaling
US6775411B2 (en) * 2002-10-18 2004-08-10 Alan D. Sloan Apparatus and method for image recognition
US7158158B1 (en) * 2003-03-12 2007-01-02 Apple Computer, Inc. Method and apparatus for nonlinear anamorphic scaling of video images
US7388620B2 (en) * 2003-10-23 2008-06-17 Sony Corporation Method and system for pan-scan using motion vectors presentation
US7706635B2 (en) * 2005-10-20 2010-04-27 Marvell International Technology Ltd. Methods and systems for image scaling
US8200037B2 (en) * 2008-01-28 2012-06-12 Microsoft Corporation Importance guided image transformation
KR101484278B1 (ko) * 2008-06-16 2015-01-19 삼성전자주식회사 비선형 압축을 이용한 맵 표시 방법 및 장치
US8160398B1 (en) * 2008-07-31 2012-04-17 Adobe Systems Incorporated Independent resizing of multiple image regions
CN102265607A (zh) * 2008-12-23 2011-11-30 皇家飞利浦电子股份有限公司 图像缩放曲线生成
US8750850B2 (en) * 2010-01-18 2014-06-10 Qualcomm Incorporated Context-aware mobile incorporating presence of other mobiles into context
US8483513B2 (en) * 2010-01-22 2013-07-09 Corel Corporation, Inc. Method of content aware image resizing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5436669A (en) * 1993-06-25 1995-07-25 Sony Corporation Television display apparatus with adjustable vertical deflection waveform
CN1685715A (zh) * 2002-11-29 2005-10-19 松下电器产业株式会社 图像显示装置和图像显示方法
CN1894957A (zh) * 2003-12-17 2007-01-10 皇家飞利浦电子股份有限公司 图像格式转换
CN1967654A (zh) * 2005-10-27 2007-05-23 冲电气工业株式会社 图像变换电路
CN1997113A (zh) * 2006-12-28 2007-07-11 上海交通大学 基于多区域分割及模糊逻辑的自动曝光方法
CN101197957A (zh) * 2007-12-25 2008-06-11 上海广电集成电路有限公司 非线性图像缩放方法以及系统
CN101365077A (zh) * 2008-09-28 2009-02-11 深圳华为通信技术有限公司 图像缩放方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8649635B2 (en) 2008-09-28 2014-02-11 Huawei Device Co., Ltd. Image scaling method and apparatus
CN102243858A (zh) * 2011-08-16 2011-11-16 青岛海信信芯科技有限公司 显示方法和显示装置

Also Published As

Publication number Publication date
EP2334058A4 (en) 2011-08-31
CN101365077A (zh) 2009-02-11
CN101365077B (zh) 2012-06-20
EP2334058A1 (en) 2011-06-15
EP2334058B1 (en) 2016-09-21
US8649635B2 (en) 2014-02-11
US20110170802A1 (en) 2011-07-14

Similar Documents

Publication Publication Date Title
WO2010034202A1 (zh) 图像缩放方法及装置
US9432616B1 (en) Systems and methods for up-scaling video
WO2018157568A1 (zh) 全景图像映射方法
EP2382772B1 (en) Image scaling curve generation
US9349188B2 (en) Creating details in an image with adaptive frequency strength controlled transform
EP2974335B1 (en) Control of frequency lifting super-resolution with image features
US9536288B2 (en) Creating details in an image with adaptive frequency lifting
CN106875331B (zh) 一种全景图像的非对称映射方法
US9305332B2 (en) Creating details in an image with frequency lifting
US20120120311A1 (en) Distributed image retargeting
JP2007035038A (ja) ソース画像のシーケンスから低減された画像のシーケンスを生成する方法
US9478007B2 (en) Stable video super-resolution by edge strength optimization
CN107392854A (zh) 一种基于局部自适应增益因子的联合上采样方法
TW201417044A (zh) 數位影像的反扭曲處理方法
KR20100044977A (ko) 영상 보간 방법 및 그 방법이 기록된 컴퓨터로 읽을 수 있는 기록매체
US8503823B2 (en) Method, device and display system for converting an image according to detected word areas
CN103824261B (zh) 一种图像降噪处理方法及装置
US20120133646A1 (en) Image processing apparatus, method for having computer process image and computer readable medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09815572

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2009815572

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2009815572

Country of ref document: EP