Parking space positioning method and device, computer device, readable storage medium and program product

CN121617276BActive Publication Date: 2026-08-21SHENZHEN MIRACLE WISDOM NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511760286.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-08-21
Estimated Expiration
2045-11-27

AI Technical Summary

Technical Problem

但现有的双摄像头路侧停车管理技术仍存在局限,由于球机需针对每个车位设置预置位(即pan、tilt、zoom的参数组合),而现有技术多依赖人工手动调整,运维人员需现场对照全局摄像头显示的车位位置,逐一调节球机角度与焦距,记录参数后保存为预置位,该方式在多车位场景下工作量极大,且人工操作易因主观误差导致定位偏差,后续环境变化(如车辆移动、光照变化)后需重新人工标定,因此,目前的车位定位方法存在效率较低的问题

Benefits of technology

[0041] The aforementioned parking space positioning method, device, computer equipment, computer-readable storage medium, and computer program product acquire initial images captured by a camera corresponding to a roadside parking area under multiple sets of preset shooting angle parameters; for any parking space area in the roadside parking area, a candidate image matching the parking space area is determined from each initial image; based on the parking space characteristics of the candidate image and the parking space area, the parking space area position in the candidate image is determined; based on the positional offset between the parking space area position in the candidate image and the image reference position in the candidate image, the parameter adjustment amount of the preset shooting angle parameters associated with the candidate image is determined; based on the parameter adjustment amount of the preset shooting angle parameters, the preset shooting angle parameters associated with the candidate image are adjusted to obtain the target shooting angle parameters corresponding to the parking space area; the target shooting angle parameters are the shooting angle parameters used by the camera when positioning the parking space area. In this way, by automatically acquiring the initial images of the cameras corresponding to the roadside parking area under multiple sets of preset shooting angle parameters, candidate image matching is completed for any parking space area, the specific position of the parking space in the candidate image is determined based on the parking space characteristics, the parameter adjustment amount is calculated according to the offset between the parking space area position and the image reference position, and finally the target shooting angle parameters are automatically adjusted to achieve fully automated operation of parking space positioning. There is no need for maintenance personnel to manually adjust the camera angle and focal length and record the preset position on site. This not only improves the efficiency of parking space positioning, but also avoids the subjective error caused by manual operation, significantly improves the accuracy of parking space positioning, and further enhances the intelligence and automation level of roadside parking management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121617276B_ABST
    Figure CN121617276B_ABST
Patent Text Reader

Abstract

The application relates to a parking space positioning method and device, computer equipment, a readable storage medium and a program product. The method comprises the following steps: acquiring initial images collected by a camera corresponding to a roadside parking area under a plurality of groups of preset shooting angle parameters; for any parking space area in the roadside parking area, determining a candidate image matched with the parking space area from each initial image, determining a parking space area position of the parking space area in the candidate image according to a parking space feature of the candidate image and the parking space area; determining a parameter adjustment amount of the preset shooting angle parameter associated with the candidate image according to a position offset between the parking space area position in the candidate image and an image reference position in the candidate image; and adjusting the preset shooting angle parameter associated with the candidate image according to the parameter adjustment amount of the preset shooting angle parameter, so as to obtain a target shooting angle parameter corresponding to the parking space area. The method can improve the efficiency of the parking space positioning method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent monitoring technology, and in particular to a parking space positioning method, device, computer equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] With the acceleration of urbanization and the continuous growth of motor vehicle ownership, roadside parking, as an important supplement to urban public parking resources, directly affects traffic order through its management efficiency and level of intelligence. Traditional roadside parking management relies on manual inspection and recording of parking space status and manual collection of parking fees, which suffers from problems such as low efficiency, high cost, data error, and difficulty in tracing illegal parking. Therefore, intelligent monitoring technology is gradually being applied to roadside parking management.

[0003] In traditional technologies, the dual-camera solution using a global camera and a PTZ camera has become the mainstream approach. The global camera has a wide field of view, covering all parking spaces within the current smart pole management range, and is used to acquire the overall distribution and status of parking spaces. The PTZ camera has horizontal rotation (pan), vertical tilt (tilt), and zoom adjustment functions, and can focus on a single parking space to acquire detailed images (such as license plates). However, existing dual-camera roadside parking management technologies still have limitations. Because the PTZ camera needs to be preset for each parking space (i.e., the parameter combination of pan, tilt, and zoom), and existing technologies mostly rely on manual adjustment, maintenance personnel need to compare the parking space positions displayed by the global camera on-site, adjust the PTZ camera angle and focal length one by one, record the parameters, and save them as preset positions. This method is extremely labor-intensive in multi-parking space scenarios, and manual operation is prone to positioning deviations due to subjective errors. Subsequent environmental changes (such as vehicle movement or changes in lighting) require recalibration. Therefore, current parking space positioning methods suffer from low efficiency. Summary of the Invention

[0004] Therefore, it is necessary to provide a parking space positioning method, device, computer equipment, computer-readable storage medium, and computer program product that can improve the efficiency of parking space positioning methods in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a parking space positioning method, including:

[0006] Acquire initial images from cameras corresponding to roadside parking areas under multiple sets of preset shooting angle parameters;

[0007] For any parking space area in the roadside parking area, a candidate image matching the parking space area is determined from each of the initial images. Based on the parking space features of the candidate image and the parking space area, the location of the parking space area in the candidate image is determined.

[0008] Based on the positional offset between the parking space area position in the candidate image and the image reference position in the candidate image, the parameter adjustment amount of the preset shooting angle parameter associated with the candidate image is determined;

[0009] Based on the parameter adjustment amount of the preset shooting angle parameters, the preset shooting angle parameters associated with the candidate image are adjusted to obtain the target shooting angle parameters corresponding to the parking space area; the target shooting angle parameters are the shooting angle parameters used by the camera to locate the parking space area.

[0010] In one embodiment, determining candidate images matching the parking space area from each of the initial images includes:

[0011] Obtain a panoramic image of the roadside parking area;

[0012] The parking space images corresponding to each parking space area are cropped from the panoramic image;

[0013] The panoramic image and the parking space images corresponding to each parking space area are input into a pre-trained multimodal feature extraction model to obtain the mapping relationship between the parking space area and the parking space features; the parking space features include at least one of the regional description features of the parking space area and the vehicle description features of the vehicles parked in the parking space area.

[0014] Based on the mapping relationship, candidate images that match the parking space area are determined from each of the initial images.

[0015] In one embodiment, determining candidate images matching the parking space area from each of the initial images based on the mapping relationship includes:

[0016] The initial images, the panoramic image, the parking space image corresponding to the parking space area, and the mapping relationship are input into a pre-trained multimodal feature matching model to obtain the candidate images;

[0017] The multimodal feature matching model is used to determine the initial image with the highest feature overlap with the parking space area from each of the initial images based on the initial image, the panoramic image, the parking space image corresponding to the parking space area, and the mapping relationship, and use it as the candidate image.

[0018] In one embodiment, the preset shooting angle parameters include a horizontal rotation angle, a vertical pitch angle, and a zoom factor; determining the parameter adjustment amount of the preset shooting angle parameters associated with the candidate image based on the positional offset between the parking space area position in the candidate image and the image reference position in the candidate image includes:

[0019] Obtain the zoom factor in the preset shooting angle parameters associated with the candidate image, and determine the field of view angle of the candidate image at the zoom factor;

[0020] Based on the positional offset between the parking space location in the candidate image and the image reference location in the candidate image, and the field of view angle, determine the parameter adjustment amount of the horizontal rotation angle and the parameter adjustment amount of the vertical pitch angle in the preset shooting angle parameters.

[0021] In one embodiment, adjusting the preset shooting angle parameters associated with the candidate image based on the parameter adjustment amount of the preset shooting angle parameters to obtain the target shooting angle parameters corresponding to the parking space area includes:

[0022] Based on the parameter adjustment amount of the preset shooting angle parameters, the preset shooting angle parameters associated with the candidate image are adjusted to obtain the candidate shooting angle parameters corresponding to the parking space area.

[0023] With the camera's shooting angle parameters adjusted to the candidate shooting angle parameters, the camera is controlled to capture at least two test images.

[0024] Based on the test image and the parking space characteristics of the parking space area, determine the location of the parking space area in the test image;

[0025] The parameter adjustment amount of the candidate shooting angle parameter is determined based on the positional offset between the parking space area position in the test image and the image reference position in the test image.

[0026] Based on the parameter adjustment amount of the candidate shooting angle parameters, the candidate shooting angle parameters are adjusted to obtain the target shooting angle parameters corresponding to the parking space area.

[0027] In one embodiment, adjusting the candidate shooting angle parameters according to the parameter adjustment amount of the candidate shooting angle parameters to obtain the target shooting angle parameters corresponding to the parking space area includes:

[0028] Based on the parameter adjustment amount of the candidate shooting angle parameters, the horizontal rotation angle and vertical pitch angle in the candidate shooting angle parameters are adjusted to obtain the adjusted horizontal rotation angle and adjusted vertical pitch angle.

[0029] The zoom factor in the candidate shooting angle parameters is adjusted to the target zoom factor; the target zoom factor is determined based on the accuracy of the camera in recognizing license plates in the parking space area.

[0030] Based on the adjusted horizontal rotation angle, the adjusted vertical pitch angle, and the target zoom factor, the target shooting angle parameters corresponding to the parking space area are determined.

[0031] In one embodiment, the method further includes:

[0032] If a candidate image matching the parking space area cannot be determined from the initial images, or if the location of the parking space area in the candidate image cannot be determined, the camera is controlled to send a linkage request to the adjacent camera in the roadside parking area; the linkage request is used to instruct the adjacent camera to acquire the target shooting angle parameters corresponding to the parking space area.

[0033] Secondly, this application also provides a parking space positioning device, comprising:

[0034] The image acquisition module is used to acquire the initial images captured by the cameras corresponding to the roadside parking area under multiple sets of preset shooting angle parameters;

[0035] The image matching module is used to determine, from each of the initial images, a candidate image that matches any parking space area in the roadside parking area, and to determine the location of the parking space area in the candidate image based on the parking space features of the parking space area and the candidate image.

[0036] The parameter determination module is used to determine the parameter adjustment amount of the preset shooting angle parameter associated with the candidate image based on the positional offset between the parking space area position in the candidate image and the image reference position in the candidate image.

[0037] The parameter adjustment module is used to adjust the preset shooting angle parameters associated with the candidate image according to the parameter adjustment amount of the preset shooting angle parameters, so as to obtain the target shooting angle parameters corresponding to the parking space area; the target shooting angle parameters are the shooting angle parameters used by the camera to locate the parking space area.

[0038] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.

[0039] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0040] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.

[0041] The aforementioned parking space positioning method, device, computer equipment, computer-readable storage medium, and computer program product acquire initial images captured by a camera corresponding to a roadside parking area under multiple sets of preset shooting angle parameters; for any parking space area in the roadside parking area, a candidate image matching the parking space area is determined from each initial image; based on the parking space characteristics of the candidate image and the parking space area, the parking space area position in the candidate image is determined; based on the positional offset between the parking space area position in the candidate image and the image reference position in the candidate image, the parameter adjustment amount of the preset shooting angle parameters associated with the candidate image is determined; based on the parameter adjustment amount of the preset shooting angle parameters, the preset shooting angle parameters associated with the candidate image are adjusted to obtain the target shooting angle parameters corresponding to the parking space area; the target shooting angle parameters are the shooting angle parameters used by the camera when positioning the parking space area. In this way, by automatically acquiring the initial images of the cameras corresponding to the roadside parking area under multiple sets of preset shooting angle parameters, candidate image matching is completed for any parking space area, the specific position of the parking space in the candidate image is determined based on the parking space characteristics, the parameter adjustment amount is calculated according to the offset between the parking space area position and the image reference position, and finally the target shooting angle parameters are automatically adjusted to achieve fully automated operation of parking space positioning. There is no need for maintenance personnel to manually adjust the camera angle and focal length and record the preset position on site. This not only improves the efficiency of parking space positioning, but also avoids the subjective error caused by manual operation, significantly improves the accuracy of parking space positioning, and further enhances the intelligence and automation level of roadside parking management. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 This is an application environment diagram of a parking space positioning method in one embodiment;

[0044] Figure 2 This is a flowchart illustrating a parking space positioning method in one embodiment;

[0045] Figure 3 This is a flowchart illustrating a parking space positioning method in another embodiment;

[0046] Figure 4 This is a structural block diagram of a parking space positioning device in one embodiment;

[0047] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0049] In related technologies, some parking space positioning technologies require setting a preset position for each parking space (i.e., a combination of parameters such as pan, tilt, and zoom). However, existing technologies mostly rely on manual adjustment. Maintenance personnel need to compare the parking space positions displayed by the global camera on-site, adjust the PTZ camera angle and focal length one by one, record the parameters, and save them as preset positions. This method is extremely labor-intensive in multi-parking space scenarios, and manual operation is prone to positioning deviations due to subjective errors. Subsequent environmental changes (such as vehicle movement or changes in lighting) require recalibration. This positioning process is labor-intensive and inefficient.

[0050] In addition, some other parking space positioning technologies achieve automatic positioning of the PTZ camera through simple image matching (such as grayscale matching and single contour matching). However, relying on only a single feature, they cannot effectively distinguish similar parking spaces or similar vehicles. The feature matching accuracy is insufficient. When there is light interference or occlusion by adjacent vehicles, the judgment of the overlap between the captured image and the global parking spaces is greatly deviated, causing the PTZ camera positioning to fail.

[0051] Moreover, traditional parking space positioning technology does not have a mechanism to deal with temporary obstruction of parking spaces by vehicles. Once obstructed, the positioning is directly judged as a failure. At the same time, the zoom adjustment is mostly set based on experience (such as fixed zoom=5), without quantitative optimization with the goal of "clearly recognizing license plates". This often results in problems such as insufficient zoom to see the license plate clearly, or excessive zoom to have a small field of view that cannot fully cover the parking space.

[0052] Furthermore, traditional parking space positioning technology often uses a single smart pole PTZ camera to work independently without linking adjacent smart pole cameras. When the target parking space is in the blind spot of a single PTZ camera (such as when the spacing between smart poles is too large or buildings obstruct the view), effective positioning cannot be achieved.

[0053] Based on this, embodiments of this application provide a parking space positioning method, which can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another network server.

[0054] Terminal 102 acquires initial images captured by cameras corresponding to roadside parking areas under multiple sets of preset shooting angle parameters; for any parking space area in the roadside parking area, terminal 102 determines candidate images that match the parking space area from each initial image, and determines the parking space area position in the candidate image based on the parking space characteristics of the candidate image and the parking space area; terminal 102 determines the parameter adjustment amount of the preset shooting angle parameters associated with the candidate image based on the positional offset between the parking space area position in the candidate image and the image reference position in the candidate image; terminal 102 adjusts the preset shooting angle parameters associated with the candidate image based on the parameter adjustment amount of the preset shooting angle parameters to obtain the target shooting angle parameters corresponding to the parking space area; the target shooting angle parameters are the shooting angle parameters used by the camera when locating the parking space area.

[0055] The terminal 102 can refer to a device with data processing capabilities, such as a smart street light pole controller, edge computing device, or industrial control terminal, or it can be a personal computing device such as a smartphone, tablet, laptop, or desktop computer. The terminal 102 can communicate with the camera corresponding to the roadside parking area to receive image data collected by the camera and process and analyze the image data.

[0056] Server 104 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.

[0057] In one exemplary embodiment, such as Figure 2 As shown, a parking space positioning method is provided, which can be applied to... Figure 1 Taking terminal 102 as an example, the explanation includes:

[0058] Step S202: Obtain the initial images captured by the cameras corresponding to the roadside parking area under multiple sets of preset shooting angle parameters.

[0059] Roadside parking areas refer to areas located on both sides of urban roads, marked by road markings, designated for the temporary parking of motor vehicles. A roadside parking area may include multiple parking spaces, each with its boundaries defined by road markings.

[0060] In practical applications, smart poles can be installed in roadside parking areas. Smart poles are urban infrastructure that integrates various smart devices and sensors, and combines technologies such as the Internet of Things, big data, and artificial intelligence. Using roadside poles as physical carriers, they integrate a variety of components such as global cameras, PTZ cameras, communication modules, environmental sensors, LED information screens, and emergency alarm devices, enabling real-time monitoring and intelligent management of roadside parking, traffic flow, and environmental conditions.

[0061] The cameras corresponding to the roadside parking area may include at least two cameras. One camera is used to acquire an overall image of the roadside parking area, such as a global camera; the other camera may have horizontal rotation, vertical tilt, and zoom functions to capture detailed images of individual parking spaces, such as a PTZ camera or a bullet camera mounted on a pan-tilt unit. Optionally, the global camera and the PTZ camera may be integrated into the smart pole.

[0062] For example, roadside parking areas can be equipped with smart poles that are 3 to 4 meters high and have dual cameras. Each smart pole can be fixed with one global camera (horizontal viewing angle ≥120°, covering 4 to 6 parking spaces managed by the current pole) and one PTZ camera, with a horizontal pan range of [0, 350°], a vertical tilt range of [0, 90°], and a zoom range of 1 to 8 levels. Adjacent smart poles can communicate via 5G or Ethernet to share PTZ camera images and positioning parameters.

[0063] In practice, among the cameras corresponding to the roadside parking area, the PTZ camera can be used to acquire initial images under multiple sets of preset shooting angle parameters.

[0064] Each set of preset shooting angle parameters can include the shooting angle and focal length parameters of the camera when acquiring images, including the horizontal rotation angle, vertical tilt angle, and zoom ratio. The horizontal rotation angle refers to the rotation angle of the camera in the horizontal direction, which can be represented by "pan", for example, 0°~350°; the vertical tilt angle refers to the tilt angle of the camera in the vertical direction, which can be represented by "tilt", using 0°~90°; the zoom ratio refers to the zoom ratio of the camera lens, which can be represented by "zoom". Different camera models have different zoom ratio ranges, for example, it can be 1x to 8x.

[0065] The initial image refers to the image captured by the camera according to preset shooting angle parameters. In practical applications, the terminal can control the camera to sequentially adjust to multiple sets of preset shooting angle parameters, and capture one or more images under each preset shooting angle parameter. For example, for a set of preset shooting angle parameters, while keeping the vertical pitch angle and zoom magnification constant, the horizontal rotation angle can be changed at regular intervals to capture images, thereby obtaining multiple initial images.

[0066] For example, the initial state of the PTZ camera can be set to adjust the camera to its minimum zoom level, such as zoom=1. Then, the PTZ camera can be controlled to capture images from multiple initial shooting positions. For example, three initial shooting positions can be set:

[0067] P1: {'Pan':120°, 'Tilt':12°, 'Zoom':1};

[0068] P2: {'Pan':120°, 'Tilt':0°, 'Zoom':1};

[0069] P3: {'Pan':120°, 'Tilt':24°, 'Zoom':1};

[0070] Each initial shooting position corresponds to a set of preset shooting angle parameters. For each initial shooting position, one image is captured for every 40° increase in pan, and three images are captured for each initial shooting position, for a total of nine initial images. For example, P1 corresponds to Pan=120°, 160°, 200°, Tilt=12°, and Zoom=1.

[0071] Step S204: For any parking space area in the roadside parking area, determine the candidate image that matches the parking space area from each initial image, and determine the location of the parking space area in the candidate image based on the parking space features of the candidate image and the parking space area.

[0072] A parking area can be a zone within a roadside parking area defined by road markings, containing a single parking space. Each parking area has a unique identifier, such as a parking space number. Parking areas can be of different types, such as standard motor vehicle parking spaces, accessible parking spaces, and charging parking spaces.

[0073] Candidate images are selected from multiple initial images that best match the current parking space area. Candidate images contain image information about the current parking space area and clearly reflect its characteristics.

[0074] Parking space features can refer to characteristic information used to describe and identify parking space areas, including at least one of the following: area description features of the parking space area and vehicle description features of vehicles parked in the parking space area. It should be noted that if there are vehicles parked in the parking space area, the parking space features may include both area description features and vehicle description features; if there are no vehicles parked in the parking space area, the parking space features may only include area description features.

[0075] The regional description features include parking space type, parking space status, and parking space location characteristics. For example, the parking space type can be a standard roadside parking space, an accessible parking space, or a roadside charging parking space; the parking space status can be a parked or vacant parking space; and the parking space location characteristics can be descriptive information such as a white SUV in front of the space, a yellow sedan behind the space, or the left edge of the parking space being aligned with a solid road line.

[0076] The vehicle description features include vehicle color, model, prominent markings, and outline characteristics. For example, the vehicle color can be black, white, red, etc.; the model can be a sedan, SUV, van, etc.; prominent markings can be a roof rack, a sticker on the left front door, etc.; and outline characteristics can be a streamlined body, a boxy body, etc.

[0077] The location of the parking space area in the candidate image can be its pixel coordinates, which can be represented by a rectangle. For example, the rectangle can be determined by the coordinates of its top-left and bottom-right corners. For instance, the rectangle coordinates can be represented as (x1, y1, x2, y2), where x1 and y1 are the x and y coordinates of the top-left corner, and x2 and y2 are the x and y coordinates of the bottom-right corner.

[0078] Specifically, the terminal can identify candidate images matching each parking space area within the roadside parking area from each initial image. The process of identifying candidate images involves comparing the initial images with the parking space features of the parking space area, selecting the initial image with the highest feature overlap as the candidate image. After identifying candidate images, the specific location of the parking space area within the candidate images can be further determined. This process can be achieved using image recognition technology, such as object detection algorithms or feature matching algorithms, to identify areas in the candidate images that match the parking space features and mark the pixel coordinates of these areas to obtain the location of the parking space area within the candidate images.

[0079] For example, the candidate image and parking space features of the parking space area can be input into a multimodal large model. The multimodal large model outputs the coordinates of the rectangular box of the parking space area, such as (x1=300, y1=200, x2=700, y2=500), and records the preset shooting angle parameters (pan0, tilt0, zoom=1) associated with the candidate image. It should be noted that if the camera captures an initial image B under the preset shooting angle parameters A, and if the initial image B is subsequently determined as a candidate image, then the preset shooting angle parameters associated with the candidate image are the same as the preset shooting angle parameters A.

[0080] Step S206: Based on the positional offset between the parking space area position in the candidate image and the image reference position in the candidate image, determine the parameter adjustment amount of the preset shooting angle parameter associated with the candidate image.

[0081] The image reference position can be a baseline point in the candidate image, such as the image center. The image center position can be calculated from the image's width and height. For example, if the candidate image has a width of 1920 pixels and a height of 1080 pixels, then the horizontal coordinate of the image center position is 960 pixels and the vertical coordinate is 540 pixels.

[0082] The location of the parking space area may also include the center location of the parking space, that is, the center location of the parking space area in the candidate image.

[0083] Therefore, the positional offset between the parking space area in the candidate image and the image reference position in the candidate image can be the positional offset between the center position of the parking space in the candidate image and the center position of the image.

[0084] The position offset can include the pixel distance between the parking space area and the image reference position. The position offset includes both horizontal and vertical offsets.

[0085] The parameter adjustment amount may include the value that needs to be adjusted for the preset shooting angle parameter in order to move the parking space area to the image reference position (such as the center position of the image).

[0086] Step S208: Adjust the preset shooting angle parameters associated with the candidate image according to the parameter adjustment amount of the preset shooting angle parameters to obtain the target shooting angle parameters corresponding to the parking space area.

[0087] The target shooting angle parameters are the shooting angle parameters used by the camera to locate the parking space area. These parameters, after adjustment, enable the camera to accurately aim at the parking space area and acquire a clear image. The target shooting angle parameters also include the horizontal rotation angle, vertical pitch angle, and zoom magnification.

[0088] In practice, the target shooting angle parameters can be saved as the camera's preset position. When the parking space area needs to be photographed later, the terminal can directly control the camera to adjust to the target shooting angle parameters without repeating the above steps, thereby improving the efficiency of roadside parking management.

[0089] In the above-mentioned parking space positioning method, the initial images of the cameras corresponding to the roadside parking area under multiple sets of preset shooting angle parameters are automatically acquired. For any parking space area, candidate image matching is completed, the specific position of the parking space in the candidate image is determined based on the parking space characteristics, and the parameter adjustment amount is calculated according to the offset between the parking space area position and the image reference position. Finally, the target shooting angle parameters are automatically adjusted to obtain the final result. This realizes the fully automated operation of the parking space positioning process. There is no need for maintenance personnel to manually adjust the camera angle and focal length and record the preset position on-site. This not only improves the efficiency of parking space positioning, but also avoids the subjective errors caused by manual operation, significantly improves the accuracy of parking space positioning, and further enhances the intelligence and automation level of roadside parking management.

[0090] In another embodiment, determining candidate images matching parking space areas from each initial image includes: acquiring a panoramic image of the roadside parking area; cropping parking space images corresponding to each parking space area from the panoramic image; inputting the panoramic image and the parking space images corresponding to each parking space area into a pre-trained multimodal feature extraction model to obtain a mapping relationship between parking space areas and parking space features; the parking space features include at least one of the region description features of the parking space area and the vehicle description features of the vehicles parked in the parking space area; and determining candidate images matching parking space areas from each initial image based on the mapping relationship.

[0091] In practice, the system can control the global camera corresponding to the roadside parking area to capture a panoramic image of the roadside parking within the current smart pole management range, for example, with a resolution of 1920×1080. Based on road marking recognition algorithms and vehicle detection algorithms, the system automatically marks the area boundary for each parking space (or manually corrects it) and marks each parking space area with a unique parking space number (such as "pole 1 - parking space 3"). The system then crops a small image of each parking space from the panoramic image to obtain the parking space image corresponding to each parking space area, for example, with a resolution of 400×300. This ensures that the parking space image contains the complete parking space area, and also ensures that the parking space image contains the complete parked vehicle even if there is a vehicle parked in the parking space area.

[0092] Then, the panoramic image and the corresponding parking space images for each parking space area can be input into a pre-trained multimodal feature extraction model. This multimodal feature extraction model can be a deep learning model capable of processing multiple modalities of data, such as image and text data, and extracting features. The multimodal feature extraction model can be based on a pre-trained large model architecture, such as a vision-language pre-trained model, capable of simultaneously understanding image content and text descriptions and establishing the correlation between the two. For example, a multimodal model already pre-trained on large-scale image and text data can be selected and then fine-tuned on a roadside parking dataset to better identify and understand parking space and vehicle features in roadside parking scenarios.

[0093] A pre-trained multimodal feature extraction model can output a "parking space-feature" mapping table, which shows the mapping relationship between parking space areas and parking space features. An example "parking space-feature" mapping table may include:

[0094] Area description features: type (standard roadside parking space / accessible parking space / roadside charging parking space), status (parked / vacant), location characteristics (e.g., "adjacent to a white SUV, adjacent to a yellow sedan, with the left edge of the parking space aligned with the solid road line").

[0095] Vehicle description features (parking space for parked vehicles): color, model, prominent markings (e.g., "black sedan with roof rack and sticker on the front left door"), and outline features (streamlined body).

[0096] As can be seen, by inputting panoramic images and cropped small images from global cameras into a pre-trained multimodal large model, multi-dimensional features of parking spaces (type, status, location characteristics) and vehicles (color, model, prominent markings) can be accurately extracted, providing a high-precision basis for matching.

[0097] In practice, after obtaining the mapping relationship between parking space areas and parking space features, each initial image is compared with the parking space features in the mapping relationship. The initial image with the highest overlap with the target parking space area features is selected as the candidate image. Feature overlap refers to the degree of similarity between the features contained in the initial image and the parking space features of the target parking space area. Feature overlap can be evaluated through multiple dimensions, such as the matching degree of parking space type, vehicle color, vehicle type, prominent signage, and location characteristics. The terminal can perform a weighted summation of the matching degrees of these dimensions to obtain a comprehensive feature overlap score.

[0098] For example, multiple initial images (such as the nine initial images captured above) can be input into a multimodal large model along with a panoramic image, parking space images of the corresponding parking space area, and a "parking space-feature" mapping table. The large model determines the highest overlap rate and outputs whether there is a best overlapping image that corresponds to the parking space in the panoramic image. If so, the best overlapping image is used as a candidate image, and the corresponding image file name is output; otherwise, "No best viewpoint" is output. By designing multiple initial shooting positions and switching multiple angles at each initial shooting position, combined with the multimodal large model to filter the image with the highest overlap with the global parking spaces, the process of manual positioning is replaced, improving the efficiency of parking space positioning.

[0099] The technical solution of this embodiment acquires panoramic images and crops out images of each parking space. It uses a pre-trained multimodal feature extraction model to obtain the mapping relationship between parking space areas and parking space features. Then, based on the mapping relationship, it determines candidate images from each initial image. It can use multimodal features to perform accurate matching, effectively distinguishing similar parking spaces and similar vehicles. This solves the problem of insufficient matching accuracy caused by relying on only a single feature in traditional technologies and improves the accuracy of candidate image determination.

[0100] In another embodiment, based on the mapping relationship, candidate images matching the parking space area are determined from each initial image, including: inputting each initial image, panoramic image, parking space image corresponding to the parking space area, and mapping relationship into a pre-trained multimodal feature matching model to obtain candidate images; wherein, the multimodal feature matching model is used to determine the initial image with the highest feature overlap with the parking space area from each initial image based on the initial image, panoramic image, parking space image corresponding to the parking space area, and mapping relationship, as the candidate image.

[0101] Multimodal feature matching models can include deep learning models capable of comparing features from multiple images and calculating similarity. For example, multimodal feature matching models can be built on architectures such as convolutional neural networks and visual Transformers, which can extract deep features from images and calculate feature similarity between different images.

[0102] A pre-trained multimodal feature matching model can be a model pre-trained on a large-scale image matching dataset and fine-tuned on a roadside parking dataset. This model can understand the image features in a roadside parking scene and accurately calculate the feature overlap between the initial image and the parking space area.

[0103] In practice, the terminal can input all initial images, panoramic images, parking space images corresponding to any parking space area, and feature descriptions of that parking space area in the mapping relationship into a pre-trained multimodal feature matching model. The model first extracts features from each initial image, then compares the extracted features with the panoramic image, parking space image, and parking space feature description, calculates the feature overlap between each initial image and the parking space area, and outputs the initial image with the highest feature overlap as a candidate image.

[0104] The technical solution of this application embodiment can automatically complete the image matching process by utilizing a pre-trained multimodal feature matching model, without the need for manual comparison, thereby improving the efficiency and accuracy of candidate image determination.

[0105] In another embodiment, the preset shooting angle parameters include a horizontal rotation angle, a vertical pitch angle, and a zoom factor; based on the positional offset between the parking space location in the candidate image and the image reference location in the candidate image, the parameter adjustment amount of the preset shooting angle parameters associated with the candidate image is determined, including: obtaining the zoom factor in the preset shooting angle parameters associated with the candidate image, and determining the field of view angle of the candidate image at the zoom factor; based on the positional offset between the parking space location in the candidate image and the image reference location in the candidate image, and the field of view angle, determining the parameter adjustment amount of the horizontal rotation angle and the parameter adjustment amount of the vertical pitch angle in the preset shooting angle parameters.

[0106] In practical applications, to move the offset parking space area in the candidate image to the center position of the candidate image through pixel offset and angle adjustment, it is necessary to determine the adjustment amount of the horizontal rotation angle and the vertical tilt angle in the preset shooting angle parameters based on the positional offset between the center position of the parking space in the candidate image and the center position of the image, as well as the field of view angle. This determines the corresponding pan and tilt of the camera when the parking space area is moved to the center position of the image. At this time, the zoom remains at 1 (the zoom in each set of preset shooting angle parameters used when acquiring the initial image is also 1), thus solving the problem that the parking space area in the candidate image is not centered, causing it to easily deviate from the image after subsequent zooming, laying the foundation for subsequent zoom optimization. Although the candidate image has a high degree of feature overlap with the parking space area, the parking space area in the candidate image may be in a non-center position such as the upper left or lower right of the image. If the zoom is directly increased, the parking space area may move out of the image due to deviating from the center (the license plate or parking space may not be visible). Therefore, determining the adjustment amount of the horizontal rotation angle and the vertical pitch angle in the preset shooting angle parameters is essentially to calculate how much the camera should rotate (pan and tilt) to move the parking space area to the center of the image, while recording the shooting angle parameters at this time.

[0107] The field of view (FOV) refers to the angle corresponding to the range of scenes that a camera can capture at a given zoom level. The FOV includes both horizontal and vertical angles. The FOV is inversely proportional to the zoom level; that is, the larger the zoom level, the smaller the FOV, and vice versa. In practical applications, the terminal can obtain the FOV of the camera at different zoom levels based on the camera's technical parameters. These parameters can be stored in the terminal's database or obtained by reading the camera's configuration file. After obtaining the preset shooting angle parameters associated with candidate images, the terminal extracts the zoom level information and then queries the FOV corresponding to that zoom level.

[0108] In the specific implementation, the terminal first calculates the coordinates of the parking space center and the image center, and then calculates the positional offset between them, including horizontal and vertical offsets. Next, based on the field of view angle and the size of the candidate image, the terminal calculates the mapping coefficient between pixels and angles, i.e., the angle value corresponding to each pixel. Finally, the terminal multiplies the positional offset by the mapping coefficient to obtain the parameter adjustment amounts for the horizontal rotation angle and the vertical pitch angle.

[0109] Specifically, after determining the candidate images and the location of the parking space area in the candidate images, it is ensured that the PTZ camera maintains zoom=1.

[0110] The current shooting angle parameters of the PTZ camera are known to be: current_pan (current horizontal angle, unit: °), current_tilt (current vertical angle, unit: °), and current_zoom (current zoom factor, fixed at 1), which are the preset shooting angle parameters associated with the candidate image.

[0111] Target parking space parameter: target_rect (the rectangle coordinates of the target parking space, in pixels, represented as [x1, y1, x2, y2], where x1 / y1 is the coordinate of the top left corner of the rectangle, and x2 / y2 is the coordinate of the bottom right corner of the rectangle). This target parking space is any parking space in the roadside parking area. The target parking space parameter is the location of the parking space area corresponding to any parking space area.

[0112] Basic image parameters: img_width (width of the image output by the PTZ camera, in pixels, such as 1920), img_height (height of the image output by the PTZ camera, in pixels, such as 1080);

[0113] The field of view of the PTZ camera: fov_horizontal_initial (horizontal field of view angle when zoom=1, unit: °, such as 114.6°; horizontal field of view angle when zoom=8, such as 21.6°), fov_vertical_initial (vertical field of view angle when zoom=1, unit: °, such as 58.5°; horizontal field of view angle when zoom=8, such as 13.1°);

[0114] PTZ camera angle limits: pan_range (the legal range of pan, in °, [0, 350]), tilt_range (the legal range of tilt, in °, [0, 90]).

[0115] Then, in order to move the parking space area to the image center of the candidate image, the parameter adjustment amount of the horizontal rotation angle (pan) and the parameter adjustment amount of the vertical pitch angle (tilt) can be calculated, as shown below.

[0116] The first step is to calculate the center coordinates of the parking space in the candidate image based on the location of the parking space area. These center coordinates reflect the pixel reference of the parking space area.

[0117] The coordinates (target_center_x, target_center_y) of the parking space center in the candidate image can be represented as:

[0118] target_center_x=(x1+x2) / 2, target_center_y=(y1+y2) / 2.

[0119] For example, if target_rect=[300,200,700,500],

[0120] Then target_center_x=(300+700) / 2=500, target_center_y=(200+500) / 2=350.

[0121] The second step is to calculate the image parameter positions in the candidate images, i.e., the image center coordinates. The physical center of the image output by the PTZ camera is used as the reference point for the displacement of the parking space area. The image center coordinates (img_center_x, img_center_y) can be represented as:

[0122] img_center_x=img_width / 2;

[0123] img_center_y=img_height / 2.

[0124] For example, if img_width=1920 and img_height=1080,

[0125] Then img_center_x=960, img_center_y=540.

[0126] The third step is to calculate the positional offset of the parking space center coordinates relative to the image center coordinates. This positional offset reflects the positional deviation between the target and the image center. The positive and negative meanings of this positional offset are as follows:

[0127] If the horizontal offset delta_x is positive, it means that the center coordinates of the parking space are to the right of the center coordinates of the image, that is, the target is to the right of the center of the image; if the horizontal offset delta_x is negative, it means that the center coordinates of the parking space are to the left of the center coordinates of the image, that is, the target is to the left of the center of the image.

[0128] If the vertical offset delta_y is positive, it means that the center coordinates of the parking space are below the center coordinates of the image, that is, the target is below the center of the image; if the vertical offset delta_y is negative, it means that the center coordinates of the parking space are above the center coordinates of the image, that is, the target is above the center of the image.

[0129] delta_x=target_center_x-img_center_x;

[0130] delta_y=target_center_y-img_center_y.

[0131] For example, combining the results of the two examples above, delta_x = 500 - 960 = -460 (target is on the left), delta_y = 350 - 540 = -190 (target is on the top).

[0132] The fourth step is to calculate the actual field of view angle under the current zoom level. The field of view angle is inversely proportional to the zoom level. Since current_zoom=1, the actual field of view angle is consistent with the initial field of view angle.

[0133] fov_horizontal_current= fov_horizontal_initial / current_zoom;

[0134] fov_vertical_current= fov_vertical_initial / current_zoom.

[0135] Where fov_horizontal_current is the actual horizontal field of view angle, fov_vertical_current is the actual vertical field of view angle; fov_horizontal_initial is the initial horizontal field of view angle, fov_vertical_initial is the initial vertical field of view angle; and current zoom is the current zoom level.

[0136] For example, fov_horizontal_initial=114.6°, current_zoom=1,

[0137] Then fov_horizontal_current=114.6; similarly, fov_vertical_current=58.5°.

[0138] The fifth step involves calculating the pixel-to-angle mapping coefficients based on the field of view angle and the size of the candidate image. These coefficients are the core factors in converting pixel-level offsets into angle-level adjustments. They reflect the PTZ angle corresponding to each pixel offset, including the pan angle and tilt angle. The mapping coefficients deg_per_pixel_x and deg_per_pixel_y can be expressed as:

[0139] deg_per_pixel_x= fov_horizontal_current / img_width;

[0140] deg_per_pixel_y= fov_vertical_current / img_height.

[0141] For example, deg_per_pixel_x = 60° / 1920 ≈ 0.03125° / pixel;

[0142] deg_per_pixel_y=40° / 1080≈0.037037° / pixel.

[0143] The sixth step involves calculating the PTZ angle adjustment, i.e., the parameter adjustment. The horizontal rotation angle adjustment is denoted as delta_pan, and the vertical pitch angle adjustment is denoted as delta_tilt. Based on the position offset and mapping coefficients, the required adjustments to pan and tilt can be determined. The adjustment direction is consistent with the offset direction. A positive delta_pan means pan needs to be increased, and the PTZ camera needs to rotate to the right; a negative delta_pan means pan needs to be decreased, and the PTZ camera needs to rotate to the left; a positive delta_tilt means tilt needs to be increased, and the PTZ camera needs to rotate downwards; a negative delta_tilt means tilt needs to be decreased, and the PTZ camera needs to rotate upwards.

[0144] delta_pan=delta_x×deg_per_pixel_x;

[0145] delta_tilt=delta_y×deg_per_pixel_y.

[0146] For example, delta_pan = (-460) × 0.03125 ≈ -14.375° (pan needs to be reduced by 14.375°), delta_tilt = (-190) × 0.037037 ≈ -7.037° (tilt needs to be reduced by 7.037°).

[0147] The seventh step is to calculate the final absolute positions of pan and tilt based on the range constraints. The absolute position of pan can be represented as new_pan, and the absolute position of tilt can be represented as new_tilt.

[0148] By combining the current shooting angle parameters and parameter adjustments, and correcting according to the PTZ camera hardware limitations, ensure that the parameters are valid:

[0149] The absolute position of pan uses modulo operation (mod 350) to solve the overflow problem of exceeding 350° or falling below 0°, ensuring that it is within the range of [0, 350]°;

[0150] The absolute tilt position is calculated using clamping (max / min) and limited to the range of [0,90]° to avoid exceeding the vertical rotation limit of the PTZ camera.

[0151] By limiting the range, the target shooting angle parameters can be determined.

[0152] new_pan=(current_pan+delta_pan)mod350;

[0153] new_tilt=max(tilt_range[0], min(tilt_range[1], current_tilt+delta_tilt));

[0154] Where mod is the modulo operation, tilt_range[0] is the lower limit of the legal range of tilt, and tilt_range[1] is the upper limit of the legal range of tilt.

[0155] For example, if current_pan=120° and current_tilt=12°, then new_pan=(120-14.375)mod350≈105.625°, and new_tilt=max (0,min (90,12-7.037))≈4.963°.

[0156] The final output is the absolute position of pan and tilt (new_pan, new_tilt), with zoom remaining unchanged at 1. Based on this absolute position of pan and tilt and the unchanged zoom value, the target shooting angle parameters corresponding to the parking space area can be obtained, realizing the precise displacement of the target parking space towards the center of the image.

[0157] Optionally, a secondary calibration can be performed based on the absolute positions of this pan and tilt.

[0158] The technical solution of this application embodiment obtains the field of view angle of the candidate image at the zoom level, and calculates the parameter adjustment amount based on the position offset and the field of view angle. This enables the establishment of a precise mapping relationship between pixel offset and angle adjustment, achieving accurate angle calculation and improving the accuracy of the camera in locating parking spaces.

[0159] In other embodiments, the preset shooting angle parameters associated with the candidate images are adjusted according to the parameter adjustment amount of the preset shooting angle parameters to obtain the target shooting angle parameters corresponding to the parking space area. This includes: adjusting the preset shooting angle parameters associated with the candidate images according to the parameter adjustment amount of the preset shooting angle parameters to obtain the candidate shooting angle parameters corresponding to the parking space area; controlling the camera to capture at least two test images when the camera's shooting angle parameters are adjusted to the candidate shooting angle parameters; determining the parking space area position in the test images based on the parking space features of the parking space area; determining the parameter adjustment amount of the candidate shooting angle parameters based on the positional offset between the parking space area position in the test images and the image reference position in the test images; and adjusting the candidate shooting angle parameters according to the parameter adjustment amount of the candidate shooting angle parameters to obtain the target shooting angle parameters corresponding to the parking space area.

[0160] Here, candidate shooting angle parameters refer to the shooting angle parameters obtained after preliminary adjustment of the preset shooting angle parameters according to the parameter adjustment amount. Candidate shooting angle parameters also include horizontal rotation angle, vertical pitch angle, and zoom magnification. Optionally, new_pan, new_tilt, and zoom in the above embodiments can be used as candidate shooting angle parameters.

[0161] In practical applications, although the candidate shooting angle parameters are the parameters after moving the parking space area to the center of the image, these parameters are based on images captured by the PTZ camera at an initial non-centered position and calculated using mapping coefficients. However, slight differences in actual PTZ camera hardware, installation deviations, and the relationship between theoretical models and actual optical characteristics can lead to minor positioning errors in these candidate shooting angle parameters. Therefore, the camera's shooting angle parameters can be adjusted to the candidate shooting angle parameters, and at least two test images can be captured consecutively under these parameters to determine the parking space area's position in the test images. Based on the positional offset between the parking space area's position in the test images and the image reference position, the parking space area in the test images is then moved back to the image center, and the corresponding parameter adjustment is calculated. The target shooting angle parameters are then determined based on this parameter adjustment.

[0162] It should be noted that the method of determining the location of the parking space area in the test image based on the parking space features of the test image and the parking space area is similar to the method of determining the location of the parking space area in the candidate image based on the parking space features of the candidate image and the parking space area; the method of determining the parameter adjustment amount of the candidate shooting angle parameter based on the positional offset between the parking space location in the test image and the image reference location in the test image is similar to the method of determining the parameter adjustment amount of the preset shooting angle parameter associated with the candidate image based on the positional offset between the parking space location in the candidate image and the image reference location in the candidate image; and the method of adjusting the candidate shooting angle parameter based on the parameter adjustment amount of the candidate shooting angle parameter is similar to the method of adjusting the preset shooting angle parameter associated with the candidate image based on the parameter adjustment amount of the preset shooting angle parameter.

[0163] In practical applications, assuming the candidate shooting angle parameters are (pan1, tilt1, zoom=1), the PTZ camera can be controlled to adjust to (pan1, tilt1, zoom=1) and two test images are captured continuously (with a 1-second interval). The test images and parking space features are input into the large model, and the rectangular box of the target parking space is obtained through the large model. The absolute positions of pan and tilt for each parking space area are saved as (new_pan, new_tilt), zoom is kept at 1, and the location of the rectangular box information is also saved.

[0164] Then, confirming that the PTZ camera maintains zoom=1, and following the method described above, move the parking space area in the test image to the center of the image, calculate the absolute positions of pan and tilt, and use the absolute positions of pan and tilt as (pan2, tilt2), thereby obtaining the target shooting angle parameters corresponding to the parking space area. By capturing at least two consecutive images, the risk of vehicles temporarily obscuring the parking space is avoided, reducing the positioning failure rate due to obstruction. Furthermore, the pan and tilt determined through secondary calibration ensure the stability of the parking space positioning.

[0165] The technical solution of this application embodiment, by taking at least two test images, further adjusts the candidate shooting angle parameters based on the positional offset between the parking space area position in the test image and the image reference position, which can achieve secondary calibration, improve the stability and accuracy of positioning, and by continuously taking multiple test images, can effectively avoid the influence of temporary occlusion and reduce the positioning failure rate.

[0166] In other embodiments, the candidate shooting angle parameters are adjusted according to the parameter adjustment amount to obtain the target shooting angle parameters corresponding to the parking space area. This includes: adjusting the horizontal rotation angle and vertical pitch angle in the candidate shooting angle parameters according to the parameter adjustment amount to obtain the adjusted horizontal rotation angle and adjusted vertical pitch angle; adjusting the zoom factor in the candidate shooting angle parameters to the target zoom factor; the target zoom factor is the zoom factor determined based on the accuracy of the camera in recognizing license plates in the parking space area; and determining the target shooting angle parameters corresponding to the parking space area based on the adjusted horizontal rotation angle, the adjusted vertical pitch angle, and the target zoom factor.

[0167] Based on the parameter adjustment amount of the candidate shooting angle parameters, the horizontal rotation angle and vertical pitch angle in the candidate shooting angle parameters are adjusted. This can be done by adding the horizontal rotation angle and vertical pitch angle in the candidate shooting angle parameters to their corresponding parameter adjustment amounts, and then, according to the above embodiment, calculating the absolute positions of the horizontal rotation angle and vertical pitch angle based on the range constraints, as the adjusted horizontal rotation angle and adjusted vertical pitch angle.

[0168] Then, after moving the parking space area to the center of the image, the zoom can be optimized. By moving the parking space area to the center of the image, the stability of the parking space center positioning can be ensured, monitoring deviation can be reduced, and the target can be prevented from deviating from the image after subsequent zooming. Based on the initial zoom-corresponding viewing angle range, the pan and tilt can be calibrated again to avoid parking space offset caused by zoom increase, which would cause the parking space to deviate from the image.

[0169] The target zoom level refers to the zoom level that enables the camera to clearly capture the license plates of vehicles parked in the parking space area, ensuring that the license plate recognition accuracy reaches a preset threshold. License plate recognition accuracy refers to the success rate at which the license plate image captured by the camera, after being processed by the license plate recognition algorithm, can correctly identify the license plate number. The preset threshold can be set according to actual application needs, for example, it can be set to 90%.

[0170] Optionally, the target zoom level can be predetermined based on the camera model and shooting distance. At the same time, the selection of the target zoom level also needs to consider the limitations of the field of view, ensuring complete coverage of the parking space area while maintaining clarity and license plate recognition accuracy.

[0171] In practical applications, the optimal zoom size can be determined when selecting a camera. For example, if the current zoom=8 is the optimal position, the zoom can be increased to 8.

[0172] After adjusting the zoom level, the adjusted horizontal rotation angle, adjusted vertical tilt angle, and target zoom magnification can be saved as (pan2, tilt2, zoom2). Then, the PTZ camera can be adjusted to (pan2, tilt2, zoom2) and at least two images can be captured consecutively. The captured images and parking space features are then input into a multimodal model, which outputs the target bounding box. A "parking space-optimal position" mapping table (parking space number, bounding box, pan2, tilt2, zoom2) is saved. Based on this mapping table, preset positions for the PTZ camera can be generated that can be directly accessed, eliminating the need for recalculation during subsequent calls and improving management efficiency in multi-parking space scenarios. Furthermore, by binding the optimal PTZ camera viewpoint with the parking space coordinates, the problem of accurately locating the corresponding positional relationships of multiple parking spaces within the same viewpoint can be solved.

[0173] In practical applications, if the location of the target parking space relies on the PTZ camera of an adjacent smart pole, the (pan2, tilt2, zoom2) and the location coordinates of the target parking space can be synchronized to the management terminal of the current smart pole, achieving cross-pole resource sharing. Synchronizing cross-pole parameters enables resource sharing between adjacent smart poles, improving the location coverage of parking spaces in blind spots.

[0174] The technical solution of this application embodiment optimizes the license plate recognition effect while ensuring positioning accuracy by precisely adjusting the horizontal rotation angle and vertical pitch angle in the candidate shooting angle parameters and adjusting the zoom magnification to the target zoom magnification determined according to the license plate recognition accuracy.

[0175] In other embodiments, if a candidate image matching the parking space area cannot be determined from the initial images, or if the location of the parking space area in the candidate image cannot be determined, the camera is controlled to send a linkage request to the adjacent camera in the roadside parking area; the linkage request is used to instruct the adjacent camera to acquire the target shooting angle parameters corresponding to the parking space area.

[0176] In this context, "adjacent cameras" refers to other cameras located near the current camera. In roadside parking management systems, cameras are typically deployed in multiple locations to cover the entire roadside parking area. Adjacent cameras can be deployed on adjacent smart poles or on the same smart pole but facing different directions. Adjacent cameras are connected to the current camera via a communication network, enabling them to exchange data and control commands.

[0177] The collaboration request refers to a cooperation request message sent by the current camera to neighboring cameras. The collaboration request contains data such as the target parking space area's identification information and parking space characteristics, instructing neighboring cameras to attempt to locate and photograph that parking space area.

[0178] In practical applications, due to blind spots in the current camera's field of view or persistent obstructions to the parking space area, the current camera may be unable to successfully locate a particular parking space. In these cases, the current camera alone cannot complete the location task and requires the assistance of adjacent cameras.

[0179] When the terminal detects that it cannot determine a candidate image that matches the parking space area from the initial images, or cannot determine the location of the parking space area in the candidate image, it controls the current camera to send a linkage request to the adjacent cameras. The linkage request includes information such as the parking space number, parking space features, and the location of the parking space in the panoramic image of the target parking space area.

[0180] Upon receiving a linkage request, adjacent cameras execute a positioning process similar to that of the current camera. Specifically, adjacent cameras acquire initial images under multiple preset shooting angle parameters, determine candidate images that match the target parking space area from each initial image, determine the parameter adjustment amount based on the positional offset between the parking space area position in the candidate image and the image reference position, and adjust the preset shooting angle parameters according to the parameter adjustment amount to obtain the target shooting angle parameters corresponding to the target parking space area.

[0181] After obtaining the target shooting angle parameters, adjacent cameras can send these parameters to the terminal associated with the current camera via the communication network. The terminal stores the target shooting angle parameters of the adjacent cameras in a mapping table and marks the parking space area as being captured by the adjacent camera. When the parking space area needs to be captured subsequently, the terminal can control the adjacent camera to adjust to the target shooting angle parameters, instead of the current camera being responsible for capturing the image.

[0182] In one embodiment, if a candidate image matching the parking space area cannot be determined from the initial images, the image can be recaptured, reducing the angle of the pan increase. For example, in the example of the foregoing embodiment, capturing one image for each initial shooting position with a pan increase of 40° can be changed to capturing one image for each pan increase of 30° to obtain multiple initial images.

[0183] In one embodiment, if the location of the parking space area in the candidate image cannot be determined, the global camera can be controlled to re-capture the panoramic image, update the "parking space-feature" mapping table, and then the location of the parking space area in the candidate image can be re-determined.

[0184] In one embodiment, multi-pole linkage can be achieved by sending a linkage request to adjacent smart poles simultaneously when the PTZ camera captures a picture. This allows the PTZ camera on the adjacent smart poles to perform the steps described above to obtain the target shooting angle parameters corresponding to the parking space area. This enables linkage capture of adjacent smart pole PTZ cameras, establishing a two-level anomaly mechanism of "updating features and rematching → manual processing" to improve the reliability and coverage of parking space positioning.

[0185] If the above-mentioned rematching process still fails, a manual processing instruction can be generated and pushed to the management terminal.

[0186] The technical solution of this application embodiment achieves multi-camera linkage and cooperation by controlling the camera to send a linkage request to adjacent cameras when positioning fails. This effectively addresses the problems of blind spots and continuous occlusion of a single camera's viewpoint, solves the problem of limited coverage caused by the independent operation of a single intelligent ball machine in traditional technology, and improves the coverage and success rate of parking space positioning.

[0187] In another embodiment, such as Figure 3 As shown, a parking space positioning method is provided, which can be applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps:

[0188] Step S302: Obtain the initial images captured by the cameras corresponding to the roadside parking area under multiple sets of preset shooting angle parameters.

[0189] Step S304: For any parking space area in the roadside parking area, acquire a panoramic image of the roadside parking area; crop out the parking space images corresponding to each parking space area from the panoramic image; input the panoramic image and the parking space images corresponding to each parking space area into a pre-trained multimodal feature extraction model to obtain the mapping relationship between parking space areas and parking space features.

[0190] Step S306: Input each initial image, panoramic image, parking space image corresponding to the parking space area, and mapping relationship into the pre-trained multimodal feature matching model to obtain candidate images.

[0191] Step S308: Determine the location of the parking space area in the candidate image based on the parking space features of the candidate image and the parking space area.

[0192] Step S310: Obtain the zoom factor in the preset shooting angle parameters associated with the candidate image, and determine the field of view angle of the candidate image at the zoom factor; based on the positional offset between the parking space area position in the candidate image and the image reference position in the candidate image, and the field of view angle, determine the parameter adjustment amount of the horizontal rotation angle and the parameter adjustment amount of the vertical pitch angle in the preset shooting angle parameters.

[0193] Step S312: Adjust the preset shooting angle parameters associated with the candidate image according to the parameter adjustment amount of the preset shooting angle parameters to obtain the candidate shooting angle parameters corresponding to the parking space area.

[0194] Step S314: With the camera's shooting angle parameters adjusted to the candidate shooting angle parameters, control the camera to capture at least two test images; determine the parking area position in the test image based on the test image and the parking area characteristics of the parking area; determine the parameter adjustment amount of the candidate shooting angle parameters based on the position offset between the parking area position in the test image and the image reference position in the test image.

[0195] Step S316: Adjust the horizontal rotation angle and vertical pitch angle in the candidate shooting angle parameters according to the parameter adjustment amount to obtain the adjusted horizontal rotation angle and adjusted vertical pitch angle; adjust the zoom factor in the candidate shooting angle parameters to the target zoom factor; determine the target shooting angle parameters corresponding to the parking space area according to the adjusted horizontal rotation angle, adjusted vertical pitch angle and target zoom factor.

[0196] In step S318, if a candidate image matching the parking space area cannot be determined from each initial image, or if the location of the parking space area in the candidate image cannot be determined, the camera is controlled to send a linkage request to the adjacent camera in the roadside parking area.

[0197] It should be noted that the specific limitations of the above steps can be found in the specific limitations of a parking space positioning method described above.

[0198] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0199] Based on the same inventive concept, this application also provides a parking space positioning device for implementing the parking space positioning method described above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more parking space positioning device embodiments provided below can be found in the limitations of the parking space positioning method above, and will not be repeated here.

[0200] In one exemplary embodiment, such as Figure 4 As shown, a parking space positioning device is provided, comprising:

[0201] The image acquisition module 410 is used to acquire the initial images captured by the camera corresponding to the roadside parking area under multiple sets of preset shooting angle parameters;

[0202] The image matching module 420 is used to determine, from each of the initial images, a candidate image that matches any parking space area in the roadside parking area, and to determine the location of the parking space area in the candidate image based on the parking space features of the parking space area and the candidate image.

[0203] The parameter determination module 430 is used to determine the parameter adjustment amount of the preset shooting angle parameter associated with the candidate image based on the positional offset between the parking space area position in the candidate image and the image reference position in the candidate image.

[0204] The parameter adjustment module 440 is used to adjust the preset shooting angle parameters associated with the candidate image according to the parameter adjustment amount of the preset shooting angle parameters, so as to obtain the target shooting angle parameters corresponding to the parking space area; the target shooting angle parameters are the shooting angle parameters used by the camera to locate the parking space area.

[0205] In one embodiment, the image matching module 420 is specifically used to acquire a panoramic image of the roadside parking area; crop out parking space images corresponding to each parking space area from the panoramic image; input the panoramic image and the parking space images corresponding to each parking space area into a pre-trained multimodal feature extraction model to obtain a mapping relationship between parking space areas and parking space features; the parking space features include at least one of the regional description features of the parking space area and the vehicle description features of the vehicles parked in the parking space area; based on the mapping relationship, candidate images matching the parking space area are determined from each of the initial images.

[0206] In one embodiment, the image matching module 420 is specifically used to input each of the initial images, the panoramic image, the parking space image corresponding to the parking space area, and the mapping relationship into a pre-trained multimodal feature matching model to obtain the candidate image; wherein, the multimodal feature matching model is used to determine the initial image with the highest feature overlap with the parking space area from each of the initial images based on the initial image, the panoramic image, the parking space image corresponding to the parking space area, and the mapping relationship, and use it as the candidate image.

[0207] In one embodiment, the preset shooting angle parameters include horizontal rotation angle, vertical pitch angle, and zoom magnification;

[0208] In one embodiment, the parameter determination module 430 is specifically used to obtain the zoom factor in the preset shooting angle parameters associated with the candidate image, determine the field of view angle of the candidate image at the zoom factor, and determine the parameter adjustment amount of the horizontal rotation angle and the parameter adjustment amount of the vertical pitch angle in the preset shooting angle parameters based on the position offset between the parking space area position in the candidate image and the image reference position in the candidate image, and the field of view angle.

[0209] In one embodiment, the parameter adjustment module 440 is specifically configured to adjust the preset shooting angle parameters associated with the candidate image according to the parameter adjustment amount of the preset shooting angle parameters to obtain the candidate shooting angle parameters corresponding to the parking space area; when the shooting angle parameters of the camera are adjusted to the candidate shooting angle parameters, control the camera to capture at least two test images; determine the parking space area position in the test image based on the test image and the parking space features of the parking space area; determine the parameter adjustment amount of the candidate shooting angle parameters based on the positional offset between the parking space area position in the test image and the image reference position in the test image; and adjust the candidate shooting angle parameters according to the parameter adjustment amount to obtain the target shooting angle parameters corresponding to the parking space area.

[0210] In one embodiment, the parameter adjustment module 440 is specifically used to adjust the horizontal rotation angle and vertical pitch angle in the candidate shooting angle parameters according to the parameter adjustment amount of the candidate shooting angle parameters, to obtain the adjusted horizontal rotation angle and adjusted vertical pitch angle; adjust the zoom factor in the candidate shooting angle parameters to the target zoom factor; the target zoom factor is the zoom factor determined according to the accuracy of the camera in recognizing license plates in the parking space area; and determine the target shooting angle parameters corresponding to the parking space area according to the adjusted horizontal rotation angle, the adjusted vertical pitch angle and the target zoom factor.

[0211] In one embodiment, the parking space positioning device further includes a shooting linkage module; the shooting linkage module is used to control the camera to send a linkage request to the adjacent camera in the roadside parking area when it is impossible to determine a candidate image that matches the parking space area from each of the initial images, or when it is impossible to determine the location of the parking space area in the candidate image; the linkage request is used to instruct the adjacent camera to acquire the target shooting angle parameters corresponding to the parking space area.

[0212] Each module in the aforementioned parking space positioning device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0213] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a parking space positioning method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0214] Those skilled in the art will understand that Figure 5The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0215] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0216] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0217] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0218] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0219] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0220] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0221] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A parking space positioning method, characterized in that, The method includes: Acquire initial images from cameras corresponding to roadside parking areas under multiple sets of preset shooting angle parameters; For any parking space area in the roadside parking area, a candidate image matching the parking space area is determined from each of the initial images. Based on the parking space features of the candidate image and the parking space area, the location of the parking space area in the candidate image is determined. Based on the positional offset between the parking space area position in the candidate image and the image reference position in the candidate image, the parameter adjustment amount of the preset shooting angle parameter associated with the candidate image is determined; Based on the parameter adjustment amount of the preset shooting angle parameters, the preset shooting angle parameters associated with the candidate image are adjusted to obtain the target shooting angle parameters corresponding to the parking space area; the target shooting angle parameters are the shooting angle parameters used by the camera to locate the parking space area.

2. The method according to claim 1, characterized in that, The step of determining candidate images that match the parking space area from each of the initial images includes: Obtain a panoramic image of the roadside parking area; The parking space images corresponding to each parking space area are cropped from the panoramic image; The panoramic image and the parking space images corresponding to each parking space area are input into a pre-trained multimodal feature extraction model to obtain the mapping relationship between the parking space area and the parking space features; the parking space features include at least one of the regional description features of the parking space area and the vehicle description features of the vehicles parked in the parking space area. Based on the mapping relationship, candidate images that match the parking space area are determined from each of the initial images.

3. The method according to claim 2, characterized in that, The step of determining candidate images matching the parking space area from each of the initial images based on the mapping relationship includes: The initial images, the panoramic image, the parking space image corresponding to the parking space area, and the mapping relationship are input into a pre-trained multimodal feature matching model to obtain the candidate images; The multimodal feature matching model is used to determine the initial image with the highest feature overlap with the parking space area from each of the initial images based on the initial image, the panoramic image, the parking space image corresponding to the parking space area, and the mapping relationship, and use it as the candidate image.

4. The method according to claim 1, characterized in that, The preset shooting angle parameters include horizontal rotation angle, vertical pitch angle, and zoom magnification; the step of determining the parameter adjustment amount of the preset shooting angle parameters associated with the candidate image based on the positional offset between the parking space area position in the candidate image and the image reference position in the candidate image includes: Obtain the zoom factor in the preset shooting angle parameters associated with the candidate image, and determine the field of view angle of the candidate image at the zoom factor; Based on the positional offset between the parking space location in the candidate image and the image reference location in the candidate image, and the field of view angle, determine the parameter adjustment amount of the horizontal rotation angle and the parameter adjustment amount of the vertical pitch angle in the preset shooting angle parameters.

5. The method according to claim 4, characterized in that, The step of adjusting the preset shooting angle parameters associated with the candidate image according to the parameter adjustment amount of the preset shooting angle parameters to obtain the target shooting angle parameters corresponding to the parking space area includes: Based on the parameter adjustment amount of the preset shooting angle parameters, the preset shooting angle parameters associated with the candidate image are adjusted to obtain the candidate shooting angle parameters corresponding to the parking space area. With the camera's shooting angle parameters adjusted to the candidate shooting angle parameters, the camera is controlled to capture at least two test images. Based on the test image and the parking space characteristics of the parking space area, determine the location of the parking space area in the test image; The parameter adjustment amount of the candidate shooting angle parameter is determined based on the positional offset between the parking space area position in the test image and the image reference position in the test image. Based on the parameter adjustment amount of the candidate shooting angle parameters, the candidate shooting angle parameters are adjusted to obtain the target shooting angle parameters corresponding to the parking space area.

6. The method according to claim 5, characterized in that, The step of adjusting the candidate shooting angle parameters according to the parameter adjustment amount to obtain the target shooting angle parameters corresponding to the parking space area includes: Based on the parameter adjustment amount of the candidate shooting angle parameters, the horizontal rotation angle and vertical pitch angle in the candidate shooting angle parameters are adjusted to obtain the adjusted horizontal rotation angle and adjusted vertical pitch angle. The zoom factor in the candidate shooting angle parameters is adjusted to the target zoom factor; the target zoom factor is determined based on the accuracy of the camera in recognizing license plates in the parking space area. Based on the adjusted horizontal rotation angle, the adjusted vertical pitch angle, and the target zoom factor, the target shooting angle parameters corresponding to the parking space area are determined.

7. The method according to claim 1, characterized in that, The method further includes: If a candidate image matching the parking space area cannot be determined from the initial images, or if the location of the parking space area in the candidate image cannot be determined, the camera is controlled to send a linkage request to the adjacent camera in the roadside parking area; the linkage request is used to instruct the adjacent camera to acquire the target shooting angle parameters corresponding to the parking space area.

8. A parking space positioning device, characterized in that, The device includes: The image acquisition module is used to acquire the initial images captured by the cameras corresponding to the roadside parking area under multiple sets of preset shooting angle parameters; The image matching module is used to determine, from each of the initial images, a candidate image that matches any parking space area in the roadside parking area, and to determine the location of the parking space area in the candidate image based on the parking space features of the parking space area and the candidate image. The parameter determination module is used to determine the parameter adjustment amount of the preset shooting angle parameter associated with the candidate image based on the positional offset between the parking space area position in the candidate image and the image reference position in the candidate image; The parameter adjustment module is used to adjust the preset shooting angle parameters associated with the candidate image according to the parameter adjustment amount of the preset shooting angle parameters, so as to obtain the target shooting angle parameters corresponding to the parking space area; the target shooting angle parameters are the shooting angle parameters used by the camera to locate the parking space area.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Inspection robot vision servo method based on target detection

    CN110142785A

  • Camera preset bit correction method, device, equipment and medium

    CN118644429A