[go: up one dir, main page]

CN105430331A - Method and device for adjusting monitor image display direction - Google Patents

Method and device for adjusting monitor image display direction Download PDF

Info

Publication number
CN105430331A
CN105430331A CN201510777871.9A CN201510777871A CN105430331A CN 105430331 A CN105430331 A CN 105430331A CN 201510777871 A CN201510777871 A CN 201510777871A CN 105430331 A CN105430331 A CN 105430331A
Authority
CN
China
Prior art keywords
original
image
coordinates
adjustment
surveillance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510777871.9A
Other languages
Chinese (zh)
Inventor
党栋
王军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201510777871.9A priority Critical patent/CN105430331A/en
Publication of CN105430331A publication Critical patent/CN105430331A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/183Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a single remote source
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30232Surveillance

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

The invention provides a method and device for adjusting a display direction of a monitor image. The method comprises the steps of acquiring a reference line of an original monitor image; calculating an adjusting direction and an adjusting angle for the original monitor image according to the reference line; converting original image coordinates of each pixel point of the original monitor image into target image coordinates according to the adjusting direction and the adjusting angle; and displaying each pixel point in the original monitor image according to the target image coordinates, so as to realize adjustment of the display direction of the original monitor image. Through adoption of the method for adjusting the display direction of the monitor image, problems such as incline of the monitor image caused by wrong installation of a monitor camera are solved, and the user experience is improved. In addition, the installation angle of the monitor camera is not readjusted in the whole process, so that the display direction of the monitor image can be adjusted conveniently.

Description

调整监控图像显示方向的方法和装置Method and device for adjusting monitor image display direction

技术领域technical field

本申请涉及视频监控领域,尤其涉及一种调整监控图像显示方向的方法和装置。The present application relates to the field of video surveillance, in particular to a method and device for adjusting the display direction of surveillance images.

背景技术Background technique

随着视频监控技术的快速发展,监控摄像机的形态也越来越多样化,在满足不同应用场景监控需求的同时,也在无形中提高了安装难度。在实际的工程施工中,施工环境通常都较为复杂,如果施工人员没有安装好监控摄像机,就会导致客户端的监控画面出现倾斜等问题,影响用户的使用体验。With the rapid development of video surveillance technology, the forms of surveillance cameras are becoming more and more diverse. While meeting the monitoring needs of different application scenarios, it also increases the difficulty of installation virtually. In actual engineering construction, the construction environment is usually relatively complicated. If the construction personnel do not install the monitoring camera properly, it will cause problems such as tilting of the monitoring screen of the client, which will affect the user experience.

发明内容Contents of the invention

有鉴于此,本申请提供一种调整监控图像显示方向的方法和装置,以解决由于安装不善所导致的监控画面倾斜的问题。In view of this, the present application provides a method and device for adjusting the display direction of a monitoring image, so as to solve the problem of tilting of the monitoring image caused by improper installation.

具体地,本申请是通过如下技术方案实现的:Specifically, this application is achieved through the following technical solutions:

一种调整监控图像显示方向的方法,所述方法包括:A method for adjusting the display direction of a monitoring image, the method comprising:

获取原始监控图像的基准线;Obtain the baseline of the original surveillance image;

根据所述基准线为所述原始监控图像计算调整方向和调整角度;calculating an adjustment direction and an adjustment angle for the original monitoring image according to the baseline;

根据所述调整方向和所述调整角度将所述原始监控图像各像素点的原始图像坐标转换为目标图像坐标;converting the original image coordinates of each pixel of the original monitoring image into target image coordinates according to the adjustment direction and the adjustment angle;

基于所述目标图像坐标显示所述原始监控图像中的各个像素点,以实现对原始监控图像显示方向的调整。Each pixel in the original surveillance image is displayed based on the coordinates of the target image, so as to realize the adjustment of the display direction of the original surveillance image.

一种调整监控图像显示方向的装置,所述装置包括:A device for adjusting the display direction of a monitoring image, the device comprising:

获取单元,用于获取原始监控图像的基准线;an acquisition unit, configured to acquire the baseline of the original monitoring image;

计算单元,用于根据所述基准线为所述原始监控图像计算调整方向和调整角度;a calculation unit, configured to calculate an adjustment direction and an adjustment angle for the original monitoring image according to the reference line;

转换单元,用于根据所述调整方向和所述调整角度将所述原始监控图像各像素点的原始图像坐标转换为目标图像坐标;a conversion unit, configured to convert the original image coordinates of each pixel of the original monitoring image into target image coordinates according to the adjustment direction and the adjustment angle;

还原单元,用于基于所述目标图像坐标显示所述原始监控图像中的各个像素点,以实现对原始监控图像显示方向的调整。A restoring unit, configured to display each pixel in the original surveillance image based on the coordinates of the target image, so as to adjust the display direction of the original surveillance image.

由以上描述可以看出,本申请可以根据原始监控图像的基准线为原始监控图像计算调整方向和调整角度,然后根据所述调整方向和所述调整角度将所述原始监控图像各像素点的原始图像坐标转换为目标图像坐标,并基于所述目标图像坐标显示所述原始监控图像中的各个像素点,以实现对原始监控图像显示方向的调整,从而解决由于监控摄像机安装不善所导致的监控画面倾斜等问题,提升用户体验。同时,整个过程无需重新调整监控摄像机的安装角度,实现便捷。It can be seen from the above description that the present application can calculate the adjustment direction and adjustment angle for the original monitoring image according to the baseline of the original monitoring image, and then adjust the original values of each pixel of the original monitoring image according to the adjustment direction and the adjustment angle. The image coordinates are converted into target image coordinates, and each pixel in the original surveillance image is displayed based on the target image coordinates, so as to realize the adjustment of the display direction of the original surveillance image, thereby solving the problem of surveillance images caused by improper installation of surveillance cameras Tilt and other issues to improve user experience. At the same time, there is no need to re-adjust the installation angle of the surveillance camera during the whole process, which is convenient.

附图说明Description of drawings

图1是本申请一示例性实施例示出的一种调整监控图像显示方向的方法的流程示意图。Fig. 1 is a schematic flowchart of a method for adjusting the display direction of a surveillance image shown in an exemplary embodiment of the present application.

图2是本申请一示例性实施例示出的另一种调整监控图像显示方向的方法的流程示意图。Fig. 2 is a schematic flowchart of another method for adjusting the display direction of a surveillance image shown in an exemplary embodiment of the present application.

图3是本申请一示例性实施例示出的一种原始图像的基准线示意图。Fig. 3 is a schematic diagram of a baseline of an original image shown in an exemplary embodiment of the present application.

图4是本申请一示例性实施例示出的另一种原始图像的基准线示意图。Fig. 4 is a schematic diagram of another original image baseline shown in an exemplary embodiment of the present application.

图5是本申请一示例性实施例示出的另一种原始图像的基准线示意图。Fig. 5 is a schematic diagram of another original image baseline shown in an exemplary embodiment of the present application.

图6是本申请一示例性实施例示出的另一种原始图像的基准线示意图。Fig. 6 is a schematic diagram of another original image baseline shown in an exemplary embodiment of the present application.

图7是本申请一示例性实施例示出的另一种原始图像的基准线示意图。Fig. 7 is a schematic diagram of another original image baseline shown in an exemplary embodiment of the present application.

图8是本申请一示例性实施例示出的另一种原始图像的基准线示意图。Fig. 8 is a schematic diagram of another original image baseline shown in an exemplary embodiment of the present application.

图9是本申请一示例性实施例示出的另一种原始图像的基准线示意图。Fig. 9 is a schematic diagram of another original image baseline shown in an exemplary embodiment of the present application.

图10是本申请一示例性实施例示出的一种图像坐标系与屏幕坐标系的示意图。Fig. 10 is a schematic diagram of an image coordinate system and a screen coordinate system shown in an exemplary embodiment of the present application.

图11是本申请一示例性实施例示出的一种原始屏幕坐标转换为目标屏幕坐标的示意图。Fig. 11 is a schematic diagram of converting original screen coordinates into target screen coordinates according to an exemplary embodiment of the present application.

图12是本申请一示例性实施例示出的一种用于调整监控图像显示方向的装置的一结构示意图。Fig. 12 is a schematic structural diagram of a device for adjusting the display direction of a surveillance image shown in an exemplary embodiment of the present application.

图13是本申请一示例性实施例示出的一种调整监控图像显示方向的装置的结构示意图。Fig. 13 is a schematic structural diagram of a device for adjusting the display direction of a surveillance image according to an exemplary embodiment of the present application.

具体实施方式detailed description

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present application as recited in the appended claims.

在本申请使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in this application is for the purpose of describing particular embodiments only, and is not intended to limit the application. As used in this application and the appended claims, the singular forms "a", "the", and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It should also be understood that the term "and/or" as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

应当理解,尽管在本申请可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of the present application, first information may also be called second information, and similarly, second information may also be called first information. Depending on the context, the word "if" as used herein may be interpreted as "at" or "when" or "in response to a determination."

图1是本申请一示例性实施例示出的一种调整监控图像显示方向的方法的流程示意图。Fig. 1 is a schematic flowchart of a method for adjusting the display direction of a surveillance image shown in an exemplary embodiment of the present application.

请参考图1,所述调整监控图像显示方向的方法可以应用在监控解码客户端,包括有:Please refer to Figure 1, the method for adjusting the display direction of the monitoring image can be applied to the monitoring decoding client, including:

步骤101,获取原始监控图像的基准线。Step 101, acquiring a baseline of an original surveillance image.

所述原始监控图像为监控摄像机在安装后显示的监控画面,在本实施例中,由于监控摄像机安装不善,比如:安装角度出现倾斜,所以所述原始监控图像通常为画面倾斜的监控图像。The original surveillance image is the surveillance image displayed by the surveillance camera after installation. In this embodiment, due to poor installation of the surveillance camera, for example, the installation angle is tilted, the original surveillance image is usually a surveillance image with a tilted screen.

在本实施例中,调试人员或者用户可以根据原始监控图像的倾斜情况为所述原始监控图像画一条基准线。所述基准线与所述原始监控图像的地面方向平行,所述基准线的方向是以视觉习惯中地面在下方为基准从左到右的方向。In this embodiment, the debugger or the user may draw a baseline for the original monitoring image according to the inclination of the original monitoring image. The reference line is parallel to the ground direction of the original surveillance image, and the direction of the reference line is the direction from left to right based on the ground below in the visual habit.

在本实施例中,可以获取所述基准线的起点坐标和终点坐标,其中,所述起点坐标和所述终点坐标可以为所述基准线基于屏幕的屏幕坐标,也可以是所述基准线基于原始监控图像的图像坐标,本申请对此不作特殊限制。In this embodiment, the start point coordinates and the end point coordinates of the reference line can be acquired, wherein the start point coordinates and the end point coordinates can be the screen coordinates of the reference line based on the screen, or the reference line based on The image coordinates of the original surveillance image, which is not particularly limited in this application.

步骤102,根据所述基准线为所述原始监控图像计算调整方向和调整角度。Step 102, calculating an adjustment direction and an adjustment angle for the original surveillance image according to the reference line.

基于前述步骤101,在获取到所述原始监控图像的基准线之后,可以根据所述基准线的起点坐标、终点坐标以及三角函数公式为所述原始监控图像计算调整方向和调整角度。其中,所述调整方向可以包括:顺时针以及逆时针。Based on the aforementioned step 101, after the reference line of the original monitoring image is obtained, the adjustment direction and adjustment angle can be calculated for the original monitoring image according to the starting point coordinates, end point coordinates and trigonometric function formulas of the reference line. Wherein, the adjustment direction may include: clockwise and counterclockwise.

步骤103,根据所述调整方向和所述调整角度将所述原始监控图像各像素点的原始图像坐标转换为目标图像坐标。Step 103: Transform the original image coordinates of each pixel of the original monitoring image into target image coordinates according to the adjustment direction and the adjustment angle.

在本实施例中,可以根据所述调整方向和所述调整角度通过坐标变换将所述原始监控图像各像素点的原始图像坐标转换为目标图像坐标,所述原始监控图像的各个像素点基于对应的目标图像坐标可以形成所述原始监控图像对应的目标监控图像,所述目标图像是调整后画面没有出现倾斜的图像。In this embodiment, the original image coordinates of each pixel of the original monitoring image can be transformed into target image coordinates through coordinate transformation according to the adjustment direction and the adjustment angle, and each pixel of the original monitoring image is based on the corresponding The coordinates of the target image can form the target monitoring image corresponding to the original monitoring image, and the target image is an image with no screen tilt after adjustment.

步骤104,基于所述目标图像坐标显示所述原始监控图像中的各个像素点,以实现对原始监控图像显示方向的调整。Step 104: Display each pixel in the original monitoring image based on the coordinates of the target image, so as to adjust the display direction of the original monitoring image.

基于前述步骤103,在将所述原始监控图像中各个像素点的原始图像坐标转换为目标图像坐标后,基于所述目标图像坐标显示所述原始监控图像中的各个像素点,以实现对所述原始监控图像进行显示方向的调整。其中,每个目标图像坐标的像素信息为对应原始图像坐标的像素信息。Based on the aforementioned step 103, after converting the original image coordinates of each pixel in the original monitoring image into target image coordinates, each pixel in the original monitoring image is displayed based on the target image coordinates, so as to realize the Adjust the display direction of the original surveillance image. Wherein, the pixel information of each target image coordinate is the pixel information corresponding to the original image coordinate.

由以上描述可以看出,本申请可以根据原始监控图像的基准线为原始监控图像计算调整方向和调整角度,然后根据所述调整方向和所述调整角度将所述原始监控图像各像素点的原始图像坐标转换为目标图像坐标,并基于所述目标图像坐标显示所述原始监控图像中的各个像素点,以实现对原始监控图像显示方向的调整,从而解决由于监控摄像机安装不善所导致的监控画面倾斜等问题,提升用户体验。同时,整个过程无需重新调整监控摄像机的安装角度,实现便捷。It can be seen from the above description that the present application can calculate the adjustment direction and adjustment angle for the original monitoring image according to the baseline of the original monitoring image, and then adjust the original values of each pixel of the original monitoring image according to the adjustment direction and the adjustment angle. The image coordinates are converted into target image coordinates, and each pixel in the original surveillance image is displayed based on the target image coordinates, so as to realize the adjustment of the display direction of the original surveillance image, thereby solving the problem of surveillance images caused by improper installation of surveillance cameras Tilt and other issues to improve user experience. At the same time, there is no need to re-adjust the installation angle of the surveillance camera during the whole process, which is convenient.

图2是本申请一示例性实施例示出的另一种调整监控图像显示方向的方法的流程示意图。Fig. 2 is a schematic flowchart of another method for adjusting the display direction of a surveillance image shown in an exemplary embodiment of the present application.

请参考图2,所述调整监控图像显示方向的方法可以应用在监控解码客户端,包括有:Please refer to Figure 2, the method for adjusting the display direction of the monitoring image can be applied to the monitoring decoding client, including:

步骤201,获取原始监控图像的基准线的起点坐标和终点坐标。Step 201, acquire the starting point coordinates and the ending point coordinates of the reference line of the original monitoring image.

在本实施例中,所述原始监控图像为监控摄像机在安装后显示的监控画面,所述原始监控图像显示出的画面是倾斜的。In this embodiment, the original monitoring image is a monitoring picture displayed by the monitoring camera after installation, and the picture displayed by the original monitoring image is tilted.

在本实施例中,可以在显示出原始监控图像后,输出输入基准线的提示信息给调试人员或者用户,调试人员或者用户可以按照所述提示信息为所述原始监控图像做出一条基准线。所述基准线与所述原始监控图像中显示画面的地面方向平行,调试人员或者用户可以基于视觉习惯中地面在下方的基准从左到右画出所述基准线。在本步骤中,可以获取所述基准线的起点坐标和终点坐标,其中,所述起点坐标和所述终点坐标可以为所述基准线基于屏幕的屏幕坐标,也可以是所述基准线基于原始监控图像的图像坐标,本申请对此不作特殊限制。In this embodiment, after the original monitoring image is displayed, prompt information for inputting the baseline can be output to the debugger or user, and the debugger or user can make a baseline for the original monitor image according to the prompt information. The reference line is parallel to the ground direction of the display screen in the original monitoring image, and the debugger or the user can draw the reference line from left to right based on the reference of the ground below in the visual habit. In this step, the starting point coordinates and end point coordinates of the reference line can be obtained, wherein the starting point coordinates and the end point coordinates can be the screen coordinates of the reference line based on the screen, or the reference line can be based on the original The image coordinates of the monitoring image are not particularly limited in this application.

在实际实现中,调试人员或者用户可以通过鼠标画出所述原始监控图像的基准线,也可以通过触摸屏幕或其他输入设备画出所述基准线,本申请对此不作特殊限制。In actual implementation, the debugger or the user can draw the baseline of the original monitoring image through a mouse, or draw the baseline through a touch screen or other input devices, which is not particularly limited in this application.

步骤202,根据所述起点坐标、所述终点坐标以及三角函数公式为所述原始监控图像计算调整方向和调整角度。Step 202: Calculate an adjustment direction and an adjustment angle for the original surveillance image according to the starting point coordinates, the end point coordinates, and a trigonometric function formula.

在本实施例中,以所述起点坐标以及所述终点坐标为基于原始监控图像的图像坐标为例,为所述原始监控图像计算调整方向和调整角度的过程可以分为以下七种情况:In this embodiment, taking the coordinates of the start point and the coordinates of the end point as image coordinates based on the original monitoring image as an example, the process of calculating the adjustment direction and adjustment angle for the original monitoring image can be divided into the following seven situations:

第一种情况:请参考图3,在图3所示的基准线示意图中,ABCD组成的矩形为显示屏幕,A点为原始监控图像的图像坐标系的原点,AB为原始监控图像的图像坐标系的Y轴正向方向,AD为原始监控图像的图像坐标系的X轴正向方向,矩形EFGH为倾斜的原始监控图像中的监控物体的画面,线段MN为所述原始监控图像的基准线,其中,M点为所述基准线的起点,N点为所述基准线的终点(上述示例同样适用于后续图4至图9的基准线示意图,后续不再一一赘述)。在图3中,原始监控图像中地面在基准线MN的下方,与基准线MN平行。由图3可以看出,为了使原始监控图像不发生倾斜,需要将原始监控图像顺时针方向旋转θ角度,即调整方向为顺时针方向,调整角度α为θ。在实际实现中,可以通过M点和N点的坐标确定所述调整方向和调整角度。具体地,假设M点坐标为(XM,YM),N点坐标为(XN,YN),则调整角度其中,m=|XN-XM|,n=|YN-YM|。当XN>XM,且YN<YM时,可以确定所述调整方向为顺时针方向。The first situation: Please refer to Figure 3. In the baseline schematic diagram shown in Figure 3, the rectangle formed by ABCD is the display screen, point A is the origin of the image coordinate system of the original monitoring image, and AB is the image coordinate of the original monitoring image The positive direction of the Y axis of the system, AD is the positive direction of the X axis of the image coordinate system of the original monitoring image, the rectangle EFGH is the picture of the monitoring object in the inclined original monitoring image, and the line segment MN is the baseline of the original monitoring image , wherein, point M is the starting point of the reference line, and point N is the end point of the reference line (the above example is also applicable to the schematic diagrams of the subsequent reference lines in FIGS. In FIG. 3 , the ground in the original surveillance image is below the baseline MN and parallel to the baseline MN. It can be seen from Figure 3 that in order to prevent the original surveillance image from being tilted, it is necessary to rotate the original surveillance image by an angle θ clockwise, that is, the adjustment direction is clockwise, and the adjustment angle α is θ. In actual implementation, the adjustment direction and adjustment angle can be determined through the coordinates of the M point and the N point. Specifically, assuming that the coordinates of point M are (X M , Y M ), and the coordinates of point N are (X N , Y N ), the adjustment angle Wherein, m=|X N -X M |, n=|Y N -Y M |. When X N >X M , and Y N <Y M , it can be determined that the adjustment direction is clockwise.

第二种情况:请参考图4,在图4所示的基准线示意图中,原始监控图像中地面在基准线MN的上方,与基准线MN平行。由图4可以看出,为了使原始监控图像不发生倾斜,需要将原始监控图像逆时针方向旋转180-θ角度,即调整方向为逆时针方向,调整角度α为180-θ。在实际实现中,也可以通过M点和N点的坐标确定所述调整方向和调整角度。具体地,假设M点坐标为(XM,YM),N点坐标为(XN,YN),则调整角度其中,m=|XN-XM|,n=|YN-YM|。当XN<XM,且YN>YM时,可以确定所述调整方向为逆时针方向。The second case: please refer to FIG. 4 . In the schematic diagram of the baseline shown in FIG. 4 , the ground in the original surveillance image is above the baseline MN and parallel to the baseline MN. It can be seen from Figure 4 that in order to keep the original surveillance image from tilting, it is necessary to rotate the original surveillance image by an angle of 180-θ counterclockwise, that is, the adjustment direction is counterclockwise, and the adjustment angle α is 180-θ. In actual implementation, the adjustment direction and adjustment angle may also be determined by the coordinates of the M point and the N point. Specifically, assuming that the coordinates of point M are (X M , Y M ), and the coordinates of point N are (X N , Y N ), the adjustment angle Wherein, m=|X N -X M |, n=|Y N -Y M |. When X N <X M , and Y N >Y M , it can be determined that the adjustment direction is counterclockwise.

第三种情况:请参考图5,在图5所示的基准线示意图中,原始监控图像中地面在基准线MN的上方,与基准线MN平行。由图5可以看出,为了使原始监控图像不发生倾斜,需要将原始监控图像顺时针方向旋转180-θ角度,即调整方向为顺时针方向,调整角度α为180-θ。在实际实现中,也可以通过M点和N点的坐标确定所述调整方向和调整角度。具体地,假设M点坐标为(XM,YM),N点坐标为(XN,YN),则调整角度其中,m=|XN-XM|,n=|YN-YM|。当XN<XM,且YN<YM时,可以确定所述调整方向为逆时针方向。The third case: please refer to FIG. 5 , in the schematic diagram of the baseline shown in FIG. 5 , the ground in the original surveillance image is above the baseline MN and parallel to the baseline MN. It can be seen from Figure 5 that in order to prevent the original surveillance image from being tilted, it is necessary to rotate the original surveillance image by an angle of 180-θ clockwise, that is, the adjustment direction is clockwise, and the adjustment angle α is 180-θ. In actual implementation, the adjustment direction and adjustment angle may also be determined by the coordinates of the M point and the N point. Specifically, assuming that the coordinates of point M are (X M , Y M ), and the coordinates of point N are (X N , Y N ), the adjustment angle Wherein, m=|X N -X M |, n=|Y N -Y M |. When X N <X M , and Y N <Y M , it can be determined that the adjustment direction is counterclockwise.

第四种情况:请参考图6,在图6所示的基准线示意图中,原始监控图像中地面在基准线MN的下方,与基准线MN平行。由图6可以看出,为了使原始监控图像不发生倾斜,需要将原始监控图像逆时针方向旋转θ角度,即调整方向为逆时针方向,调整角度α为θ。在实际实现中,也可以通过M点和N点的坐标确定所述调整方向和调整角度。具体地,假设M点坐标为(XM,YM),N点坐标为(XN,YN),则调整角度其中,m=|XN-XM|,n=|YN-YM|。当XN>XM,且YN>YM时,可以确定所述调整方向为逆时针方向。The fourth situation: Please refer to FIG. 6 . In the schematic diagram of the baseline shown in FIG. 6 , the ground in the original surveillance image is below the baseline MN and parallel to the baseline MN. It can be seen from Figure 6 that in order to prevent the original surveillance image from being tilted, it is necessary to rotate the original surveillance image counterclockwise by an angle θ, that is, the adjustment direction is counterclockwise, and the adjustment angle α is θ. In actual implementation, the adjustment direction and adjustment angle may also be determined by the coordinates of the M point and the N point. Specifically, assuming that the coordinates of point M are (X M , Y M ), and the coordinates of point N are (X N , Y N ), the adjustment angle Wherein, m=|X N -X M |, n=|Y N -Y M |. When X N >X M , and Y N >Y M , it can be determined that the adjustment direction is counterclockwise.

第五种情况:请参考图7,在图7所示的基准线示意图中,原始监控图像中地面在基准线MN的左侧,与基准线MN平行。由图7可以看出,为了使原始监控图像不发生倾斜,需要将原始监控图像逆时针方向旋转90度,即调整方向为逆时针方向,调整角度α为90度。在实际实现中,也可以通过M点和N点的坐标确定所述调整方向。具体地,假设M点坐标为(XM,YM),N点坐标为(XN,YN),则当XM=XN,但YN>YM时,可以确认所述调整方向为逆时针方向,所述调整角度为90度。The fifth situation: Please refer to FIG. 7 . In the schematic diagram of the baseline shown in FIG. 7 , the ground in the original surveillance image is on the left side of the baseline MN and is parallel to the baseline MN. It can be seen from Fig. 7 that in order to prevent the original surveillance image from being tilted, the original surveillance image needs to be rotated 90 degrees counterclockwise, that is, the adjustment direction is counterclockwise, and the adjustment angle α is 90 degrees. In actual implementation, the adjustment direction may also be determined by the coordinates of the M point and the N point. Specifically, assuming that the coordinates of point M are (X M , Y M ), and the coordinates of point N are (X N , Y N ), then when X M =X N , but Y N >Y M , the adjustment direction can be confirmed For the counterclockwise direction, the adjustment angle is 90 degrees.

第六种情况:请参考图8,在图8所示的基准线示意图中,原始监控图像中地面在基准线MN的右侧,与基准线MN平行。由图8可以看出,为了使原始监控图像不发生倾斜,需要将原始监控图像顺时针方向旋转90度,即调整方向为顺时针方向,调整角度α为90度。在实际实现中,也可以通过M点和N点的坐标确定所述调整方向。具体地,假设M点坐标为(XM,YM),N点坐标为(XN,YN),则当XM=XN,但YN<YM时,可以确认所述调整方向为顺时针方向,所述调整角度为90度。The sixth situation: please refer to FIG. 8 , in the schematic diagram of the baseline shown in FIG. 8 , the ground in the original surveillance image is on the right side of the baseline MN, and is parallel to the baseline MN. It can be seen from Fig. 8 that in order to prevent the original surveillance image from being tilted, the original surveillance image needs to be rotated 90 degrees clockwise, that is, the adjustment direction is clockwise, and the adjustment angle α is 90 degrees. In actual implementation, the adjustment direction may also be determined by the coordinates of the M point and the N point. Specifically, assuming that the coordinates of point M are (X M , Y M ), and the coordinates of point N are (X N , Y N ), then when X M =X N , but Y N <Y M , the adjustment direction can be confirmed For the clockwise direction, the adjustment angle is 90 degrees.

第七种情况:请参考图9,在图9所示的基准线示意图中,原始监控图像中地面在基准线MN的上方,与基准线MN平行。由图9可以看出,为了使原始监控图像不发生倾斜,需要将原始监控图像顺时针方向或者逆时针方向旋转180度,即调整方向为顺时针方向或逆时针方向,调整角度α为180度。在实际实现中,也可以通过M点和N点的坐标确定所述调整方向。具体地,假设M点坐标为(XM,YM),N点坐标为(XN,YN),则当YM=YN,但XN<XM时,可以确认所述调整方向为顺时针方向或者逆时针方向,所述调整角度为180度。The seventh case: please refer to FIG. 9 , in the schematic diagram of the baseline shown in FIG. 9 , the ground in the original surveillance image is above the baseline MN and parallel to the baseline MN. It can be seen from Figure 9 that in order to prevent the original surveillance image from being tilted, the original surveillance image needs to be rotated 180 degrees clockwise or counterclockwise, that is, the adjustment direction is clockwise or counterclockwise, and the adjustment angle α is 180 degrees . In actual implementation, the adjustment direction may also be determined by the coordinates of the M point and the N point. Specifically, assuming that the coordinates of point M are (X M , Y M ), and the coordinates of point N are (X N , Y N ), then when Y M =Y N , but X N <X M , the adjustment direction can be confirmed It is clockwise or counterclockwise, and the adjustment angle is 180 degrees.

值得注意的是,上述七种情况仅为示例性的描述,在实际实现中,依据基准线的不同输入规则,也可以采取不同的方式为所述原始监控图像计算调整方向和调整角度,本申请对此不作特殊限制。It is worth noting that the above seven situations are only exemplary descriptions. In actual implementation, according to different input rules of the baseline, different methods can also be used to calculate the adjustment direction and adjustment angle for the original monitoring image. This application There are no particular restrictions on this.

步骤203,将所述原始监控图像各像素点的原始图像坐标转换为原始屏幕坐标。Step 203, converting the original image coordinates of each pixel of the original monitoring image into original screen coordinates.

在本实施例中,涉及到图像坐标与屏幕坐标之间的转换。请参考图10,本申请一种图像坐标系与屏幕坐标系的示意图,ABCD组成的矩形为显示屏幕,在图像坐标系中,A点为原始监控图像的图像坐标系的原点,AB为原始监控图像的图像坐标系的Y轴正向方向,AD为原始监控图像的图像坐标系的X轴正向方向。在屏幕坐标系中,屏幕的中心点O点为屏幕坐标系的原点,水平向右的方向为X轴正向方向,垂直向上的方向为Y轴正向方向。In this embodiment, conversion between image coordinates and screen coordinates is involved. Please refer to Figure 10, a schematic diagram of an image coordinate system and a screen coordinate system in the present application. The rectangle formed by ABCD is the display screen. In the image coordinate system, point A is the origin of the image coordinate system of the original monitoring image, and AB is the original monitoring image. The positive direction of the Y axis of the image coordinate system of the image, and AD is the positive direction of the X axis of the image coordinate system of the original monitoring image. In the screen coordinate system, the center point O of the screen is the origin of the screen coordinate system, the horizontal direction to the right is the positive direction of the X-axis, and the vertical upward direction is the positive direction of the Y-axis.

在本实施例中,原始监控图像的高度为屏幕的高度,即原始监控图像的高度H0为AB的长度,原始监控图像的宽度为屏幕的宽度,即原始监控图像的宽度W0为AD的长度。假设,原始监控图像各个像素点在图像坐标系中的原始图像坐标为(X0,Y0),原始监控图像各个像素点在屏幕坐标系中的原始屏幕坐标为(X1,Y1),则所述原始图像坐标与所述原始屏幕坐标之间有如下映射关系:In this embodiment, the height of the original monitoring image is the height of the screen, that is, the height H of the original monitoring image is the length of AB, and the width of the original monitoring image is the width of the screen, that is, the width W of the original monitoring image is AD. length. Assume that the original image coordinates of each pixel of the original monitoring image in the image coordinate system are (X 0 , Y 0 ), and the original screen coordinates of each pixel of the original monitoring image in the screen coordinate system are (X 1 , Y 1 ), Then there is the following mapping relationship between the original image coordinates and the original screen coordinates:

Xx 11 == Xx 00 -- 0.50.5 WW 00 YY 11 == -- YY 00 ++ 0.50.5 Hh 00

在本步骤中,可以根据上述映射关系将原始监控图像各像素点的原始图像坐标转换为原始屏幕坐标。In this step, the original image coordinates of each pixel of the original monitoring image may be converted into original screen coordinates according to the above mapping relationship.

步骤204,基于所述调整方向、调整角度以及所述原始屏幕坐标计算所述原始监控图像各像素点的目标屏幕坐标。Step 204 , calculating target screen coordinates of each pixel of the original monitoring image based on the adjustment direction, adjustment angle and the original screen coordinates.

基于前述步骤203,在得到原始监控图像各个像素点的原始屏幕坐标之后,可以根据步骤202中计算得到的调整方向和调整角度,计算所述原始监控图像各个像素点的目标屏幕坐标。所述目标屏幕坐标为所述原始监控图像基于所述调整方向和调整角度调整之后各个像素点的屏幕坐标。Based on the aforementioned step 203, after obtaining the original screen coordinates of each pixel of the original monitoring image, the target screen coordinates of each pixel of the original monitoring image can be calculated according to the adjustment direction and adjustment angle calculated in step 202. The target screen coordinates are the screen coordinates of each pixel of the original monitoring image after adjustment based on the adjustment direction and adjustment angle.

以所述调整方向为顺时针方向,所述调整角度为θ为例,请参考图11,假设原始监控图像中某像素点K点的原始屏幕坐标为(X1,Y1),基于所述调整角度和所述调整方向旋转后的目标屏幕坐标为(X2,Y2),则请参考图11,依据三角函数公式,可以得到如下关系:Taking the adjustment direction as clockwise and the adjustment angle as θ as an example, please refer to Fig. 11, assuming that the original screen coordinates of a certain pixel point K in the original surveillance image are (X 1 , Y 1 ), based on the The coordinates of the target screen after the adjustment angle and the adjustment direction are rotated are (X 2 , Y 2 ), please refer to Figure 11, and according to the trigonometric function formula, the following relationship can be obtained:

X 1 = r &times; cos &beta; Y 1 = r &times; sin &beta; 以及 X 2 = r &times; cos ( &beta; - &theta; ) Y 2 = r &times; sin ( &beta; - &theta; ) x 1 = r &times; cos &beta; Y 1 = r &times; sin &beta; as well as x 2 = r &times; cos ( &beta; - &theta; ) Y 2 = r &times; sin ( &beta; - &theta; )

根据上述关系,可以得到如下原始屏幕坐标与目标屏幕坐标之间的变换关系:According to the above relationship, the transformation relationship between the original screen coordinates and the target screen coordinates can be obtained as follows:

Xx 22 == Xx 11 &times;&times; coscos &theta;&theta; ++ YY 11 &times;&times; sinsin &theta;&theta; YY 22 == -- Xx 11 &times;&times; sinsin &theta;&theta; ++ YY 11 &times;&times; coscos &theta;&theta;

根据上述变换关系,可以计算出所述原始监控图像各像素点的目标屏幕坐标。当所述调整方向为逆时针方向,所述调整角度为θ或180-θ时,可以参照上述方式计算,出所述原始监控图像各像素点的目标屏幕坐标,本申请在此不再一一赘述。According to the above transformation relationship, the target screen coordinates of each pixel of the original monitoring image can be calculated. When the adjustment direction is counterclockwise and the adjustment angle is θ or 180-θ, the target screen coordinates of each pixel of the original monitoring image can be calculated by referring to the above method, and the present application will not describe them one by one here. repeat.

步骤205,将所述目标屏幕坐标还原为目标图像坐标。Step 205, restoring the target screen coordinates to target image coordinates.

在本实施例中,所述目标图像坐标为所述原始监控图像中各个像素点经旋转调整后的图像坐标。假设,所述原始监控图像在经过旋转调整后图像的高度为H1,宽度为W1,所述原始监控图像各个像素点的目标图像坐标为(X3,Y3),则所述目标图像坐标与所述目标屏幕坐标之间的映射关系如下:In this embodiment, the target image coordinates are the image coordinates of each pixel in the original surveillance image after rotation adjustment. Assuming that the height of the original surveillance image after rotation and adjustment is H 1 , the width is W 1 , and the target image coordinates of each pixel of the original surveillance image are (X 3 , Y 3 ), then the target image The mapping relationship between the coordinates and the target screen coordinates is as follows:

Xx 33 == Xx 22 ++ 0.50.5 WW 11 YY 33 == -- YY 22 ++ 0.50.5 Hh 11

在本步骤中,基于上述映射关系可以将原始监控图像各个像素点的目标屏幕坐标还原为目标图像坐标。In this step, the target screen coordinates of each pixel of the original monitoring image can be restored to the target image coordinates based on the above mapping relationship.

步骤206,基于所述目标图像坐标显示所述原始监控图像中的各个像素点,以实现对原始监控图像显示方向的调整。Step 206: Display each pixel in the original monitoring image based on the coordinates of the target image, so as to adjust the display direction of the original monitoring image.

在本实施例中,在显示所述原始监控图像时,基于前述步骤计算出的所述原始监控图像中各个像素点的目标图像坐标,显示所述原始监控图像中各个像素点,以实现对原始监控图像显示方向的调整。In this embodiment, when displaying the original monitoring image, each pixel in the original monitoring image is displayed based on the target image coordinates of each pixel in the original monitoring image calculated in the preceding steps, so as to realize the original Monitor image display direction adjustment.

在本步骤中,所述目标图像坐标的像素信息为其对应的原始图像坐标的像素信息,所述像素信息可以包括:RGB数据等。In this step, the pixel information of the target image coordinates is the corresponding pixel information of the original image coordinates, and the pixel information may include: RGB data and the like.

由以上描述可以看出,本申请可以根据原始监控图像的基准线为原始监控图像计算调整方向和调整角度,然后根据所述调整方向和所述调整角度将所述原始监控图像各像素点的原始图像坐标转换为目标图像坐标,并基于所述目标图像坐标显示所述原始监控图像中的各个像素点,以实现对原始监控图像显示方向的调整,从而解决由于监控摄像机安装不善所导致的监控画面倾斜等问题,提升用户体验。同时,整个过程无需重新调整监控摄像机的安装角度,实现便捷。It can be seen from the above description that the present application can calculate the adjustment direction and adjustment angle for the original monitoring image according to the baseline of the original monitoring image, and then adjust the original values of each pixel of the original monitoring image according to the adjustment direction and the adjustment angle. The image coordinates are converted into target image coordinates, and each pixel in the original surveillance image is displayed based on the target image coordinates, so as to realize the adjustment of the display direction of the original surveillance image, thereby solving the problem of surveillance images caused by improper installation of surveillance cameras Tilt and other issues to improve user experience. At the same time, there is no need to re-adjust the installation angle of the surveillance camera during the whole process, which is convenient.

本申请上述实施例描述的是将原始监控图像进行调整后显示,可选的,在本申请另一个例子中,针对原始监控视频,按照原始帧率显示进行显示方向调整后的监控图像,以实现对原始监控视频显示方向的调整。举例来说,假设所述原始监控视频包括有100帧原始监控图像,原始帧率为F,可以依次计算出将每张原始监控图像中各个像素点的目标图像坐标,为便于描述,可以将基于所述目标图像坐标显示所述原始监控图像中的各个像素点后形成的图像称为目标监控图像,则所述100帧原始监控图像对应100帧目标监控图像,在本实施例中,可以根据原始帧率F依次显示所述100帧目标监控图像,以实现对原始监控视频显示方向的调整。The foregoing embodiments of the present application describe that the original surveillance image is displayed after adjustment. Optionally, in another example of the present application, the original surveillance video is displayed according to the original frame rate to display the surveillance image after adjusting the display direction, so as to realize Adjustments to the orientation of the original surveillance video display. For example, assuming that the original monitoring video includes 100 frames of original monitoring images, and the original frame rate is F, the target image coordinates of each pixel in each original monitoring image can be calculated in turn. For the convenience of description, based on The image formed after the coordinates of the target image display each pixel in the original monitoring image is called a target monitoring image, and the 100 frames of original monitoring images correspond to 100 frames of target monitoring images. In this embodiment, the original The frame rate F sequentially displays the 100 frames of target surveillance images, so as to adjust the display direction of the original surveillance video.

可选的,在本申请另一个例子中,在进行原始监控图像中各个像素点的坐标变换时,还可以依据原始图像坐标与原始屏幕坐标之间的映射关系、原始屏幕坐标与目标屏幕坐标之间的映射关系以及目标图像坐标与目标屏幕坐标之间的映射关系,可以采用如下旋转矩阵进行坐标变换:Optionally, in another example of the present application, when performing the coordinate transformation of each pixel in the original monitoring image, the mapping relationship between the original image coordinates and the original screen coordinates, and the relationship between the original screen coordinates and the target screen coordinates can also be used. The mapping relationship between the target image coordinates and the target screen coordinates, the following rotation matrix can be used for coordinate transformation:

Xx 33 YY 33 11 == coscos &theta;&theta; sinsin &theta;&theta; 00 -- sinsin &theta;&theta; coscos &theta;&theta; 00 -- 0.50.5 WW 00 coscos &theta;&theta; ++ 0.50.5 Hh 00 sinsin &theta;&theta; ++ 0.50.5 WW 11 -- 0.50.5 WW 00 sinsin &theta;&theta; -- 0.50.5 Hh 00 coscos &theta;&theta; ++ 0.50.5 Hh 11 11

已将所述原始监控图像各个像素点的原始图像坐标转换为目标图像坐标,然后再根据如下还原矩阵确定每个目标图像坐标对应的原始图像坐标:The original image coordinates of each pixel of the original monitoring image have been converted into target image coordinates, and then the original image coordinates corresponding to each target image coordinate are determined according to the following restoration matrix:

X 0 Y 0 1 = cos &theta; - sin &theta; 0 sin &theta; cos &theta; 0 - 0.5 W 1 cos &theta; - 0.5 H 1 sin &theta; + 0.5 W 0 0.5 W 1 sin &theta; - 0.5 H 1 cos &theta; + 0.5 H 0 1 , 以获取目标图像坐标对应原始坐标图像的像素信息并进行显示。 x 0 Y 0 1 = cos &theta; - sin &theta; 0 sin &theta; cos &theta; 0 - 0.5 W 1 cos &theta; - 0.5 h 1 sin &theta; + 0.5 W 0 0.5 W 1 sin &theta; - 0.5 h 1 cos &theta; + 0.5 h 0 1 , To obtain and display the pixel information of the original coordinate image corresponding to the target image coordinates.

与前述调整监控图像显示方向的方法的实施例相对应,本申请还提供了调整监控图像显示方向的装置的实施例。Corresponding to the foregoing embodiments of the method for adjusting the display direction of a surveillance image, the present application also provides embodiments of an apparatus for adjusting the display direction of a surveillance image.

本申请调整监控图像显示方向的装置的实施例可以应用在监控解码客户端上。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在监控解码客户端的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图12所示,为本申请调整监控图像显示方向的装置所在监控解码客户端的一种硬件结构图,除了图12所示的处理器、内存、网络接口、以及非易失性存储器之外,实施例中装置所在的监控解码客户端通常根据该监控解码客户端的实际功能,还可以包括其他硬件,对此不再赘述。The embodiment of the device for adjusting the display direction of a surveillance image in this application can be applied to a surveillance decoding client. The device embodiments can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory for operation through the processor of the monitoring and decoding client where it is located. From the hardware level, as shown in Figure 12, it is a hardware structure diagram of the monitoring and decoding client where the device for adjusting the display direction of the monitoring image is located, except for the processor, memory, network interface, and non-volatile memory shown in Figure 12 In addition to the volatile memory, the monitoring and decoding client of the device in the embodiment usually may include other hardware according to the actual function of the monitoring and decoding client, which will not be repeated here.

图13是本申请一示例性实施例示出的一种调整监控图像显示方向的装置的结构示意图。Fig. 13 is a schematic structural diagram of a device for adjusting the display direction of a surveillance image according to an exemplary embodiment of the present application.

请参考图13,所述调整监控图像显示方向的装置1200可以应用在前述图12所示的监控解码客户端中,包括有:获取单元1201、计算单元1202、转换单元1203、还原单元1204以及视频调整单元1205。Please refer to FIG. 13 , the device 1200 for adjusting the display direction of surveillance images can be applied to the surveillance decoding client shown in FIG. adjustment unit 1205 .

其中,所述获取单元1201,用于获取原始监控图像的基准线;Wherein, the acquiring unit 1201 is configured to acquire the baseline of the original surveillance image;

所述计算单元1202,用于根据所述基准线为所述原始监控图像计算调整方向和调整角度;The calculation unit 1202 is configured to calculate an adjustment direction and an adjustment angle for the original monitoring image according to the reference line;

所述转换单元1203,用于根据所述调整方向和所述调整角度将所述原始监控图像各像素点的原始图像坐标转换为目标图像坐标;The conversion unit 1203 is configured to convert the original image coordinates of each pixel of the original monitoring image into target image coordinates according to the adjustment direction and the adjustment angle;

所述1204还原单元,用于基于所述目标图像坐标显示所述原始监控图像中的各个像素点,以实现对原始监控图像显示方向的调整。The 1204 restoration unit is configured to display each pixel in the original surveillance image based on the coordinates of the target image, so as to adjust the display direction of the original surveillance image.

可选的,所述基准线与所述原始监控图像的地面方向平行;Optionally, the reference line is parallel to the ground direction of the original surveillance image;

所述获取单元1201,具体获取原始监控图像的所述基准线的起点坐标和终点坐标;The acquiring unit 1201 specifically acquires the starting point coordinates and the ending point coordinates of the reference line of the original monitoring image;

所述计算单元1202,具体根据所述起点坐标、所述终点坐标以及三角函数公式为所述原始监控图像计算调整方向和调整角度。The calculation unit 1202 specifically calculates an adjustment direction and an adjustment angle for the original monitoring image according to the starting point coordinates, the end point coordinates and trigonometric function formulas.

可选的,所述转换单元1203,具体将所述原始监控图像各像素点的原始图像坐标转换为原始屏幕坐标;Optionally, the conversion unit 1203 specifically converts the original image coordinates of each pixel of the original monitoring image into original screen coordinates;

基于所述调整方向、调整角度以及所述原始屏幕坐标计算所述原始监控图像各像素点的目标屏幕坐标;calculating target screen coordinates of each pixel of the original monitoring image based on the adjustment direction, adjustment angle, and the original screen coordinates;

将所述目标屏幕坐标还原为目标图像坐标。Revert the target screen coordinates to target image coordinates.

所述视频调整单元1205,用于针对原始监控视频中的每一帧原始监控图像,按照原始帧率显示进行显示方向调整后的监控图像。The video adjustment unit 1205 is configured to, for each frame of the original surveillance image in the original surveillance video, display the surveillance image after display orientation adjustment according to the original frame rate.

可选的,所述目标图像坐标的像素信息为对应原始图像坐标的像素信息。Optionally, the pixel information of the target image coordinates is pixel information corresponding to the original image coordinates.

上述装置中各个单元的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。For the implementation process of the functions and effects of each unit in the above device, please refer to the implementation process of the corresponding steps in the above method for details, and will not be repeated here.

对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本申请方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。As for the device embodiment, since it basically corresponds to the method embodiment, for related parts, please refer to the part description of the method embodiment. The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this application. It can be understood and implemented by those skilled in the art without creative effort.

以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。The above is only a preferred embodiment of the application, and is not intended to limit the application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the application should be included in the application. within the scope of protection.

Claims (10)

1.一种调整监控图像显示方向的方法,其特征在于,所述方法包括:1. A method for adjusting the display direction of a monitoring image, characterized in that the method comprises: 获取原始监控图像的基准线;Obtain the baseline of the original surveillance image; 根据所述基准线为所述原始监控图像计算调整方向和调整角度;calculating an adjustment direction and an adjustment angle for the original monitoring image according to the baseline; 根据所述调整方向和所述调整角度将所述原始监控图像各像素点的原始图像坐标转换为目标图像坐标;converting the original image coordinates of each pixel of the original monitoring image into target image coordinates according to the adjustment direction and the adjustment angle; 基于所述目标图像坐标显示所述原始监控图像中的各个像素点,以实现对原始监控图像显示方向的调整。Each pixel in the original surveillance image is displayed based on the coordinates of the target image, so as to realize the adjustment of the display direction of the original surveillance image. 2.根据权利要求1所述的方法,其特征在于,2. The method of claim 1, wherein, 所述基准线与所述原始监控图像的地面方向平行;The reference line is parallel to the ground direction of the original monitoring image; 所述获取原始监控图像的基准线,包括:The baseline for obtaining the original monitoring image includes: 获取原始监控图像的所述基准线的起点坐标和终点坐标;Obtain the starting point coordinates and end point coordinates of the reference line of the original monitoring image; 所述根据所述基准线为所述原始监控图像计算调整方向和调整角度,包括:The calculating the adjustment direction and the adjustment angle for the original monitoring image according to the reference line includes: 根据所述起点坐标、所述终点坐标以及三角函数公式为所述原始监控图像计算调整方向和调整角度。calculating an adjustment direction and an adjustment angle for the original monitoring image according to the starting point coordinates, the end point coordinates, and a trigonometric function formula. 3.根据权利要求1所述的方法,其特征在于,所述根据所述调整方向和所述调整角度将所述原始监控图像各像素点的原始图像坐标转换为目标图像坐标,包括:3. The method according to claim 1, wherein converting the original image coordinates of each pixel of the original monitoring image into target image coordinates according to the adjustment direction and the adjustment angle comprises: 将所述原始监控图像各像素点的原始图像坐标转换为原始屏幕坐标;converting the original image coordinates of each pixel of the original monitoring image into original screen coordinates; 基于所述调整方向、调整角度以及所述原始屏幕坐标计算所述原始监控图像各像素点的目标屏幕坐标;calculating target screen coordinates of each pixel of the original monitoring image based on the adjustment direction, adjustment angle, and the original screen coordinates; 将所述目标屏幕坐标还原为目标图像坐标。Revert the target screen coordinates to target image coordinates. 4.根据权利要求1所述的方法,其特征在于,所述方法还包括:4. The method according to claim 1, wherein the method further comprises: 针对原始监控视频中的每一帧原始监控图像,按照原始帧率显示进行显示方向调整后的监控图像。For each frame of the original surveillance image in the original surveillance video, the surveillance image after display direction adjustment is displayed according to the original frame rate. 5.根据权利要求1所述的方法,其特征在于,5. The method of claim 1, wherein, 所述目标图像坐标的像素信息为对应原始图像坐标的像素信息。The pixel information of the target image coordinates is pixel information corresponding to the original image coordinates. 6.一种调整监控图像显示方向的装置,其特征在于,所述装置包括:6. A device for adjusting the display direction of a monitoring image, characterized in that the device comprises: 获取单元,用于获取原始监控图像的基准线;an acquisition unit, configured to acquire the baseline of the original monitoring image; 计算单元,用于根据所述基准线为所述原始监控图像计算调整方向和调整角度;a calculation unit, configured to calculate an adjustment direction and an adjustment angle for the original monitoring image according to the reference line; 转换单元,用于根据所述调整方向和所述调整角度将所述原始监控图像各像素点的原始图像坐标转换为目标图像坐标;a conversion unit, configured to convert the original image coordinates of each pixel of the original monitoring image into target image coordinates according to the adjustment direction and the adjustment angle; 还原单元,用于基于所述目标图像坐标显示所述原始监控图像中的各个像素点,以实现对原始监控图像显示方向的调整。A restoring unit, configured to display each pixel in the original surveillance image based on the coordinates of the target image, so as to adjust the display direction of the original surveillance image. 7.根据权利要求6所述的装置,其特征在于,7. The device of claim 6, wherein: 所述基准线与所述原始监控图像的地面方向平行;The reference line is parallel to the ground direction of the original monitoring image; 所述获取单元,具体获取原始监控图像的所述基准线的起点坐标和终点坐标;The acquiring unit specifically acquires the starting point coordinates and the ending point coordinates of the reference line of the original monitoring image; 所述计算单元,具体根据所述起点坐标、所述终点坐标以及三角函数公式为所述原始监控图像计算调整方向和调整角度。The calculation unit specifically calculates an adjustment direction and an adjustment angle for the original monitoring image according to the starting point coordinates, the end point coordinates, and trigonometric function formulas. 8.根据权利要求6所述的装置,其特征在于,8. The device of claim 6, wherein: 所述转换单元,具体将所述原始监控图像各像素点的原始图像坐标转换为原始屏幕坐标;The conversion unit specifically converts the original image coordinates of each pixel of the original monitoring image into original screen coordinates; 基于所述调整方向、调整角度以及所述原始屏幕坐标计算所述原始监控图像各像素点的目标屏幕坐标;calculating target screen coordinates of each pixel of the original monitoring image based on the adjustment direction, adjustment angle, and the original screen coordinates; 将所述目标屏幕坐标还原为目标图像坐标。Revert the target screen coordinates to target image coordinates. 9.根据权利要求6所述的装置,其特征在于,所述装置还包括:9. The device according to claim 6, further comprising: 视频调整单元,用于针对原始监控视频中的每一帧原始监控图像,按照原始帧率显示进行显示方向调整后的监控图像。The video adjustment unit is used for displaying the surveillance image after display direction adjustment according to the original frame rate for each frame of the original surveillance image in the original surveillance video. 10.根据权利要求6所述的装置,其特征在于,10. The apparatus of claim 6, wherein: 所述目标图像坐标的像素信息为对应原始图像坐标的像素信息。The pixel information of the target image coordinates is pixel information corresponding to the original image coordinates.
CN201510777871.9A 2015-11-13 2015-11-13 Method and device for adjusting monitor image display direction Pending CN105430331A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510777871.9A CN105430331A (en) 2015-11-13 2015-11-13 Method and device for adjusting monitor image display direction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510777871.9A CN105430331A (en) 2015-11-13 2015-11-13 Method and device for adjusting monitor image display direction

Publications (1)

Publication Number Publication Date
CN105430331A true CN105430331A (en) 2016-03-23

Family

ID=55508230

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510777871.9A Pending CN105430331A (en) 2015-11-13 2015-11-13 Method and device for adjusting monitor image display direction

Country Status (1)

Country Link
CN (1) CN105430331A (en)

Cited By (9)

* 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
CN107466385A (en) * 2016-08-03 2017-12-12 深圳市大疆灵眸科技有限公司 A cloud platform control method and system
CN107592454A (en) * 2017-09-08 2018-01-16 维沃移动通信有限公司 A kind of image processing method and mobile terminal
CN107659772A (en) * 2017-09-26 2018-02-02 歌尔科技有限公司 3D rendering generation method, device and electronic equipment
CN111210482A (en) * 2020-02-24 2020-05-29 高新兴科技集团股份有限公司 Real-time deviation rectifying method for video image of camera, computer storage medium and equipment
CN112783585A (en) * 2020-07-21 2021-05-11 华人运通(上海)云计算科技有限公司 Interface adjusting method and device, electronic equipment, vehicle and storage medium
CN112837211A (en) * 2021-01-28 2021-05-25 北京奇艺世纪科技有限公司 Picture processing method and device, electronic equipment and readable storage medium
CN113313634A (en) * 2020-02-26 2021-08-27 杭州海康威视数字技术股份有限公司 Monitoring image processing method, device, monitoring system and storage medium
CN114758208A (en) * 2022-06-14 2022-07-15 深圳市海清视讯科技有限公司 Attendance checking equipment adjusting method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1158768A3 (en) * 2000-05-17 2004-05-12 NexPress Solutions LLC Real time electronic registration of scanned documents
CN1741726A (en) * 2004-08-23 2006-03-01 富士机械制造株式会社 Device data creation method and device data creation device
US20090052802A1 (en) * 2007-08-24 2009-02-26 The Generations Network, Inc. User Interface Method For Skew Correction
CN102567724A (en) * 2010-12-11 2012-07-11 鸿富锦精密工业(深圳)有限公司 Image correction system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1158768A3 (en) * 2000-05-17 2004-05-12 NexPress Solutions LLC Real time electronic registration of scanned documents
CN1741726A (en) * 2004-08-23 2006-03-01 富士机械制造株式会社 Device data creation method and device data creation device
US20090052802A1 (en) * 2007-08-24 2009-02-26 The Generations Network, Inc. User Interface Method For Skew Correction
CN102567724A (en) * 2010-12-11 2012-07-11 鸿富锦精密工业(深圳)有限公司 Image correction system and method

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107466385A (en) * 2016-08-03 2017-12-12 深圳市大疆灵眸科技有限公司 A cloud platform control method and system
WO2018107776A1 (en) * 2016-12-13 2018-06-21 威创集团股份有限公司 Video data rotation method and system
CN106791481A (en) * 2016-12-13 2017-05-31 广东威创视讯科技股份有限公司 Video data spinning solution and system
CN107592454A (en) * 2017-09-08 2018-01-16 维沃移动通信有限公司 A kind of image processing method and mobile terminal
CN107659772B (en) * 2017-09-26 2020-10-09 歌尔科技有限公司 3D image generation method and device and electronic equipment
CN107659772A (en) * 2017-09-26 2018-02-02 歌尔科技有限公司 3D rendering generation method, device and electronic equipment
CN111210482A (en) * 2020-02-24 2020-05-29 高新兴科技集团股份有限公司 Real-time deviation rectifying method for video image of camera, computer storage medium and equipment
CN111210482B (en) * 2020-02-24 2024-03-05 高新兴科技集团股份有限公司 Real-time correction method for video image of camera, computer storage medium and equipment
CN113313634A (en) * 2020-02-26 2021-08-27 杭州海康威视数字技术股份有限公司 Monitoring image processing method, device, monitoring system and storage medium
CN113313634B (en) * 2020-02-26 2023-06-09 杭州海康威视数字技术股份有限公司 Monitoring image processing method, device, monitoring system and storage medium
CN112783585A (en) * 2020-07-21 2021-05-11 华人运通(上海)云计算科技有限公司 Interface adjusting method and device, electronic equipment, vehicle and storage medium
CN112837211A (en) * 2021-01-28 2021-05-25 北京奇艺世纪科技有限公司 Picture processing method and device, electronic equipment and readable storage medium
CN114758208A (en) * 2022-06-14 2022-07-15 深圳市海清视讯科技有限公司 Attendance checking equipment adjusting method and device, electronic equipment and storage medium
CN114758208B (en) * 2022-06-14 2022-09-06 深圳市海清视讯科技有限公司 Attendance checking equipment adjusting method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN105430331A (en) Method and device for adjusting monitor image display direction
CN103905761B (en) Image processing system and image processing method
CN111127655B (en) House layout drawing construction method and device, and storage medium
US10600150B2 (en) Utilizing an inertial measurement device to adjust orientation of panorama digital images
US20140098296A1 (en) Method and apparatus for changing a perspective of a video
TWI719493B (en) Image projection system, image projection apparatus and calibrating method for display image thereof
US9165535B2 (en) System and method for determining a zoom factor of content displayed on a display device
TWI545522B (en) Method and system for generating thumbnails of images
WO2020147698A1 (en) Picture optimization method and device, terminal and corresponding storage medium
WO2020135580A1 (en) Panoramic image splicing method, device, terminal and corresponding storage medium
CN105191278A (en) Method for correcting image from wide-angle lens and device therefor
WO2020062498A1 (en) Image display method and video processing device
CN111246189A (en) Virtual screen projection implementation method and device and electronic equipment
CN113167568A (en) Coordinate calculation device, coordinate calculation method, and computer-readable recording medium
WO2018113339A1 (en) Projection image construction method and device
TWI554107B (en) Imaging adjusting method capable of varing scaling ratios and related camera and image processing system
CN102236441A (en) Interactive three-dimensional image display system and method
WO2018058476A1 (en) Image correction method and device
US10592194B2 (en) Method and system for multiple display device projection
EP4283986A1 (en) Electronic apparatus and control method thereof
CN107079126A (en) image projection
WO2018006669A1 (en) Parallax fusion method and apparatus
TW201701191A (en) A face directional display system and method
WO2017000647A1 (en) Image display method and device
CN103208119B (en) Method for correcting perspective image shot by handheld device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160323