Smart city management method and system based on cloud computing and image recognition

Through cloud computing and image recognition technology, real-time monitoring of traffic intersection congestion and adjustment of signal light durations solve the traffic congestion problem caused by fixed signal lights in the existing technology and improve the smoothness and convenience of urban traffic.

CN118780495APending Publication Date: 2024-10-15SOUTHWEST PETROLEUM UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410974579.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Existing urban traffic lights have a fixed duration and cannot be intelligently adjusted according to real-time congestion conditions, leading to congestion at traffic intersections and violating the efficient management concept of smart cities.

Method used

Using methods based on cloud computing and image recognition, image data is acquired and processed through traffic intersection monitors, lane areas are detected, density indicators are calculated, congestion is determined, adjustment instructions are generated, and the display duration of traffic lights is dynamically adjusted.

Benefits of technology

It realizes real-time congestion monitoring and intelligent time adjustment at urban traffic intersections, improves traffic smoothness and convenience, and adapts to the efficient management needs of smart cities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118780495A_ABST
    Figure CN118780495A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of smart cities, and particularly discloses a smart city management method and system based on cloud computing and image recognition, and the method comprises the steps: carrying out the target detection and region-of-interest extraction through collecting continuous crossing monitoring images of a target road section at a traffic crossing, and obtaining a lane region image; pixel-by-pixel comparison difference processing and enhancement processing are carried out on the lane area image and the corresponding area reference image to obtain an enhanced difference gray level image, threshold segmentation and binarization processing are carried out on the enhanced difference gray level image, a foreground area is extracted to calculate density index parameters, and the density index parameters are calculated; and finally, judging whether the target road section is congested for a long time based on the density index parameters of the continuous crossing monitoring images, so as to send a corresponding traffic signal lamp duration adjusting instruction and adjust the duration of the traffic signal lamp at the traffic crossing. According to the invention, traffic dispersion requirements of corresponding road sections can be effectively adapted, the smoothness and convenience of urban traffic are improved, and efficient smart city management is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of smart cities, and in particular relates to a smart city management method and system based on cloud computing and image recognition. Background Art

[0002] Smart city is a new form of city built with the goal of more scientific development, more efficient management and better life, supported by information technology and communication technology, through transparent and sufficient information acquisition, extensive and secure information transmission and effective and scientific information processing, to improve the efficiency of urban operation, improve the level of public services and form a low-carbon urban ecosystem. With the rapid development of science and technology and the advent of information society, smart city has become a new direction for future urban planning.

[0003] The core of smart city includes smart transportation. The command and management of urban road traffic usually rely on traffic lights. However, the travel time of urban traffic lights is usually fixed, and it is impossible to adjust the travel time intelligently and adaptively according to the congestion situation of a certain direction of traffic in real time. This may easily lead to serious congestion in a certain direction of the traffic intersection, which is not conducive to urban traffic diversion and does not conform to the development concept of smart city. Summary of the invention

[0004] The purpose of the present invention is to provide a smart city management method and system based on cloud computing and image recognition to solve the above-mentioned problems existing in the prior art.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions: In a first aspect, a smart city management method based on cloud computing and image recognition is provided, comprising: Obtaining continuous intersection monitoring images for a target road section transmitted by a cloud image monitor at a traffic intersection, and extracting corresponding timestamps and road section numbers from each intersection monitoring image, wherein the intersection monitoring images are marked with corresponding timestamps and road section numbers; Perform target detection on the crossing monitoring image, determine several target reference objects in the crossing monitoring image, determine the corresponding reference points based on each target reference object, and use each reference point to divide the region of interest with a fixed resolution; Segment the region of interest from the crossing monitoring image as a lane region image, and retrieve the corresponding region reference image from the cloud database according to the timestamp and section number of the crossing monitoring image; Compare the lane area image and the regional reference image pixel by pixel, calculate the reference grayscale value of each pixel using the brightness value of each pixel in the lane area image and the regional reference image, and construct an initial differential grayscale image based on the reference grayscale value of each pixel; A sliding window is used to select a window area centered on each pixel and containing a number of pixels in the initial differential grayscale image, and a final grayscale value of the central pixel is calculated based on the reference grayscale value of each pixel in the window area; An enhanced differential grayscale image is constructed according to the final grayscale value of each pixel, and the enhanced differential grayscale image is subjected to threshold segmentation and binarization based on a set grayscale threshold to obtain a regional binary image; Extract the foreground area of ​​the specified grayscale from the regional binary image, calculate the area ratio of all foreground areas in the regional binary image, and use the area ratio as the density index parameter of the corresponding crossing monitoring image; When it is determined according to the density index parameters and timestamps corresponding to the continuous road crossing monitoring images that the density index parameters corresponding to the continuous road crossing monitoring images continuously exceed the set threshold parameters and the duration exceeds the set time length, the adjustment level is determined according to the density index parameters corresponding to the continuous road crossing monitoring images; The corresponding traffic light duration adjustment instruction is generated according to the adjustment level, and the traffic light duration adjustment instruction is cloud-transmitted to the traffic light controller of the target section according to the section number, so that the traffic light controller adjusts the display duration of the traffic light of the target section according to the traffic light duration adjustment instruction.

[0006] In a possible design, the target detection is performed on the crossing monitoring image, a plurality of target reference objects in the crossing monitoring image are determined, a corresponding reference point is determined based on each target reference object, and a region of interest with a fixed resolution is divided using each reference point, including: Input the road crossing monitoring image into a preset target detection network model to detect the target reference object, and obtain a plurality of boxes to select the bounding boxes corresponding to the target reference object, wherein the target detection network model is obtained by training the Faster R-CNN network model with a training set, and the training set includes a plurality of road crossing monitoring image samples marked with the bounding boxes of the target reference object; Determine the center pixel of the bounding box according to the bounding box of the target reference object, and select an image area of ​​a set range with the center pixel of the bounding box as the center as the candidate area corresponding to the target reference object; Each pixel point in the candidate area corresponding to the target reference object is used as the reference point of the corresponding target reference object, and the reference point of each target reference object is used as the image vertex, and several regional intercepted images are traversed and divided. If a certain image vertex of the regional intercepted image is the central pixel point of the bounding box, the image vertex is used as the reference vertex of the regional intercepted image; From the images captured in each region, the one whose image resolution meets the fixed resolution condition and contains the largest number of reference vertices is selected as the region of interest.

[0007] In a possible design, retrieving the corresponding regional reference image from the cloud database according to the timestamp and section number of the crossing monitoring image includes: Retrieving a corresponding regional reference image set from a cloud database according to the road section number of the crossing monitoring image, wherein a plurality of regional reference image sets are pre-stored in the cloud database, and each regional reference image set is associated with a corresponding road section number; The corresponding monitoring period is determined according to the timestamp of the crossing monitoring image, and the corresponding regional reference image is selected from the regional reference image set according to the monitoring period, and each regional reference image in the regional reference image set is associated with the corresponding monitoring period.

[0008] In a possible design, the lane area image and the regional reference image are compared pixel by pixel, and the reference grayscale value of each pixel is calculated using the brightness value of each pixel of the lane area image and the regional reference image, including: Determine the RGB three-color channel brightness value of each pixel in the lane area image and the RGB three-color channel brightness value of each pixel in the area reference image; Substitute the RGB three-color channel brightness value of each pixel in the lane area image and the RGB three-color channel brightness value of each pixel in the area reference image into the preset reference gray value calculation model for calculation to obtain the reference gray value of each pixel. The reference gray value calculation model is:

[0009] Among them, i is the pixel number, H i is the reference gray value corresponding to pixel i, R1 i 、G1 i and B1 i is the RGB three-color channel brightness value of pixel i in the lane area image, R2 i , G2 i and B2 i is the RGB color channel brightness value of pixel i in the regional reference image, α, β and δ are the weight coefficients of the RGB color channel brightness values, max ( ) is the maximum value operator.

[0010] In a possible design, the sliding window is used to select a window area centered on each pixel and including a plurality of pixels in the initial differential grayscale image, and a final grayscale value of the central pixel is calculated based on the reference grayscale value of each pixel in the window area, including: A 3×3 pixel sliding window is used to select a window area centered on each pixel point and including a number of pixels in the initial differential grayscale image, and a reference grayscale value of each pixel point in the window area is determined; A 3×3 reference gray value matrix is ​​constructed using the reference gray value of each pixel in the window area; The reference gray value matrix is ​​multiplied by the preset 3×3 enhancement matrix to obtain the final gray value of the central pixel of the window area. The 3×3 enhancement matrix is

[0011] In a possible design, the enhanced differential grayscale image is subjected to threshold segmentation and binarization based on a set grayscale threshold to obtain a regional binary image, including: Substitute the final grayscale value of each pixel in the enhanced differential grayscale image into the preset threshold segmentation formula for threshold segmentation and binarization to obtain the binarized grayscale value of each pixel. The threshold segmentation formula is:

[0012] Among them, i represents the pixel number, I i Represents the binary grayscale value corresponding to pixel i, Z i Represents the final grayscale value corresponding to pixel i, X is the set grayscale threshold; A regional binary image is constructed based on the binary grayscale value of each pixel.

[0013] In a possible design, extracting a foreground region of a specified grayscale from the regional binary image and calculating the area ratio of all foreground regions in the regional binary image includes: Pixels with a binary grayscale value of 255 in the regional binary image are extracted to form the corresponding foreground area. The image area of ​​all foreground areas is divided by the image area of ​​the regional binary image to obtain the corresponding area ratio.

[0014] In a possible design, determining the adjustment level according to the density index parameter corresponding to each continuous crossing monitoring image includes: The maximum density index parameter is extracted from the density index parameters corresponding to each continuous crossing monitoring image, and the maximum density index parameter is imported into a preset adjustment level table for matching to determine the corresponding adjustment level. The adjustment level table contains several adjustment levels, and each adjustment level is associated with a corresponding density index parameter interval.

[0015] In a second aspect, a smart city management system based on cloud computing and image recognition is provided, including an image acquisition unit, a target detection unit, a segmentation and retrieval unit, an image difference unit, a difference enhancement unit, a threshold segmentation unit, an index calculation unit, a level determination unit and a control execution unit, wherein: An image acquisition unit, used to acquire continuous road crossing monitoring images for a target road section transmitted by a cloud image monitor at a traffic intersection, and extract corresponding timestamps and road section numbers from each road crossing monitoring image, wherein the road crossing monitoring images are marked with corresponding timestamps and road section numbers; The target detection unit is used to perform target detection on the crossing monitoring image, determine a number of target reference objects in the crossing monitoring image, determine a corresponding reference point based on each target reference object, and use each reference point to divide a region of interest with a fixed resolution; A segmentation and retrieval unit is used to segment the region of interest from the crossing monitoring image as a lane region image, and retrieve the corresponding region reference image from the cloud database according to the timestamp and section number of the crossing monitoring image; An image difference unit is used to compare the lane area image and the regional reference image pixel by pixel, calculate the reference gray value of each pixel point using the brightness value of each pixel point of the lane area image and the regional reference image, and construct an initial differential gray image according to the reference gray value of each pixel point; A differential enhancement unit, used to select a window area centered on each pixel and including a number of pixels in the initial differential grayscale image using a sliding window, and calculate a final grayscale value of the central pixel based on the reference grayscale value of each pixel in the window area; A threshold segmentation unit is used to construct an enhanced differential grayscale image according to the final grayscale value of each pixel point, and perform threshold segmentation and binarization processing on the enhanced differential grayscale image based on a set grayscale threshold to obtain a regional binary image; An index calculation unit is used to extract a foreground area of ​​a specified grayscale from the regional binary image, and calculate the area ratio of all foreground areas in the regional binary image, and use the area ratio as a density index parameter of the corresponding crossing monitoring image; A level determination unit, for determining an adjustment level according to the density index parameter corresponding to each continuous road crossing monitoring image when it is determined according to the density index parameter and timestamp corresponding to each continuous road crossing monitoring image that the density index parameter corresponding to each continuous road crossing monitoring image continuously exceeds a set threshold parameter and the duration exceeds a set time length; The control execution unit is used to generate a corresponding traffic light duration adjustment instruction according to the adjustment level, and transmit the traffic light duration adjustment instruction cloud to the traffic light controller of the target section according to the section number, so that the traffic light controller adjusts the display duration of the traffic light of the target section according to the traffic light duration adjustment instruction.

[0016] In a third aspect, a smart city management system based on cloud computing and image recognition is provided, including: A memory for storing instructions; A processor is used to read the instructions stored in the memory and execute any one of the methods described in the first aspect according to the instructions.

[0017] Beneficial effects: The present invention collects continuous crossing monitoring images of the target section at the traffic intersection to perform target detection and extract the area of ​​interest to obtain a lane area image, and then performs pixel-by-pixel contrast, difference processing and enhancement processing on the lane area image and the corresponding area reference image to obtain an enhanced differential grayscale image, and then performs threshold segmentation and binarization processing on the enhanced differential grayscale image, and extracts the foreground area to calculate the density index parameter, and finally determines whether the target section has long-term congestion based on the density index parameter of the continuous crossing monitoring image, so as to send the corresponding traffic signal light duration adjustment instruction, adjust the duration of the traffic signal light at the traffic intersection, and realize effective smart city traffic diversion. The present invention can monitor the congestion situation of the corresponding section of the urban traffic intersection in real time through cloud computing and image detection processing, and perform intelligent duration adjustment of the intersection signal light according to the congestion situation, effectively adapt to the traffic diversion needs of the corresponding section, improve the smoothness and convenience of urban traffic, and realize efficient smart city management. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0019] Figure 1 This is a schematic diagram of the steps of the method in Example 1 of the present invention; Figure 2 This is a schematic diagram of the structure of the system in Example 2 of the present invention; Figure 3 Schematic diagram of the system structure in Example 3 of the present invention. DETAILED DESCRIPTION

[0020] It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention. The specific structures and functional details disclosed herein are only used to describe the exemplary embodiments of the present invention. However, the present invention can be embodied in many alternative forms, and it should not be understood that the present invention is limited to the embodiments set forth herein.

[0021] It should be understood that, unless otherwise clearly specified and limited, the term "connection" should be understood in a broad sense, for example, it can be a fixed connection, an electrical connection, a direct connection, an indirect connection through an intermediate medium, or a connection between two components. For ordinary technicians in this field, the specific meanings of the above terms in the embodiments can be understood according to specific circumstances.

[0022] In the following description, certain details are provided to facilitate a complete understanding of the example embodiments. However, it will be appreciated by those of ordinary skill in the art that the example embodiments may be implemented without these certain details. For example, devices may be shown in block diagrams to avoid obscuring the examples with unnecessary details. In other embodiments, well-known processes, structures, and techniques may not be shown in unnecessary detail to avoid obscuring the embodiments.

[0023] Embodiment 1: This embodiment provides a smart city management method based on cloud computing and image recognition, which can be applied to a corresponding cloud server. The cloud server establishes a cloud connection with image monitors and traffic light controllers at various intersections in the smart city. Figure 1 As shown, the method comprises the following steps: S1. Obtain continuous intersection monitoring images for a target road section transmitted by a cloud image monitor at a traffic intersection, and extract corresponding timestamps and road section numbers from each intersection monitoring image, wherein the intersection monitoring images are marked with corresponding timestamps and road section numbers.

[0024] In specific implementation, image monitors can be installed at various traffic intersections in the city, and the image monitors can be used to monitor and shoot the traffic conditions at the corresponding road section intersections. In addition, target reference objects, such as indicator lines with special colors, cones or piers, can be set within the shooting section range of the image monitor to facilitate subsequent accurate target detection. Each target reference object encloses the main monitoring range of the corresponding road section intersection. The image monitor at the traffic intersection marks the time stamp and section number of the road section monitoring image of the captured target road section in real time, and then uploads it to the cloud server through cloud technology. The cloud server obtains the continuous road section monitoring images for the target road section transmitted by the image monitor cloud, and extracts the corresponding time stamp and section number from the road section monitoring image in real time.

[0025] S2. Target detection is performed on the road crossing monitoring image, a number of target reference objects in the road crossing monitoring image are determined, and corresponding reference points are determined based on each target reference object, and each reference point is used to divide a region of interest with a fixed resolution.

[0026] In the specific implementation, the cloud server inputs the road crossing monitoring image into the preset target detection network model to detect the target reference object, and obtains several boxes to select the bounding boxes corresponding to the target reference object. The target detection network model is obtained by the FasterR-CNN network model after training with the training set, and the training set contains several road crossing monitoring image samples marked with the bounding boxes of the target reference object. Then, the center pixel point of the bounding box is determined according to the bounding box of the target reference object, and the image area of ​​the set range is selected with the center pixel point of the bounding box as the center as the candidate area corresponding to the target reference object. Then, each pixel point in the candidate area corresponding to the target reference object is used as the reference point position of the corresponding target reference object, and the reference point position of each target reference object is used as the image vertex, and several regional intercepted images are traversed and divided. If a certain image vertex of the regional intercepted image is the center pixel point of the bounding box, the image vertex is used as the reference vertex of the regional intercepted image. Finally, one with an image resolution that meets the fixed resolution condition and contains the largest number of reference vertices is selected from each regional intercepted image as the region of interest.

[0027] S3. Segment the region of interest from the crossing monitoring image as a lane region image, and retrieve the corresponding region reference image from the cloud database according to the timestamp and section number of the crossing monitoring image.

[0028] In specific implementation, the cloud server segments the region of interest from the crossing monitoring image as the lane region image. At the same time, the corresponding region reference image set is retrieved from the cloud database according to the road section number of the crossing monitoring image. The cloud database pre-stores several region reference image sets, and each region reference image set is associated with the corresponding road section number. The corresponding monitoring period is determined according to the timestamp of the crossing monitoring image, and the corresponding region reference image is selected from the region reference image set according to the monitoring period. Each region reference image in the region reference image set is associated with the corresponding monitoring period.

[0029] S4. Compare the lane area image and the regional reference image pixel by pixel, calculate the reference grayscale value of each pixel point using the brightness value of the lane area image and the regional reference image at each pixel point, and construct an initial differential grayscale image based on the reference grayscale value of each pixel point.

[0030] In specific implementation, the cloud server first determines the RGB three-color channel brightness value of each pixel in the lane area image, and the RGB three-color channel brightness value of each pixel in the area reference image; Then, the RGB three-color channel brightness values ​​of each pixel in the lane area image and the RGB three-color channel brightness values ​​of each pixel in the regional reference image are substituted into the preset reference gray value calculation model for calculation to obtain the reference gray value of each pixel. The reference gray value calculation model is:

[0031] Among them, i is the pixel number, H i is the reference gray value corresponding to pixel i, R1 i 、G1 i and B1 i is the RGB three-color channel brightness value of pixel i in the lane area image, R2 i , G2 i and B2 i is the RGB color channel brightness value of pixel i in the regional reference image, α, β and δ are the weight coefficients of the RGB color channel brightness values, max ( ) is the maximum value operator.

[0032] S5. Use a sliding window to select a window area centered on each pixel and containing several pixels in the initial differential grayscale image, and calculate the final grayscale value of the central pixel based on the reference grayscale value of each pixel in the window area.

[0033] In a specific implementation, the cloud server may use a 3×3 pixel sliding window to select a window area centered on each pixel and containing a number of pixels in the initial differential grayscale image, and determine the reference grayscale value of each pixel in the window area; then use the reference grayscale value of each pixel in the window area to construct a 3×3 reference grayscale value matrix; finally, multiply the reference grayscale value matrix with a preset 3×3 enhancement matrix to obtain the final grayscale value of the central pixel in the window area. For example, the 3×3 enhancement matrix is

[0034] S6. construct an enhanced differential grayscale image according to the final grayscale value of each pixel, and perform threshold segmentation and binarization processing on the enhanced differential grayscale image based on the set grayscale threshold to obtain a regional binary image.

[0035] In the specific implementation, the cloud server uses the final grayscale value of each pixel to construct an enhanced differential grayscale image, and then substitutes the final grayscale value of each pixel in the enhanced differential grayscale image into a preset threshold segmentation formula for threshold segmentation and binarization processing to obtain the binarized grayscale value of each pixel. The threshold segmentation formula is:

[0036] Among them, i represents the pixel number, I i Represents the binary grayscale value corresponding to pixel i, Z i Represents the final grayscale value corresponding to pixel i, X is the set grayscale threshold. Then use the binary grayscale value of each pixel to construct a regional binary image.

[0037] S7. extracting the foreground area of ​​the specified grayscale from the regional binary image, and calculating the area ratio of all foreground areas in the regional binary image, and using the area ratio as a density index parameter of the corresponding crossing monitoring image.

[0038] In specific implementation, the cloud server extracts the pixels with a binary grayscale value of 255 (i.e. white) in the regional binary image to form the corresponding foreground area (white area), divides the image area of ​​all foreground areas by the image area of ​​the regional binary image, and obtains the corresponding area ratio, which is used as the density indicator parameter of the corresponding crossing monitoring image.

[0039] S8. When it is determined based on the density index parameters and timestamps corresponding to each continuous road crossing monitoring image that the density index parameters corresponding to each continuous road crossing monitoring image continuously exceed the set threshold parameters and the duration exceeds the set time length, the adjustment level is determined based on the density index parameters corresponding to each continuous road crossing monitoring image.

[0040] In specific implementation, the cloud server determines whether there is a long-term congestion at the intersection of the target section based on the density index parameters and timestamps corresponding to each continuous intersection monitoring image of the target section. If the density index parameters corresponding to each continuous intersection monitoring image continuously exceed the set threshold parameter and exceed the set time, it indicates that there is a long-term congestion at the intersection of the target section. At this time, the cloud server extracts the maximum density index parameter from the density index parameters corresponding to each continuous intersection monitoring image, and imports the maximum density index parameter into a preset adjustment level table for matching to determine the corresponding adjustment level. The adjustment level table contains several adjustment levels, and each adjustment level is associated with a corresponding density index parameter interval.

[0041] S9. Generate a corresponding traffic light duration adjustment instruction according to the adjustment level, and transmit the traffic light duration adjustment instruction cloud to the traffic light controller of the target section according to the section number, so that the traffic light controller adjusts the display duration of the traffic light of the target section according to the traffic light duration adjustment instruction.

[0042] In specific implementation, after determining the adjustment level, the cloud server generates a corresponding traffic light duration adjustment instruction according to the adjustment level, and transmits the traffic light duration adjustment instruction to the traffic light controller of the target section according to the section number, so that the traffic light controller adjusts the display duration of the traffic light of the target section according to the traffic light duration adjustment instruction.

[0043] The method of this embodiment monitors the congestion situation of corresponding sections of urban traffic intersections in real time through cloud computing and image detection processing, and intelligently adjusts the duration of traffic lights at intersections according to the congestion situation, effectively adapts to the traffic diversion needs of corresponding sections, improves the smoothness and convenience of urban traffic, and realizes efficient smart city management.

[0044] Embodiment 2: This embodiment provides a smart city management system based on cloud computing and image recognition, such as Figure 2 As shown, it includes an image acquisition unit, a target detection unit, a segmentation and retrieval unit, an image difference unit, a difference enhancement unit, a threshold segmentation unit, an index calculation unit, a level determination unit and a control execution unit, wherein: An image acquisition unit, used to acquire continuous road crossing monitoring images for a target road section transmitted by a cloud image monitor at a traffic intersection, and extract corresponding timestamps and road section numbers from each road crossing monitoring image, wherein the road crossing monitoring images are marked with corresponding timestamps and road section numbers; The target detection unit is used to perform target detection on the crossing monitoring image, determine a number of target reference objects in the crossing monitoring image, determine a corresponding reference point based on each target reference object, and use each reference point to divide a region of interest with a fixed resolution; A segmentation and retrieval unit is used to segment the region of interest from the crossing monitoring image as a lane region image, and retrieve the corresponding region reference image from the cloud database according to the timestamp and section number of the crossing monitoring image; An image difference unit is used to compare the lane area image and the regional reference image pixel by pixel, calculate the reference gray value of each pixel point using the brightness value of each pixel point of the lane area image and the regional reference image, and construct an initial differential gray image according to the reference gray value of each pixel point; A differential enhancement unit, used to select a window area centered on each pixel and including a number of pixels in the initial differential grayscale image using a sliding window, and calculate a final grayscale value of the central pixel based on the reference grayscale value of each pixel in the window area; A threshold segmentation unit is used to construct an enhanced differential grayscale image according to the final grayscale value of each pixel point, and perform threshold segmentation and binarization processing on the enhanced differential grayscale image based on a set grayscale threshold to obtain a regional binary image; An index calculation unit is used to extract a foreground area of ​​a specified grayscale from the regional binary image, and calculate the area ratio of all foreground areas in the regional binary image, and use the area ratio as a density index parameter of the corresponding crossing monitoring image; A level determination unit, for determining an adjustment level according to the density index parameter corresponding to each continuous road crossing monitoring image when it is determined according to the density index parameter and timestamp corresponding to each continuous road crossing monitoring image that the density index parameter corresponding to each continuous road crossing monitoring image continuously exceeds a set threshold parameter and the duration exceeds a set time length; The control execution unit is used to generate a corresponding traffic light duration adjustment instruction according to the adjustment level, and transmit the traffic light duration adjustment instruction cloud to the traffic light controller of the target section according to the section number, so that the traffic light controller adjusts the display duration of the traffic light of the target section according to the traffic light duration adjustment instruction.

[0045] Embodiment 3: This embodiment provides a smart city management system based on cloud computing and image recognition, such as Figure 3 As shown, including: Data interface, used to establish data connection between the processor and the image monitors and traffic light controllers at each intersection of the smart city; A memory for storing instructions; A processor is used to read the instructions stored in the memory and execute the smart city management method based on cloud computing and image recognition in Example 1 according to the instructions.

[0046] Optionally, the system further includes an internal bus, through which the processor, the memory and the data interface can be interconnected, and the internal bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0047] The memory may include, but is not limited to, random access memory (RAM), read only memory (ROM), flash memory, first input first output (FIFO) and / or first in last out (FILO), etc. The processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0048] Embodiment 4: This embodiment provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed on a computer, the computer executes the smart city management method based on cloud computing and image recognition in Embodiment 1. The computer-readable storage medium refers to a carrier for storing data, which may include but is not limited to a floppy disk, an optical disk, a hard disk, a flash memory, a USB flash drive, and / or a memory stick, etc. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0049] This embodiment also provides a computer program product, which, when running on a computer, executes the smart city management method based on cloud computing and image recognition in Embodiment 1. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0050] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A smart city management method based on cloud computing and image recognition, characterized in that: include: Obtaining continuous intersection monitoring images for a target road section transmitted by a cloud image monitor at a traffic intersection, and extracting corresponding timestamps and road section numbers from each intersection monitoring image, wherein the intersection monitoring images are marked with corresponding timestamps and road section numbers; Perform target detection on the crossing monitoring image, determine several target reference objects in the crossing monitoring image, determine the corresponding reference points based on each target reference object, and use each reference point to divide the region of interest with a fixed resolution; Segment the region of interest from the crossing monitoring image as a lane region image, and retrieve the corresponding region reference image from the cloud database according to the timestamp and section number of the crossing monitoring image; Compare the lane area image and the regional reference image pixel by pixel, calculate the reference grayscale value of each pixel using the brightness value of each pixel in the lane area image and the regional reference image, and construct an initial differential grayscale image based on the reference grayscale value of each pixel; A sliding window is used to select a window area centered on each pixel and containing a number of pixels in the initial differential grayscale image, and a final grayscale value of the central pixel is calculated based on the reference grayscale value of each pixel in the window area; An enhanced differential grayscale image is constructed according to the final grayscale value of each pixel, and the enhanced differential grayscale image is subjected to threshold segmentation and binarization based on a set grayscale threshold to obtain a regional binary image; Extract the foreground area of ​​the specified grayscale from the regional binary image, calculate the area ratio of all foreground areas in the regional binary image, and use the area ratio as the density index parameter of the corresponding crossing monitoring image; When it is determined according to the density index parameters and timestamps corresponding to the continuous road crossing monitoring images that the density index parameters corresponding to the continuous road crossing monitoring images continuously exceed the set threshold parameters and the duration exceeds the set time length, the adjustment level is determined according to the density index parameters corresponding to the continuous road crossing monitoring images; The corresponding traffic light duration adjustment instruction is generated according to the adjustment level, and the traffic light duration adjustment instruction is cloud-transmitted to the traffic light controller of the target section according to the section number, so that the traffic light controller adjusts the display duration of the traffic light of the target section according to the traffic light duration adjustment instruction.

2. According to claim 1, a smart city management method based on cloud computing and image recognition is characterized in that: The target detection is performed on the crossing monitoring image, a plurality of target reference objects in the crossing monitoring image are determined, a corresponding reference point is determined based on each target reference object, and a region of interest with a fixed resolution is divided using each reference point, including: Input the road crossing monitoring image into a preset target detection network model to detect the target reference object, and obtain a plurality of boxes to select the bounding boxes corresponding to the target reference object, wherein the target detection network model is obtained by training the Faster R-CNN network model with a training set, and the training set includes a plurality of road crossing monitoring image samples marked with the bounding boxes of the target reference object; Determine the center pixel of the bounding box according to the bounding box of the target reference object, and select an image area of ​​a set range with the center pixel of the bounding box as the center as the candidate area corresponding to the target reference object; Each pixel point in the candidate area corresponding to the target reference object is used as the reference point of the corresponding target reference object, and the reference point of each target reference object is used as the image vertex, and several regional intercepted images are traversed and divided. If a certain image vertex of the regional intercepted image is the central pixel point of the bounding box, the image vertex is used as the reference vertex of the regional intercepted image; From the images captured in each region, the one whose image resolution meets the fixed resolution condition and contains the largest number of reference vertices is selected as the region of interest.

3. According to claim 1, a smart city management method based on cloud computing and image recognition is characterized in that: The method of retrieving the corresponding regional reference image from the cloud database according to the timestamp and the road section number of the road crossing monitoring image includes: Retrieving a corresponding regional reference image set from a cloud database according to the road section number of the crossing monitoring image, wherein a plurality of regional reference image sets are pre-stored in the cloud database, and each regional reference image set is associated with a corresponding road section number; The corresponding monitoring period is determined according to the timestamp of the crossing monitoring image, and the corresponding regional reference image is selected from the regional reference image set according to the monitoring period, and each regional reference image in the regional reference image set is associated with the corresponding monitoring period.

4. The smart city management method based on cloud computing and image recognition according to claim 1 is characterized in that: The pixel-by-pixel comparison of the lane area image and the regional reference image, and calculation of the reference grayscale value of each pixel position using the brightness value of each pixel position of the lane area image and the regional reference image, include: Determine the RGB three-color channel brightness value of each pixel in the lane area image and the RGB three-color channel brightness value of each pixel in the area reference image; Substitute the RGB three-color channel brightness value of each pixel in the lane area image and the RGB three-color channel brightness value of each pixel in the area reference image into the preset reference gray value calculation model for calculation to obtain the reference gray value of each pixel. The reference gray value calculation model is: Among them, i is the pixel number, H i is the reference gray value corresponding to pixel i, R1 i 、G1 i and B1 i is the RGB three-color channel brightness value of pixel i in the lane area image, R2 i , G2 i and B2 i is the RGB color channel brightness value of pixel i in the regional reference image, α, β and δ are the weight coefficients of the RGB color channel brightness values, max ( ) is the maximum value operator.

5. The smart city management method based on cloud computing and image recognition according to claim 1 is characterized in that: The method of using a sliding window to select a window area centered on each pixel and including a plurality of pixels in the initial differential grayscale image, and calculating a final grayscale value of the central pixel based on the reference grayscale value of each pixel in the window area, includes: A 3×3 pixel sliding window is used to select a window area centered on each pixel point and including a number of pixels in the initial differential grayscale image, and a reference grayscale value of each pixel point in the window area is determined; A 3×3 reference gray value matrix is ​​constructed using the reference gray value of each pixel in the window area; The reference gray value matrix is ​​multiplied by the preset 3×3 enhancement matrix to obtain the final gray value of the central pixel of the window area. The 3×3 enhancement matrix is 6. The smart city management method based on cloud computing and image recognition according to claim 1 is characterized in that: The enhanced differential grayscale image is subjected to threshold segmentation and binarization processing based on the set grayscale threshold to obtain a regional binary image, including: Substitute the final grayscale value of each pixel in the enhanced differential grayscale image into the preset threshold segmentation formula for threshold segmentation and binarization to obtain the binarized grayscale value of each pixel. The threshold segmentation formula is: Among them, i represents the pixel number, I i Represents the binary grayscale value corresponding to pixel i, Z i Represents the final grayscale value corresponding to pixel i, X is the set grayscale threshold; A regional binary image is constructed based on the binary grayscale value of each pixel.

7. A smart city management method based on cloud computing and image recognition according to claim 6, characterized in that: The extracting of the foreground area of ​​the regional binary image with a specified grayscale and calculating the area ratio of all the foreground areas in the regional binary image include: Pixels with a binary grayscale value of 255 in the regional binary image are extracted to form the corresponding foreground area. The image area of ​​all foreground areas is divided by the image area of ​​the regional binary image to obtain the corresponding area ratio.

8. The smart city management method based on cloud computing and image recognition according to claim 1 is characterized in that: Determining the adjustment level according to the density index parameters corresponding to each continuous crossing monitoring image includes: The maximum density index parameter is extracted from the density index parameters corresponding to each continuous crossing monitoring image, and the maximum density index parameter is imported into a preset adjustment level table for matching to determine the corresponding adjustment level. The adjustment level table contains several adjustment levels, and each adjustment level is associated with a corresponding density index parameter interval.

9. A smart city management system based on cloud computing and image recognition, characterized in that: It includes an image acquisition unit, a target detection unit, a segmentation and retrieval unit, an image difference unit, a difference enhancement unit, a threshold segmentation unit, an index calculation unit, a level determination unit and a control execution unit, wherein: An image acquisition unit, used to acquire continuous road crossing monitoring images for a target road section transmitted by a cloud image monitor at a traffic intersection, and extract corresponding timestamps and road section numbers from each road crossing monitoring image, wherein the road crossing monitoring images are marked with corresponding timestamps and road section numbers; The target detection unit is used to perform target detection on the crossing monitoring image, determine a number of target reference objects in the crossing monitoring image, determine a corresponding reference point based on each target reference object, and use each reference point to divide a region of interest with a fixed resolution; A segmentation and retrieval unit is used to segment the region of interest from the crossing monitoring image as a lane region image, and retrieve the corresponding region reference image from the cloud database according to the timestamp and section number of the crossing monitoring image; An image difference unit is used to compare the lane area image and the regional reference image pixel by pixel, calculate the reference gray value of each pixel point using the brightness value of each pixel point of the lane area image and the regional reference image, and construct an initial differential gray image according to the reference gray value of each pixel point; A differential enhancement unit, used to select a window area centered on each pixel and including a number of pixels in the initial differential grayscale image using a sliding window, and calculate a final grayscale value of the central pixel based on the reference grayscale value of each pixel in the window area; A threshold segmentation unit is used to construct an enhanced differential grayscale image according to the final grayscale value of each pixel point, and perform threshold segmentation and binarization processing on the enhanced differential grayscale image based on a set grayscale threshold to obtain a regional binary image; An index calculation unit is used to extract a foreground area of ​​a specified grayscale from the regional binary image, and calculate the area ratio of all foreground areas in the regional binary image, and use the area ratio as a density index parameter of the corresponding crossing monitoring image; A level determination unit, for determining an adjustment level according to the density index parameter corresponding to each continuous road crossing monitoring image when it is determined according to the density index parameter and timestamp corresponding to each continuous road crossing monitoring image that the density index parameter corresponding to each continuous road crossing monitoring image continuously exceeds a set threshold parameter and the duration exceeds a set time length; The control execution unit is used to generate a corresponding traffic light duration adjustment instruction according to the adjustment level, and transmit the traffic light duration adjustment instruction cloud to the traffic light controller of the target section according to the section number, so that the traffic light controller adjusts the display duration of the traffic light of the target section according to the traffic light duration adjustment instruction.

10. A smart city management system based on cloud computing and image recognition, characterized in that: include: A memory for storing instructions; A processor is used to read the instructions stored in the memory and execute the smart city management method described in any one of claims 1-8 according to the instructions.