Azimuth angle determination method and device of image acquisition equipment, electronic equipment and product

By acquiring the image and solar azimuth angle of the image acquisition device, the azimuth angle of the image acquisition device is calculated, which solves the problem of determining the azimuth angle of the image acquisition device in the security field, and improves the control of image acquisition effect and field of view.

CN119665943APending Publication Date: 2025-03-21HANGZHOU HIKVISION SYST TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411707317.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

In the field of security, how to effectively determine the azimuth angle of the image acquisition device to ensure the optimality of the image acquisition effect and field of view.

Method used

By acquiring the images collected by the image acquisition device and determining the solar azimuth angle of the position of the device, the azimuth angle of the image acquisition device is calculated based on this information.

Benefits of technology

The azimuth angle of the image acquisition device is accurately determined, and the effect of image acquisition and controllability of the field of view are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119665943A_ABST
    Figure CN119665943A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of security and protection, and provides an azimuth angle determination method and device of image acquisition equipment, electronic equipment and a product. The method comprises the following steps: acquiring an image acquired by image acquisition equipment; determining a solar azimuth angle of the position of the image acquisition equipment; and determining the azimuth angle of the image acquisition equipment based on the solar azimuth angle and the image. According to the invention, the azimuth angle of the image acquisition equipment can be determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of security technology, and in particular relates to a method, device, electronic equipment and product for determining the azimuth angle of an image acquisition device. Background Art

[0002] In the field of security, image acquisition devices are used to collect real-time images of monitoring points. The orientation of the image acquisition device has a crucial impact on the image shooting effect and field of view. For example, the azimuth of the image acquisition device can be used to represent the orientation of the image acquisition device. Therefore, how to determine the azimuth of the image acquisition device is an urgent problem to be solved. Summary of the invention

[0003] The embodiments of the present application provide a method, an apparatus, an electronic device and a product for determining the azimuth angle of an image acquisition device, which can determine the azimuth angle of an image acquisition device.

[0004] In a first aspect, an embodiment of the present application provides a method for determining an azimuth angle of an image acquisition device, comprising:

[0005] Acquire an image acquired by an image acquisition device;

[0006] Determining the solar azimuth angle of the position of the image acquisition device;

[0007] Based on the solar azimuth and the image, the azimuth of the image acquisition device is determined.

[0008] In an embodiment of the present application, by acquiring an image captured by an image acquisition device and determining the solar azimuth at the location of the image acquisition device, the azimuth of the image acquisition device can be determined based on the solar azimuth and the image.

[0009] In a second aspect, an embodiment of the present application provides an azimuth angle determination device for an image acquisition device, comprising:

[0010] An image acquisition module, used to acquire images acquired by an image acquisition device;

[0011] A solar azimuth determination module, used to determine the solar azimuth angle at the location of the image acquisition device;

[0012] The device azimuth determination module is used to determine the azimuth of the image acquisition device based on the solar azimuth and the image.

[0013] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device implements the method described in the first aspect above.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, the method described in the first aspect above is implemented.

[0015] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, wherein when the computer program is executed, the method described in the first aspect above is executed.

[0016] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 is a schematic diagram of an azimuth angle determination system for an image acquisition device provided in an embodiment of the present application;

[0019] Figure 2 It is a flowchart of a method for determining an azimuth angle of an image acquisition device provided in an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of a process for determining the azimuth angle of an image acquisition device provided in an embodiment of the present application;

[0021] Figure 4 This is an example of identifying the sun from an image;

[0022] Figure 5 is an example diagram of the field of view angle of an image acquisition device;

[0023] Figure 6 is an example diagram of the azimuth angle of the image acquisition device;

[0024] Figure 7 is another schematic diagram of a process for determining the azimuth angle of an image acquisition device provided in an embodiment of the present application;

[0025] Figure 8 This is an example diagram of the midline direction of the image;

[0026] Fig. 9 is an example image of a shadow;

[0027] Fig.10This is a sample picture of shadows in the morning;

[0028] Figure 11-1 This is an example of a pedestrian’s shadow in the image captured by camera 1 in the morning;

[0029] Figure 11-2 This is an example of a pedestrian’s shadow in the image captured by camera 2 in the morning;

[0030] Figure 11-3 This is an example of a pedestrian’s shadow in the image captured by camera 3 in the morning;

[0031] Figure 11-4 This is an example of a pedestrian’s shadow in the image captured by camera 4 in the morning;

[0032] Fig.12 This is an example of shadows in the afternoon;

[0033] Figure 13-1 This is an example of a pedestrian's shadow in the image captured by camera 1 in the afternoon;

[0034] Figure 13-2 This is an example of a pedestrian's shadow in the image captured by camera 2 in the afternoon;

[0035] Figure 13-3 This is an example of a pedestrian's shadow in the image captured by camera 3 in the afternoon;

[0036] Figure 13-4 This is an example of a pedestrian's shadow in the image captured by camera 4 in the afternoon;

[0037] Fig.14 is a structural schematic diagram of an azimuth angle determination device for an image acquisition device provided in an embodiment of the present application;

[0038] Fig.15 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0040] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0041] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0042] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0043] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0044] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0045] The azimuth angle determination method of the image acquisition device provided in the embodiment of the present application can be applied to electronic devices such as mobile phones, tablet computers, servers, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), image acquisition devices, etc. The embodiment of the present application does not impose any restrictions on the specific types of electronic devices.

[0046] For example, Figure 1FIG. 1 is a schematic diagram showing an azimuth angle determination system of an image acquisition device provided in an embodiment of the present application. Figure 1 As shown, when the electronic device is not an image acquisition device, the system includes an image acquisition device 101 and an electronic device 102. The electronic device 102 and the image acquisition device 101 are in communication connection.

[0047] It should be understood that the image acquisition device 101 can be a 360-degree surround view device, an explosion-proof camera, a wide-angle camera, a fixed-focus camera, etc. This application does not limit the product form of the image acquisition device 101.

[0048] The image acquisition device 101 is used to acquire images of monitoring points and send the acquired images to the electronic device 102 .

[0049] The electronic device 102 is used to determine the solar azimuth of the position where the image acquisition device 101 is located, and based on the solar azimuth and the image captured by the image acquisition device 101, determine the azimuth of the image acquisition device 101. The specific implementation scheme can be found in the method for determining the azimuth of the image acquisition device described in the following embodiment. Among them, the azimuth of the image acquisition device is based on the due north direction of the image acquisition device as the starting direction, that is, 0°. Its value range is from 0 to 360°, and the calculation rotation method is: with the image acquisition device as the axis, the north direction of the image acquisition device as the starting point, along the horizontal plane, rotate one circle in a clockwise direction, and the azimuth gradually increases to 360°. The solar azimuth of the position where the image acquisition device is located is generally the angle measured in a clockwise direction along the horizontal plane with the due north direction of the image acquisition device as the starting direction and the incident direction of the sun as the ending direction.

[0050] See also Figure 2 , Figure 2 The flowchart of the method for determining the azimuth angle of an image acquisition device provided in an embodiment of the present application is shown, which is applied to an electronic device. As an example but not a limitation, the method includes the following steps:

[0051] Step 201: Acquire an image captured by an image acquisition device.

[0052] The above-mentioned image may be a frame of a video stream of a monitoring point, or a static video picture captured by an image acquisition device, which is not limited in the present application.

[0053] In the case where the electronic device is an image acquisition device, the image acquisition device may acquire an image of the monitoring point and execute step 202 and step 203 to obtain the azimuth angle of the image acquisition device.

[0054] When the electronic device is not an image acquisition device, the image acquisition device can acquire images of the monitoring point and send the acquired images to the electronic device; after receiving the images acquired by the image acquisition device, the electronic device can execute steps 202 and 203 to obtain the azimuth angle of the image acquisition device.

[0055] Step 202, determining the solar azimuth angle of the location of the image acquisition device.

[0056] In this embodiment, the azimuth of the image acquisition device can be determined by associating the content of the image with the azimuth information of the real world. Since the change of the solar azimuth is periodic, the solar azimuth can be calculated from multiple dependent variables such as longitude and latitude, time, date, etc., and these dependent variables can be easily obtained based on the image acquisition device. Therefore, in order to more accurately determine the azimuth of the image acquisition device at the location and at the image acquisition time of the image acquisition date, the sun can be selected as the associated object to associate the content of the image with the solar azimuth of the real world.

[0057] The image acquisition date may refer to the acquisition date of the image in step 201. The image acquisition time may refer to the acquisition time of the image in step 201.

[0058] As an example but not limitation, the image in the above step 201 is an image of the monitoring point captured in real time by the image acquisition device at 09:20 on October 20, 2024. Then the acquisition date of the image is October 20, 2024, and the acquisition time of the image is 09:20.

[0059] In a possible implementation, the solar azimuth angle at the location of the image acquisition device may be calculated using the following formula.

[0060] cosA s =(sinH s ×sinφ-sinδ)÷(cosH s ×cosφ)

[0061] Among them, A s represents the solar azimuth, H s represents the solar altitude angle, φ represents the geographical latitude of the location of the image acquisition device, and δ represents the solar declination.

[0062] The solar altitude angle may refer to the angle between the sunlight at the location where the image acquisition device is located and the surface section connecting the location with the center of the earth.

[0063] Solar declination, also known as the declination angle, is the angle between the Earth's equatorial plane and the line connecting the Sun and the Earth's center. The declination angle moves within the range of +23°26′ and -23°26′ with a yearly cycle. It is a sign of the seasons, that is, the angle at which the Sun shines directly on the equator.

[0064] The calculation formula for the solar altitude angle is as follows:

[0065] sI s = sinφ×sinδ+cosφ×cosδ×cost

[0066] Where t represents the solar hour angle at the time of image acquisition.

[0067] The solar hour angle can refer to the hour angle of the center of the solar disk, that is, the angular distance from the celestial meridian of the observation point along the celestial equator to the hour circle where the sun is located. Taking the earth as an example, at the same time on the earth, for people at the same longitude and different latitudes, the hour angle corresponding to the sun is the same. The earth rotates 360°, corresponding to 24 hours, that is, the corresponding hour angle per hour is 15°.

[0068] The calculation formula of t is as follows:

[0069] t=(t'-12)×15°

[0070] Where t' represents true solar time, i.e. local time. The solar hour angle is zero at local noon, negative in the morning, and positive in the afternoon.

[0071] The formula for calculating the solar declination is as follows:

[0072] δ=0.006918-0.399912cos(b)+0.070257sin(b)-0.006758cos(2b)+0.000907sin(2b)

[0073] -0.002697cos(3b)+0.00148sin(3b)

[0074] b=2×PI×(N-1) / 365

[0075] Where N is the number of days from January 1st of each year to the image acquisition date, and PI represents pi.

[0076] Step 203, determining the azimuth of the image acquisition device based on the solar azimuth and the image.

[0077] Based on the solar azimuth and the image, the electronic device can associate the content of the image with the solar azimuth in the real world, thereby more accurately determining the azimuth of the image acquisition device at its location and at the image acquisition time on the image acquisition date.

[0078] The electronic device can associate the content of the image with the real-world solar azimuth in the following two ways to determine the azimuth of the image acquisition device (i.e., the azimuth of the image acquisition device at its location and at the image acquisition time on the image acquisition date).

[0079] Method 1, please refer to Figure 3 , the electronic device can determine the azimuth angle of the image acquisition device through steps 301 and 302.

[0080] Step 301: determine a first angle difference based on an image.

[0081] Among them, the above-mentioned first angle difference is the angle difference between the solar azimuth and the azimuth of the image acquisition device to be determined (that is, the difference obtained by subtracting the azimuth of the image acquisition device to be determined from the solar azimuth), or the angle difference between the azimuth of the image acquisition device to be determined and the solar azimuth (that is, the difference obtained by subtracting the azimuth of the solar azimuth from the azimuth of the image acquisition device to be determined).

[0082] Based on the image, the electronic device can associate the content of the image with the real-world solar azimuth and the azimuth of the real-world image acquisition device to determine a first angle difference. The azimuth of the image acquisition device can be determined based on the first angle difference and the solar azimuth.

[0083] In a possible implementation, the first angle difference may be determined by the sun identified in the image. The implementation scheme is as follows:

[0084] Based on the width of the image and the horizontal field of view of the image acquisition device, determine the angle corresponding to the unit width;

[0085] Based on the width of the image, determine the distance from the coordinate origin of the image to the midline of the image;

[0086] If the sun is identified from the image, the position information of the sun in the image is determined;

[0087] A first angle difference is determined based on the position information, a distance from the coordinate origin of the image to the midline of the image, and an angle corresponding to the unit width.

[0088] The field of view of an image acquisition device includes the horizontal field of view (HFOV), the vertical field of view (VFOV) and the diagonal field of view (DFOV). The horizontal field of view is the horizontal range that the image acquisition device can capture. The vertical field of view is the vertical range that the image acquisition device can capture. The diagonal field of view is the diagonal range that the image acquisition device can capture.

[0089] Since the horizontal field of view is the horizontal range that the image acquisition device can capture, and the width of the image represents the size of the image captured by the image acquisition device in the horizontal direction, the angle corresponding to the unit width can be obtained by dividing the horizontal field of view of the image acquisition device by the width of the image. The width of the image is usually expressed in pixels, so the above unit width can be understood as a unit pixel.

[0090] The distance from the image's coordinate origin to the image's midline refers to the shortest distance from the image's coordinate origin to the image's midline. Since the image's coordinate origin is usually located at the upper left corner of the image, the electronic device divides the image's width by 2 to get the distance from the image's coordinate origin to the image's midline.

[0091] The centerline of the above-mentioned image may refer to the centerline of the image in the horizontal direction. The direction of the centerline from bottom to top can represent the line of sight direction of the image acquisition device in the image, and the position information of the sun in the image is related to the solar azimuth. Therefore, based on the position information of the sun in the image, the distance from the coordinate origin of the image to the centerline of the image, and the angle corresponding to the unit width, the first angle difference can be determined.

[0092] It should be noted that the present application does not limit the recognition algorithm or detection algorithm of the sun in the image. For example, the sun recognition model can be used for recognition, and the sun recognition model can be a recognition model pre-trained for pictures containing the sun using an open source algorithm.

[0093] Optionally, when the electronic device recognizes the sun from the image, it can render a target frame surrounding the sun and determine the position information of the target frame surrounding the sun in the image. Based on the position information of the target frame, the position information of the center point of the target frame can be determined, and the position information of the center point of the target frame can be used as the position information of the sun in the image. Figure 4 The following is an example of the sun being recognized from an image. Figure 4 You can use a target box to mark the position of the sun.

[0094] The position information of the target frame includes but is not limited to the position information of the upper left corner, lower left corner, upper right corner and lower right corner of the target frame.

[0095] In one embodiment, the first angle difference value may be determined and the azimuth angle of the image acquisition device may be determined based on the solar azimuth angle and the first angle difference value in the following two ways.

[0096] Method 1: when the first angle difference is the angle difference between the sun's azimuth and the azimuth of the image acquisition device to be determined, the horizontal coordinate in the sun's position information in the image is subtracted from the distance from the coordinate origin of the image to the midline of the image to obtain the first difference, and the first angle difference is determined based on the first difference and the angle corresponding to the unit width;

[0097] The azimuth of the image acquisition device is obtained by subtracting the first angle difference from the solar azimuth.

[0098] In this manner, the electronic device may calculate the azimuth angle of the image acquisition device in the following manner.

[0099] The azimuth angle of the image acquisition device = the solar azimuth angle - the angle corresponding to the unit width * the first difference.

[0100] In a second method, when the first angle difference is the angle difference between the azimuth angle of the image acquisition device to be determined and the solar azimuth angle, a distance from the coordinate origin of the image to the midline of the image is subtracted from the horizontal coordinate in the position information to obtain a second difference, and the first angle difference is determined based on the second difference and the angle corresponding to the unit width;

[0101] The solar azimuth angle is added to the first angle difference to obtain the azimuth angle of the image acquisition device. In this manner, the electronic device can calculate the azimuth angle of the image acquisition device in the following manner.

[0102] The azimuth angle of the image acquisition device = the solar azimuth angle + the angle corresponding to the unit width * the second difference.

[0103] Optionally, the horizontal coordinates in the above position information, the width of the image and the distance from the coordinate origin of the image to the center line of the image can all be expressed in terms of the number of pixels. Of course, other methods can also be used, and this application does not limit this.

[0104] For the above two methods of determining the first angle difference, the electronic device can determine the termination direction of the solar azimuth based on the position information of the sun in the image and the position of the image acquisition device. The termination direction of the azimuth of the image acquisition device can be determined based on the center line of the image and the position of the image acquisition device. The starting directions of the solar azimuth and the azimuth of the image acquisition device are both due north of the image acquisition device. Therefore, the above first difference and second difference can reflect the size and difference between the solar azimuth in the real world and the azimuth of the image acquisition device. Therefore, the azimuth of the image acquisition device can be determined based on the angle corresponding to the unit width and the first difference or the second difference. Among them, the termination direction of the solar azimuth refers to the incident direction of the sun. The termination direction of the azimuth of the image acquisition device refers to the direction in which the image acquisition device is facing.

[0105] like Figure 5 The following is an example diagram of the field of view of an image acquisition device. Figure 5 The image captured by the image acquisition device in Figure 5 The purple dotted line in the Image Plane in the image represents the vertical line segment of the sun's position information in the image, and the red dotted line in the image captured by the image acquisition device represents the center line of the image. Figure 5 The M in it represents the distance from the origin of the image to the midline of the image, and S represents the horizontal coordinate of the sun's position information. Figure 5 The angle between the purple dotted line and the red dotted line in the same horizontal plane as the image acquisition device represents the angle difference between the solar azimuth and the azimuth of the image acquisition device. Figure 6 Shown is an example diagram of the azimuth angle of the image acquisition device. Figure 6 The ellipse in the figure represents the horizontal plane. Figure 6 The Azimith in (i.e. the angle between the true north direction on the horizontal plane and the red solid line) represents the azimuth of the image acquisition device. Figure 6 The angle between the true north direction and the purple solid line on the horizontal plane is the solar azimuth. Figure 6 The angle between the two blue solid lines on the horizontal plane in is the horizontal field of view of the image acquisition device.

[0106] Step 302: Determine the azimuth angle of the image acquisition device based on the solar azimuth angle and the first angle difference.

[0107] This embodiment determines the azimuth of the image acquisition device based on the solar azimuth and the first angle difference. There is no need to determine the azimuth of the image acquisition device by drawing a direction axis. Compared with the method of drawing a direction axis, this method is more convenient and more diversified and universal for determining the azimuth scenario.

[0108] Method 2, please refer to Figure 7, the electronic device can determine the azimuth angle of the image acquisition device through steps 701 and 702.

[0109] Step 701, based on the solar azimuth and the image, determine the angular deviation between the sight line direction of the image acquisition device in the image and the standard starting direction of the azimuth.

[0110] The sight line direction of the image acquisition device in the image is the centerline direction of the image, and the centerline direction of the image may refer to the direction of the centerline of the image from bottom to top in the horizontal direction. Figure 8 The following is an example of the centerline direction of an image. Figure 8 The yellow solid line GH in the figure indicates the centerline direction of the image.

[0111] Since the azimuth angle in the present application is usually based on the due north direction of the image acquisition device as the standard starting direction, the standard starting direction of the azimuth angle can be the due north direction of the image acquisition device.

[0112] In this embodiment, it can be assumed that the sight line direction of the image acquisition device in the image is the starting direction of the azimuth in the image. Then the angle deviation between the sight line direction of the image acquisition device in the image and the standard starting direction of the azimuth is the angle deviation between the starting direction of the azimuth in the image and the standard starting direction. Since the sight line direction of the image acquisition device in the image can represent the azimuth of the image acquisition device, the angle deviation between the starting direction of the azimuth in the image and the standard starting direction can represent the angle deviation between the azimuth of the image acquisition device and the standard starting direction of the azimuth, thereby determining the azimuth of the image acquisition device.

[0113] In a possible implementation manner, the angle deviation may be determined in the following manner.

[0114] If the shadow of the target object is identified from the image, the azimuth of the shadow is determined based on the sun azimuth;

[0115] Determine the direction of the shadow in the image;

[0116] Determine the angle between the sight direction and the shadow direction;

[0117] A second angle difference between the azimuth and the included angle of the shadow is calculated, and the second angle difference is determined as an angle deviation.

[0118] The target object may refer to any object with a shadow in the image, for example, a pedestrian in the image.

[0119] For scenes with complete target objects and their shadows appearing in images, shadow detection algorithms can be used to identify the target objects and their shadows, and to infer the shadow direction corresponding to the target objects.

[0120] Since the shadow direction in the image is opposite to the incident direction of the sun on the horizontal plane, the shadow direction can be determined based on the incident direction of the sun on the horizontal plane, and the azimuth of the shadow can be obtained by subtracting the sun azimuth from 360°.

[0121] In another possible implementation, the center point at the bottom of the target object in the image may be used as the starting point of the shadow direction, and the pixel point in the shadow farthest from the starting point may be used as the end point of the shadow direction to determine the shadow direction.

[0122] This embodiment determines the shadow direction based on the center point of the bottom of the target object in the image and the pixel point in the shadow farthest from the starting point. Compared with relying on empiricism to judge the shadow direction, it can determine the shadow direction in real time based on the image, thereby improving the accuracy of the shadow direction.

[0123] like Fig. 9 Shown is an example image of a shadow. Fig. 9 The red solid line CD in the figure represents the shadow, and the direction from C to D represents the shadow direction.

[0124] In another possible implementation, if it is difficult to identify the shadow after the target object is selected due to weather reasons or the acquisition angle of the image acquisition device, the direction of the shadow is manually calibrated in the image.

[0125] Since the azimuth is measured in a clockwise direction, the angle between the sight line direction and the shadow direction may refer to an angle measured in a clockwise direction with the sight line direction as the starting direction and the shadow direction as the ending direction.

[0126] The second angle difference between the azimuth and included angle of the shadow may refer to a value obtained by subtracting the included angle from the azimuth of the shadow.

[0127] Since the present embodiment assumes that the above-mentioned sight direction is the starting direction of the azimuth angle in the image, the angle between the sight direction and the shadow direction can represent the angle corresponding to the azimuth angle of the shadow in the image. Then, the second angle difference between the azimuth angle of the shadow and the included angle can represent the angular deviation between the sight direction of the image acquisition device in the image and the starting direction of the azimuth angle.

[0128] Step 702, determining the azimuth angle of the image acquisition device based on the angle deviation.

[0129] In one possible implementation, if the angle deviation is 0° or a positive number, it can be determined that the angle deviation is the azimuth of the image acquisition device; if the angle deviation is a negative number and the azimuth is greater than or equal to 0°, 360° can be added to the angle deviation to obtain the azimuth of the image acquisition device.

[0130] like Fig.10 Shown is an example of shadows in the morning. Fig.10 The origin of the coordinate system is the location of the pedestrian, the yellow solid line is the projection of the sun's incident direction on the horizontal plane, and the purple solid line is the shadow. Fig.10 There are four cameras, namely camera 1, camera 2, camera 3 and camera 4. Assume that the azimuth angle of the shadow is 250°. Figure 11-1 The figure shows the shadow of a pedestrian in the image captured by camera 1 in the morning. The angle between the line of sight of camera 1 in the image and the direction of the pedestrian's shadow is 320°. The angle deviation is calculated to be -70°, so it can be determined that the azimuth angle of the image acquisition device is 290°. Figure 11-2 The figure shows the shadow of a pedestrian in the image captured by camera 2 in the morning. The angle between the line of sight of camera 2 in the image and the direction of the pedestrian's shadow is 40°. The angle deviation is calculated to be 210°, so it can be determined that the azimuth angle of the image acquisition device is 210°. Figure 11-3 The figure shows the shadow of a pedestrian in the image captured by camera 3 in the morning. The angle between the line of sight of camera 3 in the image and the direction of the pedestrian's shadow is 140°. The angle deviation is calculated to be 110°, so it can be determined that the azimuth angle of the image acquisition device is 110°. Figure 11-4 The figure shows the shadow of a pedestrian in the image captured by camera No. 4 in the morning. The angle between the line of sight of camera No. 4 in the image and the direction of the pedestrian's shadow is 20°. The calculated angle deviation is 20°, so it can be determined that the azimuth angle of the image acquisition device is 20°.

[0131] like Fig.12 Shown is an example of shadows in the afternoon. Fig.12 yes Fig.10 An example of the direction of a pedestrian's shadow in an image captured by a camera in the afternoon. Assume that the azimuth angle of the shadow is 70°. Figure 13-1 The figure shows the shadow of a pedestrian in the image captured by camera 1 in the afternoon. The angle between the line of sight of camera 1 in the image and the direction of the pedestrian's shadow is 130°. The angle deviation is calculated to be -60°, so it can be determined that the azimuth angle of the image acquisition device is 300°. Figure 13-2 The figure shows the shadow of a pedestrian in the image captured by camera 2 in the afternoon. The angle between the line of sight of camera 2 in the image and the direction of the pedestrian's shadow is 230°. The angle deviation is calculated to be -160°, so it can be determined that the azimuth angle of the image acquisition device is 200°. Figure 13-3 The figure shows the shadow of a pedestrian in the image captured by camera 3 in the afternoon. The angle between the line of sight of camera 3 in the image and the direction of the pedestrian's shadow is 310°. The angle deviation is calculated to be -220°, so it can be determined that the azimuth angle of the image acquisition device is 140°. Figure 13-4The figure shows the shadow of a pedestrian in the image captured by camera No. 4 in the afternoon. The angle between the line of sight of camera No. 4 in the image and the direction of the pedestrian's shadow is 50°. The angle deviation is calculated to be 20°, so it can be determined that the azimuth angle of the image acquisition device is 20°.

[0132] In an embodiment of the present application, by acquiring an image captured by an image acquisition device and determining the solar azimuth at the location of the image acquisition device, the azimuth of the image acquisition device can be determined based on the solar azimuth and the image.

[0133] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0134] Corresponding to the method for determining the azimuth angle of the image acquisition device described in the above embodiment, Fig.14 A schematic diagram of the structure of an azimuth angle determination device of an image acquisition device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0135] Reference Fig.14 , the device comprises:

[0136] An image acquisition module 1401 is used to acquire an image acquired by an image acquisition device;

[0137] A solar azimuth determination module 1402 is used to determine the solar azimuth angle at the location of the image acquisition device;

[0138] The device azimuth determination module 1403 is used to determine the azimuth of the image acquisition device based on the solar azimuth and the image.

[0139] Optionally, the device position determination module 1403 includes:

[0140] a difference determination unit, configured to determine a first angle difference based on the image, wherein the first angle difference is an angle difference between the solar azimuth and the azimuth of the image acquisition device to be determined, or an angle difference between the azimuth of the image acquisition device to be determined and the solar azimuth;

[0141] The first azimuth determining unit is used to determine the azimuth of the image acquisition device based on the solar azimuth and the first angle difference.

[0142] Optionally, the difference determination unit includes:

[0143] An angle determination subunit, used to determine the angle corresponding to the unit width based on the width of the image and the horizontal field angle of the image acquisition device;

[0144] a distance determination subunit, configured to determine the distance from the coordinate origin of the image to the midline of the image based on the width of the image;

[0145] a position determination subunit, configured to determine position information of the sun in the image if the sun is identified in the image;

[0146] The difference determination subunit is used to determine the first angle difference based on the position information, the distance from the coordinate origin of the image to the center line of the image, and the angle corresponding to the unit width.

[0147] Optionally, the difference determination subunit is specifically used for:

[0148] In the case where the first angle difference is the angle difference between the solar azimuth and the azimuth of the image acquisition device to be determined, subtract the distance from the coordinate origin of the image to the midline of the image from the horizontal coordinate in the position information to obtain a first difference, and determine the first angle difference based on the first difference and the angle corresponding to the unit width;

[0149] Correspondingly, the above-mentioned position determination unit is specifically used for:

[0150] The azimuth angle of the image acquisition device is obtained by subtracting the first angle difference from the solar azimuth angle.

[0151] Optionally, the difference determination subunit is specifically used for:

[0152] In the case where the first angle difference is the angle difference between the azimuth angle of the image acquisition device to be determined and the solar azimuth angle, a distance from the coordinate origin of the image to the midline of the image minus the horizontal coordinate in the position information is obtained to obtain a second difference, and the first angle difference is determined based on the second difference and the angle corresponding to the unit width;

[0153] Correspondingly, the above-mentioned position determination unit is specifically used for:

[0154] The solar azimuth angle is added to the first angle difference to obtain the azimuth angle of the image acquisition device.

[0155] Optionally, the device position determination module 1403 includes:

[0156] a deviation determination unit, configured to determine an angular deviation between a sight line direction of the image acquisition device in the image and a standard starting direction of the azimuth based on the solar azimuth and the image, wherein the sight line direction is a centerline direction of the image;

[0157] The second azimuth determining unit is used to determine the azimuth angle of the image acquisition device based on the angle deviation.

[0158] Optionally, the deviation determination unit includes:

[0159] a shadow azimuth determination unit, configured to determine the azimuth of the shadow based on the sun azimuth if a shadow of the target object is identified from the image;

[0160] A shadow direction determining unit, used to determine the shadow direction of the shadow in the image;

[0161] An angle determination unit, used to determine the angle between the sight line direction and the shadow direction;

[0162] A difference calculation unit is used to calculate a second angle difference between the azimuth of the shadow and the included angle, and determine the second angle difference as the angle deviation.

[0163] Optionally, the shadow direction determining unit is specifically used for:

[0164] The shadow direction is determined by taking the center point of the bottom of the position of the target object in the image as the starting point of the shadow direction, and taking the pixel point in the shadow farthest from the starting point as the end point of the shadow direction.

[0165] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0166] Fig.15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.15 As shown, the electronic device of this embodiment includes: at least one processor 1500 ( Fig.15 Only one is shown in the figure), a memory 1501, and a computer program 1502 stored in the memory 1501 and executable on the at least one processor 1500, wherein the processor 1500 implements the steps of any of the above-mentioned method embodiments when executing the computer program 1502.

[0167] The electronic device may include, but is not limited to, a processor 1500 and a memory 1501. Those skilled in the art will appreciate that Fig.15 These are merely examples of electronic devices and do not constitute a limitation on the electronic devices. The electronic devices may include more or fewer components than those shown in the figures, or a combination of certain components, or different components. For example, the electronic devices may also include input and output devices, network access devices, etc.

[0168] The processor 1500 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0169] In some embodiments, the memory 1501 may be an internal storage unit of the electronic device, such as a hard disk or memory of the electronic device. In other embodiments, the memory 1501 may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 1501 may also include both an internal storage unit of the electronic device and an external storage device. The memory 1501 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 1501 may also be used to temporarily store data that has been output or is to be output.

[0170] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0171] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0172] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0173] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0174] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0175] 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 distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0176] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for determining the azimuth angle of an image acquisition device, characterized in that: include: Acquire an image acquired by an image acquisition device; Determining the solar azimuth angle of the position of the image acquisition device; Based on the solar azimuth and the image, the azimuth of the image acquisition device is determined.

2. The method according to claim 1, characterized in that The step of determining the azimuth angle of the image acquisition device based on the solar azimuth angle and the image comprises: Based on the image, determine a first angle difference, where the first angle difference is an angle difference between the solar azimuth and the azimuth of the image acquisition device to be determined, or an angle difference between the azimuth of the image acquisition device to be determined and the solar azimuth; The azimuth angle of the image acquisition device is determined based on the solar azimuth angle and the first angle difference.

3. The method according to claim 2, characterized in that The determining a first angle difference based on the image includes: Determine the angle corresponding to the unit width based on the width of the image and the horizontal field of view of the image acquisition device; Based on the width of the image, determining the distance from the coordinate origin of the image to the midline of the image; If the sun is identified from the image, determining the position information of the sun in the image; The first angle difference is determined based on the position information, the distance from the coordinate origin of the image to the midline of the image, and the angle corresponding to the unit width.

4. The method according to claim 3, characterized in that The determining the first angle difference based on the position information, the distance from the coordinate origin of the image to the midline of the image, and the angle corresponding to the unit width includes: In the case where the first angle difference is the angle difference between the solar azimuth and the azimuth of the image acquisition device to be determined, subtract the distance from the coordinate origin of the image to the midline of the image from the horizontal coordinate in the position information to obtain a first difference, and determine the first angle difference based on the first difference and the angle corresponding to the unit width; Correspondingly, determining the azimuth of the image acquisition device based on the solar azimuth and the first angle difference includes: Subtract the first angle difference from the solar azimuth to obtain the azimuth of the image acquisition device; Alternatively, when the first angle difference is the angle difference between the azimuth angle of the image acquisition device to be determined and the solar azimuth angle, a second difference is obtained by subtracting the horizontal coordinate in the position information from the distance from the coordinate origin of the image to the midline of the image, and the first angle difference is determined based on the second difference and the angle corresponding to the unit width; Correspondingly, determining the azimuth of the image acquisition device based on the solar azimuth and the first angle difference includes: The solar azimuth angle is added to the first angle difference to obtain the azimuth angle of the image acquisition device.

5. The method according to claim 1, characterized in that The step of determining the azimuth angle of the image acquisition device based on the solar azimuth angle and the image comprises: Based on the solar azimuth and the image, determining an angle deviation between a sight line direction of the image acquisition device in the image and a standard starting direction of the azimuth, the sight line direction being a centerline direction of the image; Based on the angular deviation, the azimuth angle of the image acquisition device is determined.

6. The method according to claim 5, characterized in that The step of determining the angle deviation between the sight line direction of the image acquisition device in the image and the starting direction of the azimuth angle based on the solar azimuth angle and the image includes: If a shadow of the target object is identified from the image, determining the azimuth of the shadow based on the solar azimuth; determining a shadow direction of the shadow in the image; Determine the angle between the sight line direction and the shadow direction; A second angle difference between the azimuth of the shadow and the included angle is calculated, and the second angle difference is determined as the angle deviation.

7. The method according to claim 6, characterized in that Determining the shadow direction of the shadow in the image includes: The shadow direction is determined by taking the center point of the bottom of the position of the target object in the image as the starting point of the shadow direction, and taking the pixel point in the shadow farthest from the starting point as the end point of the shadow direction.

8. An azimuth angle determination device for an image acquisition device, characterized in that: include: An image acquisition module, used to acquire images acquired by an image acquisition device; A solar azimuth determination module, used to determine the solar azimuth angle at the location of the image acquisition device; The device azimuth determination module is used to determine the azimuth of the image acquisition device based on the solar azimuth and the image.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the electronic device implements the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that The invention comprises a computer program which, when executed, causes the method according to any one of claims 1 to 7 to be performed.

Citation Information

Cited By

  • Device orientation determination method, device, storage medium and program product

    CN121147298A