Electronic anti-occupation method and system based on image processing, and storage medium

Through image processing technology, the types of vehicles in charging spaces are distinguished and corresponding measures are taken to solve the problems of new energy vehicles occupying charging spaces for short charging and long parking, improving the charging experience and avoiding the safety hazards of physical anti-placement methods.

CN119131476APending Publication Date: 2024-12-13KAIFENG CITY GONGCHUANG ELEVATORING TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411173888.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing technology cannot effectively distinguish and manage the types of vehicles occupying charging spaces, resulting in problems such as short charging and long parking of charging spaces in new energy vehicles, and physical anti-occupation methods have safety hazards and easy damage.

Method used

Through the image processing technology of the first identification module and the second identification module, the types of vehicles occupying charging parking spaces are accurately distinguished as non-motor vehicles, fuel vehicles or new energy vehicles, and different anti-placement measures are taken according to the type, including playing alarm prompts Sound, send reminder messages, record placeholder time and calculate charging time.

Benefits of technology

It realizes scientific management of charging spaces, accurately distinguishes vehicle types, improves the charging experience of new energy vehicles, and avoids safety hazards and easy damage problems of physical anti-placement methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131476A_ABST
    Figure CN119131476A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of parking space occupation prevention, and discloses an electronic parking space occupation prevention method and system based on image processing, and a storage medium, and the method comprises the steps: S1, enabling a first recognition module to start the collection of a first image, and carrying out the first recognition; s2, under the condition that the first identification result is that the vehicle driven into the charging parking space is a non-motor vehicle, the first identification module informs an alarm module, and otherwise, the second identification module performs second identification based on a second image; s3, under the condition that the second identification result is that the vehicle driven into the charging parking space is the fuel vehicle, the second identification module informs an alarm module, and otherwise, the second identification module sends detection notification information to a charging module; and S4, under the condition that the first feedback message is that the new energy vehicle is not charged, the second identification module informs the alarm module, otherwise, the second identification module records the occupation time of the new energy vehicle and calculates the charging time of the new energy vehicle. According to the invention, the types of occupied vehicles can be accurately distinguished.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of parking space anti-occupancy, and in particular to an electronic parking space anti-occupancy method, system and storage medium based on image processing. Background Art

[0002] In recent years, with the explosive growth in the number of new energy vehicles, charging parking spaces have been occupied by fuel vehicles or non-motorized vehicles, and new energy vehicles occupying charging spaces for short charging and long parking have become increasingly prominent, greatly reducing the user experience of new energy vehicle owners. The anti-occupancy methods in the prior art are mostly physical occupying methods such as ground locks or barrier levers, which are not only easily damaged, but also pose safety hazards. Therefore, it is particularly important to propose an electronic anti-occupancy method for charging parking spaces.

[0003] The Chinese invention application with publication number CN117523911A provides a parking space anti-occupancy system, a parking space anti-occupancy method and a storage medium. The system includes: a camera module, a control module, a voice module, a networking module and a projection module; the method includes: when the camera module detects a vehicle entering a preset area, obtaining a target video of the preset area; determining vehicle information corresponding to the vehicle in the target video based on the camera module; judging whether the vehicle information meets the preset conditions based on the control module, if not, determining a projection instruction, a voice instruction and / or an alarm instruction based on the user instruction; and controlling the voice module to execute the voice instruction, controlling the projection module to execute the projection instruction, and / or controlling the networking module to send the alarm instruction to the target system. In addition, the Chinese invention application with publication number CN114694404A discloses a method for preventing electric vehicle parking spaces from being occupied and an electric vehicle parking space anti-occupancy device, the method comprising: determining whether the vehicle is an electric vehicle; if the vehicle is determined not to be an electric vehicle, sending a warning message to the vehicle; and if the vehicle is detected not to have left the parking space after the warning message is sent to the vehicle, performing at least one of the following penalty operations on the vehicle: transmitting the vehicle information to a database; applying a recognizable mark to the vehicle; and applying a marker that is not easily removed to the vehicle. The method may also be: detecting the residence time of the vehicle in the parking space; if the residence time exceeds the specified time, applying a recognizable mark to the vehicle; for vehicles that have been marked, using a public camera to collect a vehicle image of the vehicle; determining whether the vehicle is an electric vehicle based on the vehicle image; and if the vehicle is determined not to be an electric vehicle, transmitting the vehicle information to the database. However, none of the above invention applications can strictly distinguish the types of vehicles occupying charging parking spaces. Summary of the invention

[0004] This application performs a first identification through a first identification module and a second identification through a second identification module. According to the first identification result and the second identification result, it distinguishes whether the vehicle occupying the charging parking space is a non-motor vehicle, a fuel vehicle, or a new energy vehicle, and takes different measures for the occupying behavior of different types of vehicles.

[0005] The present application provides an electronic anti-occupancy method based on image processing, which mainly includes the following steps:

[0006] S1, the detection module continuously detects the charging parking space, and when a vehicle is detected to enter the charging parking space, sends a first notification message to the first recognition module, and the first recognition module starts to collect a first image after receiving the first notification message, and performs a first recognition on the type of the vehicle entering the charging parking space to generate a first recognition result, and the first recognition result includes information on whether the vehicle entering the charging parking space is a motor vehicle or a non-motor vehicle;

[0007] S2. When the first recognition result is that the vehicle entering the charging parking space is a non-motor vehicle, the first recognition module notifies the alarm module to play an alarm tone and sends a reminder message to the relevant contact. When the first recognition result is that the vehicle entering the charging parking space is a motor vehicle, the first recognition module sends a second notification message to the second recognition module, and the second recognition module obtains a second image after receiving the second notification message, and performs a second recognition on the type of the vehicle entering the charging parking space based on the obtained second image to generate a second recognition result, and the second recognition result includes information on whether the vehicle entering the charging parking space is a fuel vehicle or a new energy vehicle;

[0008] S3. When the second recognition result is that the vehicle entering the charging parking space is a fuel vehicle, the second recognition module notifies the alarm module to play an alarm tone, sends a reminder message to the relevant contact, and records the occupancy time of the fuel vehicle. When the second recognition result is that the vehicle entering the charging parking space is a new energy vehicle, the second recognition module sends a detection notification message to the charging module. After receiving the detection notification message, the charging module sends a first feedback message to the second recognition module. The first feedback message includes information on whether the new energy vehicle is being charged, and when it is being charged, it also includes the charging start time.

[0009] S4. When the first feedback message is that the new energy vehicle is not charging, the second identification module notifies the alarm module to play an alarm tone after the occupancy time of the new energy vehicle reaches a preset occupancy time threshold, and sends a reminder message to relevant contacts at the same time. When the first feedback message is that the new energy vehicle is charging, the second identification module records the occupancy time of the new energy vehicle and waits for the second feedback message sent by the charging module, the second feedback message includes the time when the new energy vehicle ends charging, and the second identification module calculates the charging time of the new energy vehicle.

[0010] As a preferred technical solution of the present application, the first recognition module collects the first image, further comprising the following steps:

[0011] S111, the first recognition module calculates, for the collected current first image, the difference between the element value of each image element in the current first image and the element value of the corresponding image element in the historical first image collected before the current first image;

[0012] S112. The first recognition module counts the total number of differences among different differences that are lower than a preset difference threshold. When the total number is greater than the preset total number threshold, the first recognition module records the current first image as the final first image and stops collecting the first image. When the total number is less than or equal to the preset total number threshold, the first recognition module collects a new first image and jumps to S111.

[0013] As a preferred technical solution of the present application, the first identification module performs a first identification on the type of the vehicle entering the charging parking space, including the following steps:

[0014] S121, the first recognition module performs contour extraction processing on the final first image to obtain a contour image, and the first recognition module continues to perform binarization processing on the contour image to obtain a binary image;

[0015] S122, the first recognition module calculates a difference image between the binary image and a reference binary image, where the reference binary image is a first image acquired before a time point at which the final first image is acquired and is separated from the final first image by a preset number of first images, and the first recognition module extracts different feature line segments in the left-right direction from the difference image, and counts the number of different feature line segments and the average distance values ​​of the different feature line segments;

[0016] S123, the first recognition module determines whether the average distance value is greater than a preset average distance value threshold value 1, and if so, determines that the type of the vehicle is a motor vehicle, otherwise, the first recognition module determines whether the average distance value is less than a preset average distance value threshold value 2, and if so, determines that the type of the vehicle is a non-motor vehicle, otherwise, proceeds to S124;

[0017] S124. The first recognition module determines whether the number is greater than a preset number threshold value one. If so, the type of the vehicle is determined to be a motor vehicle. Otherwise, the first recognition module determines whether the number is less than a preset number threshold value two. If so, the type of the vehicle is determined to be a non-motor vehicle. Otherwise, the first recognition is determined to have failed.

[0018] As a preferred technical solution of the present application, before S121, it also includes updating, for each image element in the final first image, the element value of the image element to the average value of the element values ​​of a preset number of image elements in the left and right ranges.

[0019] As a preferred technical solution of the present application, the second recognition module performs a second recognition on the type of the vehicle entering the charging parking space based on the acquired second image, including the following steps:

[0020] S21, the second recognition module performs license plate detection in the second image to obtain a license plate image, and the second recognition module performs binary processing on the license plate image to obtain a binary license plate image;

[0021] S22, the second recognition module determines in the binary license plate image a binary license plate image range corresponding to an object symbol string composed of a plurality of object symbols, the object symbols including Chinese characters, numbers, and letters, and the second recognition module divides each object symbol image range from the binary license plate image range;

[0022] S23, for each object symbol image range, the second recognition module divides the object symbol image range into a preset number of object symbol image sub-ranges, calculates a representative value of each object symbol image sub-range, and composes a representative vector of the object symbol image range with the representative value of each object symbol image sub-range, wherein the representative value is a ratio of the total number of image elements in the object symbol image sub-range whose image element values ​​are specific values ​​to the total number of all image elements in the object symbol image sub-range;

[0023] S24, for each object symbol image range, the second recognition module calculates the interval value between the representative vector of the object symbol image range and different reference vectors, and regards the reference object symbol corresponding to the interval value less than a preset interval value threshold as the recognition result of the object symbol image range;

[0024] S25. The second recognition module counts the total number of recognition results of the object symbol image range generated. When the total number is equal to the first value, the type of the vehicle is determined to be a fuel vehicle. When the total number is equal to the second value, the type of the vehicle is determined to be a new energy vehicle. In other cases, the second recognition is determined to have failed.

[0025] As a preferred technical solution of the present application, in the S24, when there are multiple reference object symbols corresponding to interval values ​​less than a preset interval value threshold, for each object symbol image sub-range in the object symbol image range, the object symbol image sub-range is further divided into a preset number of object symbol image secondary sub-ranges, a representative value of each object symbol image secondary sub-range is obtained, the representative value of each object symbol image secondary sub-range is combined into a representative vector of the object symbol image sub-range, and interval values ​​between representative vectors of different object symbol image sub-ranges and corresponding reference vectors of different reference object symbols are calculated, a weighted operation is performed on different interval values ​​of the same reference object symbol to obtain a comprehensive interval value, and the reference object symbol corresponding to the comprehensive interval value less than the preset comprehensive interval value threshold is used as the recognition result of the object symbol image range.

[0026] As a preferred technical solution of the present application, the second recognition module divides each object symbol image range from the binary license plate image range, including the following steps:

[0027] S221, the second recognition module detects different image element columns in sequence from left to right in the binary license plate image range, and records the minimum image element values ​​in the different image element columns in sequence to obtain a minimum image element value sequence;

[0028] S222, the second recognition module sequentially determines different subsequences in the minimum image element value sequence from left to right, where the subsequences are composed of a number of consecutive identical minimum image element values ​​in the minimum image element value sequence, and the color corresponding to the number of consecutive identical minimum image element values ​​is white;

[0029] S223. According to the determined order of the subsequences, for each subsequence, the second recognition module matches the subsequence with a number of image element columns in the binary license plate image range, and the second recognition module determines the length of the number of image element columns in the left and right directions, and divides the object symbol image range from the position corresponding to the middle length.

[0030] The present application also provides an electronic anti-occupancy system based on image processing, which mainly includes the following modules:

[0031] A detection module, configured to continuously detect the charging parking space, and send a first notification message to the first identification module when a vehicle is detected to enter the charging parking space;

[0032] A first recognition module, used to start collecting the first image after receiving the first notification information, and to perform a first recognition on the type of the vehicle entering the charging parking space according to the collected first images to generate a first recognition result, wherein the first recognition result includes information on whether the vehicle entering the charging parking space is a motor vehicle or a non-motor vehicle, and to notify the alarm module to play an alarm tone and send a reminder message to a relevant contact when the first recognition result is that the vehicle entering the charging parking space is a non-motor vehicle, and to send a second notification information to the second recognition module when the first recognition result is that the vehicle entering the charging parking space is a motor vehicle;

[0033] Alarm module, used to play alarm prompt sound;

[0034] a second identification module, configured to obtain a second image after receiving the second notification information, and to perform a second identification on the type of the vehicle entering the charging parking space based on the obtained second image to generate a second identification result, wherein the second identification result includes information on whether the vehicle entering the charging parking space is a fuel vehicle or a new energy vehicle, and to notify the alarm module to play an alarm prompt tone when the second identification result is that the vehicle entering the charging parking space is a fuel vehicle, and to send a reminder message to a relevant contact person, and to record the occupancy time of the fuel vehicle, and to send a detection notification message to the charging module when the second identification result is that the vehicle entering the charging parking space is a new energy vehicle, and to notify the alarm module to play an alarm prompt tone when the occupancy time of the new energy vehicle reaches a preset occupancy time threshold when the first feedback message is that the new energy vehicle is not charging, and to send a reminder message to a relevant contact person, and to record the occupancy time of the new energy vehicle when the first feedback message is that the new energy vehicle is charging, and to wait for a second feedback message sent by the charging module, wherein the second feedback message includes the time when the new energy vehicle ends charging, and the second identification module calculates the charging time of the new energy vehicle;

[0035] The charging module is used to send a first feedback message to the second identification module after receiving the detection notification information. The first feedback message includes information on whether the new energy vehicle is being charged, and when it is being charged, it also includes the charging start time.

[0036] The present application also provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer is enabled to execute the above-mentioned electronic anti-occupancy method based on image processing.

[0037] In the technical solution provided in the present application, first, when the detection module detects that a vehicle has entered the charging parking space, the detection module sends a first notification message to the first recognition module, and the first recognition module starts collecting a first image after receiving the first notification message, and performs a first recognition on the type of the vehicle entering the charging parking space; secondly, when the first recognition result is that the vehicle entering the charging parking space is a non-motor vehicle, the first recognition module notifies the alarm module, and when the first recognition result is that the vehicle entering the charging parking space is a motor vehicle, the first recognition module sends a second notification message to the second recognition module, and the second recognition module obtains a second image after receiving the second notification message, and identifies the type of the vehicle entering the charging parking space based on the second image. The type of vehicle in the charging parking space is identified for the second time; again, when the second identification result is that the vehicle entering the charging parking space is a fuel vehicle, the second identification module notifies the alarm module, and when the second identification result is that the vehicle entering the charging parking space is a new energy vehicle, the second identification module sends a detection notification message to the charging module, and the charging module sends a first feedback message to the second identification module; finally, when the first feedback message is that the new energy vehicle is not charging, the second identification module notifies the alarm module after the occupancy time of the new energy vehicle reaches the preset occupancy time threshold, and when the first feedback message is that the new energy vehicle is charging, the second identification module calculates the charging time of the new energy vehicle. Through this application, the types of vehicles occupying the charging parking space can be accurately distinguished, and the types of vehicles include non-motorized vehicles, fuel vehicles, and new energy vehicles, so that different measures can be taken according to the occupancy behavior of different types of vehicles, and the anti-occupancy management of the charging parking space can be carried out more scientifically. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0039] Figure 1 A schematic diagram of an embodiment of an electronic anti-occupancy method based on image processing in an embodiment of the present application;

[0040] Figure 2 Schematic diagram of an embodiment of an electronic anti-occupancy system based on image processing in an embodiment of the present application. DETAILED DESCRIPTION

[0041] Embodiments of the present application provide electronic anti-placeholder methods, systems and storage media based on image processing. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0042] For ease of understanding, the specific process of the embodiment of the present application is described below. Figure 1 The electronic anti-occupancy method based on image processing in the embodiment of the present application mainly includes the following steps:

[0043] S1, the detection module continuously detects the charging parking space, and when a vehicle is detected to enter the charging parking space, sends a first notification message to the first recognition module, and the first recognition module starts to collect a first image after receiving the first notification message, and performs a first recognition on the type of the vehicle entering the charging parking space to generate a first recognition result, and the first recognition result includes information on whether the vehicle entering the charging parking space is a motor vehicle or a non-motor vehicle;

[0044] Specifically, the detection module can be a geomagnetic vehicle detection device, which can detect whether there is a vehicle entering the charging parking space. If a vehicle enters the charging parking space, a first notification message is sent to the first identification module. The first identification module can be installed at the upper rear of the parking space, and can collect and analyze images. After receiving the first notification message, the first identification module starts to continuously collect first images. The vehicle in the first image is performing a parking operation. The first identification module performs a first identification on the type of the vehicle entering the charging parking space based on the collected first images to obtain a first identification result. The specific first identification process will be described below. The first identification result includes information on whether the vehicle entering the charging parking space is a motor vehicle or a non-motor vehicle.

[0045] S2. When the first recognition result is that the vehicle entering the charging parking space is a non-motor vehicle, the first recognition module notifies the alarm module to play an alarm prompt tone and sends a reminder message to the relevant contact person at the same time. When the first recognition result is that the vehicle entering the charging parking space is a motor vehicle, the first recognition module sends a second notification message to the second recognition module, and the second recognition module obtains a second image after receiving the second notification message, and performs a second recognition on the type of the vehicle entering the charging parking space based on the obtained second image to generate a second recognition result, and the second recognition result includes information on whether the vehicle entering the charging parking space is a fuel vehicle or a new energy vehicle;

[0046] Specifically, if the first recognition result is that the vehicle entering the charging parking space is a non-motor vehicle, the first recognition module notifies the alarm module to play an alarm prompt sound to remind the parker not to occupy the charging parking space. It also sends a reminder message to relevant contacts, such as contacting the security guard to handle the situation of occupying the charging parking space on the spot. The security guard can move the non-motor vehicle out of the charging parking space. If the first recognition result is that the vehicle entering the charging parking space is a motor vehicle, the first recognition module sends a second notification message to the second recognition module. The second recognition module is set at the front and upper part of the parking space. The setting height of the second recognition module can be lower than the setting height of the first recognition module. After receiving the second notification message, the second recognition module immediately obtains a second image, and performs a second recognition on the type of vehicle entering the charging parking space based on the acquired second image to obtain a second recognition result. The specific second recognition process will be described below. The second recognition result includes information on whether the vehicle entering the charging parking space is a fuel vehicle or a new energy vehicle.

[0047] S3. When the second recognition result is that the vehicle entering the charging parking space is a fuel vehicle, the second recognition module notifies the alarm module to play an alarm tone, sends a reminder message to the relevant contact, and records the occupancy time of the fuel vehicle. When the second recognition result is that the vehicle entering the charging parking space is a new energy vehicle, the second recognition module sends a detection notification message to the charging module. After receiving the detection notification message, the charging module sends a first feedback message to the second recognition module. The first feedback message includes information on whether the new energy vehicle is being charged, and when it is being charged, it also includes the charging start time;

[0048] Specifically, if the second identification result is that the vehicle entering the charging parking space is a fuel vehicle, the second identification module also notifies the alarm module to play an alarm tone and sends a reminder message to relevant contacts. The second identification module also records the occupancy time of the fuel vehicle. The occupancy time here refers to the time from the generation of the second identification result to the detection module detecting that the vehicle has completely left the charging parking space. In this way, when the vehicle leaves the parking lot, parking fees and occupancy fees can be charged to the vehicle based on the occupancy time. If the second identification result is that the vehicle entering the charging parking space is a new energy vehicle, the second identification module can send a detection notification message to the charging module after waiting for a preset time, for example, 10 minutes. After receiving the detection notification message, the charging module immediately sends a first feedback message to the second identification module. The first feedback message includes information on whether the new energy vehicle is being charged. If the new energy vehicle is being charged, the first feedback message also includes the charging start time. The function of the first feedback message will be described below.

[0049] S4. When the first feedback message is that the new energy vehicle is not charging, the second identification module notifies the alarm module to play an alarm tone and sends a reminder message to relevant contacts after the occupancy time of the new energy vehicle reaches a preset occupancy time threshold. When the first feedback message is that the new energy vehicle is charging, the second identification module records the occupancy time of the new energy vehicle and waits for the second feedback message sent by the charging module. The second feedback message includes the time when the new energy vehicle ends charging. The second identification module calculates the charging time of the new energy vehicle.

[0050] Specifically, if the first feedback message is that the new energy vehicle is not charging, the second identification module records the occupancy time of the new energy vehicle. The occupancy time here is calculated from the generation of the second identification result to the current time. After the occupancy time of the new energy vehicle reaches the preset occupancy time threshold, the second identification module similarly notifies the alarm module to play an alarm tone, sends a reminder message to the relevant contact, and continues to record the occupancy time. The occupancy time here refers to the time from the generation of the second identification result to the detection module detecting that the vehicle has completely left the charging parking space, so that when the vehicle leaves the parking lot, the parking fee can be charged to the vehicle based on the occupancy time. and the parking space occupancy fee. If the first feedback message is that the new energy vehicle is charging, the second identification module records the occupancy time of the new energy vehicle. The occupancy time here refers to the time from the generation of the second identification result to the detection module detecting that the vehicle has completely left the charging parking space. At the same time, the second identification module waits for the second feedback message sent by the charging module. The second feedback message includes the time when the new energy vehicle finishes charging. The second identification module calculates the charging time of the new energy vehicle based on the first feedback message and the second feedback message. After that, when the vehicle leaves the parking lot, the parking fee of the vehicle is calculated according to the occupancy time, and the parking fee of the vehicle is discounted based on the charging time.

[0051] Furthermore, the first recognition module collects the first image, and further includes the following steps:

[0052] S111, the first recognition module calculates, for the collected current first image, the difference between the element value of each image element in the current first image and the element value of the corresponding image element in the historical first image collected before the current first image;

[0053] S112, the first recognition module counts the total number of differences among different differences that are lower than a preset difference threshold. When the total number is greater than the preset total number threshold, the first recognition module records the current first image as the final first image and stops collecting the first image. When the total number is less than or equal to the preset total number threshold, the first recognition module collects a new first image and jumps to S111.

[0054] Specifically, before the first recognition module performs the first recognition on the type of the vehicle entering the charging parking space, it is necessary to collect the first image. In step S111, for the collected current first image, the first recognition module calculates the difference between the element value of each image element in the current first image and the element value of the corresponding image element in the historical first image collected before the current first image, that is, calculates the difference between the element values ​​of two image elements at the same position in the two images, wherein the historical first image collected before the current first image may be the previous first image of the current first image, or may be a first image separated from the current first image by 1 second. The first image of the preset number of first images, in step S112, the first recognition module counts the total number of differences in different differences that are lower than the preset difference threshold, the difference threshold is set in the actual application scenario, if the total number is greater than the total number threshold, the total number threshold is also set in the actual application scenario, the first recognition module records the current first image as the final first image, the detailed role of the final first image will be described below, and the acquisition of the first image is stopped at the same time, if the total number is less than or equal to the preset total number threshold, the first recognition module acquires a new first image, and jumps to step S111 to continue execution. The vehicle in the final first image has completed the parking operation and is no longer moving, so the first recognition is performed according to the final first image, and an accurate first recognition result can be obtained.

[0055] Furthermore, the first identification module performs a first identification on the type of the vehicle entering the charging parking space, including the following steps:

[0056] S121, the first recognition module performs contour extraction processing on the final first image to obtain a contour image, and the first recognition module continues to perform binarization processing on the contour image to obtain a binary image;

[0057] S122, the first recognition module calculates a difference image between the binary image and a reference binary image, where the reference binary image is a first image acquired before a time point at which the final first image is acquired and is separated from the final first image by a preset number of first images, and the first recognition module extracts different feature line segments in the left-right direction from the difference image, and counts the number of different feature line segments and the average distance values ​​of the different feature line segments;

[0058] S123, the first recognition module determines whether the average distance value is greater than a preset average distance value threshold value 1, and if so, determines that the type of the vehicle is a motor vehicle, otherwise, the first recognition module determines whether the average distance value is less than a preset average distance value threshold value 2, and if so, determines that the type of the vehicle is a non-motor vehicle, otherwise, continues to S124;

[0059] S124. The first recognition module determines whether the number is greater than a preset number threshold value one. If so, the type of the vehicle is determined to be a motor vehicle. Otherwise, the first recognition module determines whether the number is less than a preset number threshold value two. If so, the type of the vehicle is determined to be a non-motor vehicle. Otherwise, the first recognition is determined to have failed.

[0060] Specifically, steps S121 to S124 provide detailed descriptions of the first recognition. In step S121, the first recognition module performs contour extraction processing on the final first image to obtain a contour image, wherein the contour image includes the shape of the vehicle that can be observed from the rear and upper part of the vehicle. The first recognition module also performs binarization processing on the contour image to obtain a binary image. The colors corresponding to the image elements in the binary image are only black or white. In step S122, the first recognition module calculates a difference image between the binary image and the reference binary image, wherein the reference binary image refers to a first image that is acquired before the time point of acquiring the final first image and is separated from the final first image by a preset number of first images. The preset number is set according to the actual application scenario, and the preset number is, for example, 5 images. It should be noted that the difference image only includes the vehicle image and no longer includes the background image. The first recognition module also extracts different feature line segments in the left and right directions in the difference image. The left and right directions here can also be described as the width direction of the vehicle. The number of different feature line segments and the average distance values ​​of different feature line segments are counted. The distance can be the number of image elements corresponding to the feature line segments. It should be noted that only the characteristic line segments whose distance values ​​are greater than the preset distance value threshold are counted and the average distance value is calculated. The distance value threshold is set in the actual application scenario. The characteristic line segments with too small distance values ​​are considered as noise. In step S123, the first recognition module determines whether the average distance value is greater than the preset average distance value threshold one, and the average distance value threshold one is set in the actual application scenario. If so, the type of the vehicle is determined to be a motor vehicle. Otherwise, the first recognition module continues to determine whether the average distance value is less than the preset average distance value threshold two, and the average distance value threshold two is set in the actual application scenario. If so, the type of the vehicle is determined to be a non-motor vehicle. Otherwise, continue to step S124. In step S124, the first recognition module determines whether the number is greater than the preset number threshold one, and the number threshold one is set in the actual application scenario. If so, the type of the vehicle is determined to be a motor vehicle. Otherwise, the first recognition module continues to determine whether the number is less than the preset number threshold two, and the number threshold two is set in the actual application scenario. If so, the type of the vehicle is determined to be a non-motor vehicle. Otherwise, it is determined that the first recognition fails. Through the above method, it is possible to accurately determine whether the vehicle entering the charging parking space is a motor vehicle or a non-motor vehicle.

[0061] Furthermore, before step S121, the process also includes updating, for each image element in the final first image, the element value of the image element to an average value of the element values ​​of a preset number of image elements in the left and right ranges.

[0062] Specifically, before executing step S121, the first recognition module updates the element value of each image element in the final first image, specifically updating it to the average value of the element values ​​of a preset number of image elements within the left and right range. The left and right range here can also be described as the width direction of the vehicle, and the number is set according to the actual application scenario. The above method makes it easy to extract feature line segments in subsequent steps.

[0063] Furthermore, the second recognition module performs a second recognition on the type of the vehicle entering the charging parking space based on the acquired second image, including the following steps:

[0064] S21, the second recognition module performs license plate detection in the second image to obtain a license plate image, and the second recognition module performs binary processing on the license plate image to obtain a binary license plate image;

[0065] S22, the second recognition module determines in the binary license plate image a binary license plate image range corresponding to an object symbol string composed of a plurality of object symbols, the object symbols including Chinese characters, numbers, and letters, and the second recognition module divides each object symbol image range from the binary license plate image range;

[0066] S23, for each object symbol image range, the second recognition module divides the object symbol image range into a preset number of object symbol image sub-ranges, calculates a representative value of each object symbol image sub-range, and composes a representative vector of the object symbol image range with the representative value of each object symbol image sub-range, wherein the representative value is a ratio of the total number of image elements in the object symbol image sub-range whose image element values ​​are specific values ​​to the total number of all image elements in the object symbol image sub-range;

[0067] S24, for each object symbol image range, the second recognition module calculates the interval value between the representative vector of the object symbol image range and different reference vectors, and regards the reference object symbol corresponding to the interval value less than the preset interval value threshold as the recognition result of the object symbol image range;

[0068] S25. The second recognition module counts the total number of recognition results of the object symbol image range generated. When the total number is equal to the first value, the type of the vehicle is determined to be a fuel vehicle. When the total number is equal to the second value, the type of the vehicle is determined to be a new energy vehicle. In other cases, the second recognition is determined to have failed.

[0069] Specifically, steps S21 to S25 introduce a detailed process of performing the second recognition based on the second image, where the second image is an image of the vehicle that can be observed from the front and top of the vehicle. In step S21, the second recognition module performs license plate detection in the second image to obtain the license plate image. The second recognition module performs binary processing on the license plate image to obtain a binary license plate image. The color corresponding to the image elements in the binary license plate image is only black or white. In step S22, the second recognition module determines a binary license plate image range in the binary license plate image. The binary license plate image range includes an image of an object symbol string composed of a plurality of object symbols, wherein the object symbols include Chinese characters, numbers, and letters. Subsequently, the second recognition module divides each object symbol image range from the binary license plate image range. The object symbol image range includes an image of a single object symbol. The specific division method will be described below. In step S23, for each object symbol image range, the second recognition module divides the object symbol image range into a preset number of object symbol image sub-ranges, the number of which is set according to the actual application scenario, and calculates a representative value of each object symbol image sub-range. The representative value refers to the object symbol. The total number of image elements whose image element values ​​in the image sub-range are specific values ​​accounts for the total number of all image elements in the object symbol image sub-range. The specific value may be the image element value corresponding to black, so that the representative value of each object symbol image sub-range is used to form a representative vector of the object symbol image range. In step S24, for each object symbol image range, the second recognition module calculates the interval value between the representative vector of the object symbol image range and different reference vectors. The reference vector is obtained by using the same method for the reference object symbol image. The interval value may be a cosine distance. The reference object symbol corresponding to the interval value less than the preset interval value threshold is used as the recognition result of the object symbol image range. The interval value threshold is set in an actual application scenario. In step S25, the second recognition module counts the total number of recognition results of the generated object symbol image range. If the total number is equal to the first value, the type of the vehicle is determined to be a fuel vehicle. If the total number is equal to the second value, the type of the vehicle is determined to be a new energy vehicle. If the total number is neither equal to the first value nor equal to the second value, the second recognition is determined to fail. The first value is 7 and the second value is 8. Through the above method, it can be accurately determined whether the vehicle entering the charging parking space is a new energy vehicle or a fuel vehicle.

[0070] Further, in step S24, when there are multiple reference object symbols corresponding to interval values ​​less than a preset interval value threshold, for each object symbol image sub-range in the object symbol image range, the object symbol image sub-range is further divided into a preset number of object symbol image secondary sub-ranges, a representative value of each object symbol image secondary sub-range is obtained, the representative value of each object symbol image secondary sub-range is combined into a representative vector of the object symbol image sub-range, and interval values ​​between representative vectors of different object symbol image sub-ranges and corresponding reference vectors of different reference object symbols are calculated, a weighted operation is performed on different interval values ​​of the same reference object symbol to obtain a comprehensive interval value, and the reference object symbol corresponding to the comprehensive interval value less than the preset comprehensive interval value threshold is used as the recognition result of the object symbol image range.

[0071] Specifically, in step S24, for each object symbol image range, if there are multiple reference object symbols corresponding to the interval value less than the preset interval value threshold, it will be difficult to determine the recognition result of the object symbol image range. In order to solve this problem, the second recognition module continues to divide the object symbol image sub-range into a preset number of object symbol image secondary sub-ranges for each object symbol image sub-range in the object symbol image range. The number is set according to the actual application scenario, and the representative value of each object symbol image secondary sub-range is obtained. The calculation method of the representative value here is the same as the calculation method of the representative value in the above text, so that the representative value of each object symbol image secondary sub-range is composed of the representative vector of the object symbol image sub-range. On this basis, the second recognition module calculates the representative vector of the object symbol image range. The interval values ​​between the representative vectors of different object symbol image sub-ranges and the corresponding reference vectors of each reference object symbol, the corresponding reference vectors are obtained by executing the same method on the corresponding reference object symbol image sub-range in the reference object symbol image, and a weighted operation is performed on different interval values ​​corresponding to the same reference object symbol to obtain a comprehensive interval value, and the reference object symbol corresponding to the comprehensive interval value less than a preset comprehensive interval value threshold is used as the recognition result of the object symbol image range. The comprehensive interval value threshold is set in an actual application scenario. If there are still multiple reference object symbols corresponding to the comprehensive interval value less than the preset comprehensive interval value threshold, the object symbol image can be further divided into secondary sub-ranges, and the same method can be executed until the recognition result of the object symbol image range can be obtained.

[0072] Furthermore, the second recognition module divides each object symbol image range from the binary license plate image range, including the following steps:

[0073] S221, the second recognition module detects different image element columns in sequence from left to right in the binary license plate image range, and records the minimum image element values ​​in the different image element columns in sequence to obtain a minimum image element value sequence;

[0074] S222, from left to right, the second recognition module sequentially determines different subsequences in the minimum image element value sequence, where the subsequences are composed of a number of consecutive identical minimum image element values ​​in the minimum image element value sequence, and the color corresponding to the number of consecutive identical minimum image element values ​​is white;

[0075] S223. According to the determined order of the subsequences, for each subsequence, the second recognition module matches the subsequence with a number of image element columns in the binary license plate image range, and the second recognition module determines the length of the number of image element columns in the left and right directions, and divides the object symbol image range from the position corresponding to the middle length.

[0076] Specifically, steps S221 to S223 introduce the process of dividing each object symbol image range from the binary license plate image range. In step S221, in the binary license plate image range, in the order of the image element columns from left to right, the second recognition module detects different image element columns respectively, and records the minimum image element values ​​in different image element columns respectively. The minimum image element value is 0 or 255, and then a minimum image element value sequence composed of different minimum image element values ​​is obtained. In step S222, the second recognition module determines different subsequences in the minimum image element value sequence in the order from left to right in the minimum image element value sequence. The subsequence is composed of several consecutive identical minimum image element values ​​in the minimum image element value sequence. The color corresponding to several consecutive identical minimum image element values ​​is white, that is, several consecutive identical minimum image element values ​​are all 255. In step S223, according to the determination order of the subsequence, for each subsequence, the second recognition module corresponds the subsequence to several image element columns in the binary license plate image range. In fact, the subsequence is obtained by several image element columns. The second recognition module determines the length of several image element columns in the left and right directions. The length can be measured by the number of image elements. Then, the object symbol image range is divided from the position corresponding to the middle length.

[0077] The electronic anti-occupancy method based on image processing in the embodiment of the present application is described above. The electronic anti-occupancy system based on image processing in the embodiment of the present application is described below. Figure 2 In the embodiment of the present application, the electronic anti-occupancy system based on image processing includes the following modules:

[0078] A detection module, configured to continuously detect the charging parking space, and send a first notification message to the first identification module when a vehicle is detected to enter the charging parking space;

[0079] A first recognition module, used to start collecting the first image after receiving the first notification information, and to perform a first recognition on the type of the vehicle entering the charging parking space according to the collected first images to generate a first recognition result, wherein the first recognition result includes information on whether the vehicle entering the charging parking space is a motor vehicle or a non-motor vehicle, and to notify the alarm module to play an alarm tone and send a reminder message to a relevant contact when the first recognition result is that the vehicle entering the charging parking space is a non-motor vehicle, and to send a second notification information to the second recognition module when the first recognition result is that the vehicle entering the charging parking space is a motor vehicle;

[0080] Alarm module, used to play alarm prompt sound;

[0081] a second identification module, configured to obtain a second image after receiving the second notification information, and to perform a second identification on the type of the vehicle entering the charging parking space based on the obtained second image to generate a second identification result, wherein the second identification result includes information on whether the vehicle entering the charging parking space is a fuel vehicle or a new energy vehicle, and to notify the alarm module to play an alarm prompt tone when the second identification result is that the vehicle entering the charging parking space is a fuel vehicle, and to send a reminder message to a relevant contact person, and to record the occupancy time of the fuel vehicle, and to send a detection notification message to the charging module when the second identification result is that the vehicle entering the charging parking space is a new energy vehicle, and to notify the alarm module to play an alarm prompt tone when the occupancy time of the new energy vehicle reaches a preset occupancy time threshold when the first feedback message is that the new energy vehicle is not charging, and to send a reminder message to a relevant contact person, and to record the occupancy time of the new energy vehicle when the first feedback message is that the new energy vehicle is charging, and to wait for a second feedback message sent by the charging module, wherein the second feedback message includes the time when the new energy vehicle ends charging, and the second identification module calculates the charging time of the new energy vehicle;

[0082] The charging module is used to send a first feedback message to the second identification module after receiving the detection notification information. The first feedback message includes information on whether the new energy vehicle is being charged, and when it is being charged, it also includes the charging start time.

[0083] The present application also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of an electronic anti-occupancy method based on image processing.

[0084] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the above-described system and specific working processes of the modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0085] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. Electronic anti-occupancy method based on image processing, It is characterized in that The steps include: S1, the detection module continuously detects the charging parking space, and when a vehicle is detected to enter the charging parking space, sends a first notification message to the first recognition module, and the first recognition module starts to collect a first image after receiving the first notification message, and performs a first recognition on the type of the vehicle entering the charging parking space to generate a first recognition result, and the first recognition result includes information on whether the vehicle entering the charging parking space is a motor vehicle or a non-motor vehicle; S2. When the first recognition result is that the vehicle entering the charging parking space is a non-motor vehicle, the first recognition module notifies the alarm module to play an alarm tone and sends a reminder message to the relevant contact. When the first recognition result is that the vehicle entering the charging parking space is a motor vehicle, the first recognition module sends a second notification message to the second recognition module, and the second recognition module obtains a second image after receiving the second notification message, and performs a second recognition on the type of the vehicle entering the charging parking space based on the obtained second image to generate a second recognition result, and the second recognition result includes information on whether the vehicle entering the charging parking space is a fuel vehicle or a new energy vehicle; S3. When the second recognition result is that the vehicle entering the charging parking space is a fuel vehicle, the second recognition module notifies the alarm module to play an alarm tone, sends a reminder message to the relevant contact, and records the occupancy time of the fuel vehicle. When the second recognition result is that the vehicle entering the charging parking space is a new energy vehicle, the second recognition module sends a detection notification message to the charging module. After receiving the detection notification message, the charging module sends a first feedback message to the second recognition module. The first feedback message includes information on whether the new energy vehicle is being charged, and when it is being charged, it also includes the charging start time. S4. When the first feedback message is that the new energy vehicle is not charging, the second identification module notifies the alarm module to play an alarm tone after the occupancy time of the new energy vehicle reaches a preset occupancy time threshold, and sends a reminder message to relevant contacts at the same time. When the first feedback message is that the new energy vehicle is charging, the second identification module records the occupancy time of the new energy vehicle and waits for the second feedback message sent by the charging module, the second feedback message includes the time when the new energy vehicle ends charging, and the second identification module calculates the charging time of the new energy vehicle.

2. The electronic anti-occupancy method based on image processing according to claim 1, It is characterized in that The first recognition module collects the first image, and further includes the following steps: S111, the first recognition module calculates, for the collected current first image, the difference between the element value of each image element in the current first image and the element value of the corresponding image element in the historical first image collected before the current first image; S112. The first recognition module counts the total number of differences among different differences that are lower than a preset difference threshold. When the total number is greater than the preset total number threshold, the first recognition module records the current first image as the final first image and stops collecting the first image. When the total number is less than or equal to the preset total number threshold, the first recognition module collects a new first image and jumps to S111.

3. The electronic anti-occupancy method based on image processing according to claim 2, It is characterized in that The first identification module performs a first identification on the type of the vehicle entering the charging parking space, including the following steps: S121, the first recognition module performs contour extraction processing on the final first image to obtain a contour image, and the first recognition module continues to perform binarization processing on the contour image to obtain a binary image; S122, the first recognition module calculates a difference image between the binary image and a reference binary image, where the reference binary image is a first image acquired before a time point at which the final first image is acquired and is separated from the final first image by a preset number of first images, and the first recognition module extracts different feature line segments in the left-right direction from the difference image, and counts the number of different feature line segments and the average distance values ​​of the different feature line segments; S123, the first recognition module determines whether the average distance value is greater than a preset average distance value threshold value 1, and if so, determines that the type of the vehicle is a motor vehicle, otherwise, the first recognition module determines whether the average distance value is less than a preset average distance value threshold value 2, and if so, determines that the type of the vehicle is a non-motor vehicle, otherwise, proceeds to S124; S124. The first recognition module determines whether the number is greater than a preset number threshold value one. If so, the type of the vehicle is determined to be a motor vehicle. Otherwise, the first recognition module determines whether the number is less than a preset number threshold value two. If so, the type of the vehicle is determined to be a non-motor vehicle. Otherwise, the first recognition is determined to have failed.

4. The electronic anti-occupancy method based on image processing according to claim 3, It is characterized in that Before S121, the process further includes updating, for each image element in the final first image, the element value of the image element to an average value of the element values ​​of a preset number of image elements in the left and right ranges.

5. The electronic anti-occupancy method based on image processing according to claim 1, It is characterized in that The second recognition module performs a second recognition on the type of the vehicle entering the charging parking space based on the acquired second image, including the following steps: S21, the second recognition module performs license plate detection in the second image to obtain a license plate image, and the second recognition module performs binary processing on the license plate image to obtain a binary license plate image; S22, the second recognition module determines in the binary license plate image a binary license plate image range corresponding to an object symbol string composed of a plurality of object symbols, the object symbols including Chinese characters, numbers, and letters, and the second recognition module divides each object symbol image range from the binary license plate image range; S23, for each object symbol image range, the second recognition module divides the object symbol image range into a preset number of object symbol image sub-ranges, calculates a representative value of each object symbol image sub-range, and composes a representative vector of the object symbol image range with the representative value of each object symbol image sub-range, wherein the representative value is a ratio of the total number of image elements in the object symbol image sub-range whose image element values ​​are specific values ​​to the total number of all image elements in the object symbol image sub-range; S24, for each object symbol image range, the second recognition module calculates the interval value between the representative vector of the object symbol image range and different reference vectors, and regards the reference object symbol corresponding to the interval value less than a preset interval value threshold as the recognition result of the object symbol image range; S25. The second recognition module counts the total number of recognition results of the object symbol image range generated. When the total number is equal to the first value, the type of the vehicle is determined to be a fuel vehicle. When the total number is equal to the second value, the type of the vehicle is determined to be a new energy vehicle. In other cases, the second recognition is determined to have failed.

6. The electronic anti-occupancy method based on image processing according to claim 5, It is characterized in that In S24, when there are multiple reference object symbols corresponding to interval values ​​less than a preset interval value threshold, for each object symbol image sub-range in the object symbol image range, the object symbol image sub-range is further divided into a preset number of object symbol image secondary sub-ranges, a representative value of each object symbol image secondary sub-range is obtained, the representative value of each object symbol image secondary sub-range is combined into a representative vector of the object symbol image sub-range, and interval values ​​between representative vectors of different object symbol image sub-ranges and corresponding reference vectors of different reference object symbols are calculated, a weighted operation is performed on different interval values ​​of the same reference object symbol to obtain a comprehensive interval value, and the reference object symbol corresponding to the comprehensive interval value less than the preset comprehensive interval value threshold is used as the recognition result of the object symbol image range.

7. The electronic anti-occupancy method based on image processing according to claim 6, It is characterized in that The second recognition module divides each object symbol image range from the binary license plate image range, including the following steps: S221, the second recognition module detects different image element columns in sequence from left to right in the binary license plate image range, and records the minimum image element values ​​in the different image element columns in sequence to obtain a minimum image element value sequence; S222, the second recognition module sequentially determines different subsequences in the minimum image element value sequence from left to right, where the subsequences are composed of a number of consecutive identical minimum image element values ​​in the minimum image element value sequence, and the color corresponding to the number of consecutive identical minimum image element values ​​is white; S223. According to the determined order of the subsequences, for each subsequence, the second recognition module matches the subsequence with a number of image element columns in the binary license plate image range, and the second recognition module determines the length of the number of image element columns in the left and right directions, and divides the object symbol image range from the position corresponding to the middle length.

8. An electronic anti-occupancy system based on image processing, used to implement the method according to any one of claims 1 to 7, It is characterized in that Includes the following modules: A detection module, configured to continuously detect the charging parking space, and send a first notification message to the first identification module when a vehicle is detected to enter the charging parking space; A first recognition module, used to start collecting the first image after receiving the first notification information, and to perform a first recognition on the type of the vehicle entering the charging parking space according to the collected first images to generate a first recognition result, wherein the first recognition result includes information on whether the vehicle entering the charging parking space is a motor vehicle or a non-motor vehicle, and to notify the alarm module to play an alarm tone and send a reminder message to a relevant contact when the first recognition result is that the vehicle entering the charging parking space is a non-motor vehicle, and to send a second notification information to the second recognition module when the first recognition result is that the vehicle entering the charging parking space is a motor vehicle; Alarm module, used to play alarm prompt sound; a second identification module, configured to obtain a second image after receiving the second notification information, and to perform a second identification on the type of the vehicle entering the charging parking space based on the obtained second image to generate a second identification result, wherein the second identification result includes information on whether the vehicle entering the charging parking space is a fuel vehicle or a new energy vehicle, and to notify the alarm module to play an alarm prompt tone when the second identification result is that the vehicle entering the charging parking space is a fuel vehicle, and to send a reminder message to a relevant contact person, and to record the occupancy time of the fuel vehicle, and to send a detection notification message to the charging module when the second identification result is that the vehicle entering the charging parking space is a new energy vehicle, and to notify the alarm module to play an alarm prompt tone when the occupancy time of the new energy vehicle reaches a preset occupancy time threshold when the first feedback message is that the new energy vehicle is not charging, and to send a reminder message to a relevant contact person, and to record the occupancy time of the new energy vehicle when the first feedback message is that the new energy vehicle is charging, and to wait for a second feedback message sent by the charging module, wherein the second feedback message includes the time when the new energy vehicle ends charging, and the second identification module calculates the charging time of the new energy vehicle; The charging module is used to send a first feedback message to the second identification module after receiving the detection notification information. The first feedback message includes information on whether the new energy vehicle is being charged, and when it is being charged, it also includes the charging start time.

9. A computer-readable storage medium having instructions stored thereon, It is characterized in that When the instructions are executed by the processor, the electronic anti-occupancy method based on image processing as described in any one of claims 1 to 7 is implemented.