Pedestrian detection method and method for determining pedestrian travel path in a park at night

By enhancing and edge extraction of night vision images taken by the campus camera at night, combined with daytime background images, the resolution problem of night pedestrian detection is solved, and efficient night pedestrian monitoring is achieved.

CN119379742BActive Publication Date: 2025-04-25STATE GRID HUBEI ELECTRIC POWER CO LTD HEADQUARTERS LOGISTICS SERVICE CENT +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411583986.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-04-25
Estimated Expiration
2044-11-07

AI Technical Summary

Technical Problem

During night time, night vision images captured by campus cameras are low in resolution and are difficult to use for pedestrian surveillance and intelligent analysis.

Method used

By enhancing the night vision images captured by the target camera at night, it improves its resolution and makes it consistent with the daytime image. Then, edge extraction processing is performed, and the night vision enhancement image and daytime background reference image are performed to obtain the edge detection result difference image, and finally the target pedestrian detection is performed.

Benefits of technology

It realizes more accurate detection of pedestrians at night, improving the efficiency and accuracy of pedestrian monitoring at night.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379742B_ABST
    Figure CN119379742B_ABST
Patent Text Reader

Abstract

The present disclosure provides a pedestrian detection method, comprising: performing image enhancement processing on a night vision image of a corresponding monitoring area taken by a target camera at night to obtain a night vision enhanced image, wherein the resolution of the night vision enhanced image is equal to the resolution of a daytime image of the corresponding monitoring area taken by the target camera during the day; performing edge extraction processing on the night vision enhanced image to obtain a first edge detection result image; selecting a daytime image taken by the target camera during the day as a background reference image, and obtaining a second edge detection result image corresponding to the background reference image; performing difference processing on the first edge detection result image and the second edge detection result image to obtain an edge detection result difference image; performing target pedestrian detection processing on the edge detection result difference image, and the detection processing is used as the target pedestrian detection result of the night vision image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of pedestrian monitoring, and in particular to a pedestrian detection method and a method for determining a pedestrian travel path in a park at night. Background Art

[0002] The camera monitoring network of the park is an important guarantee for the safety of people and property in the park. Pedestrian monitoring based on images captured by cameras is one of the key projects of park monitoring. At present, during the daytime, the camera uses full-color mode to capture the monitored area to obtain high-definition daytime images, based on which efficient pedestrian monitoring and intelligent analysis can be performed. However, during the nighttime period when park safety is most important, due to the weak light at night, the resolution of the night vision images captured by the camera using the night vision mode (generally infrared night vision mode and white light night vision mode) is low, making it difficult to use them for direct pedestrian monitoring and intelligent analysis. Summary of the invention

[0003] The present disclosure aims to solve at least one of the technical problems existing in the prior art, and proposes a pedestrian detection method and a method for determining the travel path of pedestrians in a park at night.

[0004] In a first aspect, the present disclosure provides a pedestrian detection method, comprising:

[0005] Performing image enhancement processing on the night vision image of the corresponding monitoring area taken by the target camera at night to obtain a night vision enhanced image, the resolution of which is equal to the resolution of the daytime image of the corresponding monitoring area taken by the target camera during the day;

[0006] Performing edge extraction processing on the night vision enhanced image to obtain a first edge detection result image;

[0007] Selecting a daytime image captured by the target camera during the daytime as a background reference image, and obtaining a second edge detection result image corresponding to the background reference image;

[0008] Performing a difference process on the first edge detection result image and the second edge detection result image to obtain an edge detection result difference image;

[0009] The edge detection result difference map is subjected to target pedestrian detection processing, and the detection processing is used as the target pedestrian detection result of the night vision image.

[0010] In some embodiments, before the step of performing image enhancement processing on the night vision image of the corresponding monitoring area taken by the target camera at night, the step further includes:

[0011] Acquire multiple daytime images of the corresponding monitoring area taken by the target camera during the day, and select at least part of the daytime images as daytime sample images; and acquire multiple night vision images of the corresponding monitoring area taken by the target camera at night, and select at least part of the night vision images as night vision sample images;

[0012] Performing edge extraction processing on each of the daytime sample images and each of the night vision sample images to obtain edge detection result images corresponding to each of the daytime sample images and each of the night vision sample images;

[0013] According to the edge detection result images respectively corresponding to each of the daytime sample images and each of the night vision sample images, the daytime sample images and the night vision sample images are paired to obtain a plurality of sample image pairs; the sample image pairs include: a daytime sample image and a night vision sample image, and the area occupied by all edge pixels in the edge detection result image corresponding to the daytime sample image can completely cover the area occupied by all edge pixels in the edge detection result image corresponding to the night vision sample image;

[0014] Using the night vision sample images in the sample image pairs as model inputs, and the daytime sample images in the sample image pairs as model outputs, and using the multiple sample image pairs to train a preset image style transfer model;

[0015] The steps of performing image enhancement processing on the night vision image of the corresponding monitoring area taken by the target camera at night include:

[0016] The night vision image is input into the image style transfer model that has completed training, and the image output by the image style transfer model is the night vision enhanced image.

[0017] In some embodiments, the step of selecting at least part of the daytime images as daytime sample images comprises:

[0018] Performing semantic segmentation processing on each of the daytime images, and counting the number of regions segmented from each of the daytime images;

[0019] Screening out a first preset number of the daytime images with the smallest number of segmented regions as the daytime sample images in an ascending order of the number of segmented regions;

[0020] The step of selecting at least part of the night vision images as night vision sample images comprises:

[0021] Performing semantic segmentation processing on each of the night vision images, and counting the number of regions segmented from each of the night vision images;

[0022] According to the order of the number of the segmented regions from small to large, a second preset number of the night vision images with the smallest number of the segmented regions are screened out as the night vision sample images.

[0023] In some embodiments, the step of selecting a daytime image captured by the target camera during the daytime as a background reference image includes:

[0024] From all the daytime sample images, select one daytime sample image that satisfies the requirement that the area occupied by all edge pixels in the corresponding edge detection result image can be completely covered by the area occupied by the set of edge pixels in the first edge detection result image to serve as the background reference image.

[0025] In some embodiments, before the step of performing target pedestrian detection processing on the edge detection result difference map, the method further includes:

[0026] Based on multiple pre-acquired target pedestrian edge contour images, machine learning is performed to obtain a target pedestrian detection model based on human body contour features;

[0027] The step of performing target pedestrian detection processing on the edge difference map includes:

[0028] The pedestrian detection model is used to perform target pedestrian detection on the edge detection result difference map.

[0029] In a second aspect, the present disclosure further provides a method for determining a pedestrian travel path in a park at night, comprising:

[0030] Acquire multiple night vision images captured by multiple cameras in the park during a preset period of time at night;

[0031] For each of the night vision images, respectively, the pedestrian detection method provided in the first aspect is used to perform target pedestrian detection, to obtain a target pedestrian detection result corresponding to each of the night vision images;

[0032] Screen out night vision images with target pedestrians as valid night vision images, and for each valid night vision image, determine the real position of the target pedestrian in the valid night vision image in the road plane of the real space of the park according to the target pedestrian detection result of the valid night vision image.

[0033] The travel path of the target pedestrian in the park is determined based on the sequence of shooting time points of each of the valid night vision images and the two-dimensional coordinates of the road plane of the real position of the target pedestrian determined by each of the valid night vision images.

[0034] In some embodiments, each camera in the park uses a vertical camera method to capture a night vision image of the corresponding monitoring area, and the center point of the night vision image corresponds to the setting position of the camera that captures the night vision image in the real space of the park;

[0035] The target pedestrian detection result of the effective night vision image includes: the area information covered by the image portion of the target pedestrian in the effective night vision image;

[0036] The step of determining the real position road plane two-dimensional coordinates of the target pedestrian in the effective night vision image in the road plane of the real space of the park according to the target pedestrian detection result of the effective night vision image comprises:

[0037] According to the area covered by the image portion of the target pedestrian in the effective night vision image, the size and centroid coordinates (x0, y0) of the image portion of the target pedestrian in the effective night vision image are obtained;

[0038] According to the size of the image portion of the target pedestrian in the effective night vision image, determine the spatial straight-line distance L between the target pedestrian and the camera that shoots the effective night vision image in the real space of the park, and the spatial straight-line distance is negatively correlated with the size of the image portion of the target pedestrian in the effective night vision image;

[0039] Determine a relative direction vector (x0-xc, y0-yc) of the target pedestrian in the effective night vision image relative to the center point (xc, yc) according to the centroid coordinates (x0, y0) of the image portion of the target pedestrian in the effective night vision image and the center point (xc, yc) of the effective night vision image;

[0040] According to the three-dimensional space straight-line distance L between the target pedestrian in the real space of the park and the camera that shoots the effective night vision image, the relative direction vector (x0-xc, y0-yc) of the target pedestrian in the effective night vision image relative to the center point, the real position road plane two-dimensional coordinates (Xc, Yc) of the camera that shoots the effective night vision image on the park road plane, and the setting height H of the camera that shoots the effective night vision image relative to the road plane, the real position road plane two-dimensional coordinates (X0, Y0) of the target pedestrian on the road plane in the real space of the park are determined, and X0 and Y0 satisfy:

[0041]

[0042]

[0043] Among them, S is the distance between the two-dimensional coordinates of the road plane of the real position of the target pedestrian in the real space of the park and the two-dimensional coordinates of the road plane of the real position of the camera that shoots the effective night vision image.

[0044] In some embodiments, the target pedestrian detection result of the effective night vision image includes: the image position coordinates of the target pedestrian in the effective night vision image;

[0045] The step of determining the real position road plane two-dimensional coordinates of the target pedestrian in the effective night vision image in the road plane of the real space of the park according to the target pedestrian detection result of the effective night vision image comprises:

[0046] By using a preset two-dimensional coordinate mapping to three-dimensional real space algorithm, the image position coordinates of the target pedestrian in the effective night vision image are mapped to the real space of the park to obtain the three-dimensional coordinates of the real position of the target pedestrian in the real space of the park;

[0047] The three-dimensional coordinates of the real position of the target pedestrian in the real space of the park are projected onto the road plane of the park to obtain the two-dimensional coordinates of the real position of the target pedestrian on the road plane in the real space of the park.

[0048] In some embodiments, the step of obtaining multiple night vision images captured by multiple cameras in the park during a preset period of time at night includes:

[0049] Obtain the night vision images captured by each camera in the park at each preset shooting time point within the preset time period;

[0050] According to the sequence of the shooting time points of each of the valid night vision images and the two-dimensional coordinates of the road plane of the real position of the target pedestrian determined by each of the valid night vision images, the step of determining the travel path of the target pedestrian in the park includes:

[0051] Taking each of the preset shooting time points as a target preset shooting time point in turn, and detecting whether there is a corresponding valid night vision image at the target preset shooting time point;

[0052] If it does not exist, it is detected that the camera in the park did not capture the target pedestrian at the target preset shooting time point, and the position of the target pedestrian in the park at the target preset shooting time point cannot be located, and there is no final real position two-dimensional coordinate of the target pedestrian on the road plane of the park at the target preset shooting time point;

[0053] If it exists, then the two-dimensional coordinates of the road plane of the real position of the target pedestrian determined by all valid night vision images corresponding to the preset shooting time point of the target are averaged to obtain the final two-dimensional coordinates of the real position of the target pedestrian on the road plane of the park at the preset shooting time point;

[0054] For each preset shooting time point with a final real position two-dimensional coordinate, the final real position two-dimensional coordinates are sorted in chronological order to obtain the travel path of the target pedestrian in the park.

[0055] In some embodiments, after obtaining the target pedestrian's travel path in the park, the method further includes:

[0056] Generate an electronic map of the park's road surface;

[0057] The two-dimensional coordinates of each final real position are marked in the electronic map of the road plane, and the two-dimensional coordinates of each final real position are connected in sequence by lines in the order of the preset shooting time points corresponding to the two-dimensional coordinates of the final real position, so as to display the travel path in the electronic map.

[0058] The present disclosure provides a pedestrian detection method based on night vision images, which performs image enhancement processing on a night vision image of a corresponding monitoring area taken by a target camera at night to obtain a night vision enhanced image, performs edge extraction processing on the night vision enhanced image to obtain a first edge detection result image, and obtains a second edge detection result image of a background reference image taken during the day, then performs difference processing on the first edge detection result image and the second edge detection result image to obtain an edge detection result difference image, and finally performs target pedestrian detection processing on the edge detection result difference image, and the detection processing is used as the target pedestrian detection result of the night vision image, so as to achieve more accurate detection of target pedestrians at night. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 A flowchart of a pedestrian detection method provided by an embodiment of the present disclosure;

[0060] Figure 2 A flowchart of another pedestrian detection method provided by an embodiment of the present disclosure;

[0061] Figure 3 A flowchart of a method for determining a pedestrian path in a park at night provided by an embodiment of the present disclosure;

[0062] Figure 4 It is a schematic diagram of mapping effective night vision images and road plane;

[0063] Figure 5Schematic diagram of the position of the camera and the target pedestrian in the direction perpendicular to the road plane;

[0064] Figure 6 A flowchart of another method for determining a pedestrian path in a park at night provided by an embodiment of the present disclosure;

[0065] Figure 7 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0066] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the present disclosure is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0067] Unless otherwise defined, the technical terms or scientific terms used in the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the present disclosure do not represent any order, quantity or importance, but are only used to distinguish different components. Similarly, similar words such as "one", "one" or "the" do not represent quantitative restrictions, but rather represent the existence of at least one. Similar words such as "include" or "comprise" mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Up", "down", "left", "right" and the like are only used to represent relative positional relationships. When the absolute position of the described target changes, the relative positional relationship may also change accordingly.

[0068] Many specific details of the present disclosure are described below to provide a clearer understanding of the present disclosure. However, as those skilled in the art will appreciate, the present disclosure may be implemented without following these specific details.

[0069] It should be noted that the "daytime" or "nighttime" in the present disclosure does not refer to a specific time period, but is divided according to the ambient light brightness. The time period when the ambient light brightness is greater than a preset brightness threshold is called daytime, and the time period when the ambient light brightness is less than or equal to the preset brightness threshold is called nighttime.

[0070] The camera in the present disclosure is a dual-mode camera, specifically including a day mode and a night vision mode, and the control program in the camera automatically switches between the two shooting modes; wherein, the daytime image captured by the day mode is a high-definition full-color image, and the night vision image captured by the night vision mode is a low-resolution image, and the resolution of the night vision image is smaller than that of the daytime image captured during the day, and generally does not contain color information or contains less color information. Conventional night vision modes include infrared night vision mode and white light night vision mode. The night vision image obtained by the infrared night vision mode is an infrared light image, and the night vision image obtained by the white light night vision mode is a grayscale image or a low color gamut image. Dual-mode cameras and their working methods are conventional technologies in the field, and they are not the focus of the invention of the present disclosure, and the present disclosure does not elaborate on them.

[0071] In addition, in the present disclosure, “edge pixels” in an image refer to pixels detected as the edge (contour) of an object after edge extraction processing is performed on an original image.

[0072] Figure 1 Flow chart of a pedestrian detection method provided by an embodiment of the present disclosure. Figure 1 As shown, the pedestrian detection method includes:

[0073] Step S101: Perform image enhancement processing on the night vision image of the corresponding monitoring area taken by the target camera at night to obtain a night vision enhanced image.

[0074] In the present disclosure, the quality of night vision images can be effectively improved by performing image enhancement processing on night vision images. Among them, the content of conventional image enhancement processing generally includes two aspects: contrast enhancement and filtering. Contrast enhancement processing is to improve the interpretation effect of categories on the image; filtering processing is to extract or suppress the edge and detail features of the image, eliminate noise, etc. Commonly used contrast enhancement methods include contrast expansion, color enhancement, multi-spectral image combination and transformation; filtering enhancement is divided into spatial domain filtering and frequency domain filtering.

[0075] In the present disclosure, image enhancement processing is not limited to the above-mentioned contrast enhancement and filtering. Any image processing technology that can improve the quality of night vision images (for example, improving resolution, improving color gamut, etc.) falls within the scope of image enhancement processing in the present disclosure.

[0076] After processing the night vision image, the resolution of the obtained night vision enhanced image is equal to the resolution of the daytime image of the corresponding monitoring area taken by the target camera during the day. In the present disclosure, the resolution of the night vision enhanced image is the same as that of the daytime image in order to facilitate the subsequent processing.

[0077] Step S102: performing edge extraction processing on the night vision enhanced image to obtain a first edge detection result image.

[0078] Step S103: select a daytime image captured by the target camera during the day as a background reference image, and obtain a second edge detection result image corresponding to the background reference image.

[0079] In the present disclosure, edge extraction processing is performed on the night vision enhanced image and edge extraction processing is performed on the background reference image, and the same edge extraction algorithm is used for both. Among them, the edge extraction algorithm used in the present disclosure includes but is not limited to the Canny algorithm, the Sobel algorithm, the Roberts algorithm, etc., and the present disclosure does not limit the specific algorithm of the edge extraction algorithm.

[0080] Generally, the edge detection result image obtained by the edge extraction algorithm is a black and white image, in which the pixels at the edge contour position present a first color, and the pixels at the non-edge contour position present a second color, and one of the first color and the second color is black (grayscale is 0), and the other is white (grayscale is 255).

[0081] It should be noted that the resolution of the edge detection result image obtained after edge extraction processing is performed on the original image is equal to the resolution of the original image. Since the resolution of the night vision enhanced image in the present disclosure is equal to the resolution of the background reference image (i.e., a daytime image), the resolution of the first edge detection result image is also equal to the second edge detection result image.

[0082] Step S104: performing a difference process on the first edge detection result image and the second edge detection result image to obtain an edge detection result difference image.

[0083] In the present disclosure, the resolution of the first edge detection result image is the same as the resolution of the second edge detection result image, so the two can be processed by difference. Subtracting two images, also known as image difference or image difference method, is a commonly used image processing technology used to detect dynamic changes or differences between images. In the process of subtracting two images, the corresponding pixel values ​​of the two images are usually subtracted to obtain a difference image. Each pixel value in the difference image represents the change in the pixel value at the corresponding position of the two different images. If the two images are exactly the same, all pixel values ​​of the difference image will be zero. If there are differences between the two images in certain areas, the pixel values ​​of these areas in the difference image will not be zero.

[0084] In the present disclosure, the first edge detection result image records the edge contours of some static objects (also referred to as "background objects", such as buildings, plants, etc., which can be regarded as part of the background) located in the corresponding monitoring area at the corresponding shooting time point at night and the edge contours of some dynamic objects (for example, pedestrians, animals, cars, etc.), and the second edge detection result image also records the edge contours of some static objects and the edge contours of some dynamic objects located in the corresponding monitoring area at the corresponding shooting time point during the day.

[0085] By performing difference processing on the first edge detection result image and the second edge detection result image, the edge contours of static objects in the monitoring area can be effectively "removed". At this time, what is retained in the edge detection result difference image are the edge contours of different objects contained in both the night vision enhanced image and the background reference image. Specifically, these are generally the edge contours of some dynamic objects in the night vision enhanced image and the edge contours of some dynamic objects in the background reference image.

[0086] Step S105: Perform target pedestrian detection processing on the edge detection result difference map, and use the detection processing as the target pedestrian detection result of the night vision image.

[0087] In the present disclosure, since the interference of static objects in the monitoring area is "removed" in the edge detection result difference map, while the edge contours of dynamic objects located in the monitoring area at the daytime shooting time point and the current night shooting point are retained, the detection efficiency of pedestrians located in the monitoring area at the current night shooting point can be greatly improved.

[0088] It should be noted that in order to improve the detection effect in step S105, in the process of selecting a daytime image as the background reference image in step S103, daytime photos that do not contain or contain a small number of dynamic objects (especially pedestrians) should be selected as much as possible (try to select daytime photos that only contain static objects, that is, pure background photos). In this way, the edge contours of daytime dynamic objects can be effectively eliminated in the edge detection result difference image obtained in step S104, which is conducive to the accurate detection of the target pedestrian in step S105.

[0089] In addition, in step S105, considering that the edge detection result difference map records the edge contours of some dynamic objects, when detecting the target pedestrian, it is preferred to use a pedestrian detection algorithm based on contour features to detect the target pedestrian.

[0090] Optionally, in some embodiments, before step S105, the method includes: performing machine learning based on a plurality of pre-acquired target pedestrian edge contour images to obtain a target pedestrian detection model based on human body contour features. In this case, step S105 specifically includes: performing target pedestrian detection on the edge detection result difference map using the pedestrian detection model to determine pedestrian position information (i.e., target pedestrian detection result) in the edge detection result difference map.

[0091] The present disclosure provides a pedestrian detection method based on night vision images, which performs image enhancement processing on a night vision image of a corresponding monitoring area taken by a target camera at night to obtain a night vision enhanced image, performs edge extraction processing on the night vision enhanced image to obtain a first edge detection result image, and obtains a second edge detection result image of a background reference image taken during the day, then performs difference processing on the first edge detection result image and the second edge detection result image to obtain an edge detection result difference image, and finally performs target pedestrian detection processing on the edge detection result difference image, and the detection processing is used as the target pedestrian detection result of the night vision image, so as to achieve more accurate detection of target pedestrians at night.

[0092] Figure 2 FIG. 1 is a flow chart of another pedestrian detection method provided by an embodiment of the present disclosure. Figure 2 As shown, the pedestrian detection method not only includes steps S101 to S105 in the previous embodiment, but also includes steps S01 to S04 before step S101.

[0093] Step S01, obtaining multiple daytime images of the corresponding monitoring area taken by the target camera during the day, and selecting at least some of the daytime images as daytime sample images; and obtaining multiple night vision images of the corresponding monitoring area taken by the target camera at night, and selecting at least some of the night vision images as night vision sample images.

[0094] In some embodiments, the step of selecting at least some daytime images as daytime sample images includes: first, performing semantic segmentation processing on each daytime image, and counting the number of regions segmented from each daytime image; then, in order from small to large, screening out a first preset number (for example, 200, which can be pre-set and adjusted as needed) of daytime images with the smallest number of segmented regions as daytime sample images.

[0095] It should be noted that a semantic segmentation model such as the Semantic-SAM model can be used to perform semantic segmentation processing on daytime images. Through semantic segmentation processing, each object in the daytime image can be automatically segmented, and each segmented area represents an object. The objects in the image captured by the camera include static objects and dynamic objects, and the number of static objects in the image captured by the same camera at different times during the day when shooting the same monitoring area is in principle unchanged or has very small changes. Therefore, the change in the total number of objects in the daytime image is in principle caused by the change in the number of dynamic objects. Therefore, selecting daytime images with a small total number of objects (small number of segmented areas) can effectively eliminate daytime images containing more dynamic objects, so that the selected daytime images include only static objects as much as possible. That is, select daytime images that can represent the background of the monitoring area.

[0096] In some embodiments, the step of selecting at least part of the night vision images as the night vision sample images includes: first, performing semantic segmentation processing on each night vision image (the same semantic segmentation processing as that used for daytime images), and counting the number of regions segmented from each night vision image; then, in order of the number of segmented regions from small to large, selecting a second preset number (e.g., 150 images, which can be pre-set and adjusted as needed) of night vision images with the smallest number of segmented regions as night vision sample images. Similarly, the night vision images that can represent the background of the surveillance area are selected through the above processing.

[0097] Step S02: performing edge extraction processing on each daytime sample image and each night vision sample image respectively, to obtain edge detection result images corresponding to each daytime sample image and each night vision sample image respectively.

[0098] Step S03: performing image pairing on the daytime sample images and the night vision sample images according to the edge detection result images corresponding to each daytime sample image and each night vision sample image, so as to obtain a plurality of sample image pairs.

[0099] In step S03, multiple daytime images and multiple night vision images representing the background of the monitoring area are paired. The sample image pair includes: a daytime sample image and a night vision sample image, and the area occupied by all edge pixels in the edge detection result image corresponding to the daytime sample image can completely cover the area occupied by all edge pixels in the edge detection result image corresponding to the night vision sample image.

[0100] Generally, since the resolution of night vision sample images is relatively low and the resolution of daytime sample images is relatively high, the edge contour information in the edge detection result image obtained by edge extraction processing of the night vision sample images is generally less than the edge contour information in the edge detection result image obtained by edge extraction processing of the daytime sample images. When performing image pairing on multiple daytime sample images and multiple night vision sample images, if it is found that the area occupied by all edge pixels in the edge detection result image of a night vision sample image can be completely covered by the area occupied by all edge pixels in the edge detection result image of a daytime sample image, it can be considered that the night vision sample image is successfully paired with the daytime sample image, that is, a sample image pair is formed.

[0101] It should be noted that the method of pairing the edge detection result image of the night vision sample image with the edge detection result image of the daytime sample image is an optional implementation scheme in the present disclosure, which will not have any impact on the technical solution of the present disclosure. In practical applications, other methods can also be used to achieve the pairing of night vision sample images and daytime sample images; for example, based on the image similarity between the night vision sample image and the daytime sample image (such as image structure similarity, image histogram similarity, etc.), the night vision sample image and the daytime sample image are paired. Specifically, a night vision sample image and a daytime sample image whose image similarity is greater than a preset threshold (such as 90%) constitute a sample image pair.

[0102] Step S04: using the night vision sample image in the sample image pair as the model input, and the daytime sample image in the sample image pair as the model output, and using multiple sample image pairs to train a preset image style transfer model.

[0103] In step S04, the U-Net model can be used to construct a generative adversarial network image style transfer model, and then the image style transfer model can be trained using multiple sample image pairs to obtain a model that can output corresponding daytime images based on the input night vision images.

[0104] At this time, step S101 specifically includes: inputting the night vision image into the trained image style transfer model, and the image style transfer model outputs the image as a night vision enhanced image. At this time, the night vision enhanced image will contain some features of the daytime image.

[0105] In some embodiments, in step S103, the background reference image can be selected in the following manner: from all daytime sample images, a daytime sample image is selected as the background reference image, which satisfies the requirement that the area occupied by all edge pixels in the corresponding edge detection result image can be completely covered by the area occupied by the edge pixel set in the first edge detection result image. In other words, the edge pixel set in the edge detection result image corresponding to the selected background reference image is a subset of the edge pixel set in the first edge detection result image. Selecting the background reference image in this way can "remove" static objects and repeated dynamic objects as much as possible in the subsequent step S104, which is conducive to improving the detection effect of step S105.

[0106] Based on the same inventive concept, the disclosed embodiment also provides a method for determining the travel path of pedestrians in a park at night.

[0107] Figure 3 The present invention provides a flowchart of a method for determining a pedestrian path in a park at night. Figure 3 As shown, the determination method includes:

[0108] Step S201, obtaining a plurality of night vision images captured by a plurality of cameras in the park during a preset time period at night.

[0109] Specifically, the night vision images captured by each camera in the park at each preset shooting time point in a preset time period are obtained. Among them, each preset shooting time point in the preset time period can be preset according to actual needs; for example, the collection method can be used in the preset time period at equal intervals (for example, with an interval period of 0.5s), or the night vision images can be collected at a specified time point (set manually) in the preset time period.

[0110] Step S202: For each night vision image, a pedestrian detection method is used to detect a target pedestrian, and a target pedestrian detection result corresponding to each night vision image is obtained.

[0111] In step S202, the pedestrian detection method provided in the previous embodiment is used to perform pedestrian detection on each night vision image acquired in step S201 to obtain the target pedestrian detection result corresponding to each night vision image. The pedestrian detection method can be found in the content of the previous embodiment and will not be described here.

[0112] It should be noted that the target pedestrian detection result records the detection result of whether the target pedestrian exists in the corresponding night vision image, and the position description information of the target pedestrian in the night vision image when the target pedestrian exists.

[0113] Step S203: Filter out night vision images containing target pedestrians as valid night vision images, and for each valid night vision image, determine the real position road plane two-dimensional coordinates of the target pedestrian in the valid night vision image in the road plane of the real space of the park according to the target pedestrian detection result of the valid night vision image.

[0114] In step S203, first, according to the target pedestrian detection results corresponding to each night vision image, the night vision images with the target pedestrian can be screened out as valid night vision images; then, for each valid night vision image, according to the target pedestrian detection results (containing position description information) of the valid night vision image, the real position road plane two-dimensional coordinates of the target pedestrian in the valid night vision image in the road plane of the real space of the park are determined. That is, the position of the target pedestrian in the valid night vision image is mapped to the road plane of the real space of the park, and the real position road plane two-dimensional coordinates of the target pedestrian in the road plane are obtained.

[0115] Step S204: Determine the travel path of the target pedestrian in the park according to the sequence of the shooting time points of each valid night vision image and the two-dimensional coordinates of the road plane of the real position of the target pedestrian determined by each valid night vision image.

[0116] Based on the above content, it can be seen that the technical solution disclosed in the present invention can realize the acquisition of the travel path of target pedestrians in the park at night.

[0117] As one of the optional implementation schemes for determining the two-dimensional coordinates of the road plane of the real position of the target pedestrian in a certain valid night vision image in the road plane of the real space of the park in step S203. Optionally, each camera in the park adopts a vertical camera method to shoot the night vision image of the corresponding monitoring area, and the center point of the night vision image corresponds to the setting position of the camera that shoots the night vision image in the real space of the park. Among them, vertical photography refers to a photography method in which the main optical axis of the camera is perpendicular to the ground or deviates from the vertical line within three degrees. At this time, the center point of the night vision image obtained by the vertical photography method corresponds to the setting position of the camera that shoots the night vision image in the real space of the park.

[0118] Accordingly, the target pedestrian detection result of the effective night vision image includes: the area information (a kind of position description information) covered by the image portion of the target pedestrian in the effective night vision image. At this time, in step S203, the step of determining the real position road plane two-dimensional coordinates of the target pedestrian in the effective night vision image in the road plane of the real space of the park according to the target pedestrian detection result of the effective night vision image includes: the following steps S2031a to S2034a.

[0119] Step S2031a: According to the information of the area covered by the image portion of the target pedestrian in the effective night vision image, the size and centroid coordinates (x0, y0) of the image portion of the target pedestrian in the effective night vision image are obtained.

[0120] In some embodiments, the size of the target pedestrian image portion in the effective night vision image can be represented by the number of pixels in the area covered by the target pedestrian image portion in the effective night vision image; of course, it can also be directly represented by the area covered by the target pedestrian image portion in the effective night vision image. The present disclosure is not limited to this.

[0121] Step S2032a: Determine the spatial straight-line distance L between the target pedestrian and the camera that captures the effective night vision image in the real space of the park according to the size of the image portion of the target pedestrian in the effective night vision image.

[0122] For the same target pedestrian, the farther away from the camera, the smaller the image size of the target pedestrian in the image captured by the camera. That is, the spatial straight-line distance and the size of the image portion of the target pedestrian in the effective night vision image are negatively correlated.

[0123] In practical applications, preliminary experiments can be conducted to simulate the size of the target pedestrian's image portion in the image captured when the target pedestrian occupies different spatial linear distances from the camera, and then the "spatial linear distance" and the "size of the target pedestrian's image portion" are fitted by algorithms to obtain a conversion algorithm with the "size of the target pedestrian's image portion" as the independent variable and the "spatial linear distance" as the dependent variable. In step S2032a, the spatial linear distance L between the target pedestrian and the camera that captures the effective night vision image can be obtained based on the fitted conversion algorithm.

[0124] Of course, it is also possible to simulate the size of the target pedestrian's image portion in the image captured when the target pedestrian occupies different spatial linear distances from the camera through preliminary experiments, and then create a corresponding distance-size correspondence table based on the simulation results. The distance-size correspondence table records the sizes of the target pedestrian's image portion corresponding to the target pedestrian's image portion when the target pedestrian occupies different spatial linear distances from the camera. In step S2032a, the spatial linear distance L between the target pedestrian and the camera that captures the effective night vision image can be obtained by querying the distance-size correspondence table.

[0125] Step S2033a, based on the centroid coordinates (x0, y0) of the image portion of the target pedestrian in the effective night vision image and the center point (xc, yc) of the effective night vision image, determine the relative direction vector (x0-xc, y0-yc) of the target pedestrian in the effective night vision image relative to the center point.

[0126] Step S2034a, according to the three-dimensional space straight-line distance L between the target pedestrian in the real space of the park and the camera that shoots the effective night vision image, the relative direction vector (x0-xc, y0-yc) of the target pedestrian in the effective night vision image relative to the center point, the real position road plane two-dimensional coordinates (Xc, Yc) of the camera that shoots the effective night vision image on the road plane of the park, and the setting height H of the camera that shoots the effective night vision image relative to the road plane, determine the real position road plane two-dimensional coordinates (X0, Y0) of the target pedestrian on the road plane in the real space of the park, X0 and Y0 satisfy:

[0127]

[0128] Figure 4 Figure 1 is a schematic diagram of the mapping between effective night vision images and road plane. Figure 4 As shown, the above formula (1) means that based on the principle of proportional imaging of vertical photography, the relative direction vector of the target pedestrian in the effective night vision image relative to the center point can be obtained, which is the same as the relative direction vector of the target pedestrian in the real space of the park relative to the camera that shoots the effective night vision image.

[0129] Figure 5 is a schematic diagram of the position of the camera and the target pedestrian in the direction perpendicular to the road plane. Figure 4 and Figure 5 As shown, the above formulas (2) and (3) mean that the setting height H of the camera that takes effective night vision images relative to the road plane, the distance S between the two-dimensional coordinates of the road plane of the real position of the target pedestrian in the real space of the park and the two-dimensional coordinates of the road plane of the real position of the camera that takes effective night vision images, and the spatial straight-line distance L between the target pedestrian and the camera that takes effective night vision images satisfy the Pythagorean theorem.

[0130] The above formulas (1) to (3) can be used to obtain the two-dimensional coordinates (X0, Y0) of the road plane of the target pedestrian's real position in the real space of the park.

[0131] As a second optional implementation scheme for determining the two-dimensional coordinates of the real position of the target pedestrian in a valid night vision image on the road plane in the real space of the park in step S203, the target pedestrian detection result of the valid night vision image includes: the image position coordinates of the target pedestrian in the valid night vision image (for example, the centroid coordinates of the target pedestrian, the foot coordinates of the target pedestrian, the head coordinates of the target pedestrian, etc., which can be used to characterize the position of the target pedestrian in the image).

[0132] At this time, in step S203, the steps of determining the real position road plane two-dimensional coordinates of the target pedestrian in the effective night vision image in the road plane of the real space of the park according to the target pedestrian detection result of the effective night vision image include: the following steps S2031b to S2032b.

[0133] Step S2031b: Map the image position coordinates of the target pedestrian in the effective night vision image to the real space of the park through a preset two-dimensional coordinate mapping to three-dimensional real space algorithm to obtain the three-dimensional coordinates of the real position of the target pedestrian in the real space of the park.

[0134] Among them, the process of mapping the two-dimensional coordinates in the image captured by the camera to the three-dimensional real space generally includes the following steps: camera calibration, depth information acquisition, and coordinate mapping. Among them, camera calibration refers to the use of a calibration plate of known size (such as a chessboard), taking photos of the calibration plate at different angles and positions, using an image processing algorithm to extract feature points (such as corner points) on the calibration plate, and then solving the internal and external parameters of the camera through an optimization algorithm. These parameters include focal length, optical center position, rotation matrix, and translation matrix, which describe how to project points in three-dimensional space onto a two-dimensional image. The internal and external parameters of the camera can be obtained through camera calibration. Depth information is the key to mapping two-dimensional coordinates to three-dimensional coordinates. For monocular cameras, depth information is usually not directly available and needs to rely on other methods. Common methods include: binocular stereo vision, laser ranging, structured light, and depth sensor. After obtaining the internal and external parameters and depth information of the camera, the two-dimensional coordinates can be mapped to three-dimensional coordinates, which generally includes: image coordinate conversion, application of external parameter matrix, distortion correction and other steps. Among them, image coordinate conversion refers to converting the two-dimensional coordinates in the picture (usually in pixels) into physical coordinates of the image in millimeters. This usually involves the intrinsic parameter matrix of the camera, including focal length and optical center position. Applying the extrinsic matrix refers to using the camera's extrinsic matrix (rotation matrix and translation matrix) to convert the image physical coordinates into three-dimensional coordinates in the camera coordinate system. The rotation matrix describes the rotation relationship between the camera coordinate system and the world coordinate system, and the translation matrix describes the translation relationship between the camera coordinate system and the world coordinate system. Distortion correction means that in practical applications, the camera lens usually has distortions, such as radial distortion and tangential distortion. These distortions will affect the accuracy of the image coordinates, so they need to be corrected during the mapping process.

[0135] Step S2032b, project the three-dimensional coordinates of the target pedestrian's real position in the real space of the park onto the road plane of the park to obtain the two-dimensional coordinates of the target pedestrian's real position on the road plane in the real space of the park.

[0136] In step S2032, considering that the three-dimensional coordinates of the real space of the park are composed of the two-dimensional coordinates of the road plane and the one-dimensional coordinates perpendicular to the road plane, the one-dimensional data representing the perpendicular to the road plane in the three-dimensional coordinates of the real position of the target pedestrian in the real space of the park can be directly deleted to obtain the two-dimensional coordinates of the road plane of the real position of the target pedestrian in the real space of the park.

[0137] In some embodiments, step S204 includes: step S2041 and step S2042.

[0138] Step S204, taking each preset shooting time point as the target preset shooting time point in turn, and detecting whether there is a corresponding valid night vision image at the target preset shooting time point; if not, it is detected that the camera in the park did not capture the target pedestrian at the target preset shooting time point, and the position of the target pedestrian in the park at the target preset shooting time point cannot be located, and there is no final real position two-dimensional coordinate of the target pedestrian on the road plane in the park at the target preset shooting time point; if it exists, the real position road plane two-dimensional coordinates of the target pedestrian determined by all valid night vision images corresponding to the target preset shooting time point are averaged (when the monitoring areas of two or more cameras overlap, two or more cameras may capture the target pedestrian at a certain moment, at this time, the real position road plane two-dimensional coordinates of the corresponding target pedestrian can be obtained based on each valid night vision image at this moment, and these real position road plane two-dimensional coordinates may be different, that is, there are multiple different real position road plane two-dimensional coordinates at the same time, so averaging is required), to obtain the final real position two-dimensional coordinates of the target pedestrian on the road plane in the park at the target preset shooting time point.

[0139] Step S2042: for each preset shooting time point having a final real position two-dimensional coordinate, the final real position two-dimensional coordinates are sorted in chronological order to obtain a travel path of the target pedestrian in the park.

[0140] Figure 6 A flowchart of another method for determining a pedestrian path in a park at night provided by an embodiment of the present disclosure. Figure 6 As shown, the determination method not only includes steps S201 to S204 in the previous embodiment, but also includes steps S205 and S206 after step S204.

[0141] Step S205: Generate an electronic map of the road surface of the park.

[0142] Step S206: Mark the two-dimensional coordinates of each final real position in the electronic map of the road plane, and connect the two-dimensional coordinates of each final real position in sequence with lines according to the sequence of the preset shooting time points corresponding to each two-dimensional coordinate of the final real position, so as to display the travel path in the electronic map.

[0143] In practical applications, ArcGIS software can be used to construct an electronic map of the park's road plane, and the remote sensing image of the park's road plane can be used as the base map of the electronic map and the coordinates of the road plane can be calibrated. The path of the target pedestrian can be displayed as an additional image on the base map for easy reference by management personnel.

[0144] Based on the same inventive concept, an embodiment of the present disclosure also provides an electronic device. Figure 7 FIG. 1 is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. Figure 7 As shown, an embodiment of the present disclosure provides an electronic device including: one or more processors 101, a memory 102, and one or more I / O interfaces 103. The memory 102 stores one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement any pedestrian detection method and a method for determining a pedestrian travel path in a park at night in the above-mentioned embodiments; the one or more I / O interfaces 103 are connected between the processor and the memory, and are configured to implement information interaction between the processor and the memory.

[0145] Among them, the processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.; the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus), etc.

[0146] In some embodiments, the processor 101 , the memory 102 , and the I / O interface 103 are connected to each other via a bus 104 , and further connected to other components of the computing device.

[0147] In some embodiments, the one or more processors 101 include a field programmable gate array.

[0148] According to an embodiment of the present disclosure, a computer readable medium is further provided. The computer readable medium stores a computer program, wherein when the program is executed by a processor, the steps in any of the pedestrian detection methods and the method for determining the path of pedestrians at night in a park are implemented.

[0149] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, including a computer program carried on a machine-readable medium, the computer program containing a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), the above-mentioned functions defined in the system of the present disclosure are executed.

[0150] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0151] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of the code, and the aforementioned module, program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0152] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present disclosure, but the present disclosure is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and substance of the present disclosure, and these modifications and improvements are also considered to be within the scope of protection of the present disclosure.

Claims

1. A pedestrian detection method, characterized in that: include: Performing image enhancement processing on the night vision image of the corresponding monitoring area taken by the target camera at night to obtain a night vision enhanced image, the resolution of which is equal to the resolution of the daytime image of the corresponding monitoring area taken by the target camera during the day; Performing edge extraction processing on the night vision enhanced image to obtain a first edge detection result image; Selecting a daytime image captured by the target camera during the daytime as a background reference image, and obtaining a second edge detection result image corresponding to the background reference image; Performing a difference process on the first edge detection result image and the second edge detection result image to obtain an edge detection result difference image; The edge detection result difference map is subjected to target pedestrian detection processing, and the detection processing is used as the target pedestrian detection result of the night vision image.

2. The pedestrian detection method according to claim 1, characterized in that: Before the step of performing image enhancement processing on the night vision image of the corresponding monitoring area taken by the target camera at night, the method further includes: Acquire multiple daytime images of the corresponding monitoring area taken by the target camera during the day, and select at least part of the daytime images as daytime sample images; and acquire multiple night vision images of the corresponding monitoring area taken by the target camera at night, and select at least part of the night vision images as night vision sample images; Performing edge extraction processing on each of the daytime sample images and each of the night vision sample images to obtain edge detection result images corresponding to each of the daytime sample images and each of the night vision sample images; According to the edge detection result images respectively corresponding to each of the daytime sample images and each of the night vision sample images, the daytime sample images and the night vision sample images are paired to obtain a plurality of sample image pairs; the sample image pairs include: a daytime sample image and a night vision sample image, and the area occupied by all edge pixels in the edge detection result image corresponding to the daytime sample image can completely cover the area occupied by all edge pixels in the edge detection result image corresponding to the night vision sample image; Using the night vision sample images in the sample image pairs as model inputs, and the daytime sample images in the sample image pairs as model outputs, and using the multiple sample image pairs to train a preset image style transfer model; The steps of performing image enhancement processing on the night vision image of the corresponding monitoring area taken by the target camera at night include: The night vision image is input into the image style transfer model that has completed training, and the image output by the image style transfer model is the night vision enhanced image.

3. The pedestrian detection method according to claim 2, characterized in that: The step of selecting at least part of the daytime images as daytime sample images comprises: Performing semantic segmentation processing on each of the daytime images, and counting the number of regions segmented from each of the daytime images; Screening out a first preset number of the daytime images with the smallest number of segmented regions as the daytime sample images in an ascending order of the number of segmented regions; The step of selecting at least part of the night vision images as night vision sample images comprises: Performing semantic segmentation processing on each of the night vision images, and counting the number of regions segmented from each of the night vision images; According to the order of the number of the segmented regions from small to large, a second preset number of the night vision images with the smallest number of the segmented regions are screened out as the night vision sample images.

4. The pedestrian detection method according to claim 2, characterized in that: The step of selecting a daytime image captured by the target camera during the daytime as a background reference image comprises: From all the daytime sample images, select one daytime sample image that satisfies the requirement that the area occupied by all edge pixels in the corresponding edge detection result image can be completely covered by the area occupied by the set of edge pixels in the first edge detection result image to serve as the background reference image.

5. The pedestrian detection method according to claims 1 to 4, characterized in that: Before the step of performing target pedestrian detection processing on the edge detection result difference map, the method further includes: Based on multiple pre-acquired target pedestrian edge contour images, machine learning is performed to obtain a target pedestrian detection model based on human body contour features; The step of performing target pedestrian detection processing on the edge difference map includes: The pedestrian detection model is used to perform target pedestrian detection on the edge detection result difference map.

6. A method for determining the path of pedestrians at night in a park, characterized in that: include: Acquire multiple night vision images captured by multiple cameras in the park during a preset period of time at night; For each of the night vision images, respectively, a target pedestrian detection is performed using the pedestrian detection method described in any one of claims 1 to 5 to obtain a target pedestrian detection result corresponding to each of the night vision images; Screen out night vision images with target pedestrians as valid night vision images, and for each valid night vision image, determine the real position of the target pedestrian in the valid night vision image in the road plane of the real space of the park according to the target pedestrian detection result of the valid night vision image. The travel path of the target pedestrian in the park is determined according to the sequence of shooting time points of each of the valid night vision images and the two-dimensional coordinates of the road plane of the real position of the target pedestrian determined by each of the valid night vision images.

7. The determination method according to claim 6, characterized in that: Each camera in the park uses a vertical camera mode to capture a night vision image of the corresponding monitoring area, and the center point of the night vision image corresponds to the setting position of the camera that captures the night vision image in the real space of the park; The target pedestrian detection result of the effective night vision image includes: the area information covered by the image portion of the target pedestrian in the effective night vision image; The step of determining the real position road plane two-dimensional coordinates of the target pedestrian in the effective night vision image in the road plane of the real space of the park according to the target pedestrian detection result of the effective night vision image comprises: According to the area covered by the image portion of the target pedestrian in the effective night vision image, the size and centroid coordinates (x0, y0) of the image portion of the target pedestrian in the effective night vision image are obtained; According to the size of the image portion of the target pedestrian in the effective night vision image, determine the spatial straight-line distance L between the target pedestrian and the camera that shoots the effective night vision image in the real space of the park, and the spatial straight-line distance is negatively correlated with the size of the image portion of the target pedestrian in the effective night vision image; Determine a relative direction vector (x0-xc, y0-yc) of the target pedestrian in the effective night vision image relative to the center point (xc, yc) according to the centroid coordinates (x0, y0) of the image portion of the target pedestrian in the effective night vision image and the center point (xc, yc) of the effective night vision image; According to the three-dimensional space straight-line distance L between the target pedestrian in the real space of the park and the camera that shoots the effective night vision image, the relative direction vector (x0-xc, y0-yc) of the target pedestrian in the effective night vision image relative to the center point, the real position road plane two-dimensional coordinates (Xc, Yc) of the camera that shoots the effective night vision image on the park road plane, and the setting height H of the camera that shoots the effective night vision image relative to the road plane, the real position road plane two-dimensional coordinates (X0, Y0) of the target pedestrian on the road plane in the real space of the park are determined, and X0 and Y0 satisfy: Among them, S is the distance between the two-dimensional coordinates of the road plane of the real position of the target pedestrian in the real space of the park and the two-dimensional coordinates of the road plane of the real position of the camera that shoots the effective night vision image.

8. The determination method according to claim 6, characterized in that: The target pedestrian detection result of the effective night vision image includes: the image position coordinates of the target pedestrian in the effective night vision image; The step of determining the real position road plane two-dimensional coordinates of the target pedestrian in the effective night vision image in the road plane of the real space of the park according to the target pedestrian detection result of the effective night vision image comprises: By using a preset two-dimensional coordinate mapping to three-dimensional real space algorithm, the image position coordinates of the target pedestrian in the effective night vision image are mapped to the real space of the park to obtain the three-dimensional coordinates of the real position of the target pedestrian in the real space of the park; The three-dimensional coordinates of the real position of the target pedestrian in the real space of the park are projected onto the road plane of the park to obtain the two-dimensional coordinates of the real position of the target pedestrian on the road plane in the real space of the park.

9. The determination method according to claim 6, characterized in that: The steps of obtaining multiple night vision images captured by multiple cameras in the park during a preset time period at night include: Obtain the night vision images captured by each camera in the park at each preset shooting time point within the preset time period; According to the sequence of the shooting time points of each of the valid night vision images and the two-dimensional coordinates of the road plane of the real position of the target pedestrian determined by each of the valid night vision images, the step of determining the travel path of the target pedestrian in the park includes: Taking each of the preset shooting time points as a target preset shooting time point in turn, and detecting whether there is a corresponding valid night vision image at the target preset shooting time point; If it does not exist, it is detected that the camera in the park did not capture the target pedestrian at the target preset shooting time point, and the position of the target pedestrian in the park at the target preset shooting time point cannot be located, and there is no final real position two-dimensional coordinate of the target pedestrian on the road plane of the park at the target preset shooting time point; If it exists, then the two-dimensional coordinates of the road plane of the real position of the target pedestrian determined by all valid night vision images corresponding to the preset shooting time point of the target are averaged to obtain the final two-dimensional coordinates of the real position of the target pedestrian on the road plane of the park at the preset shooting time point; For each preset shooting time point with a final real position two-dimensional coordinate, the final real position two-dimensional coordinates are sorted in chronological order to obtain the travel path of the target pedestrian in the park.

10. The determination method according to claim 9, characterized in that: After obtaining the target pedestrian's path in the park, it also includes: Generate an electronic map of the park's road surface; The two-dimensional coordinates of each final real position are marked in the electronic map of the road plane, and the two-dimensional coordinates of each final real position are connected in sequence by lines in the order of the preset shooting time points corresponding to the two-dimensional coordinates of the final real position, so as to display the travel path in the electronic map.

Citation Information

Patent Citations

  • Pedestrian detection method and device and computer readable storage medium

    CN112465735A

  • Depth measurement method and device based on binocular camera, equipment and storage medium

    CN114383564A