Disclosure of Invention
The technical problem to be solved by the invention is to provide a method for generating an annular display area in infrared panoramic monitoring, which is characterized in that an infrared panoramic rectangular monitoring image is converted into an annular display image, and the azimuth information of a target around a monitoring point can be visually seen through annular display; the method is realized by splicing and zooming each line segment parallel to the long edge of the rectangle into a circumference through progressive zooming, so that the whole rectangle is converted into a circular ring.
The method comprises the steps of firstly connecting rectangular images end to form a circular ring, then calculating the scaling ratio from any line segment parallel to the long edge in the rectangle to each corresponding circumference, further calculating the arc length of the distance between any target point in the circular ring from the wide edge of the rectangle to the splicing line of the circular ring, further calculating the included angle between the target point and the splicing line, and finally calculating the coordinate of the target in the circular ring. The infrared panoramic monitoring image can be correspondingly displayed in the annular display area through converting the rectangular image into the annular image, and clear azimuth information is displayed.
In order to achieve the purpose, the invention adopts the following technical scheme:
1. a method for generating a middle girdle display area in infrared panoramic monitoring is characterized in that the long edge of an infrared panoramic rectangular frame is arranged along the direction of an x axis of a coordinate axis, and the length is w; the wide side of the rectangular frame runs along the y axis of the coordinate axis, the width is h, a target point A (x, y) observed in the panoramic rectangular frame is converted into an annular display area to be displayed, and the method comprises the following steps:
step 1: the left and right wide sides of the rectangular frame are spliced together to form a circular ring
Assuming that the center of the circle is the same as the coordinate of the upper left corner of the panoramic rectangular frame and is located at the origin (0, 0), the perimeter of the excircle of the circle is equal to the length w of the rectangle, the distance between two circles in the circle is equal to the width h of the rectangle, and the radius of the large circle of the circle is r1, the circle is divided into three parts, namely a circle center, a circle center
In the conversion process, each line segment parallel to the long edge in the rectangle is progressively converted into the circumference between each large circle and each small circle in the circular ring;
step 2: the above-mentioned scaling p of each rectangular long side to each circular perimeter is calculated,
and step 3: calculating the arc length and included angle from the target point in the ring belt area to the joint line of the ring
Distance moment of target point A (x, y) on rectangleThe distance between the left wide side and the right wide side is x, the required arc length
The included angle theta between the target point (x1, y1) on the ring and the joint of the ring, the obtained arc length l is divided by the radius r2 of the circle C, and the process is simplified
And 4, step 4: calculating coordinates of target points in a girdle band
From the rectangle to the ring, the splicing line of the ring can be at any position, the included angle between the splicing line and the positive half shaft of the x axis is theta 1, and then the target point
Assuming that the splice line is located on the y-axis positive half axis (positive downward), the distance from the x-axis positive half axis to the splice line is
Then
And 5: generalizing the coordinates of the target point on the ring when the outer circumference of the ring is an arbitrary value
Establishing the target in the ring belt area in the way that the outer circumference of the ring is equal to the length w of the long side of the rectangle; when the outer circumference is an arbitrary value b, the target point in the ring zone
Step 6: generalization when the width of the girdle region (the interval between two circles) is an arbitrary value, the coordinates of the target point in the girdle region
Establishing the target in the ring belt area, wherein the width of the ring is equal to the width h of the rectangle; when zooming a small circle in the ring, namely changing the width of the ring belt area from h to alpha h, the distance from the target point (x3, y3) in the ring to the outer circle of the ring is changed from y1 to alpha y1, and the radius r3 of the circle where the target point is located is changed to r 1-alpha y, namely
The angle theta is not changed, therefore
And 7: the method is popularized to the coordinates of the target point in the girdle area when the circle center of the girdle area is at any position of the coordinate axis
The derivation is based on the assumption that the center of the circle is located at the origin of the coordinate axis (0, 0). When the center of the circle is moved to the point (p, q), the target point (x4, y4) in the girdle is (x3+ p, y3+ q).
Preferably, step 2 specifically comprises:
according to the condition setting for converting the rectangle into the circle in step 1, assuming that the coordinates of the target point a (x, y) in the rectangular frame in the annular display area are (x1, y1), the origin (0, 0) is taken as the center, the target point (x1, y1) is taken as a point on the circumference as a circle C, the radius of the circle C is r2, and then r2 is (r 1-y). This is because the distance from the target point a (x, y) to the long side of the rectangle in the rectangle is y; when converted into a zone, the distance of the target point (x1, y1) from the outer circle circumference is y, so the radius of the circle on which the target point (x1, y1) is located, i.e. the circle C, is r2 ═ r 1-y; the circumference l of the circle C is 2 pi r2 pi 2 pi (r1-y), and the circumference l is w-2 pi y after simplification; scaling
The invention can convert the infrared panoramic monitoring image into the annular belt image to be displayed, can observe the directions of all targets visually by observing the annular belt image, and can perform self-defined setting on the outer circumference, the inner circumference and the circle center of the converted annular belt image so as to optimize the display effect.
Detailed Description
The invention provides a method for generating a middle-zone display area in infrared panoramic monitoring, which comprises the following steps:
the long edge of the infrared panoramic rectangular frame runs along the x axis of the coordinate axis (the x axis is positive to the right), and the length is w; the wide side of the rectangular frame runs along the y axis of the coordinate axis (the lower part of the y axis is positive), and the width is h. A target point a (x, y) is observed in the infrared panoramic rectangular box, as shown in fig. 1:
the target point A (x, y) observed in the panoramic rectangular frame is converted and displayed in the annular display area,
step 1: the left and right wide sides of the rectangular frame are spliced together to form a circular ring
The center of the circle is assumed to be the same as the coordinate of the upper left corner of the panoramic rectangular frame, and the circle and the coordinate are both located at the origin (0, 0). The circumference of the excircle of the ring is equal to the length w of the rectangle, the distance between two circles in the ring is equal to the width h of the rectangle, and the radius of the large circle of the ring is r1, then
During the transformation, each line segment parallel to the long side in the rectangle is progressively transformed into the circumference of each of the large and small circles in the circle.
Step 2: calculating the scaling ratio rho from each rectangular long edge to each circular perimeter
According to the condition setting for converting the rectangle into the circle in step 1, the coordinates of the target point a (x, y) in the rectangular frame in the zone display area are set to (x1, y 1). With the origin (0, 0) as the center, the target point (x1,y1) is a point on the circumference as a circle C, the radius of the circle C is r2, and then r2 is (r 1-y). This is because the distance from the target point a (x, y) to the long side of the rectangle in the rectangle is y. When converted into a zone, the distance of the target point (x1, y1) from the outer circle circumference is y, so the radius of the circle on which the target point (x1, y1) is located, i.e. circle C, is r2 ═ r 1-y. The circumference l of the circle C is 2 pi r2 pi 2 pi (r1-y), and after simplification, the circumference l is w-2 pi y. Thus scaling
And step 3: calculating the arc length and included angle from the target point in the ring belt area to the joint line of the ring
The distance from the target point A (x, y) on the rectangle to the left wide side of the rectangle is x, and the arc length is obtained
According to the arc length formula, the arc length is the included angle (radian) and the radius, the included angle theta between the target point (x1, y1) on the circular ring and the splicing part of the circular ring can be obtained, namely the obtained arc length l is divided by the radius r2 of the circle C, and the operation is simplified
As shown in fig. 2:
and 4, step 4: calculating coordinates of target points in a girdle band
From the rectangle to the ring, the splicing line of the ring can be at any position, the included angle between the splicing line and the positive half shaft of the x axis is theta 1, and then the target point
For example, assuming the splice line is located on the positive y-axis half (positive downward), the positive x-axis half is located a distance from the splice line
Then
And 5: generalizing the coordinates of the target point on the ring when the outer circumference of the ring is an arbitrary value
The above-found target in the ring belt region is established at the outer circumference of the ring equal to the length w of the long side of the rectangle. When the outer circumference is an arbitrary value b, the target point in the ring zone
Step 6: generalization when the width of the girdle region (the interval between two circles) is an arbitrary value, the coordinates of the target point in the girdle region
The above-found target in the ring zone is established when the width of the ring is equal to the width h of the rectangle. When zooming a small circle in the ring, i.e., changing the width of the girdle region from h to α h, the distance from the target point (x3, y3) in the ring to the outer circle of the ring changes from y1 to α y1, and the radius r3 of the circle where the target point is located changes to r1- α y, i.e., the radius r3 of the circle where the target point is located changes to r1- α y
The angle theta is not changed, therefore
And 7: the method is popularized to the coordinates of the target point in the girdle area when the circle center of the girdle area is at any position of the coordinate axis
The derivation is based on the assumption that the center of the circle is located at the origin of the coordinate axis (0, 0). When the center of the circle is moved to the point (p, q), the target point (x4, y4) in the girdle is (x3+ p, y3+ q).
Example 1
Setting the length of a rectangular image monitored by the infrared panorama as w and the width as h, converting the rectangular image into a circular image with the outer circumference as b, the width of a circular ring as alpha h, the included angle between a splicing part and an x axis as theta 1, and the circle center of the circular ring as (p, q), observing a target point (x, y) in the infrared panorama rectangular frame, and correspondingly converting the coordinate of the circular ring into the coordinate as follows: