Pseudo license plate determination method, electronic equipment and storage medium
By using a fill light on the gate camera at the vehicle entry and exit site to collect the license plate image and judge its brightness, the problem of passing fake license plates is solved, accurate identification and prevention of fake license plates is achieved, and the normality of vehicle management is ensured.
Patent Information
- Application Number
- CN202310907440.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-21
- Publication Date
- 2025-01-21
AI Technical Summary
The prior art is difficult to effectively identify and prevent fake license plates from passing through the gates of vehicles entering and leaving the place, affecting the normality of vehicle management.
By obtaining the license plate image collected by the camera when the fill light is turned on, the brightness of the license plate is determined, and based on the parameter value of the brightness parameter, it is judged whether the license plate is a fake license plate.
It realizes counterfeit license plate detection based on license plate brightness, can accurately identify real license plates and counterfeit license plates, prevent fake license plates from passing through gates, and ensure the normal management of vehicles entering and exiting places.
Smart Images

Figure CN119339363A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of license plate detection, and in particular to a method for determining a fake license plate, an electronic device and a storage medium. Background Art
[0002] In parks, residential areas, parking lots and other places where vehicles enter and exit, cameras are installed at the entrances and exits to collect the license plate information of vehicles entering and exiting, so as to manage the entry and exit permissions, parking charges, etc. For the entrance and exit gates, as long as the license plate information collected by the camera is an authorized license plate or a license plate that has paid the parking fee, the vehicle will be released.
[0003] However, some car owners can also open the corresponding gates by taking photos of authorized license plates, printing out the photos and displaying them to the cameras of the entry and exit gates. Therefore, how to identify such fake license plates is a technical problem that needs to be solved urgently. Summary of the invention
[0004] The invention provides a method for determining a fake license plate, an electronic device and a storage medium, which are used to solve the technical problem of how to identify a fake license plate in the prior art and realize fake license plate detection based on license plate brightness.
[0005] The present invention provides a method for determining a fake license plate, comprising:
[0006] Acquire a first image including a license plate, where the first image is an image captured by a camera with a fill light turned on;
[0007] Determine a first brightness corresponding to a first area of the license plate in the first image;
[0008] Determine whether the license plate is a fake license plate based on the parameter value of the brightness parameter; wherein the parameter value of the brightness parameter is determined according to the first brightness.
[0009] According to a method for determining a fake license plate provided by the present invention, determining whether the license plate is a fake license plate based on the parameter value of the brightness parameter includes:
[0010] Determine a second brightness corresponding to a second area in the first image;
[0011] determining a parameter value of the brightness parameter according to a brightness difference between the first brightness and the second brightness;
[0012] When the parameter value of the brightness parameter is less than a first preset threshold, the license plate is determined to be a fake license plate.
[0013] According to a method for determining a fake license plate provided by the present invention, when the first area is the background color area of the license plate, the second area is the font area of the license plate; or,
[0014] When the first area is the license plate area of the license plate, the second area is the vehicle target area in the first image except the entire area of the license plate.
[0015] According to a method for determining a fake license plate provided by the present invention, determining whether the license plate is a fake license plate based on the parameter value of the brightness parameter includes:
[0016] Acquire a second image containing the license plate, where the second image is an image captured by the camera when the fill light is turned off;
[0017] determining a third brightness corresponding to the first area in the second image;
[0018] Determining a parameter value of the brightness parameter based on a brightness difference between the first brightness and the third brightness;
[0019] When the parameter value of the brightness parameter is less than a second preset threshold, it is determined that the license plate is a fake license plate.
[0020] A method for determining a fake license plate provided by the present invention further includes:
[0021] The base color of the license plate is determined, and an adjustment coefficient of the second preset threshold is determined based on the base color.
[0022] According to a method for determining a fake license plate provided by the present invention, the shooting parameters of the camera when acquiring the first image are the same as the shooting parameters when acquiring the second image.
[0023] According to a method for determining a fake license plate provided by the present invention, the step of obtaining a first image including a license plate includes:
[0024] When it is detected that the license plate is included in the image captured by the camera, obtaining the ambient brightness;
[0025] When the ambient brightness is greater than or equal to a third preset threshold, adjusting the shooting parameters of the camera so that the ambient brightness acquired by the camera after the shooting parameters are adjusted is less than the third preset threshold;
[0026] When the ambient brightness acquired by the camera is less than the third preset threshold, the fill light of the camera is turned on, and the camera is controlled to capture the first image.
[0027] According to a method for determining a fake license plate provided by the present invention, when it is detected that the license plate is included in the picture taken by the camera, obtaining the ambient brightness includes:
[0028] When it is detected that the license plate is included in the picture taken by the camera and the number of pixels of the license plate is greater than a preset number, the ambient brightness is obtained.
[0029] The present invention also provides a fake license plate determination device, comprising:
[0030] An image acquisition module, used to acquire a first image including a license plate, wherein the first image is an image acquired by a camera when a fill light is turned on;
[0031] a brightness determination module, configured to determine a first brightness corresponding to a first area of the license plate in the first image;
[0032] A license plate determination module is used to determine whether the license plate is a fake license plate based on a parameter value of a brightness parameter; wherein the parameter value of the brightness parameter is determined according to the first brightness.
[0033] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for determining a fake license plate as described above is implemented.
[0034] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for determining a fake license plate as described above is implemented.
[0035] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for determining a fake license plate as described above is implemented.
[0036] The method, electronic device and storage medium for determining a fake license plate provided by the present invention obtain a first image containing a license plate collected by a camera with a fill light turned on, determine the first brightness of a first area of the license plate in the first image, and determine whether the license plate is a fake license plate based on the parameter value of a brightness parameter determined according to the first brightness, so that the brightness of the first area of the license plate can be used to determine the fake license plate. For a real license plate, it has a very strong reverse regression reflection performance and can reflect back most of the light. Therefore, the first area of the real license plate, such as the background area, the font area or the overall area, will have a very high brightness in the image; while the printed license plate, that is, the fake license plate, does not have the reverse regression reflection performance, and its brightness in the image is much lower than that of the real license plate. In this way, the brightness of the first area of the license plate in the first image collected by the camera with the fill light turned on can be used to determine whether the license plate is a fake license plate, thereby realizing fake license plate detection based on the license plate brightness. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 It is a schematic diagram of the flow of a method for determining a fake license plate provided by an embodiment of the present invention;
[0039] Figure 2 is a schematic structural diagram of a fake license plate determination device provided by an embodiment of the present invention;
[0040] Figure 3 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] It should be noted that the serial numbers assigned to the objects described in the present invention, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning.
[0043] In parks, communities, parking lots and other places where vehicles enter and exit, cameras are installed at the entrances and exits to collect the license plate information of vehicles entering and exiting, so as to manage the entry and exit permissions, parking charges and other aspects of vehicles entering and exiting. In this scenario, it is inevitable that vehicles will use fake license plates to pass through the gate, affecting the normal management of vehicles entering and exiting the venue. For example, a paper license plate of a passable vehicle is pasted on the vehicle license plate, and photos of vehicles with passable license plates are printed. After the license plate information is collected by the camera, the gate can still be opened normally. Therefore, it is necessary to identify such fake license plates in order to stop the relevant vehicles in time and ensure the normal management of vehicles entering and exiting the venue.
[0044] By comparing the real license plate with the printed fake license plate, we can see that the real license plate has retro-reflective performance and can reflect 85% of the brightness back to the light source; while the printed fake license plate does not have retro-reflective performance and the brightness returned to the light source is much lower than that of the real license plate. Therefore, the real license plate and the printed fake license plate can be distinguished by this difference.
[0045] Based on this, an embodiment of the present invention provides a method for determining a fake license plate based on the difference in reflective properties between real license plates and fake license plates. The method obtains an image containing the license plate captured by a camera with the fill light turned on, and determines the brightness of the first area of the license plate in the image (such as the background color area, the font area or the overall area), and then identifies whether the license plate is a fake license plate based on the brightness.
[0046] Combine the following Figure 1 The fake license plate determination method of the present invention is described. The fake license plate determination method can be applied to electronic devices such as terminal devices or servers. Among them, the terminal device may include a mobile phone, a computer, a tablet computer, a wearable device, etc.; the server may include an independent server, a cluster server or a cloud server, etc. The fake license plate determination method can also be applied to a fake license plate determination device set in an electronic device such as a terminal device or a server, and the fake license plate determination device can be implemented by software, hardware or a combination of the two. The fake license plate determination method of the present invention is described below by taking the execution subject as an electronic device as an example.
[0047] Figure 1 The schematic diagram of the process of the method for determining a fake license plate provided by an embodiment of the present invention is exemplarily shown. Figure 1 As shown, the fake license plate determination method may include the following steps 110 to 130.
[0048] Step 110: Acquire a first image including a license plate, where the first image is an image captured by the camera with the fill light turned on.
[0049] A camera for collecting vehicle images can be installed at the gate of the vehicle entrance and exit. The camera is installed in a position to collect the license plate. The camera is equipped with a fill light, such as a small lamp bead. The fill light is installed close to the camera lens to increase the light intensity reflected from the license plate to the lens.
[0050] The camera at the gate can collect live images of the gate monitoring area, and the collected images can be transmitted in real time to the electronic device connected to the camera. When the image collected by the camera contains a license plate, the electronic device can control the camera to collect a first image containing the license plate when the fill light is turned on, and the electronic device obtains the first image.
[0051] Step 120: Determine a first brightness corresponding to a first area of the license plate in the first image.
[0052] After acquiring the first image, the electronic device can determine the license plate of the first image, determine the license plate image, and then determine the brightness information of the first area in the license plate image to obtain the first brightness corresponding to the first area of the license plate in the first image. The first area may include the background color area, the font area or the overall area of the license plate.
[0053] Exemplarily, the license plate of the first image and the first area in the license plate may be determined by using target determination, feature extraction and other methods.
[0054] It is understandable that the more complete and closer to the whole image of the license plate in the first image is, the more accurate the first brightness corresponding to the first area is. Based on this, in an exemplary embodiment, the first image containing the license plate can be an image containing the license plate and the number of pixels of the license plate is greater than a preset number. In this way, it can be ensured that a license plate of a certain size is obtained, and the accuracy of obtaining the first brightness is improved.
[0055] Step 130: Determine whether the license plate is a fake license plate based on the parameter value of the brightness parameter.
[0056] The parameter value of the brightness parameter is determined according to the first brightness corresponding to the first area. For example, the first brightness can be determined as the parameter value of the brightness parameter; or the product of the first brightness and the preset adjustment coefficient of the brightness parameter can be determined as the parameter value of the brightness parameter; or the brightness difference between the first brightness and other brightness can be determined as the parameter value of the brightness parameter, wherein the other brightness can be the brightness of other areas of the vehicle in the first image except the first area, and the other areas can include the part of the license plate except the first area or the vehicle body area except the first area.
[0057] The real license plate is affixed with a reflective film, which has a very strong retro-reflective performance, and can directly reflect 85% of the light back to the light source. When the fill light is installed close to the camera lens, only a very weak fill light is needed, and the light intensity reflected from the license plate to the camera lens will also be very strong. Therefore, the real license plate will also be very bright in the live picture collected by the camera. However, the printed fake license plate does not have such a retro-reflective performance, so the brightness of the fake license plate in the live picture collected by the camera will be very weak, far less than the real license plate.
[0058] Based on this, in an example embodiment, a threshold C1 can be set based on the difference in reflective properties between the real license plate and the fake license plate, and the first brightness corresponding to the first area of the license plate can be determined as the parameter value of the brightness parameter. When the first brightness of the license plate is greater than or equal to the threshold C1, the license plate is determined to be a real license plate; otherwise, the license plate is determined to be a fake license plate.
[0059] Exemplarily, the first brightness corresponding to the first area of the license plate in the first image can also be compared with other reference brightnesses, and whether the license plate is a fake license plate can be determined based on the brightness difference obtained by comparison. For example, the reflective properties of other areas of the vehicle except the license plate are far less than those of a real license plate, and the brightness of the fill light is also weak, so the reflective properties of other areas of the vehicle except the license plate are weak, that is, the brightness of the vehicle area except the license plate in the first image is darker, that is, the brightness of the vehicle body is much lower than the brightness of the license plate. Based on this, the first brightness of the first area of the license plate in the first image can be compared with the second brightness of the vehicle body, and the brightness difference between the two can be determined as the parameter value of the brightness parameter. If the parameter value is greater than or equal to the first preset threshold, it means that the first brightness of the license plate is higher and it is a real license plate, otherwise it is a fake license plate. For another example, the difference in reflection of the license plate when the fill light is on and off can be used to determine whether the license plate is a fake license plate. The first brightness is compared with the brightness of the first area of the license plate in the image captured by the camera when the fill light is off, and the brightness difference between the two is determined as the parameter value of the brightness parameter. If the parameter value is greater than or equal to the second preset threshold, the license plate is determined to be a real license plate, otherwise the license plate is determined to be a fake license plate.
[0060] The method for determining a fake license plate provided by the present invention obtains a first image containing a license plate collected by a camera with a fill light turned on, determines a first brightness of a first area of the license plate in the first image, and determines whether the license plate is a fake license plate based on a parameter value of a brightness parameter determined according to the first brightness. In this way, the brightness of the first area of the license plate can be used to determine the fake license plate. For a real license plate, it has a very strong reverse regression reflection performance and can reflect back most of the light. Therefore, the first area of the real license plate, such as the background area, the font area or the overall area, will have a very high brightness in the image; while the printed license plate, that is, the fake license plate, does not have the reverse regression reflection performance, and its brightness in the image is much lower than that of the real license plate. In this way, the brightness of the first area of the license plate in the first image collected by the camera with the fill light turned on can be used to determine whether the license plate is a fake license plate, thereby realizing fake license plate detection based on the license plate brightness. By determining the fake license plate, the purpose of license plate anti-counterfeiting interception can be achieved.
[0061] based on Figure 1 Corresponding to the fake license plate determination method of the embodiment, in an example embodiment, determining whether the license plate is a fake license plate based on the parameter value of the brightness parameter may include: determining the second brightness corresponding to the second area in the first image; determining the parameter value of the brightness parameter based on the brightness difference between the first brightness and the second brightness; when the parameter value of the brightness parameter is less than a first preset threshold value, determining that the license plate is a fake license plate.
[0062] Exemplarily, the brightness difference between the first brightness and the second brightness may be determined as the parameter value of the brightness parameter; or the product of the brightness difference and the adjustment coefficient may be determined as the parameter value of the brightness parameter.
[0063] For example, considering that the reflective properties of the car body are far less strong than those of a real license plate, and the brightness of the fill light is also relatively weak, the reflection of the car body is relatively weak, that is, the brightness of the car body in the first image is darker and the brightness of the license plate is relatively higher. Based on this, the difference between the brightness of the first area of the license plate and the brightness of the car body can be used to determine whether the license plate is a fake license plate.
[0064] Specifically, the first area may be the license plate area of the license plate in the first image, and the second area is the vehicle target area excluding the overall license plate area in the first image. The license plate area may be the overall license plate area, or a partial area of the license plate, such as the font area or background area of the license plate. The vehicle target area may be all vehicle body areas excluding the overall license plate area in the first image, or a partial area of the vehicle body, such as at least one of the vehicle's front spoiler, grille, bumper, logo, and engine hood.
[0065] Among them, the first preset threshold value can be obtained in advance through experiments. For example, some real license plate vehicles with different body colors and different license plate colors can be selected for actual measurement. There will be a difference in the reflective brightness between the license plate and the body of each vehicle, but they can all be stable above a certain threshold value. The threshold value can be determined as the first preset threshold value. For example, the minimum value of each difference can be determined as the first preset threshold value. Alternatively, license plates can be classified according to background color and font color. License plates with the same background color are divided into one category or license plates with the same background color and font color are divided into one category. Each category of license plates is set with a corresponding first preset threshold value.
[0066] For example, for a real license plate, there is also a difference between the reflective properties of the background color and the reflective properties of the font. For example, the license plate of a fuel vehicle has a blue background with white characters, and the reflective brightness of the white characters is stronger than the reflective brightness of the background color; for another example, the license plate of an electric vehicle has a cyan background and black characters, and the reflective brightness of the background color is stronger than the reflective brightness of the font part. For a fake license plate, there is no obvious difference in the brightness of the background color and the font part of the license plate. Therefore, the brightness difference between the background color brightness and the font brightness of the license plate can be used to determine whether the license plate is a fake license plate.
[0067] Specifically, the first area may be the base color area of the license plate, and the second area may be the font area of the license plate; or the first area may be the font area of the license plate, and the second area may be the base color area of the license plate. Accordingly, the brightness of the base color area and the brightness of the font area of the license plate may be determined respectively, and the brightness difference between the brightness of the base color area and the brightness of the font area may be determined as the parameter value of the brightness parameter; or the brightness difference between the brightness of the base color area and the brightness of the font area may be determined, and the product of the brightness difference and the preset adjustment coefficient may be determined as the parameter value of the brightness parameter. The parameter value of the brightness parameter is then compared with a first preset threshold value, and if the parameter value is less than the first preset threshold value, the license plate is determined to be a fake license plate.
[0068] The first preset threshold can be obtained in advance through experiments. For example, some real license plates with different background colors and different font colors can be selected for actual measurement. There is a difference between the background brightness and the font brightness of each license plate. The minimum difference or the average value of the difference can be determined as the third preset brightness threshold.
[0069] Alternatively, license plates may be classified according to the background color and the font color, with license plates of the same background color or license plates of the same background color and font color being classified into one category, and a corresponding first preset threshold value is set for each category of license plates. Accordingly, before using the first preset threshold value to determine whether a license plate is a fake license plate, the background color of the license plate may be determined first, and the first preset threshold value may be determined based on the background color. Alternatively, the background color and font color of the license plate may be determined first, and the first preset threshold value may be determined based on the background color and font color.
[0070] For example, for license plates with different background colors, their reflective properties may be different. Based on this, different first preset thresholds can be set for license plates with different background colors to avoid the influence of the reflective differences of different background colors and improve the accuracy of counterfeit license plate recognition. Specifically, the counterfeit license plate identification method may also include: determining the background color of the license plate, and determining the first preset threshold based on the background color; or determining the background color of the license plate, and determining an adjustment coefficient of the first preset threshold based on the background color.
[0071] In this example embodiment, in order to avoid reflections on the vehicle body caused by strong light during the day or street lighting at night, which makes the brightness of the vehicle body in the first image also high and affects the accuracy of determining the fake license plate, a third preset threshold can be set in advance as the threshold of the actual brightness perceived by the camera when capturing images, so that the camera captures images at a perceived brightness less than the threshold, that is, the camera turns on the fill light and captures the first image at a darker perceived brightness, thereby reducing the reflection effect on the vehicle body when the external light intensity is brighter.
[0072] Specifically, when it is detected that the license plate is included in the camera's shooting picture, the ambient brightness can be first obtained. When the ambient brightness is greater than or equal to the third preset threshold, it means that the light intensity of the external environment is strong, which may be daytime or nighttime street light illumination. At this time, the camera's shooting parameters can be adjusted so that the ambient brightness obtained by the camera after adjusting the shooting parameters is less than the third preset threshold, that is, the perceived actual brightness is less than the third preset threshold. Then, when the ambient brightness obtained by the camera is less than the third preset threshold, the camera's fill light is turned on, and the camera is controlled to capture the first image. The shooting parameters may include at least one of shutter and gain.
[0073] For example, when the electronic device detects that the camera's shooting picture contains a license plate, the current ambient brightness perceived by the camera is obtained, and then the ambient brightness is compared with the third preset threshold value E. If it is greater than E, the target shooting parameter of the camera can be determined according to the real-time adjustment mapping table, and the shooting parameter of the camera is adjusted to the target shooting parameter, that is, under the target shooting parameter, the ambient brightness acquired by the camera, that is, the brightness perceived during imaging, can be controlled to be less than E. When the ambient brightness acquired by the camera is less than E, the fill light is controlled to turn on, and then a frame of image captured by the camera under the action of the fill light is acquired to obtain the first image, and then the shooting parameters of the camera are restored to before the adjustment, and the fill light is turned off. Afterwards, for the first frame of the first image, the first brightness of the first area of the license plate in the first image and the second brightness of the vehicle target area other than the entire area of the license plate in the first image are determined, and the brightness difference between the first brightness and the second brightness is calculated, and the brightness difference is determined as the parameter value of the brightness parameter. If the parameter value is greater than or equal to the first preset threshold, it is determined that the license plate in the first image is a real license plate, and the gate can be controlled to open; otherwise, it is determined that the license plate in the first image is a fake license plate, and the vehicle is blocked from passing through the gate. The corresponding relationship between the ambient brightness and the shooting parameters can be stored in the real-time adjustment mapping table.
[0074] If the ambient brightness currently sensed by the camera is less than or equal to E, there is no need to adjust the shooting parameters of the camera, and a frame of image captured by the camera under the effect of the fill light is directly obtained to obtain the first image.
[0075] The fake license plate determination method provided by the embodiment of the present invention can use the difference between the brightness of the license plate and the brightness of the vehicle body or the difference between the background color brightness of the license plate and the font brightness in the same frame image captured by the camera to determine whether the license plate is a fake license plate. It can identify fake license plates in scenarios such as printed photos of passable license plates, paper license plates of passable license plates pasted at the vehicle license plate position, and printed photos or models of vehicles containing passable license plates, thereby achieving the purpose of anti-counterfeiting and blocking, and ensuring the normal management of vehicles entering and leaving the venue.
[0076] based on Figure 1 In a corresponding embodiment of the method for determining a fake license plate, in an exemplary embodiment, it is possible to identify whether a license plate is a fake license plate based on the difference in reflection between the real license plate and the fake license plate when the fill light is on or off, thereby achieving the purpose of anti-counterfeiting interception.
[0077] Specifically, determining whether a license plate is a fake license plate based on the parameter value of the brightness parameter may include: obtaining a second image containing the license plate, the second image being an image captured by the camera with the fill light turned off; determining a third brightness corresponding to the first area of the license plate in the second image; determining the parameter value of the brightness parameter based on the brightness difference between the first brightness and the third brightness; and determining that the license plate is a fake license plate when the parameter value of the brightness parameter is less than a second preset threshold.
[0078] For example, the electronic device may first control the camera to capture the second image containing the license plate when the fill light is turned off, then turn on the fill light, and control the camera to capture the first image containing the license plate when the fill light is turned on. Alternatively, the electronic device may first control the camera to capture the first image containing the license plate when the fill light is turned on, then turn off the fill light, and control the camera to capture the second image containing the license plate when the fill light is turned off.
[0079] This example embodiment utilizes the difference in reflection between a real license plate and a fake license plate when the fill light is on and off to identify whether the license plate is a fake. Therefore, it is necessary to capture images separately when the fill light is on and off. The fill light can automatically turn on and off according to the surrounding ambient brightness. For example, it can be turned off during the day and turned on at night. A third preset threshold can be set in advance. When the ambient brightness sensed by the camera is less than the third preset threshold, the fill light is turned on to ensure that the fill light can be turned on even in daytime shooting scenes.
[0080] Specifically, obtaining a first image containing a license plate may include: obtaining ambient brightness when it is detected that the license plate is included in the camera's shooting picture; adjusting the camera's shooting parameters when the ambient brightness is greater than or equal to a fourth preset brightness threshold, so that the ambient brightness obtained by the camera after adjusting the shooting parameters is less than a third preset threshold; when the ambient brightness obtained by the camera is less than the third preset threshold, turning on the camera's fill light and controlling the camera to capture the first image.
[0081] Exemplarily, when it is detected that a license plate is included in the picture taken by the camera, obtaining the ambient brightness may include: when it is detected that the license plate is included in the picture taken by the camera and the number of pixels of the license plate is greater than a preset number, obtaining the ambient brightness.
[0082] In this way, the license plate brightness information can be determined when the size of the license plate in the captured image reaches a certain level, thereby improving the accuracy of the acquired license plate brightness and further improving the accuracy of fake license plate detection.
[0083] It is understandable that, when it is detected that the license plate is included in the camera's shooting picture, the third preset threshold can be used to first distinguish whether the current shooting scene is daytime or nighttime. If the current ambient brightness is greater than or equal to the third preset threshold, it is considered to be a daytime shooting scene. At this time, the camera's shooting parameters can be adjusted to make the ambient brightness perceived by the camera less than the third preset threshold to simulate the night shooting effect, so that the fill light can be turned on, so that the camera can capture the first image with the fill light turned on. After acquiring the first image, the fill light can be turned off, and then the second image can be captured. If the current ambient brightness is less than the third preset threshold, it is considered to be a nighttime shooting scene. At this time, the fill light is in the off state. The second image captured by the camera with the fill light turned off can be acquired, and then the fill light can be turned on to acquire the first image captured by the camera with the fill light turned on; or, the fill light can be turned on first to acquire the first image captured by the camera with the fill light turned on, and then the fill light can be turned off, and then the second image captured by the camera with the fill light turned off can be acquired.
[0084] Based on this, the fake license plate determination method of this exemplary embodiment is further illustrated below using daytime shooting scenes and nighttime shooting scenes.
[0085] In the daytime shooting scene, the camera collects images of the monitoring area in real time and sends the collected images to the electronic device. When the electronic device detects that the image collected by the camera contains a license plate and the number of pixels of the license plate is greater than the preset number, the current ambient brightness is compared with the third preset threshold. At this time, if the ambient brightness is greater than the third preset threshold, the shutter and gain of the camera are reduced until the ambient brightness obtained by the camera is less than the third preset threshold to simulate the night effect. At the same time, the camera's fill light is controlled to turn on and the fill light is turned on for a preset time, a frame of the first image collected by the camera within the preset time is obtained, and the brightness A1 of the license plate in the frame of the first image is determined. After the preset time ends, the fill light will be turned off. At this time, a frame of the second image collected by the camera after the fill light is turned off is obtained, such as the first frame of the image after the fill light is turned off, and the brightness B1 of the license plate in the frame of the second image is determined. Then the brightness difference between the brightness A1 and the brightness B1 is calculated, and the brightness difference is used as the parameter value of the brightness parameter to be compared with the second preset threshold C3. If the brightness difference is greater than or equal to C3, the detected license plate is determined to be a real license plate; if the brightness difference is less than C3, the detected license plate is determined to be a fake license plate.
[0086] In a nighttime shooting scenario, the camera collects images of the monitoring area in real time and sends the collected images to the electronic device. When the electronic device detects that the image collected by the camera contains a license plate and the number of pixels of the license plate is greater than a preset number, the current ambient brightness is compared with the third preset threshold. At this time, the ambient brightness is less than the third preset threshold and the fill light is on. Then, the fill light can be controlled to be turned off first, and then a frame of the second image collected by the camera with the fill light turned off is obtained to ensure that the second image frame has no fill light, and the brightness A2 of the license plate in the second image frame is determined. After the second image is obtained, the fill light is controlled to be turned on. After the fill light is fully lit, a frame of the first image collected by the camera with the fill light turned on is obtained, and the brightness B2 of the first image frame is determined. Then the brightness difference between the brightness A2 and the brightness B2 is calculated, and the brightness difference is used as the parameter value of the brightness parameter and compared with the second preset threshold C4. If the brightness difference is greater than or equal to C4, it is determined that the detected license plate is a real license plate; if the brightness difference is less than C4, it is determined that the detected license plate is a fake license plate.
[0087] The second preset threshold value C3 used in the daytime shooting scene and the second preset threshold value C4 used in the nighttime shooting scene may be the same or different.
[0088] Based on the fake license plate determination method of this example embodiment, the second preset threshold value can be obtained in advance through experiments. For example, a first sample image of a sample real license plate can be collected when the fill light is turned on, and a second sample image of a sample real license plate can be collected when the fill light is turned off, and then the difference between the brightness of the license plate in the first sample image and the brightness of the license plate in the second sample image corresponding to each sample real license plate is determined, and the difference corresponding to all sample real license plates is averaged to obtain the second preset brightness threshold value.
[0089] Exemplarily, different second preset brightness thresholds may be set for license plates with different background colors. Accordingly, the method for determining a fake license plate may further include: determining the background color of the license plate, and determining the second preset threshold based on the background color. License plates with different background colors may include blue license plates, blue-green gradient license plates, yellow license plates, and white license plates.
[0090] For example, for license plates with different background colors, their reflective properties may differ. Based on this, different second preset thresholds may be set for license plates with different background colors to avoid the influence of reflective differences of different background colors and improve the accuracy of counterfeit license plate recognition. Accordingly, the counterfeit license plate identification method may also include: determining the background color of the license plate, and determining the second preset threshold based on the background color; or determining the background color of the license plate, and determining an adjustment coefficient of the second preset threshold based on the background color.
[0091] Exemplarily, the shooting parameters of the camera when capturing the first image are the same as those when capturing the second image. In this way, it can be ensured that the first image and the second image are images captured by the camera under the same environmental brightness perception capability, avoiding brightness differences caused by different shooting parameters, and improving the accuracy of determining the reflection difference of the license plate when the fill light is on or off.
[0092] The fake license plate determination method provided by the embodiment of the present invention can determine whether a license plate is a fake license plate by utilizing the difference in reflection between a real license plate and a fake license plate when the fill light is on and off. It can identify fake license plates in scenarios such as paper license plates of passable license plates pasted at the vehicle license plate position, and printed photos or models of vehicles containing passable license plates, thereby achieving the purpose of anti-counterfeiting and blocking, and ensuring the normal management of vehicles entering and leaving the venue.
[0093] The fake license plate determination device provided by the present invention is described below. The fake license plate determination device described below and the fake license plate determination method described above can be referenced to each other.
[0094] Figure 2 The schematic diagram of the structure of the fake license plate determination device provided by the embodiment of the present invention is exemplarily shown. Figure 2 As shown, the fake license plate determination device may include: an image acquisition module 210, used to acquire a first image containing a license plate, the first image being an image captured by the camera when the fill light is turned on; a brightness determination module 220, used to determine a first brightness corresponding to a first area of the license plate in the first image; a license plate detection module 230, used to determine whether the license plate is a fake license plate based on a parameter value of a brightness parameter; wherein the parameter value of the brightness parameter is determined according to the first brightness.
[0095] In an exemplary embodiment, the license plate detection module 230 may include: a first determination unit, used to determine a second brightness corresponding to a second area in a first image; a second determination unit, used to determine a parameter value of a brightness parameter based on a brightness difference between the first brightness and the second brightness; and a third determination unit, used to determine that the license plate is a fake license plate when the parameter value of the brightness parameter is less than a first preset threshold value.
[0096] In an exemplary embodiment, when the first area is the background color area of the license plate, the second area is the font area of the license plate; or, when the first area is the license plate area of the license plate, the second area is the vehicle target area in the first image excluding the overall license plate area.
[0097] In an exemplary embodiment, the license plate detection module 230 may include: a first acquisition unit, used to acquire a second image containing the license plate, the second image being an image captured by the camera when the fill light is turned off; a fourth determination unit, used to determine a third brightness corresponding to the first area in the second image; a fifth determination unit, used to determine a parameter value of a brightness parameter based on the brightness difference between the first brightness and the third brightness; and a sixth determination unit, used to determine that the license plate is a fake license plate when the parameter value of the brightness parameter is less than a second preset threshold.
[0098] In an exemplary embodiment, the license plate detection module 230 may further include: a sixth determination unit, configured to determine a background color of the license plate, and determine an adjustment coefficient of the second preset threshold based on the background color.
[0099] In an exemplary embodiment, the shooting parameters of the camera when capturing the first image are the same as the shooting parameters of the camera when capturing the second image.
[0100] In an exemplary embodiment, the image acquisition module 210 may include: a second acquisition unit, used to acquire the ambient brightness when a license plate is detected in the camera's shooting picture; an adjustment unit, used to adjust the camera's shooting parameters when the ambient brightness is greater than or equal to a third preset threshold, so that the ambient brightness acquired by the camera after the shooting parameters are adjusted is less than the third preset threshold; a control unit, used to turn on the camera's fill light and control the camera to capture the first image when the ambient brightness acquired by the camera is less than the third preset threshold.
[0101] In an exemplary embodiment, the second acquisition unit is specifically used to: acquire the ambient brightness when it is detected that the license plate is included in the captured image of the camera and the number of pixels of the license plate is greater than a preset number.
[0102] Figure 3 An example of a structural diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the fake license plate determination method provided by the above-mentioned method embodiments, and the method may include: obtaining a first image containing a license plate, the first image being an image captured by a camera with a fill light turned on; determining a first brightness corresponding to a first area of the license plate in the first image; determining whether the license plate is a fake license plate based on a parameter value of a brightness parameter; wherein the parameter value of the brightness parameter is determined according to the first brightness.
[0103] In some embodiments, the processor 310 may be a general-purpose processor, including a central processing unit (CPU); it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0104] In some embodiments, the communication bus 340 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus.
[0105] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0106] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the fake license plate determination method provided by the above-mentioned method embodiments. The method may include, for example: obtaining a first image including a license plate, the first image being an image captured by a camera with the fill light turned on; determining a first brightness corresponding to a first area of the license plate in the first image; determining whether the license plate is a fake license plate based on the parameter value of the brightness parameter; wherein the parameter value of the brightness parameter is determined based on the first brightness.
[0107] On the other hand, the present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the fake license plate determination method provided by the above-mentioned method embodiments. The method may include, for example: obtaining a first image including a license plate, the first image being an image captured by a camera with a fill light turned on; determining a first brightness corresponding to a first area of the license plate in the first image; determining whether the license plate is a fake license plate based on the parameter value of the brightness parameter; wherein the parameter value of the brightness parameter is determined based on the first brightness.
[0108] By way of example, computer readable storage media include non-transitory computer readable storage media.
[0109] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0110] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0111] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. 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 invention.
Claims
1. A method for determining a fake license plate, characterized in that: include: Acquire a first image including a license plate, where the first image is an image captured by a camera with a fill light turned on; Determine a first brightness corresponding to a first area of the license plate in the first image; Determine whether the license plate is a fake license plate based on the parameter value of the brightness parameter; wherein the parameter value of the brightness parameter is determined according to the first brightness.
2. The method for determining a fake license plate according to claim 1, characterized in that: The determining whether the license plate is a fake license plate based on the parameter value of the brightness parameter includes: Determine a second brightness corresponding to a second area in the first image; determining a parameter value of the brightness parameter according to a brightness difference between the first brightness and the second brightness; When the parameter value of the brightness parameter is less than a first preset threshold, the license plate is determined to be a fake license plate.
3. The method for determining a fake license plate according to claim 2, characterized in that: When the first area is the background color area of the license plate, the second area is the font area of the license plate; or, When the first area is the license plate area of the license plate, the second area is the vehicle target area in the first image except the entire area of the license plate.
4. The method for determining a fake license plate according to claim 1, characterized in that: The determining whether the license plate is a fake license plate based on the parameter value of the brightness parameter includes: Acquire a second image containing the license plate, where the second image is an image captured by the camera when the fill light is turned off; determining a third brightness corresponding to the first area in the second image; Determining a parameter value of the brightness parameter based on a brightness difference between the first brightness and the third brightness; When the parameter value of the brightness parameter is less than a second preset threshold, it is determined that the license plate is a fake license plate.
5. The method for determining a fake license plate according to claim 4, characterized in that: The shooting parameters of the camera when acquiring the first image are the same as the shooting parameters when acquiring the second image.
6. The method for determining a fake license plate according to claim 4, characterized in that: Also includes: The base color of the license plate is determined, and an adjustment coefficient of the second preset threshold is determined based on the base color.
7. The method for determining a fake license plate according to any one of claims 1 to 6, characterized in that: The step of acquiring a first image including a license plate comprises: When it is detected that the license plate is included in the image captured by the camera, obtaining the ambient brightness; When the ambient brightness is greater than or equal to a third preset threshold, adjusting the shooting parameters of the camera so that the ambient brightness acquired by the camera after the shooting parameters are adjusted is less than the third preset threshold; When the ambient brightness acquired by the camera is less than the third preset threshold, the fill light of the camera is turned on, and the camera is controlled to capture the first image.
8. The method for determining a fake license plate according to claim 7, characterized in that: The step of obtaining the ambient brightness when detecting that the license plate is included in the image captured by the camera includes: When it is detected that the license plate is included in the picture taken by the camera and the number of pixels of the license plate is greater than a preset number, the ambient brightness is obtained.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for determining a fake license plate according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for determining a fake license plate according to any one of claims 1 to 8 is implemented.