Vehicle flow detection method, device, storage medium and detector
The camera obtains the brightness information of each pixel in the monitoring section and compares it with the reference brightness, which solves the problem of poor real-time performance of existing vehicle flow detection methods and achieves more efficient vehicle passing detection.
Patent Information
- Application Number
- CN202310028410.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-09
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2043-01-09
AI Technical Summary
The existing vehicle flow detection methods have problems that real-time performance is difficult to ensure, especially the ground-sensitive coils require frequent maintenance and the camera image acquisition and calculation amount.
The current brightness information of each pixel in the monitoring section is obtained through the camera, compared with the reference brightness information, and used the brightness information to compare and analyze it to determine the passing situation of the vehicle, reduce the calculation amount, and improve real-time performance.
Real-time improvement of vehicle flow detection, reduce the amount of calculation, and avoid the problems of frequent road damage and maintenance in traditional methods.
Smart Images

Figure CN115938127B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent transportation technology, and in particular to a vehicle flow detection method, device, storage medium and detector. Background Art
[0002] Traffic flow detection refers to the detection and statistics of vehicles passing through a road section. At present, the two methods of vehicle flow detection are generally used: camera image acquisition combined with computer image recognition, or ground sensor coil detection.
[0003] For example, the ground sensor coil is installed under the road surface. When a vehicle passes through the coil, the iron structure of the vehicle will cause the inductance of the coil to change, and the corresponding circuit converts the change in inductance into the result of the vehicle passing. In the method of combining camera image acquisition with computer image recognition, the camera is first installed above the road surface (for example, on a gantry), and then the camera is used to capture the video of the vehicle passing in the monitored section, and the video is transmitted to the computer. The computer uses the corresponding algorithm to identify the video and obtain the result of the vehicle passing in the monitored section.
[0004] However, when installing the ground sensor coil, the road surface needs to be cut to bury the coil, which will damage the road surface. After that, the road surface and the coil need to be regularly refurbished and maintained. The camera image acquisition combined with computer image recognition has a large amount of calculation, making it difficult to ensure the real-time performance of vehicle flow detection. Therefore, it is urgent to optimize the detection method of vehicle flow detection. Summary of the invention
[0005] Based on this, it is necessary to provide a vehicle flow detection method, device, storage medium and detector that can improve the real-time performance of vehicle flow detection in response to the above technical problems.
[0006] In a first aspect, the present application provides a vehicle flow detection method, the method comprising:
[0007] Get the current brightness information of each pixel in the camera when the camera is shooting the monitored road section;
[0008] Compare the current brightness information of each pixel with the reference brightness information to obtain a comparison result; wherein the reference brightness information represents the road surface brightness information of the monitored road section;
[0009] Based on the comparison results, the traffic volume within the monitored section is determined.
[0010] In one embodiment, determining the traffic volume in the monitored road section according to the comparison result includes:
[0011] According to the comparison result, determining the target pixel whose current brightness information is changed compared with the reference brightness information among the pixels of the camera;
[0012] According to the number of target pixels, the number of vehicles passing through the monitored road section is determined.
[0013] In one embodiment, comparing the current brightness information of each pixel with the reference brightness information includes:
[0014] Converting current brightness information of each pixel into first voltage information of each pixel;
[0015] Converting reference brightness information into second voltage information;
[0016] The first voltage information is compared with the second voltage information to obtain a comparison result.
[0017] In one of the embodiments, the camera includes an optical lens and a linear array sensor; pixels in the linear array sensor are arranged in columns, and the array direction is perpendicular to the driving direction of the vehicle in the monitored road section.
[0018] In one embodiment, comparing the first voltage information with the second voltage information to obtain a comparison result includes:
[0019] The first voltage information is amplified, and the amplified first voltage information is compared with the second voltage information to obtain a comparison result.
[0020] In a second aspect, the present application also provides a vehicle flow detection device, the device comprising:
[0021] The acquisition module is used to obtain the current brightness information of each pixel in the camera when the camera shoots the monitored road section;
[0022] The comparison module is used to compare the current brightness information of each pixel with the reference brightness information to obtain a comparison result; wherein the reference brightness information represents the road surface brightness information of the monitored road section
[0023] The detection module is used to determine the traffic volume in the monitored road section based on the comparison result.
[0024] In a third aspect, the present application further provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:
[0025] Get the current brightness information of each pixel in the camera when the camera is shooting the monitored road section;
[0026] Compare the current brightness information of each pixel with the reference brightness information to obtain a comparison result; wherein the reference brightness information represents the road surface brightness information of the monitored road section;
[0027] Based on the comparison results, the traffic volume within the monitored section is determined.
[0028] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0029] Get the current brightness information of each pixel in the camera when the camera is shooting the monitored road section;
[0030] Compare the current brightness information of each pixel with the reference brightness information to obtain a comparison result; wherein the reference brightness information represents the road surface brightness information of the monitored road section;
[0031] Based on the comparison results, the traffic volume within the monitored section is determined.
[0032] In a fifth aspect, the present application further provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0033] Get the current brightness information of each pixel in the camera when the camera is shooting the monitored road section;
[0034] Compare the current brightness information of each pixel with the reference brightness information to obtain a comparison result; wherein the reference brightness information represents the road surface brightness information of the monitored road section;
[0035] Based on the comparison results, the traffic volume within the monitored section is determined.
[0036] The above-mentioned vehicle flow detection method, device, storage medium and detector use a camera to shoot the monitored section, but there is no need to form a monitoring image corresponding to the monitored section through the camera. For any pixel, only the current brightness information of the pixel and the reference brightness information can be used to determine whether there are other photographed objects other than the monitored section in the monitoring area corresponding to the pixel point; further, according to the comparison results corresponding to each pixel point, the passing of vehicles in the monitored section can be determined. The present application only uses brightness information for comparative analysis to determine the passing of vehicles, which reduces the amount of calculation compared to traditional technologies and improves the real-time performance of vehicle flow detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A diagram showing an application environment of a vehicle flow detection method in an embodiment;
[0038] Figure 2 A schematic diagram of a flow chart of a vehicle flow detection method in one embodiment;
[0039] Figure 3 A schematic diagram of a process for determining the number of vehicles in one embodiment;
[0040] Figure 4 is a structural block diagram of a vehicle flow detection device in one embodiment;
[0041] Figure 5 is an internal structure diagram of a computer device in one embodiment;
[0042] Figure 6 FIG. 4 is a circuit diagram of a detector in one embodiment. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0044] The vehicle flow detection method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the camera 102 communicates with the computer device 104 through a network, and the computer device 104 can be a controller, a server or a terminal.
[0045] In one embodiment, Figure 2 As shown, the vehicle flow detection method may specifically include the following steps:
[0046] S201, obtaining current brightness information of each pixel in the camera when the camera is shooting a monitored road section.
[0047] The camera is installed above the monitored section and is used to take pictures of the monitored section and the vehicles on the monitored section.
[0048] It can be understood that the camera is equipped with an image sensor, and the image sensor has an array of multiple pixels for receiving light reflected by the subject. The image sensor can convert the incident light signal captured by the lens (i.e., the light reflected by the subject) into a corresponding charge signal, and then convert the corresponding charge signal into a voltage or current signal, and finally output the converted electrical signal, which can be used to represent the current brightness information of the pixel.
[0049] S202, comparing the current brightness information of each pixel with the reference brightness information to obtain a comparison result.
[0050] The reference brightness information represents the road surface brightness information of the monitored road section; and the comparison result is used to represent the difference between the current brightness information and the reference brightness information.
[0051] It is understandable that if no vehicle passes through the monitored section, each pixel in the camera is only used to receive the light reflected by the road surface (or other fixed background) of the monitored section; if a vehicle passes through the monitored section, a part of each pixel in the camera is used to receive the light reflected by the road surface (or other fixed background) of the monitored section, and another part is used to receive the light reflected by the vehicle. Since the brightness of the vehicle body is inconsistent with the brightness of the road surface, the vehicle passing situation in the monitored section can be characterized by the comparison result.
[0052] Specifically, for any pixel, the current brightness information of the pixel is compared with the reference brightness information of the pixel; further, the comparison result can be used to determine the pixels whose current brightness information has changed compared to the reference brightness information, and the number of the changed pixels.
[0053] S203: Determine the traffic volume in the monitored road section according to the comparison result.
[0054] The traffic volume in the monitored section is: whether there are vehicles passing at the current shooting time and the current shooting position (in the monitored section), and the number of passing vehicles; specifically, the number of vehicles can be used to represent the traffic volume information.
[0055] Optionally, if the current brightness information of the corresponding pixel in the image sensor changes (changes to correspond to the brightness of the vehicle body), it indicates that the vehicle has passed, otherwise, it indicates that the position corresponding to the pixel point has not passed the vehicle. 5 Further, in order to avoid identifying other photographed objects as vehicles, it can be determined that a vehicle has passed only when the comparison result satisfies a difference condition, and the difference condition is: the difference between the current brightness information and the reference brightness information is a preset fixed value.
[0056] The above-mentioned vehicle flow detection method uses a camera to shoot the monitored section, but there is no need to form a monitoring image corresponding to the monitored section through the camera. For any pixel, only the current brightness information of the pixel and the reference 0 brightness information can be used to determine whether there are other photographed objects except the monitored section in the monitoring area corresponding to the pixel point; further, according to the comparison results corresponding to each pixel point, the passing of vehicles in the monitored section can be determined. The present application only uses brightness information for comparative analysis to determine the passing of vehicles, which reduces the amount of calculation and improves the real-time performance of vehicle flow detection.
[0057] 5. Figure 3 As shown, this embodiment provides an optional method for determining the traffic volume in the monitored road section according to the comparison result, that is, it provides a method for refining S203. The specific implementation process may include:
[0058] S301 , determining, according to the comparison result, a target pixel whose current brightness information is changed compared with a reference brightness information among the pixels of the camera.
[0059] Among them, the photographed object corresponding to the target pixel is determined to be a vehicle; if N target pixels are continuous, then the number of the N continuous target pixels can be used to represent one vehicle, or multiple vehicles.
[0060] Optionally, the camera includes an optical lens and a line array sensor; the optical lens is used to allow light (or at least a portion of the light) reflected from the object to be photographed to pass through and project onto each pixel in the image sensor.
[0061] It is understandable that according to the arrangement of each pixel in the image sensor chip, the image sensor can be divided into an area array image sensor and a linear array sensor. Among them, each pixel in the area array image sensor is arranged in a two-dimensional array, and each exposure can obtain a complete image.
[0062] The pixels in the image sensor are arranged in a linear array, and each exposure can only obtain one line of image information. Since the data processing capacity of the linear array sensor is less than that of the area array image sensor, in order to reduce the amount of calculation, a linear array sensor is used in this embodiment, and the pixels in the linear array sensor are arranged in columns, and the array direction is perpendicular to the driving direction of the vehicle in the monitored section.
[0063] In this embodiment, by setting the array direction of the pixels to be perpendicular to the driving direction of the vehicles in the monitored section, the vehicles passing through the monitored section can be monitored by the corresponding pixels in the linear array sensor, thereby ensuring the accuracy of vehicle flow detection. Furthermore, since the amount of image data output by the linear array sensor is significantly smaller than that of the area array image sensor, low-cost and low-power circuits and microcontrollers (MCUs) can also be used to replace computers (CPUs) for image data processing.
[0064] Furthermore, the line array sensor in this embodiment converts the incident light signal of the photographed object into a voltage signal, and the voltage signal is used to represent the current brightness information of the pixel.
[0065] Specifically, the current brightness information of each pixel is converted into the first voltage information of each pixel; the reference brightness information is converted into the second voltage information; the first voltage information is compared with the second voltage information to obtain a comparison result, which is used to characterize the position of the target pixel and the number of target pixels.
[0066] In order to ensure the accuracy of the comparison result, in one embodiment, the first voltage information is amplified, and the amplified first voltage information is compared with the second voltage information to obtain the comparison result.
[0067] S302: Determine the number of vehicles passing through the monitored road section according to the number of target pixels.
[0068] Among them, a plurality of continuous target pixels are taken as a pixel group, and the pixel group can be used to characterize at least one vehicle; specifically, the number of vehicles can be determined by dividing the number of pixels in the pixel group by the preset number of pixels corresponding to the vehicle.
[0069] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0070] Based on the same inventive concept, the embodiment of the present application also provides a vehicle flow detection device for implementing the vehicle flow detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more vehicle flow detection device embodiments provided below can refer to the limitations of the vehicle flow detection method above, and will not be repeated here.
[0071] In one embodiment, Figure 4 As shown, a vehicle flow detection device 1 is provided, comprising: an acquisition module 11, a comparison module 12 and a detection module 13, wherein:
[0072] The acquisition module 11 is used to obtain the current brightness information of each pixel in the camera when the camera shoots the monitored road section;
[0073] The comparison module 12 is used to compare the current brightness information of each pixel with the reference brightness information to obtain a comparison result; wherein the reference brightness information represents the road surface brightness information of the monitored road section.
[0074] The detection module 13 is used to determine the traffic volume in the monitored road section according to the comparison result.
[0075] In one embodiment, the detection module 13 is further used to: determine the target pixels whose current brightness information is changed compared with the reference brightness information in each pixel of the camera according to the comparison result; and determine the number of vehicles passing through the monitored section according to the number of target pixels.
[0076] In one embodiment, the comparison module 12 includes:
[0077] A conversion submodule, used to convert the current brightness information of each pixel into the first voltage information of each pixel; and convert the reference brightness information into the second voltage information;
[0078] The comparison submodule is used to compare the first voltage information with the second voltage information to obtain a comparison result.
[0079] In one embodiment, the camera includes an optical lens and a linear array sensor; pixels in the linear array sensor are arranged in columns, and the array direction is perpendicular to the driving direction of the vehicle in the monitored road section.
[0080] In one embodiment, the comparison submodule is further used to: amplify the first voltage information, and compare the amplified first voltage information with the second voltage information to obtain a comparison result.
[0081] Each module in the above-mentioned vehicle flow detection device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0082] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a vehicle flow detection method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0083] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0084] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0085] Get the current brightness information of each pixel in the camera when the camera is shooting the monitored road section;
[0086] Compare the current brightness information of each pixel with the reference brightness information to obtain a comparison result; wherein the reference brightness information represents the road surface brightness information of the monitored road section;
[0087] Based on the comparison results, the traffic volume within the monitored section is determined.
[0088] In one embodiment, when the processor executes a computer program to determine the logic of vehicle flow in a monitored section based on comparison results, the following steps are specifically implemented: based on the comparison results, the target pixels in each pixel of the camera whose current brightness information changes compared to the reference brightness information are determined; based on the number of target pixels, the number of vehicles passing through the monitored section is determined.
[0089] In one embodiment, when the processor executes the logic of the computer program to compare the current brightness information of each pixel with the reference brightness information, the following steps are specifically implemented: converting the current brightness information of each pixel into the first voltage information of each pixel; converting the reference brightness information into the second voltage information; comparing the first voltage information with the second voltage information to obtain a comparison result.
[0090] In one embodiment, the camera includes an optical lens and a linear array sensor; pixels in the linear array sensor are arranged in columns, and the array direction is perpendicular to the driving direction of the vehicle in the monitored road section.
[0091] In one embodiment, when the processor executes a computer program to compare the first voltage information with the second voltage information 5 and obtains the logic of the comparison result, the following steps are specifically implemented: amplifying the first voltage information, and comparing the amplified first voltage information with the second voltage information to obtain the comparison result.
[0092] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0093] 0 Get the current brightness information of each pixel in the camera when the camera is shooting the monitored road section;
[0094] Compare the current brightness information of each pixel with the reference brightness information to obtain a comparison result; wherein,
[0095] The reference brightness information represents the road surface brightness information of the monitored road section;
[0096] Based on the comparison results, the traffic volume within the monitored section is determined.
[0097] In one embodiment, when the computer program determines the traffic flow in the monitored road section according to the comparison result, the following steps are specifically implemented when the logic is executed by the processor: determining the pixels of the camera according to the comparison result.
[0098] The target pixels whose current brightness information changes compared to the reference brightness information are determined; and the number of vehicles passing through the monitored section is determined according to the number of target pixels.
[0099] In one embodiment, when the logic of comparing the current brightness information of each pixel with the reference brightness information is executed by the processor, the following steps are specifically implemented: converting the current brightness information 0 of each pixel into the first voltage information of each pixel; converting the reference brightness information into the second voltage information; converting the first
[0100] The voltage information is compared with the second voltage information to obtain a comparison result.
[0101] In one embodiment, the camera includes an optical lens and a linear array sensor; pixels in the linear array sensor are arranged in columns, and the array direction is perpendicular to the driving direction of the vehicle in the monitored road section.
[0102] In one embodiment, when the computer program compares the first voltage information with the second voltage information and the logic of obtaining the comparison result is executed by the processor, the following steps are specifically implemented: amplifying the first voltage information, and comparing the amplified first voltage information with the second voltage information to obtain the comparison result.
[0103] In one embodiment, a vehicle flow detector is provided, the vehicle flow detector comprising a camera, an amplifier and a processor, the camera comprising an optical lens and a linear array sensor; wherein,
[0104] An optical lens, used to project reflected light from the photographed object in the monitored road section onto each pixel of the linear array sensor;
[0105] Linear array sensor, used to output the current brightness information of each pixel according to the intensity of reflected light;
[0106] An operational amplifier, used to amplify the current brightness information of each pixel and transmit the amplified current brightness information to the processor;
[0107] The processor is used for comparing the current brightness information of each pixel with the reference brightness information to obtain a comparison result; according to the comparison result, the vehicle flow in the monitored section is determined; wherein the reference brightness information represents the road surface brightness information of the monitored section.
[0108] In one embodiment, the vehicle flow detector further includes a digital potentiometer, which is connected to the operational amplifier and is used to adjust the gain factor of the operational amplifier by changing the resistance value.
[0109] Among them, Figure 6 As shown, each pixel in the linear array sensor U3 receives reflected light, and the linear array sensor U3 outputs the current brightness information of each pixel according to the intensity of the reflected light; the first pin CLK of the linear array sensor U3 is connected to the processor U1 for receiving the M signal, and the eighth pin ST is connected to the processor U1 for receiving the ICG signal, and the M signal and the ICG signal are timing signals output by the processor U1 to the linear array sensor U3, so that the linear array sensor U3 transmits the voltage signal used by each pixel to represent the current brightness information to the processor U1 in sequence; the fifth pin VIDEO of the linear array sensor U3 is connected to the operational amplifier U2, and is used to transmit the voltage signal representing the brightness information to the operational amplifier U2 for amplification; further, the second pin VSS3, the third pin VSS2 and the seventh pin VSS1 of the linear array sensor U3 are all grounded, and the fourth pin EOS is left floating; the sixth pin VDD is connected to the power supply VCC (5V), the power supply VCC is connected to the capacitor C4, and the other end of the capacitor C4 is grounded.
[0110] Among them, the third pin IN+ of the operational amplifier U2 is connected to the fifth pin VIDEO of the linear array sensor U3, and is used to receive the voltage signal output by the linear array sensor U3, and the third pin IN+ is connected to the resistor R2, and the other end of the resistor R2 is grounded; further, a capacitor C2 is connected between the first pin OUT and the fourth pin IN- of the operational amplifier U2, and the first pin OUT is connected to the resistor R1, the other end of the resistor R1 is connected to the capacitor C3, the other end of the capacitor C3 is grounded, and the first pin OUT is used to output the amplified voltage signal; the second pin VEE of the operational amplifier U2 is grounded; the fourth pin IN- is connected to the digital potentiometer U4, the fifth pin VCC is connected to the power supply VCC (5V), and is connected to the capacitor C5, and the negative plate of the capacitor C5 is grounded.
[0111] Among them, the first pin nCS, the second pin SCK and the third pin SI of the digital potentiometer U4 are all connected to the processor U1, and are used to receive the control signal of the processor U1 to the digital potentiometer U4. The control signal adjusts the resistance value of the digital potentiometer U4 in English, and the gain coefficient (i.e., the amplification factor) of the operational amplifier U2 is adjusted by changing the resistance value of the digital potentiometer U4; the fourth pin VSS of the digital potentiometer U4 is grounded; the fifth pin PA is connected to the resistor R3, and the other end of the resistor R3 is grounded; the sixth pin PW is connected to the fourth pin IN- of the operational amplifier U2; the seventh pin PB is connected to the first pin OUT of the operational amplifier U2; the eighth pin VDD is the power supply VCC (5V).
[0112] Among them, the twentieth pin PA1 of the processor U1 is connected to the OUT end of the operational amplifier U2, and is used to receive the AO signal (that is, the amplified first voltage signal) output by the operational amplifier U2; the fifteenth pin PC0 of the processor U1 is used to output the MOSI signal, and the third pin SI of the digital potentiometer U4 is used to receive the MOSI signal; the sixteenth pin PC1 of the processor U1 is used to output the SCK signal, and the second pin SCK of the digital potentiometer U4 is used to receive the SCK signal; the eighteenth pin PC3 of the processor U1 is used to output the CS signal, and the first pin nCS of the digital potentiometer U4 is used to receive the CS signal. The MOSI signal, SCK signal and CS signal are the control signals of the above-mentioned processor U1 to the digital potentiometer U4.
[0113] Optionally, the tenth pin PB4 of the processor U1 is used to output an ICG signal, and the fourteenth pin PB0 is used to output an M signal, which is used to provide a timing signal for the linear sensor U3; the twelfth pin TOSC1 / PB4 of the processor U1 is used to output a TX signal, which is vehicle detection information and is used to characterize the passage of vehicles within the monitored section; the thirteenth pin PB1 of the processor U1 is used to output a TRIG signal, which is a trigger signal and is used to indicate the passage of a vehicle.
[0114] Furthermore, the fourth pin VDD of the processor U1 is connected to the power supply VCC (5V), the fourth pin VDD is connected to the capacitor C1, and the negative plate of the capacitor C1 is grounded; the third pin GND and the twenty-first pin EPAD are both grounded. The first pin PA2, the second pin PA3 / EXTCLK, the fifth pin PA4, the sixth pin PA5, the seventh pin PA6, the eighth pin PA7, the seventeenth pin PC2, the ninth pin PB5, the eleventh pin TOSC1 / PB3, and the nineteenth pin PA0 / inRST / UPDI of the processor U1 are all suspended.
[0115] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0116] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0117] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A vehicle flow detection method, characterized in that: The method comprises: Obtaining the current brightness information of each pixel in the camera when the camera is shooting the monitored road section; Converting current brightness information of each pixel into first voltage information of each pixel; Converting reference brightness information into second voltage information; Compare the first voltage information with the second voltage information to obtain a comparison result; wherein the reference brightness information represents the road surface brightness information of the monitored road section; The traffic volume in the monitored road section is determined according to the comparison result.
2. The method according to claim 1, characterized in that Determining the traffic volume in the monitored road section according to the comparison result includes: According to the comparison result, determining a target pixel whose current brightness information is changed compared with the reference brightness information among the pixels of the camera; The number of vehicles passing through the monitored road section is determined according to the number of target pixels.
3. The method according to claim 1, characterized in that The camera comprises an optical lens and a linear array sensor; pixels in the linear array sensor are arranged in columns, and the array direction is perpendicular to the driving direction of the vehicle in the monitored road section.
4. The method according to claim 1, characterized in that: The comparing the first voltage information with the second voltage information to obtain the comparison result includes: The first voltage information is amplified, and the amplified first voltage information is compared with the second voltage information to obtain the comparison result.
5. The method according to claim 3, characterized in that: The line array sensor performs image processing based on circuits and microcontrollers.
6. A vehicle flow detection device, characterized in that: The device comprises: An acquisition module, used to acquire current brightness information of each pixel in the camera when the camera is shooting a monitored road section; A comparison module is used to convert the current brightness information of each pixel into the first voltage information of each pixel; convert the reference brightness information into the second voltage information; compare the first voltage information with the second voltage information to obtain a comparison result; wherein the reference brightness information represents the road surface brightness information of the monitored road section The detection module is used to determine the traffic volume in the monitored road section according to the comparison result.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
9. A vehicle flow detector, characterized in that: The vehicle flow detector includes a camera, an operational amplifier and a processor, and the camera includes an optical lens and a linear array sensor; wherein, The optical lens is used to project the reflected light of the photographed object in the monitored road section onto each pixel of the linear array sensor; The linear array sensor is used to output current brightness information of each pixel according to the intensity of the reflected light; The operational amplifier is used to amplify the current brightness information of each pixel and transmit the amplified current brightness information to the processor; The processor is used to convert the current brightness information of each pixel into the first voltage information of each pixel; convert the reference brightness information into the second voltage information; compare the first voltage information with the second voltage information to obtain a comparison result; and determine the vehicle flow in the monitored section based on the comparison result; wherein the reference brightness information represents the road surface brightness information of the monitored section.
10. The vehicle flow detector according to claim 9, characterized in that: The vehicle flow detector also includes a digital potentiometer, which is connected to the operational amplifier and is used to adjust the gain coefficient of the operational amplifier by changing the resistance value.
Citation Information
Patent Citations
Vehicular traffic monitoring system
US5404306A