WO2018107776A1 - Video data rotation method and system - Google Patents

Video data rotation method and system Download PDF

Info

Publication number
WO2018107776A1
WO2018107776A1 PCT/CN2017/096479 CN2017096479W WO2018107776A1 WO 2018107776 A1 WO2018107776 A1 WO 2018107776A1 CN 2017096479 W CN2017096479 W CN 2017096479W WO 2018107776 A1 WO2018107776 A1 WO 2018107776A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
video data
target
rotation
coordinate
Prior art date
Application number
PCT/CN2017/096479
Other languages
French (fr)
Chinese (zh)
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 威创集团股份有限公司
Publication of WO2018107776A1 publication Critical patent/WO2018107776A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2628Alteration of picture size, shape, position or orientation, e.g. zooming, rotation, rolling, perspective, translation

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Image Processing (AREA)

Abstract

The present invention relates to a video data rotation method and system. The method for rotating video data comprises the following steps: obtaining an original display range corresponding to video data to be rotated which is on a display interface; calculating a target coordinate after a display coordinate corresponding to each pixel in the original display range is rotated according to a target rotation angle; determining a rotation correspondence relationship between a pixel and the target coordinate according to an original correspondence relationship between a pixel and a display coordinate in video data; filling each pixel in the video data to a target coordinate position corresponding to a pixel respectively according to the rotation correspondence relationship so as to rotate each pixel in said video data in the display interface; performance parameters of each pixel in the rotated video data remain unchanged, image quality corresponding thereto is well maintained, and a rotation process of each pixel in the video data is relatively simple to implement, while having high rotation efficiency.

Description

视频数据旋转方法和系统Video data rotation method and system 技术领域Technical field
本发明涉及视频信号处理技术领域,特别是涉及一种视频数据旋转方法和系统。The present invention relates to the field of video signal processing technologies, and in particular, to a video data rotation method and system.
背景技术Background technique
近年来,拼接墙等显示设备的应用频率越来越高,应用范围越来越广。上述显示设备在对其视频数据进行显示的过程中,通常会出现视频源获取设备的数据获取角度变动的状况(如扫描仪的扫描镜头转动或者摄像机的拍摄镜头旋转等等),若将视频数据获取过程中,获取角度变动情况下所获取的视频数据发送至显示设备进行显示,则需要在显示设备的显示过程中,对上述获取角度变动情况下所获取的视频数据进行旋转,以保证上述视频数据在显示设备上的显示效果。In recent years, the application frequency of display devices such as video splicing walls is getting higher and higher, and the application range is wider and wider. In the process of displaying the video data by the above display device, the data acquisition angle of the video source acquisition device usually changes (such as the scanning lens rotation of the scanner or the rotation of the camera lens, etc.), if the video data is to be During the acquisition process, the video data acquired under the acquisition of the angle change is sent to the display device for display, and the video data acquired in the above-mentioned acquisition angle change needs to be rotated during the display process of the display device to ensure the above video. The effect of the data on the display device.
传统视频数据旋转方案中,有技术用两步法实现相应图像数据的旋转,但是第一步变换中,丢失图像中的高频部分,图像质量下降明显,接着Paeth和Tanaka在此基础上提出三步实现的办法,需通过三次平移就可以完成图像旋转处理,但是图像质量还是和原图有明显差异。还有方案提出用快速傅里叶变换实现图像旋转的方法,该方法将坐标变换与图像插值合二为一,但是计算量庞大,实现过程复杂。可见,传统的视频数据旋转方案存在实现过程复杂、旋转后,视频信号中的图像质量变差。In the traditional video data rotation scheme, there is a technique to realize the rotation of the corresponding image data by a two-step method, but in the first transformation, the high frequency part in the image is lost, and the image quality is degraded obviously, and then Paeth and Tanaka propose three on this basis. In the step implementation method, the image rotation processing can be completed by three times of translation, but the image quality is obviously different from the original image. There is also a method for realizing image rotation by using fast Fourier transform, which combines coordinate transformation and image interpolation into one, but the calculation amount is large and the implementation process is complicated. It can be seen that the traditional video data rotation scheme has a complicated implementation process, and the image quality in the video signal deteriorates after the rotation.
发明内容Summary of the invention
基于此,有必要针对传统的视频数据旋转方案存在实现过程复杂、旋转后视频信号中的图像质量变差的技术问题,提供一种视频数据旋转方法和系统。Based on this, it is necessary to provide a video data rotation method and system for the conventional video data rotation scheme, which has a complicated implementation process and a poor image quality in the rotated video signal.
一种视频数据旋转方法,包括如下步骤:A video data rotation method includes the following steps:
获取待旋转的视频数据在显示界面对应的原始显示范围; Obtaining an original display range corresponding to the video data to be rotated on the display interface;
计算所述原始显示范围内各个像素对应的显示坐标按照目标旋转角度旋转后的目标坐标;Calculating target coordinates after the display coordinates corresponding to the respective pixels in the original display range are rotated according to the target rotation angle;
根据视频数据中像素与显示坐标的原始对应关系确定所述像素与目标坐标的旋转对应关系;Determining a rotation correspondence relationship between the pixel and the target coordinate according to an original correspondence relationship between the pixel and the display coordinate in the video data;
根据所述旋转对应关系将视频数据中的各个像素分别填充至所述像素对应的目标坐标位置。Each pixel in the video data is respectively filled to a target coordinate position corresponding to the pixel according to the rotation correspondence.
一种视频数据旋转系统,包括:A video data rotation system comprising:
获取模块,用于获取待旋转的视频数据在显示界面对应的原始显示范围;The obtaining module is configured to obtain an original display range corresponding to the video data to be rotated on the display interface;
计算模块,用于计算所述原始显示范围内各个像素对应的显示坐标按照目标旋转角度旋转后的目标坐标;a calculation module, configured to calculate target coordinates after the display coordinates corresponding to the respective pixels in the original display range are rotated according to the target rotation angle;
确定模块,用于根据视频数据中像素与显示坐标的原始对应关系确定所述像素与目标坐标的旋转对应关系;a determining module, configured to determine a rotation correspondence relationship between the pixel and the target coordinate according to an original correspondence relationship between the pixel and the display coordinate in the video data;
填充模块,用于根据所述旋转对应关系将视频数据中的各个像素分别填充至所述像素对应的目标坐标位置。And a filling module, configured to fill each pixel in the video data to a target coordinate position corresponding to the pixel according to the rotation correspondence.
上述视频数据旋转方法和系统,可以获取待旋转的视频数据在显示界面对应的原始显示范围以及视频数据中各个显示在原始显示范围内对应的显示坐标,计算显示坐标按照目标旋转角度旋转后的目标坐标,根据视频数据中像素与显示坐标的原始对应关系确定所述像素与目标坐标的旋转对应关系,从而根据旋转对应关系将视频数据中的各个像素分别填充至所述像素对应的目标坐标位置,以实现上述视频数据中各个像素在显示界面的旋转,旋转后的视频数据中各个像素的性能参数保持不变,其对应的图像质量得到较好的保持,且实现上述视频数据中各个像素旋转的过程相对简单,具有较高的旋转效率。The above video data rotation method and system can obtain the original display range corresponding to the video data to be rotated on the display interface and the corresponding display coordinates in the original display range in the video data, and calculate the target after the display coordinate is rotated according to the target rotation angle. Coordinates, determining a rotation correspondence relationship between the pixel and the target coordinate according to an original correspondence relationship between the pixel and the display coordinate in the video data, so that each pixel in the video data is respectively filled to a target coordinate position corresponding to the pixel according to the rotation correspondence relationship, In order to realize the rotation of each pixel in the video data on the display interface, the performance parameters of each pixel in the rotated video data remain unchanged, the corresponding image quality is better maintained, and each pixel in the above video data is rotated. The process is relatively simple and has a high rotational efficiency.
附图说明DRAWINGS
图1为一个实施例的视频数据旋转方法流程图;1 is a flow chart of a video data rotation method of an embodiment;
图2为一个实施例的原始显示范围和目标显示范围示意图;2 is a schematic diagram of an original display range and a target display range of an embodiment;
图3为一个实施例的原始显示范围示意图; Figure 3 is a schematic diagram showing the original display range of an embodiment;
图4为一个实施例的原始显示范围示意图;Figure 4 is a schematic diagram showing the original display range of an embodiment;
图5为一个实施例的视频数据旋转系统结构示意图。FIG. 5 is a schematic structural diagram of a video data rotation system of an embodiment.
具体实施方式detailed description
下面结合附图对本发明的视频数据旋转方法和系统的具体实施方式作详细描述。The specific embodiments of the video data rotation method and system of the present invention are described in detail below with reference to the accompanying drawings.
参考图1,图1所示为一个实施例的视频数据旋转方法流程图,包括如下步骤:Referring to FIG. 1, FIG. 1 is a flowchart of a video data rotation method according to an embodiment, which includes the following steps:
S10,获取待旋转的视频数据在显示界面对应的原始显示范围;S10. Acquire an original display range corresponding to the video data to be rotated on the display interface.
通常情况下,视频源获取设备的数据获取角度发生变动(如扫描仪的扫描镜头转动、投影仪的投影角度出现旋转或者摄像机的拍摄镜头旋转等等),这一状态下所获取的视频数据需要先进行旋转处理后再在相应显示界面进行显示,以保证上述视频数据在显示界面的显示效果。视频数据包括多个像素点,各个像素点在显示界面存在对应的显示坐标,上述各个显示坐标构成视频数据在显示界面对应的原始显示范围。Normally, the data acquisition angle of the video source acquisition device changes (such as the scan lens rotation of the scanner, the projection angle of the projector, or the rotation of the camera lens, etc.), and the video data acquired in this state is required. After the rotation process is performed, the display is performed on the corresponding display interface to ensure the display effect of the above video data on the display interface. The video data includes a plurality of pixel points, and each pixel point has a corresponding display coordinate on the display interface, and each of the display coordinates constitutes an original display range corresponding to the video data on the display interface.
S20,计算所述原始显示范围内各个像素对应的显示坐标按照目标旋转角度旋转后的目标坐标;S20: Calculate target coordinates after the display coordinates corresponding to the respective pixels in the original display range are rotated according to the target rotation angle;
上述目标旋转角度可以根据视频源获取设备的数据获取角度的变动幅度进行确定,通常情况下,上述目标旋转角度为视频源获取设备的数据获取角度相对于水平方向或者竖直方向的变动角度。计算所述原始显示范围内各个像素对应的显示坐标按照目标旋转角度旋转后的目标坐标,也就是对原始显示范围内的各个显示坐标依据相应的目标旋转角度进行变换计算,以确定各个显示坐标变换后的坐标(目标坐标)。The target rotation angle may be determined according to the fluctuation range of the data acquisition angle of the video source acquiring device. Generally, the target rotation angle is a variation angle of the data acquisition angle of the video source acquiring device with respect to the horizontal direction or the vertical direction. Calculating a target coordinate of the display coordinate corresponding to each pixel in the original display range according to the target rotation angle, that is, converting each display coordinate in the original display range according to the corresponding target rotation angle to determine each display coordinate transformation Post coordinates (target coordinates).
S30,根据视频数据中像素与显示坐标的原始对应关系确定所述像素与目标坐标的旋转对应关系;S30. Determine a rotation correspondence relationship between the pixel and the target coordinate according to an original correspondence relationship between the pixel and the display coordinate in the video data.
上述步骤可以通过像素与显示坐标的对应关系,显示坐标与目标坐标之间的对应关系,确定像素与目标坐标之间的对应关系,以得到旋转对应关系。 The above steps may display the correspondence between the coordinates and the target coordinates by the correspondence between the pixels and the display coordinates, and determine the correspondence between the pixels and the target coordinates to obtain a rotation correspondence.
S40,根据所述旋转对应关系将视频数据中的各个像素分别填充至所述像素对应的目标坐标位置。S40. Fill each pixel in the video data to a target coordinate position corresponding to the pixel according to the rotation correspondence.
上述步骤可以根据各个像素在视频数据中的排列特征对像素进行采样,以获取视频数据中的各个像素,进行相应的填充。The above steps may sample the pixels according to the arrangement features of the respective pixels in the video data to acquire respective pixels in the video data and perform corresponding filling.
本实施例提供的视频数据旋转方法,可以获取待旋转的视频数据在显示界面对应的原始显示范围以及视频数据中各个显示在原始显示范围内对应的显示坐标,计算显示坐标按照目标旋转角度旋转后的目标坐标,根据视频数据中像素与显示坐标的原始对应关系确定所述像素与目标坐标的旋转对应关系,从而根据旋转对应关系将视频数据中的各个像素分别填充至所述像素对应的目标坐标位置,以实现上述视频数据中各个像素在显示界面的旋转,旋转后的视频数据中各个像素的性能参数保持不变,其对应的图像质量得到较好的保持,且实现上述视频数据中各个像素旋转的过程相对简单,具有较高的旋转效率。The video data rotation method provided in this embodiment can obtain the original display range corresponding to the video data to be rotated on the display interface and the display coordinates corresponding to each display in the original display range in the video data, and calculate the display coordinate to rotate according to the target rotation angle. a target coordinate, determining a rotation correspondence relationship between the pixel and the target coordinate according to an original correspondence relationship between the pixel and the display coordinate in the video data, thereby filling each pixel in the video data to a target coordinate corresponding to the pixel according to the rotation correspondence relationship Position, in order to realize the rotation of each pixel in the above video data on the display interface, the performance parameter of each pixel in the rotated video data remains unchanged, the corresponding image quality is better maintained, and each pixel in the above video data is realized. The process of rotation is relatively simple and has a high rotational efficiency.
在一个实施例中,上述计算所述原始显示范围内各个像素对应的显示坐标按照目标旋转角度旋转后的目标坐标的过程可以包括:In one embodiment, the process of calculating the target coordinates of the display coordinates corresponding to each pixel in the original display range according to the target rotation angle may include:
根据目标旋转角度将显示界面对应的原始坐标系转换为目标坐标系;Converting the original coordinate system corresponding to the display interface to the target coordinate system according to the target rotation angle;
计算所述原始显示范围在目标坐标系中对应的目标显示范围;Calculating a target display range corresponding to the original display range in the target coordinate system;
分别计算各个像素对应的显示坐标在目标坐标系中对应的目标坐标。The target coordinates corresponding to the display coordinates of the respective pixels in the target coordinate system are respectively calculated.
本实施例根据目标旋转角度进行原始坐标系至目标坐标系的转换,从而实现显示坐标至目标坐标的转换,具有较高的转换准确性。In this embodiment, the conversion from the original coordinate system to the target coordinate system is performed according to the target rotation angle, thereby realizing the conversion from the display coordinate to the target coordinate, and has high conversion accuracy.
作为一个实施例,将图2所示的原始显示范围ABCD旋转为目标显示范围A’B’C’D’,相应的目标旋转角度为Φ,可以先将原始显示范围ABCD所在的原始坐标系转换为以D为坐标原点(0,0)的目标坐标系,再实现原始显示范围ABCD至目标显示范围A’B’C’D’的变换。上述原始显示范围ABCD至目标显示范围A’B’C’D’的变换过程可以包括:As an embodiment, the original display range ABCD shown in FIG. 2 is rotated to the target display range A'B'C'D', and the corresponding target rotation angle is Φ, and the original coordinate system in which the original display range ABCD is located may be converted first. For the target coordinate system with D as the coordinate origin (0, 0), the transformation from the original display range ABCD to the target display range A'B'C'D' is realized. The transformation process of the above-described original display range ABCD to the target display range A'B'C'D' may include:
若上述原始显示范围为一个矩形区域,矩形区域的宽为w,高为l,坐标的原点选为(x0,y0),其中x0=0,y0=0,矩形区域四个顶点坐标分别为A(x0,yk1)、B(xj1,yk)、C(xj,yk2)、D(xj2,y0)。 If the original display range is a rectangular area, the width of the rectangular area is w, the height is l, and the origin of the coordinates is selected as (x 0 , y 0 ), where x 0 =0, y 0 =0, four vertices of the rectangular area The coordinates are A(x 0 , y k1 ), B(x j1 , y k ), C(x j , y k2 ), D(x j2 , y 0 ), respectively.
如图3所示,各个横向段长度分别包括:点D的横坐标为j1,点B的横坐标为j2,点C的横坐标为j,通过数学几何计算,分别得出各个段长度如下:As shown in FIG. 3, the lengths of the respective horizontal segments include: the abscissa of the point D is j1, the abscissa of the point B is j2, and the abscissa of the point C is j, and the length of each segment is obtained by mathematical geometric calculation as follows:
j1=wcosΦ                         式(1)J1=wcosΦ (1)
j2=lsinΦ                          式(2)J2=lsinΦ (2)
j=wcosΦ+lsinΦ=j1+j2               式(3)j=wcosΦ+lsinΦ=j1+j2 (3)
如图4所示,各个竖向段长度分别包括:点A的纵坐标为k1,点C的纵坐标为k2,点B的纵坐标为k,通过数学几何计算,分别得出各个段长度如下:As shown in FIG. 4, the lengths of the respective vertical segments include: the ordinate of the point A is k1, the ordinate of the point C is k2, and the ordinate of the point B is k, and the length of each segment is obtained by mathematical geometric calculation. :
k1=lcosΦ                         式(4)K1=lcosΦ (4)
k2=wsinΦ                        式(5)K2=wsinΦ (5)
k=lcosΦ+wsinΦ=k1+k2             式(6)k=lcosΦ+wsinΦ=k1+k2 (6)
通过式1-6,可以计算出A、B、C、D四点的坐标,由这4点圈定的矩形区域便为即将旋转的区域(原始显示范围)。假定旋转区域的像素点坐标为(x,y),在图像取点时候,有如下的限制,即0<x<xj,0<y<yk.Through Equations 1-6, the coordinates of the four points A, B, C, and D can be calculated, and the rectangular area circled by these four points is the area to be rotated (original display range). Assuming that the pixel coordinates of the rotation area are (x, y), when the image is taken, there is a limitation that 0 < x < x j , 0 < y < y k .
通过上面计算式1-6定义好了A、B、C、D四点在原始坐标系中的具体坐标后,重新在建立一个新的坐标系(目标坐标系)。图像旋转后,以矩形的左下点为原点建立的新直角坐标系,如图2所示,以D点作为原点(旋转后的D’)。定义好新坐标后,将原来的视频像素点填入到新的坐标系中,原有的像素点数据不做任何变换。这里就省去了旧有旋转方法的差值、傅里叶变换的复杂的计算。After the specific coordinates of the four points A, B, C, and D in the original coordinate system are defined by the above calculation formula 1-6, a new coordinate system (target coordinate system) is newly established. After the image is rotated, the new Cartesian coordinate system is established with the lower left point of the rectangle as the origin. As shown in Fig. 2, the D point is used as the origin (D' after rotation). After the new coordinates are defined, the original video pixels are filled into the new coordinate system, and the original pixel data is not changed. Here, the difference between the old rotation method and the complex calculation of the Fourier transform is omitted.
在一个实施例中,上述计算所述原始显示范围内各个像素对应的显示坐标按照目标旋转角度旋转后的目标坐标的过程之前,还可以包括:In an embodiment, before the process of calculating the target coordinates of the display coordinates of the respective pixels in the original display range according to the target rotation angle, the method may further include:
在视频数据的获取过程中,检测视频采集单元的旋转角度;其中,所述视频采集单元为摄像设备的摄像头或者扫描仪的扫描镜头;In the process of acquiring video data, detecting a rotation angle of the video capturing unit; wherein the video capturing unit is a camera of the imaging device or a scanning lens of the scanner;
根据所述旋转角度确定所述视频数据的目标旋转角度。A target rotation angle of the video data is determined according to the rotation angle.
本实施例依据视频采集单元的旋转角度确定所述视频数据的目标旋转角度,保证了所确定的目标旋转角度的准确性。In this embodiment, the target rotation angle of the video data is determined according to the rotation angle of the video collection unit, and the accuracy of the determined target rotation angle is ensured.
在一个实施例中,上述根据视频数据中像素与显示坐标的原始对应关系确 定所述像素与目标坐标的旋转对应关系的过程可以包括:In one embodiment, the original correspondence between the pixels and the display coordinates in the video data is as described above. The process of determining the rotation correspondence between the pixel and the target coordinates may include:
获取视频数据中各个像素与原始显示范围中的各个显示坐标的对应关系,得到原始对应关系;Obtaining a correspondence between each pixel in the video data and each display coordinate in the original display range, to obtain an original correspondence relationship;
获取原始显示范围内各个显示坐标与目标坐标范围内各个目标坐标之间的对应关系,得到坐标对应关系;Obtaining a correspondence between each display coordinate in the original display range and each target coordinate in the target coordinate range, and obtaining a coordinate correspondence relationship;
根据所述原始对应关系和坐标对应关系确定各个像素与各个目标坐标之间的对应关系,得到旋转对应关系。Corresponding relationship between each pixel and each target coordinate is determined according to the original correspondence relationship and the coordinate correspondence relationship, and a rotation correspondence relationship is obtained.
本实施例中,上述旋转对应关系依据原始对应关系和坐标对应关系所确定,准确性高,从而保证旋转后,各个像素填充位置的准确性,提高了旋转后相应视频数据的显示效果。In this embodiment, the rotation corresponding relationship is determined according to the original correspondence relationship and the coordinate correspondence relationship, and the accuracy is high, thereby ensuring the accuracy of the filling position of each pixel after the rotation, and improving the display effect of the corresponding video data after the rotation.
在一个实施例中,上述根据所述旋转对应关系将视频数据中的各个像素分别填充至所述像素对应的目标坐标位置的过程可以包括:In an embodiment, the process of filling each pixel in the video data to the target coordinate position corresponding to the pixel according to the rotation correspondence may include:
检测各个像素在所述视频数据中的排列顺序;Detecting an arrangement order of each pixel in the video data;
根据所述排列顺序从所述视频数据中依次采样获取各个像素,并将所获取的像素分别填充至所述像素对应的目标坐标位置。Each pixel is sequentially sampled from the video data according to the arrangement order, and the acquired pixels are respectively filled to a target coordinate position corresponding to the pixel.
本实施例依据各个像素在所述视频数据中的排列顺序进行上述像素的采样,使其采样过程更为有序。In this embodiment, the sampling of the pixels is performed according to the order of arrangement of the pixels in the video data, so that the sampling process is more orderly.
在一个实施例中,上述计算所述原始显示范围内各个像素对应的显示坐标按照目标旋转角度旋转后的目标坐标的过程之前,还可以包括:In an embodiment, before the process of calculating the target coordinates of the display coordinates of the respective pixels in the original display range according to the target rotation angle, the method may further include:
设置双倍速率同步动态随机缓存区,将待旋转的视频数据缓存至所述双倍速率同步动态随机缓存区。A double rate synchronous dynamic random buffer is set, and the video data to be rotated is buffered to the double rate synchronous dynamic random buffer.
作为一个实施例,上述根据所述旋转对应关系将视频数据中的各个像素分别填充至所述像素对应的目标坐标位置的过程可以包括:As an embodiment, the process of filling each pixel in the video data to the target coordinate position corresponding to the pixel according to the rotation correspondence may include:
根据所述旋转对应关系将所述双倍速率同步动态随机缓存区缓存的视频数据中各个像素分别填充至所述像素对应的目标坐标位置。And each pixel in the video data buffered by the double rate synchronous dynamic random buffer is respectively filled to a target coordinate position corresponding to the pixel according to the rotation correspondence.
上述双倍速率同步动态随机缓存区可以利用DDR(双倍速率同步动态随机存储器)建立,上述双倍速率同步动态随机缓存区为一个新的视频帧数据存储 区域,利用该双倍速率同步动态随机缓存区进行视频数据的缓存,再进行相应的采样和填充,使后续的采样和填充过程更为稳定。The double rate synchronous dynamic random buffer can be established by using DDR (Double Rate Synchronous Dynamic Random Access Memory), and the double rate synchronous dynamic random buffer is a new video frame data storage. The area uses the double rate synchronous dynamic random buffer area to buffer the video data, and then performs corresponding sampling and filling, so that the subsequent sampling and filling process is more stable.
在一个实施例中,上述原始显示范围为三角形区域;所述三角形区域的顶点对应视频数据中的第一个像素;In one embodiment, the original display range is a triangular area; the vertices of the triangular area correspond to a first pixel in the video data;
所述根据所述旋转对应关系将视频数据中的各个像素分别填充至所述像素对应的目标坐标位置的过程包括:The process of filling each pixel in the video data to the target coordinate position corresponding to the pixel according to the rotation correspondence relationship includes:
从视频数据中的第一个像素开始,向下逐行采样;其中,在对像素的采样过程中,每向下采样一行,采样坐标的纵坐标减一,采样坐标的横坐标向左减一,向右加一;Starting from the first pixel in the video data, sampling down line by line; wherein, in the sampling process of the pixel, each line is downsampled, the ordinate of the sampling coordinate is decremented by one, and the abscissa of the sampling coordinate is decremented by one to the left. , add one to the right;
根据所述旋转对应关系将采样得到的像素填充至所述像素对应的目标坐标位置。And sampling the pixel obtained according to the rotation correspondence to a target coordinate position corresponding to the pixel.
本实施例的原始显示范围是一个三角形区域,对该区域的像素采样可以从顶点位置对应的像素开始,逐行采样,每下一行,y坐标(纵坐标)减少一,一直到yk2(原始显示范围对应的最小纵坐标)为止;对于x轴的坐标(横坐标),每下一行采样,坐标往左减一,往右加一。The original display range of this embodiment is a triangular area, and pixel sampling of the area can be started from the pixel corresponding to the vertex position, and sampled line by line. For each next line, the y coordinate (ordinate) is reduced by one until yk2 (original display) For the x-axis coordinate (abscissa), for each x-axis coordinate, the coordinates are decremented by one to the left and one to the right.
在一个实施例中,上述原始显示范围为平行四变形区域;所述平行四变形区域的左上顶点对应视频数据中的第一个像素;In one embodiment, the original display range is a parallel four deformation region; the upper left vertex of the parallel four deformation region corresponds to the first pixel in the video data;
所述根据所述旋转对应关系将视频数据中的各个像素分别填充至所述像素对应的目标坐标位置的过程包括:The process of filling each pixel in the video data to the target coordinate position corresponding to the pixel according to the rotation correspondence relationship includes:
从视频数据中的第一个像素开始,向下逐行采样;其中,在对像素的采样过程中,每向下采样一行,采样坐标的横坐标坐标往左减一,往右减一,采样坐标的纵坐标减一;Starting from the first pixel in the video data, sampling down row by row; wherein, in the sampling process of the pixel, each row is downsampled, the abscissa coordinate of the sampling coordinate is decremented to the left by one, and subtracted to the right by the sampling. The ordinate of the coordinate is decremented by one;
根据所述旋转对应关系将采样得到的像素填充至所述像素对应的目标坐标位置。And sampling the pixel obtained according to the rotation correspondence to a target coordinate position corresponding to the pixel.
本实施例的原始显示范围是一个平行四变形区域,当采集平行四变形区域的左上顶点对应的像素时,可以采用另外一个采集规则。即x坐标(横坐标)往左减一,往右也是减一,保持两个边缘横坐标的绝对值是一致的直到采用到A 点,即x坐标为0;y坐标(纵坐标)可以采用每下一行,y坐标减少一,直至y坐标为原始显示范围的最低点。The original display range of this embodiment is a parallel four-deformation region. When collecting pixels corresponding to the upper left vertex of the parallel four-deformation region, another acquisition rule may be adopted. That is, the x coordinate (abscissa) is decremented by one to the left, and the right is also decremented by one, and the absolute value of the abscissa of the two edges is kept consistent until the adoption of A The point, that is, the x coordinate is 0; the y coordinate (ordinate) can be used for each next line, and the y coordinate is reduced by one until the y coordinate is the lowest point of the original display range.
在一个实施例中,上述原始显示范围是一个倒三角形,此时可以从倒三角形区域的左上顶点点开始,逐行采样,每下一行,y坐标(纵坐标)减少一,一直到倒三角形区域的下顶点;x轴的坐标(横坐标),每下一行采样,坐标往左加一,往右减一。当目标旋转角度为45°或者90°时,采样过程相对简单。In one embodiment, the original display range is an inverted triangle, and the sample can be sampled row by row from the upper left vertex point of the inverted triangle region, and the next y coordinate (ordinate) is reduced by one to the inverted triangle region. The lower vertex; the x-axis coordinate (abscissa), every next line of sampling, the coordinate is increased to the left, minus one to the right. When the target rotation angle is 45° or 90°, the sampling process is relatively simple.
参考图5所示,图5所示为一个实施例的视频数据旋转系统结构示意图,包括:Referring to FIG. 5, FIG. 5 is a schematic structural diagram of a video data rotation system according to an embodiment, including:
获取模块10,用于获取待旋转的视频数据在显示界面对应的原始显示范围;The obtaining module 10 is configured to obtain an original display range corresponding to the video data to be rotated on the display interface;
计算模块20,用于计算所述原始显示范围内各个像素对应的显示坐标按照目标旋转角度旋转后的目标坐标;The calculation module 20 is configured to calculate target coordinates after the display coordinates corresponding to the respective pixels in the original display range are rotated according to the target rotation angle;
确定模块30,用于根据视频数据中像素与显示坐标的原始对应关系确定所述像素与目标坐标的旋转对应关系;a determining module 30, configured to determine a rotation correspondence relationship between the pixel and the target coordinate according to an original correspondence relationship between the pixel and the display coordinate in the video data;
填充模块40,用于根据所述旋转对应关系将视频数据中的各个像素分别填充至所述像素对应的目标坐标位置。The filling module 40 is configured to fill each pixel in the video data to a target coordinate position corresponding to the pixel according to the rotation correspondence.
本发明提供的视频数据旋转系统与本发明提供的视频数据旋转方法一一对应,在所述视频数据旋转方法的实施例阐述的技术特征及其有益效果均适用于视频数据旋转系统的实施例中,特此声明。The video data rotation system provided by the present invention has a one-to-one correspondence with the video data rotation method provided by the present invention, and the technical features and advantages thereof in the embodiment of the video data rotation method are applicable to the embodiment of the video data rotation system. , hereby declare.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-described embodiments may be arbitrarily combined. For the sake of brevity of description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction between the combinations of these technical features, All should be considered as the scope of this manual.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。 The above-described embodiments are merely illustrative of several embodiments of the present invention, and the description thereof is more specific and detailed, but is not to be construed as limiting the scope of the invention. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the invention. Therefore, the scope of the invention should be determined by the appended claims.

Claims (10)

  1. 一种视频数据旋转方法,其特征在于,包括如下步骤:A video data rotation method, comprising the following steps:
    获取待旋转的视频数据在显示界面对应的原始显示范围;Obtaining an original display range corresponding to the video data to be rotated on the display interface;
    计算所述原始显示范围内各个像素对应的显示坐标按照目标旋转角度旋转后的目标坐标;Calculating target coordinates after the display coordinates corresponding to the respective pixels in the original display range are rotated according to the target rotation angle;
    根据视频数据中像素与显示坐标的原始对应关系确定所述像素与目标坐标的旋转对应关系;Determining a rotation correspondence relationship between the pixel and the target coordinate according to an original correspondence relationship between the pixel and the display coordinate in the video data;
    根据所述旋转对应关系将视频数据中的各个像素分别填充至所述像素对应的目标坐标位置。Each pixel in the video data is respectively filled to a target coordinate position corresponding to the pixel according to the rotation correspondence.
  2. 根据权利要求1所述的视频数据旋转方法,其特征在于,所述计算所述原始显示范围内各个像素对应的显示坐标按照目标旋转角度旋转后的目标坐标的过程包括:The video data rotation method according to claim 1, wherein the calculating the target coordinates of the display coordinates corresponding to each pixel in the original display range according to the target rotation angle comprises:
    根据目标旋转角度将显示界面对应的原始坐标系转换为目标坐标系;Converting the original coordinate system corresponding to the display interface to the target coordinate system according to the target rotation angle;
    计算所述原始显示范围在目标坐标系中对应的目标显示范围;Calculating a target display range corresponding to the original display range in the target coordinate system;
    分别计算各个像素对应的显示坐标在目标坐标系中对应的目标坐标。The target coordinates corresponding to the display coordinates of the respective pixels in the target coordinate system are respectively calculated.
  3. 根据权利要求1所述的视频数据旋转方法,其特征在于,所述计算所述原始显示范围内各个像素对应的显示坐标按照目标旋转角度旋转后的目标坐标的过程之前,还包括:The video data rotation method according to claim 1, wherein before the process of calculating the target coordinates of the display coordinates corresponding to each pixel in the original display range according to the target rotation angle, the method further includes:
    在视频数据的获取过程中,检测视频采集单元的旋转角度;In the process of acquiring video data, detecting a rotation angle of the video capturing unit;
    根据所述旋转角度确定所述视频数据的目标旋转角度。A target rotation angle of the video data is determined according to the rotation angle.
  4. 根据权利要求1所述的视频数据旋转方法,其特征在于,所述根据视频数据中像素与显示坐标的原始对应关系确定所述像素与目标坐标的旋转对应关系的过程包括:The video data rotation method according to claim 1, wherein the process of determining a rotation correspondence relationship between the pixel and the target coordinate according to an original correspondence relationship between a pixel and a display coordinate in the video data comprises:
    获取视频数据中各个像素与原始显示范围中的各个显示坐标的对应关系,得到原始对应关系;Obtaining a correspondence between each pixel in the video data and each display coordinate in the original display range, to obtain an original correspondence relationship;
    获取原始显示范围内各个显示坐标与目标坐标范围内各个目标坐标之间的对应关系,得到坐标对应关系; Obtaining a correspondence between each display coordinate in the original display range and each target coordinate in the target coordinate range, and obtaining a coordinate correspondence relationship;
    根据所述原始对应关系和坐标对应关系确定各个像素与各个目标坐标之间的对应关系,得到旋转对应关系。Corresponding relationship between each pixel and each target coordinate is determined according to the original correspondence relationship and the coordinate correspondence relationship, and a rotation correspondence relationship is obtained.
  5. 根据权利要求1所述的视频数据旋转方法,其特征在于,所述根据所述旋转对应关系将视频数据中的各个像素分别填充至所述像素对应的目标坐标位置的过程包括:The video data rotation method according to claim 1, wherein the process of filling each pixel in the video data to the target coordinate position corresponding to the pixel according to the rotation correspondence relationship comprises:
    检测各个像素在所述视频数据中的排列顺序;Detecting an arrangement order of each pixel in the video data;
    根据所述排列顺序从所述视频数据中依次采样获取各个像素,并将所获取的像素分别填充至所述像素对应的目标坐标位置。Each pixel is sequentially sampled from the video data according to the arrangement order, and the acquired pixels are respectively filled to a target coordinate position corresponding to the pixel.
  6. 根据权利要求1所述的视频数据旋转方法,其特征在于,所述计算所述原始显示范围内各个像素对应的显示坐标按照目标旋转角度旋转后的目标坐标的过程之前,还包括:The video data rotation method according to claim 1, wherein before the process of calculating the target coordinates of the display coordinates corresponding to each pixel in the original display range according to the target rotation angle, the method further includes:
    设置双倍速率同步动态随机缓存区,将待旋转的视频数据缓存至所述双倍速率同步动态随机缓存区。A double rate synchronous dynamic random buffer is set, and the video data to be rotated is buffered to the double rate synchronous dynamic random buffer.
  7. 根据权利要求6所述的视频数据旋转方法,其特征在于,所述根据所述旋转对应关系将视频数据中的各个像素分别填充至所述像素对应的目标坐标位置的过程包括:The video data rotation method according to claim 6, wherein the process of filling each pixel in the video data to the target coordinate position corresponding to the pixel according to the rotation correspondence relationship comprises:
    根据所述旋转对应关系将所述双倍速率同步动态随机缓存区缓存的视频数据中各个像素分别填充至所述像素对应的目标坐标位置。And each pixel in the video data buffered by the double rate synchronous dynamic random buffer is respectively filled to a target coordinate position corresponding to the pixel according to the rotation correspondence.
  8. 根据权利要求1至7任一项所述的视频数据旋转方法,其特征在于,所述原始显示范围为三角形区域;所述三角形区域的顶点对应视频数据中的第一个像素;The video data rotation method according to any one of claims 1 to 7, wherein the original display range is a triangular area; the vertices of the triangular area correspond to a first pixel in the video data;
    所述根据所述旋转对应关系将视频数据中的各个像素分别填充至所述像素对应的目标坐标位置的过程包括:The process of filling each pixel in the video data to the target coordinate position corresponding to the pixel according to the rotation correspondence relationship includes:
    从视频数据中的第一个像素开始,向下逐行采样;其中,在对像素的采样过程中,每向下采样一行,采样坐标的纵坐标减一,采样坐标的横坐标向左减一,向右加一;Starting from the first pixel in the video data, sampling down line by line; wherein, in the sampling process of the pixel, each line is downsampled, the ordinate of the sampling coordinate is decremented by one, and the abscissa of the sampling coordinate is decremented by one to the left. , add one to the right;
    根据所述旋转对应关系将采样得到的像素填充至所述像素对应的目标坐标 位置。Filling the sampled pixels to the target coordinates corresponding to the pixels according to the rotation correspondence position.
  9. 根据权利要求1至7任一项所述的视频数据旋转方法,其特征在于,所述原始显示范围为平行四变形区域;所述平行四变形区域的左上顶点对应视频数据中的第一个像素;The video data rotation method according to any one of claims 1 to 7, wherein the original display range is a parallel four-deformation region; the upper left vertex of the parallel four-deformation region corresponds to the first pixel in the video data. ;
    所述根据所述旋转对应关系将视频数据中的各个像素分别填充至所述像素对应的目标坐标位置的过程包括:The process of filling each pixel in the video data to the target coordinate position corresponding to the pixel according to the rotation correspondence relationship includes:
    从视频数据中的第一个像素开始,向下逐行采样;其中,在对像素的采样过程中,每向下采样一行,采样坐标的横坐标坐标往左减一,往右减一,采样坐标的纵坐标减一;Starting from the first pixel in the video data, sampling down row by row; wherein, in the sampling process of the pixel, each row is downsampled, the abscissa coordinate of the sampling coordinate is decremented to the left by one, and subtracted to the right by the sampling. The ordinate of the coordinate is decremented by one;
    根据所述旋转对应关系将采样得到的像素填充至所述像素对应的目标坐标位置。And sampling the pixel obtained according to the rotation correspondence to a target coordinate position corresponding to the pixel.
  10. 一种视频数据旋转系统,其特征在于,包括:A video data rotation system, comprising:
    获取模块,用于获取待旋转的视频数据在显示界面对应的原始显示范围;The obtaining module is configured to obtain an original display range corresponding to the video data to be rotated on the display interface;
    计算模块,用于计算所述原始显示范围内各个像素对应的显示坐标按照目标旋转角度旋转后的目标坐标;a calculation module, configured to calculate target coordinates after the display coordinates corresponding to the respective pixels in the original display range are rotated according to the target rotation angle;
    确定模块,用于根据视频数据中像素与显示坐标的原始对应关系确定所述像素与目标坐标的旋转对应关系;a determining module, configured to determine a rotation correspondence relationship between the pixel and the target coordinate according to an original correspondence relationship between the pixel and the display coordinate in the video data;
    填充模块,用于根据所述旋转对应关系将视频数据中的各个像素分别填充至所述像素对应的目标坐标位置。 And a filling module, configured to fill each pixel in the video data to a target coordinate position corresponding to the pixel according to the rotation correspondence.
PCT/CN2017/096479 2016-12-13 2017-08-08 Video data rotation method and system WO2018107776A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611148195.XA CN106791481A (en) 2016-12-13 2016-12-13 Video data spinning solution and system
CN201611148195.X 2016-12-13

Publications (1)

Publication Number Publication Date
WO2018107776A1 true WO2018107776A1 (en) 2018-06-21

Family

ID=58881117

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/096479 WO2018107776A1 (en) 2016-12-13 2017-08-08 Video data rotation method and system

Country Status (2)

Country Link
CN (1) CN106791481A (en)
WO (1) WO2018107776A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109658337A (en) * 2018-11-21 2019-04-19 中国航空工业集团公司洛阳电光设备研究所 A kind of FPGA implementation method of image real-time electronic racemization
CN111369446A (en) * 2018-12-26 2020-07-03 杭州海康威视数字技术股份有限公司 Image rotation method and device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106791481A (en) * 2016-12-13 2017-05-31 广东威创视讯科技股份有限公司 Video data spinning solution and system
CN108154838A (en) * 2017-12-21 2018-06-12 威创集团股份有限公司 A kind of triangular module display driver circuit implementation method and driving circuit
CN114822269B (en) * 2022-06-27 2022-09-23 深圳市联诚发科技股份有限公司 Intelligent display method, device and equipment of ribbon-shaped display screen and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070292050A1 (en) * 2006-06-16 2007-12-20 Sonix Technology Co., Ltd. Method and apparatus for rotating 2D image
JP2009147453A (en) * 2007-12-11 2009-07-02 Canon Inc Image processing apparatus, method and program
CN102982788A (en) * 2012-12-20 2013-03-20 马国光 Arbitrary-angle rotation processing system and method of real-time video images
CN103826068A (en) * 2014-03-03 2014-05-28 南京航空航天大学 Video image rotation method
CN105430331A (en) * 2015-11-13 2016-03-23 浙江宇视科技有限公司 Method and device for adjusting display direction of monitor image
CN106791481A (en) * 2016-12-13 2017-05-31 广东威创视讯科技股份有限公司 Video data spinning solution and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101527795B (en) * 2009-04-13 2012-06-20 腾讯科技(深圳)有限公司 Processing method for rotating video in broadcasting, device and system thereof
CN103679630A (en) * 2012-09-03 2014-03-26 三星电子(中国)研发中心 Video rotation method
JP6071436B2 (en) * 2012-11-05 2017-02-01 オリンパス株式会社 Imaging apparatus, imaging method, and program
CN105721791B (en) * 2016-02-02 2018-04-17 深圳市创维群欣安防科技股份有限公司 A kind of rotational display method and system of mosaic display screen
CN105739874A (en) * 2016-03-11 2016-07-06 沈阳聚德视频技术有限公司 EDMA achieving method in image rotation based on DSP

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070292050A1 (en) * 2006-06-16 2007-12-20 Sonix Technology Co., Ltd. Method and apparatus for rotating 2D image
JP2009147453A (en) * 2007-12-11 2009-07-02 Canon Inc Image processing apparatus, method and program
CN102982788A (en) * 2012-12-20 2013-03-20 马国光 Arbitrary-angle rotation processing system and method of real-time video images
CN103826068A (en) * 2014-03-03 2014-05-28 南京航空航天大学 Video image rotation method
CN105430331A (en) * 2015-11-13 2016-03-23 浙江宇视科技有限公司 Method and device for adjusting display direction of monitor image
CN106791481A (en) * 2016-12-13 2017-05-31 广东威创视讯科技股份有限公司 Video data spinning solution and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109658337A (en) * 2018-11-21 2019-04-19 中国航空工业集团公司洛阳电光设备研究所 A kind of FPGA implementation method of image real-time electronic racemization
CN109658337B (en) * 2018-11-21 2023-03-24 中国航空工业集团公司洛阳电光设备研究所 FPGA implementation method for real-time electronic despinning of images
CN111369446A (en) * 2018-12-26 2020-07-03 杭州海康威视数字技术股份有限公司 Image rotation method and device
CN111369446B (en) * 2018-12-26 2023-06-02 杭州海康威视数字技术股份有限公司 Image rotation method and device

Also Published As

Publication number Publication date
CN106791481A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
WO2018107776A1 (en) Video data rotation method and system
US8170376B2 (en) Super-resolution device and method
JP4116649B2 (en) High resolution device and method
CN110300292B (en) Projection distortion correction method, device, system and storage medium
US9554048B2 (en) In-stream rolling shutter compensation
CN104463778B (en) A kind of Panoramagram generation method
WO2015165132A1 (en) Method for eliminating edge jags of image with super resolution
JP6450982B2 (en) Structured stereo
JP2012185808A (en) Image processing device, image processing method, computer program and imaging apparatus
JPWO2005024723A1 (en) Image composition system, image composition method and program
JPWO2011010438A1 (en) Parallax detection device, distance measuring device, and parallax detection method
JP2010237177A (en) Mtf measurement instrument and mtf measurement program
CN113310432A (en) Self-adaptive fringe projection three-dimensional measurement method based on pixel-by-pixel regulation
US11244431B2 (en) Image processing
JP2021086616A (en) Method for extracting effective region of fisheye image based on random sampling consistency
KR101140953B1 (en) Method and apparatus for correcting distorted image
CN110211039B (en) Image processing method and device
TWI506567B (en) Image processing apparatus and capturing object profile of image thereof
CN111951193B (en) Horizontal distortion correction method and horizontal distortion correction device for image
JP2020031264A (en) Signal processor, imaging apparatus, signal processing method
WO2017119436A1 (en) Image processing system, image processing device, image processing method, inspection system, and program
JP6317611B2 (en) Display display pattern generating apparatus and program thereof
WO2022218210A1 (en) Image processing method and apparatus, optical system, and computer-readable storage medium
US8970744B2 (en) Two-dimensional lens shading correction
JP5058720B2 (en) Image high resolution apparatus and method

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: 17880719

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 20.11.2019)

122 Ep: pct application non-entry in european phase

Ref document number: 17880719

Country of ref document: EP

Kind code of ref document: A1