Method and device for generating camera equipment deployment and control chart, storage medium and electronic device

By determining the objective function and angle relationship of the camera device, the layout control diagram of fisheye cameras is generated, which solves the problem of difficulty in accurately drawing in the prior art, improves the monitoring effect and reduces the difficulty of debugging.

CN120014058APending Publication Date: 2025-05-16ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510097813.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

It is difficult to accurately draw fisheye camera layout design drawings, affecting monitoring effects and increasing debugging difficulty.

Method used

By determining the first objective function of the imaging device, the correspondence between the angle and the pixel density is indicated, and a layout control diagram of the imaging device is generated based on the connection angle between the object and the imaging device, including the correspondence between the unit pixel density and the total pixel density.

Benefits of technology

It realizes accurate drawing of fisheye camera layout control design drawings, improves monitoring effect and reduces debugging difficulty.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120014058A_ABST
    Figure CN120014058A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method and a device for generating a camera equipment deployment and control chart, a storage medium and an electronic device. The method comprises the following steps: determining a first target function of camera equipment; determining a first angle between a second connecting line and the vertical direction, wherein the second connecting line is a connecting line between the reference object and the camera device; based on the first angle and a first objective function, determining the unit pixel density of an image obtained by shooting the reference object by the camera device; determining a second objective function of the camera device based on the unit pixel density, the second objective function being used for indicating a relationship between a distance and a total pixel density, the distance being a distance between the object to be shot and a projection of the camera device, and the total pixel density being a pixel density of an overall image of the object to be shot; and generating a deployment and control chart of the camera equipment based on the second target function. According to the method and the device, the problem that the fisheye camera deployment and control design drawings are difficult to accurately draw is solved, so that the effect of accurately drawing the fisheye camera deployment and control design drawings is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computers, and in particular, to a method, device, storage medium and electronic device for generating a camera equipment control diagram. Background Art

[0002] In the related art, the installation height and angle of camera equipment, such as fisheye cameras, have a direct impact on the effect of the captured image. Too high or too low may affect the coverage of the field of view. In the related art, design tools are usually used to generate the layout of fisheye cameras. However, it is difficult to select appropriate fisheye camera lens parameters, installation height, target distance and installation position based on the design tools in the related art, which not only affects the monitoring effect but also increases the difficulty of debugging.

[0003] It can be seen from this that there is a problem in the related art that it is difficult to accurately draw a design diagram for the layout of fisheye cameras.

[0004] With respect to the above-mentioned problems existing in the related technologies, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a method, device, storage medium and electronic device for generating a camera equipment layout diagram, so as to at least solve the problem existing in the related art that it is difficult to accurately draw a fisheye camera layout design diagram.

[0006] According to one embodiment of the present invention, there is provided a method for generating a camera layout diagram, comprising: determining a first objective function of the camera, wherein the first objective function is used to indicate the correspondence between an angle and a pixel density, the angle being the angle between a first line and a vertical direction, the first line being a line between a target point of an object to be photographed and the camera, and the pixel density being the pixel density of an image of the target point photographed by the camera; determining a first angle between a second line and a vertical direction, the second line being a line between a reference object and the camera; determining a unit pixel density of an image obtained by photographing the reference object by the camera based on the first angle and the first objective function; determining a second objective function of the camera based on the unit pixel density, wherein the second objective function is used to indicate the relationship between a distance and a total pixel density, the distance being the distance between the object to be photographed and a projection of the camera, and the total pixel density being the pixel density of the overall image of the object to be photographed; generating a camera layout diagram based on the second objective function.

[0007] In an exemplary embodiment, determining the first angle between the first connecting line and the vertical direction includes: determining a first point set, a second point set, and a third point set included in the reference object, wherein each point set includes at least two points, and the multiple points included in the first point set have different horizontal coordinates, the same vertical coordinates, and the same vertical coordinates in the vertical direction, the multiple points included in the second point set have the same horizontal coordinates, different vertical coordinates, and the same vertical coordinates in the vertical direction, and the multiple points included in the third point set have the same horizontal coordinates, the same vertical coordinates, and different vertical coordinates in the vertical direction; respectively determine the angles between the line connecting each point included in the first point set, the second point set, and the third point set and the vertical direction and the camera device to obtain the first angle.

[0008] In an exemplary embodiment, determining the unit pixel density of the image obtained by the camera device shooting the reference object based on the first angle and the first objective function includes: substituting each angle included in the first angle into the first objective function to obtain the first pixel density corresponding to each angle; determining the unit pixel density based on the first pixel density, the size data of the reference object and the first projection distance between the reference object and the projection of the camera device.

[0009] In an exemplary embodiment, the unit pixel density is determined based on the first pixel density, the size data of the reference object, and the first projection distance between the reference object and the camera device, including: determining a second pixel density, a third pixel density, and a fourth pixel density included in the first pixel density, wherein the second pixel density is the pixel density corresponding to points with different horizontal coordinates, the same vertical coordinates, and the same vertical coordinates, the third pixel density is the pixel density corresponding to points with the same horizontal coordinates, different vertical coordinates, and the same vertical coordinates, and the fourth pixel density is the pixel density corresponding to points with the same horizontal coordinates, the same vertical coordinates, and different vertical coordinates; determining a first sub-unit pixel density based on the second pixel density and the size data of the reference object; determining a second sub-unit pixel density based on the third pixel density, the size data of the reference object, and the first projection distance; determining a third sub-unit pixel density based on the fourth pixel density and the size data of the reference object; and determining the first sub-unit pixel density, the second sub-unit pixel density, and the third sub-unit pixel density as the unit pixel density.

[0010] In an exemplary embodiment, determining a first sub-unit pixel density based on the second pixel density and the size data of the reference object includes: determining a first absolute value of a first difference between a first sub-pixel density included in the second pixel density and a second sub-pixel density; determining a first ratio of a target width included in the size data to a first constant; and determining a ratio of the first absolute value to the first ratio as the first sub-unit pixel density.

[0011] In an exemplary embodiment, determining the second sub-unit pixel density based on the third pixel density, the size data of the reference object and the first projection distance includes: determining a second ratio of the target width included in the size data to a second constant; determining a third ratio of the second ratio to the first projection distance; determining a first inverse tangent function value of the third ratio; determining a cosine value of the first inverse tangent function value; determining a first product of the cosine value and a fourth sub-pixel density included in the third pixel density; determining a second difference between the first product and the third sub-pixel density included in the third pixel density; determining a first square value of the second difference; determining a sine value of the first inverse tangent function value; determining a second product of the sine value and the fourth sub-pixel density; determining a second square value of the second product; determining a sum of the first square value and the second square value; determining the arithmetic square root value of the sum value; and determining a fourth ratio of the arithmetic square root value to the second ratio as the second sub-unit pixel density.

[0012] In an exemplary embodiment, determining a third sub-unit pixel density based on the fourth pixel density and the size data of the reference object includes: determining a second absolute value of a third difference between a fifth sub-pixel density and a sixth sub-pixel density included in the fourth pixel density; determining a fifth ratio of a target width included in the size data to a third constant; and determining a sixth ratio of the second absolute value to the fifth ratio as the third sub-unit pixel density.

[0013] In an exemplary embodiment, determining the second objective function of the camera device based on the unit pixel density includes: determining a second projection distance between the object to be photographed and the projection of the camera device; determining a target line between the object to be photographed and the projection point of the camera device on the ground based on the second projection distance; determining a first angle between the target line and the horizontal direction, a second angle between the target line and the vertical direction, and a third angle between the target line and the vertical direction; determining the second objective function based on the unit pixel density, the first angle, the second angle, and the third angle.

[0014] In an exemplary embodiment, determining the second objective function based on the unit pixel density, the first angle, the second angle and the third angle includes: determining a first product of a first sub-unit pixel density included in the unit pixel density, a cosine value of the first angle and a sine value of the third angle, wherein the first sub-unit pixel density is determined based on the pixel density corresponding to points with different horizontal coordinates, the same vertical coordinates and the same vertical coordinates; determining a second product of a second sub-unit pixel density included in the unit pixel density, a cosine value of the second angle and a sine value of the third angle, wherein the second sub-unit pixel density is determined based on the pixel density corresponding to points with the same horizontal coordinates, different vertical coordinates and the same vertical coordinates; determining a third product of a third sub-unit pixel density included in the unit pixel density and a cosine value of the third angle, wherein the third sub-unit pixel density is determined based on the pixel density corresponding to points with the same horizontal coordinates, the same vertical coordinates and different vertical coordinates; determining a sum of the first product, the second product and the third product; and determining the corresponding relationship between the sum and the total pixel density as the second objective function.

[0015] In an exemplary embodiment, determining a first objective function of an imaging device includes: acquiring distortion data and sensor size data of the imaging device; and determining the first objective function based on the distortion data and the sensor size data.

[0016] According to another embodiment of the present invention, there is provided a device for generating a camera layout diagram, comprising: a first determination module, for determining a first objective function of the camera, wherein the first objective function is used to indicate the correspondence between angle and pixel density, the angle being the angle between a line connecting a target point of an object and the camera and a vertical direction, and the pixel density being the pixel density of an image of the target point taken by the camera; a second determination module, for determining a first angle between a line connecting a reference object and the camera and a vertical direction; a third determination module, for determining, based on the first angle and the first objective function, the unit pixel density of an image obtained by taking the reference object by the camera; a fourth determination module, for determining a second objective function of the camera based on the unit pixel density, wherein the second objective function is used to indicate the relationship between distance and total pixel density, the distance being the projection distance between the object and the camera; and a generation module, for generating a camera layout diagram of the camera based on the second objective function.

[0017] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when run.

[0018] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0019] According to yet another embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.

[0020] Through the present invention, the corresponding relationship between the angle between the first connecting line of the camera device and the vertical direction and the pixel density of the image of the target point of the object to be photographed can be determined by the first objective function of the camera device. The unit pixel density of the image obtained by photographing the reference object can be determined according to the first angle determined by the second connecting line of the reference object and the camera device and the first objective function. The unit pixel density can determine the second objective function of the camera device. The second objective function can represent the corresponding relationship between the projection distance between the object to be detected and the camera device and the total pixel density. Therefore, the corresponding total pixel density can be calculated based on the projection distance between the object to be detected and the camera device, and the accurate layout map of the total pixel density corresponding to each projection distance can be obtained. Therefore, the problem that it is difficult to accurately draw the layout design map of the fisheye camera in the related art can be solved, and the effect of accurately drawing the layout design map of the fisheye camera can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a hardware structure block diagram of a mobile terminal according to a method for generating a camera device control diagram according to an embodiment of the present invention;

[0022] Figure 2 is a flow chart of a method for generating a camera equipment control diagram according to an embodiment of the present invention;

[0023] Figure 3 is a schematic diagram of a fisheye monitoring range according to an embodiment of the present invention;

[0024] Figure 4 is a schematic diagram of angles A1, A3, and A5 according to an embodiment of the present invention;

[0025] Figure 5 is a schematic diagram of angle A2 according to an embodiment of the present invention;

[0026] Figure 6 is a schematic diagram of angle A4 according to an embodiment of the present invention;

[0027] Figure 7 is a schematic diagram of angle A6 according to an embodiment of the present invention;

[0028] Figure 8 is a 2D fisheye rendering result image according to an embodiment of the present invention;

[0029] Fig. 9 is a 3D fisheye rendering result image according to an embodiment of the present invention;

[0030] Fig.10 is a flow chart of a method for generating a camera equipment control diagram according to a specific embodiment of the present invention;

[0031] Fig.11 It is a structural block diagram of a device for generating a camera equipment layout diagram according to an embodiment of the present invention. DETAILED DESCRIPTION

[0032] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.

[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0034] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal for generating a camera device control diagram according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0035] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for generating the camera equipment layout map in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0036] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0037] In this embodiment, a method for generating a camera equipment control diagram is provided. Figure 2 is a flow chart of a method for generating a camera device control diagram according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0038] Step S202, determining a first objective function of the camera device, wherein the first objective function is used to indicate a corresponding relationship between an angle and a pixel density, the angle is an angle between a first connecting line and a vertical direction, the first connecting line is a connecting line between a target point of the object to be photographed and the camera device, and the pixel density is a pixel density of an image of the target point photographed by the camera device;

[0039] Step S204, determining a first angle between a second connecting line and the vertical direction, where the second connecting line is a connecting line between the reference object and the camera device;

[0040] Step S206, determining, based on the first angle and the first objective function, a unit pixel density of an image obtained by photographing the reference object by the camera device;

[0041] Step S208, determining a second objective function of the camera device based on the unit pixel density, wherein the second objective function is used to indicate a relationship between a distance and a total pixel density, the distance being the distance between the object to be photographed and a projection of the camera device, and the total pixel density being the pixel density of the entire image of the object to be photographed;

[0042] Step S210: generating a control diagram of the camera equipment based on the second objective function.

[0043] In the above embodiment, the camera device may be a fisheye camera. Since the images taken by the fisheye camera are usually distorted, the distortion can be adjusted by adjusting the installation height and target distance of the fisheye camera. The reference object may be any reference object within or outside the monitoring range, and the best installation position of the fisheye camera may be determined by using the reference object. The reference object and the object to be photographed may be the same object or different objects. Figure 3 Schematic diagram of fisheye monitoring range according to an embodiment of the present invention. Figure 3 As shown, the camera device can be installed at point I, the hemispherical area is the monitoring range, and the cube T can be the reference object. The angle between the second line connecting the reference object and the camera device and the vertical direction (i.e., the first angle mentioned above) can be determined, and the pixel density corresponding to the first angle can be determined by the first objective function, and the unit pixel density can be determined based on the obtained pixel density. Among them, the unit pixel density can be understood as the number of pixels per inch. The higher the unit pixel density means that the image or display has richer details and the better the image quality.

[0044] In the above embodiment, the second objective function can be understood as the correspondence between the projection distance between the object and the camera device and the total pixel density. The total pixel density corresponding to the object under the camera device can be determined by the projection distance between the object and the camera device. Based on the total pixel density, the total pixel density corresponding to each point in the monitoring range area can be generated, that is, the overall monitoring range diagram of the camera device can be generated. By adjusting the position of the camera device, the best overall monitoring range diagram can be obtained, and the precise control of the camera device can be achieved. Among them, the second objective function can be synthesized by the unit pixel density.

[0045] Through the present invention, the corresponding relationship between the angle between the first connecting line of the camera device and the vertical direction and the pixel density of the image of the target point of the object to be photographed can be determined by the first objective function of the camera device. The unit pixel density of the image obtained by photographing the reference object can be determined according to the first angle determined by the second connecting line of the reference object and the camera device and the first objective function. The unit pixel density can determine the second objective function of the camera device. The second objective function can represent the corresponding relationship between the projection distance between the object to be detected and the camera device and the total pixel density. Therefore, the corresponding total pixel density can be calculated based on the projection distance between the object to be detected and the camera device, and the accurate layout map of the total pixel density corresponding to each projection distance can be obtained. Therefore, the problem that it is difficult to accurately draw the layout design map of the fisheye camera in the related art can be solved, and the effect of accurately drawing the layout design map of the fisheye camera can be achieved.

[0046] Optionally, the execution subject of the above steps may be a background processor, or other devices with similar processing capabilities, or a terminal server, etc., but is not limited thereto.

[0047] In an exemplary embodiment, determining the first angle between the first connecting line and the vertical direction includes: determining a first point set, a second point set, and a third point set included in the reference object, wherein each point set includes at least two points, and the multiple points included in the first point set have different horizontal coordinates, the same vertical coordinates, and the same vertical coordinates in the vertical direction, the multiple points included in the second point set have the same horizontal coordinates, different vertical coordinates, and the same vertical coordinates in the vertical direction, and the multiple points included in the third point set have the same horizontal coordinates, the same vertical coordinates, and different vertical coordinates in the vertical direction; respectively determine the angles between the line connecting each point included in the first point set, the second point set, and the third point set and the vertical direction and the camera device to obtain the first angle.

[0048] In the above embodiment, a first point set, a second point set and a third point set can be selected from the reference object. The points included in the first point set have different horizontal coordinates, the same vertical coordinates and the same vertical coordinates in the vertical direction; the points included in the second point set have the same horizontal coordinates, different vertical coordinates and the same vertical coordinates in the vertical direction; the points included in the third point set have the same horizontal coordinates, the same vertical coordinates and different vertical coordinates in the vertical direction. Among them, the first point set, the second point set and the third point set include at least 2 points. By determining the angle between the line connecting each point in the first point set, the second point set and the third point set and the camera device and the vertical direction, the first angle corresponding to each point can be determined.

[0049] In an exemplary embodiment, determining a first angle between a line connecting a reference object and the camera device and a vertical direction includes: determining a first point and a second point included in the reference object, wherein the horizontal coordinate of the first point is different from the horizontal coordinate of the second point, the vertical coordinate of the first point is the same as the vertical coordinate of the second point, and the vertical coordinate of the first point is the same as the vertical coordinate of the second point; determining a third point and a fourth point included in the reference object, wherein the horizontal coordinate of the third point is the same as the horizontal coordinate of the fourth point, the vertical coordinate of the third point is different from the vertical coordinate of the fourth point, and the vertical coordinate of the third point is the same as the vertical coordinate of the fourth point; determining a fifth point and a sixth point included in the reference object, wherein the horizontal coordinate of the fifth point is the same as the horizontal coordinate of the sixth point , the ordinate of the fifth point is the same as the ordinate of the sixth point, and the vertical coordinate of the fifth point is different from the vertical coordinate of the sixth point; determine the second angle between the line connecting the first point and the camera device and the vertical direction; determine the third angle between the line connecting the second point and the camera device and the vertical direction; determine the fourth angle between the line connecting the third point and the camera device and the vertical direction; determine the fifth angle between the line connecting the fourth point and the camera device and the vertical direction; determine the sixth angle between the line connecting the fifth point and the camera device and the vertical direction; determine the seventh angle between the line connecting the sixth point and the camera device and the vertical direction; determine the second angle, the third angle, the fourth angle, the fifth angle, the sixth angle and the seventh angle as the first angle.

[0050] In the above embodiment, when the first point set, the second point set and the third point set include two points, six points can be selected from the reference object: (A1, P1), (A2, P2), (A3, P3), (A4, P4), (A5, P5), (A6, P6), where A can represent an angle and P can represent a pixel density, that is, the first angle can be an angle including A1 to A6. (A1, P1) and (A2, P2) are points that change on the x-axis (that is, the first point and the second point belong to the first point set), (A3, P3) and (A4, P4) are points that change on the y-axis (that is, the third point and the fourth point belong to the second point set), and (A5, P5) and (A6, P6) are points that change on the z-axis (that is, the fifth point and the sixth point belong to the third point set). The second angle A1, the fourth angle A3 and the sixth angle A5 corresponding to the first point (A1, P1), the third point (A3, P3) and the fifth point (A5, P5) can be seen in Figure 4 , Figure 4 Schematic diagram of angles A1, A3, and A5 according to an embodiment of the present invention. Figure 4As shown, the first point, the third point and the fifth point can be set as the point E1 in the figure. The first point, the third point and the fifth point are reference points. The present invention is not limited to this. The point E1 is only an example. A1, A3, A5 can be understood as the angle formed by the side IE1 and IO1 with I as the vertex, which can be calculated by the following formula: The installation height can be understood as the height IO1 at which the camera is installed, the target distance can be understood as the projection distance O1E1 of IE1, and the target width can be understood as the side length of the reference cube T, that is, If the reference object is a cuboid, the target width can also be the width of the cuboid.

[0051] In the above embodiment, the third angle A2 included in the first angle can be seen in Figure 5 , Figure 5 is a schematic diagram of angle A2 according to an embodiment of the present invention, such as Figure 5 As shown, since the first point (A1, P1) and the second point (A2, P2) are points that change on the x-axis, the second point (A2, P2) can be set as point E2. The present invention does not limit the second point, and point E2 is only an example. A2 can be understood as the angle formed by the side I E2 and IO1 with I as the vertex, which can be calculated by the following formula:

[0052] In the above embodiment, the fifth angle A4 included in the first angle can be seen in Figure 6 , Figure 6 is a schematic diagram of angle A4 according to an embodiment of the present invention, such as Figure 6 As shown, since the third point (A3, P3) and the fourth point (A4, P4) are points that change on the y-axis, the fourth point (A4, P4) can be set as point E3. The present invention does not limit the fourth point, and point E3 is only an example. A4 can be understood as the angle formed by the side I E3 and IO1 with I as the vertex, which can be calculated by the following formula:

[0053] In the above embodiment, the seventh angle A6 included in the first angle can be seen in Figure 7 , Figure 7 Schematic diagram of angle A6 according to an embodiment of the present invention. Figure 7 As shown, since the fifth point (A5, P5) and the sixth point (A6, P6) are points that change on the z-axis, the sixth point (A6, P6) can be set as point E4. The present invention does not limit the sixth point, and point E4 is only an example. A6 can be understood as the angle formed by edge IE4 and IO1 with I as the vertex, which can be calculated by the following formula:

[0054] In an exemplary embodiment, determining the unit pixel density of the image obtained by the camera device shooting the reference object based on the first angle and the first objective function includes: substituting each angle included in the first angle into the first objective function to obtain the first pixel density corresponding to each angle; determining the unit pixel density based on the first pixel density, the size data of the reference object and the first projection distance between the reference object and the projection of the camera device.

[0055] In the above embodiment, the second angle, the third angle, the fourth angle, the fifth angle, the sixth angle and the seventh angle included in the first angle are respectively brought into the first objective function to obtain the first pixel density corresponding to each angle, that is, the angles A1, A2, A3, A4, A5 and A6 are brought into the first objective function to obtain the first pixel densities P1-P6. The unit pixel density can be calculated by the first pixel density, the size data of the reference object and the first projection distance between the reference object and the projection of the imaging device.

[0056] In an exemplary embodiment, the unit pixel density is determined based on the first pixel density, the size data of the reference object, and the first projection distance between the reference object and the camera device, including: determining a second pixel density, a third pixel density, and a fourth pixel density included in the first pixel density, wherein the second pixel density is the pixel density corresponding to points with different horizontal coordinates, the same vertical coordinates, and the same vertical coordinates, the third pixel density is the pixel density corresponding to points with the same horizontal coordinates, different vertical coordinates, and the same vertical coordinates, and the fourth pixel density is the pixel density corresponding to points with the same horizontal coordinates, the same vertical coordinates, and different vertical coordinates; determining a first sub-unit pixel density based on the second pixel density and the size data of the reference object; determining a second sub-unit pixel density based on the third pixel density, the size data of the reference object, and the first projection distance; determining a third sub-unit pixel density based on the fourth pixel density and the size data of the reference object; and determining the first sub-unit pixel density, the second sub-unit pixel density, and the third sub-unit pixel density as the unit pixel density.

[0057] In the above embodiment, the second pixel density corresponding to each point in the first point set included in the first pixel density, the third pixel density corresponding to each point in the second point set included in the first pixel density, and the fourth pixel density corresponding to each point in the third point set included in the first pixel density can be determined, and the first sub-unit pixel density, the second sub-unit pixel density and the third sub-unit pixel density can be determined respectively based on the size data of the reference object and the second pixel density, the third pixel density and the fourth pixel density.

[0058] In an exemplary embodiment, determining a first sub-unit pixel density based on the second pixel density and the size data of the reference object includes: determining a first absolute value of a first difference between a first sub-pixel density included in the second pixel density and a second sub-pixel density; determining a first ratio of a target width included in the size data to a first constant; and determining a ratio of the first absolute value to the first ratio as the first sub-unit pixel density.

[0059] In the above embodiment, taking the case where the first point set includes two points as an example (i.e., the second pixel density includes the first sub-pixel density and the second sub-pixel density P1 and P2), the difference between P1 and P2 can be understood as the transformation of the corresponding pixel density after the x-axis angle transformation, and the distance change is L E1E2 , the angle changes from A1 to A2, then the first sub-unit pixel density PPM X It can be calculated by the following formula: Wherein, |P2-P1| is the above-mentioned first absolute value, and wherein the target width is the target width included in the above-mentioned size data. In an exemplary embodiment, determining the second sub-unit pixel density based on the third pixel density, the size data of the reference object, and the first projection distance includes: determining a second ratio of the target width included in the size data to a second constant; determining a third ratio of the second ratio to the first projection distance; determining a first inverse tangent function value of the third ratio; determining a cosine value of the first inverse tangent function value; determining a first product of the cosine value and a fourth sub-pixel density included in the third pixel density; determining a second difference between the first product and the third sub-pixel density included in the third pixel density; determining a first square value of the second difference; determining a sine value of the first inverse tangent function value; determining a second product of the sine value and the fourth sub-pixel density; determining a second square value of the second product; determining a sum of the first square value and the second square value; determining an arithmetic square root value of the sum; and determining a fourth ratio of the arithmetic square root value to the second ratio as the second sub-unit pixel density.

[0060] In the above embodiment, taking the case where the second point set includes two points as an example (i.e., the third pixel density includes the third sub-pixel density and the fourth sub-pixel density P3 and P4), the difference between P3 and P4 can be understood as the transformation of the corresponding pixel density after the y-axis angle transformation, and the distance change is L E1E3 , the angle changes from A3 to A4, then the second sub-unit pixel density PPM Y It can be calculated by the following formula: in, This is the third ratio mentioned above, That is the first inverse tangent function value of the third ratio mentioned above, This is the first product mentioned above, This is the second product mentioned above.

[0061] In an exemplary embodiment, determining a third sub-unit pixel density based on the fourth pixel density and the size data of the reference object includes: determining a second absolute value of a third difference between a fifth sub-pixel density and a sixth sub-pixel density included in the fourth pixel density; determining a fifth ratio of a target width included in the size data to a third constant; and determining a sixth ratio of the second absolute value to the fifth ratio as the third sub-unit pixel density.

[0062] In the above embodiment, taking the case where the third point set includes two points as an example (i.e., the fourth pixel density includes the fifth sub-pixel density and the sixth sub-pixel density P5 and P6), the difference between P5 and P6 can be understood as the transformation of the corresponding pixel density after the z-axis angle transformation, and the distance change is L E1E4 , the angle changes from A5 to A6, then the third sub-unit pixel density PPM Z It can be calculated by the following formula: Among them, |P6-P5| is the above-mentioned second absolute value, and wherein the target width is the target width included in the above-mentioned size data.

[0063] In an exemplary embodiment, determining the second objective function of the camera device based on the unit pixel density includes: determining a second projection distance between the object to be photographed and the projection of the camera device; determining a target line between the object to be photographed and the projection point of the camera device on the ground based on the second projection distance; determining a first angle between the target line and the horizontal direction, a second angle between the target line and the vertical direction, and a third angle between the target line and the vertical direction; determining the second objective function based on the unit pixel density, the first angle, the second angle, and the third angle.

[0064] In the above embodiment, the object to be photographed may be the same object as the reference object, or may not be the same object. When the object to be detected and the reference object are different objects, the second projection distance between the object to be detected and the projection of the camera device, the first angle θ between the target line and the horizontal direction can be determined first. x , the second angle θ in the vertical direction y and the third angle θ with the vertical direction z , and then combined with the unit pixel density, the second objective function can be determined. When the object to be detected and the reference object are the same object, the calculation can be performed directly through the first projection distance, unit pixel density, first angle, second angle and third angle of the reference object.

[0065] In an exemplary embodiment, determining the second objective function based on the unit pixel density, the first angle, the second angle and the third angle includes: determining a first product of a first sub-unit pixel density included in the unit pixel density, a cosine value of the first angle and a sine value of the third angle, wherein the first sub-unit pixel density is determined based on the pixel density corresponding to points with different horizontal coordinates, the same vertical coordinates and the same vertical coordinates; determining a second product of a second sub-unit pixel density included in the unit pixel density, a cosine value of the second angle and a sine value of the third angle, wherein the second sub-unit pixel density is determined based on the pixel density corresponding to points with the same horizontal coordinates, different vertical coordinates and the same vertical coordinates; determining a third product of a third sub-unit pixel density included in the unit pixel density and a cosine value of the third angle, wherein the third sub-unit pixel density is determined based on the pixel density corresponding to points with the same horizontal coordinates, the same vertical coordinates and different vertical coordinates; determining a sum of the first product, the second product and the third product; and determining the corresponding relationship between the sum and the total pixel density as the second objective function.

[0066] In the above embodiment, the unit pixel density in the three directions of the x-axis, the y-axis and the z-axis can be x , the second angle θ y And the third angle θ z The total pixel density PPM (Pixels Per Meter) is obtained by synthesis. The total pixel density can be calculated by the following formula, that is, the second objective function can be expressed as: PPM = PPM X ×cosθ x ×sinθ z +PPM Y ×cosθ y ×sinθ z +PPM Z ×cosθ z , PPM X ×cosθ x ×sinθ z This is the first product mentioned above, PPM Y ×cosθ y ×sinθ z This is the second product mentioned above, PPM Z ×cosθ z This is the third product mentioned above.

[0067] In the above embodiment, the second objective function represents the relationship between the distance between the object to be photographed and the projection of the imaging device and the total pixel density. After determining the distance between the object to be photographed and the projection of the imaging device, the first angle, the second angle and the third angle can be determined, and then the PPM can be determined.

[0068] In an exemplary embodiment, determining a first objective function of an imaging device includes: acquiring distortion data and sensor size data of the imaging device; and determining the first objective function based on the distortion data and the sensor size data.

[0069] In the above embodiment, the first objective function can be obtained by fitting the lens distortion data of the camera device and the sensor pixel size (ie, the sensor size data), and the fitting function can be shown as follows: y=ax 6 +bx 5 +cx 4 +dx 3 +ex 2 +fx+g, where a, b, c, d, e, f, and g can be understood as constants, x can represent the first angle, and y can represent the pixel density. The lens distortion data and sensor pixel size can be provided by the developer of the camera device.

[0070] In an exemplary embodiment, generating the layout diagram of the imaging equipment based on the second objective function includes at least one of the following: generating a two-dimensional layout diagram of the imaging equipment based on the second objective function; generating a three-dimensional layout diagram of the imaging equipment based on the second objective function.

[0071] In the above embodiment, after calculating several groups of total pixel density PPM, a drawing can be performed according to the value. When drawing a two-dimensional control map, the drawn image can be referred to as Figure 8 , Figure 8 is a 2D fisheye rendering result diagram according to an embodiment of the present invention, the third angle θ z Set to 0 for calculation. For example, if you want to traverse the corresponding relationship between the distance of 0.0~100.0m and PPM, the camera device data array can be "fishList":[{"key":0.1,"value":533.7},{"key":0.2,"value":531.2}……], where key can be understood as distance and value can be understood as PPM value. After obtaining the array, the front end can draw it.

[0072] In the above embodiment, when drawing a three-dimensional control diagram, the drawn image can refer to Fig. 9 , Fig. 9It is a 3D fisheye drawing result diagram according to an embodiment of the present invention. For example, the correspondence between the traversed camera device distance 0.0~100.0m and PPM at each installation height can be determined. The camera device data array can be "fishListMapList":[{"installationHeight":0.1,fishList":[{"value":25.0,"key":30.4}……},……], wherein installationHeight can be understood as the installation height. After obtaining the array, the front end can perform drawing.

[0073] The following is a description of the method for generating a camera equipment control diagram in conjunction with a specific implementation method:

[0074] Fig.10 : is a flow chart of a method for generating a camera equipment control diagram according to a specific embodiment of the present invention, the process comprising:

[0075] S1002, obtaining fisheye lens distortion data and sensor pixel size;

[0076] S1004, generating a fitting function curve according to the fisheye data;

[0077] S1006, respectively calculating the angles corresponding to the unit length changes of the x-axis, y-axis and z-axis, and then converting them to corresponding pixels from the fitting curve;

[0078] S1008, converting pixel density values ​​corresponding to the x-axis, y-axis, and z-axis according to the spatial density of the target object relative to the camera coordinate axis;

[0079] S1010, calculating and determining the PPM corresponding to the spatial position and spatial angle.

[0080] In the above embodiment, if you want to monitor a certain object, you can determine the best installation position of the camera equipment by drawing a control map. First, you can preset the installation height of the camera equipment and the projection distance from the monitored object. According to the distortion data and pixel size data of the fisheye lens (i.e. the above camera equipment), construct a fitting curve of angle and pixel (i.e. the above first objective function), then calculate the angle corresponding to the unit length change of the x-axis, y-axis, and z-axis, and convert it to the corresponding pixel by the first objective function curve. Finally, through spatial transformation, the calculation results of the distance and PPM are obtained. After the array is obtained, the front end can accurately draw the fisheye lens control map. The control map can determine the monitoring range and total pixel density of the camera equipment with this installation height and projection distance. If the object to be monitored is not within the above monitoring range or the total pixel density of the drawn image is not high, the installation height of the camera equipment and the projection distance from the monitored object can be adjusted, and then the control map can be redrawn until the obtained control map meets the requirements. Setting the specific parameters of the camera equipment according to this layout diagram can help installers choose the best installation parameters during the design phase, thereby improving the efficiency and reliability of the monitoring system and significantly reducing debugging and maintenance costs.

[0081] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0082] In this embodiment, a device for generating a camera equipment layout diagram is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0083] Fig.11 is a structural block diagram of a device for generating a camera device layout diagram according to an embodiment of the present invention, such as Fig.11 As shown, the device comprises:

[0084] A first determination module 1102 is used to determine a first objective function of the camera device, wherein the first objective function is used to indicate a corresponding relationship between an angle and a pixel density, the angle is an angle between a first connecting line and a vertical direction, the first connecting line is an angle between a target point of the object to be photographed and the camera device and the vertical direction, and the pixel density is a pixel density of an image of the target point photographed by the camera device;

[0085] A second determining module 1104 is used to determine a first angle between a second connecting line and a vertical direction, where the second connecting line is a connecting line between a reference object and the camera device;

[0086] A third determining module 1106 is used to determine, based on the first angle and the first objective function, a unit pixel density of an image obtained by photographing the reference object by the camera device;

[0087] a fourth determining module 1108, configured to determine a second objective function of the imaging device based on the unit pixel density, wherein the second objective function is used to indicate a relationship between a distance and a total pixel density, the distance being the distance between the object to be photographed and a projection of the imaging device, and the total pixel density being the pixel density of the entire image of the object to be photographed;

[0088] The generating module 1110 is used to generate a control diagram of the camera equipment based on the second objective function.

[0089] In an exemplary embodiment, the second determination module 1104 can implement the determination of the first angle between the first connecting line and the vertical direction in the following manner: determine a first point set, a second point set and a third point set included in the reference object, wherein each point set includes at least two points, the multiple points included in the first point set have different horizontal coordinates, the same vertical coordinates and the same vertical coordinates in the vertical direction, the multiple points included in the second point set have the same horizontal coordinates, different vertical coordinates and the same vertical coordinates in the vertical direction, and the multiple points included in the third point set have the same horizontal coordinates, the same vertical coordinates and different vertical coordinates in the vertical direction; respectively determine the angles between the line connecting each point included in the first point set, the second point set and the third point set and the camera device and the vertical direction to obtain the first angle.

[0090] In an exemplary embodiment, the third determination module 1106 can determine the unit pixel density of the image obtained by the camera device shooting the reference object based on the first angle and the first objective function in the following manner: substitute each angle included in the first angle into the first objective function to obtain the first pixel density corresponding to each angle; determine the unit pixel density based on the first pixel density, the size data of the reference object and the first projection distance between the reference object and the projection of the camera device.

[0091] In an exemplary embodiment, the third determination module 1106 can determine the unit pixel density based on the first pixel density, the size data of the reference object, and the first projection distance between the reference object and the camera device in the following manner: determine the second pixel density, the third pixel density, and the fourth pixel density included in the first pixel density, wherein the second pixel density is the pixel density corresponding to points with different horizontal coordinates, the same vertical coordinates, and the same vertical coordinates, the third pixel density is the pixel density corresponding to points with the same horizontal coordinates, different vertical coordinates, and the same vertical coordinates, and the fourth pixel density is the pixel density corresponding to points with the same horizontal coordinates, the same vertical coordinates, and different vertical coordinates; determine the first sub-unit pixel density based on the second pixel density and the size data of the reference object; determine the second sub-unit pixel density based on the third pixel density, the size data of the reference object, and the first projection distance; determine the third sub-unit pixel density based on the fourth pixel density and the size data of the reference object; and determine the first sub-unit pixel density, the second sub-unit pixel density, and the third sub-unit pixel density as the unit pixel density.

[0092] In an exemplary embodiment, the third determination module 1106 can determine the first sub-unit pixel density based on the second pixel density and the size data of the reference object in the following manner: determine a first absolute value of a first difference between a first sub-pixel density and a second sub-pixel density included in the second pixel density; determine a first ratio of a target width included in the size data to a first constant; and determine the ratio of the first absolute value to the first ratio as the first sub-unit pixel density.

[0093] In an exemplary embodiment, the third determination module 1106 can determine the second sub-unit pixel density based on the third pixel density, the size data of the reference object and the first projection distance in the following manner: determine a second ratio of the target width included in the size data to a second constant; determine a third ratio of the second ratio to the first projection distance; determine a first inverse tangent function value of the third ratio; determine a cosine value of the first inverse tangent function value; determine a first product of the cosine value and a fourth sub-pixel density included in the third pixel density; determine a second difference between the first product and the third sub-pixel density included in the third pixel density; determine a first square value of the second difference; determine a sine value of the first inverse tangent function value; determine a second product of the sine value and the fourth sub-pixel density; determine a second square value of the second product; determine a sum of the first square value and the second square value; determine the arithmetic square root value of the sum; and determine a fourth ratio of the arithmetic square root value to the second ratio as the second sub-unit pixel density.

[0094] In an exemplary embodiment, the third determination module 1106 can determine the third sub-unit pixel density based on the fourth pixel density and the size data of the reference object in the following manner: determine the second absolute value of the third difference between the fifth sub-pixel density and the sixth sub-pixel density included in the fourth pixel density; determine the fifth ratio of the target width included in the size data to a third constant; and determine the sixth ratio of the second absolute value to the fifth ratio as the third sub-unit pixel density.

[0095] In an exemplary embodiment, the fourth determination module 1108 can implement the second objective function of the camera device based on the unit pixel density in the following manner: determine the second projection distance between the object to be photographed and the projection of the camera device; determine the target line between the object to be photographed and the projection point of the camera device on the ground based on the second projection distance; determine the first angle between the target line and the horizontal direction, the second angle between the target line and the vertical direction, and the third angle between the target line and the vertical direction; determine the second objective function based on the unit pixel density, the first angle, the second angle, and the third angle.

[0096] In an exemplary embodiment, the fourth determination module 1108 can determine the second objective function based on the unit pixel density, the first angle, the second angle and the third angle in the following manner: determine a first product of a first sub-unit pixel density included in the unit pixel density, a cosine value of the first angle and a sine value of the third angle, wherein the first sub-unit pixel density is determined based on the pixel density corresponding to points with different horizontal coordinates, the same vertical coordinates and the same vertical coordinates; determine a second sub-unit pixel density included in the unit pixel density, a cosine value of the second angle and a sine value of the third angle The second product of the value and the sine value of the third angle, wherein the second sub-unit pixel density is determined based on the pixel density corresponding to points with the same horizontal coordinate, different vertical coordinates and the same vertical coordinate; determine the third product of the third sub-unit pixel density included in the unit pixel density and the cosine value of the third angle, wherein the third sub-unit pixel density is determined based on the pixel density corresponding to points with the same horizontal coordinate, the same vertical coordinate and different vertical coordinates; determine the sum of the first product, the second product and the third product; determine the correspondence between the sum and the total pixel density as the second objective function.

[0097] In an exemplary embodiment, the first determination module 1102 may determine the first objective function of the camera device in the following manner: acquiring distortion data and sensor size data of the camera device; and determining the first objective function based on the distortion data and the sensor size data.

[0098] In an exemplary embodiment, the generation module 1110 generates the control diagram of the camera device based on the second objective function, including at least one of the following: generating a two-dimensional control diagram of the camera device based on the second objective function; generating a three-dimensional control diagram of the camera device based on the second objective function. It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0099] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0100] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0101] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0102] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0103] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the steps of the method in each embodiment of the present application when the computer program is executed by a processor.

[0104] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0105] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0106] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for generating a camera equipment control diagram, characterized in that: include: Determine a first objective function of the camera device, wherein the first objective function is used to indicate a corresponding relationship between an angle and a pixel density, the angle is an angle between a first connecting line and a vertical direction, the first connecting line is a connecting line between a target point of the object to be photographed and the camera device, and the pixel density is a pixel density of an image of the target point photographed by the camera device; Determine a first angle between a second connecting line and a vertical direction, wherein the second connecting line is a connecting line between a reference object and the camera device; Determine, based on the first angle and the first objective function, a unit pixel density of an image obtained by photographing the reference object by the camera device; Determining a second objective function of the imaging device based on the unit pixel density, wherein the second objective function is used to indicate a relationship between a distance and a total pixel density, the distance being a distance between the object to be photographed and a projection of the imaging device, and the total pixel density being a pixel density of an entire image of the object to be photographed; A control diagram of the camera equipment is generated based on the second objective function.

2. The method according to claim 1, characterized in that The determining a first angle between the first connecting line and the vertical direction comprises: Determine a first point set, a second point set, and a third point set included in the reference object, wherein each point set includes at least two points, the multiple points included in the first point set have different horizontal coordinates, the same vertical coordinates, and the same vertical coordinates in the vertical direction, the multiple points included in the second point set have the same horizontal coordinates, different vertical coordinates, and the same vertical coordinates in the vertical direction, and the multiple points included in the third point set have the same horizontal coordinates, the same vertical coordinates, and different vertical coordinates in the vertical direction; The angles between the vertical direction and the lines connecting the respective points included in the first point set, the second point set and the third point set and the camera device are determined respectively to obtain the first angle.

3. The method according to claim 1, characterized in that Determining the unit pixel density of the image obtained by photographing the reference object by the camera device based on the first angle and the first objective function includes: Substituting each angle included in the first angle into the first objective function to obtain a first pixel density corresponding to each angle; The unit pixel density is determined based on the first pixel density, size data of the reference object, and a first projection distance between the reference object and a projection of the imaging device.

4. The method according to claim 3, characterized in that Determining the unit pixel density based on the first pixel density, the size data of the reference object, and a first projection distance between the reference object and the camera device includes: Determine a second pixel density, a third pixel density, and a fourth pixel density included in the first pixel density, wherein the second pixel density is the pixel density corresponding to points with different horizontal coordinates but the same vertical coordinates and the same vertical coordinates, the third pixel density is the pixel density corresponding to points with the same horizontal coordinates but different vertical coordinates but the same vertical coordinates, and the fourth pixel density is the pixel density corresponding to points with the same horizontal coordinates, the same vertical coordinates but different vertical coordinates; determining a first sub-unit pixel density based on the second pixel density and the size data of the reference object; determining a second sub-unit pixel density based on the third pixel density, the size data of the reference object, and the first projection distance; determining a third sub-unit pixel density based on the fourth pixel density and the size data of the reference object; The first sub-unit pixel density, the second sub-unit pixel density, and the third sub-unit pixel density are determined as the unit pixel density.

5. The method according to claim 4, characterized in that Determining a first sub-unit pixel density based on the second pixel density and the size data of the reference object includes: Determine a first absolute value of a first difference between a first sub-pixel density and a second sub-pixel density included in the second pixel density; determining a first ratio of a target width included in the size data to a first constant; A ratio of the first absolute value to the first ratio is determined as the first sub-unit pixel density.

6. The method according to claim 4, characterized in that Determining a second sub-unit pixel density based on the third pixel density, the size data of the reference object, and the first projection distance includes: determining a second ratio of the target width included in the size data to a second constant; determining a third ratio of the second ratio to the first projection distance; determining a first inverse tangent function value of the third ratio; determining a cosine value of the first inverse tangent function value; determining a first product of the cosine value and a fourth sub-pixel density included in the third pixel density; determining a second difference between the first product and a third sub-pixel density included in the third pixel density; determining a first square value of the second difference; determining a sine value of the first inverse tangent function value; determining a second product of the sine value and the fourth sub-pixel density; determining a second square value of the second product; determining a sum of the first square value and the second square value; determining the arithmetic square root of the sum; A fourth ratio of the arithmetic square root value to the second ratio is determined as the second sub-unit pixel density.

7. The method according to claim 4, characterized in that Determining a third sub-unit pixel density based on the fourth pixel density and the size data of the reference object includes: determining a second absolute value of a third difference between a fifth sub-pixel density and a sixth sub-pixel density included in the fourth pixel density; determining a fifth ratio of the target width included in the size data to a third constant; A sixth ratio of the second absolute value to the fifth ratio is determined as the third sub-unit pixel density.

8. The method according to claim 1, characterized in that Determining a second objective function of the camera device based on the unit pixel density includes: Determining a second projection distance between the object to be photographed and a projection of the imaging device; Determine a target line between the object to be photographed and a projection point of the camera device on the ground based on the second projection distance; Determine a first angle between the target line and the horizontal direction, a second angle between the target line and the vertical direction, and a third angle between the target line and the vertical direction; The second objective function is determined based on the unit pixel density, the first angle, the second angle, and the third angle.

9. The method according to claim 8, characterized in that Determining the second objective function based on the unit pixel density, the first angle, the second angle, and the third angle includes: Determine a first product of a first sub-unit pixel density included in the unit pixel density, a cosine value of the first angle, and a sine value of the third angle, wherein the first sub-unit pixel density is determined based on pixel densities corresponding to points with different abscissas, the same ordinates, and the same vertical coordinates; Determine a second product of a second sub-unit pixel density included in the unit pixel density, a cosine value of the second angle, and a sine value of the third angle, wherein the second sub-unit pixel density is determined based on pixel densities corresponding to points having the same abscissa, different ordinates, and the same vertical coordinates; Determine a third product of a third sub-unit pixel density included in the unit pixel density and a cosine value of the third angle, wherein the third sub-unit pixel density is determined based on pixel densities corresponding to points with the same abscissa and ordinate but different ordinates; determining a sum of the first product, the second product, and the third product; The corresponding relationship between the sum value and the total pixel density is determined as the second objective function.

10. The method according to claim 1, characterized in that Determining a first objective function of the camera device includes: Obtaining distortion data and sensor size data of the camera device; The first objective function is determined based on the distortion data and the sensor size data.

11. A device for generating a camera equipment control diagram, characterized in that: include: a first determination module, configured to determine a first objective function of the camera device, wherein the first objective function is used to indicate a corresponding relationship between an angle and a pixel density, the angle is an angle between a first connecting line and a vertical direction, the first connecting line is a connecting line between a target point of the object to be photographed and the camera device, and the pixel density is a pixel density of an image of the target point photographed by the camera device; A second determining module, used to determine a first angle between a second connecting line and a vertical direction, wherein the second connecting line is a connecting line between a reference object and the camera device; a third determining module, configured to determine, based on the first angle and the first objective function, a unit pixel density of an image obtained by photographing the reference object by the camera device; a fourth determination module, configured to determine a second objective function of the imaging device based on the unit pixel density, wherein the second objective function is used to indicate a relationship between a distance and a total pixel density, the distance being the distance between the object to be photographed and a projection of the imaging device, and the total pixel density being the pixel density of the entire image of the object to be photographed; A generation module is used to generate a control diagram of the camera equipment based on the second objective function.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 10 when executed.

13. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 10.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.